@botpress/client 0.0.5 → 0.0.7

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/gen/api.d.ts CHANGED
@@ -98,6 +98,12 @@ export interface Bot {
98
98
  * @memberof Bot
99
99
  */
100
100
  'deployedAt'?: string;
101
+ /**
102
+ * Indicates if the [Bot](#schema_bot) is a development bot; Development bots run locally and can install dev integrations
103
+ * @type {boolean}
104
+ * @memberof Bot
105
+ */
106
+ 'dev': boolean;
101
107
  /**
102
108
  * Media files associated with the [Bot](#schema_bot)
103
109
  * @type {Array<BotMediasInner>}
@@ -166,7 +172,22 @@ export interface BotIntegrationsValue {
166
172
  'configuration': {
167
173
  [key: string]: any;
168
174
  };
175
+ /**
176
+ *
177
+ * @type {string}
178
+ * @memberof BotIntegrationsValue
179
+ */
180
+ 'status': BotIntegrationsValueStatusEnum;
169
181
  }
182
+ export declare const BotIntegrationsValueStatusEnum: {
183
+ readonly RegistrationPending: "registration_pending";
184
+ readonly Registered: "registered";
185
+ readonly RegistrationFailed: "registration_failed";
186
+ readonly UnregistrationPending: "unregistration_pending";
187
+ readonly Unregistered: "unregistered";
188
+ readonly UnregistrationFailed: "unregistration_failed";
189
+ };
190
+ export type BotIntegrationsValueStatusEnum = typeof BotIntegrationsValueStatusEnum[keyof typeof BotIntegrationsValueStatusEnum];
170
191
  /**
171
192
  *
172
193
  * @export
@@ -340,6 +361,18 @@ export interface CreateBotBody {
340
361
  * @memberof CreateBotBody
341
362
  */
342
363
  'medias'?: Array<CreateBotBodyMediasInner>;
364
+ /**
365
+ * URL of the [Bot](#schema_bot); Only available for dev bots
366
+ * @type {string}
367
+ * @memberof CreateBotBody
368
+ */
369
+ 'url'?: string;
370
+ /**
371
+ * Indicates if the [Bot](#schema_bot) is a development bot; Development bots run locally and can install dev integrations
372
+ * @type {boolean}
373
+ * @memberof CreateBotBody
374
+ */
375
+ 'dev'?: boolean;
343
376
  }
344
377
  /**
345
378
  *
@@ -529,6 +562,12 @@ export interface CreateConversationBody {
529
562
  'tags': {
530
563
  [key: string]: string;
531
564
  };
565
+ /**
566
+ * Name of the integration to which the conversation creation will be delegated
567
+ * @type {string}
568
+ * @memberof CreateConversationBody
569
+ */
570
+ 'integrationName'?: string;
532
571
  }
533
572
  /**
534
573
  *
@@ -713,6 +752,12 @@ export interface CreateIntegrationBody {
713
752
  'actions'?: {
714
753
  [key: string]: CreateIntegrationBodyActionsValue;
715
754
  };
755
+ /**
756
+ *
757
+ * @type {CreateIntegrationBodyUser}
758
+ * @memberof CreateIntegrationBody
759
+ */
760
+ 'user'?: CreateIntegrationBodyUser;
716
761
  /**
717
762
  * JavaScript code of the integration
718
763
  * @type {string}
@@ -726,17 +771,17 @@ export interface CreateIntegrationBody {
726
771
  */
727
772
  'public'?: boolean;
728
773
  /**
729
- * Whether the integration is in development mode
730
- * @type {boolean}
774
+ * URL of the integration; Only available for dev integrations
775
+ * @type {string}
731
776
  * @memberof CreateIntegrationBody
732
777
  */
733
- 'dev'?: boolean;
778
+ 'url'?: string;
734
779
  /**
735
- * URL of the integration (Cannot be used with field \"code\")
736
- * @type {string}
780
+ * Indicates if the integration is a development integration; Dev integrations run locally
781
+ * @type {boolean}
737
782
  * @memberof CreateIntegrationBody
738
783
  */
