Appearance
Function: getAllDataStoreFiles()
ts
function getAllDataStoreFiles(ctx: Context, params: {
dataStoreId: string;
sessionTokens?: string[];
}): Promise<DataStoreFileDownload[]>;Defined in: src/data-store/index.ts:153
Get all files (latest versions) from a data store.
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | Context | Current execution context. |
params | { dataStoreId: string; sessionTokens?: string[]; } | Query parameters. |
params.dataStoreId | string | The ID of the data store. |
params.sessionTokens? | string[] | Optional session tokens. |
Returns
Promise<DataStoreFileDownload[]>
All file downloads in the data store.
Example
ts
const files = await getAllDataStoreFiles(ctx, { dataStoreId: 'store-123' });
for (const file of files) {
console.log(file.name, file.url);
}