@botpress/client 1.30.0 → 1.32.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
@@ -3149,6 +3149,52 @@ type TrackAnalyticsInput$1 = TrackAnalyticsRequestBody$1 & TrackAnalyticsRequest
3149
3149
  interface TrackAnalyticsResponse$1 {
3150
3150
  }
3151
3151
 
3152
+ interface CaptureObservationRequestHeaders$1 {
3153
+ }
3154
+ interface CaptureObservationRequestQuery$1 {
3155
+ }
3156
+ interface CaptureObservationRequestParams$1 {
3157
+ }
3158
+ interface CaptureObservationRequestBody$1 {
3159
+ /**
3160
+ * Name of the observation
3161
+ */
3162
+ name: string;
3163
+ /**
3164
+ * Data of the observation
3165
+ */
3166
+ data: {
3167
+ [k: string]: any;
3168
+ };
3169
+ /**
3170
+ * ID of the message associated with the observation
3171
+ */
3172
+ messageId?: string;
3173
+ /**
3174
+ * ID of the event associated with the observation
3175
+ */
3176
+ eventId?: string;
3177
+ /**
3178
+ * ID of the conversation associated with the observation
3179
+ */
3180
+ conversationId?: string;
3181
+ /**
3182
+ * ID of the user associated with the observation
3183
+ */
3184
+ userId?: string;
3185
+ /**
3186
+ * ID of the error associated with the observation
3187
+ */
3188
+ errorId?: string;
3189
+ /**
3190
+ * ID of the trace associated with the observation
3191
+ */
3192
+ traceId?: string;
3193
+ }
3194
+ type CaptureObservationInput$1 = CaptureObservationRequestBody$1 & CaptureObservationRequestHeaders$1 & CaptureObservationRequestQuery$1 & CaptureObservationRequestParams$1;
3195
+ interface CaptureObservationResponse$1 {
3196
+ }
3197
+
3152
3198
  type ClientProps$b = {
3153
3199
  toAxiosRequest: typeof toAxiosRequest$5;
3154
3200
  toApiError: typeof toApiError$5;
@@ -3205,6 +3251,7 @@ declare class Client$b {
3205
3251
  readonly getOrCreateWorkflow: (input: GetOrCreateWorkflowInput$1) => Promise<GetOrCreateWorkflowResponse$1>;
3206
3252
  readonly listTagValues: (input: ListTagValuesInput$1) => Promise<ListTagValuesResponse$1>;
3207
3253
  readonly trackAnalytics: (input: TrackAnalyticsInput$1) => Promise<TrackAnalyticsResponse$1>;
3254
+ readonly captureObservation: (input: CaptureObservationInput$1) => Promise<CaptureObservationResponse$1>;
3208
3255
  }
3209
3256
  declare function toApiError$5(err: unknown): Error;
3210
3257
 
@@ -5836,7 +5883,7 @@ interface CreateBotRequestBody$1 {
5836
5883
  name: string;
5837
5884
  }[];
5838
5885
  /**
5839
- * URL of the [Bot](#schema_bot); Only available for dev bots
5886
+ * URL of the [Bot](#schema_bot)
5840
5887
  */
5841
5888
  url?: string;
5842
5889
  /**
@@ -6270,9 +6317,9 @@ interface UpdateBotRequestParams$1 {
6270
6317
  }
6271
6318
  interface UpdateBotRequestBody$1 {
6272
6319
  /**
6273
- * URL of the [Bot](#schema_bot); Only available for dev bots
6320
+ * URL of the [Bot](#schema_bot)
6274
6321
  */
6275
- url?: string;
6322
+ url?: string | null;
6276
6323
  /**
6277
6324
  * Type of the [Bot](#schema_bot) authentication (`iam`)
6278
6325
  */
@@ -7585,6 +7632,9 @@ interface ListActionRunsResponse$1 {
7585
7632
  * ISO 8601 timestamp of the action run
7586
7633
  */
7587
7634
  timestamp: string;
7635
+ /**
7636
+ * Alias of the integration instance used for this action run
7637
+ */
7588
7638
  integrationName?: string;
7589
7639
  actionType: string;
7590
7640
  /**
@@ -7593,12 +7643,20 @@ interface ListActionRunsResponse$1 {
7593
7643
  input: {
7594
7644
  [k: string]: any;
7595
7645
  };
7646
+ /**
7647
+ * Present if the length of the action's input exceeds 190 KB.
7648
+ */
7649
+ inputTruncated?: boolean;
7596
7650
  /**
7597
7651
  * Output of the action
7598
7652
  */
7599
7653
  output: {
7600
7654
  [k: string]: any;
7601
7655
  } | null;
7656
+ /**
7657
+ * Present if the length of the action's output exceeds 190 KB.
7658
+ */
7659
+ outputTruncated?: boolean;
7602
7660
  status: "SUCCESS" | "FAILURE";
7603
7661
  durationMs: number;
7604
7662
  cached: boolean;
@@ -8124,7 +8182,7 @@ interface CreateWorkspaceResponse$1 {
8124
8182
  createdAt: string;
8125
8183
  updatedAt: string;
8126
8184
  botCount: number;
8127
- billingVersion: "v1" | "v2" | "v3";
8185
+ billingVersion: "v1" | "v2" | "v3" | "v4";
8128
8186
  plan: "community" | "team" | "enterprise" | "plus";
8129
8187
  blocked: boolean;
8130
8188
  spendingLimit: number;
@@ -8178,7 +8236,7 @@ interface GetWorkspaceResponse$1 {
8178
8236
  createdAt: string;
8179
8237
  updatedAt: string;
8180
8238
  botCount: number;
8181
- billingVersion: "v1" | "v2" | "v3";
8239
+ billingVersion: "v1" | "v2" | "v3" | "v4";
8182
8240
  plan: "community" | "team" | "enterprise" | "plus";
8183
8241
  blocked: boolean;
8184
8242
  spendingLimit: number;
@@ -8350,7 +8408,7 @@ interface UpdateWorkspaceResponse$3 {
8350
8408
  createdAt: string;
8351
8409
  updatedAt: string;
8352
8410
  botCount: number;
8353
- billingVersion: "v1" | "v2" | "v3";
8411
+ billingVersion: "v1" | "v2" | "v3" | "v4";
8354
8412
  plan: "community" | "team" | "enterprise" | "plus";
8355
8413
  blocked: boolean;
8356
8414
  spendingLimit: number;
@@ -8407,7 +8465,7 @@ interface UpdateWorkspaceResponse$2 {
8407
8465
  createdAt: string;
8408
8466
  updatedAt: string;
8409
8467
  botCount: number;
8410
- billingVersion: "v1" | "v2" | "v3";
8468
+ billingVersion: "v1" | "v2" | "v3" | "v4";
8411
8469
  plan: "community" | "team" | "enterprise" | "plus";
8412
8470
  blocked: boolean;
8413
8471
  spendingLimit: number;
@@ -15032,6 +15090,19 @@ type ParsedRequest$3 = {
15032
15090
  };
15033
15091
  declare const toAxiosRequest$3: (req: ParsedRequest$3) => AxiosRequestConfig;
15034
15092
 
15093
+ interface GetBillingReadonlyRequestHeaders {
15094
+ }
15095
+ interface GetBillingReadonlyRequestQuery {
15096
+ }
15097
+ interface GetBillingReadonlyRequestParams {
15098
+ }
15099
+ interface GetBillingReadonlyRequestBody {
15100
+ }
15101
+ type GetBillingReadonlyInput = GetBillingReadonlyRequestBody & GetBillingReadonlyRequestHeaders & GetBillingReadonlyRequestQuery & GetBillingReadonlyRequestParams;
15102
+ interface GetBillingReadonlyResponse {
15103
+ billingReadonly: boolean;
15104
+ }
15105
+
15035
15106
  interface GetPlanRequestHeaders {
15036
15107
  }
15037
15108
  interface GetPlanRequestQuery {
@@ -15287,6 +15358,7 @@ declare class Client$7 {
15287
15358
  private axiosInstance;
15288
15359
  private props;
15289
15360
  constructor(axiosInstance: AxiosInstance, props?: Partial<ClientProps$7>);
15361
+ readonly getBillingReadonly: (input: GetBillingReadonlyInput) => Promise<GetBillingReadonlyResponse>;
15290
15362
  readonly getPlan: (input: GetPlanInput) => Promise<GetPlanResponse>;
15291
15363
  readonly listPlans: (input: ListPlansInput) => Promise<ListPlansResponse>;
15292
15364
  readonly getAddon: (input: GetAddonInput) => Promise<GetAddonResponse>;
@@ -21380,6 +21452,52 @@ type TrackAnalyticsInput = TrackAnalyticsRequestBody & TrackAnalyticsRequestHead
21380
21452
  interface TrackAnalyticsResponse {
21381
21453
  }
21382
21454
 
21455
+ interface CaptureObservationRequestHeaders {
21456
+ }
21457
+ interface CaptureObservationRequestQuery {
21458
+ }
21459
+ interface CaptureObservationRequestParams {
21460
+ }
21461
+ interface CaptureObservationRequestBody {
21462
+ /**
21463
+ * Name of the observation
21464
+ */
21465
+ name: string;
21466
+ /**
21467
+ * Data of the observation
21468
+ */
21469
+ data: {
21470
+ [k: string]: any;
21471
+ };
21472
+ /**
21473
+ * ID of the message associated with the observation
21474
+ */
21475
+ messageId?: string;
21476
+ /**
21477
+ * ID of the event associated with the observation
21478
+ */
21479
+ eventId?: string;
21480
+ /**
21481
+ * ID of the conversation associated with the observation
21482
+ */
21483
+ conversationId?: string;
21484
+ /**
21485
+ * ID of the user associated with the observation
21486
+ */
21487
+ userId?: string;
21488
+ /**
21489
+ * ID of the error associated with the observation
21490
+ */
21491
+ errorId?: string;
21492
+ /**
21493
+ * ID of the trace associated with the observation
21494
+ */
21495
+ traceId?: string;
21496
+ }
21497
+ type CaptureObservationInput = CaptureObservationRequestBody & CaptureObservationRequestHeaders & CaptureObservationRequestQuery & CaptureObservationRequestParams;
21498
+ interface CaptureObservationResponse {
21499
+ }
21500
+
21383
21501
  interface RunVrlRequestHeaders {
21384
21502
  }
21385
21503
  interface RunVrlRequestQuery {
@@ -23844,7 +23962,7 @@ interface CreateBotRequestBody {
23844
23962
  name: string;
23845
23963
  }[];
23846
23964
  /**
23847
- * URL of the [Bot](#schema_bot); Only available for dev bots
23965
+ * URL of the [Bot](#schema_bot)
23848
23966
  */
23849
23967
  url?: string;
23850
23968
  /**
@@ -24278,9 +24396,9 @@ interface UpdateBotRequestParams {
24278
24396
  }
24279
24397
  interface UpdateBotRequestBody {
24280
24398
  /**
24281
- * URL of the [Bot](#schema_bot); Only available for dev bots
24399
+ * URL of the [Bot](#schema_bot)
24282
24400
  */
24283
- url?: string;
24401
+ url?: string | null;
24284
24402
  /**
24285
24403
  * Type of the [Bot](#schema_bot) authentication (`iam`)
24286
24404
  */
@@ -25593,6 +25711,9 @@ interface ListActionRunsResponse {
25593
25711
  * ISO 8601 timestamp of the action run
25594
25712
  */
25595
25713
  timestamp: string;
25714
+ /**
25715
+ * Alias of the integration instance used for this action run
25716
+ */
25596
25717
  integrationName?: string;
25597
25718
  actionType: string;
25598
25719
  /**
@@ -25601,12 +25722,20 @@ interface ListActionRunsResponse {
25601
25722
  input: {
25602
25723
  [k: string]: any;
25603
25724
  };
25725
+ /**
25726
+ * Present if the length of the action's input exceeds 190 KB.
25727
+ */
25728
+ inputTruncated?: boolean;
25604
25729
  /**
25605
25730
  * Output of the action
25606
25731
  */
25607
25732
  output: {
25608
25733
  [k: string]: any;
25609
25734
  } | null;
25735
+ /**
25736
+ * Present if the length of the action's output exceeds 190 KB.
25737
+ */
25738
+ outputTruncated?: boolean;
25610
25739
  status: "SUCCESS" | "FAILURE";
25611
25740
  durationMs: number;
25612
25741
  cached: boolean;
@@ -26132,7 +26261,7 @@ interface CreateWorkspaceResponse {
26132
26261
  createdAt: string;
26133
26262
  updatedAt: string;
26134
26263
  botCount: number;
26135
- billingVersion: "v1" | "v2" | "v3";
26264
+ billingVersion: "v1" | "v2" | "v3" | "v4";
26136
26265
  plan: "community" | "team" | "enterprise" | "plus";
26137
26266
  blocked: boolean;
26138
26267
  spendingLimit: number;
@@ -26186,7 +26315,7 @@ interface GetWorkspaceResponse {
26186
26315
  createdAt: string;
26187
26316
  updatedAt: string;
26188
26317
  botCount: number;
26189
- billingVersion: "v1" | "v2" | "v3";
26318
+ billingVersion: "v1" | "v2" | "v3" | "v4";
26190
26319
  plan: "community" | "team" | "enterprise" | "plus";
26191
26320
  blocked: boolean;
26192
26321
  spendingLimit: number;
@@ -26358,7 +26487,7 @@ interface UpdateWorkspaceResponse$1 {
26358
26487
  createdAt: string;
26359
26488
  updatedAt: string;
26360
26489
  botCount: number;
26361
- billingVersion: "v1" | "v2" | "v3";
26490
+ billingVersion: "v1" | "v2" | "v3" | "v4";
26362
26491
  plan: "community" | "team" | "enterprise" | "plus";
26363
26492
  blocked: boolean;
26364
26493
  spendingLimit: number;
@@ -26415,7 +26544,7 @@ interface UpdateWorkspaceResponse {
26415
26544
  createdAt: string;
26416
26545
  updatedAt: string;
26417
26546
  botCount: number;
26418
- billingVersion: "v1" | "v2" | "v3";
26547
+ billingVersion: "v1" | "v2" | "v3" | "v4";
26419
26548
  plan: "community" | "team" | "enterprise" | "plus";
26420
26549
  blocked: boolean;
26421
26550
  spendingLimit: number;
@@ -36630,7 +36759,7 @@ interface Workspace {
36630
36759
  createdAt: string;
36631
36760
  updatedAt: string;
36632
36761
  botCount: number;
36633
- billingVersion: "v1" | "v2" | "v3";
36762
+ billingVersion: "v1" | "v2" | "v3" | "v4";
36634
36763
  plan: "community" | "team" | "enterprise" | "plus";
36635
36764
  blocked: boolean;
36636
36765
  spendingLimit: number;
@@ -37431,6 +37560,7 @@ declare class Client$1 {
37431
37560
  readonly getOrCreateWorkflow: (input: GetOrCreateWorkflowInput) => Promise<GetOrCreateWorkflowResponse>;
37432
37561
  readonly listTagValues: (input: ListTagValuesInput) => Promise<ListTagValuesResponse>;
37433
37562
  readonly trackAnalytics: (input: TrackAnalyticsInput) => Promise<TrackAnalyticsResponse>;
37563
+ readonly captureObservation: (input: CaptureObservationInput) => Promise<CaptureObservationResponse>;
37434
37564
  readonly runVrl: (input: RunVrlInput) => Promise<RunVrlResponse>;
37435
37565
  readonly getAccount: (input: GetAccountInput) => Promise<GetAccountResponse>;
37436
37566
  readonly updateAccount: (input: UpdateAccountInput) => Promise<UpdateAccountResponse>;
@@ -38266,8 +38396,15 @@ type BreakingChangesType = 'BreakingChanges';
38266
38396
  declare class BreakingChangesError extends BaseApiError<400, BreakingChangesType, 'Request payload contains breaking changes which is not allowed for this resource without a version increment.'> {
38267
38397
  constructor(message: string, error?: Error, id?: string, metadata?: Record<string, unknown>);
38268
38398
  }
38269
- type ErrorType = 'Unknown' | 'Internal' | 'Unauthorized' | 'Forbidden' | 'PayloadTooLarge' | 'InvalidPayload' | 'UnsupportedMediaType' | 'MethodNotFound' | 'ResourceNotFound' | 'InvalidJsonSchema' | 'InvalidDataFormat' | 'InvalidIdentifier' | 'RelationConflict' | 'ReferenceConstraint' | 'ResourceLockedConflict' | 'ResourceGone' | 'ReferenceNotFound' | 'InvalidQuery' | 'Runtime' | 'AlreadyExists' | 'RateLimited' | 'PaymentRequired' | 'QuotaExceeded' | 'LimitExceeded' | 'BreakingChanges';
38270
- type ApiError = UnknownError | InternalError | UnauthorizedError | ForbiddenError | PayloadTooLargeError | InvalidPayloadError | UnsupportedMediaTypeError | MethodNotFoundError | ResourceNotFoundError | InvalidJsonSchemaError | InvalidDataFormatError | InvalidIdentifierError | RelationConflictError | ReferenceConstraintError | ResourceLockedConflictError | ResourceGoneError | ReferenceNotFoundError | InvalidQueryError | RuntimeError | AlreadyExistsError | RateLimitedError | PaymentRequiredError | QuotaExceededError | LimitExceededError | BreakingChangesError;
38399
+ type OperationTimeoutType = 'OperationTimeout';
38400
+ /**
38401
+ * The operation timed out.
38402
+ */
38403
+ declare class OperationTimeoutError extends BaseApiError<504, OperationTimeoutType, 'The operation timed out.'> {
38404
+ constructor(message: string, error?: Error, id?: string, metadata?: Record<string, unknown>);
38405
+ }
38406
+ type ErrorType = 'Unknown' | 'Internal' | 'Unauthorized' | 'Forbidden' | 'PayloadTooLarge' | 'InvalidPayload' | 'UnsupportedMediaType' | 'MethodNotFound' | 'ResourceNotFound' | 'InvalidJsonSchema' | 'InvalidDataFormat' | 'InvalidIdentifier' | 'RelationConflict' | 'ReferenceConstraint' | 'ResourceLockedConflict' | 'ResourceGone' | 'ReferenceNotFound' | 'InvalidQuery' | 'Runtime' | 'AlreadyExists' | 'RateLimited' | 'PaymentRequired' | 'QuotaExceeded' | 'LimitExceeded' | 'BreakingChanges' | 'OperationTimeout';
38407
+ type ApiError = UnknownError | InternalError | UnauthorizedError | ForbiddenError | PayloadTooLargeError | InvalidPayloadError | UnsupportedMediaTypeError | MethodNotFoundError | ResourceNotFoundError | InvalidJsonSchemaError | InvalidDataFormatError | InvalidIdentifierError | RelationConflictError | ReferenceConstraintError | ResourceLockedConflictError | ResourceGoneError | ReferenceNotFoundError | InvalidQueryError | RuntimeError | AlreadyExistsError | RateLimitedError | PaymentRequiredError | QuotaExceededError | LimitExceededError | BreakingChangesError | OperationTimeoutError;
38271
38408
  declare const errorFrom: (err: unknown) => ApiError;
38272
38409
 
38273
38410
  declare class UploadFileError extends Error {
@@ -38276,4 +38413,4 @@ declare class UploadFileError extends Error {
38276
38413
  constructor(message: string, innerError?: AxiosError | undefined, file?: UpsertFileResponse["file"] | undefined);
38277
38414
  }
38278
38415
 
38279
- export { type Account, type Activity, AlreadyExistsError, type ApiError, type Bot, BreakingChangesError, Client, type ClientConfig, type ClientInputs, type ClientOutputs, type ClientProps, type Column, type Conversation, type ErrorType, type Event, type File, ForbiddenError, type Headers, type Integration, type Interface, InternalError, InvalidDataFormatError, InvalidIdentifierError, InvalidJsonSchemaError, InvalidPayloadError, InvalidQueryError, type Issue, type IssueEvent, LimitExceededError, type Message, MethodNotFoundError, type Operation, PayloadTooLargeError, PaymentRequiredError, type Plugin, QuotaExceededError, RateLimitedError, ReferenceConstraintError, ReferenceNotFoundError, RelationConflictError, ResourceGoneError, ResourceLockedConflictError, ResourceNotFoundError, type RetryConfig, type Row, RuntimeError, type State, type Table, type Task, UnauthorizedError, UnknownError, UnsupportedMediaTypeError, UploadFileError, type Usage, type User, type Version, type Workflow, type Workspace, type WorkspaceMember, index$3 as admin, index$2 as billing, errorFrom, index$1 as files, isApiError, index$4 as runtime, index as tables };
38416
+ export { type Account, type Activity, AlreadyExistsError, type ApiError, type Bot, BreakingChangesError, Client, type ClientConfig, type ClientInputs, type ClientOutputs, type ClientProps, type Column, type Conversation, type ErrorType, type Event, type File, ForbiddenError, type Headers, type Integration, type Interface, InternalError, InvalidDataFormatError, InvalidIdentifierError, InvalidJsonSchemaError, InvalidPayloadError, InvalidQueryError, type Issue, type IssueEvent, LimitExceededError, type Message, MethodNotFoundError, type Operation, OperationTimeoutError, PayloadTooLargeError, PaymentRequiredError, type Plugin, QuotaExceededError, RateLimitedError, ReferenceConstraintError, ReferenceNotFoundError, RelationConflictError, ResourceGoneError, ResourceLockedConflictError, ResourceNotFoundError, type RetryConfig, type Row, RuntimeError, type State, type Table, type Task, UnauthorizedError, UnknownError, UnsupportedMediaTypeError, UploadFileError, type Usage, type User, type Version, type Workflow, type Workspace, type WorkspaceMember, index$3 as admin, index$2 as billing, errorFrom, index$1 as files, isApiError, index$4 as runtime, index as tables };