ultracart_rest_api_v2_typescript 3.10.46 → 3.10.47

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.46
1
+ ## ultracart_rest_api_v2_typescript@3.10.47
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.46 --save
39
+ npm install ultracart_rest_api_v2_typescript@3.10.47 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -54,6 +54,7 @@ Not every change is committed to every SDK.
54
54
 
55
55
  | Version | Date | Comments |
56
56
  | --: | :-: | --- |
57
+ | 3.10.47 | 09/19/2022 | conversations pagination |
57
58
  | 3.10.46 | 09/13/2022 | storefront comms - postcard tracking |
58
59
  | 3.10.45 | 09/12/2022 | storefront comm - send back reviews.io configured flag on getEmailSettings |
59
60
  | 3.10.44 | 09/07/2022 | sf comms - using aws event ruler for bigquery segmentation validation |
package/api.ts CHANGED
@@ -6730,6 +6730,44 @@ export namespace ConversationMessageTransportStatus {
6730
6730
  }
6731
6731
  }
6732
6732
 
6733
+ /**
6734
+ *
6735
+ * @export
6736
+ * @interface ConversationMessagesResponse
6737
+ */
6738
+ export interface ConversationMessagesResponse {
6739
+ /**
6740
+ *
6741
+ * @type {Array<ConversationMessage>}
6742
+ * @memberof ConversationMessagesResponse
6743
+ */
6744
+ conversation_messages?: Array<ConversationMessage>;
6745
+ /**
6746
+ *
6747
+ * @type {ModelError}
6748
+ * @memberof ConversationMessagesResponse
6749
+ */
6750
+ error?: ModelError;
6751
+ /**
6752
+ *
6753
+ * @type {ResponseMetadata}
6754
+ * @memberof ConversationMessagesResponse
6755
+ */
6756
+ metadata?: ResponseMetadata;
6757
+ /**
6758
+ * Indicates if API call was successful
6759
+ * @type {boolean}
6760
+ * @memberof ConversationMessagesResponse
6761
+ */
6762
+ success?: boolean;
6763
+ /**
6764
+ *
6765
+ * @type {Warning}
6766
+ * @memberof ConversationMessagesResponse
6767
+ */
6768
+ warning?: Warning;
6769
+ }
6770
+
6733
6771
  /**
6734
6772
  *
6735
6773
  * @export
@@ -40049,6 +40087,52 @@ export class CheckoutApi extends BaseAPI implements CheckoutApiInterface {
40049
40087
  */