739
- 'url'?: string;
784
+ 'dev'?: boolean;
740
785
  }
741
786
  /**
742
787
  *
@@ -765,10 +810,10 @@ export interface CreateIntegrationBodyActionsValue {
765
810
  export interface CreateIntegrationBodyChannelsValue {
766
811
  /**
767
812
  *
768
- * @type {CreateBotBodyTags}
813
+ * @type {CreateIntegrationBodyChannelsValueTags}
769
814
  * @memberof CreateIntegrationBodyChannelsValue
770
815
  */
771
- 'tags'?: CreateBotBodyTags;
816
+ 'tags'?: CreateIntegrationBodyChannelsValueTags;
772
817
  /**
773
818
  *
774
819
  * @type {{ [key: string]: CreateIntegrationBodyChannelsValueMessagesValue; }}
@@ -777,6 +822,44 @@ export interface CreateIntegrationBodyChannelsValue {
777
822
  'messages': {
778
823
  [key: string]: CreateIntegrationBodyChannelsValueMessagesValue;
779
824
  };
825
+ /**
826
+ *
827
+ * @type {CreateIntegrationBodyChannelsValueConversation}
828
+ * @memberof CreateIntegrationBodyChannelsValue
829
+ */
830
+ 'conversation'?: CreateIntegrationBodyChannelsValueConversation;
831
+ }
832
+ /**
833
+ *
834
+ * @export
835
+ * @interface CreateIntegrationBodyChannelsValueConversation
836
+ */
837
+ export interface CreateIntegrationBodyChannelsValueConversation {
838
+ /**
839
+ *
840
+ * @type {CreateIntegrationBodyChannelsValueConversationCreation}
841
+ * @memberof CreateIntegrationBodyChannelsValueConversation
842
+ */
843
+ 'creation': CreateIntegrationBodyChannelsValueConversationCreation;
844
+ }
845
+ /**
846
+ * The conversation creation setting determines how to create a conversation through the API directly. The integration will have to implement the `createConversation` functionality to support this setting.
847
+ * @export
848
+ * @interface CreateIntegrationBodyChannelsValueConversationCreation
849
+ */
850
+ export interface CreateIntegrationBodyChannelsValueConversationCreation {
851
+ /**
852
+ * Enable conversation creation
853
+ * @type {boolean}
854
+ * @memberof CreateIntegrationBodyChannelsValueConversationCreation
855
+ */
856
+ 'enabled': boolean;
857
+ /**
858
+ * The list of tags that are required to be specified when calling the API directly to create a conversation.
859
+ * @type {Array<string>}
860
+ * @memberof CreateIntegrationBodyChannelsValueConversationCreation
861
+ */
862
+ 'requiredTags': Array<string>;
780
863
  }
781
864
  /**
782
865
  *
@@ -793,6 +876,25 @@ export interface CreateIntegrationBodyChannelsValueMessagesValue {
793
876
  [key: string]: any;
794
877
  };
795
878
  }
879
+ /**
880
+ *
881
+ * @export
882
+ * @interface CreateIntegrationBodyChannelsValueTags
883
+ */
884
+ export interface CreateIntegrationBodyChannelsValueTags {
885
+ /**
886
+ *
887
+ * @type {Array<string>}
888
+ * @memberof CreateIntegrationBodyChannelsValueTags
889
+ */
890
+ 'messages'?: Array<string>;
891
+ /**
892
+ *
893
+ * @type {Array<string>}
894
+ * @memberof CreateIntegrationBodyChannelsValueTags
895
+ */
896
+ 'conversations'?: Array<string>;
897
+ }
796
898
  /**
797
899
  * Configuration definition
798
900
  * @export
@@ -848,6 +950,38 @@ export interface CreateIntegrationBodyTags {
848
950
  */
849
951
  'users'?: Array<string>;
850
952
  }
