Skip to content

Commit

Permalink
chore: 🤖 fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
heldrida committed Oct 7, 2024
1 parent 4c41299 commit 981dd87
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 39 deletions.
1 change: 1 addition & 0 deletions src/content/docs/SDK/IPFS/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ When importing the SDK (version 3 and above), you should explicitly specify the
```ts
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
```

:::

## Methods
Expand Down
6 changes: 3 additions & 3 deletions src/content/docs/SDK/IPNS/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ When importing the SDK (version 3 and above), you should explicitly specify the
```ts
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
```

:::

## Methods
Expand Down Expand Up @@ -150,7 +151,7 @@ To publish an IPNS record, you need to provide the IPNS record name and the IPFS
### Function Signature

```typescript
async ({ hash, id }: PublishRecordArgs): Promise<IpnsRecord>
async ({ hash, id }: PublishRecordArgs): Promise<IpnsRecord>
```

### Parameters
Expand All @@ -159,12 +160,11 @@ async ({ hash, id }: PublishRecordArgs): Promise<IpnsRecord>
type PublishRecordArgs = {
id: string;
hash: string;
}
};
```

### Returns

Returns a Promise which resolves to a IpnsRecord type, containing an id, name and the hash.

```typescript
Expand Down
71 changes: 36 additions & 35 deletions src/content/docs/SDK/Projects/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ When importing the SDK (version 3 and above), you should explicitly specify the
```ts
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
```

:::

## Create
Expand All @@ -38,7 +39,7 @@ async ({ name }: CreateProjectArgs): Promise<Project>
```typescript
type CreateProjectArgs = {
name: string;
}
};
```

### Returns
Expand All @@ -47,14 +48,14 @@ Returns a Promise which resolves to a Project type, to name a few, containing an

```typescript
type Project = {
avatar: File;
backupStorageOnArweave: boolean;
backupStorageOnFilecoin: boolean;
createdAt: Date;
id: string;
name: string;
updatedAt: Date;
}
avatar: File;
backupStorageOnArweave: boolean;
backupStorageOnFilecoin: boolean;
createdAt: Date;
id: string;
name: string;
updatedAt: Date;
};
```

### Usage Example
Expand Down Expand Up @@ -98,13 +99,13 @@ Returns a Promise which resolves to a list of Project type, to name a few, conta
```typescript
type Project = {
avatar: File;
backupStorageOnArweave: boolean;
backupStorageOnFilecoin: boolean;
createdAt: Date;
id: string;
name: string;
updatedAt: Date;
avatar: File;
backupStorageOnArweave: boolean;
backupStorageOnFilecoin: boolean;
createdAt: Date;
id: string;
name: string;
updatedAt: Date;
}[];
```

Expand Down Expand Up @@ -134,15 +135,15 @@ Use the `get` method to retrieve a `Project` by its `id`.
### Function Signature

```typescript
async ({ id }: GetProjectArgs): Promise<Project>
async ({ id }: GetProjectArgs): Promise<Project>
```

### Parameters

```typescript
type GetProjectArgs = {
id: string;
}
};
```

### Returns
Expand All @@ -151,13 +152,13 @@ Returns a Promise which resolves to a Project type, to name a few, containing an

```typescript
type Project = {
avatar: File;
backupStorageOnArweave: boolean;
backupStorageOnFilecoin: boolean;
createdAt: Date;
id: string;
name: string;
updatedAt: Date;
avatar: File;
backupStorageOnArweave: boolean;
backupStorageOnFilecoin: boolean;
createdAt: Date;
id: string;
name: string;
updatedAt: Date;
};
```

Expand Down Expand Up @@ -189,21 +190,21 @@ Use the `update` method by:
### Function Signature

```typescript
async ({ id }: GetProjectArgs): Promise<Project>
async ({ id }: GetProjectArgs): Promise<Project>
```

### Parameters

```typescript
type UpdateProjectArgs = {
where: {
id: string,
id: string;
};
data: {
name?: string;
avatar?: File;
backupStorageOnArweave?: boolean;
backupStorageOnFilecoin?: boolean,
backupStorageOnFilecoin?: boolean;
};
};
```
Expand All @@ -214,13 +215,13 @@ Returns a Promise which resolves to a Project type, to name a few, containing an

```typescript
type Project = {
avatar: File;
backupStorageOnArweave: boolean;
backupStorageOnFilecoin: boolean;
createdAt: Date;
id: string;
name: string;
updatedAt: Date;
avatar: File;
backupStorageOnArweave: boolean;
backupStorageOnFilecoin: boolean;
createdAt: Date;
id: string;
name: string;
updatedAt: Date;
};
```

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/SDK/Storage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ When importing the SDK (version 3 and above), you should explicitly specify the
```ts
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
```

:::

## Methods
Expand Down Expand Up @@ -288,7 +289,6 @@ const res = await fleekSdk.storage().getByFilename({
});
```


## Delete

The `delete` is an asynchronous function designed to delete a storage file by it's CID.
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/SDK/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ npm install @fleek-platform/sdk
## Authentication

Authentication requires providing an access token. There are currently two methods available:

- The [ApplicationAccessTokenService](#applicationaccesstokenservice): For public-facing applications, which tokens are generated via the Fleek Platform user account's [dashboard](https://app.fleek.xyz)
- The [PersonalAccessTokenService](#personalaccesstokenservice): Used typically for server-side applications, which tokens are managed via [CLI](/docs/cli). You must keep these tokens secure and hidden

Expand Down Expand Up @@ -75,6 +76,7 @@ const fleekSdkInstanceB = new FleekSdk({

:::note
When importing the SDK (version 3 and above), you can explicitly specify the environment:

- For server-side (Node.js): Use @fleek-platform/sdk/node in the import statement
- For client-side (Browser): USe @fleek-platform/sdk/browser in the import statement

Expand Down

0 comments on commit 981dd87

Please sign in to comment.