@botpress/client 0.0.6 → 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 +305 -5
- package/dist/gen/client.d.ts +3 -1
- package/dist/gen/errors.d.ts +24 -2
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
- package/readme.md +4 -0
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}
|
|
@@ -725,6 +770,18 @@ export interface CreateIntegrationBody {
|
|
|
725
770
|
* @memberof CreateIntegrationBody
|
|
726
771
|
*/
|
|
727
772
|
'public'?: boolean;
|
|
773
|
+
/**
|
|
774
|
+
* URL of the integration; Only available for dev integrations
|
|
775
|
+
* @type {string}
|
|
776
|
+
* @memberof CreateIntegrationBody
|
|
777
|
+
*/
|
|
778
|
+
'url'?: string;
|
|
779
|
+
/**
|
|
780
|
+
* Indicates if the integration is a development integration; Dev integrations run locally
|
|
781
|
+
* @type {boolean}
|
|
782
|
+
* @memberof CreateIntegrationBody
|
|
783
|
+
*/
|
|
784
|
+
'dev'?: boolean;
|
|
728
785
|
}
|
|
729
786
|
/**
|
|
730
787
|
*
|
|
@@ -753,10 +810,10 @@ export interface CreateIntegrationBodyActionsValue {
|
|
|
753
810
|
export interface CreateIntegrationBodyChannelsValue {
|
|
754
811
|
/**
|
|
755
812
|
*
|
|
756
|
-
* @type {
|
|
813
|
+
* @type {CreateIntegrationBodyChannelsValueTags}
|
|
757
814
|
* @memberof CreateIntegrationBodyChannelsValue
|
|
758
815
|
*/
|
|
759
|
-
'tags'?:
|
|
816
|
+
'tags'?: CreateIntegrationBodyChannelsValueTags;
|
|
760
817
|
/**
|
|
761
818
|
*
|
|
762
819
|
* @type {{ [key: string]: CreateIntegrationBodyChannelsValueMessagesValue; }}
|
|
@@ -765,6 +822,44 @@ export interface CreateIntegrationBodyChannelsValue {
|
|
|
765
822
|
'messages': {
|
|
766
823
|
[key: string]: CreateIntegrationBodyChannelsValueMessagesValue;
|
|
767
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>;
|
|
768
863
|
}
|
|
769
864
|
/**
|
|
770
865
|
*
|
|
@@ -781,6 +876,25 @@ export interface CreateIntegrationBodyChannelsValueMessagesValue {
|
|
|
781
876
|
[key: string]: any;
|
|
782
877
|
};
|
|
783
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
|
+
}
|
|
784
898
|
/**
|
|
785
899
|
* Configuration definition
|
|
786
900
|
* @export
|
|
@@ -836,6 +950,38 @@ export interface CreateIntegrationBodyTags {
|
|
|
836
950
|
*/
|
|
837
951
|
'users'?: Array<string>;
|
|
838
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
|
+
}
|
|
839
985
|
/**
|
|
840
986
|
*
|
|
841
987
|
* @export
|
|
@@ -942,6 +1088,12 @@ export interface CreateUserBody {
|
|
|
942
1088
|
'tags': {
|
|
943
1089
|
[key: string]: string;
|
|
944
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;
|
|
945
1097
|
}
|
|
946
1098
|
/**
|
|
947
1099
|
*
|
|
@@ -1207,6 +1359,12 @@ export interface GetOrCreateConversationBody {
|
|
|
1207
1359
|
'tags': {
|
|
1208
1360
|
[key: string]: string;
|
|
1209
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;
|
|
1210
1368
|
}
|
|
1211
1369
|
/**
|
|
1212
1370
|
*
|
|
@@ -1289,6 +1447,12 @@ export interface GetOrCreateUserBody {
|
|
|
1289
1447
|
'tags': {
|
|
1290
1448
|
[key: string]: string;
|
|
1291
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;
|
|
1292
1456
|
}
|
|
1293
1457
|
/**
|
|
1294
1458
|
*
|
|
@@ -1429,6 +1593,18 @@ export interface Integration {
|
|
|
1429
1593
|
'actions': {
|
|
1430
1594
|
[key: string]: CreateIntegrationBodyActionsValue;
|
|
1431
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;
|
|
1432
1608
|
}
|
|
1433
1609
|
/**
|
|
1434
1610
|
*
|
|
@@ -1438,10 +1614,10 @@ export interface Integration {
|
|
|
1438
1614
|
export interface IntegrationChannelsValue {
|
|
1439
1615
|
/**
|
|
1440
1616
|
*
|
|
1441
|
-
* @type {
|
|
1617
|
+
* @type {CreateIntegrationBodyChannelsValueTags}
|
|
1442
1618
|
* @memberof IntegrationChannelsValue
|
|
1443
1619
|
*/
|
|
1444
|
-
'tags':
|
|
1620
|
+
'tags': CreateIntegrationBodyChannelsValueTags;
|
|
1445
1621
|
/**
|
|
1446
1622
|
*
|
|
1447
1623
|
* @type {{ [key: string]: CreateIntegrationBodyChannelsValueMessagesValue; }}
|
|
@@ -1450,6 +1626,12 @@ export interface IntegrationChannelsValue {
|
|
|
1450
1626
|
'messages': {
|
|
1451
1627
|
[key: string]: CreateIntegrationBodyChannelsValueMessagesValue;
|
|
1452
1628
|
};
|
|
1629
|
+
/**
|
|
1630
|
+
*
|
|
1631
|
+
* @type {CreateIntegrationBodyChannelsValueConversation}
|
|
1632
|
+
* @memberof IntegrationChannelsValue
|
|
1633
|
+
*/
|
|
1634
|
+
'conversation': CreateIntegrationBodyChannelsValueConversation;
|
|
1453
1635
|
}
|
|
1454
1636
|
/**
|
|
1455
1637
|
*
|
|
@@ -1728,6 +1910,62 @@ export interface ListUsersResponse {
|
|
|
1728
1910
|
*/
|
|
1729
1911
|
'meta': ListConversationsResponseMeta;
|
|
1730
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
|
+
}
|
|
1731
1969
|
/**
|
|
1732
1970
|
* The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).
|
|
1733
1971
|
* @export
|
|
@@ -1985,7 +2223,7 @@ export type StateTypeEnum = typeof StateTypeEnum[keyof typeof StateTypeEnum];
|
|
|
1985
2223
|
*/
|
|
1986
2224
|
export interface UpdateBotBody {
|
|
1987
2225
|
/**
|
|
1988
|
-
* URL
|
|
2226
|
+
* URL of the [Bot](#schema_bot); Only available for dev bots
|
|
1989
2227
|
* @type {string}
|
|
1990
2228
|
* @memberof UpdateBotBody
|
|
1991
2229
|
*/
|
|
@@ -2187,6 +2425,12 @@ export interface UpdateIntegrationBody {
|
|
|
2187
2425
|
'actions'?: {
|
|
2188
2426
|
[key: string]: CreateIntegrationBodyActionsValue;
|
|
2189
2427
|
};
|
|
2428
|
+
/**
|
|
2429
|
+
*
|
|
2430
|
+
* @type {CreateIntegrationBodyUser}
|
|
2431
|
+
* @memberof UpdateIntegrationBody
|
|
2432
|
+
*/
|
|
2433
|
+
'user'?: CreateIntegrationBodyUser;
|
|
2190
2434
|
/**
|
|
2191
2435
|
* JavaScript code of the integration
|
|
2192
2436
|
* @type {string}
|
|
@@ -2199,6 +2443,12 @@ export interface UpdateIntegrationBody {
|
|
|
2199
2443
|
* @memberof UpdateIntegrationBody
|
|
2200
2444
|
*/
|
|
2201
2445
|
'public'?: boolean;
|
|
2446
|
+
/**
|
|
2447
|
+
* URL of the integration; Only available for dev integrations
|
|
2448
|
+
* @type {string}
|
|
2449
|
+
* @memberof UpdateIntegrationBody
|
|
2450
|
+
*/
|
|
2451
|
+
'url'?: string;
|
|
2202
2452
|
}
|
|
2203
2453
|
/**
|
|
2204
2454
|
*
|
|
@@ -2625,6 +2875,13 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
|
|
|
2625
2875
|
listUsers: (nextToken?: string, conversationId?: string, tags?: {
|
|
2626
2876
|
[key: string]: string;
|
|
2627
2877
|
} | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
2878
|
+
/**
|
|
2879
|
+
* List workspaces the user has access to
|
|
2880
|
+
* @param {string} [nextToken] Provide the `meta.nextToken` 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>;
|
|
2628
2885
|
/**
|
|
2629
2886
|
* Updates the [State](#schema_state) object by setting the values of the parameters passed.
|
|
2630
2887
|
* @param {'conversation' | 'user' | 'bot' | 'integration'} type State type
|
|
@@ -3009,6 +3266,13 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
|
|
|
3009
3266
|
listUsers(nextToken?: string, conversationId?: string, tags?: {
|
|
3010
3267
|
[key: string]: string;
|
|
3011
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 `meta.nextToken` 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>>;
|
|
3012
3276
|
/**
|
|
3013
3277
|
* Updates the [State](#schema_state) object by setting the values of the parameters passed.
|
|
3014
3278
|
* @param {'conversation' | 'user' | 'bot' | 'integration'} type State type
|
|
@@ -3393,6 +3657,13 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
|
|
|
3393
3657
|
listUsers(nextToken?: string, conversationId?: string, tags?: {
|
|
3394
3658
|
[key: string]: string;
|
|
3395
3659
|
} | undefined, options?: any): AxiosPromise<ListUsersResponse>;
|
|
3660
|
+
/**
|
|
3661
|
+
* List workspaces the user has access to
|
|
3662
|
+
* @param {string} [nextToken] Provide the `meta.nextToken` 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>;
|
|
3396
3667
|
/**
|
|
3397
3668
|
* Updates the [State](#schema_state) object by setting the values of the parameters passed.
|
|
3398
3669
|
* @param {'conversation' | 'user' | 'bot' | 'integration'} type State type
|
|
@@ -3820,6 +4091,14 @@ export interface DefaultApiInterface {
|
|
|
3820
4091
|
listUsers(nextToken?: string, conversationId?: string, tags?: {
|
|
3821
4092
|
[key: string]: string;
|
|
3822
4093
|
}, options?: AxiosRequestConfig): AxiosPromise<ListUsersResponse>;
|
|
4094
|
+
/**
|
|
4095
|
+
* List workspaces the user has access to
|
|
4096
|
+
* @param {string} [nextToken] Provide the `meta.nextToken` 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>;
|
|
3823
4102
|
/**
|
|
3824
4103
|
* Updates the [State](#schema_state) object by setting the values of the parameters passed.
|
|
3825
4104
|
* @param {'conversation' | 'user' | 'bot' | 'integration'} type State type
|
|
@@ -4548,6 +4827,19 @@ export interface DefaultApiListUsersRequest {
|
|
|
4548
4827
|
[key: string]: string;
|
|
4549
4828
|
};
|
|
4550
4829
|
}
|
|
4830
|
+
/**
|
|
4831
|
+
* Request parameters for listWorkspaces operation in DefaultApi.
|
|
4832
|
+
* @export
|
|
4833
|
+
* @interface DefaultApiListWorkspacesRequest
|
|
4834
|
+
*/
|
|
4835
|
+
export interface DefaultApiListWorkspacesRequest {
|
|
4836
|
+
/**
|
|
4837
|
+
* Provide the `meta.nextToken` 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
|
+
}
|
|
4551
4843
|
/**
|
|
4552
4844
|
* Request parameters for patchState operation in DefaultApi.
|
|
4553
4845
|
* @export
|
|
@@ -5048,6 +5340,14 @@ export declare class DefaultApi extends BaseAPI implements DefaultApiInterface {
|
|
|
5048
5340
|
* @memberof DefaultApi
|
|
5049
5341
|
*/
|
|
5050
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>>;
|
|
5051
5351
|
/**
|
|
5052
5352
|
* Updates the [State](#schema_state) object by setting the values of the parameters passed.
|
|
5053
5353
|
* @param {DefaultApiPatchStateRequest} requestParameters Request parameters.
|
package/dist/gen/client.d.ts
CHANGED
|
@@ -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, {}>;
|
package/dist/gen/errors.d.ts
CHANGED
|
@@ -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
|
-
|
|
113
|
-
|
|
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 {};
|