ultracart_rest_api_v2_typescript 3.10.109 → 3.10.111

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@3.10.109
1
+ ## ultracart_rest_api_v2_typescript@3.10.111
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@3.10.109 --save
39
+ npm install ultracart_rest_api_v2_typescript@3.10.111 --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
+ | 3.10.111 | 01/27/2023 | convo - added event_engage_customer property to message |
58
+ | 3.10.110 | 01/27/2023 | conversations - getLocationsForEngagement method |
57
59
  | 3.10.109 | 01/26/2023 | typo in ConversationWebsocketMessage |
58
60
  | 3.10.108 | 01/25/2023 | conversation - added message type of engagement prompt |
59
61
  | 3.10.107 | 01/25/2023 | convo event for engage customer |
package/api.ts CHANGED
@@ -7732,6 +7732,90 @@ export interface ConversationJoinRequest {
7732
7732
  participant_language_iso_code?: string;
7733
7733
  }
7734
7734
 
7735
+ /**
7736
+ *
7737
+ * @export
7738
+ * @interface ConversationLocationCountry
7739
+ */
7740
+ export interface ConversationLocationCountry {
7741
+ /**
7742
+ *
7743
+ * @type {string}
7744
+ * @memberof ConversationLocationCountry
7745
+ */
7746
+ iso2?: string;
7747
+ /**
7748
+ *
7749
+ * @type {string}
7750
+ * @memberof ConversationLocationCountry
7751
+ */
7752
+ name?: string;
7753
+ /**
7754
+ *
7755
+ * @type {Array<ConversationLocationStateProvince>}
7756
+ * @memberof ConversationLocationCountry
7757
+ */
7758
+ state_provinces?: Array<ConversationLocationStateProvince>;
7759
+ }
7760
+
7761
+ /**
7762
+ *
7763
+ * @export
7764
+ * @interface ConversationLocationStateProvince
7765
+ */
7766
+ export interface ConversationLocationStateProvince {
7767
+ /**
7768
+ *
7769
+ * @type {string}
7770
+ * @memberof ConversationLocationStateProvince
7771
+ */
7772
+ abbreviation?: string;
7773
+ /**
7774
+ *
7775
+ * @type {string}
7776
+ * @memberof ConversationLocationStateProvince
7777
+ */
7778
+ name?: string;
7779
+ }
7780
+
7781
+ /**
7782
+ *
7783
+ * @export
7784
+ * @interface ConversationLocationsResponse
7785
+ */
7786
+ export interface ConversationLocationsResponse {
7787
+ /**
7788
+ *
7789
+ * @type {Array<ConversationLocationCountry>}
7790
+ * @memberof ConversationLocationsResponse
7791
+ */
7792
+ countries?: Array<ConversationLocationCountry>;
7793
+ /**
7794
+ *
7795
+ * @type {ModelError}
7796
+ * @memberof ConversationLocationsResponse
7797
+ */
7798
+ error?: ModelError;
7799
+ /**
7800
+ *
7801
+ * @type {ResponseMetadata}
7802
+ * @memberof ConversationLocationsResponse
7803
+ */
7804
+ metadata?: ResponseMetadata;
7805
+ /**
7806
+ * Indicates if API call was successful
7807
+ * @type {boolean}
7808
+ * @memberof ConversationLocationsResponse
7809
+ */
7810
+ success?: boolean;
7811
+ /**
7812
+ *
7813
+ * @type {Warning}
7814
+ * @memberof ConversationLocationsResponse
7815
+ */
7816
+ warning?: Warning;
7817
+ }
7818
+
7735
7819
  /**
7736
7820
  *
7737
7821
  * @export
@@ -8835,6 +8919,12 @@ export interface ConversationWebsocketMessage {
8835
8919
  * @memberof ConversationWebsocketMessage
8836
8920
  */
8837
8921
  event_conversation_closed?: ConversationSummary;
