ultracart_rest_api_v2_typescript 4.0.93-RC → 4.0.95-RC
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 +4 -0
- package/README.md +4 -2
- package/dist/apis/ConversationApi.d.ts +107 -1
- package/dist/apis/ConversationApi.js +242 -0
- package/dist/models/ConversationCannedMessage.d.ts +45 -0
- package/dist/models/ConversationCannedMessage.js +48 -0
- package/dist/models/ConversationCannedMessageResponse.d.ts +55 -0
- package/dist/models/ConversationCannedMessageResponse.js +54 -0
- package/dist/models/ConversationCannedMessagesResponse.d.ts +55 -0
- package/dist/models/ConversationCannedMessagesResponse.js +54 -0
- package/dist/models/ConversationCannedMessagesSearch.d.ts +33 -0
- package/dist/models/ConversationCannedMessagesSearch.js +44 -0
- package/dist/models/EmailSegment.d.ts +6 -0
- package/dist/models/EmailSegment.js +2 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/package.json +1 -1
- package/src/apis/ConversationApi.ts +262 -0
- package/src/models/ConversationCannedMessage.ts +80 -0
- package/src/models/ConversationCannedMessageResponse.ts +113 -0
- package/src/models/ConversationCannedMessagesResponse.ts +113 -0
- package/src/models/ConversationCannedMessagesSearch.ts +64 -0
- package/src/models/EmailSegment.ts +8 -0
- package/src/models/index.ts +4 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -144,6 +144,10 @@ src/models/CityStateZip.ts
|
|
|
144
144
|
src/models/Conversation.ts
|
|
145
145
|
src/models/ConversationAgentAuth.ts
|
|
146
146
|
src/models/ConversationAgentAuthResponse.ts
|
|
147
|
+
src/models/ConversationCannedMessage.ts
|
|
148
|
+
src/models/ConversationCannedMessageResponse.ts
|
|
149
|
+
src/models/ConversationCannedMessagesResponse.ts
|
|
150
|
+
src/models/ConversationCannedMessagesSearch.ts
|
|
147
151
|
src/models/ConversationEventAddCoupon.ts
|
|
148
152
|
src/models/ConversationEventAddItem.ts
|
|
149
153
|
src/models/ConversationEventQueuePosition.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.95-RC
|
|
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.95-RC --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.95-RC | 12/08/2022 | conversation canned messages |
|
|
58
|
+
| 4.0.94-RC | 12/08/2022 | communications - expose the rebuild percentage |
|
|
57
59
|
| 4.0.93-RC | 12/06/2022 | convo - add session_start_dts to webchat context, cart - add customer_profile.signup_dts |
|
|
58
60
|
| 4.0.92-RC | 12/06/2022 | customer api - expose edi information and editor values |
|
|
59
61
|
| 4.0.91-RC | 12/02/2022 | conversations - customer last unresponded dts |
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { ConversationAgentAuthResponse, ConversationMessagesResponse, ConversationMultimediaUploadUrlResponse, ConversationResponse, ConversationStartRequest, ConversationStartResponse, ConversationWebchatContext, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse } from '../models';
|
|
13
|
+
import { ConversationAgentAuthResponse, ConversationCannedMessage, ConversationCannedMessageResponse, ConversationCannedMessagesResponse, ConversationCannedMessagesSearch, ConversationMessagesResponse, ConversationMultimediaUploadUrlResponse, ConversationResponse, ConversationStartRequest, ConversationStartResponse, ConversationWebchatContext, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse } from '../models';
|
|
14
14
|
export interface GetConversationRequest {
|
|
15
15
|
conversationUuid: string;
|
|
16
16
|
limit?: number;
|
|
@@ -32,6 +32,9 @@ export interface GetConversationsRequest {
|
|
|
32
32
|
limit?: number;
|
|
33
33
|
offset?: number;
|
|
34
34
|
}
|
|
35
|
+
export interface InsertConversationCannedMessageRequest {
|
|
36
|
+
cannedMessage: ConversationCannedMessage;
|
|
37
|
+
}
|
|
35
38
|
export interface JoinConversationRequest {
|
|
36
39
|
conversationUuid: string;
|
|
37
40
|
}
|
|
@@ -41,9 +44,16 @@ export interface LeaveConversationRequest {
|
|
|
41
44
|
export interface MarkReadConversationRequest {
|
|
42
45
|
conversationUuid: string;
|
|
43
46
|
}
|
|
47
|
+
export interface SearchConversationCannedMessagesRequest {
|
|
48
|
+
searchRequest: ConversationCannedMessagesSearch;
|
|
49
|
+
}
|
|
44
50
|
export interface StartConversationRequest {
|
|
45
51
|
startRequest: ConversationStartRequest;
|
|
46
52
|
}
|
|
53
|
+
export interface UpdateConversationCannedMessageRequest {
|
|
54
|
+
conversationCannedMessageOid: number;
|
|
55
|
+
cannedMessage: ConversationCannedMessage;
|
|
56
|
+
}
|
|
47
57
|
export interface UpdateConversationWebchatQueueStatusRequest {
|
|
48
58
|
queueName: string;
|
|
49
59
|
statusRequest: ConversationWebchatQueueStatusUpdateRequest;
|
|
@@ -96,6 +106,19 @@ export interface ConversationApiInterface {
|
|
|
96
106
|
* Retrieve a conversation
|
|
97
107
|
*/
|
|
98
108
|
getConversation(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationResponse>;
|
|
109
|
+
/**
|
|
110
|
+
* Retrieve a list of canned messages ordered by short_code
|
|
111
|
+
* @summary Retrieve a list of canned messages ordered by short_code
|
|
112
|
+
* @param {*} [options] Override http request option.
|
|
113
|
+
* @throws {RequiredError}
|
|
114
|
+
* @memberof ConversationApiInterface
|
|
115
|
+
*/
|
|
116
|
+
getConversationCannedMessagesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationCannedMessagesResponse>>;
|
|
117
|
+
/**
|
|
118
|
+
* Retrieve a list of canned messages ordered by short_code
|
|
119
|
+
* Retrieve a list of canned messages ordered by short_code
|
|
120
|
+
*/
|
|
121
|
+
getConversationCannedMessages(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationCannedMessagesResponse>;
|
|
99
122
|
/**
|
|
100
123
|
* Get a webchat conversation context
|
|
101
124
|
* @summary Get a webchat conversation context
|
|
@@ -170,6 +193,20 @@ export interface ConversationApiInterface {
|
|
|
170
193
|
* Retrieve a list of conversation summaries newest to oldest
|
|
171
194
|
*/
|
|
172
195
|
getConversations(requestParameters: GetConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationsResponse>;
|
|
196
|
+
/**
|
|
197
|
+
* Insert a canned message
|
|
198
|
+
* @summary Insert a canned message
|
|
199
|
+
* @param {ConversationCannedMessage} cannedMessage Canned message
|
|
200
|
+
* @param {*} [options] Override http request option.
|
|
201
|
+
* @throws {RequiredError}
|
|
202
|
+
* @memberof ConversationApiInterface
|
|
203
|
+
*/
|
|
204
|
+
insertConversationCannedMessageRaw(requestParameters: InsertConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationCannedMessageResponse>>;
|
|
205
|
+
/**
|
|
206
|
+
* Insert a canned message
|
|
207
|
+
* Insert a canned message
|
|
208
|
+
*/
|
|
209
|
+
insertConversationCannedMessage(requestParameters: InsertConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationCannedMessageResponse>;
|
|
173
210
|
/**
|
|
174
211
|
* Join a conversation
|
|
175
212
|
* @summary Join a conversation
|
|
@@ -212,6 +249,20 @@ export interface ConversationApiInterface {
|
|
|
212
249
|
* Mark a conversation as read
|
|
213
250
|
*/
|
|
214
251
|
markReadConversation(requestParameters: MarkReadConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
252
|
+
/**
|
|
253
|
+
* Search for canned messages by short_code
|
|
254
|
+
* @summary Search for canned messages by short_code
|
|
255
|
+
* @param {ConversationCannedMessagesSearch} searchRequest Search request
|
|
256
|
+
* @param {*} [options] Override http request option.
|
|
257
|
+
* @throws {RequiredError}
|
|
258
|
+
* @memberof ConversationApiInterface
|
|
259
|
+
*/
|
|
260
|
+
searchConversationCannedMessagesRaw(requestParameters: SearchConversationCannedMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationCannedMessagesResponse>>;
|
|
261
|
+
/**
|
|
262
|
+
* Search for canned messages by short_code
|
|
263
|
+
* Search for canned messages by short_code
|
|
264
|
+
*/
|
|
265
|
+
searchConversationCannedMessages(requestParameters: SearchConversationCannedMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationCannedMessagesResponse>;
|
|
215
266
|
/**
|
|
216
267
|
* Start a new conversation
|
|
217
268
|
* @summary Start a conversation
|
|
@@ -226,6 +277,21 @@ export interface ConversationApiInterface {
|
|
|
226
277
|
* Start a conversation
|
|
227
278
|
*/
|
|
228
279
|
startConversation(requestParameters: StartConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationStartResponse>;
|
|
280
|
+
/**
|
|
281
|
+
* Update a canned message
|
|
282
|
+
* @summary Update a canned message
|
|
283
|
+
* @param {number} conversationCannedMessageOid
|
|
284
|
+
* @param {ConversationCannedMessage} cannedMessage Canned message
|
|
285
|
+
* @param {*} [options] Override http request option.
|
|
286
|
+
* @throws {RequiredError}
|
|
287
|
+
* @memberof ConversationApiInterface
|
|
288
|
+
*/
|
|
289
|
+
updateConversationCannedMessageRaw(requestParameters: UpdateConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationCannedMessageResponse>>;
|
|
290
|
+
/**
|
|
291
|
+
* Update a canned message
|
|
292
|
+
* Update a canned message
|
|
293
|
+
*/
|
|
294
|
+
updateConversationCannedMessage(requestParameters: UpdateConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationCannedMessageResponse>;
|
|
229
295
|
/**
|
|
230
296
|
* Update status within the queue
|
|
231
297
|
* @summary Update status within the queue
|
|
@@ -276,6 +342,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
|
|
|
276
342
|
* Retrieve a conversation
|
|
277
343
|
*/
|
|
278
344
|
getConversation(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationResponse>;
|
|
345
|
+
/**
|
|
346
|
+
* Retrieve a list of canned messages ordered by short_code
|
|
347
|
+
* Retrieve a list of canned messages ordered by short_code
|
|
348
|
+
*/
|
|
349
|
+
getConversationCannedMessagesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationCannedMessagesResponse>>;
|
|
350
|
+
/**
|
|
351
|
+
* Retrieve a list of canned messages ordered by short_code
|
|
352
|
+
* Retrieve a list of canned messages ordered by short_code
|
|
353
|
+
*/
|
|
354
|
+
getConversationCannedMessages(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationCannedMessagesResponse>;
|
|
279
355
|
/**
|
|
280
356
|
* Get a webchat conversation context
|
|
281
357
|
* Get a webchat conversation context
|
|
@@ -326,6 +402,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
|
|
|
326
402
|
* Retrieve a list of conversation summaries newest to oldest
|
|
327
403
|
*/
|
|
328
404
|
getConversations(requestParameters?: GetConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationsResponse>;
|
|
405
|
+
/**
|
|
406
|
+
* Insert a canned message
|
|
407
|
+
* Insert a canned message
|
|
408
|
+
*/
|
|
409
|
+
insertConversationCannedMessageRaw(requestParameters: InsertConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationCannedMessageResponse>>;
|
|
410
|
+
/**
|
|
411
|
+
* Insert a canned message
|
|
412
|
+
* Insert a canned message
|
|
413
|
+
*/
|
|
414
|
+
insertConversationCannedMessage(requestParameters: InsertConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationCannedMessageResponse>;
|
|
329
415
|
/**
|
|
330
416
|
* Join a conversation
|
|
331
417
|
* Join a conversation
|
|
@@ -356,6 +442,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
|
|
|
356
442
|
* Mark a conversation as read
|
|
357
443
|
*/
|
|
358
444
|
markReadConversation(requestParameters: MarkReadConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
445
|
+
/**
|
|
446
|
+
* Search for canned messages by short_code
|
|
447
|
+
* Search for canned messages by short_code
|
|
448
|
+
*/
|
|
449
|
+
searchConversationCannedMessagesRaw(requestParameters: SearchConversationCannedMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationCannedMessagesResponse>>;
|
|
450
|
+
/**
|
|
451
|
+
* Search for canned messages by short_code
|
|
452
|
+
* Search for canned messages by short_code
|
|
453
|
+
*/
|
|
454
|
+
searchConversationCannedMessages(requestParameters: SearchConversationCannedMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationCannedMessagesResponse>;
|
|
359
455
|
/**
|
|
360
456
|
* Start a new conversation
|
|
361
457
|
* Start a conversation
|
|
@@ -366,6 +462,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
|
|
|
366
462
|
* Start a conversation
|
|
367
463
|
*/
|
|
368
464
|
startConversation(requestParameters: StartConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationStartResponse>;
|
|
465
|
+
/**
|
|
466
|
+
* Update a canned message
|
|
467
|
+
* Update a canned message
|
|
468
|
+
*/
|
|
469
|
+
updateConversationCannedMessageRaw(requestParameters: UpdateConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationCannedMessageResponse>>;
|
|
470
|
+
/**
|
|
471
|
+
* Update a canned message
|
|
472
|
+
* Update a canned message
|
|
473
|
+
*/
|
|
474
|
+
updateConversationCannedMessage(requestParameters: UpdateConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationCannedMessageResponse>;
|
|
369
475
|
/**
|
|
370
476
|
* Update status within the queue
|
|
371
477
|
* Update status within the queue
|
|
@@ -247,6 +247,62 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
247
247
|
});
|
|
248
248
|
});
|
|
249
249
|
};
|
|
250
|
+
/**
|
|
251
|
+
* Retrieve a list of canned messages ordered by short_code
|
|
252
|
+
* Retrieve a list of canned messages ordered by short_code
|
|
253
|
+
*/
|
|
254
|
+
ConversationApi.prototype.getConversationCannedMessagesRaw = function (initOverrides) {
|
|
255
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
256
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
257
|
+
return __generator(this, function (_c) {
|
|
258
|
+
switch (_c.label) {
|
|
259
|
+
case 0:
|
|
260
|
+
queryParameters = {};
|
|
261
|
+
headerParameters = {};
|
|
262
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
263
|
+
// oauth required
|
|
264
|
+
_a = headerParameters;
|
|
265
|
+
_b = "Authorization";
|
|
266
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_read"])];
|
|
267
|
+
case 1:
|
|
268
|
+
// oauth required
|
|
269
|
+
_a[_b] = _c.sent();
|
|
270
|
+
_c.label = 2;
|
|
271
|
+
case 2:
|
|
272
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
273
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
274
|
+
}
|
|
275
|
+
return [4 /*yield*/, this.request({
|
|
276
|
+
path: "/conversation/canned_messages",
|
|
277
|
+
method: 'GET',
|
|
278
|
+
headers: headerParameters,
|
|
279
|
+
query: queryParameters,
|
|
280
|
+
}, initOverrides)];
|
|
281
|
+
case 3:
|
|
282
|
+
response = _c.sent();
|
|
283
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationCannedMessagesResponseFromJSON)(jsonValue); })];
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Retrieve a list of canned messages ordered by short_code
|
|
290
|
+
* Retrieve a list of canned messages ordered by short_code
|
|
291
|
+
*/
|
|
292
|
+
ConversationApi.prototype.getConversationCannedMessages = function (initOverrides) {
|
|
293
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
294
|
+
var response;
|
|
295
|
+
return __generator(this, function (_a) {
|
|
296
|
+
switch (_a.label) {
|
|
297
|
+
case 0: return [4 /*yield*/, this.getConversationCannedMessagesRaw(initOverrides)];
|
|
298
|
+
case 1:
|
|
299
|
+
response = _a.sent();
|
|
300
|
+
return [4 /*yield*/, response.value()];
|
|
301
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
};
|
|
250
306
|
/**
|
|
251
307
|
* Get a webchat conversation context
|
|
252
308
|
* Get a webchat conversation context
|
|
@@ -555,6 +611,67 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
555
611
|
});
|
|
556
612
|
});
|
|
557
613
|
};
|
|
614
|
+
/**
|
|
615
|
+
* Insert a canned message
|
|
616
|
+
* Insert a canned message
|
|
617
|
+
*/
|
|
618
|
+
ConversationApi.prototype.insertConversationCannedMessageRaw = function (requestParameters, initOverrides) {
|
|
619
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
620
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
621
|
+
return __generator(this, function (_c) {
|
|
622
|
+
switch (_c.label) {
|
|
623
|
+
case 0:
|
|
624
|
+
if (requestParameters.cannedMessage === null || requestParameters.cannedMessage === undefined) {
|
|
625
|
+
throw new runtime.RequiredError('cannedMessage', 'Required parameter requestParameters.cannedMessage was null or undefined when calling insertConversationCannedMessage.');
|
|
626
|
+
}
|
|
627
|
+
queryParameters = {};
|
|
628
|
+
headerParameters = {};
|
|
629
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
630
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
631
|
+
// oauth required
|
|
632
|
+
_a = headerParameters;
|
|
633
|
+
_b = "Authorization";
|
|
634
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_read"])];
|
|
635
|
+
case 1:
|
|
636
|
+
// oauth required
|
|
637
|
+
_a[_b] = _c.sent();
|
|
638
|
+
_c.label = 2;
|
|
639
|
+
case 2:
|
|
640
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
641
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
642
|
+
}
|
|
643
|
+
return [4 /*yield*/, this.request({
|
|
644
|
+
path: "/conversation/canned_messages",
|
|
645
|
+
method: 'POST',
|
|
646
|
+
headers: headerParameters,
|
|
647
|
+
query: queryParameters,
|
|
648
|
+
body: (0, models_1.ConversationCannedMessageToJSON)(requestParameters.cannedMessage),
|
|
649
|
+
}, initOverrides)];
|
|
650
|
+
case 3:
|
|
651
|
+
response = _c.sent();
|
|
652
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationCannedMessageResponseFromJSON)(jsonValue); })];
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
});
|
|
656
|
+
};
|
|
657
|
+
/**
|
|
658
|
+
* Insert a canned message
|
|
659
|
+
* Insert a canned message
|
|
660
|
+
*/
|
|
661
|
+
ConversationApi.prototype.insertConversationCannedMessage = function (requestParameters, initOverrides) {
|
|
662
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
663
|
+
var response;
|
|
664
|
+
return __generator(this, function (_a) {
|
|
665
|
+
switch (_a.label) {
|
|
666
|
+
case 0: return [4 /*yield*/, this.insertConversationCannedMessageRaw(requestParameters, initOverrides)];
|
|
667
|
+
case 1:
|
|
668
|
+
response = _a.sent();
|
|
669
|
+
return [4 /*yield*/, response.value()];
|
|
670
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
});
|
|
674
|
+
};
|
|
558
675
|
/**
|
|
559
676
|
* Join a conversation
|
|
560
677
|
* Join a conversation
|
|
@@ -726,6 +843,67 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
726
843
|
});
|
|
727
844
|
});
|
|
728
845
|
};
|
|
846
|
+
/**
|
|
847
|
+
* Search for canned messages by short_code
|
|
848
|
+
* Search for canned messages by short_code
|
|
849
|
+
*/
|
|
850
|
+
ConversationApi.prototype.searchConversationCannedMessagesRaw = function (requestParameters, initOverrides) {
|
|
851
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
852
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
853
|
+
return __generator(this, function (_c) {
|
|
854
|
+
switch (_c.label) {
|
|
855
|
+
case 0:
|
|
856
|
+
if (requestParameters.searchRequest === null || requestParameters.searchRequest === undefined) {
|
|
857
|
+
throw new runtime.RequiredError('searchRequest', 'Required parameter requestParameters.searchRequest was null or undefined when calling searchConversationCannedMessages.');
|
|
858
|
+
}
|
|
859
|
+
queryParameters = {};
|
|
860
|
+
headerParameters = {};
|
|
861
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
862
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
863
|
+
// oauth required
|
|
864
|
+
_a = headerParameters;
|
|
865
|
+
_b = "Authorization";
|
|
866
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_read"])];
|
|
867
|
+
case 1:
|
|
868
|
+
// oauth required
|
|
869
|
+
_a[_b] = _c.sent();
|
|
870
|
+
_c.label = 2;
|
|
871
|
+
case 2:
|
|
872
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
873
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
874
|
+
}
|
|
875
|
+
return [4 /*yield*/, this.request({
|
|
876
|
+
path: "/conversation/canned_messages/search",
|
|
877
|
+
method: 'POST',
|
|
878
|
+
headers: headerParameters,
|
|
879
|
+
query: queryParameters,
|
|
880
|
+
body: (0, models_1.ConversationCannedMessagesSearchToJSON)(requestParameters.searchRequest),
|
|
881
|
+
}, initOverrides)];
|
|
882
|
+
case 3:
|
|
883
|
+
response = _c.sent();
|
|
884
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationCannedMessagesResponseFromJSON)(jsonValue); })];
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
});
|
|
888
|
+
};
|
|
889
|
+
/**
|
|
890
|
+
* Search for canned messages by short_code
|
|
891
|
+
* Search for canned messages by short_code
|
|
892
|
+
*/
|
|
893
|
+
ConversationApi.prototype.searchConversationCannedMessages = function (requestParameters, initOverrides) {
|
|
894
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
895
|
+
var response;
|
|
896
|
+
return __generator(this, function (_a) {
|
|
897
|
+
switch (_a.label) {
|
|
898
|
+
case 0: return [4 /*yield*/, this.searchConversationCannedMessagesRaw(requestParameters, initOverrides)];
|
|
899
|
+
case 1:
|
|
900
|
+
response = _a.sent();
|
|
901
|
+
return [4 /*yield*/, response.value()];
|
|
902
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
});
|
|
906
|
+
};
|
|
729
907
|
/**
|
|
730
908
|
* Start a new conversation
|
|
731
909
|
* Start a conversation
|
|
@@ -787,6 +965,70 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
787
965
|
});
|
|
788
966
|
});
|
|
789
967
|
};
|
|
968
|
+
/**
|
|
969
|
+
* Update a canned message
|
|
970
|
+
* Update a canned message
|
|
971
|
+
*/
|
|
972
|
+
ConversationApi.prototype.updateConversationCannedMessageRaw = function (requestParameters, initOverrides) {
|
|
973
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
974
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
975
|
+
return __generator(this, function (_c) {
|
|
976
|
+
switch (_c.label) {
|
|
977
|
+
case 0:
|
|
978
|
+
if (requestParameters.conversationCannedMessageOid === null || requestParameters.conversationCannedMessageOid === undefined) {
|
|
979
|
+
throw new runtime.RequiredError('conversationCannedMessageOid', 'Required parameter requestParameters.conversationCannedMessageOid was null or undefined when calling updateConversationCannedMessage.');
|
|
980
|
+
}
|
|
981
|
+
if (requestParameters.cannedMessage === null || requestParameters.cannedMessage === undefined) {
|
|
982
|
+
throw new runtime.RequiredError('cannedMessage', 'Required parameter requestParameters.cannedMessage was null or undefined when calling updateConversationCannedMessage.');
|
|
983
|
+
}
|
|
984
|
+
queryParameters = {};
|
|
985
|
+
headerParameters = {};
|
|
986
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
987
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
988
|
+
// oauth required
|
|
989
|
+
_a = headerParameters;
|
|
990
|
+
_b = "Authorization";
|
|
991
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_read"])];
|
|
992
|
+
case 1:
|
|
993
|
+
// oauth required
|
|
994
|
+
_a[_b] = _c.sent();
|
|
995
|
+
_c.label = 2;
|
|
996
|
+
case 2:
|
|
997
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
998
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
999
|
+
}
|
|
1000
|
+
return [4 /*yield*/, this.request({
|
|
1001
|
+
path: "/conversation/canned_messages/{conversation_canned_message_oid}".replace("{".concat("conversation_canned_message_oid", "}"), encodeURIComponent(String(requestParameters.conversationCannedMessageOid))),
|
|
1002
|
+
method: 'PUT',
|
|
1003
|
+
headers: headerParameters,
|
|
1004
|
+
query: queryParameters,
|
|
1005
|
+
body: (0, models_1.ConversationCannedMessageToJSON)(requestParameters.cannedMessage),
|
|
1006
|
+
}, initOverrides)];
|
|
1007
|
+
case 3:
|
|
1008
|
+
response = _c.sent();
|
|
1009
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationCannedMessageResponseFromJSON)(jsonValue); })];
|
|
1010
|
+
}
|
|
1011
|
+
});
|
|
1012
|
+
});
|
|
1013
|
+
};
|
|
1014
|
+
/**
|
|
1015
|
+
* Update a canned message
|
|
1016
|
+
* Update a canned message
|
|
1017
|
+
*/
|
|
1018
|
+
ConversationApi.prototype.updateConversationCannedMessage = function (requestParameters, initOverrides) {
|
|
1019
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1020
|
+
var response;
|
|
1021
|
+
return __generator(this, function (_a) {
|
|
1022
|
+
switch (_a.label) {
|
|
1023
|
+
case 0: return [4 /*yield*/, this.updateConversationCannedMessageRaw(requestParameters, initOverrides)];
|
|
1024
|
+
case 1:
|
|
1025
|
+
response = _a.sent();
|
|
1026
|
+
return [4 /*yield*/, response.value()];
|
|
1027
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1028
|
+
}
|
|
1029
|
+
});
|
|
1030
|
+
});
|
|
1031
|
+
};
|
|
790
1032
|
/**
|
|
791
1033
|
* Update status within the queue
|
|
792
1034
|
* Update status within the queue
|
|
@@ -0,0 +1,45 @@
|
|
|
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 ConversationCannedMessage
|
|
16
|
+
*/
|
|
17
|
+
export interface ConversationCannedMessage {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ConversationCannedMessage
|
|
22
|
+
*/
|
|
23
|
+
canned_message?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ConversationCannedMessage
|
|
28
|
+
*/
|
|
29
|
+
conversation_canned_message_oid?: number;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<string>}
|
|
33
|
+
* @memberof ConversationCannedMessage
|
|
34
|
+
*/
|
|
35
|
+
conversation_webchat_queue_uuids?: Array<string>;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ConversationCannedMessage
|
|
40
|
+
*/
|
|
41
|
+
short_code?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function ConversationCannedMessageFromJSON(json: any): ConversationCannedMessage;
|
|
44
|
+
export declare function ConversationCannedMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationCannedMessage;
|
|
45
|
+
export declare function ConversationCannedMessageToJSON(value?: ConversationCannedMessage | null): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
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.ConversationCannedMessageToJSON = exports.ConversationCannedMessageFromJSONTyped = exports.ConversationCannedMessageFromJSON = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
function ConversationCannedMessageFromJSON(json) {
|
|
19
|
+
return ConversationCannedMessageFromJSONTyped(json, false);
|
|
20
|
+
}
|
|
21
|
+
exports.ConversationCannedMessageFromJSON = ConversationCannedMessageFromJSON;
|
|
22
|
+
function ConversationCannedMessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
|
+
if ((json === undefined) || (json === null)) {
|
|
24
|
+
return json;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
'canned_message': !(0, runtime_1.exists)(json, 'canned_message') ? undefined : json['canned_message'],
|
|
28
|
+
'conversation_canned_message_oid': !(0, runtime_1.exists)(json, 'conversation_canned_message_oid') ? undefined : json['conversation_canned_message_oid'],
|
|
29
|
+
'conversation_webchat_queue_uuids': !(0, runtime_1.exists)(json, 'conversation_webchat_queue_uuids') ? undefined : json['conversation_webchat_queue_uuids'],
|
|
30
|
+
'short_code': !(0, runtime_1.exists)(json, 'short_code') ? undefined : json['short_code'],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
exports.ConversationCannedMessageFromJSONTyped = ConversationCannedMessageFromJSONTyped;
|
|
34
|
+
function ConversationCannedMessageToJSON(value) {
|
|
35
|
+
if (value === undefined) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
if (value === null) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'canned_message': value.canned_message,
|
|
43
|
+
'conversation_canned_message_oid': value.conversation_canned_message_oid,
|
|
44
|
+
'conversation_webchat_queue_uuids': value.conversation_webchat_queue_uuids,
|
|
45
|
+
'short_code': value.short_code,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
exports.ConversationCannedMessageToJSON = ConversationCannedMessageToJSON;
|
|
@@ -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 { ConversationCannedMessage } from './ConversationCannedMessage';
|
|
13
|
+
import { ModelError } from './ModelError';
|
|
14
|
+
import { ResponseMetadata } from './ResponseMetadata';
|
|
15
|
+
import { Warning } from './Warning';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ConversationCannedMessageResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface ConversationCannedMessageResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {ConversationCannedMessage}
|
|
25
|
+
* @memberof ConversationCannedMessageResponse
|
|
26
|
+
*/
|
|
27
|
+
conversation_canned_message?: ConversationCannedMessage;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {ModelError}
|
|
31
|
+
* @memberof ConversationCannedMessageResponse
|
|
32
|
+
*/
|
|
33
|
+
error?: ModelError;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {ResponseMetadata}
|
|
37
|
+
* @memberof ConversationCannedMessageResponse
|
|
38
|
+
*/
|
|
39
|
+
metadata?: ResponseMetadata;
|
|
40
|
+
/**
|
|
41
|
+
* Indicates if API call was successful
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof ConversationCannedMessageResponse
|
|
44
|
+
*/
|
|
45
|
+
success?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {Warning}
|
|
49
|
+
* @memberof ConversationCannedMessageResponse
|
|
50
|
+
*/
|
|
51
|
+
warning?: Warning;
|
|
52
|
+
}
|
|
53
|
+
export declare function ConversationCannedMessageResponseFromJSON(json: any): ConversationCannedMessageResponse;
|
|
54
|
+
export declare function ConversationCannedMessageResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationCannedMessageResponse;
|
|
55
|
+
export declare function ConversationCannedMessageResponseToJSON(value?: ConversationCannedMessageResponse | null): any;
|