@botpress/client 0.24.0 → 0.24.2

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/index.d.ts CHANGED
@@ -1384,6 +1384,9 @@ interface GetStateResponse {
1384
1384
  [k: string]: any;
1385
1385
  };
1386
1386
  };
1387
+ meta: {
1388
+ cached: boolean;
1389
+ };
1387
1390
  }
1388
1391
 
1389
1392
  interface SetStateRequestHeaders {
@@ -1520,6 +1523,9 @@ interface GetOrSetStateResponse {
1520
1523
  [k: string]: any;
1521
1524
  };
1522
1525
  };
1526
+ meta: {
1527
+ cached: boolean;
1528
+ };
1523
1529
  }
1524
1530
 
1525
1531
  interface PatchStateRequestHeaders {
@@ -1612,6 +1618,9 @@ interface CallActionResponse {
1612
1618
  output: {
1613
1619
  [k: string]: any;
1614
1620
  };
1621
+ meta: {
1622
+ cached: boolean;
1623
+ };
1615
1624
  }
1616
1625
 
1617
1626
  interface ConfigureIntegrationRequestHeaders {
@@ -7727,7 +7736,7 @@ interface UpsertFileRequestBody {
7727
7736
  */
7728
7737
  size: number;
7729
7738
  /**
7730
- * Set to a value of 'true' to index the file in vector storage. Only PDFs, Office documents, and text-based files are currently supported. Note that if a file is indexed, it will count towards both the Vector DB Storage quota and the File Storage quota of the workspace.
7739
+ * Set to a value of 'true' to index the file in vector storage. Only certain file formats are currently supported for indexing. Note that if a file is indexed, it will count towards both the Vector DB Storage quota and the File Storage quota of the workspace.
7731
7740
  */
7732
7741
  index?: boolean;
7733
7742
  /**
@@ -8099,6 +8108,23 @@ interface SearchFilesResponse {
8099
8108
  * The score indicating the similarity of the passage to the query. A higher score indicates higher similarity.
8100
8109
  */
8101
8110
  score: number;
8111
+ /**
8112
+ * The passage metadata
8113
+ */
8114
+ meta: {
8115
+ /**
8116
+ * The type of passage
8117
+ */
8118
+ type?: "chunk";
8119
+ /**
8120
+ * The subtype of passage, if any.
8121
+ */
8122
+ subtype?: "title" | "subtitle" | "paragraph" | "list" | "note";
8123
+ /**
8124
+ * Page number the passage is located on. Only applicable if the passage was extracted from a PDF file.
8125
+ */
8126
+ pageNumber?: number;
8127
+ };
8102
8128
  file: {
8103
8129
  /**
8104
8130
  * File ID
@@ -8186,7 +8212,7 @@ interface ListTablesResponse {
8186
8212
  */
8187
8213
  width?: number;
8188
8214
  computed?: {
8189
- action: "ai" | "code";
8215
+ action: "ai" | "workflow";
8190
8216
  dependencies?: string[];
8191
8217
  /**
8192
8218
  * Prompt when action is "ai"
@@ -8197,9 +8223,9 @@ interface ListTablesResponse {
8197
8223
  */
8198
8224
  model?: "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-16k" | "gpt-4o" | "gpt-4" | "gpt-4-turbo" | "gpt-4-0125-preview" | "gpt-4-1106-preview";
8199
8225
  /**
8200
- * Code to execute when action is "code"
8226
+ * ID of Workflow to execute when action is "workflow"
8201
8227
  */
8202
- code?: string;
8228
+ workflowId?: string;
8203
8229
  enabled?: boolean;
8204
8230
  };
8205
8231
  /**
@@ -8302,7 +8328,7 @@ interface GetTableResponse {
8302
8328
  */
8303
8329
  width?: number;
8304
8330
  computed?: {
8305
- action: "ai" | "code";
8331
+ action: "ai" | "workflow";
8306
8332
  dependencies?: string[];
8307
8333
  /**
8308
8334
  * Prompt when action is "ai"
@@ -8313,9 +8339,9 @@ interface GetTableResponse {
8313
8339
  */
8314
8340
  model?: "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-16k" | "gpt-4o" | "gpt-4" | "gpt-4-turbo" | "gpt-4-0125-preview" | "gpt-4-1106-preview";
8315
8341
  /**
8316
- * Code to execute when action is "code"
8342
+ * ID of Workflow to execute when action is "workflow"
8317
8343
  */
8318
- code?: string;
8344
+ workflowId?: string;
8319
8345
  enabled?: boolean;
8320
8346
  };
8321
8347
  /**
@@ -8454,7 +8480,7 @@ interface GetOrCreateTableResponse {
8454
8480
  */
8455
8481
  width?: number;
8456
8482
  computed?: {
8457
- action: "ai" | "code";
8483
+ action: "ai" | "workflow";
8458
8484
  dependencies?: string[];
8459
8485
  /**
8460
8486
  * Prompt when action is "ai"
@@ -8465,9 +8491,9 @@ interface GetOrCreateTableResponse {
8465
8491
  */
8466
8492
  model?: "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-16k" | "gpt-4o" | "gpt-4" | "gpt-4-turbo" | "gpt-4-0125-preview" | "gpt-4-1106-preview";
8467
8493
  /**
8468
- * Code to execute when action is "code"
8494
+ * ID of Workflow to execute when action is "workflow"
8469
8495
  */
8470
- code?: string;
8496
+ workflowId?: string;
8471
8497
  enabled?: boolean;
8472
8498
  };
8473
8499
  /**
@@ -8613,7 +8639,7 @@ interface CreateTableResponse {
8613
8639
  */
8614
8640
  width?: number;
8615
8641
  computed?: {
8616
- action: "ai" | "code";
8642
+ action: "ai" | "workflow";
8617
8643
  dependencies?: string[];
8618
8644
  /**
8619
8645
  * Prompt when action is "ai"
@@ -8624,9 +8650,9 @@ interface CreateTableResponse {
8624
8650
  */
8625
8651
  model?: "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-16k" | "gpt-4o" | "gpt-4" | "gpt-4-turbo" | "gpt-4-0125-preview" | "gpt-4-1106-preview";
8626
8652
  /**
8627
- * Code to execute when action is "code"
8653
+ * ID of Workflow to execute when action is "workflow"
8628
8654
  */
8629
- code?: string;
8655
+ workflowId?: string;
8630
8656
  enabled?: boolean;
8631
8657
  };
8632
8658
  /**
@@ -8738,7 +8764,7 @@ interface DuplicateTableResponse {
8738
8764
  */
8739
8765
  width?: number;
8740
8766
  computed?: {
8741
- action: "ai" | "code";
8767
+ action: "ai" | "workflow";
8742
8768
  dependencies?: string[];
8743
8769
  /**
8744
8770
  * Prompt when action is "ai"
@@ -8749,9 +8775,9 @@ interface DuplicateTableResponse {
8749
8775
  */
8750
8776
  model?: "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-16k" | "gpt-4o" | "gpt-4" | "gpt-4-turbo" | "gpt-4-0125-preview" | "gpt-4-1106-preview";
8751
8777
  /**
8752
- * Code to execute when action is "code"
8778
+ * ID of Workflow to execute when action is "workflow"
8753
8779
  */
8754
- code?: string;
8780
+ workflowId?: string;
8755
8781
  enabled?: boolean;
8756
8782
  };
8757
8783
  /**
@@ -8882,7 +8908,7 @@ interface UpdateTableResponse {
8882
8908
  */
8883
8909
  width?: number;
8884
8910
  computed?: {
8885
- action: "ai" | "code";
8911
+ action: "ai" | "workflow";
8886
8912
  dependencies?: string[];
8887
8913
  /**
8888
8914
  * Prompt when action is "ai"
@@ -8893,9 +8919,9 @@ interface UpdateTableResponse {
8893
8919
  */
8894
8920
  model?: "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-16k" | "gpt-4o" | "gpt-4" | "gpt-4-turbo" | "gpt-4-0125-preview" | "gpt-4-1106-preview";
8895
8921
  /**
8896
- * Code to execute when action is "code"
8922
+ * ID of Workflow to execute when action is "workflow"
8897
8923
  */
8898
- code?: string;
8924
+ workflowId?: string;
8899
8925
  enabled?: boolean;
8900
8926
  };
8901
8927
  /**
@@ -9010,7 +9036,7 @@ interface RenameTableColumnResponse {
9010
9036
  */
9011
9037
  width?: number;
9012
9038
  computed?: {
9013
- action: "ai" | "code";
9039
+ action: "ai" | "workflow";
9014
9040
  dependencies?: string[];
9015
9041
  /**
9016
9042
  * Prompt when action is "ai"
@@ -9021,9 +9047,9 @@ interface RenameTableColumnResponse {
9021
9047
  */
9022
9048
  model?: "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-16k" | "gpt-4o" | "gpt-4" | "gpt-4-turbo" | "gpt-4-0125-preview" | "gpt-4-1106-preview";
9023
9049
  /**
9024
- * Code to execute when action is "code"
9050
+ * ID of Workflow to execute when action is "workflow"
9025
9051
  */
9026
- code?: string;
9052
+ workflowId?: string;
9027
9053
  enabled?: boolean;
9028
9054
  };
9029
9055
  /**
@@ -10147,6 +10173,15 @@ interface Workspace {
10147
10173
  isPublic?: boolean;
10148
10174
  handle?: string;
10149
10175
  }
10176
+ interface WorkspaceMember {
10177
+ id: string;
10178
+ userId?: string;
10179
+ email: string;
10180
+ createdAt: string;
10181
+ role: "viewer" | "billing" | "developer" | "manager" | "administrator" | "owner";
10182
+ profilePicture?: string;
10183
+ displayName?: string;
10184
+ }
10150
10185
  interface Account {
10151
10186
  id: string;
10152
10187
  email: string;
@@ -10397,6 +10432,186 @@ interface State {
10397
10432
  [k: string]: any;
10398
10433
  };
10399
10434
  }
10435
+ interface Table {
10436
+ /**
10437
+ * Unique identifier for the table
10438
+ */
10439
+ id: string;
10440
+ /**
10441
+ * Required. This name is used to identify your table.
10442
+ */
10443
+ name: string;
10444
+ /**
10445
+ * The 'factor' multiplies the row's data storage limit by 4KB and its quota count, but can only be set at table creation and not modified later. For instance, a factor of 2 increases storage to 8KB but counts as 2 rows in your quota. The default factor is 1.
10446
+ */
10447
+ factor?: number;
10448
+ /**
10449
+ * A table designated as "frozen" is immutable in terms of its name and schema structure; modifications to its schema or a renaming operation are not permitted. The only action that can be taken on such a table is deletion. The schema established at the time of creation is locked in as the final structure. To implement any changes, the table must be duplicated with the desired alterations.
10450
+ */
10451
+ frozen?: boolean;
10452
+ schema: {
10453
+ $schema: string;
10454
+ /**
10455
+ * List of keys/columns in the table.
10456
+ */
10457
+ properties: {
10458
+ [k: string]: {
10459
+ type: "string" | "number" | "boolean" | "object" | "null";
10460
+ format?: "date-time";
10461
+ description?: string;
10462
+ nullable?: boolean;
10463
+ "x-zui": {
10464
+ index: number;
10465
+ /**
10466
+ * [deprecated] ID of the column.
10467
+ */
10468
+ id?: string;
10469
+ /**
10470
+ * Indicates if the column is vectorized and searchable.
10471
+ */
10472
+ searchable?: boolean;
10473
+ /**
10474
+ * Indicates if the field is hidden in the UI
10475
+ */
10476
+ hidden?: boolean;
10477
+ /**
10478
+ * Order of the column in the UI
10479
+ */
10480
+ order?: number;
10481
+ /**
10482
+ * Width of the column in the UI
10483
+ */
10484
+ width?: number;
10485
+ computed?: {
10486
+ action: "ai" | "workflow";
10487
+ dependencies?: string[];
10488
+ /**
10489
+ * Prompt when action is "ai"
10490
+ */
10491
+ prompt?: string;
10492
+ /**
10493
+ * Model to use when action is "ai"
10494
+ */
10495
+ model?: "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-16k" | "gpt-4o" | "gpt-4" | "gpt-4-turbo" | "gpt-4-0125-preview" | "gpt-4-1106-preview";
10496
+ /**
10497
+ * ID of Workflow to execute when action is "workflow"
10498
+ */
10499
+ workflowId?: string;
10500
+ enabled?: boolean;
10501
+ };
10502
+ /**
10503
+ * TypeScript typings for the column. Recommended if the type is "object", ex: "\{ foo: string; bar: number \}"
10504
+ */
10505
+ typings?: string;
10506
+ };
10507
+ };
10508
+ };
10509
+ /**
10510
+ * Additional properties can be provided, but they will be ignored if no column matches.
10511
+ */
10512
+ additionalProperties: true;
10513
+ /**
10514
+ * Array of required properties.
10515
+ */
10516
+ required?: string[];
10517
+ type: "object";
10518
+ };
10519
+ /**
10520
+ * Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs.
10521
+ */
10522
+ tags?: {
10523
+ [k: string]: string;
10524
+ };
10525
+ /**
10526
+ * Indicates if the table is enabled for computation.
10527
+ */
10528
+ isComputeEnabled?: boolean;
10529
+ /**
10530
+ * Timestamp of table creation.
10531
+ */
10532
+ createdAt?: string;
10533
+ /**
10534
+ * Timestamp of the last table update.
10535
+ */
10536
+ updatedAt?: string;
10537
+ }
10538
+ interface Column {
10539
+ /**
10540
+ * Unique identifier for the column.
10541
+ */
10542
+ id?: string;
10543
+ /**
10544
+ * Name of the column, must be within length limits.
10545
+ */
10546
+ name: string;
10547
+ /**
10548
+ * Optional descriptive text about the column.
10549
+ */
10550
+ description?: string;
10551
+ /**
10552
+ * Indicates if the column is vectorized and searchable.
10553
+ */
10554
+ searchable?: boolean;
10555
+ /**
10556
+ * Specifies the data type of the column. Use "object" for complex data structures.
10557
+ */
10558
+ type: "string" | "number" | "boolean" | "date" | "object";
10559
+ /**
10560
+ * TypeScript typings for the column. Recommended if the type is "object", ex: "\{ foo: string; bar: number \}"
10561
+ */
10562
+ typings?: string;
10563
+ computed?: {
10564
+ action: "ai" | "workflow";
10565
+ dependencies?: string[];
10566
+ /**
10567
+ * Prompt when action is "ai"
10568
+ */
10569
+ prompt?: string;
10570
+ /**
10571
+ * Model to use when action is "ai"
10572
+ */
10573
+ model?: "gpt-3.5-turbo" | "gpt-3.5-turbo-0125" | "gpt-3.5-turbo-1106" | "gpt-3.5-turbo-16k" | "gpt-4o" | "gpt-4" | "gpt-4-turbo" | "gpt-4-0125-preview" | "gpt-4-1106-preview";
10574
+ /**
10575
+ * ID of Workflow to execute when action is "workflow"
10576
+ */
10577
+ workflowId?: string;
10578
+ enabled?: boolean;
10579
+ };
10580
+ schema?: {
10581
+ [k: string]: any;
10582
+ };
10583
+ }
10584
+ interface Row {
10585
+ /**
10586
+ * Unique identifier for the row.
10587
+ */
10588
+ id: number;
10589
+ /**
10590
+ * Timestamp of row creation.
10591
+ */
10592
+ createdAt?: string;
10593
+ /**
10594
+ * Timestamp of the last row update.
10595
+ */
10596
+ updatedAt?: string;
10597
+ computed: {
10598
+ [k: string]: {
10599
+ status: string;
10600
+ error?: string;
10601
+ updatedBy?: string;
10602
+ updatedAt?: string;
10603
+ };
10604
+ };
10605
+ /**
10606
+ * [Read-only] List of stale values that are waiting to be recomputed.
10607
+ */
10608
+ stale?: string[];
10609
+ /**
10610
+ * Optional numeric value indicating similarity, when using findTableRows.
10611
+ */
10612
+ similarity?: number;
10613
+ [k: string]: any;
10614
+ }
10400
10615
  interface File {
10401
10616
  /**
10402
10617
  * File ID
@@ -10907,4 +11122,4 @@ declare class Client extends Client$1 implements IClient {
10907
11122
  readonly uploadFile: ({ key, index, tags, contentType, accessPolicies, content, url, }: ClientInputs['uploadFile']) => Promise<ClientOutputs['uploadFile']>;
10908
11123
  }
10909
11124
 
10910
- export { type Account, AlreadyExistsError, type ApiError, type Bot, BreakingChangesError, Client, type ClientConfig, type ClientInputs, type ClientOutputs, type ClientParams, type ClientProps, type ClientReturn, type Conversation, type ErrorType, type Event, type File, ForbiddenError, type IClient, type Integration, type Interface, InternalError, InvalidDataFormatError, InvalidIdentifierError, InvalidJsonSchemaError, InvalidPayloadError, InvalidQueryError, type Issue, type IssueEvent, LimitExceededError, type Message, MethodNotFoundError, type Operation, PayloadTooLargeError, PaymentRequiredError, QuotaExceededError, RateLimitedError, ReferenceConstraintError, ReferenceNotFoundError, RelationConflictError, ResourceLockedConflictError, ResourceNotFoundError, RuntimeError, type State, UnauthorizedError, UnknownError, UnsupportedMediaTypeError, UploadFileError, type Usage, type User, type Workspace, errorFrom, isApiError };
11125
+ export { type Account, AlreadyExistsError, type ApiError, type Bot, BreakingChangesError, Client, type ClientConfig, type ClientInputs, type ClientOutputs, type ClientParams, type ClientProps, type ClientReturn, type Column, type Conversation, type ErrorType, type Event, type File, ForbiddenError, type IClient, type Integration, type Interface, InternalError, InvalidDataFormatError, InvalidIdentifierError, InvalidJsonSchemaError, InvalidPayloadError, InvalidQueryError, type Issue, type IssueEvent, LimitExceededError, type Message, MethodNotFoundError, type Operation, PayloadTooLargeError, PaymentRequiredError, QuotaExceededError, RateLimitedError, ReferenceConstraintError, ReferenceNotFoundError, RelationConflictError, ResourceLockedConflictError, ResourceNotFoundError, type Row, RuntimeError, type State, type Table, UnauthorizedError, UnknownError, UnsupportedMediaTypeError, UploadFileError, type Usage, type User, type Workspace, type WorkspaceMember, errorFrom, isApiError };