@botpress/client 0.20.1 → 0.22.0

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.
Files changed (34) hide show
  1. package/.turbo/turbo-build.log +5 -5
  2. package/.turbo/turbo-generate.log +1 -1
  3. package/dist/bundle.cjs +12 -12
  4. package/dist/bundle.cjs.map +4 -4
  5. package/dist/client.d.ts +2 -2
  6. package/dist/errors.d.ts +3 -3
  7. package/dist/gen/errors.d.ts +9 -2
  8. package/dist/gen/index.d.ts +12 -6
  9. package/dist/gen/models.d.ts +29 -7
  10. package/dist/gen/operations/createIntegration.d.ts +40 -0
  11. package/dist/gen/operations/createWorkspaceMember.d.ts +2 -0
  12. package/dist/gen/operations/getFile.d.ts +7 -7
  13. package/dist/gen/operations/getIntegration.d.ts +20 -0
  14. package/dist/gen/operations/getIntegrationByName.d.ts +20 -0
  15. package/dist/gen/operations/getMultipleUsages.d.ts +45 -0
  16. package/dist/gen/operations/getPublicIntegration.d.ts +20 -0
  17. package/dist/gen/operations/getPublicIntegrationById.d.ts +20 -0
  18. package/dist/gen/operations/getWorkspaceMember.d.ts +2 -0
  19. package/dist/gen/operations/listFiles.d.ts +7 -7
  20. package/dist/gen/operations/listPublicWorkspaces.d.ts +42 -0
  21. package/dist/gen/operations/listWorkspaceInvoices.d.ts +5 -1
  22. package/dist/gen/operations/listWorkspaceMembers.d.ts +2 -0
  23. package/dist/gen/operations/searchFiles.d.ts +1 -5
  24. package/dist/gen/operations/{updateFile.d.ts → updateFileMetadata.d.ts} +20 -20
  25. package/dist/gen/operations/updateIntegration.d.ts +40 -0
  26. package/dist/gen/operations/updateWorkspaceMember.d.ts +2 -0
  27. package/dist/gen/operations/{createFile.d.ts → upsertFile.d.ts} +25 -25
  28. package/dist/index.cjs +3 -3
  29. package/dist/index.cjs.map +4 -4
  30. package/dist/index.mjs +3 -3
  31. package/dist/index.mjs.map +4 -4
  32. package/dist/types.d.ts +4 -4
  33. package/package.json +2 -2
  34. package/tests/manual/file-upload.test.ts +10 -10
package/dist/client.d.ts CHANGED
@@ -4,7 +4,7 @@ export declare class Client extends gen.Client implements types.IClient {
4
4
  readonly config: Readonly<types.ClientConfig>;
5
5
  constructor(clientProps?: types.ClientProps);
6
6
  /**
7
- * Creates and uploads a new file in a single step. Returns an object containing the file metadata and the URL to retrieve the file.
7
+ * Create/update and upload a file in a single step. Returns an object containing the file metadata and the URL to retrieve the file.
8
8
  */
9
- readonly createAndUploadFile: ({ name, index, tags, contentType, accessPolicies, content, url, }: types.ClientInputs['createAndUploadFile']) => Promise<types.ClientOutputs['createAndUploadFile']>;
9
+ readonly uploadFile: ({ key, index, tags, contentType, accessPolicies, content, url, }: types.ClientInputs['uploadFile']) => Promise<types.ClientOutputs['uploadFile']>;
10
10
  }
package/dist/errors.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { AxiosError } from 'axios';
2
2
  export * from './gen/errors';
