ultracart_rest_api_v2_typescript 4.0.125-RC → 4.0.127

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.
@@ -175,6 +175,9 @@ src/models/ConversationEventReadMessage.ts
175
175
  src/models/ConversationEventTyping.ts
176
176
  src/models/ConversationEventWebchatContext.ts
177
177
  src/models/ConversationJoinRequest.ts
178
+ src/models/ConversationLocationCountry.ts
179
+ src/models/ConversationLocationStateProvince.ts
180
+ src/models/ConversationLocationsResponse.ts
178
181
  src/models/ConversationMessage.ts
179
182
  src/models/ConversationMessageTranslation.ts
180
183
  src/models/ConversationMessageTransportStatus.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@4.0.125-RC
1
+ ## ultracart_rest_api_v2_typescript@4.0.127
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.125-RC --save
39
+ npm install ultracart_rest_api_v2_typescript@4.0.127 --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.127 | 01/27/2023 | conversations - getLocationsForEngagement method |
58
+ | 4.0.126-RC | 01/26/2023 | typo in ConversationWebsocketMessage |
57
59
  | 4.0.125-RC | 01/26/2023 | conversation - added message type of engagement prompt |
58
60
  | 4.0.124-RC | 01/25/2023 | convo event for engage customer |
59
61
  | 4.0.123-RC | 01/25/2023 | order api method generateInvoice |
@@ -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, ConversationMessagesResponse, ConversationMultimediaUploadUrlResponse, ConversationPermissionsResponse, ConversationResponse, ConversationSearchRequest, ConversationSearchResponse, ConversationStartRequest, ConversationStartResponse, ConversationWebchatContext, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse } from '../models';
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';
14
14
  export interface DeleteConversationCannedMessageRequest {
15
15
  conversationCannedMessageOid: number;
16
16
  }
