@squidcloud/client 1.0.193 → 1.0.195

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -51257,7 +51257,7 @@ class StorageClient {
51257
51257
  async uploadFile(dirPathInBucket, file, expirationInSeconds) {
51258
51258
  const request = {
51259
51259
  integrationId: this.integrationId,
51260
- pathInBucket: dirPathInBucket,
51260
+ dirPathInBucket,
51261
51261
  expirationInSeconds,
51262
51262
  };
51263
51263
  await this.rpcManager.post('storage/uploadFile', request, [file]);
@@ -51271,7 +51271,7 @@ class StorageClient {
51271
51271
  async getFileMetadata(filePathInBucket) {
51272
51272
  const request = {
51273
51273
  integrationId: this.integrationId,
51274
- pathInBucket: filePathInBucket,
51274
+ filePathInBucket,
51275
51275
  };
51276
51276
  return await this.rpcManager.post('storage/getFileMetadata', request);
51277
51277
  }
@@ -51285,7 +51285,7 @@ class StorageClient {
51285
51285
  async getDownloadUrl(filePathInBucket, urlExpirationInSeconds) {
51286
51286
  const request = {
51287
51287
  integrationId: this.integrationId,
51288
- pathInBucket: filePathInBucket,
51288
+ filePathInBucket,
51289
51289
  urlExpirationInSeconds,
51290
51290
  };
51291
51291
  return await this.rpcManager.post('storage/getDownloadUrl', request);
@@ -51299,7 +51299,7 @@ class StorageClient {
51299
51299
  async listDirectoryContents(dirPathInBucket) {
51300
51300
  const request = {
51301
51301
  integrationId: this.integrationId,
51302
- pathInBucket: dirPathInBucket,
51302
+ dirPathInBucket,
51303
51303
  };
51304
51304
  return await this.rpcManager.post('storage/listDirectoryContents', request);
51305
51305
  }
@@ -51321,7 +51321,7 @@ class StorageClient {
51321
51321
  async deleteFiles(filePathsInBucket) {
51322
51322
  const request = {
51323
51323
  integrationId: this.integrationId,
51324
- pathsInBucket: filePathsInBucket,
51324
+ filePathsInBucket,
51325
51325
  };
51326
51326
  await this.rpcManager.post('storage/deleteFiles', request);
51327
51327
  }
@@ -11,9 +11,9 @@ import { NativeQueryContext } from './native-query.public-context';
11
11
  import { DistributedLockContext } from './distributed-lock.public-context';
12
12
  import { GraphqlContext } from './graphql.public-context';
13
13
  import { AiChatbotChatContext, AiChatbotMutationContext } from './ai-chatbot.public-context';
14
- import { SecureStorageRequest } from './storage.types';
14
+ import { StorageContext } from './storage.types';
15
15
  export type SecureDatabaseAction<T extends DatabaseActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: QueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: MutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
16
- export type SecureStorageAction<T extends StorageActionType> = T extends 'all' ? () => boolean | Promise<boolean> : (request: SecureStorageRequest) => boolean | Promise<boolean>;
16
+ export type SecureStorageAction<T extends StorageActionType> = T extends 'all' ? () => boolean | Promise<boolean> : (context: StorageContext) => boolean | Promise<boolean>;
17
17
  export type SecureTopicAction<T extends TopicActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: TopicReadContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: TopicWriteContext<T>) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
18
18
  export type SecureApiAction = ((context: ApiCallContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
19
19
  export type SecureNativeQueryAction = ((context: NativeQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
@@ -1,7 +1,7 @@
1
1
  import { IntegrationId } from './communication.public-types';
2
2
  import { StorageActionType } from './bundle-data.public-types';
3
- export type StorageFunctionality = 'fileUpload';
4
- export interface SecureStorageRequest {
3
+ export type StorageFunctionality = 'fileUpload' | 'getFileMetadata' | 'getDownloadUrl' | 'deleteFiles' | 'listDirectoryContents';
4
+ export interface StorageContext {
5
5
  integrationId: IntegrationId;
6
6
  pathsInBucket: Array<string>;
7
7
  action: StorageActionType;
@@ -2,12 +2,12 @@ import { BlobAndFilename } from './types';
2
2
  import { IntegrationId } from '../../internal-common/src/public-types/communication.public-types';
3
3
  export interface StorageFileUploadRequest {
4
4
  integrationId: IntegrationId;
5
- pathInBucket: string;
5
+ dirPathInBucket: string;
6
6
  expirationInSeconds?: number;
7
7
  }
8
8
  export interface GetFileMetadataRequest {
9
9
  integrationId: IntegrationId;
10
- pathInBucket: string;
10
+ filePathInBucket: string;
11
11
  }
12
12
  export interface GetFileMetadataResponse {
13
13
  filename: string;
@@ -17,7 +17,7 @@ export interface GetFileMetadataResponse {
17
17
  }
18
18
  export interface GetDownloadUrlRequest {
19
19
  integrationId: IntegrationId;
20
- pathInBucket: string;
20
+ filePathInBucket: string;
21
21
  urlExpirationInSeconds?: number;
22
22
  }
23
23
  export interface GetDownloadUrlResponse {
@@ -25,15 +25,15 @@ export interface GetDownloadUrlResponse {
25
25
  }
26
26
  export interface DeleteFilesRequest {
27
27
  integrationId: IntegrationId;
28
- pathsInBucket: Array<string>;
28
+ filePathsInBucket: Array<string>;
29
29
  }
30
30
  export interface ListDirectoryContentsRequest {
31
31
  integrationId: IntegrationId;
32
- pathInBucket: string;
32
+ dirPathInBucket: string;
33
33
  }
34
34
  export interface FileInDirectory {
35
35
  filename: string;
36
- absolutePathInBucket: string;
36
+ absoluteFilePathInBucket: string;
37
37
  size: number;
38
38
  lastModified: Date;
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/client",
3
- "version": "1.0.193",
3
+ "version": "1.0.195",
4
4
  "description": "A typescript implementation of the Squid client",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/typescript-client/src/index.d.ts",