953
+ /**
954
+ *
955
+ * @export
956
+ * @interface CreateIntegrationBodyUser
957
+ */
958
+ export interface CreateIntegrationBodyUser {
959
+ /**
960
+ *
961
+ * @type {CreateIntegrationBodyUserCreation}
962
+ * @memberof CreateIntegrationBodyUser
963
+ */
964
+ 'creation': CreateIntegrationBodyUserCreation;
965
+ }
966
+ /**
967
+ * The user creation setting determines how to create a user through the API directly. The integration will have to implement the `createUser` functionality to support this setting.
968
+ * @export
969
+ * @interface CreateIntegrationBodyUserCreation
970
+ */
971
+ export interface CreateIntegrationBodyUserCreation {
972
+ /**
973
+ * Enable user creation
974
+ * @type {boolean}
975
+ * @memberof CreateIntegrationBodyUserCreation
976
+ */
977
+ 'enabled': boolean;
978
+ /**
979
+ * The list of tags that are required to be specified when calling the API directly to create a user.
980
+ * @type {Array<string>}
981
+ * @memberof CreateIntegrationBodyUserCreation
982
+ */
983
+ 'requiredTags': Array<string>;
984
+ }
851
985
  /**
852
986
  *
853
987
  * @export
@@ -954,6 +1088,12 @@ export interface CreateUserBody {
954
1088
  'tags': {
955
1089
  [key: string]: string;
956
1090
  };
1091
+ /**
1092
+ * Name of the integration to which the user creation will be delegated
1093
+ * @type {string}
1094
+ * @memberof CreateUserBody
1095
+ */
1096
+ 'integrationName'?: string;
957
1097
  }
958
1098
  /**
959
1099
  *
@@ -1219,6 +1359,12 @@ export interface GetOrCreateConversationBody {
1219
1359
  'tags': {
1220
1360
  [key: string]: string;
1221
1361
  };
1362
+ /**
1363
+ * Name of the integration to which the conversation creation will be delegated
1364
+ * @type {string}
1365
+ * @memberof GetOrCreateConversationBody
1366
+ */
1367
+ 'integrationName'?: string;
1222
1368
  }
1223
1369
  /**
1224
1370
  *
@@ -1301,6 +1447,12 @@ export interface GetOrCreateUserBody {
1301
1447
  'tags': {
1302
1448
  [key: string]: string;
1303
1449
  };
1450
+ /**
1451
+ * Name of the integration to which the user creation will be delegated
1452
+ * @type {string}
1453
+ * @memberof GetOrCreateUserBody
1454
+ */
1455
+ 'integrationName'?: string;
1304
1456
  }
1305
1457
  /**
1306
1458
  *
@@ -1441,6 +1593,18 @@ export interface Integration {
1441
1593
  'actions': {
1442
1594
  [key: string]: CreateIntegrationBodyActionsValue;
1443
1595
  };
1596
+ /**
1597
+ *
1598
+ * @type {CreateIntegrationBodyUser}
1599
+ * @memberof Integration
1600
+ */
1601
+ 'user': CreateIntegrationBodyUser;
1602
+ /**
1603
+ * Indicates if the integration is a development integration; Dev integrations run locally
1604
+ * @type {boolean}
1605
+ * @memberof Integration
1606
+ */
1607
+ 'dev': boolean;
1444
1608
  }
1445
1609
  /**
1446
1610
  *
@@ -1450,10 +1614,10 @@ export interface Integration {
1450
1614
  export interface IntegrationChannelsValue {
1451
1615
  /**
1452
1616
  *
1453
- * @type {CreateBotBodyTags}
1617
+ * @type {CreateIntegrationBodyChannelsValueTags}
1454
1618
  * @memberof IntegrationChannelsValue
1455
1619
  */
1456
- 'tags': CreateBotBodyTags;
1620
+ 'tags': CreateIntegrationBodyChannelsValueTags;
1457
1621
  /**
1458
1622
  *
1459
1623
  * @type {{ [key: string]: CreateIntegrationBodyChannelsValueMessagesValue; }}
@@ -1462,6 +1626,12 @@ export interface IntegrationChannelsValue {
1462
1626
  'messages': {
1463
1627
  [key: string]: CreateIntegrationBodyChannelsValueMessagesValue;
1464
1628
  };
1629
+ /**
1630
+ *
1631
+ * @type {CreateIntegrationBodyChannelsValueConversation}
1632
+ * @memberof IntegrationChannelsValue
1633
+ */
1634
+ 'conversation': CreateIntegrationBodyChannelsValueConversation;
1465
1635
  }