40050
40088
  export const ConversationApiFetchParamCreator = function (configuration?: Configuration) {
40051
40089
  return {
40090
+ /**
40091
+ * Called periodically by the conversation API to keep the session alive.
40092
+ * @summary Agent keep alive
40093
+ * @param {*} [options] Override http request option.
40094
+ * @throws {RequiredError}
40095
+ */
40096
+ getAgentKeepAlive(options: any = {}): FetchArgs {
40097
+ const localVarPath = `/conversation/agent/keepalive`;
40098
+ const localVarUrlObj = url.parse(localVarPath, true);
40099
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
40100
+ const localVarHeaderParameter = {} as any;
40101
+ const localVarQueryParameter = {} as any;
40102
+
40103
+ if(configuration && configuration.apiVersion) {
40104
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
40105
+ }
40106
+
40107
+
40108
+
40109
+ // authentication ultraCartOauth required
40110
+ // oauth required
40111
+ if (configuration && configuration.accessToken) {
40112
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
40113
+ ? configuration.accessToken("ultraCartOauth", ["conversation_write"])
40114
+ : configuration.accessToken;
40115
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
40116
+ }
40117
+
40118
+ // authentication ultraCartSimpleApiKey required
40119
+ if (configuration && configuration.apiKey) {
40120
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
40121
+ ? configuration.apiKey("x-ultracart-simple-key")
40122
+ : configuration.apiKey;
40123
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
40124
+ }
40125
+
40126
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
40127
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
40128
+ delete localVarUrlObj.search;
40129
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
40130
+
40131
+ return {
40132
+ url: url.format(localVarUrlObj),
40133
+ options: localVarRequestOptions,
40134
+ };
40135
+ },
40052
40136
  /**
40053
40137
  * Retrieve a JWT to authorize an agent to make a websocket connection.
40054
40138
  * @summary Get agent websocket authorization
@@ -40099,10 +40183,11 @@ export const ConversationApiFetchParamCreator = function (configuration?: Config
40099
40183
  * Retrieve a conversation including the participants and messages
40100
40184
  * @summary Retrieve a conversation
40101
40185
  * @param {string} conversation_uuid
40186
+ * @param {number} [limit]
40102
40187
  * @param {*} [options] Override http request option.
40103
40188
  * @throws {RequiredError}
40104
40189
  */
40105
- getConversation(conversation_uuid: string, options: any = {}): FetchArgs {
40190
+ getConversation(conversation_uuid: string, limit?: number, options: any = {}): FetchArgs {
40106
40191
  // verify required parameter 'conversation_uuid' is not null or undefined
40107
40192
  if (conversation_uuid === null || conversation_uuid === undefined) {
40108
40193
  throw new RequiredError('conversation_uuid','Required parameter conversation_uuid was null or undefined when calling getConversation.');
@@ -40137,6 +40222,73 @@ export const ConversationApiFetchParamCreator = function (configuration?: Config
40137
40222
  localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
40138
40223
  }
40139
40224
 
40225
+ if (limit !== undefined) {
40226
+ localVarQueryParameter['limit'] = limit;
40227
+ }
40228
+
40229
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
40230
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
40231
+ delete localVarUrlObj.search;
40232
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
40233
+
40234
+ return {
40235
+ url: url.format(localVarUrlObj),
40236
+ options: localVarRequestOptions,
40237
+ };
40238
+ },
40239
+ /**
40240
+ * Retrieve conversation messages since a particular time
40241
+ * @summary Retrieve conversation messages
40242
+ * @param {string} conversation_uuid
40243
+ * @param {number} since
40244
+ * @param {number} [limit]
40245
+ * @param {*} [options] Override http request option.
40246
+ * @throws {RequiredError}
40247
+ */
40248
+ getConversationMessages(conversation_uuid: string, since: number, limit?: number, options: any = {}): FetchArgs {
40249
+ // verify required parameter 'conversation_uuid' is not null or undefined
40250
+ if (conversation_uuid === null || conversation_uuid === undefined) {
40251
+ throw new RequiredError('conversation_uuid','Required parameter conversation_uuid was null or undefined when calling getConversationMessages.');
40252
+ }
40253
+ // verify required parameter 'since' is not null or undefined
40254
+ if (since === null || since === undefined) {
40255
+ throw new RequiredError('since','Required parameter since was null or undefined when calling getConversationMessages.');
40256
+ }
40257
+ const localVarPath = `/conversation/conversations/{conversation_uuid}/messages/{since}`
40258
+ .replace(`{${"conversation_uuid"}}`, encodeURIComponent(String(conversation_uuid)))
40259
+ .replace(`{${"since"}}`, encodeURIComponent(String(since)));
40260
+ const localVarUrlObj = url.parse(localVarPath, true);
40261
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
40262
+ const localVarHeaderParameter = {} as any;
40263
+ const localVarQueryParameter = {} as any;
40264
+
40265
+ if(configuration && configuration.apiVersion) {
40266
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
40267
+ }
40268
+
40269
+
40270
+
40271
+ // authentication ultraCartOauth required
40272
+ // oauth required
40273
+ if (configuration && configuration.accessToken) {
40274
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
40275
+ ? configuration.accessToken("ultraCartOauth", ["conversation_read"])
40276
+ : configuration.accessToken;
40277
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
40278
+ }
40279
+
40280
+ // authentication ultraCartSimpleApiKey required
40281
+ if (configuration && configuration.apiKey) {
40282
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
40283
+ ? configuration.apiKey("x-ultracart-simple-key")
40284
+ : configuration.apiKey;
40285
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
40286
+ }
40287
+
40288
+ if (limit !== undefined) {
40289
+ localVarQueryParameter['limit'] = limit;
40290
+ }
40291
+
40140
40292
  localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
40141
40293
  // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
40142
40294
  delete localVarUrlObj.search;
@@ -40535,6 +40687,26 @@ export const ConversationApiFetchParamCreator = function (configuration?: Config
40535
40687
  */
40536
40688
  export const ConversationApiFp = function(configuration?: Configuration) {
40537
40689
  return {
40690
+ /**
40691
+ * Called periodically by the conversation API to keep the session alive.
40692
+ * @summary Agent keep alive
40693
+ * @param {*} [options] Override http request option.
40694
+ * @throws {RequiredError}
40695
+ */
40696
+ getAgentKeepAlive(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response> {
40697
+ const localVarFetchArgs = ConversationApiFetchParamCreator(configuration).getAgentKeepAlive(options);
40698
+ return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
40699
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
40700
+
40701
+ if (response.status >= 200 && response.status < 300) {
40702
+ return response;
40703
+
40704
+ } else {
40705
+ throw response;
40706
+ }
40707
+ });
40708
+ };
40709
+ },
40538
40710
  /**
40539
40711
  * Retrieve a JWT to authorize an agent to make a websocket connection.
40540
40712
  * @summary Get agent websocket authorization
@@ -40559,11 +40731,35 @@ export const ConversationApiFp = function(configuration?: Configuration) {
40559
40731
  * Retrieve a conversation including the participants and messages
40560
40732
  * @summary Retrieve a conversation
40561
40733
  * @param {string} conversation_uuid
40734
+ * @param {number} [limit]
40735
+ * @param {*} [options] Override http request option.
40736
+ * @throws {RequiredError}
40737
+ */
40738
+ getConversation(conversation_uuid: string, limit?: number, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationResponse> {
40739
+ const localVarFetchArgs = ConversationApiFetchParamCreator(configuration).getConversation(conversation_uuid, limit, options);
40740
+ return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
40741
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
40742
+
40743
+ if (response.status >= 200 && response.status < 300) {
40744
+ return response.json();
40745
+
40746
+ } else {
40747
+ throw response;
40748
+ }
40749
+ });
40750
+ };
40751
+ },
40752
+ /**
40753
+ * Retrieve conversation messages since a particular time
40754
+ * @summary Retrieve conversation messages
40755
+ * @param {string} conversation_uuid
40756
+ * @param {number} since
40757
+ * @param {number} [limit]
40562
40758
  * @param {*} [options] Override http request option.
40563
40759
  * @throws {RequiredError}
40564
40760
  */
40565
- getConversation(conversation_uuid: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationResponse> {
40566
- const localVarFetchArgs = ConversationApiFetchParamCreator(configuration).getConversation(conversation_uuid, options);
40761
+ getConversationMessages(conversation_uuid: string, since: number, limit?: number, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationMessagesResponse> {
40762
+ const localVarFetchArgs = ConversationApiFetchParamCreator(configuration).getConversationMessages(conversation_uuid, since, limit, options);
40567
40763
  return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
40568
40764
  return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
40569
40765
 
@@ -40734,6 +40930,15 @@ export const ConversationApiFp = function(configuration?: Configuration) {
40734
40930
  */
40735
40931
  export const ConversationApiFactory = function (configuration?: Configuration, fetch?: FetchAPI, basePath?: string) {
40736
40932
  return {
40933
+ /**
40934
+ * Called periodically by the conversation API to keep the session alive.
40935
+ * @summary Agent keep alive
40936
+ * @param {*} [options] Override http request option.
40937
+ * @throws {RequiredError}
40938
+ */
40939
+ getAgentKeepAlive(options?: any) {
40940
+ return ConversationApiFp(configuration).getAgentKeepAlive(options)(fetch, basePath);
40941
+ },
40737
40942
  /**
40738
40943
  * Retrieve a JWT to authorize an agent to make a websocket connection.
40739
40944
  * @summary Get agent websocket authorization
@@ -40747,11 +40952,24 @@ export const ConversationApiFactory = function (configuration?: Configuration, f
40747
40952
  * Retrieve a conversation including the participants and messages
40748
40953
  * @summary Retrieve a conversation
40749
40954
  * @param {string} conversation_uuid
40955
+ * @param {number} [limit]
40956
+ * @param {*} [options] Override http request option.
40957
+ * @throws {RequiredError}
40958
+ */
40959
+ getConversation(conversation_uuid: string, limit?: number, options?: any) {
40960
+ return ConversationApiFp(configuration).getConversation(conversation_uuid, limit, options)(fetch, basePath);
40961
+ },
40962
+ /**
40963
+ * Retrieve conversation messages since a particular time
40964
+ * @summary Retrieve conversation messages
40965
+ * @param {string} conversation_uuid
40966
+ * @param {number} since
40967
+ * @param {number} [limit]
40750
40968
  * @param {*} [options] Override http request option.
40751
40969
  * @throws {RequiredError}
40752
40970
  */
40753
- getConversation(conversation_uuid: string, options?: any) {
40754
- return ConversationApiFp(configuration).getConversation(conversation_uuid, options)(fetch, basePath);
40971
+ getConversationMessages(conversation_uuid: string, since: number, limit?: number, options?: any) {
40972
+ return ConversationApiFp(configuration).getConversationMessages(conversation_uuid, since, limit, options)(fetch, basePath);
40755
40973
  },
40756
40974
  /**
40757
40975
  * Get a presigned conersation multimedia upload URL
@@ -40834,6 +41052,15 @@ export const ConversationApiFactory = function (configuration?: Configuration, f
40834
41052
  * @interface ConversationApi
40835
41053
  */
40836
41054
  export interface ConversationApiInterface {
41055
+ /**
41056
+ * Called periodically by the conversation API to keep the session alive.
41057
+ * @summary Agent keep alive
41058
+ * @param {*} [options] Override http request option.
41059
+ * @throws {RequiredError}
41060
+ * @memberof ConversationApiInterface
41061
+ */
41062
+ getAgentKeepAlive(options?: any): Promise<{}>;
41063
+
40837
41064
  /**
40838
41065
  * Retrieve a JWT to authorize an agent to make a websocket connection.
40839
41066
  * @summary Get agent websocket authorization
@@ -40847,11 +41074,24 @@ export interface ConversationApiInterface {
40847
41074
  * Retrieve a conversation including the participants and messages
40848
41075
  * @summary Retrieve a conversation
40849
41076
  * @param {string} conversation_uuid
41077
+ * @param {number} [limit]
40850
41078
  * @param {*} [options] Override http request option.
40851
41079
  * @throws {RequiredError}
40852
41080
  * @memberof ConversationApiInterface
40853
41081
  */
40854
- getConversation(conversation_uuid: string, options?: any): Promise<ConversationResponse>;
41082
+ getConversation(conversation_uuid: string, limit?: number, options?: any): Promise<ConversationResponse>;
41083
+
41084
+ /**
41085
+ * Retrieve conversation messages since a particular time
41086
+ * @summary Retrieve conversation messages
41087
+ * @param {string} conversation_uuid
41088
+ * @param {number} since
41089
+ * @param {number} [limit]
41090
+ * @param {*} [options] Override http request option.
41091
+ * @throws {RequiredError}
41092
+ * @memberof ConversationApiInterface
41093
+ */
41094
+ getConversationMessages(conversation_uuid: string, since: number, limit?: number, options?: any): Promise<ConversationMessagesResponse>;
40855
41095
 
40856
41096
  /**
40857
41097
  * Get a presigned conersation multimedia upload URL
@@ -40934,6 +41174,17 @@ export interface ConversationApiInterface {
40934
41174
  * @extends {BaseAPI}
40935
41175
  */
40936
41176
  export class ConversationApi extends BaseAPI implements ConversationApiInterface {
41177
+ /**
41178
+ * Called periodically by the conversation API to keep the session alive.
41179
+ * @summary Agent keep alive
41180
+ * @param {*} [options] Override http request option.
41181
+ * @throws {RequiredError}
41182
+ * @memberof ConversationApi
41183
+ */
41184
+ public getAgentKeepAlive(options?: any) {
41185
+ return ConversationApiFp(this.configuration).getAgentKeepAlive(options)(this.fetch, this.basePath);
41186
+ }
41187
+
40937
41188
  /**
40938
41189
  * Retrieve a JWT to authorize an agent to make a websocket connection.
40939
41190
  * @summary Get agent websocket authorization
@@ -40949,12 +41200,27 @@ export class ConversationApi extends BaseAPI implements ConversationApiInterface
40949
41200
  * Retrieve a conversation including the participants and messages
40950
41201
  * @summary Retrieve a conversation
40951
41202
  * @param {string} conversation_uuid
41203
+ * @param {number} [limit]
41204
+ * @param {*} [options] Override http request option.
41205
+ * @throws {RequiredError}
41206
+ * @memberof ConversationApi
41207
+ */
41208
+ public getConversation(conversation_uuid: string, limit?: number, options?: any) {
41209
+ return ConversationApiFp(this.configuration).getConversation(conversation_uuid, limit, options)(this.fetch, this.basePath);
41210
+ }
41211
+
41212
+ /**
41213
+ * Retrieve conversation messages since a particular time
41214
+ * @summary Retrieve conversation messages
41215
+ * @param {string} conversation_uuid
41216
+ * @param {number} since
41217
+ * @param {number} [limit]
40952
41218
  * @param {*} [options] Override http request option.
40953
41219
  * @throws {RequiredError}
40954
41220
  * @memberof ConversationApi
40955
41221
  */
40956
- public getConversation(conversation_uuid: string, options?: any) {
40957
- return ConversationApiFp(this.configuration).getConversation(conversation_uuid, options)(this.fetch, this.basePath);
41222
+ public getConversationMessages(conversation_uuid: string, since: number, limit?: number, options?: any) {
41223
+ return ConversationApiFp(this.configuration).getConversationMessages(conversation_uuid, since, limit, options)(this.fetch, this.basePath);
40958
41224
  }
40959
41225
 
40960
41226
  /**
package/dist/api.d.ts CHANGED
@@ -6570,6 +6570,43 @@ export declare namespace ConversationMessageTransportStatus {
6570
6570
  PINPOINTERROR
6571
6571
  }
6572
6572
  }
6573
+ /**
6574
+ *
6575
+ * @export
6576
+ * @interface ConversationMessagesResponse
6577
+ */
6578
+ export interface ConversationMessagesResponse {
6579
+ /**
6580
+ *
6581
+ * @type {Array<ConversationMessage>}
6582
+ * @memberof ConversationMessagesResponse
6583
+ */
6584
+ conversation_messages?: Array<ConversationMessage>;
6585
+ /**
6586
+ *
6587
+ * @type {ModelError}
6588
+ * @memberof ConversationMessagesResponse
6589
+ */
6590
+ error?: ModelError;
6591
+ /**
6592
+ *
6593
+ * @type {ResponseMetadata}
6594
+ * @memberof ConversationMessagesResponse
6595
+ */
6596
+ metadata?: ResponseMetadata;
6597
+ /**
6598
+ * Indicates if API call was successful
6599
+ * @type {boolean}
6600
+ * @memberof ConversationMessagesResponse
6601
+ */
6602
+ success?: boolean;
6603
+ /**
6604
+ *
6605
+ * @type {Warning}
6606
+ * @memberof ConversationMessagesResponse
6607
+ */
6608
+ warning?: Warning;
6609
+ }
6573
6610
  /**
6574
6611
  *
6575
6612
  * @export
@@ -36324,6 +36361,13 @@ export declare class CheckoutApi extends BaseAPI implements CheckoutApiInterface
36324
36361
  * @export
36325
36362
  */
36326
36363
  export declare const ConversationApiFetchParamCreator: (configuration?: Configuration) => {
36364
+ /**
36365
+ * Called periodically by the conversation API to keep the session alive.
36366
+ * @summary Agent keep alive
36367
+ * @param {*} [options] Override http request option.
36368
+ * @throws {RequiredError}
36369
+ */
36370
+ getAgentKeepAlive(options?: any): FetchArgs;
36327
36371
  /**
36328
36372
  * Retrieve a JWT to authorize an agent to make a websocket connection.
36329
36373
  * @summary Get agent websocket authorization
@@ -36335,10 +36379,21 @@ export declare const ConversationApiFetchParamCreator: (configuration?: Configur
36335
36379
  * Retrieve a conversation including the participants and messages
36336
36380
  * @summary Retrieve a conversation
36337
36381
  * @param {string} conversation_uuid
36382
+ * @param {number} [limit]
36338
36383
  * @param {*} [options] Override http request option.
36339
36384
  * @throws {RequiredError}
36340
36385
  */
36341
- getConversation(conversation_uuid: string, options?: any): FetchArgs;
36386
+ getConversation(conversation_uuid: string, limit?: number, options?: any): FetchArgs;
36387
+ /**
36388
+ * Retrieve conversation messages since a particular time
36389
+ * @summary Retrieve conversation messages
36390
+ * @param {string} conversation_uuid
36391
+ * @param {number} since
36392
+ * @param {number} [limit]
36393
+ * @param {*} [options] Override http request option.
36394
+ * @throws {RequiredError}
36395
+ */
36396
+ getConversationMessages(conversation_uuid: string, since: number, limit?: number, options?: any): FetchArgs;
36342
36397
  /**
36343
36398
  * Get a presigned conersation multimedia upload URL
36344
36399
  * @summary Get a presigned conersation multimedia upload URL
@@ -36403,6 +36458,13 @@ export declare const ConversationApiFetchParamCreator: (configuration?: Configur
36403
36458
  * @export
36404
36459
  */
36405
36460
  export declare const ConversationApiFp: (configuration?: Configuration) => {
36461
+ /**
36462
+ * Called periodically by the conversation API to keep the session alive.
36463
+ * @summary Agent keep alive
36464
+ * @param {*} [options] Override http request option.
36465
+ * @throws {RequiredError}
36466
+ */
36467
+ getAgentKeepAlive(options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response>;
36406
36468
  /**
36407
36469
  * Retrieve a JWT to authorize an agent to make a websocket connection.
36408
36470
  * @summary Get agent websocket authorization
@@ -36414,10 +36476,21 @@ export declare const ConversationApiFp: (configuration?: Configuration) => {
36414
36476
  * Retrieve a conversation including the participants and messages
36415
36477
  * @summary Retrieve a conversation
36416
36478
  * @param {string} conversation_uuid
36479
+ * @param {number} [limit]
36417
36480
  * @param {*} [options] Override http request option.
36418
36481
  * @throws {RequiredError}
36419
36482
  */
36420
- getConversation(conversation_uuid: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationResponse>;
36483
+ getConversation(conversation_uuid: string, limit?: number, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationResponse>;
36484
+ /**
36485
+ * Retrieve conversation messages since a particular time
36486
+ * @summary Retrieve conversation messages
36487
+ * @param {string} conversation_uuid
36488
+ * @param {number} since
36489
+ * @param {number} [limit]
36490
+ * @param {*} [options] Override http request option.
36491
+ * @throws {RequiredError}
36492
+ */
36493
+ getConversationMessages(conversation_uuid: string, since: number, limit?: number, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationMessagesResponse>;
36421
36494
  /**
36422
36495
  * Get a presigned conersation multimedia upload URL
36423
36496
  * @summary Get a presigned conersation multimedia upload URL
@@ -36482,6 +36555,13 @@ export declare const ConversationApiFp: (configuration?: Configuration) => {
36482
36555
  * @export
36483
36556
  */
36484
36557
  export declare const ConversationApiFactory: (configuration?: Configuration, fetch?: FetchAPI, basePath?: string) => {
36558
+ /**
36559
+ * Called periodically by the conversation API to keep the session alive.
36560
+ * @summary Agent keep alive
36561
+ * @param {*} [options] Override http request option.
36562
+ * @throws {RequiredError}
36563
+ */
36564
+ getAgentKeepAlive(options?: any): Promise<Response>;
36485
36565
  /**
36486
36566
  * Retrieve a JWT to authorize an agent to make a websocket connection.
36487
36567
  * @summary Get agent websocket authorization
@@ -36493,10 +36573,21 @@ export declare const ConversationApiFactory: (configuration?: Configuration, fet
36493
36573
  * Retrieve a conversation including the participants and messages
36494
36574
  * @summary Retrieve a conversation
36495
36575
  * @param {string} conversation_uuid
36576
+ * @param {number} [limit]
36496
36577
  * @param {*} [options] Override http request option.
36497
36578
  * @throws {RequiredError}
36498
36579
  */
36499
- getConversation(conversation_uuid: string, options?: any): Promise<ConversationResponse>;
36580
+ getConversation(conversation_uuid: string, limit?: number, options?: any): Promise<ConversationResponse>;
36581
+ /**
36582
+ * Retrieve conversation messages since a particular time
36583
+ * @summary Retrieve conversation messages
36584
+ * @param {string} conversation_uuid
36585
+ * @param {number} since
36586
+ * @param {number} [limit]
36587
+ * @param {*} [options] Override http request option.
36588
+ * @throws {RequiredError}
36589
+ */
36590
+ getConversationMessages(conversation_uuid: string, since: number, limit?: number, options?: any): Promise<ConversationMessagesResponse>;
36500
36591
  /**
36501
36592
  * Get a presigned conersation multimedia upload URL
36502
36593
  * @summary Get a presigned conersation multimedia upload URL
@@ -36562,6 +36653,14 @@ export declare const ConversationApiFactory: (configuration?: Configuration, fet
36562
36653
  * @interface ConversationApi
36563
36654
  */
36564
36655
  export interface ConversationApiInterface {
36656
+ /**
36657
+ * Called periodically by the conversation API to keep the session alive.
36658
+ * @summary Agent keep alive
36659
+ * @param {*} [options] Override http request option.
36660
+ * @throws {RequiredError}
36661
+ * @memberof ConversationApiInterface
36662
+ */
36663
+ getAgentKeepAlive(options?: any): Promise<{}>;
36565
36664
  /**
36566
36665
  * Retrieve a JWT to authorize an agent to make a websocket connection.
36567
36666
  * @summary Get agent websocket authorization
@@ -36574,11 +36673,23 @@ export interface ConversationApiInterface {
36574
36673
  * Retrieve a conversation including the participants and messages
36575
36674
  * @summary Retrieve a conversation
36576
36675
  * @param {string} conversation_uuid
36676
+ * @param {number} [limit]
36577
36677
  * @param {*} [options] Override http request option.
36578
36678
  * @throws {RequiredError}
36579
36679
  * @memberof ConversationApiInterface
36580
36680
  */
36581
- getConversation(conversation_uuid: string, options?: any): Promise<ConversationResponse>;
36681
+ getConversation(conversation_uuid: string, limit?: number, options?: any): Promise<ConversationResponse>;
36682
+ /**
36683
+ * Retrieve conversation messages since a particular time
36684
+ * @summary Retrieve conversation messages
36685
+ * @param {string} conversation_uuid
36686
+ * @param {number} since
36687
+ * @param {number} [limit]
36688
+ * @param {*} [options] Override http request option.
36689
+ * @throws {RequiredError}
36690
+ * @memberof ConversationApiInterface
36691
+ */
36692
+ getConversationMessages(conversation_uuid: string, since: number, limit?: number, options?: any): Promise<ConversationMessagesResponse>;
36582
36693
  /**
36583
36694
  * Get a presigned conersation multimedia upload URL
36584
36695
  * @summary Get a presigned conersation multimedia upload URL
@@ -36652,6 +36763,14 @@ export interface ConversationApiInterface {
36652
36763
  * @extends {BaseAPI}
36653
36764
  */
36654
36765
  export declare class ConversationApi extends BaseAPI implements ConversationApiInterface {
36766
+ /**
36767
+ * Called periodically by the conversation API to keep the session alive.
36768
+ * @summary Agent keep alive
36769
+ * @param {*} [options] Override http request option.
36770
+ * @throws {RequiredError}
36771
+ * @memberof ConversationApi
36772
+ */
36773
+ getAgentKeepAlive(options?: any): Promise<Response>;
36655
36774
  /**
36656
36775
  * Retrieve a JWT to authorize an agent to make a websocket connection.
36657
36776
  * @summary Get agent websocket authorization
@@ -36664,11 +36783,23 @@ export declare class ConversationApi extends BaseAPI implements ConversationApiI
36664
36783
  * Retrieve a conversation including the participants and messages
36665
36784
  * @summary Retrieve a conversation
36666
36785
  * @param {string} conversation_uuid
36786
+ * @param {number} [limit]
36787
+ * @param {*} [options] Override http request option.
36788
+ * @throws {RequiredError}
36789
+ * @memberof ConversationApi
36790
+ */
36791
+ getConversation(conversation_uuid: string, limit?: number, options?: any): Promise<ConversationResponse>;
36792
+ /**
36793
+ * Retrieve conversation messages since a particular time
36794
+ * @summary Retrieve conversation messages
36795
+ * @param {string} conversation_uuid
36796
+ * @param {number} since
36797
+ * @param {number} [limit]
36667
36798
  * @param {*} [options] Override http request option.
36668
36799
  * @throws {RequiredError}
36669
36800
  * @memberof ConversationApi
36670
36801
  */
36671
- getConversation(conversation_uuid: string, options?: any): Promise<ConversationResponse>;
36802
+ getConversationMessages(conversation_uuid: string, since: number, limit?: number, options?: any): Promise<ConversationMessagesResponse>;
36672
36803
  /**
36673
36804
  * Get a presigned conersation multimedia upload URL
36674
36805
  * @summary Get a presigned conersation multimedia upload URL
package/dist/api.js CHANGED
@@ -5437,6 +5437,46 @@ exports.CheckoutApi = CheckoutApi;
5437
5437
  */
5438
5438
  var ConversationApiFetchParamCreator = function (configuration) {
5439
5439
  return {
5440
+ /**
5441
+ * Called periodically by the conversation API to keep the session alive.
5442
+ * @summary Agent keep alive
5443
+ * @param {*} [options] Override http request option.
5444
+ * @throws {RequiredError}
5445
+ */
5446
+ getAgentKeepAlive: function (options) {
5447
+ if (options === void 0) { options = {}; }
5448
+ var localVarPath = "/conversation/agent/keepalive";
5449
+ var localVarUrlObj = url.parse(localVarPath, true);
5450
+ var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
5451
+ var localVarHeaderParameter = {};
5452
+ var localVarQueryParameter = {};
5453
+ if (configuration && configuration.apiVersion) {
5454
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
5455
+ }
5456
+ // authentication ultraCartOauth required
5457
+ // oauth required
5458
+ if (configuration && configuration.accessToken) {
5459
+ var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
5460
+ ? configuration.accessToken("ultraCartOauth", ["conversation_write"])
5461
+ : configuration.accessToken;
5462
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
5463
+ }
5464
+ // authentication ultraCartSimpleApiKey required
5465
+ if (configuration && configuration.apiKey) {
5466
+ var localVarApiKeyValue = typeof configuration.apiKey === 'function'
5467
+ ? configuration.apiKey("x-ultracart-simple-key")
5468
+ : configuration.apiKey;
5469
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
5470
+ }
5471
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
5472
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
5473
+ delete localVarUrlObj.search;
5474
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
5475
+ return {
5476
+ url: url.format(localVarUrlObj),
5477
+ options: localVarRequestOptions,
5478
+ };
5479
+ },
5440
5480
  /**
5441
5481
  * Retrieve a JWT to authorize an agent to make a websocket connection.
5442
5482
  * @summary Get agent websocket authorization
@@ -5481,10 +5521,11 @@ var ConversationApiFetchParamCreator = function (configuration) {
5481
5521
  * Retrieve a conversation including the participants and messages
5482
5522
  * @summary Retrieve a conversation
5483
5523
  * @param {string} conversation_uuid
5524
+ * @param {number} [limit]
5484
5525
  * @param {*} [options] Override http request option.
5485
5526
  * @throws {RequiredError}
5486
5527
  */
5487
- getConversation: function (conversation_uuid, options) {
5528
+ getConversation: function (conversation_uuid, limit, options) {
5488
5529
  if (options === void 0) { options = {}; }
5489
5530
  // verify required parameter 'conversation_uuid' is not null or undefined
5490
5531
  if (conversation_uuid === null || conversation_uuid === undefined) {
@@ -5514,6 +5555,65 @@ var ConversationApiFetchParamCreator = function (configuration) {
5514
5555
  : configuration.apiKey;
5515
5556
  localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
5516
5557
  }
5558
+ if (limit !== undefined) {
5559
+ localVarQueryParameter['limit'] = limit;
5560
+ }
5561
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
5562
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
5563
+ delete localVarUrlObj.search;
5564
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
5565
+ return {
5566
+ url: url.format(localVarUrlObj),
5567
+ options: localVarRequestOptions,
5568
+ };
5569
+ },
5570
+ /**
5571
+ * Retrieve conversation messages since a particular time
5572
+ * @summary Retrieve conversation messages
5573
+ * @param {string} conversation_uuid
5574
+ * @param {number} since
5575
+ * @param {number} [limit]
5576
+ * @param {*} [options] Override http request option.
5577
+ * @throws {RequiredError}
5578
+ */
5579
+ getConversationMessages: function (conversation_uuid, since, limit, options) {
5580
+ if (options === void 0) { options = {}; }
5581
+ // verify required parameter 'conversation_uuid' is not null or undefined
5582
+ if (conversation_uuid === null || conversation_uuid === undefined) {
5583
+ throw new RequiredError('conversation_uuid', 'Required parameter conversation_uuid was null or undefined when calling getConversationMessages.');
5584
+ }
5585
+ // verify required parameter 'since' is not null or undefined
5586
+ if (since === null || since === undefined) {
5587
+ throw new RequiredError('since', 'Required parameter since was null or undefined when calling getConversationMessages.');
5588
+ }
5589
+ var localVarPath = "/conversation/conversations/{conversation_uuid}/messages/{since}"
5590
+ .replace("{".concat("conversation_uuid", "}"), encodeURIComponent(String(conversation_uuid)))
5591
+ .replace("{".concat("since", "}"), encodeURIComponent(String(since)));
5592
+ var localVarUrlObj = url.parse(localVarPath, true);
5593
+ var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
5594
+ var localVarHeaderParameter = {};
5595
+ var localVarQueryParameter = {};
5596
+ if (configuration && configuration.apiVersion) {
5597
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
5598
+ }
5599
+ // authentication ultraCartOauth required
5600
+ // oauth required
5601
+ if (configuration && configuration.accessToken) {
5602
+ var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
5603
+ ? configuration.accessToken("ultraCartOauth", ["conversation_read"])
5604
+ : configuration.accessToken;
5605
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
5606
+ }
5607
+ // authentication ultraCartSimpleApiKey required
5608
+ if (configuration && configuration.apiKey) {
5609
+ var localVarApiKeyValue = typeof configuration.apiKey === 'function'
5610
+ ? configuration.apiKey("x-ultracart-simple-key")
5611
+ : configuration.apiKey;
5612
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
5613
+ }
5614
+ if (limit !== undefined) {
5615
+ localVarQueryParameter['limit'] = limit;
5616
+ }
5517
5617
  localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
5518
5618
  // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
5519
5619
  delete localVarUrlObj.search;
@@ -5864,6 +5964,27 @@ exports.ConversationApiFetchParamCreator = ConversationApiFetchParamCreator;
5864
5964
  */
5865
5965
  var ConversationApiFp = function (configuration) {
5866
5966
  return {
5967
+ /**
5968
+ * Called periodically by the conversation API to keep the session alive.
5969
+ * @summary Agent keep alive
5970
+ * @param {*} [options] Override http request option.
5971
+ * @throws {RequiredError}
5972
+ */
5973
+ getAgentKeepAlive: function (options) {
5974
+ var localVarFetchArgs = (0, exports.ConversationApiFetchParamCreator)(configuration).getAgentKeepAlive(options);
5975
+ return function (fetch, basePath) {
5976
+ if (fetch === void 0) { fetch = portableFetch; }
5977
+ if (basePath === void 0) { basePath = BASE_PATH; }
5978
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
5979
+ if (response.status >= 200 && response.status < 300) {
5980
+ return response;
5981
+ }
5982
+ else {
5983
+ throw response;
5984
+ }
5985
+ });
5986
+ };
5987
+ },
5867
5988
  /**
5868
5989
  * Retrieve a JWT to authorize an agent to make a websocket connection.
5869
5990
  * @summary Get agent websocket authorization
@@ -5889,11 +6010,36 @@ var ConversationApiFp = function (configuration) {
5889
6010
  * Retrieve a conversation including the participants and messages
5890
6011
  * @summary Retrieve a conversation
5891
6012
  * @param {string} conversation_uuid
6013
+ * @param {number} [limit]
5892
6014
  * @param {*} [options] Override http request option.
5893
6015
  * @throws {RequiredError}
5894
6016
  */
5895
- getConversation: function (conversation_uuid, options) {
5896
- var localVarFetchArgs = (0, exports.ConversationApiFetchParamCreator)(configuration).getConversation(conversation_uuid, options);
6017
+ getConversation: function (conversation_uuid, limit, options) {
6018
+ var localVarFetchArgs = (0, exports.ConversationApiFetchParamCreator)(configuration).getConversation(conversation_uuid, limit, options);
6019
+ return function (fetch, basePath) {
6020
+ if (fetch === void 0) { fetch = portableFetch; }
6021
+ if (basePath === void 0) { basePath = BASE_PATH; }
6022
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
6023
+ if (response.status >= 200 && response.status < 300) {
6024
+ return response.json();
6025
+ }
6026
+ else {
6027
+ throw response;
6028
+ }
6029
+ });
6030
+ };
6031
+ },
6032
+ /**
6033
+ * Retrieve conversation messages since a particular time
6034
+ * @summary Retrieve conversation messages
6035
+ * @param {string} conversation_uuid
6036
+ * @param {number} since
6037
+ * @param {number} [limit]
6038
+ * @param {*} [options] Override http request option.
6039
+ * @throws {RequiredError}
6040
+ */
6041
+ getConversationMessages: function (conversation_uuid, since, limit, options) {
6042
+ var localVarFetchArgs = (0, exports.ConversationApiFetchParamCreator)(configuration).getConversationMessages(conversation_uuid, since, limit, options);
5897
6043
  return function (fetch, basePath) {
5898
6044
  if (fetch === void 0) { fetch = portableFetch; }
5899
6045
  if (basePath === void 0) { basePath = BASE_PATH; }
@@ -6072,6 +6218,15 @@ exports.ConversationApiFp = ConversationApiFp;
6072
6218
  */
6073
6219
  var ConversationApiFactory = function (configuration, fetch, basePath) {
6074
6220
  return {
6221
+ /**
6222
+ * Called periodically by the conversation API to keep the session alive.
6223
+ * @summary Agent keep alive
6224
+ * @param {*} [options] Override http request option.
6225
+ * @throws {RequiredError}
6226
+ */
6227
+ getAgentKeepAlive: function (options) {
6228
+ return (0, exports.ConversationApiFp)(configuration).getAgentKeepAlive(options)(fetch, basePath);
6229
+ },
6075
6230
  /**
6076
6231
  * Retrieve a JWT to authorize an agent to make a websocket connection.
6077
6232
  * @summary Get agent websocket authorization
@@ -6085,11 +6240,24 @@ var ConversationApiFactory = function (configuration, fetch, basePath) {
6085
6240
  * Retrieve a conversation including the participants and messages
6086
6241
  * @summary Retrieve a conversation
6087
6242
  * @param {string} conversation_uuid
6243
+ * @param {number} [limit]
6088
6244
  * @param {*} [options] Override http request option.
6089
6245
  * @throws {RequiredError}
6090
6246
  */
6091
- getConversation: function (conversation_uuid, options) {
6092
- return (0, exports.ConversationApiFp)(configuration).getConversation(conversation_uuid, options)(fetch, basePath);
6247
+ getConversation: function (conversation_uuid, limit, options) {
6248
+ return (0, exports.ConversationApiFp)(configuration).getConversation(conversation_uuid, limit, options)(fetch, basePath);
6249
+ },
6250
+ /**
6251
+ * Retrieve conversation messages since a particular time
6252
+ * @summary Retrieve conversation messages
6253
+ * @param {string} conversation_uuid
6254
+ * @param {number} since
6255
+ * @param {number} [limit]
6256
+ * @param {*} [options] Override http request option.
6257
+ * @throws {RequiredError}
6258
+ */
6259
+ getConversationMessages: function (conversation_uuid, since, limit, options) {
6260
+ return (0, exports.ConversationApiFp)(configuration).getConversationMessages(conversation_uuid, since, limit, options)(fetch, basePath);
6093
6261
  },
6094
6262
  /**
6095
6263
  * Get a presigned conersation multimedia upload URL
@@ -6177,6 +6345,16 @@ var ConversationApi = /** @class */ (function (_super) {
6177
6345
  function ConversationApi() {
6178
6346
  return _super !== null && _super.apply(this, arguments) || this;
6179
6347
  }
6348
+ /**
6349
+ * Called periodically by the conversation API to keep the session alive.
6350
+ * @summary Agent keep alive
6351
+ * @param {*} [options] Override http request option.
6352
+ * @throws {RequiredError}
6353
+ * @memberof ConversationApi
6354
+ */
6355
+ ConversationApi.prototype.getAgentKeepAlive = function (options) {
6356
+ return (0, exports.ConversationApiFp)(this.configuration).getAgentKeepAlive(options)(this.fetch, this.basePath);
6357
+ };
6180
6358
  /**
6181
6359
  * Retrieve a JWT to authorize an agent to make a websocket connection.
6182
6360
  * @summary Get agent websocket authorization
@@ -6191,12 +6369,26 @@ var ConversationApi = /** @class */ (function (_super) {
6191
6369
  * Retrieve a conversation including the participants and messages
6192
6370
  * @summary Retrieve a conversation
6193
6371
  * @param {string} conversation_uuid
6372
+ * @param {number} [limit]
6373
+ * @param {*} [options] Override http request option.
6374
+ * @throws {RequiredError}
6375
+ * @memberof ConversationApi
6376
+ */
6377
+ ConversationApi.prototype.getConversation = function (conversation_uuid, limit, options) {
6378
+ return (0, exports.ConversationApiFp)(this.configuration).getConversation(conversation_uuid, limit, options)(this.fetch, this.basePath);
6379
+ };
6380
+ /**
6381
+ * Retrieve conversation messages since a particular time
6382
+ * @summary Retrieve conversation messages
6383
+ * @param {string} conversation_uuid
6384
+ * @param {number} since
6385
+ * @param {number} [limit]
6194
6386
  * @param {*} [options] Override http request option.
6195
6387
  * @throws {RequiredError}
6196
6388
  * @memberof ConversationApi
6197
6389
  */
6198
- ConversationApi.prototype.getConversation = function (conversation_uuid, options) {
6199
- return (0, exports.ConversationApiFp)(this.configuration).getConversation(conversation_uuid, options)(this.fetch, this.basePath);
6390
+ ConversationApi.prototype.getConversationMessages = function (conversation_uuid, since, limit, options) {
6391
+ return (0, exports.ConversationApiFp)(this.configuration).getConversationMessages(conversation_uuid, since, limit, options)(this.fetch, this.basePath);
6200
6392
  };
6201
6393
  /**
6202
6394
  * Get a presigned conersation multimedia upload URL
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "3.10.46",
3
+ "version": "3.10.47",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "keywords": [