Skip to content

Commit

Permalink
chore: Merge branch 'develop' into chore/monorepo-packages-sdk-deprec…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
heldrida committed Oct 29, 2024
2 parents 92b2ec3 + e3b946f commit 58b1419
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/mean-rats-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"Examples": minor
---

Add Fleek Function assets.
8 changes: 3 additions & 5 deletions src/clients/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export type DeployFleekFunctionArgs = {
cid: string;
sgx?: boolean;
blake3Hash?: string;
assetsCid?: string;
};
export type ListFleekFunctionArgs = {
functionId: string;
Expand Down Expand Up @@ -70,7 +71,6 @@ export class FunctionsClient {

public get = async ({ name }: GetFleekFunctionArgs) => {
const response = await this.graphqlClient.query({
__name: 'GetFleekFunctionByName',
fleekFunctionByName: {
__args: {
where: {
Expand All @@ -86,7 +86,6 @@ export class FunctionsClient {

public list = async () => {
const response = await this.graphqlClient.query({
__name: 'GetFleekFunctions',
fleekFunctions: {
__args: {},
data: {
Expand Down Expand Up @@ -119,7 +118,6 @@ export class FunctionsClient {

public create = async ({ name }: CreateFleekFunctionArgs) => {
const response = await this.graphqlClient.mutation({
__name: 'CreateFleekFunction',
createFleekFunction: {
__args: {
data: {
Expand All @@ -138,6 +136,7 @@ export class FunctionsClient {
cid,
sgx,
blake3Hash,
assetsCid,
}: DeployFleekFunctionArgs): Promise<FleekFunctionDeployment> => {
const response = await this.graphqlClient.mutation({
triggerFleekFunctionDeployment: {
Expand All @@ -146,7 +145,7 @@ export class FunctionsClient {
functionId,
cid,
},
data: { sgx, blake3Hash },
data: { sgx, blake3Hash, assetsCid },
},
...FunctionsClient.Deployment_MAPPED_PROPERTIES,
},
Expand All @@ -157,7 +156,6 @@ export class FunctionsClient {

public delete = async ({ id }: DeleteFleekFunctionArgs) => {
const response = await this.graphqlClient.mutation({
__name: 'DeleteFleekFunction',
deleteFleekFunction: {
__args: {
where: {
Expand Down
8 changes: 3 additions & 5 deletions src/clients/user.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 58b1419

Please sign in to comment.