ultracart_rest_api_v2_typescript 4.0.84-RC → 4.0.86-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 +6 -0
- package/README.md +4 -2
- package/dist/apis/ConversationApi.d.ts +28 -1
- package/dist/apis/ConversationApi.js +59 -0
- package/dist/models/ConversationEventAddCoupon.d.ts +12 -0
- package/dist/models/ConversationEventAddCoupon.js +4 -0
- package/dist/models/ConversationEventAddItem.d.ts +14 -1
- package/dist/models/ConversationEventAddItem.js +7 -2
- package/dist/models/ConversationEventWebchatContext.d.ts +39 -0
- package/dist/models/ConversationEventWebchatContext.js +46 -0
- package/dist/models/ConversationWebchatContext.d.ts +55 -0
- package/dist/models/ConversationWebchatContext.js +54 -0
- package/dist/models/ConversationWebsocketMessage.d.ts +8 -0
- package/dist/models/ConversationWebsocketMessage.js +5 -1
- package/dist/models/HitPageView.d.ts +88 -0
- package/dist/models/HitPageView.js +63 -0
- package/dist/models/HitPageViewMetaData.d.ts +33 -0
- package/dist/models/HitPageViewMetaData.js +44 -0
- package/dist/models/HitSessionStart.d.ts +123 -0
- package/dist/models/HitSessionStart.js +74 -0
- package/dist/models/HitSessionUtm.d.ts +111 -0
- package/dist/models/HitSessionUtm.js +70 -0
- package/dist/models/Weight.d.ts +1 -0
- package/dist/models/Weight.js +1 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/apis/ConversationApi.ts +64 -0
- package/src/models/ConversationEventAddCoupon.ts +16 -0
- package/src/models/ConversationEventAddItem.ts +26 -3
- package/src/models/ConversationEventWebchatContext.ts +72 -0
- package/src/models/ConversationWebchatContext.ts +113 -0
- package/src/models/ConversationWebsocketMessage.ts +16 -1
- package/src/models/HitPageView.ts +143 -0
- package/src/models/HitPageViewMetaData.ts +64 -0
- package/src/models/HitSessionStart.ts +184 -0
- package/src/models/HitSessionUtm.ts +168 -0
- package/src/models/Weight.ts +1 -0
- package/src/models/index.ts +6 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -149,6 +149,7 @@ src/models/ConversationEventQueuePosition.ts
|
|
|
149
149
|
src/models/ConversationEventRRWeb.ts
|
|
150
150
|
src/models/ConversationEventReadMessage.ts
|
|
151
151
|
src/models/ConversationEventTyping.ts
|
|
152
|
+
src/models/ConversationEventWebchatContext.ts
|
|
152
153
|
src/models/ConversationMessage.ts
|
|
153
154
|
src/models/ConversationMessageTransportStatus.ts
|
|
154
155
|
src/models/ConversationMessagesResponse.ts
|
|
@@ -160,6 +161,7 @@ src/models/ConversationStartRequest.ts
|
|
|
160
161
|
src/models/ConversationStartResponse.ts
|
|
161
162
|
src/models/ConversationSummary.ts
|
|
162
163
|
src/models/ConversationTwilioAccount.ts
|
|
164
|
+
src/models/ConversationWebchatContext.ts
|
|
163
165
|
src/models/ConversationWebchatQueueStatus.ts
|
|
164
166
|
src/models/ConversationWebchatQueueStatusAgent.ts
|
|
165
167
|
src/models/ConversationWebchatQueueStatusQueueEntry.ts
|
|
@@ -411,6 +413,10 @@ src/models/GroupResponse.ts
|
|
|
411
413
|
src/models/GroupUserMembership.ts
|
|
412
414
|
src/models/GroupsResponse.ts
|
|
413
415
|
src/models/HTTPHeader.ts
|
|
416
|
+
src/models/HitPageView.ts
|
|
417
|
+
src/models/HitPageViewMetaData.ts
|
|
418
|
+
src/models/HitSessionStart.ts
|
|
419
|
+
src/models/HitSessionUtm.ts
|
|
414
420
|
src/models/IntegrationLog.ts
|
|
415
421
|
src/models/IntegrationLogFile.ts
|
|
416
422
|
src/models/IntegrationLogLog.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.86-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.86-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.86-RC | 11/21/2022 | conversation context method |
|
|
58
|
+
| 4.0.85-RC | 11/21/2022 | adjusted conversation event model |
|
|
57
59
|
| 4.0.84-RC | 11/15/2022 | conversation methods bug fix |
|
|
58
60
|
| 4.0.83-RC | 11/15/2022 | conversations - enw events for add coupon and items |
|
|
59
61
|
| 4.0.82-RC | 11/15/2022 | order api new method is order refundable |
|
|
@@ -10,11 +10,14 @@
|
|
|
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, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse } from '../models';
|
|
13
|
+
import { ConversationAgentAuthResponse, ConversationMessagesResponse, ConversationMultimediaUploadUrlResponse, ConversationResponse, ConversationStartRequest, ConversationStartResponse, ConversationWebchatContext, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse } from '../models';
|
|
14
14
|
export interface GetConversationRequest {
|
|
15
15
|
conversationUuid: string;
|
|
16
16
|
limit?: number;
|
|
17
17
|
}
|
|
18
|
+
export interface GetConversationContextRequest {
|
|
19
|
+
conversationUuid: string;
|
|
20
|
+
}
|
|
18
21
|
export interface GetConversationMessagesRequest {
|
|
19
22
|
conversationUuid: string;
|
|
20
23
|
since: number;
|
|
@@ -90,6 +93,20 @@ export interface ConversationApiInterface {
|
|
|
90
93
|
* Retrieve a conversation
|
|
91
94
|
*/
|
|
92
95
|
getConversation(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationResponse>;
|
|
96
|
+
/**
|
|
97
|
+
* Get a webchat conversation context
|
|
98
|
+
* @summary Get a webchat conversation context
|
|
99
|
+
* @param {string} conversationUuid
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
* @memberof ConversationApiInterface
|
|
103
|
+
*/
|
|
104
|
+
getConversationContextRaw(requestParameters: GetConversationContextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationWebchatContext>>;
|
|
105
|
+
/**
|
|
106
|
+
* Get a webchat conversation context
|
|
107
|
+
* Get a webchat conversation context
|
|
108
|
+
*/
|
|
109
|
+
getConversationContext(requestParameters: GetConversationContextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationWebchatContext>;
|
|
93
110
|
/**
|
|
94
111
|
* Retrieve conversation messages since a particular time
|
|
95
112
|
* @summary Retrieve conversation messages
|
|
@@ -242,6 +259,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
|
|
|
242
259
|
* Retrieve a conversation
|
|
243
260
|
*/
|
|
244
261
|
getConversation(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationResponse>;
|
|
262
|
+
/**
|
|
263
|
+
* Get a webchat conversation context
|
|
264
|
+
* Get a webchat conversation context
|
|
265
|
+
*/
|
|
266
|
+
getConversationContextRaw(requestParameters: GetConversationContextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationWebchatContext>>;
|
|
267
|
+
/**
|
|
268
|
+
* Get a webchat conversation context
|
|
269
|
+
* Get a webchat conversation context
|
|
270
|
+
*/
|
|
271
|
+
getConversationContext(requestParameters: GetConversationContextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationWebchatContext>;
|
|
245
272
|
/**
|
|
246
273
|
* Retrieve conversation messages since a particular time
|
|
247
274
|
* Retrieve conversation messages
|
|
@@ -247,6 +247,65 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
247
247
|
});
|
|
248
248
|
});
|
|
249
249
|
};
|
|
250
|
+
/**
|
|
251
|
+
* Get a webchat conversation context
|
|
252
|
+
* Get a webchat conversation context
|
|
253
|
+
*/
|
|
254
|
+
ConversationApi.prototype.getConversationContextRaw = function (requestParameters, 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
|
+
if (requestParameters.conversationUuid === null || requestParameters.conversationUuid === undefined) {
|
|
261
|
+
throw new runtime.RequiredError('conversationUuid', 'Required parameter requestParameters.conversationUuid was null or undefined when calling getConversationContext.');
|
|
262
|
+
}
|
|
263
|
+
queryParameters = {};
|
|
264
|
+
headerParameters = {};
|
|
265
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
266
|
+
// oauth required
|
|
267
|
+
_a = headerParameters;
|
|
268
|
+
_b = "Authorization";
|
|
269
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
|
|
270
|
+
case 1:
|
|
271
|
+
// oauth required
|
|
272
|
+
_a[_b] = _c.sent();
|
|
273
|
+
_c.label = 2;
|
|
274
|
+
case 2:
|
|
275
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
276
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
277
|
+
}
|
|
278
|
+
return [4 /*yield*/, this.request({
|
|
279
|
+
path: "/conversation/conversations/{conversation_uuid}/context".replace("{".concat("conversation_uuid", "}"), encodeURIComponent(String(requestParameters.conversationUuid))),
|
|
280
|
+
method: 'PUT',
|
|
281
|
+
headers: headerParameters,
|
|
282
|
+
query: queryParameters,
|
|
283
|
+
}, initOverrides)];
|
|
284
|
+
case 3:
|
|
285
|
+
response = _c.sent();
|
|
286
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationWebchatContextFromJSON)(jsonValue); })];
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* Get a webchat conversation context
|
|
293
|
+
* Get a webchat conversation context
|
|
294
|
+
*/
|
|
295
|
+
ConversationApi.prototype.getConversationContext = function (requestParameters, initOverrides) {
|
|
296
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
297
|
+
var response;
|
|
298
|
+
return __generator(this, function (_a) {
|
|
299
|
+
switch (_a.label) {
|
|
300
|
+
case 0: return [4 /*yield*/, this.getConversationContextRaw(requestParameters, initOverrides)];
|
|
301
|
+
case 1:
|
|
302
|
+
response = _a.sent();
|
|
303
|
+
return [4 /*yield*/, response.value()];
|
|
304
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
});
|
|
308
|
+
};
|
|
250
309
|
/**
|
|
251
310
|
* Retrieve conversation messages since a particular time
|
|
252
311
|
* Retrieve conversation messages
|
|
@@ -15,6 +15,18 @@
|
|
|
15
15
|
* @interface ConversationEventAddCoupon
|
|
16
16
|
*/
|
|
17
17
|
export interface ConversationEventAddCoupon {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ConversationEventAddCoupon
|
|
22
|
+
*/
|
|
23
|
+
agent_arn?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ConversationEventAddCoupon
|
|
28
|
+
*/
|
|
29
|
+
agent_name?: string;
|
|
18
30
|
/**
|
|
19
31
|
*
|
|
20
32
|
* @type {string}
|
|
@@ -24,6 +24,8 @@ function ConversationEventAddCouponFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
24
24
|
return json;
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
|
+
'agent_arn': !(0, runtime_1.exists)(json, 'agent_arn') ? undefined : json['agent_arn'],
|
|
28
|
+
'agent_name': !(0, runtime_1.exists)(json, 'agent_name') ? undefined : json['agent_name'],
|
|
27
29
|
'coupon_code': !(0, runtime_1.exists)(json, 'coupon_code') ? undefined : json['coupon_code'],
|
|
28
30
|
};
|
|
29
31
|
}
|
|
@@ -36,6 +38,8 @@ function ConversationEventAddCouponToJSON(value) {
|
|
|
36
38
|
return null;
|
|
37
39
|
}
|
|
38
40
|
return {
|
|
41
|
+
'agent_arn': value.agent_arn,
|
|
42
|
+
'agent_name': value.agent_name,
|
|
39
43
|
'coupon_code': value.coupon_code,
|
|
40
44
|
};
|
|
41
45
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import { CartItem } from './CartItem';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -20,7 +21,19 @@ export interface ConversationEventAddItem {
|
|
|
20
21
|
* @type {string}
|
|
21
22
|
* @memberof ConversationEventAddItem
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
agent_arn?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof ConversationEventAddItem
|
|
29
|
+
*/
|
|
30
|
+
agent_name?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Array<CartItem>}
|
|
34
|
+
* @memberof ConversationEventAddItem
|
|
35
|
+
*/
|
|
36
|
+
items?: Array<CartItem>;
|
|
24
37
|
}
|
|
25
38
|
export declare function ConversationEventAddItemFromJSON(json: any): ConversationEventAddItem;
|
|
26
39
|
export declare function ConversationEventAddItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationEventAddItem;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.ConversationEventAddItemToJSON = exports.ConversationEventAddItemFromJSONTyped = exports.ConversationEventAddItemFromJSON = void 0;
|
|
17
17
|
var runtime_1 = require("../runtime");
|
|
18
|
+
var CartItem_1 = require("./CartItem");
|
|
18
19
|
function ConversationEventAddItemFromJSON(json) {
|
|
19
20
|
return ConversationEventAddItemFromJSONTyped(json, false);
|
|
20
21
|
}
|
|
@@ -24,7 +25,9 @@ function ConversationEventAddItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
24
25
|
return json;
|
|
25
26
|
}
|
|
26
27
|
return {
|
|
27
|
-
'
|
|
28
|
+
'agent_arn': !(0, runtime_1.exists)(json, 'agent_arn') ? undefined : json['agent_arn'],
|
|
29
|
+
'agent_name': !(0, runtime_1.exists)(json, 'agent_name') ? undefined : json['agent_name'],
|
|
30
|
+
'items': !(0, runtime_1.exists)(json, 'items') ? undefined : (json['items'].map(CartItem_1.CartItemFromJSON)),
|
|
28
31
|
};
|
|
29
32
|
}
|
|
30
33
|
exports.ConversationEventAddItemFromJSONTyped = ConversationEventAddItemFromJSONTyped;
|
|
@@ -36,7 +39,9 @@ function ConversationEventAddItemToJSON(value) {
|
|
|
36
39
|
return null;
|
|
37
40
|
}
|
|
38
41
|
return {
|
|
39
|
-
'
|
|
42
|
+
'agent_arn': value.agent_arn,
|
|
43
|
+
'agent_name': value.agent_name,
|
|
44
|
+
'items': value.items === undefined ? undefined : (value.items.map(CartItem_1.CartItemToJSON)),
|
|
40
45
|
};
|
|
41
46
|
}
|
|
42
47
|
exports.ConversationEventAddItemToJSON = ConversationEventAddItemToJSON;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 ConversationEventWebchatContext
|
|
16
|
+
*/
|
|
17
|
+
export interface ConversationEventWebchatContext {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ConversationEventWebchatContext
|
|
22
|
+
*/
|
|
23
|
+
cart_id?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ConversationEventWebchatContext
|
|
28
|
+
*/
|
|
29
|
+
ucacid?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ConversationEventWebchatContext
|
|
34
|
+
*/
|
|
35
|
+
url?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function ConversationEventWebchatContextFromJSON(json: any): ConversationEventWebchatContext;
|
|
38
|
+
export declare function ConversationEventWebchatContextFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationEventWebchatContext;
|
|
39
|
+
export declare function ConversationEventWebchatContextToJSON(value?: ConversationEventWebchatContext | null): any;
|
|
@@ -0,0 +1,46 @@
|
|
|
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.ConversationEventWebchatContextToJSON = exports.ConversationEventWebchatContextFromJSONTyped = exports.ConversationEventWebchatContextFromJSON = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
function ConversationEventWebchatContextFromJSON(json) {
|
|
19
|
+
return ConversationEventWebchatContextFromJSONTyped(json, false);
|
|
20
|
+
}
|
|
21
|
+
exports.ConversationEventWebchatContextFromJSON = ConversationEventWebchatContextFromJSON;
|
|
22
|
+
function ConversationEventWebchatContextFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
|
+
if ((json === undefined) || (json === null)) {
|
|
24
|
+
return json;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
'cart_id': !(0, runtime_1.exists)(json, 'cart_id') ? undefined : json['cart_id'],
|
|
28
|
+
'ucacid': !(0, runtime_1.exists)(json, 'ucacid') ? undefined : json['ucacid'],
|
|
29
|
+
'url': !(0, runtime_1.exists)(json, 'url') ? undefined : json['url'],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
exports.ConversationEventWebchatContextFromJSONTyped = ConversationEventWebchatContextFromJSONTyped;
|
|
33
|
+
function ConversationEventWebchatContextToJSON(value) {
|
|
34
|
+
if (value === undefined) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
if (value === null) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'cart_id': value.cart_id,
|
|
42
|
+
'ucacid': value.ucacid,
|
|
43
|
+
'url': value.url,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.ConversationEventWebchatContextToJSON = ConversationEventWebchatContextToJSON;
|
|
@@ -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 { Cart } from './Cart';
|
|
13
|
+
import { HitPageView } from './HitPageView';
|
|
14
|
+
import { HitSessionStart } from './HitSessionStart';
|
|
15
|
+
import { HitSessionUtm } from './HitSessionUtm';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ConversationWebchatContext
|
|
20
|
+
*/
|
|
21
|
+
export interface ConversationWebchatContext {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {Cart}
|
|
25
|
+
* @memberof ConversationWebchatContext
|
|
26
|
+
*/
|
|
27
|
+
cart?: Cart;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ConversationWebchatContext
|
|
32
|
+
*/
|
|
33
|
+
current_url?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {Array<HitPageView>}
|
|
37
|
+
* @memberof ConversationWebchatContext
|
|
38
|
+
*/
|
|
39
|
+
page_view?: Array<HitPageView>;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {HitSessionStart}
|
|
43
|
+
* @memberof ConversationWebchatContext
|
|
44
|
+
*/
|
|
45
|
+
session_start?: HitSessionStart;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {HitSessionUtm}
|
|
49
|
+
* @memberof ConversationWebchatContext
|
|
50
|
+
*/
|
|
51
|
+
session_utm?: HitSessionUtm;
|
|
52
|
+
}
|
|
53
|
+
export declare function ConversationWebchatContextFromJSON(json: any): ConversationWebchatContext;
|
|
54
|
+
export declare function ConversationWebchatContextFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationWebchatContext;
|
|
55
|
+
export declare function ConversationWebchatContextToJSON(value?: ConversationWebchatContext | 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.ConversationWebchatContextToJSON = exports.ConversationWebchatContextFromJSONTyped = exports.ConversationWebchatContextFromJSON = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var Cart_1 = require("./Cart");
|
|
19
|
+
var HitPageView_1 = require("./HitPageView");
|
|
20
|
+
var HitSessionStart_1 = require("./HitSessionStart");
|
|
21
|
+
var HitSessionUtm_1 = require("./HitSessionUtm");
|
|
22
|
+
function ConversationWebchatContextFromJSON(json) {
|
|
23
|
+
return ConversationWebchatContextFromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
exports.ConversationWebchatContextFromJSON = ConversationWebchatContextFromJSON;
|
|
26
|
+
function ConversationWebchatContextFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if ((json === undefined) || (json === null)) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'cart': !(0, runtime_1.exists)(json, 'cart') ? undefined : (0, Cart_1.CartFromJSON)(json['cart']),
|
|
32
|
+
'current_url': !(0, runtime_1.exists)(json, 'current_url') ? undefined : json['current_url'],
|
|
33
|
+
'page_view': !(0, runtime_1.exists)(json, 'page_view') ? undefined : (json['page_view'].map(HitPageView_1.HitPageViewFromJSON)),
|
|
34
|
+
'session_start': !(0, runtime_1.exists)(json, 'session_start') ? undefined : (0, HitSessionStart_1.HitSessionStartFromJSON)(json['session_start']),
|
|
35
|
+
'session_utm': !(0, runtime_1.exists)(json, 'session_utm') ? undefined : (0, HitSessionUtm_1.HitSessionUtmFromJSON)(json['session_utm']),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.ConversationWebchatContextFromJSONTyped = ConversationWebchatContextFromJSONTyped;
|
|
39
|
+
function ConversationWebchatContextToJSON(value) {
|
|
40
|
+
if (value === undefined) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
if (value === null) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'cart': (0, Cart_1.CartToJSON)(value.cart),
|
|
48
|
+
'current_url': value.current_url,
|
|
49
|
+
'page_view': value.page_view === undefined ? undefined : (value.page_view.map(HitPageView_1.HitPageViewToJSON)),
|
|
50
|
+
'session_start': (0, HitSessionStart_1.HitSessionStartToJSON)(value.session_start),
|
|
51
|
+
'session_utm': (0, HitSessionUtm_1.HitSessionUtmToJSON)(value.session_utm),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
exports.ConversationWebchatContextToJSON = ConversationWebchatContextToJSON;
|
|
@@ -15,6 +15,7 @@ import { ConversationEventQueuePosition } from './ConversationEventQueuePosition
|
|
|
15
15
|
import { ConversationEventRRWeb } from './ConversationEventRRWeb';
|
|
16
16
|
import { ConversationEventReadMessage } from './ConversationEventReadMessage';
|
|
17
17
|
import { ConversationEventTyping } from './ConversationEventTyping';
|
|
18
|
+
import { ConversationEventWebchatContext } from './ConversationEventWebchatContext';
|
|
18
19
|
import { ConversationMessage } from './ConversationMessage';
|
|
19
20
|
import { ConversationSummary } from './ConversationSummary';
|
|
20
21
|
import { ConversationWebchatQueueStatus } from './ConversationWebchatQueueStatus';
|
|
@@ -108,6 +109,12 @@ export interface ConversationWebsocketMessage {
|
|
|
108
109
|
* @memberof ConversationWebsocketMessage
|
|
109
110
|
*/
|
|
110
111
|
event_updated_message?: ConversationMessage;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @type {ConversationEventWebchatContext}
|
|
115
|
+
* @memberof ConversationWebsocketMessage
|
|
116
|
+
*/
|
|
117
|
+
event_webchat_context?: ConversationEventWebchatContext;
|
|
111
118
|
/**
|
|
112
119
|
*
|
|
113
120
|
* @type {ConversationMessage}
|
|
@@ -138,6 +145,7 @@ export declare const ConversationWebsocketMessageEventTypeEnum: {
|
|
|
138
145
|
readonly Typing: "typing";
|
|
139
146
|
readonly AddCoupon: "add coupon";
|
|
140
147
|
readonly AddItem: "add item";
|
|
148
|
+
readonly WebchatContext: "webchat context";
|
|
141
149
|
};
|
|
142
150
|
export type ConversationWebsocketMessageEventTypeEnum = typeof ConversationWebsocketMessageEventTypeEnum[keyof typeof ConversationWebsocketMessageEventTypeEnum];
|
|
143
151
|
/**
|
|
@@ -21,6 +21,7 @@ var ConversationEventQueuePosition_1 = require("./ConversationEventQueuePosition
|
|
|
21
21
|
var ConversationEventRRWeb_1 = require("./ConversationEventRRWeb");
|
|
22
22
|
var ConversationEventReadMessage_1 = require("./ConversationEventReadMessage");
|
|
23
23
|
var ConversationEventTyping_1 = require("./ConversationEventTyping");
|
|
24
|
+
var ConversationEventWebchatContext_1 = require("./ConversationEventWebchatContext");
|
|
24
25
|
var ConversationMessage_1 = require("./ConversationMessage");
|
|
25
26
|
var ConversationSummary_1 = require("./ConversationSummary");
|
|
26
27
|
var ConversationWebchatQueueStatus_1 = require("./ConversationWebchatQueueStatus");
|
|
@@ -40,7 +41,8 @@ exports.ConversationWebsocketMessageEventTypeEnum = {
|
|
|
40
41
|
ReadMessage: 'read message',
|
|
41
42
|
Typing: 'typing',
|
|
42
43
|
AddCoupon: 'add coupon',
|
|
43
|
-
AddItem: 'add item'
|
|
44
|
+
AddItem: 'add item',
|
|
45
|
+
WebchatContext: 'webchat context'
|
|
44
46
|
};
|
|
45
47
|
/**
|
|
46
48
|
* @export
|
|
@@ -74,6 +76,7 @@ function ConversationWebsocketMessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
74
76
|
'event_type': !(0, runtime_1.exists)(json, 'event_type') ? undefined : json['event_type'],
|
|
75
77
|
'event_typing': !(0, runtime_1.exists)(json, 'event_typing') ? undefined : (0, ConversationEventTyping_1.ConversationEventTypingFromJSON)(json['event_typing']),
|
|
76
78
|
'event_updated_message': !(0, runtime_1.exists)(json, 'event_updated_message') ? undefined : (0, ConversationMessage_1.ConversationMessageFromJSON)(json['event_updated_message']),
|
|
79
|
+
'event_webchat_context': !(0, runtime_1.exists)(json, 'event_webchat_context') ? undefined : (0, ConversationEventWebchatContext_1.ConversationEventWebchatContextFromJSON)(json['event_webchat_context']),
|
|
77
80
|
'message': !(0, runtime_1.exists)(json, 'message') ? undefined : (0, ConversationMessage_1.ConversationMessageFromJSON)(json['message']),
|
|
78
81
|
'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
|
|
79
82
|
};
|
|
@@ -101,6 +104,7 @@ function ConversationWebsocketMessageToJSON(value) {
|
|
|
101
104
|
'event_type': value.event_type,
|
|
102
105
|
'event_typing': (0, ConversationEventTyping_1.ConversationEventTypingToJSON)(value.event_typing),
|
|
103
106
|
'event_updated_message': (0, ConversationMessage_1.ConversationMessageToJSON)(value.event_updated_message),
|
|
107
|
+
'event_webchat_context': (0, ConversationEventWebchatContext_1.ConversationEventWebchatContextToJSON)(value.event_webchat_context),
|
|
104
108
|
'message': (0, ConversationMessage_1.ConversationMessageToJSON)(value.message),
|
|
105
109
|
'type': value.type,
|
|
106
110
|
};
|
|
@@ -0,0 +1,88 @@
|
|
|
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 { HitPageViewMetaData } from './HitPageViewMetaData';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface HitPageView
|
|
17
|
+
*/
|
|
18
|
+
export interface HitPageView {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof HitPageView
|
|
23
|
+
*/
|
|
24
|
+
bounce?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {Array<HitPageViewMetaData>}
|
|
28
|
+
* @memberof HitPageView
|
|
29
|
+
*/
|
|
30
|
+
meta_data?: Array<HitPageViewMetaData>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof HitPageView
|
|
35
|
+
*/
|
|
36
|
+
method?: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof HitPageView
|
|
41
|
+
*/
|
|
42
|
+
prefetch?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof HitPageView
|
|
47
|
+
*/
|
|
48
|
+
query?: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @memberof HitPageView
|
|
53
|
+
*/
|
|
54
|
+
recording?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof HitPageView
|
|
59
|
+
*/
|
|
60
|
+
redirect?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof HitPageView
|
|
65
|
+
*/
|
|
66
|
+
referrer?: string;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof HitPageView
|
|
71
|
+
*/
|
|
72
|
+
time_on_page?: number;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof HitPageView
|
|
77
|
+
*/
|
|
78
|
+
title?: string;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof HitPageView
|
|
83
|
+
*/
|
|
84
|
+
url?: string;
|
|
85
|
+
}
|
|
86
|
+
export declare function HitPageViewFromJSON(json: any): HitPageView;
|
|
87
|
+
export declare function HitPageViewFromJSONTyped(json: any, ignoreDiscriminator: boolean): HitPageView;
|
|
88
|
+
export declare function HitPageViewToJSON(value?: HitPageView | null): any;
|