diff --git a/.changeset/mean-rats-unite.md b/.changeset/mean-rats-unite.md new file mode 100644 index 0000000..99616c5 --- /dev/null +++ b/.changeset/mean-rats-unite.md @@ -0,0 +1,5 @@ +--- +"Examples": minor +--- + +Add Fleek Function assets. diff --git a/src/clients/functions.ts b/src/clients/functions.ts index 1f95bd1..2ee0416 100644 --- a/src/clients/functions.ts +++ b/src/clients/functions.ts @@ -33,6 +33,7 @@ export type DeployFleekFunctionArgs = { cid: string; sgx?: boolean; blake3Hash?: string; + assetsCid?: string; }; export type ListFleekFunctionArgs = { functionId: string; @@ -70,7 +71,6 @@ export class FunctionsClient { public get = async ({ name }: GetFleekFunctionArgs) => { const response = await this.graphqlClient.query({ - __name: 'GetFleekFunctionByName', fleekFunctionByName: { __args: { where: { @@ -86,7 +86,6 @@ export class FunctionsClient { public list = async () => { const response = await this.graphqlClient.query({ - __name: 'GetFleekFunctions', fleekFunctions: { __args: {}, data: { @@ -119,7 +118,6 @@ export class FunctionsClient { public create = async ({ name }: CreateFleekFunctionArgs) => { const response = await this.graphqlClient.mutation({ - __name: 'CreateFleekFunction', createFleekFunction: { __args: { data: { @@ -138,6 +136,7 @@ export class FunctionsClient { cid, sgx, blake3Hash, + assetsCid, }: DeployFleekFunctionArgs): Promise => { const response = await this.graphqlClient.mutation({ triggerFleekFunctionDeployment: { @@ -146,7 +145,7 @@ export class FunctionsClient { functionId, cid, }, - data: { sgx, blake3Hash }, + data: { sgx, blake3Hash, assetsCid }, }, ...FunctionsClient.Deployment_MAPPED_PROPERTIES, }, @@ -157,7 +156,6 @@ export class FunctionsClient { public delete = async ({ id }: DeleteFleekFunctionArgs) => { const response = await this.graphqlClient.mutation({ - __name: 'DeleteFleekFunction', deleteFleekFunction: { __args: { where: { diff --git a/src/clients/user.test.ts b/src/clients/user.test.ts index a389c24..0bdb17e 100644 --- a/src/clients/user.test.ts +++ b/src/clients/user.test.ts @@ -30,11 +30,9 @@ describe('User', () => { }); it('should delete personal access token', async () => { - const response = await sdk - .user() - .deletePersonalAccessToken({ - id: state.auth.personalAccessToken.joshOwnedToken.id, - }); + const response = await sdk.user().deletePersonalAccessToken({ + id: state.auth.personalAccessToken.joshOwnedToken.id, + }); expect(response).toMatchInlineSnapshot(` Object {