@botpress/client 1.24.1 → 1.25.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.
package/dist/index.d.ts CHANGED
@@ -588,6 +588,10 @@ interface CreateEventRequestBody$1 {
588
588
  * ID of the [User](#schema_user) to link the event to.
589
589
  */
590
590
  userId?: string;
591
+ /**
592
+ * ID of the [Workflow](#schema_workflow) to link the event to.
593
+ */
594
+ workflowId?: string;
591
595
  /**
592
596
  * ID of the [Message](#schema_message) to link the event to.
593
597
  */
@@ -698,6 +702,7 @@ interface ListEventsRequestQuery$1 {
698
702
  conversationId?: string;
699
703
  userId?: string;
700
704
  messageId?: string;
705
+ workflowId?: string;
701
706
  status?: "pending" | "ignored" | "processed" | "failed" | "scheduled";
702
707
  }
703
708
  interface ListEventsRequestParams$1 {
@@ -795,6 +800,7 @@ interface CreateMessageRequestBody$1 {
795
800
  */
796
801
  delay?: number;
797
802
  };
803
+ origin?: "synthetic";
798
804
  }
799
805
  type CreateMessageInput$1 = CreateMessageRequestBody$1 & CreateMessageRequestHeaders$1 & CreateMessageRequestQuery$1 & CreateMessageRequestParams$1;
800
806
  interface CreateMessageResponse$1 {
@@ -842,6 +848,10 @@ interface CreateMessageResponse$1 {
842
848
  tags: {
843
849
  [k: string]: string;
844
850
  };
851
+ /**
852
+ * Origin of the message (`synthetic`).
853
+ */
854
+ origin?: "synthetic";
845
855
  };
846
856
  }
847
857
 
@@ -889,6 +899,7 @@ interface GetOrCreateMessageRequestBody$1 {
889
899
  */
890
900
  delay?: number;
891
901
  };
902
+ origin?: "synthetic";
892
903
  /**
893
904
  * Optional list of tag names to use for strict matching when looking up existing messages. If provided, all specified tags must match exactly for a message to be considered a match. For example, with an existing message whose tags are {"foo": "a", "bar": "b", baz: "c"}: Without this parameter, ALL tags must match exactly. With ["bar","baz"], all listed tags must match their values, and other tags are not considered.
894
905
  */
@@ -940,6 +951,10 @@ interface GetOrCreateMessageResponse$1 {
940
951
  tags: {
941
952
  [k: string]: string;
942
953
  };
954
+ /**
955
+ * Origin of the message (`synthetic`).
956
+ */
957
+ origin?: "synthetic";
943
958
  };
944
959
  }
945
960
 
@@ -998,6 +1013,10 @@ interface GetMessageResponse$1 {
998
1013
  tags: {
999
1014
  [k: string]: string;
1000
1015
  };
1016
+ /**
1017
+ * Origin of the message (`synthetic`).
1018
+ */
1019
+ origin?: "synthetic";
1001
1020
  };
1002
1021
  }
1003
1022
 
@@ -1068,6 +1087,10 @@ interface UpdateMessageResponse$1 {
1068
1087
  tags: {
1069
1088
  [k: string]: string;
1070
1089
  };
1090
+ /**
1091
+ * Origin of the message (`synthetic`).
1092
+ */
1093
+ origin?: "synthetic";
1071
1094
  };
1072
1095
  }
1073
1096
 
@@ -1127,6 +1150,10 @@ interface ListMessagesResponse$1 {
1127
1150
  tags: {
1128
1151
  [k: string]: string;
1129
1152
  };
1153
+ /**
1154
+ * Origin of the message (`synthetic`).
1155
+ */
1156
+ origin?: "synthetic";
1130
1157
  }[];