1466
1636
  /**
1467
1637
  *
@@ -1740,6 +1910,62 @@ export interface ListUsersResponse {
1740
1910
  */
1741
1911
  'meta': ListConversationsResponseMeta;
1742
1912
  }
1913
+ /**
1914
+ *
1915
+ * @export
1916
+ * @interface ListWorkspacesResponse
1917
+ */
1918
+ export interface ListWorkspacesResponse {
1919
+ /**
1920
+ *
1921
+ * @type {Array<ListWorkspacesResponseWorkspacesInner>}
1922
+ * @memberof ListWorkspacesResponse
1923
+ */
1924
+ 'workspaces': Array<ListWorkspacesResponseWorkspacesInner>;
1925
+ /**
1926
+ *
1927
+ * @type {ListConversationsResponseMeta}
1928
+ * @memberof ListWorkspacesResponse
1929
+ */
1930
+ 'meta': ListConversationsResponseMeta;
1931
+ }
1932
+ /**
1933
+ *
1934
+ * @export
1935
+ * @interface ListWorkspacesResponseWorkspacesInner
1936
+ */
1937
+ export interface ListWorkspacesResponseWorkspacesInner {
1938
+ /**
1939
+ *
1940
+ * @type {string}
1941
+ * @memberof ListWorkspacesResponseWorkspacesInner
1942
+ */
1943
+ 'id': string;
1944
+ /**
1945
+ *
1946
+ * @type {string}
1947
+ * @memberof ListWorkspacesResponseWorkspacesInner
1948
+ */
1949
+ 'name': string;
1950
+ /**
1951
+ *
1952
+ * @type {string}
1953
+ * @memberof ListWorkspacesResponseWorkspacesInner
1954
+ */
1955
+ 'ownerId': string;
1956
+ /**
1957
+ *
1958
+ * @type {string}
1959
+ * @memberof ListWorkspacesResponseWorkspacesInner
1960
+ */
1961
+ 'createdAt': string;
1962
+ /**
1963
+ *
1964
+ * @type {string}
1965
+ * @memberof ListWorkspacesResponseWorkspacesInner
1966
+ */
1967
+ 'updatedAt': string;
1968
+ }
1743
1969
  /**
1744
1970
  * The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).
1745
1971
  * @export
@@ -1997,7 +2223,7 @@ export type StateTypeEnum = typeof StateTypeEnum[keyof typeof StateTypeEnum];
1997
2223
  */