8922
+ /**
8923
+ *
8924
+ * @type {ConversationWebchatQueueStatusQueueEntry}
8925
+ * @memberof ConversationWebsocketMessage
8926
+ */
8927
+ event_engage_customer?: ConversationWebchatQueueStatusQueueEntry;
8838
8928
  /**
8839
8929
  *
8840
8930
  * @type {ConversationSummary}
@@ -44837,6 +44927,52 @@ export const ConversationApiFetchParamCreator = function (configuration?: Config
44837
44927
  options: localVarRequestOptions,
44838
44928
  };
44839
44929
  },
44930
+ /**
44931
+ * Get location data for engagement configuration
44932
+ * @summary Get location data for engagement configuration
44933
+ * @param {*} [options] Override http request option.
44934
+ * @throws {RequiredError}
44935
+ */
44936
+ getLocationsForEngagement(options: any = {}): FetchArgs {
44937
+ const localVarPath = `/conversation/locations`;
44938
+ const localVarUrlObj = url.parse(localVarPath, true);
44939
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
44940
+ const localVarHeaderParameter = {} as any;
44941
+ const localVarQueryParameter = {} as any;
44942
+
44943
+ if(configuration && configuration.apiVersion) {
44944
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
44945
+ }
44946
+
44947
+
44948
+
44949
+ // authentication ultraCartOauth required
44950
+ // oauth required
44951
+ if (configuration && configuration.accessToken) {
44952
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
44953
+ ? configuration.accessToken("ultraCartOauth", ["conversation_read"])
44954
+ : configuration.accessToken;
44955
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
44956
+ }
44957
+
44958
+ // authentication ultraCartSimpleApiKey required
44959
+ if (configuration && configuration.apiKey) {
44960
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
44961
+ ? configuration.apiKey("x-ultracart-simple-key")
44962
+ : configuration.apiKey;
44963
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
44964
+ }
44965
+
44966
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
44967
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
44968
+ delete localVarUrlObj.search;
44969
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
44970
+
44971
+ return {
44972
+ url: url.format(localVarUrlObj),
44973
+ options: localVarRequestOptions,
44974
+ };
44975
+ },
44840
44976
  /**
44841
44977
  * Insert a canned message
44842
44978
  * @summary Insert a canned message
@@ -45923,6 +46059,26 @@ export const ConversationApiFp = function(configuration?: Configuration) {
45923
46059
  });
45924
46060
  };
45925
46061
  },
46062
+ /**
46063
+ * Get location data for engagement configuration
46064
+ * @summary Get location data for engagement configuration
46065
+ * @param {*} [options] Override http request option.
46066
+ * @throws {RequiredError}
46067
+ */
46068
+ getLocationsForEngagement(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationLocationsResponse> {
46069
+ const localVarFetchArgs = ConversationApiFetchParamCreator(configuration).getLocationsForEngagement(options);
46070
+ return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
46071
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
46072
+
46073
+ if (response.status >= 200 && response.status < 300) {
46074
+ return response.json();
46075
+
46076
+ } else {
46077
+ throw response;
46078
+ }
46079
+ });
46080
+ };
46081
+ },
45926
46082
  /**
45927
46083
  * Insert a canned message
45928
46084
  * @summary Insert a canned message
@@ -46377,6 +46533,15 @@ export const ConversationApiFactory = function (configuration?: Configuration, f
46377
46533
  getConversationsSearch(search_request: ConversationSearchRequest, options?: any) {
46378
46534
  return ConversationApiFp(configuration).getConversationsSearch(search_request, options)(fetch, basePath);
46379
46535
  },
46536
+ /**
46537
+ * Get location data for engagement configuration
46538
+ * @summary Get location data for engagement configuration
46539
+ * @param {*} [options] Override http request option.
46540
+ * @throws {RequiredError}
46541
+ */
46542
+ getLocationsForEngagement(options?: any) {
46543
+ return ConversationApiFp(configuration).getLocationsForEngagement(options)(fetch, basePath);
46544
+ },
46380
46545
  /**
46381
46546
  * Insert a canned message
46382
46547
  * @summary Insert a canned message
@@ -46699,6 +46864,15 @@ export interface ConversationApiInterface {
46699
46864
  */
46700
46865
  getConversationsSearch(search_request: ConversationSearchRequest, options?: any): Promise<ConversationSearchResponse>;
46701
46866
 