1131
1158
  meta: {
1132
1159
  /**
@@ -2266,7 +2293,7 @@ interface CreateWorkflowRequestBody$1 {
2266
2293
  tags?: {
2267
2294
  [k: string]: string;
2268
2295
  };
2269
- status: "pending" | "in_progress";
2296
+ status: "pending" | "in_progress" | "listening";
2270
2297
  /**
2271
2298
  * Event id must be specified if the workflow is created with the status in_progress
2272
2299
  */
@@ -2678,7 +2705,7 @@ interface GetOrCreateWorkflowRequestBody$1 {
2678
2705
  tags?: {
2679
2706
  [k: string]: string;
2680
2707
  };
2681
- status: "pending" | "in_progress";
2708
+ status: "pending" | "in_progress" | "listening";
2682
2709
  /**
2683
2710
  * Event id must be specified if the workflow is created with the status in_progress
2684
2711
  */
@@ -2903,6 +2930,7 @@ declare class Client$8 extends Client$9 {
2903
2930
  type?: string | undefined;
2904
2931
  userId?: string | undefined;
2905
2932
  conversationId?: string | undefined;
2933
+ workflowId?: string | undefined;
2906
2934
  messageId?: string | undefined;
2907
2935
  status?: "pending" | "ignored" | "processed" | "failed" | "scheduled" | undefined;
2908
2936
  }) => AsyncCollection<{
@@ -2937,6 +2965,7 @@ declare class Client$8 extends Client$9 {
2937
2965
  tags: {
2938
2966
  [k: string]: string;
2939
2967
  };
2968
+ origin?: "synthetic";
2940
2969
  }>;
2941
2970
  users: (props: {
2942
2971
  tags?: {
@@ -5445,7 +5474,7 @@ interface CreateBotResponse$1 {
5445
5474
  */
5446
5475
  signingSecret: string;
5447
5476
  /**
5448
- * A mapping of integrations to their configuration
5477
+ * A mapping of integrations to their configuration. If the `x-multiple-integrations` header is present, this object is keyed by integration aliases. Otherwise, this object is keyed by integration ids.
5449
5478
  */
5450
5479
  integrations: {
5451
5480
  [k: string]: {
@@ -6076,7 +6105,7 @@ interface UpdateBotResponse$1 {
6076
6105
  */
6077
6106
  signingSecret: string;
6078
6107
  /**
6079
- * A mapping of integrations to their configuration
6108
+ * A mapping of integrations to their configuration. If the `x-multiple-integrations` header is present, this object is keyed by integration aliases. Otherwise, this object is keyed by integration ids.
6080
6109
  */
6081
6110
  integrations: {
6082
6111
  [k: string]: {
@@ -6539,7 +6568,7 @@ interface GetBotResponse$1 {
6539
6568
  */
6540
6569
  signingSecret: string;
6541
6570
  /**
6542
- * A mapping of integrations to their configuration
6571
+ * A mapping of integrations to their configuration. If the `x-multiple-integrations` header is present, this object is keyed by integration aliases. Otherwise, this object is keyed by integration ids.
6543
6572
  */
6544
6573
  integrations: {
6545
6574
  [k: string]: {
@@ -14646,6 +14675,10 @@ interface UpsertFileResponse$1 {
14646
14675
  */
14647
14676
  name?: string;
14648
14677
  };
14678
+ /**
14679
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
14680
+ */
14681
+ indexingStack?: "v1" | "v2";
14649
14682
  /**
14650
14683
  * URL to upload the file content. File content needs to be sent to this URL via a PUT request.
14651
14684
  */
@@ -14768,6 +14801,10 @@ interface ListFilesResponse$1 {
14768
14801
  */
14769
14802
  name?: string;
14770
14803
  };
14804
+ /**
14805
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
14806
+ */
14807
+ indexingStack?: "v1" | "v2";
14771
14808
  }[];
14772
14809
  meta: {
14773
14810
  /**
@@ -14872,6 +14909,10 @@ interface GetFileResponse$1 {
14872
14909
  */
14873
14910
  name?: string;
14874
14911
  };
14912
+ /**
14913
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
14914
+ */
14915
+ indexingStack?: "v1" | "v2";
14875
14916
  };
14876
14917
  }
14877
14918
 
@@ -14990,6 +15031,10 @@ interface UpdateFileMetadataResponse$1 {
14990
15031
  */
14991
15032
  name?: string;
14992
15033
  };
15034
+ /**
15035
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
15036
+ */
15037
+ indexingStack?: "v1" | "v2";
14993
15038
  };
14994
15039
  }
14995
15040
 
@@ -15096,6 +15141,10 @@ interface CopyFileResponse$1 {
15096
15141
  */
15097
15142
  name?: string;
15098
15143
  };
15144
+ /**
15145
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
15146
+ */
15147
+ indexingStack?: "v1" | "v2";
15099
15148
  };
15100
15149
  }
15101
15150
 
@@ -15518,6 +15567,7 @@ declare class Client$4 extends Client$5 implements IClient$2 {
15518
15567
  id?: string;
15519
15568
  name?: string;
15520
15569
  };
15570
+ indexingStack?: "v1" | "v2";
15521
15571
  }>;
15522
15572
  filePassages: (props: {
15523
15573
  id: string;
@@ -17778,6 +17828,10 @@ interface CreateEventRequestBody {
17778
17828
  * ID of the [User](#schema_user) to link the event to.
17779
17829
  */
17780
17830
  userId?: string;
17831
+ /**
17832
+ * ID of the [Workflow](#schema_workflow) to link the event to.
17833
+ */
17834
+ workflowId?: string;
17781
17835
  /**
17782
17836
  * ID of the [Message](#schema_message) to link the event to.
17783
17837
  */
@@ -17888,6 +17942,7 @@ interface ListEventsRequestQuery {
17888
17942
  conversationId?: string;
17889
17943
  userId?: string;
17890
17944
  messageId?: string;
17945
+ workflowId?: string;
17891
17946
  status?: "pending" | "ignored" | "processed" | "failed" | "scheduled";
17892
17947
  }
17893
17948
  interface ListEventsRequestParams {
@@ -17985,6 +18040,7 @@ interface CreateMessageRequestBody {
17985
18040
  */
17986
18041
  delay?: number;
17987
18042
  };
18043
+ origin?: "synthetic";
17988
18044
  }
17989
18045
  type CreateMessageInput = CreateMessageRequestBody & CreateMessageRequestHeaders & CreateMessageRequestQuery & CreateMessageRequestParams;
17990
18046
  interface CreateMessageResponse {
@@ -18032,6 +18088,10 @@ interface CreateMessageResponse {
18032
18088
  tags: {
18033
18089
  [k: string]: string;
18034
18090
  };
18091
+ /**
18092
+ * Origin of the message (`synthetic`).
18093
+ */
18094
+ origin?: "synthetic";
18035
18095
  };
18036
18096
  }
18037
18097
 
@@ -18079,6 +18139,7 @@ interface GetOrCreateMessageRequestBody {
18079
18139
  */
18080
18140
  delay?: number;
18081
18141
  };
18142
+ origin?: "synthetic";
18082
18143
  /**
18083
18144
  * Optional list of tag names to use for strict matching when looking up existing messages. If provided, all specified tags must match exactly for a message to be considered a match. For example, with an existing message whose tags are {"foo": "a", "bar": "b", baz: "c"}: Without this parameter, ALL tags must match exactly. With ["bar","baz"], all listed tags must match their values, and other tags are not considered.
18084
18145
  */
@@ -18130,6 +18191,10 @@ interface GetOrCreateMessageResponse {
18130
18191
  tags: {
18131
18192
  [k: string]: string;
18132
18193
  };
18194
+ /**
18195
+ * Origin of the message (`synthetic`).
18196
+ */
18197
+ origin?: "synthetic";
18133
18198
  };
18134
18199
  }
18135
18200
 
@@ -18188,6 +18253,10 @@ interface GetMessageResponse {
18188
18253
  tags: {
18189
18254
  [k: string]: string;
18190
18255
  };
18256
+ /**
18257
+ * Origin of the message (`synthetic`).
18258
+ */
18259
+ origin?: "synthetic";
18191
18260
  };
18192
18261
  }
18193
18262
 
@@ -18258,6 +18327,10 @@ interface UpdateMessageResponse {
18258
18327
  tags: {
18259
18328
  [k: string]: string;
18260
18329
  };
18330
+ /**
18331
+ * Origin of the message (`synthetic`).
18332
+ */
18333
+ origin?: "synthetic";
18261
18334
  };
18262
18335
  }
18263
18336
 
@@ -18317,6 +18390,10 @@ interface ListMessagesResponse {
18317
18390
  tags: {
18318
18391
  [k: string]: string;
18319
18392
  };
18393
+ /**
18394
+ * Origin of the message (`synthetic`).
18395
+ */
18396
+ origin?: "synthetic";
18320
18397
  }[];
18321
18398
  meta: {
18322
18399
  /**
@@ -19456,7 +19533,7 @@ interface CreateWorkflowRequestBody {
19456
19533
  tags?: {
19457
19534
  [k: string]: string;
19458
19535
  };
19459
- status: "pending" | "in_progress";
19536
+ status: "pending" | "in_progress" | "listening";
19460
19537
  /**
19461
19538
  * Event id must be specified if the workflow is created with the status in_progress
19462
19539
  */
@@ -19868,7 +19945,7 @@ interface GetOrCreateWorkflowRequestBody {
19868
19945
  tags?: {
19869
19946
  [k: string]: string;
19870
19947
  };
19871
- status: "pending" | "in_progress";
19948
+ status: "pending" | "in_progress" | "listening";
19872
19949
  /**
19873
19950
  * Event id must be specified if the workflow is created with the status in_progress
19874
19951
  */
@@ -22427,7 +22504,7 @@ interface CreateBotResponse {
22427
22504
  */
22428
22505
  signingSecret: string;
22429
22506
  /**
22430
- * A mapping of integrations to their configuration
22507
+ * A mapping of integrations to their configuration. If the `x-multiple-integrations` header is present, this object is keyed by integration aliases. Otherwise, this object is keyed by integration ids.
22431
22508
  */
22432
22509
  integrations: {
22433
22510
  [k: string]: {
@@ -23058,7 +23135,7 @@ interface UpdateBotResponse {
23058
23135
  */
23059
23136
  signingSecret: string;
23060
23137
  /**
23061
- * A mapping of integrations to their configuration
23138
+ * A mapping of integrations to their configuration. If the `x-multiple-integrations` header is present, this object is keyed by integration aliases. Otherwise, this object is keyed by integration ids.
23062
23139
  */
23063
23140
  integrations: {
23064
23141
  [k: string]: {
@@ -23521,7 +23598,7 @@ interface GetBotResponse {
23521
23598
  */
23522
23599
  signingSecret: string;
23523
23600
  /**
23524
- * A mapping of integrations to their configuration
23601
+ * A mapping of integrations to their configuration. If the `x-multiple-integrations` header is present, this object is keyed by integration aliases. Otherwise, this object is keyed by integration ids.
23525
23602
  */
23526
23603
  integrations: {
23527
23604
  [k: string]: {
@@ -31288,6 +31365,10 @@ interface UpsertFileResponse {
31288
31365
  */
31289
31366
  name?: string;
31290
31367
  };
31368
+ /**
31369
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
31370
+ */
31371
+ indexingStack?: "v1" | "v2";
31291
31372
  /**
31292
31373
  * URL to upload the file content. File content needs to be sent to this URL via a PUT request.
31293
31374
  */
@@ -31410,6 +31491,10 @@ interface ListFilesResponse {
31410
31491
  */
31411
31492
  name?: string;
31412
31493
  };
31494
+ /**
31495
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
31496
+ */
31497
+ indexingStack?: "v1" | "v2";
31413
31498
  }[];
31414
31499
  meta: {
31415
31500
  /**
@@ -31514,6 +31599,10 @@ interface GetFileResponse {
31514
31599
  */
31515
31600
  name?: string;
31516
31601
  };
31602
+ /**
31603
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
31604
+ */
31605
+ indexingStack?: "v1" | "v2";
31517
31606
  };
31518
31607
  }
31519
31608
 
@@ -31632,6 +31721,10 @@ interface UpdateFileMetadataResponse {
31632
31721
  */
31633
31722
  name?: string;
31634
31723
  };
31724
+ /**
31725
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
31726
+ */
31727
+ indexingStack?: "v1" | "v2";
31635
31728
  };
31636
31729
  }
31637
31730
 
@@ -31738,6 +31831,10 @@ interface CopyFileResponse {
31738
31831
  */
31739
31832
  name?: string;
31740
31833
  };
31834
+ /**
31835
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
31836
+ */
31837
+ indexingStack?: "v1" | "v2";
31741
31838
  };
31742
31839
  }
31743
31840
 
@@ -33727,7 +33824,7 @@ interface Bot {
33727
33824
  */
33728
33825
  signingSecret: string;
33729
33826
  /**
33730
- * A mapping of integrations to their configuration
33827
+ * A mapping of integrations to their configuration. If the `x-multiple-integrations` header is present, this object is keyed by integration aliases. Otherwise, this object is keyed by integration ids.
33731
33828
  */
33732
33829
  integrations: {
33733
33830
  [k: string]: {
@@ -35093,6 +35190,10 @@ interface Message {
35093
35190
  tags: {
35094
35191
  [k: string]: string;
35095
35192
  };
35193
+ /**
35194
+ * Origin of the message (`synthetic`).
35195
+ */
35196
+ origin?: "synthetic";
35096
35197
  }
35097
35198
  /**
35098
35199
  * The state object represents the current payload. A state is always linked to either a bot, a conversation or a user.
@@ -35566,6 +35667,10 @@ interface File {
35566
35667
  */
35567
35668
  name?: string;
35568
35669
  };
35670
+ /**
35671
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
35672
+ */
35673
+ indexingStack?: "v1" | "v2";
35569
35674
  }
35570
35675
 
35571
35676
  type ClientProps$1 = {
@@ -35817,6 +35922,7 @@ declare class Client extends Client$1 implements IClient {
35817
35922
  type?: string | undefined;
35818
35923
  userId?: string | undefined;
35819
35924
  conversationId?: string | undefined;
35925
+ workflowId?: string | undefined;
35820
35926
  messageId?: string | undefined;
35821
35927
  status?: "pending" | "ignored" | "processed" | "failed" | "scheduled" | undefined;
35822
35928
  }) => AsyncCollection<{
@@ -35851,6 +35957,7 @@ declare class Client extends Client$1 implements IClient {
35851
35957
  tags: {
35852
35958
  [k: string]: string;
35853
35959
  };
35960
+ origin?: "synthetic";
35854
35961
  }>;
35855
35962
  users: (props: {
35856
35963
  tags?: {
@@ -36121,6 +36228,7 @@ declare class Client extends Client$1 implements IClient {
36121
36228
  id?: string;
36122
36229
  name?: string;
36123
36230
  };
36231
+ indexingStack?: "v1" | "v2";
36124
36232
  }>;
36125
36233
  filePassages: (props: {
36126
36234
  id: string;