1998
2224
  export interface UpdateBotBody {
1999
2225
  /**
2000
- * URL for the bot
2226
+ * URL of the [Bot](#schema_bot); Only available for dev bots
2001
2227
  * @type {string}
2002
2228
  * @memberof UpdateBotBody
2003
2229
  */
@@ -2199,6 +2425,12 @@ export interface UpdateIntegrationBody {
2199
2425
  'actions'?: {
2200
2426
  [key: string]: CreateIntegrationBodyActionsValue;
2201
2427
  };
2428
+ /**
2429
+ *
2430
+ * @type {CreateIntegrationBodyUser}
2431
+ * @memberof UpdateIntegrationBody
2432
+ */
2433
+ 'user'?: CreateIntegrationBodyUser;
2202
2434
  /**
2203
2435
  * JavaScript code of the integration
2204
2436
  * @type {string}
@@ -2212,13 +2444,7 @@ export interface UpdateIntegrationBody {
2212
2444
  */
2213
2445
  'public'?: boolean;
2214
2446
  /**
2215
- * Whether the integration is in development mode
2216
- * @type {boolean}
2217
- * @memberof UpdateIntegrationBody
2218
- */
2219
- 'dev'?: boolean;
2220
- /**
2221
- * URL of the integration (Cannot be used with field \"code\")
2447
+ * URL of the integration; Only available for dev integrations
2222
2448
  * @type {string}
2223
2449
  * @memberof UpdateIntegrationBody
2224
2450
  */
@@ -2649,6 +2875,13 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
2649
2875
  listUsers: (nextToken?: string, conversationId?: string, tags?: {
2650
2876
  [key: string]: string;
2651
2877
  } | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
2878
+ /**
2879
+ * List workspaces the user has access to
2880
+ * @param {string} [nextToken] Provide the &#x60;meta.nextToken&#x60; value provided in the last API response to retrieve the next page of results
2881
+ * @param {*} [options] Override http request option.
2882
+ * @throws {RequiredError}
2883
+ */
2884
+ listWorkspaces: (nextToken?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
2652
2885
  /**
2653
2886
  * Updates the [State](#schema_state) object by setting the values of the parameters passed.
2654
2887
  * @param {'conversation' | 'user' | 'bot' | 'integration'} type State type
@@ -3033,6 +3266,13 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
3033
3266
  listUsers(nextToken?: string, conversationId?: string, tags?: {
3034
3267
  [key: string]: string;
3035
3268
  } | undefined, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListUsersResponse>>;
3269
+ /**
3270
+ * List workspaces the user has access to
3271
+ * @param {string} [nextToken] Provide the &#x60;meta.nextToken&#x60; value provided in the last API response to retrieve the next page of results
3272
+ * @param {*} [options] Override http request option.
3273
+ * @throws {RequiredError}
3274
+ */
3275
+ listWorkspaces(nextToken?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListWorkspacesResponse>>;
3036
3276
  /**
3037
3277
  * Updates the [State](#schema_state) object by setting the values of the parameters passed.
3038
3278
  * @param {'conversation' | 'user' | 'bot' | 'integration'} type State type
@@ -3417,6 +3657,13 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
3417
3657
  listUsers(nextToken?: string, conversationId?: string, tags?: {
3418
3658
  [key: string]: string;
3419
3659
  } | undefined, options?: any): AxiosPromise<ListUsersResponse>;
3660
+ /**
3661
+ * List workspaces the user has access to
3662
+ * @param {string} [nextToken] Provide the &#x60;meta.nextToken&#x60; value provided in the last API response to retrieve the next page of results
3663
+ * @param {*} [options] Override http request option.
3664
+ * @throws {RequiredError}
3665
+ */
3666
+ listWorkspaces(nextToken?: string, options?: any): AxiosPromise<ListWorkspacesResponse>;
3420
3667
  /**
3421
3668
  * Updates the [State](#schema_state) object by setting the values of the parameters passed.
3422
3669
  * @param {'conversation' | 'user' | 'bot' | 'integration'} type State type
@@ -3844,6 +4091,14 @@ export interface DefaultApiInterface {
3844
4091
  listUsers(nextToken?: string, conversationId?: string, tags?: {
3845
4092
  [key: string]: string;
3846
4093
  }, options?: AxiosRequestConfig): AxiosPromise<ListUsersResponse>;
4094
+ /**
4095
+ * List workspaces the user has access to
4096
+ * @param {string} [nextToken] Provide the &#x60;meta.nextToken&#x60; value provided in the last API response to retrieve the next page of results
4097
+ * @param {*} [options] Override http request option.
4098
+ * @throws {RequiredError}
4099
+ * @memberof DefaultApiInterface
4100
+ */
4101
+ listWorkspaces(nextToken?: string, options?: AxiosRequestConfig): AxiosPromise<ListWorkspacesResponse>;
3847
4102
  /**
3848
4103
  * Updates the [State](#schema_state) object by setting the values of the parameters passed.
3849
4104
  * @param {'conversation' | 'user' | 'bot' | 'integration'} type State type
@@ -4572,6 +4827,19 @@ export interface DefaultApiListUsersRequest {
4572
4827
  [key: string]: string;
4573
4828
  };
4574
4829
  }
4830
+ /**
4831
+ * Request parameters for listWorkspaces operation in DefaultApi.
4832
+ * @export
4833
+ * @interface DefaultApiListWorkspacesRequest
4834
+ */
4835
+ export interface DefaultApiListWorkspacesRequest {
4836
+ /**
4837
+ * Provide the &#x60;meta.nextToken&#x60; value provided in the last API response to retrieve the next page of results
4838
+ * @type {string}
4839
+ * @memberof DefaultApiListWorkspaces
4840
+ */
4841
+ readonly nextToken?: string;
4842
+ }
4575
4843
  /**
4576
4844
  * Request parameters for patchState operation in DefaultApi.
4577
4845
  * @export
@@ -5072,6 +5340,14 @@ export declare class DefaultApi extends BaseAPI implements DefaultApiInterface {
5072
5340
  * @memberof DefaultApi
5073
5341
  */
5074
5342
  listUsers(requestParameters?: DefaultApiListUsersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListUsersResponse, any>>;
5343
+ /**
5344
+ * List workspaces the user has access to
5345
+ * @param {DefaultApiListWorkspacesRequest} requestParameters Request parameters.
5346
+ * @param {*} [options] Override http request option.
5347
+ * @throws {RequiredError}
5348
+ * @memberof DefaultApi
5349
+ */
5350
+ listWorkspaces(requestParameters?: DefaultApiListWorkspacesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListWorkspacesResponse, any>>;
5075
5351
  /**
5076
5352
  * Updates the [State](#schema_state) object by setting the values of the parameters passed.
5077
5353
  * @param {DefaultApiPatchStateRequest} requestParameters Request parameters.
@@ -1,6 +1,6 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  import type { Merge, Except } from 'type-fest';
3
- import { Configuration, DefaultApiCreateConversationRequest, DefaultApiGetConversationRequest, DefaultApiListConversationsRequest, DefaultApiGetOrCreateConversationRequest, DefaultApiUpdateConversationRequest, DefaultApiDeleteConversationRequest, DefaultApiCreateEventRequest, DefaultApiGetEventRequest, DefaultApiListEventsRequest, DefaultApiCreateMessageRequest, DefaultApiGetOrCreateMessageRequest, DefaultApiGetMessageRequest, DefaultApiUpdateMessageRequest, DefaultApiListMessagesRequest, DefaultApiDeleteMessageRequest, DefaultApiCreateUserRequest, DefaultApiGetUserRequest, DefaultApiListUsersRequest, DefaultApiGetOrCreateUserRequest, DefaultApiUpdateUserRequest, DefaultApiDeleteUserRequest, DefaultApiGetStateRequest, DefaultApiSetStateRequest, DefaultApiPatchStateRequest, DefaultApiCallActionRequest, DefaultApiConfigureIntegrationRequest, DefaultApiListPublicIntegrationsRequest, DefaultApiGetPublicIntegrationByIdRequest, DefaultApiGetPublicIntegrationRequest, DefaultApiCreateBotRequest, DefaultApiUpdateBotRequest, DefaultApiListBotsRequest, DefaultApiGetBotRequest, DefaultApiDeleteBotRequest, DefaultApiGetBotLogsRequest, DefaultApiGetBotWebchatRequest, DefaultApiGetBotAnalyticsRequest, DefaultApiCreateIntegrationRequest, DefaultApiUpdateIntegrationRequest, DefaultApiListIntegrationsRequest, DefaultApiGetIntegrationRequest, DefaultApiGetIntegrationByNameRequest, DefaultApiDeleteIntegrationRequest, DefaultApiIntrospectRequest, DefaultApiCreateFileRequest, DefaultApiGetFileRequest, DefaultApiDownloadFileRequest, DefaultApiDeleteFileRequest, DefaultApiListFilesRequest } from '.';
3
+ import { Configuration, DefaultApiCreateConversationRequest, DefaultApiGetConversationRequest, DefaultApiListConversationsRequest, DefaultApiGetOrCreateConversationRequest, DefaultApiUpdateConversationRequest, DefaultApiDeleteConversationRequest, DefaultApiCreateEventRequest, DefaultApiGetEventRequest, DefaultApiListEventsRequest, DefaultApiCreateMessageRequest, DefaultApiGetOrCreateMessageRequest, DefaultApiGetMessageRequest, DefaultApiUpdateMessageRequest, DefaultApiListMessagesRequest, DefaultApiDeleteMessageRequest, DefaultApiCreateUserRequest, DefaultApiGetUserRequest, DefaultApiListUsersRequest, DefaultApiGetOrCreateUserRequest, DefaultApiUpdateUserRequest, DefaultApiDeleteUserRequest, DefaultApiGetStateRequest, DefaultApiSetStateRequest, DefaultApiPatchStateRequest, DefaultApiCallActionRequest, DefaultApiConfigureIntegrationRequest, DefaultApiListPublicIntegrationsRequest, DefaultApiGetPublicIntegrationByIdRequest, DefaultApiGetPublicIntegrationRequest, DefaultApiCreateBotRequest, DefaultApiUpdateBotRequest, DefaultApiListBotsRequest, DefaultApiGetBotRequest, DefaultApiDeleteBotRequest, DefaultApiGetBotLogsRequest, DefaultApiGetBotWebchatRequest, DefaultApiGetBotAnalyticsRequest, DefaultApiCreateIntegrationRequest, DefaultApiUpdateIntegrationRequest, DefaultApiListIntegrationsRequest, DefaultApiGetIntegrationRequest, DefaultApiGetIntegrationByNameRequest, DefaultApiDeleteIntegrationRequest, DefaultApiListWorkspacesRequest, DefaultApiIntrospectRequest, DefaultApiCreateFileRequest, DefaultApiGetFileRequest, DefaultApiDownloadFileRequest, DefaultApiDeleteFileRequest, DefaultApiListFilesRequest } from '.';
4
4
  export declare class ApiClient {
5
5
  private _innerClient;
6
6
  constructor(configuration?: Configuration, basePath?: string, axiosInstance?: AxiosInstance);
@@ -47,6 +47,7 @@ export declare class ApiClient {
47
47
  getIntegration: (props: GetIntegrationProps) => Promise<import("./api").GetIntegrationResponse>;
48
48
  getIntegrationByName: (props: GetIntegrationByNameProps) => Promise<import("./api").GetIntegrationByNameResponse>;
49
49
  deleteIntegration: (props: DeleteIntegrationProps) => Promise<object>;
50
+ listWorkspaces: (props: ListWorkspacesProps) => Promise<import("./api").ListWorkspacesResponse>;
50
51
  introspect: (introspectBody: IntrospectProps) => Promise<import("./api").IntrospectResponse>;
51
52
  createFile: (createFileBody: CreateFileProps) => Promise<import("./api").CreateFileResponse>;
52
53
  getFile: (props: GetFileProps) => Promise<import("./api").GetFileResponse>;
@@ -97,6 +98,7 @@ export type ListIntegrationsProps = Merge<DefaultApiListIntegrationsRequest, {}>
97
98
  export type GetIntegrationProps = Merge<DefaultApiGetIntegrationRequest, {}>;
98
99
  export type GetIntegrationByNameProps = Merge<DefaultApiGetIntegrationByNameRequest, {}>;
99
100
  export type DeleteIntegrationProps = Merge<DefaultApiDeleteIntegrationRequest, {}>;
101
+ export type ListWorkspacesProps = Merge<DefaultApiListWorkspacesRequest, {}>;
100
102
  export type IntrospectProps = Merge<Except<DefaultApiIntrospectRequest, 'introspectBody'>, NonNullable<DefaultApiIntrospectRequest['introspectBody']>>;
101
103
  export type CreateFileProps = Merge<Except<DefaultApiCreateFileRequest, 'createFileBody'>, NonNullable<DefaultApiCreateFileRequest['createFileBody']>>;
102
104
  export type GetFileProps = Merge<DefaultApiGetFileRequest, {}>;
@@ -17,6 +17,7 @@ declare abstract class BaseApiError<Code extends ErrorCode, Type extends string,
17
17
  readonly type: Type;
18
18
  readonly message: string;
19
19
  readonly error?: Error | undefined;
20
+ readonly isApiError = true;
20
21
  constructor(code: Code, description: Description, type: Type, message: string, error?: Error | undefined);
21
22
  toJSON(): {
22
23
  code: Code;
@@ -39,6 +40,13 @@ type InternalType = 'Internal';
39
40
  export declare class InternalError extends BaseApiError<500, InternalType, 'An internal error occurred'> {
40
41
  constructor(message: string, error?: Error);
41
42
  }
43
+ type UnauthorizedType = 'Unauthorized';
44
+ /**
45
+ * The request requires to be authenticated.
46
+ */
47
+ export declare class UnauthorizedError extends BaseApiError<401, UnauthorizedType, 'The request requires to be authenticated.'> {
48
+ constructor(message: string, error?: Error);
49
+ }
42
50
  type ForbiddenType = 'Forbidden';
43
51
  /**
44
52
  * The requested action can\'t be peform by this resource.
@@ -46,6 +54,13 @@ type ForbiddenType = 'Forbidden';
46
54
  export declare class ForbiddenError extends BaseApiError<403, ForbiddenType, 'The requested action can\'t be peform by this resource.'> {
47
55
  constructor(message: string, error?: Error);
48
56
  }
57
+ type PayloadTooLargeType = 'PayloadTooLarge';
58
+ /**
59
+ * The request payload is too large.
60
+ */
61
+ export declare class PayloadTooLargeError extends BaseApiError<413, PayloadTooLargeType, 'The request payload is too large.'> {
62
+ constructor(message: string, error?: Error);
63
+ }
49
64
  type InvalidPayloadType = 'InvalidPayload';
50
65
  /**
51
66
  * The request payload isn\'t invalid.
@@ -109,7 +124,14 @@ type InvalidQueryType = 'InvalidQuery';
109
124
  export declare class InvalidQueryError extends BaseApiError<400, InvalidQueryType, 'The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.'> {
110
125
  constructor(message: string, error?: Error);
111
126
  }
112
- export type ErrorType = 'Unknown' | 'Internal' | 'Forbidden' | 'InvalidPayload' | 'MethodNotFound' | 'ResourceNotFound' | 'InvalidJsonSchema' | 'InvalidDataFormat' | 'InvalidIdentifier' | 'RelationConflict' | 'ReferenceNotFound' | 'InvalidQuery';
113
- export type ApiError = UnknownError | InternalError | ForbiddenError | InvalidPayloadError | MethodNotFoundError | ResourceNotFoundError | InvalidJsonSchemaError | InvalidDataFormatError | InvalidIdentifierError | RelationConflictError | ReferenceNotFoundError | InvalidQueryError;
127
+ type RuntimeType = 'Runtime';
128
+ /**
129
+ * An error happened during the execution of a runtime (bot or integration).
130
+ */
131
+ export declare class RuntimeError extends BaseApiError<400, RuntimeType, 'An error happened during the execution of a runtime (bot or integration).'> {
132
+ constructor(message: string, error?: Error);
133
+ }
134
+ export type ErrorType = 'Unknown' | 'Internal' | 'Unauthorized' | 'Forbidden' | 'PayloadTooLarge' | 'InvalidPayload' | 'MethodNotFound' | 'ResourceNotFound' | 'InvalidJsonSchema' | 'InvalidDataFormat' | 'InvalidIdentifier' | 'RelationConflict' | 'ReferenceNotFound' | 'InvalidQuery' | 'Runtime';
135
+ export type ApiError = UnknownError | InternalError | UnauthorizedError | ForbiddenError | PayloadTooLargeError | InvalidPayloadError | MethodNotFoundError | ResourceNotFoundError | InvalidJsonSchemaError | InvalidDataFormatError | InvalidIdentifierError | RelationConflictError | ReferenceNotFoundError | InvalidQueryError | RuntimeError;
114
136
  export declare const errorFrom: (err: unknown) => ApiError;
115
137
  export {};