3
- export declare class CreateAndUploadFileError extends Error {
3
+ export declare class UploadFileError extends Error {
4
4
  readonly innerError?: AxiosError<unknown, any> | undefined;
5
5
  readonly file?: {
6
6
  id: string;
7
7
  botId: string;
8
- name: string | null;
8
+ key: string;
9
9
  size: number | null;
10
10
  contentType: string;
11
11
  tags: {
@@ -22,7 +22,7 @@ export declare class CreateAndUploadFileError extends Error {
22
22
  constructor(message: string, innerError?: AxiosError<unknown, any> | undefined, file?: {
23
23
  id: string;
24
24
  botId: string;
25
- name: string | null;
25
+ key: string;
26
26
  size: number | null;
27
27
  contentType: string;
28
28
  tags: {
@@ -135,6 +135,13 @@ type ReferenceConstraintType = 'ReferenceConstraint';
135
135
  export declare class ReferenceConstraintError extends BaseApiError<409, ReferenceConstraintType, 'The resource cannot be deleted because it\'s referenced by another resource'> {
136
136
  constructor(message: string, error?: Error, id?: string);
137
137
  }
138
+ type ResourceLockedConflictType = 'ResourceLockedConflict';
139
+ /**
140
+ * The resource is current locked and cannot be operated on until the lock is released.
141
+ */
142
+ export declare class ResourceLockedConflictError extends BaseApiError<409, ResourceLockedConflictType, 'The resource is current locked and cannot be operated on until the lock is released.'> {
143
+ constructor(message: string, error?: Error, id?: string);
144
+ }
138
145
  type ReferenceNotFoundType = 'ReferenceNotFound';
139
146
  /**
140
147
  * The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.
@@ -198,7 +205,7 @@ type BreakingChangesType = 'BreakingChanges';
198
205
  export declare class BreakingChangesError extends BaseApiError<400, BreakingChangesType, 'Request payload contains breaking changes which is not allowed for this resource without a version increment.'> {
199
206
  constructor(message: string, error?: Error, id?: string);
200
207
  }
201
- export type ErrorType = 'Unknown' | 'Internal' | 'Unauthorized' | 'Forbidden' | 'PayloadTooLarge' | 'InvalidPayload' | 'UnsupportedMediaType' | 'MethodNotFound' | 'ResourceNotFound' | 'InvalidJsonSchema' | 'InvalidDataFormat' | 'InvalidIdentifier' | 'RelationConflict' | 'ReferenceConstraint' | 'ReferenceNotFound' | 'InvalidQuery' | 'Runtime' | 'AlreadyExists' | 'RateLimited' | 'PaymentRequired' | 'QuotaExceeded' | 'LimitExceeded' | 'BreakingChanges';
202
- export type ApiError = UnknownError | InternalError | UnauthorizedError | ForbiddenError | PayloadTooLargeError | InvalidPayloadError | UnsupportedMediaTypeError | MethodNotFoundError | ResourceNotFoundError | InvalidJsonSchemaError | InvalidDataFormatError | InvalidIdentifierError | RelationConflictError | ReferenceConstraintError | ReferenceNotFoundError | InvalidQueryError | RuntimeError | AlreadyExistsError | RateLimitedError | PaymentRequiredError | QuotaExceededError | LimitExceededError | BreakingChangesError;
208
+ export type ErrorType = 'Unknown' | 'Internal' | 'Unauthorized' | 'Forbidden' | 'PayloadTooLarge' | 'InvalidPayload' | 'UnsupportedMediaType' | 'MethodNotFound' | 'ResourceNotFound' | 'InvalidJsonSchema' | 'InvalidDataFormat' | 'InvalidIdentifier' | 'RelationConflict' | 'ReferenceConstraint' | 'ResourceLockedConflict' | 'ReferenceNotFound' | 'InvalidQuery' | 'Runtime' | 'AlreadyExists' | 'RateLimited' | 'PaymentRequired' | 'QuotaExceeded' | 'LimitExceeded' | 'BreakingChanges';
209
+ export type ApiError = UnknownError | InternalError | UnauthorizedError | ForbiddenError | PayloadTooLargeError | InvalidPayloadError | UnsupportedMediaTypeError | MethodNotFoundError | ResourceNotFoundError | InvalidJsonSchemaError | InvalidDataFormatError | InvalidIdentifierError | RelationConflictError | ReferenceConstraintError | ResourceLockedConflictError | ReferenceNotFoundError | InvalidQueryError | RuntimeError | AlreadyExistsError | RateLimitedError | PaymentRequiredError | QuotaExceededError | LimitExceededError | BreakingChangesError;
203
210
  export declare const errorFrom: (err: unknown) => ApiError;
204
211
  export {};
@@ -76,6 +76,7 @@ import * as listWorkspaceQuotas from './operations/listWorkspaceQuotas';
76
76
  import * as updateWorkspace from './operations/updateWorkspace';
77
77
  import * as checkHandleAvailability from './operations/checkHandleAvailability';
78
78
  import * as listWorkspaces from './operations/listWorkspaces';
79
+ import * as listPublicWorkspaces from './operations/listPublicWorkspaces';
79
80
  import * as deleteWorkspace from './operations/deleteWorkspace';
80
81
  import * as getAuditRecords from './operations/getAuditRecords';
81
82
  import * as listWorkspaceMembers from './operations/listWorkspaceMembers';
@@ -94,15 +95,16 @@ import * as getIntegrationLogs from './operations/getIntegrationLogs';
94
95
  import * as getIntegrationByName from './operations/getIntegrationByName';
95
96
  import * as deleteIntegration from './operations/deleteIntegration';
96
97
  import * as getUsage from './operations/getUsage';
98
+ import * as getMultipleUsages from './operations/getMultipleUsages';
97
99
  import * as listUsageHistory from './operations/listUsageHistory';
98
100
  import * as changeAISpendQuota from './operations/changeAISpendQuota';
99
101
  import * as listActivities from './operations/listActivities';
100
102
  import * as introspect from './operations/introspect';
101
- import * as createFile from './operations/createFile';
103
+ import * as upsertFile from './operations/upsertFile';
102
104
  import * as deleteFile from './operations/deleteFile';
103
105
  import * as listFiles from './operations/listFiles';
104
106
  import * as getFile from './operations/getFile';
105
- import * as updateFile from './operations/updateFile';
107
+ import * as updateFileMetadata from './operations/updateFileMetadata';
106
108
  import * as searchFiles from './operations/searchFiles';
107
109
  import * as listTables from './operations/listTables';
108
110
  import * as getTable from './operations/getTable';
@@ -195,6 +197,7 @@ export * as listWorkspaceQuotas from './operations/listWorkspaceQuotas';
195
197
  export * as updateWorkspace from './operations/updateWorkspace';
196
198
  export * as checkHandleAvailability from './operations/checkHandleAvailability';
197
199
  export * as listWorkspaces from './operations/listWorkspaces';
200
+ export * as listPublicWorkspaces from './operations/listPublicWorkspaces';
198
201
  export * as deleteWorkspace from './operations/deleteWorkspace';
199
202
  export * as getAuditRecords from './operations/getAuditRecords';
200
203
  export * as listWorkspaceMembers from './operations/listWorkspaceMembers';
@@ -213,15 +216,16 @@ export * as getIntegrationLogs from './operations/getIntegrationLogs';
213
216
  export * as getIntegrationByName from './operations/getIntegrationByName';
214
217
  export * as deleteIntegration from './operations/deleteIntegration';
215
218
  export * as getUsage from './operations/getUsage';
219
+ export * as getMultipleUsages from './operations/getMultipleUsages';
216
220
  export * as listUsageHistory from './operations/listUsageHistory';
217
221
  export * as changeAISpendQuota from './operations/changeAISpendQuota';
218
222
  export * as listActivities from './operations/listActivities';
219
223
  export * as introspect from './operations/introspect';
220
- export * as createFile from './operations/createFile';
224
+ export * as upsertFile from './operations/upsertFile';
221
225
  export * as deleteFile from './operations/deleteFile';
222
226
  export * as listFiles from './operations/listFiles';
223
227
  export * as getFile from './operations/getFile';
224
- export * as updateFile from './operations/updateFile';
228
+ export * as updateFileMetadata from './operations/updateFileMetadata';
225
229
  export * as searchFiles from './operations/searchFiles';
226
230
  export * as listTables from './operations/listTables';
227
231
  export * as getTable from './operations/getTable';
@@ -320,6 +324,7 @@ export declare class Client {
320
324
  readonly updateWorkspace: (input: updateWorkspace.UpdateWorkspaceInput) => Promise<updateWorkspace.UpdateWorkspaceResponse>;
321
325
  readonly checkHandleAvailability: (input: checkHandleAvailability.CheckHandleAvailabilityInput) => Promise<checkHandleAvailability.CheckHandleAvailabilityResponse>;
322
326
  readonly listWorkspaces: (input: listWorkspaces.ListWorkspacesInput) => Promise<listWorkspaces.ListWorkspacesResponse>;
327
+ readonly listPublicWorkspaces: (input: listPublicWorkspaces.ListPublicWorkspacesInput) => Promise<listPublicWorkspaces.ListPublicWorkspacesResponse>;
323
328
  readonly deleteWorkspace: (input: deleteWorkspace.DeleteWorkspaceInput) => Promise<deleteWorkspace.DeleteWorkspaceResponse>;
324
329
  readonly getAuditRecords: (input: getAuditRecords.GetAuditRecordsInput) => Promise<getAuditRecords.GetAuditRecordsResponse>;
325
330
  readonly listWorkspaceMembers: (input: listWorkspaceMembers.ListWorkspaceMembersInput) => Promise<listWorkspaceMembers.ListWorkspaceMembersResponse>;
@@ -338,15 +343,16 @@ export declare class Client {
338
343
  readonly getIntegrationByName: (input: getIntegrationByName.GetIntegrationByNameInput) => Promise<getIntegrationByName.GetIntegrationByNameResponse>;
339
344
  readonly deleteIntegration: (input: deleteIntegration.DeleteIntegrationInput) => Promise<deleteIntegration.DeleteIntegrationResponse>;
340
345
  readonly getUsage: (input: getUsage.GetUsageInput) => Promise<getUsage.GetUsageResponse>;
346
+ readonly getMultipleUsages: (input: getMultipleUsages.GetMultipleUsagesInput) => Promise<getMultipleUsages.GetMultipleUsagesResponse>;
341
347
  readonly listUsageHistory: (input: listUsageHistory.ListUsageHistoryInput) => Promise<listUsageHistory.ListUsageHistoryResponse>;
342
348
  readonly changeAISpendQuota: (input: changeAISpendQuota.ChangeAispendQuotaInput) => Promise<changeAISpendQuota.ChangeAispendQuotaResponse>;
343
349
  readonly listActivities: (input: listActivities.ListActivitiesInput) => Promise<listActivities.ListActivitiesResponse>;
344
350
  readonly introspect: (input: introspect.IntrospectInput) => Promise<introspect.IntrospectResponse>;
345
- readonly createFile: (input: createFile.CreateFileInput) => Promise<createFile.CreateFileResponse>;
351
+ readonly upsertFile: (input: upsertFile.UpsertFileInput) => Promise<upsertFile.UpsertFileResponse>;
346
352
  readonly deleteFile: (input: deleteFile.DeleteFileInput) => Promise<deleteFile.DeleteFileResponse>;
347
353
  readonly listFiles: (input: listFiles.ListFilesInput) => Promise<listFiles.ListFilesResponse>;
348
354
  readonly getFile: (input: getFile.GetFileInput) => Promise<getFile.GetFileResponse>;
349
- readonly updateFile: (input: updateFile.UpdateFileInput) => Promise<updateFile.UpdateFileResponse>;
355
+ readonly updateFileMetadata: (input: updateFileMetadata.UpdateFileMetadataInput) => Promise<updateFileMetadata.UpdateFileMetadataResponse>;
350
356
  readonly searchFiles: (input: searchFiles.SearchFilesInput) => Promise<searchFiles.SearchFilesResponse>;
351
357
  readonly listTables: (input: listTables.ListTablesInput) => Promise<listTables.ListTablesResponse>;
352
358
  readonly getTable: (input: getTable.GetTableInput) => Promise<getTable.GetTableResponse>;
@@ -323,6 +323,26 @@ export interface Integration {
323
323
  * Version of the [Integration](#schema_integration)
324
324
  */
325
325
  version: string;
326
+ interfaces: {
327
+ [k: string]: {
328
+ id: string;
329
+ entities: {
330
+ [k: string]: {
331
+ name: string;
332
+ };
333
+ };
334
+ actions: {
335
+ [k: string]: {
336
+ name: string;
337
+ };
338
+ };
339
+ events: {
340
+ [k: string]: {
341
+ name: string;
342
+ };
343
+ };
344
+ };
345
+ };
326
346
  /**
327
347
  * Configuration definition
328
348
  */
@@ -584,6 +604,8 @@ export interface WorkspaceMember {
584
604
  email: string;
585
605
  createdAt: string;
586
606
  role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
607
+ profilePicture?: string;
608
+ displayName?: string;
587
609
  }
588
610
  export interface Account {
589
611
  id: string;
@@ -1103,9 +1125,9 @@ export interface File {
1103
1125
  */
1104
1126
  botId: string;
1105
1127
  /**
1106
- * File name
1128
+ * Unique key for the file. Must be unique across the bot (and the integration, when applicable).
1107
1129
  */
1108
- name: string | null;
1130
+ key: string;
1109
1131
  /**
1110
1132
  * If the file is not uploaded yet, this will be set to a `null` value.
1111
1133
  *
@@ -1143,17 +1165,17 @@ export interface File {
1143
1165
  */
1144
1166
  index: boolean;
1145
1167
  /**
1146
- * Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully.
1168
+ * Status of the file. If the status is `upload_pending`, the file content has not been uploaded yet. The status will be set to `upload_completed` once the file content has been uploaded successfully.
1147
1169
  *
1148
- * If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file.
1170
+ * If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to `upload_failed` and the reason for the failure will be available in the `failedStatusReason` field of the file.
1149
1171
  *
1150
- * However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped).
1172
+ * However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the `indexing_pending` status (the `upload_completed` status step will be skipped).
1151
1173
  *
1152
- * Once the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field.
1174
+ * Once the indexing is completed and the file is ready to be used for searching its status will be set to `indexing_completed`. If the indexing failed the status will be set to `indexing_failed` and the reason for the failure will be available in the `failedStatusReason` field.
1153
1175
  */
1154
1176
  status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed";
1155
1177
  /**
1156
- * If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure.
1178
+ * If the file status is `upload_failed` or `indexing_failed` this will contain the reason of the failure.
1157
1179
  */
1158
1180
  failedStatusReason?: string;
1159
1181
  }
@@ -13,6 +13,26 @@ export interface CreateIntegrationRequestBody {
13
13
  * Version of the [Integration](#schema_integration)
14
14
  */
15
15
  version: string;
16
+ interfaces?: {
17
+ [k: string]: {
18
+ id: string;
19
+ entities: {
20
+ [k: string]: {
21
+ name: string;
22
+ };
23
+ };
24
+ actions: {
25
+ [k: string]: {
26
+ name: string;
27
+ };
28
+ };
29
+ events: {
30
+ [k: string]: {
31
+ name: string;
32
+ };
33
+ };
34
+ };
35
+ };
16
36
  configuration?: {
17
37
  /**
18
38
  * Schema of the configuration in the `JSON schema` format. The configuration data is validated against this `JSON schema`.
@@ -294,6 +314,26 @@ export interface CreateIntegrationResponse {
294
314
  * Version of the [Integration](#schema_integration)
295
315
  */
296
316
  version: string;
317
+ interfaces: {
318
+ [k: string]: {
319
+ id: string;
320
+ entities: {
321
+ [k: string]: {
322
+ name: string;
323
+ };
324
+ };
325
+ actions: {
326
+ [k: string]: {
327
+ name: string;
328
+ };
329
+ };
330
+ events: {
331
+ [k: string]: {
332
+ name: string;
333
+ };
334
+ };
335
+ };
336
+ };
297
337
  /**
298
338
  * Configuration definition
299
339
  */
@@ -24,4 +24,6 @@ export interface CreateWorkspaceMemberResponse {
24
24
  email: string;
25
25
  createdAt: string;
26
26
  role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
27
+ profilePicture?: string;
28
+ displayName?: string;
27
29
  }
@@ -28,9 +28,9 @@ export interface GetFileResponse {
28
28
  */
29
29
  botId: string;
30
30
  /**
31
- * File name
31
+ * Unique key for the file. Must be unique across the bot (and the integration, when applicable).
32
32
  */
33
- name: string | null;
33
+ key: string;
34
34
  /**
35
35
  * If the file is not uploaded yet, this will be set to a `null` value.
36
36
  *
@@ -68,17 +68,17 @@ export interface GetFileResponse {
68
68
  */
69
69
  index: boolean;
70
70
  /**
71
- * Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully.
71
+ * Status of the file. If the status is `upload_pending`, the file content has not been uploaded yet. The status will be set to `upload_completed` once the file content has been uploaded successfully.
72
72
  *
73
- * If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file.
73
+ * If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to `upload_failed` and the reason for the failure will be available in the `failedStatusReason` field of the file.
74
74
  *
75
- * However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped).
75
+ * However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the `indexing_pending` status (the `upload_completed` status step will be skipped).
76
76
  *
77
- * Once the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field.
77
+ * Once the indexing is completed and the file is ready to be used for searching its status will be set to `indexing_completed`. If the indexing failed the status will be set to `indexing_failed` and the reason for the failure will be available in the `failedStatusReason` field.
78
78
  */
79
79
  status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed";
80
80
  /**
81
- * If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure.
81
+ * If the file status is `upload_failed` or `indexing_failed` this will contain the reason of the failure.
82
82
  */
83
83
  failedStatusReason?: string;
84
84
  };
@@ -56,6 +56,26 @@ export interface GetIntegrationResponse {
56
56
  * Version of the [Integration](#schema_integration)
57
57
  */
58
58
  version: string;
59
+ interfaces: {
60
+ [k: string]: {
61
+ id: string;
62
+ entities: {
63
+ [k: string]: {
64
+ name: string;
65
+ };
66
+ };
67
+ actions: {
68
+ [k: string]: {
69
+ name: string;
70
+ };
71
+ };
72
+ events: {
73
+ [k: string]: {
74
+ name: string;
75
+ };
76
+ };
77
+ };
78
+ };
59
79
  /**
60
80
  * Configuration definition
61
81
  */
@@ -57,6 +57,26 @@ export interface GetIntegrationByNameResponse {
57
57
  * Version of the [Integration](#schema_integration)
58
58
  */
59
59
  version: string;
60
+ interfaces: {
61
+ [k: string]: {
62
+ id: string;
63
+ entities: {
64
+ [k: string]: {
65
+ name: string;
66
+ };
67
+ };
68
+ actions: {
69
+ [k: string]: {
70
+ name: string;
71
+ };
72
+ };
73
+ events: {
74
+ [k: string]: {
75
+ name: string;
76
+ };
77
+ };
78
+ };
79
+ };
60
80
  /**
61
81
  * Configuration definition
62
82
  */
@@ -0,0 +1,45 @@
1
+ export interface GetMultipleUsagesRequestHeaders {
2
+ }
3
+ export interface GetMultipleUsagesRequestQuery {
4
+ types: string[];
5
+ ids: string[];
6
+ period?: string;
7
+ }
8
+ export interface GetMultipleUsagesRequestParams {
9
+ }
10
+ export interface GetMultipleUsagesRequestBody {
11
+ }
12
+ export type GetMultipleUsagesInput = GetMultipleUsagesRequestBody & GetMultipleUsagesRequestHeaders & GetMultipleUsagesRequestQuery & GetMultipleUsagesRequestParams;
13
+ export type GetMultipleUsagesRequest = {
14
+ headers: GetMultipleUsagesRequestHeaders;
15
+ query: GetMultipleUsagesRequestQuery;
16
+ params: GetMultipleUsagesRequestParams;
17
+ body: GetMultipleUsagesRequestBody;
18
+ };
19
+ export declare const parseReq: (input: GetMultipleUsagesInput) => GetMultipleUsagesRequest & {
20
+ path: string;
21
+ };
22
+ export interface GetMultipleUsagesResponse {
23
+ usages: {
24
+ /**
25
+ * Id of the usage that it is linked to. It can either be a workspace id or a bot id
26
+ */
27
+ id: string;
28
+ /**
29
+ * Period of the quota that it is applied to
30
+ */
31
+ period: string;
32
+ /**
33
+ * Value of the current usage
34
+ */
35
+ value: number;
36
+ /**
37
+ * Quota of the current usage
38
+ */
39
+ quota: number;
40
+ /**
41
+ * Usage type that can be used
42
+ */
43
+ type: "invocation_timeout" | "invocation_calls" | "storage_count" | "bot_count" | "knowledgebase_vector_storage" | "workspace_ratelimit" | "table_row_count" | "workspace_member_count" | "integrations_owned_count" | "ai_spend" | "openai_spend" | "bing_search_spend" | "always_alive";
44
+ }[];
45
+ }
@@ -57,6 +57,26 @@ export interface GetPublicIntegrationResponse {
57
57
  * Version of the [Integration](#schema_integration)
58
58
  */
59
59
  version: string;
60
+ interfaces: {
61
+ [k: string]: {
62
+ id: string;
63
+ entities: {
64
+ [k: string]: {
65
+ name: string;
66
+ };
67
+ };
68
+ actions: {
69
+ [k: string]: {
70
+ name: string;
71
+ };
72
+ };
73
+ events: {
74
+ [k: string]: {
75
+ name: string;
76
+ };
77
+ };
78
+ };
79
+ };
60
80
  /**
61
81
  * Configuration definition
62
82
  */
@@ -56,6 +56,26 @@ export interface GetPublicIntegrationByIdResponse {
56
56
  * Version of the [Integration](#schema_integration)
57
57
  */
58
58
  version: string;
59
+ interfaces: {
60
+ [k: string]: {
61
+ id: string;
62
+ entities: {
63
+ [k: string]: {
64
+ name: string;
65
+ };
66
+ };
67
+ actions: {
68
+ [k: string]: {
69
+ name: string;
70
+ };
71
+ };
72
+ events: {
73
+ [k: string]: {
74
+ name: string;
75
+ };
76
+ };
77
+ };
78
+ };
59
79
  /**
60
80
  * Configuration definition
61
81
  */
@@ -22,4 +22,6 @@ export interface GetWorkspaceMemberResponse {
22
22
  email: string;
23
23
  createdAt: string;
24
24
  role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
25
+ profilePicture?: string;
26
+ displayName?: string;
25
27
  }
@@ -31,9 +31,9 @@ export interface ListFilesResponse {
31
31
  */
32
32
  botId: string;
33
33
  /**
34
- * File name
34
+ * Unique key for the file. Must be unique across the bot (and the integration, when applicable).
35
35
  */
36
- name: string | null;
36
+ key: string;
37
37
  /**
38
38
  * If the file is not uploaded yet, this will be set to a `null` value.
39
39
  *
@@ -71,17 +71,17 @@ export interface ListFilesResponse {
71
71
  */
72
72
  index: boolean;
73
73
  /**
74
- * Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully.
74
+ * Status of the file. If the status is `upload_pending`, the file content has not been uploaded yet. The status will be set to `upload_completed` once the file content has been uploaded successfully.
75
75
  *
76
- * If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file.
76
+ * If the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to `upload_failed` and the reason for the failure will be available in the `failedStatusReason` field of the file.
77
77
  *
78
- * However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped).
78
+ * However, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the `indexing_pending` status (the `upload_completed` status step will be skipped).
79
79
  *
80
- * Once the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field.
80
+ * Once the indexing is completed and the file is ready to be used for searching its status will be set to `indexing_completed`. If the indexing failed the status will be set to `indexing_failed` and the reason for the failure will be available in the `failedStatusReason` field.
81
81
  */
82
82
  status: "upload_pending" | "upload_failed" | "upload_completed" | "indexing_pending" | "indexing_failed" | "indexing_completed";
83
83
  /**
84
- * If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure.
84
+ * If the file status is `upload_failed` or `indexing_failed` this will contain the reason of the failure.
85
85
  */
86
86
  failedStatusReason?: string;
87
87
  }[];
@@ -0,0 +1,42 @@
1
+ export interface ListPublicWorkspacesRequestHeaders {
2
+ }
3
+ export interface ListPublicWorkspacesRequestQuery {
4
+ nextToken?: string;
5
+ workspaceIds?: string[];
6
+ search?: string;
7
+ }
8
+ export interface ListPublicWorkspacesRequestParams {
9
+ }
10
+ export interface ListPublicWorkspacesRequestBody {
11
+ }
12
+ export type ListPublicWorkspacesInput = ListPublicWorkspacesRequestBody & ListPublicWorkspacesRequestHeaders & ListPublicWorkspacesRequestQuery & ListPublicWorkspacesRequestParams;
13
+ export type ListPublicWorkspacesRequest = {
14
+ headers: ListPublicWorkspacesRequestHeaders;
15
+ query: ListPublicWorkspacesRequestQuery;
16
+ params: ListPublicWorkspacesRequestParams;
17
+ body: ListPublicWorkspacesRequestBody;
18
+ };
19
+ export declare const parseReq: (input: ListPublicWorkspacesInput) => ListPublicWorkspacesRequest & {
20
+ path: string;
21
+ };
22
+ export interface ListPublicWorkspacesResponse {
23
+ workspaces: GetPublicWorkspaceResponse[];
24
+ meta: {
25
+ /**
26
+ * The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint.
27
+ */
28
+ nextToken?: string;
29
+ };
30
+ }
31
+ export interface GetPublicWorkspaceResponse {
32
+ id: string;
33
+ name: string;
34
+ createdAt: string;
35
+ updatedAt: string;
36
+ about?: string;
37
+ profilePicture?: string;
38
+ contactEmail?: string;
39
+ website?: string;
40
+ socialAccounts?: string[];
41
+ handle?: string;
42
+ }
@@ -36,7 +36,11 @@ export interface ListWorkspaceInvoicesResponse {
36
36
  * Currency of the invoice amount.
37
37
  */
38
38
  currency: string;
39
- paymentStatus: "paid" | "unpaid";
39
+ paymentStatus: ("deleted" | "draft" | "open" | "paid" | "uncollectible" | "void") | null;
40
+ /**
41
+ * Date on which the invoice is due.
42
+ */
43
+ dueDate?: string;
40
44
  /**
41
45
  * Number of times payment has been unsuccessfully attempted on the invoice.
42
46
  */
@@ -24,6 +24,8 @@ export interface ListWorkspaceMembersResponse {
24
24
  email: string;
25
25
  createdAt: string;
26
26
  role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
27
+ profilePicture?: string;
28
+ displayName?: string;
27
29
  }[];
28
30
  meta: {
29
31
  /**
@@ -38,11 +38,7 @@ export interface SearchFilesResponse {
38
38
  */
39
39
  id: string;
40
40
  /**
41
- * File name
42
- */
43
- name: string | null;
44
- /**
45
- * The tags of the file as an object of key/value pairs.
41
+ * The tags of the file as an object of key-value pairs.
46
42
  */
47
43
  tags: {
48
44
  [k: string]: string;