46867
+ /**
46868
+ * Get location data for engagement configuration
46869
+ * @summary Get location data for engagement configuration
46870
+ * @param {*} [options] Override http request option.
46871
+ * @throws {RequiredError}
46872
+ * @memberof ConversationApiInterface
46873
+ */
46874
+ getLocationsForEngagement(options?: any): Promise<ConversationLocationsResponse>;
46875
+
46702
46876
  /**
46703
46877
  * Insert a canned message
46704
46878
  * @summary Insert a canned message
@@ -47059,6 +47233,17 @@ export class ConversationApi extends BaseAPI implements ConversationApiInterface
47059
47233
  return ConversationApiFp(this.configuration).getConversationsSearch(search_request, options)(this.fetch, this.basePath);
47060
47234
  }
47061
47235
 
47236
+ /**
47237
+ * Get location data for engagement configuration
47238
+ * @summary Get location data for engagement configuration
47239
+ * @param {*} [options] Override http request option.
47240
+ * @throws {RequiredError}
47241
+ * @memberof ConversationApi
47242
+ */
47243
+ public getLocationsForEngagement(options?: any) {
47244
+ return ConversationApiFp(this.configuration).getLocationsForEngagement(options)(this.fetch, this.basePath);
47245
+ }
47246
+
47062
47247
  /**
47063
47248
  * Insert a canned message
47064
47249
  * @summary Insert a canned message
package/dist/api.d.ts CHANGED
@@ -7545,6 +7545,87 @@ export interface ConversationJoinRequest {
7545
7545
  */
7546
7546
  participant_language_iso_code?: string;
7547
7547
  }
7548
+ /**
7549
+ *
7550
+ * @export
7551
+ * @interface ConversationLocationCountry
7552
+ */
7553
+ export interface ConversationLocationCountry {
7554
+ /**
7555
+ *
7556
+ * @type {string}
7557
+ * @memberof ConversationLocationCountry
7558
+ */
7559
+ iso2?: string;
7560
+ /**
7561
+ *
7562
+ * @type {string}
7563
+ * @memberof ConversationLocationCountry
7564
+ */
7565
+ name?: string;
7566
+ /**
7567
+ *
7568
+ * @type {Array<ConversationLocationStateProvince>}
7569
+ * @memberof ConversationLocationCountry
7570
+ */
7571
+ state_provinces?: Array<ConversationLocationStateProvince>;
7572
+ }
7573
+ /**
7574
+ *
7575
+ * @export
7576
+ * @interface ConversationLocationStateProvince
7577
+ */
7578
+ export interface ConversationLocationStateProvince {
7579
+ /**
7580
+ *
7581
+ * @type {string}
7582
+ * @memberof ConversationLocationStateProvince
7583
+ */
7584
+ abbreviation?: string;
7585
+ /**
7586
+ *
7587
+ * @type {string}
7588
+ * @memberof ConversationLocationStateProvince
7589
+ */
7590
+ name?: string;
7591
+ }
7592
+ /**
7593
+ *
7594
+ * @export
7595
+ * @interface ConversationLocationsResponse
7596
+ */
7597
+ export interface ConversationLocationsResponse {
7598
+ /**
7599
+ *
7600
+ * @type {Array<ConversationLocationCountry>}
7601
+ * @memberof ConversationLocationsResponse
7602
+ */
7603
+ countries?: Array<ConversationLocationCountry>;
7604
+ /**
7605
+ *
7606
+ * @type {ModelError}
7607
+ * @memberof ConversationLocationsResponse
7608
+ */
7609
+ error?: ModelError;
7610
+ /**
7611
+ *
7612
+ * @type {ResponseMetadata}
7613
+ * @memberof ConversationLocationsResponse
7614
+ */
7615
+ metadata?: ResponseMetadata;
7616
+ /**
7617
+ * Indicates if API call was successful
7618
+ * @type {boolean}
7619
+ * @memberof ConversationLocationsResponse
7620
+ */
7621
+ success?: boolean;
7622
+ /**
7623
+ *
7624
+ * @type {Warning}
7625
+ * @memberof ConversationLocationsResponse
7626
+ */
7627
+ warning?: Warning;
7628
+ }
7548
7629
  /**
7549
7630
  *
7550
7631
  * @export
@@ -8621,6 +8702,12 @@ export interface ConversationWebsocketMessage {
8621
8702
  * @memberof ConversationWebsocketMessage
8622
8703
  */
8623
8704
  event_conversation_closed?: ConversationSummary;
8705
+ /**
8706
+ *
8707
+ * @type {ConversationWebchatQueueStatusQueueEntry}
8708
+ * @memberof ConversationWebsocketMessage
8709
+ */
8710
+ event_engage_customer?: ConversationWebchatQueueStatusQueueEntry;
8624
8711
  /**
8625
8712
  *
8626
8713
  * @type {ConversationSummary}
@@ -39814,6 +39901,13 @@ export declare const ConversationApiFetchParamCreator: (configuration?: Configur
39814
39901
  * @throws {RequiredError}
39815
39902
  */
