ultracart_rest_api_v2_typescript 4.0.128 → 4.0.130
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/.openapi-generator/FILES +2 -0
- package/README.md +4 -2
- package/dist/apis/ConversationApi.d.ts +51 -1
- package/dist/apis/ConversationApi.js +117 -0
- package/dist/models/ConversationAgentProfile.d.ts +72 -0
- package/dist/models/ConversationAgentProfile.js +62 -0
- package/dist/models/ConversationAgentProfileResponse.d.ts +55 -0
- package/dist/models/ConversationAgentProfileResponse.js +54 -0
- package/dist/models/ConversationWebsocketMessage.d.ts +6 -0
- package/dist/models/ConversationWebsocketMessage.js +2 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/package.json +1 -1
- package/src/apis/ConversationApi.ts +122 -0
- package/src/models/ConversationAgentProfile.ts +116 -0
- package/src/models/ConversationAgentProfileResponse.ts +113 -0
- package/src/models/ConversationWebsocketMessage.ts +8 -0
- package/src/models/index.ts +2 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -149,6 +149,8 @@ src/models/CityStateZip.ts
|
|
|
149
149
|
src/models/Conversation.ts
|
|
150
150
|
src/models/ConversationAgentAuth.ts
|
|
151
151
|
src/models/ConversationAgentAuthResponse.ts
|
|
152
|
+
src/models/ConversationAgentProfile.ts
|
|
153
|
+
src/models/ConversationAgentProfileResponse.ts
|
|
152
154
|
src/models/ConversationAutocompleteRequest.ts
|
|
153
155
|
src/models/ConversationAutocompleteResponse.ts
|
|
154
156
|
src/models/ConversationAutocompleteValue.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## ultracart_rest_api_v2_typescript@4.0.
|
|
1
|
+
## ultracart_rest_api_v2_typescript@4.0.130
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install ultracart_rest_api_v2_typescript@4.0.
|
|
39
|
+
npm install ultracart_rest_api_v2_typescript@4.0.130 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -54,6 +54,8 @@ Not every change is committed to every SDK.
|
|
|
54
54
|
|
|
55
55
|
| Version | Date | Comments |
|
|
56
56
|
| --: | :-: | --- |
|
|
57
|
+
| 4.0.130 | 02/06/2023 | convo - add conversation_arn to ConversationWebsocketMessage |
|
|
58
|
+
| 4.0.129 | 02/01/2023 | convo - agent profile get/update methods |
|
|
57
59
|
| 4.0.128 | 01/27/2023 | convo - added event_engage_customer property to message |
|
|
58
60
|
| 4.0.127 | 01/27/2023 | conversations - getLocationsForEngagement method |
|
|
59
61
|
| 4.0.126-RC | 01/26/2023 | typo in ConversationWebsocketMessage |
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { ConversationAgentAuthResponse, ConversationAutocompleteRequest, ConversationAutocompleteResponse, ConversationCannedMessage, ConversationCannedMessageResponse, ConversationCannedMessagesResponse, ConversationCannedMessagesSearch, ConversationDepartment, ConversationDepartmentMembersResponse, ConversationDepartmentResponse, ConversationDepartmentsResponse, ConversationEngagement, ConversationEngagementResponse, ConversationEngagementsResponse, ConversationJoinRequest, ConversationLocationsResponse, ConversationMessagesResponse, ConversationMultimediaUploadUrlResponse, ConversationPermissionsResponse, ConversationResponse, ConversationSearchRequest, ConversationSearchResponse, ConversationStartRequest, ConversationStartResponse, ConversationWebchatContext, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse } from '../models';
|
|
13
|
+
import { ConversationAgentAuthResponse, ConversationAgentProfile, ConversationAgentProfileResponse, ConversationAutocompleteRequest, ConversationAutocompleteResponse, ConversationCannedMessage, ConversationCannedMessageResponse, ConversationCannedMessagesResponse, ConversationCannedMessagesSearch, ConversationDepartment, ConversationDepartmentMembersResponse, ConversationDepartmentResponse, ConversationDepartmentsResponse, ConversationEngagement, ConversationEngagementResponse, ConversationEngagementsResponse, ConversationJoinRequest, ConversationLocationsResponse, ConversationMessagesResponse, ConversationMultimediaUploadUrlResponse, ConversationPermissionsResponse, ConversationResponse, ConversationSearchRequest, ConversationSearchResponse, ConversationStartRequest, ConversationStartResponse, ConversationWebchatContext, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse } from '../models';
|
|
14
14
|
export interface DeleteConversationCannedMessageRequest {
|
|
15
15
|
conversationCannedMessageOid: number;
|
|
16
16
|
}
|
|
@@ -75,6 +75,9 @@ export interface SearchConversationCannedMessagesRequest {
|
|
|
75
75
|
export interface StartConversationRequest {
|
|
76
76
|
startRequest: ConversationStartRequest;
|
|
77
77
|
}
|
|
78
|
+
export interface UpdateAgentProfileRequest {
|
|
79
|
+
profileRequest: ConversationAgentProfile;
|
|
80
|
+
}
|
|
78
81
|
export interface UpdateConversationCannedMessageRequest {
|
|
79
82
|
conversationCannedMessageOid: number;
|
|
80
83
|
cannedMessage: ConversationCannedMessage;
|
|
@@ -153,6 +156,19 @@ export interface ConversationApiInterface {
|
|
|
153
156
|
* Agent keep alive
|
|
154
157
|
*/
|
|
155
158
|
getAgentKeepAlive(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
159
|
+
/**
|
|
160
|
+
* Retrieve the agents profile
|
|
161
|
+
* @summary Get agent profile
|
|
162
|
+
* @param {*} [options] Override http request option.
|
|
163
|
+
* @throws {RequiredError}
|
|
164
|
+
* @memberof ConversationApiInterface
|
|
165
|
+
*/
|
|
166
|
+
getAgentProfileRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationAgentProfileResponse>>;
|
|
167
|
+
/**
|
|
168
|
+
* Retrieve the agents profile
|
|
169
|
+
* Get agent profile
|
|
170
|
+
*/
|
|
171
|
+
getAgentProfile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAgentProfileResponse>;
|
|
156
172
|
/**
|
|
157
173
|
* Retrieve a JWT to authorize an agent to make a websocket connection.
|
|
158
174
|
* @summary Get agent websocket authorization
|
|
@@ -488,6 +504,20 @@ export interface ConversationApiInterface {
|
|
|
488
504
|
* Start a conversation
|
|
489
505
|
*/
|
|
490
506
|
startConversation(requestParameters: StartConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationStartResponse>;
|
|
507
|
+
/**
|
|
508
|
+
* Update agent profile
|
|
509
|
+
* @summary Update agent profile
|
|
510
|
+
* @param {ConversationAgentProfile} profileRequest Profile request
|
|
511
|
+
* @param {*} [options] Override http request option.
|
|
512
|
+
* @throws {RequiredError}
|
|
513
|
+
* @memberof ConversationApiInterface
|
|
514
|
+
*/
|
|
515
|
+
updateAgentProfileRaw(requestParameters: UpdateAgentProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationAgentProfileResponse>>;
|
|
516
|
+
/**
|
|
517
|
+
* Update agent profile
|
|
518
|
+
* Update agent profile
|
|
519
|
+
*/
|
|
520
|
+
updateAgentProfile(requestParameters: UpdateAgentProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAgentProfileResponse>;
|
|
491
521
|
/**
|
|
492
522
|
* Update a canned message
|
|
493
523
|
* @summary Update a canned message
|
|
@@ -593,6 +623,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
|
|
|
593
623
|
* Agent keep alive
|
|
594
624
|
*/
|
|
595
625
|
getAgentKeepAlive(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
626
|
+
/**
|
|
627
|
+
* Retrieve the agents profile
|
|
628
|
+
* Get agent profile
|
|
629
|
+
*/
|
|
630
|
+
getAgentProfileRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationAgentProfileResponse>>;
|
|
631
|
+
/**
|
|
632
|
+
* Retrieve the agents profile
|
|
633
|
+
* Get agent profile
|
|
634
|
+
*/
|
|
635
|
+
getAgentProfile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAgentProfileResponse>;
|
|
596
636
|
/**
|
|
597
637
|
* Retrieve a JWT to authorize an agent to make a websocket connection.
|
|
598
638
|
* Get agent websocket authorization
|
|
@@ -833,6 +873,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
|
|
|
833
873
|
* Start a conversation
|
|
834
874
|
*/
|
|
835
875
|
startConversation(requestParameters: StartConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationStartResponse>;
|
|
876
|
+
/**
|
|
877
|
+
* Update agent profile
|
|
878
|
+
* Update agent profile
|
|
879
|
+
*/
|
|
880
|
+
updateAgentProfileRaw(requestParameters: UpdateAgentProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationAgentProfileResponse>>;
|
|
881
|
+
/**
|
|
882
|
+
* Update agent profile
|
|
883
|
+
* Update agent profile
|
|
884
|
+
*/
|
|
885
|
+
updateAgentProfile(requestParameters: UpdateAgentProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAgentProfileResponse>;
|
|
836
886
|
/**
|
|
837
887
|
* Update a canned message
|
|
838
888
|
* Update a canned message
|
|
@@ -300,6 +300,62 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
300
300
|
});
|
|
301
301
|
});
|
|
302
302
|
};
|
|
303
|
+
/**
|
|
304
|
+
* Retrieve the agents profile
|
|
305
|
+
* Get agent profile
|
|
306
|
+
*/
|
|
307
|
+
ConversationApi.prototype.getAgentProfileRaw = function (initOverrides) {
|
|
308
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
309
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
310
|
+
return __generator(this, function (_c) {
|
|
311
|
+
switch (_c.label) {
|
|
312
|
+
case 0:
|
|
313
|
+
queryParameters = {};
|
|
314
|
+
headerParameters = {};
|
|
315
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
316
|
+
// oauth required
|
|
317
|
+
_a = headerParameters;
|
|
318
|
+
_b = "Authorization";
|
|
319
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_read"])];
|
|
320
|
+
case 1:
|
|
321
|
+
// oauth required
|
|
322
|
+
_a[_b] = _c.sent();
|
|
323
|
+
_c.label = 2;
|
|
324
|
+
case 2:
|
|
325
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
326
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
327
|
+
}
|
|
328
|
+
return [4 /*yield*/, this.request({
|
|
329
|
+
path: "/conversation/agent/profile",
|
|
330
|
+
method: 'GET',
|
|
331
|
+
headers: headerParameters,
|
|
332
|
+
query: queryParameters,
|
|
333
|
+
}, initOverrides)];
|
|
334
|
+
case 3:
|
|
335
|
+
response = _c.sent();
|
|
336
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationAgentProfileResponseFromJSON)(jsonValue); })];
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
};
|
|
341
|
+
/**
|
|
342
|
+
* Retrieve the agents profile
|
|
343
|
+
* Get agent profile
|
|
344
|
+
*/
|
|
345
|
+
ConversationApi.prototype.getAgentProfile = function (initOverrides) {
|
|
346
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
347
|
+
var response;
|
|
348
|
+
return __generator(this, function (_a) {
|
|
349
|
+
switch (_a.label) {
|
|
350
|
+
case 0: return [4 /*yield*/, this.getAgentProfileRaw(initOverrides)];
|
|
351
|
+
case 1:
|
|
352
|
+
response = _a.sent();
|
|
353
|
+
return [4 /*yield*/, response.value()];
|
|
354
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
};
|
|
303
359
|
/**
|
|
304
360
|
* Retrieve a JWT to authorize an agent to make a websocket connection.
|
|
305
361
|
* Get agent websocket authorization
|
|
@@ -1721,6 +1777,67 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
1721
1777
|
});
|
|
1722
1778
|
});
|
|
1723
1779
|
};
|
|
1780
|
+
/**
|
|
1781
|
+
* Update agent profile
|
|
1782
|
+
* Update agent profile
|
|
1783
|
+
*/
|
|
1784
|
+
ConversationApi.prototype.updateAgentProfileRaw = function (requestParameters, initOverrides) {
|
|
1785
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1786
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
1787
|
+
return __generator(this, function (_c) {
|
|
1788
|
+
switch (_c.label) {
|
|
1789
|
+
case 0:
|
|
1790
|
+
if (requestParameters.profileRequest === null || requestParameters.profileRequest === undefined) {
|
|
1791
|
+
throw new runtime.RequiredError('profileRequest', 'Required parameter requestParameters.profileRequest was null or undefined when calling updateAgentProfile.');
|
|
1792
|
+
}
|
|
1793
|
+
queryParameters = {};
|
|
1794
|
+
headerParameters = {};
|
|
1795
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1796
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
1797
|
+
// oauth required
|
|
1798
|
+
_a = headerParameters;
|
|
1799
|
+
_b = "Authorization";
|
|
1800
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
|
|
1801
|
+
case 1:
|
|
1802
|
+
// oauth required
|
|
1803
|
+
_a[_b] = _c.sent();
|
|
1804
|
+
_c.label = 2;
|
|
1805
|
+
case 2:
|
|
1806
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1807
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1808
|
+
}
|
|
1809
|
+
return [4 /*yield*/, this.request({
|
|
1810
|
+
path: "/conversation/agent/profile",
|
|
1811
|
+
method: 'PUT',
|
|
1812
|
+
headers: headerParameters,
|
|
1813
|
+
query: queryParameters,
|
|
1814
|
+
body: (0, models_1.ConversationAgentProfileToJSON)(requestParameters.profileRequest),
|
|
1815
|
+
}, initOverrides)];
|
|
1816
|
+
case 3:
|
|
1817
|
+
response = _c.sent();
|
|
1818
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationAgentProfileResponseFromJSON)(jsonValue); })];
|
|
1819
|
+
}
|
|
1820
|
+
});
|
|
1821
|
+
});
|
|
1822
|
+
};
|
|
1823
|
+
/**
|
|
1824
|
+
* Update agent profile
|
|
1825
|
+
* Update agent profile
|
|
1826
|
+
*/
|
|
1827
|
+
ConversationApi.prototype.updateAgentProfile = function (requestParameters, initOverrides) {
|
|
1828
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1829
|
+
var response;
|
|
1830
|
+
return __generator(this, function (_a) {
|
|
1831
|
+
switch (_a.label) {
|
|
1832
|
+
case 0: return [4 /*yield*/, this.updateAgentProfileRaw(requestParameters, initOverrides)];
|
|
1833
|
+
case 1:
|
|
1834
|
+
response = _a.sent();
|
|
1835
|
+
return [4 /*yield*/, response.value()];
|
|
1836
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1837
|
+
}
|
|
1838
|
+
});
|
|
1839
|
+
});
|
|
1840
|
+
};
|
|
1724
1841
|
/**
|
|
1725
1842
|
* Update a canned message
|
|
1726
1843
|
* Update a canned message
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ConversationAgentProfile
|
|
16
|
+
*/
|
|
17
|
+
export interface ConversationAgentProfile {
|
|
18
|
+
/**
|
|
19
|
+
* The number of engagement chats that can be pushed on them at any given time.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ConversationAgentProfile
|
|
22
|
+
*/
|
|
23
|
+
chat_limit?: number;
|
|
24
|
+
/**
|
|
25
|
+
* The default language the agent is chatting in
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ConversationAgentProfile
|
|
28
|
+
*/
|
|
29
|
+
default_language_iso_code?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Default status when the agent loads conversations app.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ConversationAgentProfile
|
|
34
|
+
*/
|
|
35
|
+
default_status?: ConversationAgentProfileDefaultStatusEnum;
|
|
36
|
+
/**
|
|
37
|
+
* An alternate name that the agent wants to use in chat.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ConversationAgentProfile
|
|
40
|
+
*/
|
|
41
|
+
display_name?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Their actual user name for profile settings display as placeholder test
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ConversationAgentProfile
|
|
46
|
+
*/
|
|
47
|
+
name?: string;
|
|
48
|
+
/**
|
|
49
|
+
* An upload key used to update the profile image.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ConversationAgentProfile
|
|
52
|
+
*/
|
|
53
|
+
profile_image_upload_key?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Their current profile image URL
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof ConversationAgentProfile
|
|
58
|
+
*/
|
|
59
|
+
profile_image_url?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export declare const ConversationAgentProfileDefaultStatusEnum: {
|
|
65
|
+
readonly Available: "available";
|
|
66
|
+
readonly Busy: "busy";
|
|
67
|
+
readonly Unavailable: "unavailable";
|
|
68
|
+
};
|
|
69
|
+
export type ConversationAgentProfileDefaultStatusEnum = typeof ConversationAgentProfileDefaultStatusEnum[keyof typeof ConversationAgentProfileDefaultStatusEnum];
|
|
70
|
+
export declare function ConversationAgentProfileFromJSON(json: any): ConversationAgentProfile;
|
|
71
|
+
export declare function ConversationAgentProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationAgentProfile;
|
|
72
|
+
export declare function ConversationAgentProfileToJSON(value?: ConversationAgentProfile | null): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ConversationAgentProfileToJSON = exports.ConversationAgentProfileFromJSONTyped = exports.ConversationAgentProfileFromJSON = exports.ConversationAgentProfileDefaultStatusEnum = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
exports.ConversationAgentProfileDefaultStatusEnum = {
|
|
22
|
+
Available: 'available',
|
|
23
|
+
Busy: 'busy',
|
|
24
|
+
Unavailable: 'unavailable'
|
|
25
|
+
};
|
|
26
|
+
function ConversationAgentProfileFromJSON(json) {
|
|
27
|
+
return ConversationAgentProfileFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.ConversationAgentProfileFromJSON = ConversationAgentProfileFromJSON;
|
|
30
|
+
function ConversationAgentProfileFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'chat_limit': !(0, runtime_1.exists)(json, 'chat_limit') ? undefined : json['chat_limit'],
|
|
36
|
+
'default_language_iso_code': !(0, runtime_1.exists)(json, 'default_language_iso_code') ? undefined : json['default_language_iso_code'],
|
|
37
|
+
'default_status': !(0, runtime_1.exists)(json, 'default_status') ? undefined : json['default_status'],
|
|
38
|
+
'display_name': !(0, runtime_1.exists)(json, 'display_name') ? undefined : json['display_name'],
|
|
39
|
+
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
40
|
+
'profile_image_upload_key': !(0, runtime_1.exists)(json, 'profile_image_upload_key') ? undefined : json['profile_image_upload_key'],
|
|
41
|
+
'profile_image_url': !(0, runtime_1.exists)(json, 'profile_image_url') ? undefined : json['profile_image_url'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
exports.ConversationAgentProfileFromJSONTyped = ConversationAgentProfileFromJSONTyped;
|
|
45
|
+
function ConversationAgentProfileToJSON(value) {
|
|
46
|
+
if (value === undefined) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
if (value === null) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'chat_limit': value.chat_limit,
|
|
54
|
+
'default_language_iso_code': value.default_language_iso_code,
|
|
55
|
+
'default_status': value.default_status,
|
|
56
|
+
'display_name': value.display_name,
|
|
57
|
+
'name': value.name,
|
|
58
|
+
'profile_image_upload_key': value.profile_image_upload_key,
|
|
59
|
+
'profile_image_url': value.profile_image_url,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
exports.ConversationAgentProfileToJSON = ConversationAgentProfileToJSON;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { ConversationAgentProfile } from './ConversationAgentProfile';
|
|
13
|
+
import { ModelError } from './ModelError';
|
|
14
|
+
import { ResponseMetadata } from './ResponseMetadata';
|
|
15
|
+
import { Warning } from './Warning';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ConversationAgentProfileResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface ConversationAgentProfileResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {ConversationAgentProfile}
|
|
25
|
+
* @memberof ConversationAgentProfileResponse
|
|
26
|
+
*/
|
|
27
|
+
agent_profile?: ConversationAgentProfile;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {ModelError}
|
|
31
|
+
* @memberof ConversationAgentProfileResponse
|
|
32
|
+
*/
|
|
33
|
+
error?: ModelError;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {ResponseMetadata}
|
|
37
|
+
* @memberof ConversationAgentProfileResponse
|
|
38
|
+
*/
|
|
39
|
+
metadata?: ResponseMetadata;
|
|
40
|
+
/**
|
|
41
|
+
* Indicates if API call was successful
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof ConversationAgentProfileResponse
|
|
44
|
+
*/
|
|
45
|
+
success?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {Warning}
|
|
49
|
+
* @memberof ConversationAgentProfileResponse
|
|
50
|
+
*/
|
|
51
|
+
warning?: Warning;
|
|
52
|
+
}
|
|
53
|
+
export declare function ConversationAgentProfileResponseFromJSON(json: any): ConversationAgentProfileResponse;
|
|
54
|
+
export declare function ConversationAgentProfileResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationAgentProfileResponse;
|
|
55
|
+
export declare function ConversationAgentProfileResponseToJSON(value?: ConversationAgentProfileResponse | null): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ConversationAgentProfileResponseToJSON = exports.ConversationAgentProfileResponseFromJSONTyped = exports.ConversationAgentProfileResponseFromJSON = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var ConversationAgentProfile_1 = require("./ConversationAgentProfile");
|
|
19
|
+
var ModelError_1 = require("./ModelError");
|
|
20
|
+
var ResponseMetadata_1 = require("./ResponseMetadata");
|
|
21
|
+
var Warning_1 = require("./Warning");
|
|
22
|
+
function ConversationAgentProfileResponseFromJSON(json) {
|
|
23
|
+
return ConversationAgentProfileResponseFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
exports.ConversationAgentProfileResponseFromJSON = ConversationAgentProfileResponseFromJSON;
|
|
26
|
+
function ConversationAgentProfileResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if ((json === undefined) || (json === null)) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'agent_profile': !(0, runtime_1.exists)(json, 'agent_profile') ? undefined : (0, ConversationAgentProfile_1.ConversationAgentProfileFromJSON)(json['agent_profile']),
|
|
32
|
+
'error': !(0, runtime_1.exists)(json, 'error') ? undefined : (0, ModelError_1.ModelErrorFromJSON)(json['error']),
|
|
33
|
+
'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, ResponseMetadata_1.ResponseMetadataFromJSON)(json['metadata']),
|
|
34
|
+
'success': !(0, runtime_1.exists)(json, 'success') ? undefined : json['success'],
|
|
35
|
+
'warning': !(0, runtime_1.exists)(json, 'warning') ? undefined : (0, Warning_1.WarningFromJSON)(json['warning']),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.ConversationAgentProfileResponseFromJSONTyped = ConversationAgentProfileResponseFromJSONTyped;
|
|
39
|
+
function ConversationAgentProfileResponseToJSON(value) {
|
|
40
|
+
if (value === undefined) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
if (value === null) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'agent_profile': (0, ConversationAgentProfile_1.ConversationAgentProfileToJSON)(value.agent_profile),
|
|
48
|
+
'error': (0, ModelError_1.ModelErrorToJSON)(value.error),
|
|
49
|
+
'metadata': (0, ResponseMetadata_1.ResponseMetadataToJSON)(value.metadata),
|
|
50
|
+
'success': value.success,
|
|
51
|
+
'warning': (0, Warning_1.WarningToJSON)(value.warning),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
exports.ConversationAgentProfileResponseToJSON = ConversationAgentProfileResponseToJSON;
|
|
@@ -27,6 +27,12 @@ import { ConversationWebchatQueueStatusQueueEntry } from './ConversationWebchatQ
|
|
|
27
27
|
* @interface ConversationWebsocketMessage
|
|
28
28
|
*/
|
|
29
29
|
export interface ConversationWebsocketMessage {
|
|
30
|
+
/**
|
|
31
|
+
* Conversation ARN
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ConversationWebsocketMessage
|
|
34
|
+
*/
|
|
35
|
+
conversation_arn?: string;
|
|
30
36
|
/**
|
|
31
37
|
* Conversation UUID if the websocket message is tied to a specific conversation
|
|
32
38
|
* @type {string}
|
|
@@ -67,6 +67,7 @@ function ConversationWebsocketMessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
67
67
|
return json;
|
|
68
68
|
}
|
|
69
69
|
return {
|
|
70
|
+
'conversation_arn': !(0, runtime_1.exists)(json, 'conversation_arn') ? undefined : json['conversation_arn'],
|
|
70
71
|
'conversation_uuid': !(0, runtime_1.exists)(json, 'conversation_uuid') ? undefined : json['conversation_uuid'],
|
|
71
72
|
'event_add_coupon': !(0, runtime_1.exists)(json, 'event_add_coupon') ? undefined : (0, ConversationEventAddCoupon_1.ConversationEventAddCouponFromJSON)(json['event_add_coupon']),
|
|
72
73
|
'event_add_item': !(0, runtime_1.exists)(json, 'event_add_item') ? undefined : (0, ConversationEventAddItem_1.ConversationEventAddItemFromJSON)(json['event_add_item']),
|
|
@@ -100,6 +101,7 @@ function ConversationWebsocketMessageToJSON(value) {
|
|
|
100
101
|
return null;
|
|
101
102
|
}
|
|
102
103
|
return {
|
|
104
|
+
'conversation_arn': value.conversation_arn,
|
|
103
105
|
'conversation_uuid': value.conversation_uuid,
|
|
104
106
|
'event_add_coupon': (0, ConversationEventAddCoupon_1.ConversationEventAddCouponToJSON)(value.event_add_coupon),
|
|
105
107
|
'event_add_item': (0, ConversationEventAddItem_1.ConversationEventAddItemToJSON)(value.event_add_item),
|
package/dist/models/index.d.ts
CHANGED
|
@@ -124,6 +124,8 @@ export * from './CityStateZip';
|
|
|
124
124
|
export * from './Conversation';
|
|
125
125
|
export * from './ConversationAgentAuth';
|
|
126
126
|
export * from './ConversationAgentAuthResponse';
|
|
127
|
+
export * from './ConversationAgentProfile';
|
|
128
|
+
export * from './ConversationAgentProfileResponse';
|
|
127
129
|
export * from './ConversationAutocompleteRequest';
|
|
128
130
|
export * from './ConversationAutocompleteResponse';
|
|
129
131
|
export * from './ConversationAutocompleteValue';
|
package/dist/models/index.js
CHANGED
|
@@ -142,6 +142,8 @@ __exportStar(require("./CityStateZip"), exports);
|
|
|
142
142
|
__exportStar(require("./Conversation"), exports);
|
|
143
143
|
__exportStar(require("./ConversationAgentAuth"), exports);
|
|
144
144
|
__exportStar(require("./ConversationAgentAuthResponse"), exports);
|
|
145
|
+
__exportStar(require("./ConversationAgentProfile"), exports);
|
|
146
|
+
__exportStar(require("./ConversationAgentProfileResponse"), exports);
|
|
145
147
|
__exportStar(require("./ConversationAutocompleteRequest"), exports);
|
|
146
148
|
__exportStar(require("./ConversationAutocompleteResponse"), exports);
|
|
147
149
|
__exportStar(require("./ConversationAutocompleteValue"), exports);
|
package/package.json
CHANGED
|
@@ -18,6 +18,12 @@ import {
|
|
|
18
18
|
ConversationAgentAuthResponse,
|
|
19
19
|
ConversationAgentAuthResponseFromJSON,
|
|
20
20
|
ConversationAgentAuthResponseToJSON,
|
|
21
|
+
ConversationAgentProfile,
|
|
22
|
+
ConversationAgentProfileFromJSON,
|
|
23
|
+
ConversationAgentProfileToJSON,
|
|
24
|
+
ConversationAgentProfileResponse,
|
|
25
|
+
ConversationAgentProfileResponseFromJSON,
|
|
26
|
+
ConversationAgentProfileResponseToJSON,
|
|
21
27
|
ConversationAutocompleteRequest,
|
|
22
28
|
ConversationAutocompleteRequestFromJSON,
|
|
23
29
|
ConversationAutocompleteRequestToJSON,
|
|
@@ -187,6 +193,10 @@ export interface StartConversationRequest {
|
|
|
187
193
|
startRequest: ConversationStartRequest;
|
|
188
194
|
}
|
|
189
195
|
|
|
196
|
+
export interface UpdateAgentProfileRequest {
|
|
197
|
+
profileRequest: ConversationAgentProfile;
|
|
198
|
+
}
|
|
199
|
+
|
|
190
200
|
export interface UpdateConversationCannedMessageRequest {
|
|
191
201
|
conversationCannedMessageOid: number;
|
|
192
202
|
cannedMessage: ConversationCannedMessage;
|
|
@@ -277,6 +287,21 @@ export interface ConversationApiInterface {
|
|
|
277
287
|
*/
|
|
278
288
|
getAgentKeepAlive(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
279
289
|
|
|
290
|
+
/**
|
|
291
|
+
* Retrieve the agents profile
|
|
292
|
+
* @summary Get agent profile
|
|
293
|
+
* @param {*} [options] Override http request option.
|
|
294
|
+
* @throws {RequiredError}
|
|
295
|
+
* @memberof ConversationApiInterface
|
|
296
|
+
*/
|
|
297
|
+
getAgentProfileRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationAgentProfileResponse>>;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Retrieve the agents profile
|
|
301
|
+
* Get agent profile
|
|
302
|
+
*/
|
|
303
|
+
getAgentProfile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAgentProfileResponse>;
|
|
304
|
+
|
|
280
305
|
/**
|
|
281
306
|
* Retrieve a JWT to authorize an agent to make a websocket connection.
|
|
282
307
|
* @summary Get agent websocket authorization
|
|
@@ -660,6 +685,22 @@ export interface ConversationApiInterface {
|
|
|
660
685
|
*/
|
|
661
686
|
startConversation(requestParameters: StartConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationStartResponse>;
|
|
662
687
|
|
|
688
|
+
/**
|
|
689
|
+
* Update agent profile
|
|
690
|
+
* @summary Update agent profile
|
|
691
|
+
* @param {ConversationAgentProfile} profileRequest Profile request
|
|
692
|
+
* @param {*} [options] Override http request option.
|
|
693
|
+
* @throws {RequiredError}
|
|
694
|
+
* @memberof ConversationApiInterface
|
|
695
|
+
*/
|
|
696
|
+
updateAgentProfileRaw(requestParameters: UpdateAgentProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationAgentProfileResponse>>;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Update agent profile
|
|
700
|
+
* Update agent profile
|
|
701
|
+
*/
|
|
702
|
+
updateAgentProfile(requestParameters: UpdateAgentProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAgentProfileResponse>;
|
|
703
|
+
|
|
663
704
|
/**
|
|
664
705
|
* Update a canned message
|
|
665
706
|
* @summary Update a canned message
|
|
@@ -891,6 +932,43 @@ export class ConversationApi extends runtime.BaseAPI implements ConversationApiI
|
|
|
891
932
|
await this.getAgentKeepAliveRaw(initOverrides);
|
|
892
933
|
}
|
|
893
934
|
|
|
935
|
+
/**
|
|
936
|
+
* Retrieve the agents profile
|
|
937
|
+
* Get agent profile
|
|
938
|
+
*/
|
|
939
|
+
async getAgentProfileRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationAgentProfileResponse>> {
|
|
940
|
+
const queryParameters: any = {};
|
|
941
|
+
|
|
942
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
943
|
+
|
|
944
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
945
|
+
// oauth required
|
|
946
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["conversation_read"]);
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
950
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
const response = await this.request({
|
|
954
|
+
path: `/conversation/agent/profile`,
|
|
955
|
+
method: 'GET',
|
|
956
|
+
headers: headerParameters,
|
|
957
|
+
query: queryParameters,
|
|
958
|
+
}, initOverrides);
|
|
959
|
+
|
|
960
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ConversationAgentProfileResponseFromJSON(jsonValue));
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* Retrieve the agents profile
|
|
965
|
+
* Get agent profile
|
|
966
|
+
*/
|
|
967
|
+
async getAgentProfile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAgentProfileResponse> {
|
|
968
|
+
const response = await this.getAgentProfileRaw(initOverrides);
|
|
969
|
+
return await response.value();
|
|
970
|
+
}
|
|
971
|
+
|
|
894
972
|
/**
|
|
895
973
|
* Retrieve a JWT to authorize an agent to make a websocket connection.
|
|
896
974
|
* Get agent websocket authorization
|
|
@@ -1888,6 +1966,50 @@ export class ConversationApi extends runtime.BaseAPI implements ConversationApiI
|
|
|
1888
1966
|
return await response.value();
|
|
1889
1967
|
}
|
|
1890
1968
|
|
|
1969
|
+
/**
|
|
1970
|
+
* Update agent profile
|
|
1971
|
+
* Update agent profile
|
|
1972
|
+
*/
|
|
1973
|
+
async updateAgentProfileRaw(requestParameters: UpdateAgentProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationAgentProfileResponse>> {
|
|
1974
|
+
if (requestParameters.profileRequest === null || requestParameters.profileRequest === undefined) {
|
|
1975
|
+
throw new runtime.RequiredError('profileRequest','Required parameter requestParameters.profileRequest was null or undefined when calling updateAgentProfile.');
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
const queryParameters: any = {};
|
|
1979
|
+
|
|
1980
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1981
|
+
|
|
1982
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1983
|
+
|
|
1984
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1985
|
+
// oauth required
|
|
1986
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["conversation_write"]);
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1990
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
const response = await this.request({
|
|
1994
|
+
path: `/conversation/agent/profile`,
|
|
1995
|
+
method: 'PUT',
|
|
1996
|
+
headers: headerParameters,
|
|
1997
|
+
query: queryParameters,
|
|
1998
|
+
body: ConversationAgentProfileToJSON(requestParameters.profileRequest),
|
|
1999
|
+
}, initOverrides);
|
|
2000
|
+
|
|
2001
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ConversationAgentProfileResponseFromJSON(jsonValue));
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
/**
|
|
2005
|
+
* Update agent profile
|
|
2006
|
+
* Update agent profile
|
|
2007
|
+
*/
|
|
2008
|
+
async updateAgentProfile(requestParameters: UpdateAgentProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationAgentProfileResponse> {
|
|
2009
|
+
const response = await this.updateAgentProfileRaw(requestParameters, initOverrides);
|
|
2010
|
+
return await response.value();
|
|
2011
|
+
}
|
|
2012
|
+
|
|
1891
2013
|
/**
|
|
1892
2014
|
* Update a canned message
|
|
1893
2015
|
* Update a canned message
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* UltraCart Rest API V2
|
|
5
|
+
* UltraCart REST API Version 2
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
* Contact: support@ultracart.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ConversationAgentProfile
|
|
20
|
+
*/
|
|
21
|
+
export interface ConversationAgentProfile {
|
|
22
|
+
/**
|
|
23
|
+
* The number of engagement chats that can be pushed on them at any given time.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ConversationAgentProfile
|
|
26
|
+
*/
|
|
27
|
+
chat_limit?: number;
|
|
28
|
+
/**
|
|
29
|
+
* The default language the agent is chatting in
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ConversationAgentProfile
|
|
32
|
+
*/
|
|
33
|
+
default_language_iso_code?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Default status when the agent loads conversations app.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ConversationAgentProfile
|
|
38
|
+
*/
|
|
39
|
+
default_status?: ConversationAgentProfileDefaultStatusEnum;
|
|
40
|
+
/**
|
|
41
|
+
* An alternate name that the agent wants to use in chat.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ConversationAgentProfile
|
|
44
|
+
*/
|
|
45
|
+
display_name?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Their actual user name for profile settings display as placeholder test
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof ConversationAgentProfile
|
|
50
|
+
*/
|
|
51
|
+
name?: string;
|
|
52
|
+
/**
|
|
53
|
+
* An upload key used to update the profile image.
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof ConversationAgentProfile
|
|
56
|
+
*/
|
|
57
|
+
profile_image_upload_key?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Their current profile image URL
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof ConversationAgentProfile
|
|
62
|
+
*/
|
|
63
|
+
profile_image_url?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @export
|
|
69
|
+
*/
|
|
70
|
+
export const ConversationAgentProfileDefaultStatusEnum = {
|
|
71
|
+
Available: 'available',
|
|
72
|
+
Busy: 'busy',
|
|
73
|
+
Unavailable: 'unavailable'
|
|
74
|
+
} as const;
|
|
75
|
+
export type ConversationAgentProfileDefaultStatusEnum = typeof ConversationAgentProfileDefaultStatusEnum[keyof typeof ConversationAgentProfileDefaultStatusEnum];
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
export function ConversationAgentProfileFromJSON(json: any): ConversationAgentProfile {
|
|
79
|
+
return ConversationAgentProfileFromJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function ConversationAgentProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationAgentProfile {
|
|
83
|
+
if ((json === undefined) || (json === null)) {
|
|
84
|
+
return json;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'chat_limit': !exists(json, 'chat_limit') ? undefined : json['chat_limit'],
|
|
89
|
+
'default_language_iso_code': !exists(json, 'default_language_iso_code') ? undefined : json['default_language_iso_code'],
|
|
90
|
+
'default_status': !exists(json, 'default_status') ? undefined : json['default_status'],
|
|
91
|
+
'display_name': !exists(json, 'display_name') ? undefined : json['display_name'],
|
|
92
|
+
'name': !exists(json, 'name') ? undefined : json['name'],
|
|
93
|
+
'profile_image_upload_key': !exists(json, 'profile_image_upload_key') ? undefined : json['profile_image_upload_key'],
|
|
94
|
+
'profile_image_url': !exists(json, 'profile_image_url') ? undefined : json['profile_image_url'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function ConversationAgentProfileToJSON(value?: ConversationAgentProfile | null): any {
|
|
99
|
+
if (value === undefined) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
if (value === null) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
|
|
107
|
+
'chat_limit': value.chat_limit,
|
|
108
|
+
'default_language_iso_code': value.default_language_iso_code,
|
|
109
|
+
'default_status': value.default_status,
|
|
110
|
+
'display_name': value.display_name,
|
|
111
|
+
'name': value.name,
|
|
112
|
+
'profile_image_upload_key': value.profile_image_upload_key,
|
|
113
|
+
'profile_image_url': value.profile_image_url,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* UltraCart Rest API V2
|
|
5
|
+
* UltraCart REST API Version 2
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
* Contact: support@ultracart.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
ConversationAgentProfile,
|
|
18
|
+
ConversationAgentProfileFromJSON,
|
|
19
|
+
ConversationAgentProfileFromJSONTyped,
|
|
20
|
+
ConversationAgentProfileToJSON,
|
|
21
|
+
} from './ConversationAgentProfile';
|
|
22
|
+
import {
|
|
23
|
+
ModelError,
|
|
24
|
+
ModelErrorFromJSON,
|
|
25
|
+
ModelErrorFromJSONTyped,
|
|
26
|
+
ModelErrorToJSON,
|
|
27
|
+
} from './ModelError';
|
|
28
|
+
import {
|
|
29
|
+
ResponseMetadata,
|
|
30
|
+
ResponseMetadataFromJSON,
|
|
31
|
+
ResponseMetadataFromJSONTyped,
|
|
32
|
+
ResponseMetadataToJSON,
|
|
33
|
+
} from './ResponseMetadata';
|
|
34
|
+
import {
|
|
35
|
+
Warning,
|
|
36
|
+
WarningFromJSON,
|
|
37
|
+
WarningFromJSONTyped,
|
|
38
|
+
WarningToJSON,
|
|
39
|
+
} from './Warning';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @export
|
|
44
|
+
* @interface ConversationAgentProfileResponse
|
|
45
|
+
*/
|
|
46
|
+
export interface ConversationAgentProfileResponse {
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {ConversationAgentProfile}
|
|
50
|
+
* @memberof ConversationAgentProfileResponse
|
|
51
|
+
*/
|
|
52
|
+
agent_profile?: ConversationAgentProfile;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {ModelError}
|
|
56
|
+
* @memberof ConversationAgentProfileResponse
|
|
57
|
+
*/
|
|
58
|
+
error?: ModelError;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {ResponseMetadata}
|
|
62
|
+
* @memberof ConversationAgentProfileResponse
|
|
63
|
+
*/
|
|
64
|
+
metadata?: ResponseMetadata;
|
|
65
|
+
/**
|
|
66
|
+
* Indicates if API call was successful
|
|
67
|
+
* @type {boolean}
|
|
68
|
+
* @memberof ConversationAgentProfileResponse
|
|
69
|
+
*/
|
|
70
|
+
success?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {Warning}
|
|
74
|
+
* @memberof ConversationAgentProfileResponse
|
|
75
|
+
*/
|
|
76
|
+
warning?: Warning;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function ConversationAgentProfileResponseFromJSON(json: any): ConversationAgentProfileResponse {
|
|
80
|
+
return ConversationAgentProfileResponseFromJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function ConversationAgentProfileResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationAgentProfileResponse {
|
|
84
|
+
if ((json === undefined) || (json === null)) {
|
|
85
|
+
return json;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'agent_profile': !exists(json, 'agent_profile') ? undefined : ConversationAgentProfileFromJSON(json['agent_profile']),
|
|
90
|
+
'error': !exists(json, 'error') ? undefined : ModelErrorFromJSON(json['error']),
|
|
91
|
+
'metadata': !exists(json, 'metadata') ? undefined : ResponseMetadataFromJSON(json['metadata']),
|
|
92
|
+
'success': !exists(json, 'success') ? undefined : json['success'],
|
|
93
|
+
'warning': !exists(json, 'warning') ? undefined : WarningFromJSON(json['warning']),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function ConversationAgentProfileResponseToJSON(value?: ConversationAgentProfileResponse | null): any {
|
|
98
|
+
if (value === undefined) {
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
if (value === null) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
|
|
106
|
+
'agent_profile': ConversationAgentProfileToJSON(value.agent_profile),
|
|
107
|
+
'error': ModelErrorToJSON(value.error),
|
|
108
|
+
'metadata': ResponseMetadataToJSON(value.metadata),
|
|
109
|
+
'success': value.success,
|
|
110
|
+
'warning': WarningToJSON(value.warning),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
@@ -92,6 +92,12 @@ import {
|
|
|
92
92
|
* @interface ConversationWebsocketMessage
|
|
93
93
|
*/
|
|
94
94
|
export interface ConversationWebsocketMessage {
|
|
95
|
+
/**
|
|
96
|
+
* Conversation ARN
|
|
97
|
+
* @type {string}
|
|
98
|
+
* @memberof ConversationWebsocketMessage
|
|
99
|
+
*/
|
|
100
|
+
conversation_arn?: string;
|
|
95
101
|
/**
|
|
96
102
|
* Conversation UUID if the websocket message is tied to a specific conversation
|
|
97
103
|
* @type {string}
|
|
@@ -273,6 +279,7 @@ export function ConversationWebsocketMessageFromJSONTyped(json: any, ignoreDiscr
|
|
|
273
279
|
}
|
|
274
280
|
return {
|
|
275
281
|
|
|
282
|
+
'conversation_arn': !exists(json, 'conversation_arn') ? undefined : json['conversation_arn'],
|
|
276
283
|
'conversation_uuid': !exists(json, 'conversation_uuid') ? undefined : json['conversation_uuid'],
|
|
277
284
|
'event_add_coupon': !exists(json, 'event_add_coupon') ? undefined : ConversationEventAddCouponFromJSON(json['event_add_coupon']),
|
|
278
285
|
'event_add_item': !exists(json, 'event_add_item') ? undefined : ConversationEventAddItemFromJSON(json['event_add_item']),
|
|
@@ -307,6 +314,7 @@ export function ConversationWebsocketMessageToJSON(value?: ConversationWebsocket
|
|
|
307
314
|
}
|
|
308
315
|
return {
|
|
309
316
|
|
|
317
|
+
'conversation_arn': value.conversation_arn,
|
|
310
318
|
'conversation_uuid': value.conversation_uuid,
|
|
311
319
|
'event_add_coupon': ConversationEventAddCouponToJSON(value.event_add_coupon),
|
|
312
320
|
'event_add_item': ConversationEventAddItemToJSON(value.event_add_item),
|
package/src/models/index.ts
CHANGED
|
@@ -126,6 +126,8 @@ export * from './CityStateZip';
|
|
|
126
126
|
export * from './Conversation';
|
|
127
127
|
export * from './ConversationAgentAuth';
|
|
128
128
|
export * from './ConversationAgentAuthResponse';
|
|
129
|
+
export * from './ConversationAgentProfile';
|
|
130
|
+
export * from './ConversationAgentProfileResponse';
|
|
129
131
|
export * from './ConversationAutocompleteRequest';
|
|
130
132
|
export * from './ConversationAutocompleteResponse';
|
|
131
133
|
export * from './ConversationAutocompleteValue';
|