@@ -362,6 +362,19 @@ export interface ConversationApiInterface {
362
362
  * Search conversations
363
363
  */
364
364
  getConversationsSearch(requestParameters: GetConversationsSearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationSearchResponse>;
365
+ /**
366
+ * Get location data for engagement configuration
367
+ * @summary Get location data for engagement configuration
368
+ * @param {*} [options] Override http request option.
369
+ * @throws {RequiredError}
370
+ * @memberof ConversationApiInterface
371
+ */
372
+ getLocationsForEngagementRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationLocationsResponse>>;
373
+ /**
374
+ * Get location data for engagement configuration
375
+ * Get location data for engagement configuration
376
+ */
377
+ getLocationsForEngagement(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationLocationsResponse>;
365
378
  /**
366
379
  * Insert a canned message
367
380
  * @summary Insert a canned message
@@ -730,6 +743,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
730
743
  * Search conversations
731
744
  */
732
745
  getConversationsSearch(requestParameters: GetConversationsSearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationSearchResponse>;
746
+ /**
747
+ * Get location data for engagement configuration
748
+ * Get location data for engagement configuration
749
+ */
750
+ getLocationsForEngagementRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationLocationsResponse>>;
751
+ /**
752
+ * Get location data for engagement configuration
753
+ * Get location data for engagement configuration
754
+ */
755
+ getLocationsForEngagement(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationLocationsResponse>;
733
756
  /**
734
757
  * Insert a canned message
735
758
  * Insert a canned message
@@ -1187,6 +1187,62 @@ var ConversationApi = /** @class */ (function (_super) {
1187
1187
  });
1188
1188
  });
1189
1189
  };
1190
+ /**
1191
+ * Get location data for engagement configuration
1192
+ * Get location data for engagement configuration
1193
+ */
1194
+ ConversationApi.prototype.getLocationsForEngagementRaw = function (initOverrides) {
1195
+ return __awaiter(this, void 0, void 0, function () {
1196
+ var queryParameters, headerParameters, _a, _b, response;
1197
+ return __generator(this, function (_c) {
1198
+ switch (_c.label) {
1199
+ case 0:
1200
+ queryParameters = {};
1201
+ headerParameters = {};
1202
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1203
+ // oauth required
1204
+ _a = headerParameters;
1205
+ _b = "Authorization";
1206
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_read"])];
1207
+ case 1:
1208
+ // oauth required
1209
+ _a[_b] = _c.sent();
1210
+ _c.label = 2;
1211
+ case 2:
1212
+ if (this.configuration && this.configuration.apiKey) {
1213
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1214
+ }
1215
+ return [4 /*yield*/, this.request({
1216
+ path: "/conversation/locations",
1217
+ method: 'POST',
1218
+ headers: headerParameters,
1219
+ query: queryParameters,
1220
+ }, initOverrides)];
1221
+ case 3:
1222
+ response = _c.sent();
1223
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationLocationsResponseFromJSON)(jsonValue); })];
1224
+ }
1225
+ });
1226
+ });
1227
+ };
1228
+ /**
1229
+ * Get location data for engagement configuration
1230
+ * Get location data for engagement configuration
1231
+ */
1232
+ ConversationApi.prototype.getLocationsForEngagement = function (initOverrides) {
1233
+ return __awaiter(this, void 0, void 0, function () {
1234
+ var response;
1235
+ return __generator(this, function (_a) {
1236
+ switch (_a.label) {
1237
+ case 0: return [4 /*yield*/, this.getLocationsForEngagementRaw(initOverrides)];
1238
+ case 1:
1239
+ response = _a.sent();
1240
+ return [4 /*yield*/, response.value()];
1241
+ case 2: return [2 /*return*/, _a.sent()];
1242
+ }
1243
+ });
1244
+ });
1245
+ };
1190
1246
  /**
1191
1247
  * Insert a canned message
1192
1248
  * Insert a canned message
@@ -0,0 +1,40 @@
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 { ConversationLocationStateProvince } from './ConversationLocationStateProvince';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ConversationLocationCountry
17
+ */
18
+ export interface ConversationLocationCountry {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof ConversationLocationCountry
23
+ */
24
+ iso2?: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof ConversationLocationCountry
29
+ */
30
+ name?: string;
31
+ /**
32
+ *
33
+ * @type {Array<ConversationLocationStateProvince>}
34
+ * @memberof ConversationLocationCountry
35
+ */
36
+ state_provinces?: Array<ConversationLocationStateProvince>;
37
+ }
38
+ export declare function ConversationLocationCountryFromJSON(json: any): ConversationLocationCountry;
39
+ export declare function ConversationLocationCountryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationLocationCountry;
40
+ export declare function ConversationLocationCountryToJSON(value?: ConversationLocationCountry | null): any;
@@ -0,0 +1,47 @@
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.ConversationLocationCountryToJSON = exports.ConversationLocationCountryFromJSONTyped = exports.ConversationLocationCountryFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var ConversationLocationStateProvince_1 = require("./ConversationLocationStateProvince");
19
+ function ConversationLocationCountryFromJSON(json) {
20
+ return ConversationLocationCountryFromJSONTyped(json, false);
21
+ }
22
+ exports.ConversationLocationCountryFromJSON = ConversationLocationCountryFromJSON;
23
+ function ConversationLocationCountryFromJSONTyped(json, ignoreDiscriminator) {
24
+ if ((json === undefined) || (json === null)) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'iso2': !(0, runtime_1.exists)(json, 'iso2') ? undefined : json['iso2'],
29
+ 'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
30
+ 'state_provinces': !(0, runtime_1.exists)(json, 'state_provinces') ? undefined : (json['state_provinces'].map(ConversationLocationStateProvince_1.ConversationLocationStateProvinceFromJSON)),
31
+ };
32
+ }
33
+ exports.ConversationLocationCountryFromJSONTyped = ConversationLocationCountryFromJSONTyped;
34
+ function ConversationLocationCountryToJSON(value) {
35
+ if (value === undefined) {
36
+ return undefined;
37
+ }
38
+ if (value === null) {
39
+ return null;
40
+ }
41
+ return {
42
+ 'iso2': value.iso2,
43
+ 'name': value.name,
44
+ 'state_provinces': value.state_provinces === undefined ? undefined : (value.state_provinces.map(ConversationLocationStateProvince_1.ConversationLocationStateProvinceToJSON)),
45
+ };
46
+ }
47
+ exports.ConversationLocationCountryToJSON = ConversationLocationCountryToJSON;
@@ -0,0 +1,33 @@
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 ConversationLocationStateProvince
16
+ */
17
+ export interface ConversationLocationStateProvince {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ConversationLocationStateProvince
22
+ */
23
+ abbreviation?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ConversationLocationStateProvince
28
+ */
29
+ name?: string;
30
+ }
31
+ export declare function ConversationLocationStateProvinceFromJSON(json: any): ConversationLocationStateProvince;
32
+ export declare function ConversationLocationStateProvinceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationLocationStateProvince;
33
+ export declare function ConversationLocationStateProvinceToJSON(value?: ConversationLocationStateProvince | null): any;
@@ -0,0 +1,44 @@
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.ConversationLocationStateProvinceToJSON = exports.ConversationLocationStateProvinceFromJSONTyped = exports.ConversationLocationStateProvinceFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ function ConversationLocationStateProvinceFromJSON(json) {
19
+ return ConversationLocationStateProvinceFromJSONTyped(json, false);
20
+ }
21
+ exports.ConversationLocationStateProvinceFromJSON = ConversationLocationStateProvinceFromJSON;
22
+ function ConversationLocationStateProvinceFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'abbreviation': !(0, runtime_1.exists)(json, 'abbreviation') ? undefined : json['abbreviation'],
28
+ 'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
29
+ };
30
+ }
31
+ exports.ConversationLocationStateProvinceFromJSONTyped = ConversationLocationStateProvinceFromJSONTyped;
32
+ function ConversationLocationStateProvinceToJSON(value) {
33
+ if (value === undefined) {
34
+ return undefined;
35
+ }
36
+ if (value === null) {
37
+ return null;
38
+ }
39
+ return {
40
+ 'abbreviation': value.abbreviation,
41
+ 'name': value.name,
42
+ };
43
+ }
44
+ exports.ConversationLocationStateProvinceToJSON = ConversationLocationStateProvinceToJSON;
@@ -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 { ConversationLocationCountry } from './ConversationLocationCountry';
13
+ import { ModelError } from './ModelError';
14
+ import { ResponseMetadata } from './ResponseMetadata';
15
+ import { Warning } from './Warning';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ConversationLocationsResponse
20
+ */
21
+ export interface ConversationLocationsResponse {
22
+ /**
23
+ *
24
+ * @type {Array<ConversationLocationCountry>}
25
+ * @memberof ConversationLocationsResponse
26
+ */
27
+ countries?: Array<ConversationLocationCountry>;
28
+ /**
29
+ *
30
+ * @type {ModelError}
31
+ * @memberof ConversationLocationsResponse
32
+ */
33
+ error?: ModelError;
34
+ /**
35
+ *
36
+ * @type {ResponseMetadata}
37
+ * @memberof ConversationLocationsResponse
38
+ */
39
+ metadata?: ResponseMetadata;
40
+ /**
41
+ * Indicates if API call was successful
42
+ * @type {boolean}
43
+ * @memberof ConversationLocationsResponse
44
+ */
45
+ success?: boolean;
46
+ /**
47
+ *
48
+ * @type {Warning}
49
+ * @memberof ConversationLocationsResponse
50
+ */
51
+ warning?: Warning;
52
+ }
53
+ export declare function ConversationLocationsResponseFromJSON(json: any): ConversationLocationsResponse;
54
+ export declare function ConversationLocationsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationLocationsResponse;
55
+ export declare function ConversationLocationsResponseToJSON(value?: ConversationLocationsResponse | 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.ConversationLocationsResponseToJSON = exports.ConversationLocationsResponseFromJSONTyped = exports.ConversationLocationsResponseFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var ConversationLocationCountry_1 = require("./ConversationLocationCountry");
19
+ var ModelError_1 = require("./ModelError");
20
+ var ResponseMetadata_1 = require("./ResponseMetadata");
21
+ var Warning_1 = require("./Warning");
22
+ function ConversationLocationsResponseFromJSON(json) {
23
+ return ConversationLocationsResponseFromJSONTyped(json, false);
24
+ }
25
+ exports.ConversationLocationsResponseFromJSON = ConversationLocationsResponseFromJSON;
26
+ function ConversationLocationsResponseFromJSONTyped(json, ignoreDiscriminator) {
27
+ if ((json === undefined) || (json === null)) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'countries': !(0, runtime_1.exists)(json, 'countries') ? undefined : (json['countries'].map(ConversationLocationCountry_1.ConversationLocationCountryFromJSON)),
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.ConversationLocationsResponseFromJSONTyped = ConversationLocationsResponseFromJSONTyped;
39
+ function ConversationLocationsResponseToJSON(value) {
40
+ if (value === undefined) {
41
+ return undefined;
42
+ }
43
+ if (value === null) {
44
+ return null;
45
+ }
46
+ return {
47
+ 'countries': value.countries === undefined ? undefined : (value.countries.map(ConversationLocationCountry_1.ConversationLocationCountryToJSON)),
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.ConversationLocationsResponseToJSON = ConversationLocationsResponseToJSON;
@@ -150,6 +150,9 @@ export * from './ConversationEventReadMessage';
150
150
  export * from './ConversationEventTyping';
151
151
  export * from './ConversationEventWebchatContext';
152
152
  export * from './ConversationJoinRequest';
153
+ export * from './ConversationLocationCountry';
154
+ export * from './ConversationLocationStateProvince';
155
+ export * from './ConversationLocationsResponse';
153
156
  export * from './ConversationMessage';
154
157
  export * from './ConversationMessageTranslation';
155
158
  export * from './ConversationMessageTransportStatus';
@@ -168,6 +168,9 @@ __exportStar(require("./ConversationEventReadMessage"), exports);
168
168
  __exportStar(require("./ConversationEventTyping"), exports);
169
169
  __exportStar(require("./ConversationEventWebchatContext"), exports);
170
170
  __exportStar(require("./ConversationJoinRequest"), exports);
171
+ __exportStar(require("./ConversationLocationCountry"), exports);
172
+ __exportStar(require("./ConversationLocationStateProvince"), exports);
173
+ __exportStar(require("./ConversationLocationsResponse"), exports);
171
174
  __exportStar(require("./ConversationMessage"), exports);
172
175
  __exportStar(require("./ConversationMessageTranslation"), exports);
173
176
  __exportStar(require("./ConversationMessageTransportStatus"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.0.125-RC",
3
+ "version": "4.0.127",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -60,6 +60,9 @@ import {
60
60
  ConversationJoinRequest,
61
61
  ConversationJoinRequestFromJSON,
62
62
  ConversationJoinRequestToJSON,
63
+ ConversationLocationsResponse,
64
+ ConversationLocationsResponseFromJSON,
65
+ ConversationLocationsResponseToJSON,
63
66
  ConversationMessagesResponse,
64
67
  ConversationMessagesResponseFromJSON,
65
68
  ConversationMessagesResponseToJSON,
@@ -513,6 +516,21 @@ export interface ConversationApiInterface {
513
516
  */
514
517
  getConversationsSearch(requestParameters: GetConversationsSearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationSearchResponse>;
515
518
 
519
+ /**
520
+ * Get location data for engagement configuration
521
+ * @summary Get location data for engagement configuration
522
+ * @param {*} [options] Override http request option.
523
+ * @throws {RequiredError}
524
+ * @memberof ConversationApiInterface
525
+ */
526
+ getLocationsForEngagementRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationLocationsResponse>>;
527
+
528
+ /**
529
+ * Get location data for engagement configuration
530
+ * Get location data for engagement configuration
531
+ */
532
+ getLocationsForEngagement(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationLocationsResponse>;
533
+
516
534
  /**
517
535
  * Insert a canned message
518
536
  * @summary Insert a canned message
@@ -1490,6 +1508,43 @@ export class ConversationApi extends runtime.BaseAPI implements ConversationApiI
1490
1508
  return await response.value();
1491
1509
  }
1492
1510
 
1511
+ /**
1512
+ * Get location data for engagement configuration
1513
+ * Get location data for engagement configuration
1514
+ */
1515
+ async getLocationsForEngagementRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationLocationsResponse>> {
1516
+ const queryParameters: any = {};
1517
+
1518
+ const headerParameters: runtime.HTTPHeaders = {};
1519
+
1520
+ if (this.configuration && this.configuration.accessToken) {
1521
+ // oauth required
1522
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["conversation_read"]);
1523
+ }
1524
+
1525
+ if (this.configuration && this.configuration.apiKey) {
1526
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1527
+ }
1528
+
1529
+ const response = await this.request({
1530
+ path: `/conversation/locations`,
1531
+ method: 'POST',
1532
+ headers: headerParameters,
1533
+ query: queryParameters,
1534
+ }, initOverrides);
1535
+
1536
+ return new runtime.JSONApiResponse(response, (jsonValue) => ConversationLocationsResponseFromJSON(jsonValue));
1537
+ }
1538
+
1539
+ /**
1540
+ * Get location data for engagement configuration
1541
+ * Get location data for engagement configuration
1542
+ */
1543
+ async getLocationsForEngagement(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationLocationsResponse> {
1544
+ const response = await this.getLocationsForEngagementRaw(initOverrides);
1545
+ return await response.value();
1546
+ }
1547
+
1493
1548
  /**
1494
1549
  * Insert a canned message
1495
1550
  * Insert a canned message
@@ -0,0 +1,79 @@
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
+ ConversationLocationStateProvince,
18
+ ConversationLocationStateProvinceFromJSON,
19
+ ConversationLocationStateProvinceFromJSONTyped,
20
+ ConversationLocationStateProvinceToJSON,
21
+ } from './ConversationLocationStateProvince';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface ConversationLocationCountry
27
+ */
28
+ export interface ConversationLocationCountry {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof ConversationLocationCountry
33
+ */
34
+ iso2?: string;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof ConversationLocationCountry
39
+ */
40
+ name?: string;
41
+ /**
42
+ *
43
+ * @type {Array<ConversationLocationStateProvince>}
44
+ * @memberof ConversationLocationCountry
45
+ */
46
+ state_provinces?: Array<ConversationLocationStateProvince>;
47
+ }
48
+
49
+ export function ConversationLocationCountryFromJSON(json: any): ConversationLocationCountry {
50
+ return ConversationLocationCountryFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function ConversationLocationCountryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationLocationCountry {
54
+ if ((json === undefined) || (json === null)) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'iso2': !exists(json, 'iso2') ? undefined : json['iso2'],
60
+ 'name': !exists(json, 'name') ? undefined : json['name'],
61
+ 'state_provinces': !exists(json, 'state_provinces') ? undefined : ((json['state_provinces'] as Array<any>).map(ConversationLocationStateProvinceFromJSON)),
62
+ };
63
+ }
64
+
65
+ export function ConversationLocationCountryToJSON(value?: ConversationLocationCountry | null): any {
66
+ if (value === undefined) {
67
+ return undefined;
68
+ }
69
+ if (value === null) {
70
+ return null;
71
+ }
72
+ return {
73
+
74
+ 'iso2': value.iso2,
75
+ 'name': value.name,
76
+ 'state_provinces': value.state_provinces === undefined ? undefined : ((value.state_provinces as Array<any>).map(ConversationLocationStateProvinceToJSON)),
77
+ };
78
+ }
79
+
@@ -0,0 +1,64 @@
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 ConversationLocationStateProvince
20
+ */
21
+ export interface ConversationLocationStateProvince {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ConversationLocationStateProvince
26
+ */
27
+ abbreviation?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ConversationLocationStateProvince
32
+ */
33
+ name?: string;
34
+ }
35
+
36
+ export function ConversationLocationStateProvinceFromJSON(json: any): ConversationLocationStateProvince {
37
+ return ConversationLocationStateProvinceFromJSONTyped(json, false);
38
+ }
39
+
40
+ export function ConversationLocationStateProvinceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationLocationStateProvince {
41
+ if ((json === undefined) || (json === null)) {
42
+ return json;
43
+ }
44
+ return {
45
+
46
+ 'abbreviation': !exists(json, 'abbreviation') ? undefined : json['abbreviation'],
47
+ 'name': !exists(json, 'name') ? undefined : json['name'],
48
+ };
49
+ }
50
+
51
+ export function ConversationLocationStateProvinceToJSON(value?: ConversationLocationStateProvince | null): any {
52
+ if (value === undefined) {
53
+ return undefined;
54
+ }
55
+ if (value === null) {
56
+ return null;
57
+ }
58
+ return {
59
+
60
+ 'abbreviation': value.abbreviation,
61
+ 'name': value.name,
62
+ };
63
+ }
64
+
@@ -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
+ ConversationLocationCountry,
18
+ ConversationLocationCountryFromJSON,
19
+ ConversationLocationCountryFromJSONTyped,
20
+ ConversationLocationCountryToJSON,
21
+ } from './ConversationLocationCountry';
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 ConversationLocationsResponse
45
+ */
46
+ export interface ConversationLocationsResponse {
47
+ /**
48
+ *
49
+ * @type {Array<ConversationLocationCountry>}
50
+ * @memberof ConversationLocationsResponse
51
+ */
52
+ countries?: Array<ConversationLocationCountry>;
53
+ /**
54
+ *
55
+ * @type {ModelError}
56
+ * @memberof ConversationLocationsResponse
57
+ */
58
+ error?: ModelError;
59
+ /**
60
+ *
61
+ * @type {ResponseMetadata}
62
+ * @memberof ConversationLocationsResponse
63
+ */
64
+ metadata?: ResponseMetadata;
65
+ /**
66
+ * Indicates if API call was successful
67
+ * @type {boolean}
68
+ * @memberof ConversationLocationsResponse
69
+ */
70
+ success?: boolean;
71
+ /**
72
+ *
73
+ * @type {Warning}
74
+ * @memberof ConversationLocationsResponse
75
+ */
76
+ warning?: Warning;
77
+ }
78
+
79
+ export function ConversationLocationsResponseFromJSON(json: any): ConversationLocationsResponse {
80
+ return ConversationLocationsResponseFromJSONTyped(json, false);
81
+ }
82
+
83
+ export function ConversationLocationsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationLocationsResponse {
84
+ if ((json === undefined) || (json === null)) {
85
+ return json;
86
+ }
87
+ return {
88
+
89
+ 'countries': !exists(json, 'countries') ? undefined : ((json['countries'] as Array<any>).map(ConversationLocationCountryFromJSON)),
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 ConversationLocationsResponseToJSON(value?: ConversationLocationsResponse | null): any {
98
+ if (value === undefined) {
99
+ return undefined;
100
+ }
101
+ if (value === null) {
102
+ return null;
103
+ }
104
+ return {
105
+
106
+ 'countries': value.countries === undefined ? undefined : ((value.countries as Array<any>).map(ConversationLocationCountryToJSON)),
107
+ 'error': ModelErrorToJSON(value.error),
108
+ 'metadata': ResponseMetadataToJSON(value.metadata),
109
+ 'success': value.success,
110
+ 'warning': WarningToJSON(value.warning),
111
+ };
112
+ }
113
+
@@ -152,6 +152,9 @@ export * from './ConversationEventReadMessage';
152
152
  export * from './ConversationEventTyping';
153
153
  export * from './ConversationEventWebchatContext';
154
154
  export * from './ConversationJoinRequest';
155
+ export * from './ConversationLocationCountry';
156
+ export * from './ConversationLocationStateProvince';
157
+ export * from './ConversationLocationsResponse';
155
158
  export * from './ConversationMessage';
156
159
  export * from './ConversationMessageTranslation';
157
160
  export * from './ConversationMessageTransportStatus';