39816
39903
  getConversationsSearch(search_request: ConversationSearchRequest, options?: any): FetchArgs;
39904
+ /**
39905
+ * Get location data for engagement configuration
39906
+ * @summary Get location data for engagement configuration
39907
+ * @param {*} [options] Override http request option.
39908
+ * @throws {RequiredError}
39909
+ */
39910
+ getLocationsForEngagement(options?: any): FetchArgs;
39817
39911
  /**
39818
39912
  * Insert a canned message
39819
39913
  * @summary Insert a canned message
@@ -40071,6 +40165,13 @@ export declare const ConversationApiFp: (configuration?: Configuration) => {
40071
40165
  * @throws {RequiredError}
40072
40166
  */
40073
40167
  getConversationsSearch(search_request: ConversationSearchRequest, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationSearchResponse>;
40168
+ /**
40169
+ * Get location data for engagement configuration
40170
+ * @summary Get location data for engagement configuration
40171
+ * @param {*} [options] Override http request option.
40172
+ * @throws {RequiredError}
40173
+ */
40174
+ getLocationsForEngagement(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationLocationsResponse>;
40074
40175
  /**
40075
40176
  * Insert a canned message
40076
40177
  * @summary Insert a canned message
@@ -40328,6 +40429,13 @@ export declare const ConversationApiFactory: (configuration?: Configuration, fet
40328
40429
  * @throws {RequiredError}
40329
40430
  */
40330
40431
  getConversationsSearch(search_request: ConversationSearchRequest, options?: any): Promise<ConversationSearchResponse>;
40432
+ /**
40433
+ * Get location data for engagement configuration
40434
+ * @summary Get location data for engagement configuration
40435
+ * @param {*} [options] Override http request option.
40436
+ * @throws {RequiredError}
40437
+ */
40438
+ getLocationsForEngagement(options?: any): Promise<ConversationLocationsResponse>;
40331
40439
  /**
40332
40440
  * Insert a canned message
40333
40441
  * @summary Insert a canned message
@@ -40605,6 +40713,14 @@ export interface ConversationApiInterface {
40605
40713
  * @memberof ConversationApiInterface
40606
40714
  */
40607
40715
  getConversationsSearch(search_request: ConversationSearchRequest, options?: any): Promise<ConversationSearchResponse>;
40716
+ /**
40717
+ * Get location data for engagement configuration
40718
+ * @summary Get location data for engagement configuration
40719
+ * @param {*} [options] Override http request option.
40720
+ * @throws {RequiredError}
40721
+ * @memberof ConversationApiInterface
40722
+ */
40723
+ getLocationsForEngagement(options?: any): Promise<ConversationLocationsResponse>;
40608
40724
  /**
40609
40725
  * Insert a canned message
40610
40726
  * @summary Insert a canned message
@@ -40895,6 +41011,14 @@ export declare class ConversationApi extends BaseAPI implements ConversationApiI
40895
41011
  * @memberof ConversationApi
40896
41012
  */
40897
41013
  getConversationsSearch(search_request: ConversationSearchRequest, options?: any): Promise<ConversationSearchResponse>;
41014
+ /**
41015
+ * Get location data for engagement configuration
41016
+ * @summary Get location data for engagement configuration
41017
+ * @param {*} [options] Override http request option.
41018
+ * @throws {RequiredError}
41019
+ * @memberof ConversationApi
41020
+ */
41021
+ getLocationsForEngagement(options?: any): Promise<ConversationLocationsResponse>;
40898
41022
  /**
40899
41023
  * Insert a canned message
40900
41024
  * @summary Insert a canned message
package/dist/api.js CHANGED
@@ -7009,6 +7009,46 @@ var ConversationApiFetchParamCreator = function (configuration) {
7009
7009
  options: localVarRequestOptions,
7010
7010
  };
7011
7011
  },
7012
+ /**
7013
+ * Get location data for engagement configuration
7014
+ * @summary Get location data for engagement configuration
7015
+ * @param {*} [options] Override http request option.
7016
+ * @throws {RequiredError}
7017
+ */
7018
+ getLocationsForEngagement: function (options) {
7019
+ if (options === void 0) { options = {}; }
7020
+ var localVarPath = "/conversation/locations";
7021
+ var localVarUrlObj = url.parse(localVarPath, true);
7022
+ var localVarRequestOptions = Object.assign({ method: 'POST' }, options);
7023
+ var localVarHeaderParameter = {};
7024
+ var localVarQueryParameter = {};
7025
+ if (configuration && configuration.apiVersion) {
7026
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
7027
+ }
7028
+ // authentication ultraCartOauth required
7029
+ // oauth required
7030
+ if (configuration && configuration.accessToken) {
7031
+ var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
7032
+ ? configuration.accessToken("ultraCartOauth", ["conversation_read"])
7033
+ : configuration.accessToken;
7034
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
7035
+ }
7036
+ // authentication ultraCartSimpleApiKey required
7037
+ if (configuration && configuration.apiKey) {
7038
+ var localVarApiKeyValue = typeof configuration.apiKey === 'function'
7039
+ ? configuration.apiKey("x-ultracart-simple-key")
7040
+ : configuration.apiKey;
7041
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
7042
+ }
7043
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
7044
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
7045
+ delete localVarUrlObj.search;
7046
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
7047
+ return {
7048
+ url: url.format(localVarUrlObj),
7049
+ options: localVarRequestOptions,
7050
+ };
7051
+ },
7012
7052
  /**
7013
7053
  * Insert a canned message
7014
7054
  * @summary Insert a canned message
@@ -8032,6 +8072,27 @@ var ConversationApiFp = function (configuration) {
8032
8072
  });
8033
8073
  };
8034
8074
  },
8075
+ /**
8076
+ * Get location data for engagement configuration
8077
+ * @summary Get location data for engagement configuration
8078
+ * @param {*} [options] Override http request option.
8079
+ * @throws {RequiredError}
8080
+ */
8081
+ getLocationsForEngagement: function (options) {
8082
+ var localVarFetchArgs = (0, exports.ConversationApiFetchParamCreator)(configuration).getLocationsForEngagement(options);
8083
+ return function (fetch, basePath) {
8084
+ if (fetch === void 0) { fetch = portableFetch; }
8085
+ if (basePath === void 0) { basePath = BASE_PATH; }
8086
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
8087
+ if (response.status >= 200 && response.status < 300) {
8088
+ return response.json();
8089
+ }
8090
+ else {
8091
+ throw response;
8092
+ }
8093
+ });
8094
+ };
8095
+ },
8035
8096
  /**
8036
8097
  * Insert a canned message
8037
8098
  * @summary Insert a canned message
@@ -8498,6 +8559,15 @@ var ConversationApiFactory = function (configuration, fetch, basePath) {
8498
8559
  getConversationsSearch: function (search_request, options) {
8499
8560
  return (0, exports.ConversationApiFp)(configuration).getConversationsSearch(search_request, options)(fetch, basePath);
8500
8561
  },
8562
+ /**
8563
+ * Get location data for engagement configuration
8564
+ * @summary Get location data for engagement configuration
8565
+ * @param {*} [options] Override http request option.
8566
+ * @throws {RequiredError}
8567
+ */
8568
+ getLocationsForEngagement: function (options) {
8569
+ return (0, exports.ConversationApiFp)(configuration).getLocationsForEngagement(options)(fetch, basePath);
8570
+ },
8501
8571
  /**
8502
8572
  * Insert a canned message
8503
8573
  * @summary Insert a canned message
@@ -8844,6 +8914,16 @@ var ConversationApi = /** @class */ (function (_super) {
8844
8914
  ConversationApi.prototype.getConversationsSearch = function (search_request, options) {
8845
8915
  return (0, exports.ConversationApiFp)(this.configuration).getConversationsSearch(search_request, options)(this.fetch, this.basePath);
8846
8916
  };
8917
+ /**
8918
+ * Get location data for engagement configuration
8919
+ * @summary Get location data for engagement configuration
8920
+ * @param {*} [options] Override http request option.
8921
+ * @throws {RequiredError}
8922
+ * @memberof ConversationApi
8923
+ */
8924
+ ConversationApi.prototype.getLocationsForEngagement = function (options) {
8925
+ return (0, exports.ConversationApiFp)(this.configuration).getLocationsForEngagement(options)(this.fetch, this.basePath);
8926
+ };
8847
8927
  /**
8848
8928
  * Insert a canned message
8849
8929
  * @summary Insert a canned message
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "3.10.109",
3
+ "version": "3.10.111",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "keywords": [