diff --git a/src/reference/sdks/frontend/files.md b/src/reference/sdks/frontend/files.md index feb1784..3b9e9d7 100644 --- a/src/reference/sdks/frontend/files.md +++ b/src/reference/sdks/frontend/files.md @@ -146,93 +146,6 @@ Gets all hosted files. The files. -##### onDeletedHostedFile() - -> **onDeletedHostedFile**: (`callback`: (`fileId`: `string`) => `void`) => `ListenerHandle` - -Listen for deleted hosted files. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `callback` | (`fileId`: `string`) => `void` | The callback function that receives the file ID. | - -###### Returns - -`ListenerHandle` - -A handle object with a `stop` method to stop listening. - -###### Example - -```ts -const handle = sdk.files.onDeletedHostedFile((fileId) => { - console.log(`Hosted file deleted:`, fileId); -}); - -// Later, stop listening -handle.stop(); -``` - -##### onUpdatedHostedFile() - -> **onUpdatedHostedFile**: (`callback`: (`event`: [`HostedFile`](#hostedfile)) => `void`) => `ListenerHandle` - -Listen for updated hosted files. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `callback` | (`event`: [`HostedFile`](#hostedfile)) => `void` | The callback function that receives the hosted file. | - -###### Returns - -`ListenerHandle` - -A handle object with a `stop` method to stop listening. - -###### Example - -```ts -const handle = sdk.files.onUpdatedHostedFile((hostedFile) => { - console.log(`Hosted file updated:`, hostedFile); -}); - -// Later, stop listening -handle.stop(); -``` - -##### onUploadedHostedFile() - -> **onUploadedHostedFile**: (`callback`: (`event`: [`HostedFile`](#hostedfile)) => `void`) => `ListenerHandle` - -Listen for uploaded hosted files. - -###### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `callback` | (`event`: [`HostedFile`](#hostedfile)) => `void` | The callback function that receives the hosted file. | - -###### Returns - -`ListenerHandle` - -A handle object with a `stop` method to stop listening. - -###### Example - -```ts -const handle = sdk.files.onUploadedHostedFile((hostedFile) => { - console.log(`Hosted file uploaded:`, hostedFile); -}); - -// Later, stop listening -handle.stop(); -``` - ##### rename() > **rename**: (`id`: `string`, `name`: `string`) => `Promise`\<[`HostedFile`](#hostedfile)\>