ultracart_rest_api_v2_typescript 3.10.68 → 3.10.69

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.68
1
+ ## ultracart_rest_api_v2_typescript@3.10.69
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.68 --save
39
+ npm install ultracart_rest_api_v2_typescript@3.10.69 --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.69 | 11/21/2022 | conversation context method |
57
58
  | 3.10.68 | 11/21/2022 | adjusted conversation event model |
58
59
  | 3.10.67 | 11/15/2022 | conversation methods bug fix |
59
60
  | 3.10.66 | 11/15/2022 | conversations - enw events for add coupon and items |
package/api.ts CHANGED
@@ -7219,6 +7219,44 @@ export interface ConversationTwilioAccount {
7219
7219
  twilio_phone_numbers?: Array<string>;
7220
7220
  }
7221
7221
 
7222
+ /**
7223
+ *
7224
+ * @export
7225
+ * @interface ConversationWebchatContext
7226
+ */
7227
+ export interface ConversationWebchatContext {
7228
+ /**
7229
+ *
7230
+ * @type {Cart}
7231
+ * @memberof ConversationWebchatContext
7232
+ */
7233
+ cart?: Cart;
7234
+ /**
7235
+ *
7236
+ * @type {string}
7237
+ * @memberof ConversationWebchatContext
7238
+ */
7239
+ current_url?: string;
7240
+ /**
7241
+ *
7242
+ * @type {Array<HitPageView>}
7243
+ * @memberof ConversationWebchatContext
7244
+ */
7245
+ page_view?: Array<HitPageView>;
7246
+ /**
7247
+ *
7248
+ * @type {HitSessionStart}
7249
+ * @memberof ConversationWebchatContext
7250
+ */
7251
+ session_start?: HitSessionStart;
7252
+ /**
7253
+ *
7254
+ * @type {HitSessionUtm}
7255
+ * @memberof ConversationWebchatContext
7256
+ */
7257
+ session_utm?: HitSessionUtm;
7258
+ }
7259
+
7222
7260
  /**
7223
7261
  *
7224
7262
  * @export
@@ -7621,7 +7659,8 @@ export namespace ConversationWebsocketMessage {
7621
7659
  ReadMessage = <any> 'read message',
7622
7660
  Typing = <any> 'typing',
7623
7661
  AddCoupon = <any> 'add coupon',
7624
- AddItem = <any> 'add item'
7662
+ AddItem = <any> 'add item',
7663
+ WebchatContext = <any> 'webchat context'
7625
7664
  }
7626
7665
  /**
7627
7666
  * @export
@@ -19663,6 +19702,308 @@ export interface HTTPHeader {
19663
19702
  value?: string;
19664
19703
  }
19665
19704
 
19705
+ /**
19706
+ *
19707
+ * @export
19708
+ * @interface HitPageView
19709
+ */
19710
+ export interface HitPageView {
19711
+ /**
19712
+ *
19713
+ * @type {boolean}
19714
+ * @memberof HitPageView
19715
+ */
19716
+ bounce?: boolean;
19717
+ /**
19718
+ *
19719
+ * @type {Array<HitPageViewMetaData>}
19720
+ * @memberof HitPageView
19721
+ */
19722
+ meta_data?: Array<HitPageViewMetaData>;
19723
+ /**
19724
+ *
19725
+ * @type {string}
19726
+ * @memberof HitPageView
19727
+ */
19728
+ method?: string;
19729
+ /**
19730
+ *
19731
+ * @type {boolean}
19732
+ * @memberof HitPageView
19733
+ */
19734
+ prefetch?: boolean;
19735
+ /**
19736
+ *
19737
+ * @type {string}
19738
+ * @memberof HitPageView
19739
+ */
19740
+ query?: string;
19741
+ /**
19742
+ *
19743
+ * @type {boolean}
19744
+ * @memberof HitPageView
19745
+ */
19746
+ recording?: boolean;
19747
+ /**
19748
+ *
19749
+ * @type {boolean}
19750
+ * @memberof HitPageView
19751
+ */
19752
+ redirect?: boolean;
19753
+ /**
19754
+ *
19755
+ * @type {string}
19756
+ * @memberof HitPageView
19757
+ */
19758
+ referrer?: string;
19759
+ /**
19760
+ *
19761
+ * @type {number}
19762
+ * @memberof HitPageView
19763
+ */
19764
+ time_on_page?: number;
19765
+ /**
19766
+ *
19767
+ * @type {string}
19768
+ * @memberof HitPageView
19769
+ */
19770
+ title?: string;
19771
+ /**
19772
+ *
19773
+ * @type {string}
19774
+ * @memberof HitPageView
19775
+ */
19776
+ url?: string;
19777
+ }
19778
+
19779
+ /**
19780
+ *
19781
+ * @export
19782
+ * @interface HitPageViewMetaData
19783
+ */
19784
+ export interface HitPageViewMetaData {
19785
+ /**
19786
+ *
19787
+ * @type {string}
19788
+ * @memberof HitPageViewMetaData
19789
+ */
19790
+ key?: string;
19791
+ /**
19792
+ *
19793
+ * @type {string}
19794
+ * @memberof HitPageViewMetaData
19795
+ */
19796
+ value?: string;
19797
+ }
19798
+
19799
+ /**
19800
+ *
19801
+ * @export
19802
+ * @interface HitSessionStart
19803
+ */
19804
+ export interface HitSessionStart {
19805
+ /**
19806
+ *
19807
+ * @type {boolean}
19808
+ * @memberof HitSessionStart
19809
+ */
19810
+ bot?: boolean;
19811
+ /**
19812
+ *
19813
+ * @type {boolean}
19814
+ * @memberof HitSessionStart
19815
+ */
19816
+ bounce?: boolean;
19817
+ /**
19818
+ *
19819
+ * @type {string}
19820
+ * @memberof HitSessionStart
19821
+ */
19822
+ channel?: string;
19823
+ /**
19824
+ *
19825
+ * @type {boolean}
19826
+ * @memberof HitSessionStart
19827
+ */
19828
+ device_switch_detected?: boolean;
19829
+ /**
19830
+ *
19831
+ * @type {boolean}
19832
+ * @memberof HitSessionStart
19833
+ */
19834
+ fake_bot?: boolean;
19835
+ /**
19836
+ *
19837
+ * @type {string}
19838
+ * @memberof HitSessionStart
19839
+ */
19840
+ geolocation_country?: string;
19841
+ /**
19842
+ *
19843
+ * @type {number}
19844
+ * @memberof HitSessionStart
19845
+ */
19846
+ geolocation_latitude?: number;
19847
+ /**
19848
+ *
19849
+ * @type {number}
19850
+ * @memberof HitSessionStart
19851
+ */
19852
+ geolocation_longitude?: number;
19853
+ /**
19854
+ *
19855
+ * @type {string}
19856
+ * @memberof HitSessionStart
19857
+ */
19858
+ geolocation_province?: string;
19859
+ /**
19860
+ *
19861
+ * @type {boolean}
19862
+ * @memberof HitSessionStart
19863
+ */
19864
+ no_cookie_support?: boolean;
19865
+ /**
19866
+ *
19867
+ * @type {boolean}
19868
+ * @memberof HitSessionStart
19869
+ */
19870
+ prefetch?: boolean;
19871
+ /**
19872
+ *
19873
+ * @type {string}
19874
+ * @memberof HitSessionStart
19875
+ */
19876
+ referrer?: string;
19877
+ /**
19878
+ *
19879
+ * @type {number}
19880
+ * @memberof HitSessionStart
19881
+ */
19882
+ screen_height?: number;
19883
+ /**
19884
+ *
19885
+ * @type {number}
19886
+ * @memberof HitSessionStart
19887
+ */
19888
+ screen_width?: number;
19889
+ /**
19890
+ *
19891
+ * @type {number}
19892
+ * @memberof HitSessionStart
19893
+ */
19894
+ time_on_Site?: number;
19895
+ /**
19896
+ *
19897
+ * @type {string}
19898
+ * @memberof HitSessionStart
19899
+ */
19900
+ user_agent?: string;
19901
+ /**
19902
+ *
19903
+ * @type {string}
19904
+ * @memberof HitSessionStart
19905
+ */
19906
+ user_ip?: string;
19907
+ }
19908
+
19909
+ /**
19910
+ *
19911
+ * @export
19912
+ * @interface HitSessionUtm
19913
+ */
19914
+ export interface HitSessionUtm {
19915
+ /**
19916
+ *
19917
+ * @type {string}
19918
+ * @memberof HitSessionUtm
19919
+ */
19920
+ fb_ad_id?: string;
19921
+ /**
19922
+ *
19923
+ * @type {string}
19924
+ * @memberof HitSessionUtm
19925
+ */
19926
+ fbclid?: string;
19927
+ /**
19928
+ *
19929
+ * @type {string}
19930
+ * @memberof HitSessionUtm
19931
+ */
19932
+ gbraid?: string;
19933
+ /**
19934
+ *
19935
+ * @type {string}
19936
+ * @memberof HitSessionUtm
19937
+ */
19938
+ gclid?: string;
19939
+ /**
19940
+ *
19941
+ * @type {string}
19942
+ * @memberof HitSessionUtm
19943
+ */
19944
+ msclkid?: string;
19945
+ /**
19946
+ *
19947
+ * @type {string}
19948
+ * @memberof HitSessionUtm
19949
+ */
19950
+ ttclid?: string;
19951
+ /**
19952
+ *
19953
+ * @type {string}
19954
+ * @memberof HitSessionUtm
19955
+ */
19956
+ uc_message_id?: string;
19957
+ /**
19958
+ *
19959
+ * @type {string}
19960
+ * @memberof HitSessionUtm
19961
+ */
19962
+ utm_campaign?: string;
19963
+ /**
19964
+ *
19965
+ * @type {string}
19966
+ * @memberof HitSessionUtm
19967
+ */
19968
+ utm_content?: string;
19969
+ /**
19970
+ *
19971
+ * @type {string}
19972
+ * @memberof HitSessionUtm
19973
+ */
19974
+ utm_id?: string;
19975
+ /**
19976
+ *
19977
+ * @type {string}
19978
+ * @memberof HitSessionUtm
19979
+ */
19980
+ utm_medium?: string;
19981
+ /**
19982
+ *
19983
+ * @type {string}
19984
+ * @memberof HitSessionUtm
19985
+ */
19986
+ utm_source?: string;
19987
+ /**
19988
+ *
19989
+ * @type {string}
19990
+ * @memberof HitSessionUtm
19991
+ */
19992
+ utm_term?: string;
19993
+ /**
19994
+ *
19995
+ * @type {string}
19996
+ * @memberof HitSessionUtm
19997
+ */
19998
+ vmcid?: string;
19999
+ /**
20000
+ *
20001
+ * @type {string}
20002
+ * @memberof HitSessionUtm
20003
+ */
20004
+ wbraid?: string;
20005
+ }
20006
+
19666
20007
  /**
19667
20008
  *
19668
20009
  * @export
@@ -41189,6 +41530,58 @@ export const ConversationApiFetchParamCreator = function (configuration?: Config
41189
41530
  options: localVarRequestOptions,
41190
41531
  };
41191
41532
  },
41533
+ /**
41534
+ * Get a webchat conversation context
41535
+ * @summary Get a webchat conversation context
41536
+ * @param {string} conversation_uuid
41537
+ * @param {*} [options] Override http request option.
41538
+ * @throws {RequiredError}
41539
+ */
41540
+ getConversationContext(conversation_uuid: string, options: any = {}): FetchArgs {
41541
+ // verify required parameter 'conversation_uuid' is not null or undefined
41542
+ if (conversation_uuid === null || conversation_uuid === undefined) {
41543
+ throw new RequiredError('conversation_uuid','Required parameter conversation_uuid was null or undefined when calling getConversationContext.');
41544
+ }
41545
+ const localVarPath = `/conversation/conversations/{conversation_uuid}/context`
41546
+ .replace(`{${"conversation_uuid"}}`, encodeURIComponent(String(conversation_uuid)));
41547
+ const localVarUrlObj = url.parse(localVarPath, true);
41548
+ const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
41549
+ const localVarHeaderParameter = {} as any;
41550
+ const localVarQueryParameter = {} as any;
41551
+
41552
+ if(configuration && configuration.apiVersion) {
41553
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
41554
+ }
41555
+
41556
+
41557
+
41558
+ // authentication ultraCartOauth required
41559
+ // oauth required
41560
+ if (configuration && configuration.accessToken) {
41561
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
41562
+ ? configuration.accessToken("ultraCartOauth", ["conversation_write"])
41563
+ : configuration.accessToken;
41564
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
41565
+ }
41566
+
41567
+ // authentication ultraCartSimpleApiKey required
41568
+ if (configuration && configuration.apiKey) {
41569
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
41570
+ ? configuration.apiKey("x-ultracart-simple-key")
41571
+ : configuration.apiKey;
41572
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
41573
+ }
41574
+
41575
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
41576
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
41577
+ delete localVarUrlObj.search;
41578
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
41579
+
41580
+ return {
41581
+ url: url.format(localVarUrlObj),
41582
+ options: localVarRequestOptions,
41583
+ };
41584
+ },
41192
41585
  /**
41193
41586
  * Retrieve conversation messages since a particular time
41194
41587
  * @summary Retrieve conversation messages
@@ -41707,6 +42100,27 @@ export const ConversationApiFp = function(configuration?: Configuration) {
41707
42100
  });
41708
42101
  };
41709
42102
  },
42103
+ /**
42104
+ * Get a webchat conversation context
42105
+ * @summary Get a webchat conversation context
42106
+ * @param {string} conversation_uuid
42107
+ * @param {*} [options] Override http request option.
42108
+ * @throws {RequiredError}
42109
+ */
42110
+ getConversationContext(conversation_uuid: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationWebchatContext> {
42111
+ const localVarFetchArgs = ConversationApiFetchParamCreator(configuration).getConversationContext(conversation_uuid, options);
42112
+ return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
42113
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
42114
+
42115
+ if (response.status >= 200 && response.status < 300) {
42116
+ return response.json();
42117
+
42118
+ } else {
42119
+ throw response;
42120
+ }
42121
+ });
42122
+ };
42123
+ },
41710
42124
  /**
41711
42125
  * Retrieve conversation messages since a particular time
41712
42126
  * @summary Retrieve conversation messages
@@ -41918,6 +42332,16 @@ export const ConversationApiFactory = function (configuration?: Configuration, f
41918
42332
  getConversation(conversation_uuid: string, limit?: number, options?: any) {
41919
42333
  return ConversationApiFp(configuration).getConversation(conversation_uuid, limit, options)(fetch, basePath);
41920
42334
  },
42335
+ /**
42336
+ * Get a webchat conversation context
42337
+ * @summary Get a webchat conversation context
42338
+ * @param {string} conversation_uuid
42339
+ * @param {*} [options] Override http request option.
42340
+ * @throws {RequiredError}
42341
+ */
42342
+ getConversationContext(conversation_uuid: string, options?: any) {
42343
+ return ConversationApiFp(configuration).getConversationContext(conversation_uuid, options)(fetch, basePath);
42344
+ },
41921
42345
  /**
41922
42346
  * Retrieve conversation messages since a particular time
41923
42347
  * @summary Retrieve conversation messages
@@ -42041,6 +42465,16 @@ export interface ConversationApiInterface {
42041
42465
  */
42042
42466
  getConversation(conversation_uuid: string, limit?: number, options?: any): Promise<ConversationResponse>;
42043
42467
 
42468
+ /**
42469
+ * Get a webchat conversation context
42470
+ * @summary Get a webchat conversation context
42471
+ * @param {string} conversation_uuid
42472
+ * @param {*} [options] Override http request option.
42473
+ * @throws {RequiredError}
42474
+ * @memberof ConversationApiInterface
42475
+ */
42476
+ getConversationContext(conversation_uuid: string, options?: any): Promise<ConversationWebchatContext>;
42477
+
42044
42478
  /**
42045
42479
  * Retrieve conversation messages since a particular time
42046
42480
  * @summary Retrieve conversation messages
@@ -42170,6 +42604,18 @@ export class ConversationApi extends BaseAPI implements ConversationApiInterface
42170
42604
  return ConversationApiFp(this.configuration).getConversation(conversation_uuid, limit, options)(this.fetch, this.basePath);
42171
42605
  }
42172
42606
 
42607
+ /**
42608
+ * Get a webchat conversation context
42609
+ * @summary Get a webchat conversation context
42610
+ * @param {string} conversation_uuid
42611
+ * @param {*} [options] Override http request option.
42612
+ * @throws {RequiredError}
42613
+ * @memberof ConversationApi
42614
+ */
42615
+ public getConversationContext(conversation_uuid: string, options?: any) {
42616
+ return ConversationApiFp(this.configuration).getConversationContext(conversation_uuid, options)(this.fetch, this.basePath);
42617
+ }
42618
+
42173
42619
  /**
42174
42620
  * Retrieve conversation messages since a particular time
42175
42621
  * @summary Retrieve conversation messages
package/dist/api.d.ts CHANGED
@@ -7046,6 +7046,43 @@ export interface ConversationTwilioAccount {
7046
7046
  */
7047
7047
  twilio_phone_numbers?: Array<string>;
7048
7048
  }
7049
+ /**
7050
+ *
7051
+ * @export
7052
+ * @interface ConversationWebchatContext
7053
+ */
7054
+ export interface ConversationWebchatContext {
7055
+ /**
7056
+ *
7057
+ * @type {Cart}
7058
+ * @memberof ConversationWebchatContext
7059
+ */
7060
+ cart?: Cart;
7061
+ /**
7062
+ *
7063
+ * @type {string}
7064
+ * @memberof ConversationWebchatContext
7065
+ */
7066
+ current_url?: string;
7067
+ /**
7068
+ *
7069
+ * @type {Array<HitPageView>}
7070
+ * @memberof ConversationWebchatContext
7071
+ */
7072
+ page_view?: Array<HitPageView>;
7073
+ /**
7074
+ *
7075
+ * @type {HitSessionStart}
7076
+ * @memberof ConversationWebchatContext
7077
+ */
7078
+ session_start?: HitSessionStart;
7079
+ /**
7080
+ *
7081
+ * @type {HitSessionUtm}
7082
+ * @memberof ConversationWebchatContext
7083
+ */
7084
+ session_utm?: HitSessionUtm;
7085
+ }
7049
7086
  /**
7050
7087
  *
7051
7088
  * @export
@@ -7440,7 +7477,8 @@ export declare namespace ConversationWebsocketMessage {
7440
7477
  ReadMessage,
7441
7478
  Typing,
7442
7479
  AddCoupon,
7443
- AddItem
7480
+ AddItem,
7481
+ WebchatContext
7444
7482
  }
7445
7483
  /**
7446
7484
  * @export
@@ -19232,6 +19270,304 @@ export interface HTTPHeader {
19232
19270
  */
19233
19271
  value?: string;
19234
19272
  }
19273
+ /**
19274
+ *
19275
+ * @export
19276
+ * @interface HitPageView
19277
+ */
19278
+ export interface HitPageView {
19279
+ /**
19280
+ *
19281
+ * @type {boolean}
19282
+ * @memberof HitPageView
19283
+ */
19284
+ bounce?: boolean;
19285
+ /**
19286
+ *
19287
+ * @type {Array<HitPageViewMetaData>}
19288
+ * @memberof HitPageView
19289
+ */
19290
+ meta_data?: Array<HitPageViewMetaData>;
19291
+ /**
19292
+ *
19293
+ * @type {string}
19294
+ * @memberof HitPageView
19295
+ */
19296
+ method?: string;
19297
+ /**
19298
+ *
19299
+ * @type {boolean}
19300
+ * @memberof HitPageView
19301
+ */
19302
+ prefetch?: boolean;
19303
+ /**
19304
+ *
19305
+ * @type {string}
19306
+ * @memberof HitPageView
19307
+ */
19308
+ query?: string;
19309
+ /**
19310
+ *
19311
+ * @type {boolean}
19312
+ * @memberof HitPageView
19313
+ */
19314
+ recording?: boolean;
19315
+ /**
19316
+ *
19317
+ * @type {boolean}
19318
+ * @memberof HitPageView
19319
+ */
19320
+ redirect?: boolean;
19321
+ /**
19322
+ *
19323
+ * @type {string}
19324
+ * @memberof HitPageView
19325
+ */
19326
+ referrer?: string;
19327
+ /**
19328
+ *
19329
+ * @type {number}
19330
+ * @memberof HitPageView
19331
+ */
19332
+ time_on_page?: number;
19333
+ /**
19334
+ *
19335
+ * @type {string}
19336
+ * @memberof HitPageView
19337
+ */
19338
+ title?: string;
19339
+ /**
19340
+ *
19341
+ * @type {string}
19342
+ * @memberof HitPageView
19343
+ */
19344
+ url?: string;
19345
+ }
19346
+ /**
19347
+ *
19348
+ * @export
19349
+ * @interface HitPageViewMetaData
19350
+ */
19351
+ export interface HitPageViewMetaData {
19352
+ /**
19353
+ *
19354
+ * @type {string}
19355
+ * @memberof HitPageViewMetaData
19356
+ */
19357
+ key?: string;
19358
+ /**
19359
+ *
19360
+ * @type {string}
19361
+ * @memberof HitPageViewMetaData
19362
+ */
19363
+ value?: string;
19364
+ }
19365
+ /**
19366
+ *
19367
+ * @export
19368
+ * @interface HitSessionStart
19369
+ */
19370
+ export interface HitSessionStart {
19371
+ /**
19372
+ *
19373
+ * @type {boolean}
19374
+ * @memberof HitSessionStart
19375
+ */
19376
+ bot?: boolean;
19377
+ /**
19378
+ *
19379
+ * @type {boolean}
19380
+ * @memberof HitSessionStart
19381
+ */
19382
+ bounce?: boolean;
19383
+ /**
19384
+ *
19385
+ * @type {string}
19386
+ * @memberof HitSessionStart
19387
+ */
19388
+ channel?: string;
19389
+ /**
19390
+ *
19391
+ * @type {boolean}
19392
+ * @memberof HitSessionStart
19393
+ */
19394
+ device_switch_detected?: boolean;
19395
+ /**
19396
+ *
19397
+ * @type {boolean}
19398
+ * @memberof HitSessionStart
19399
+ */
19400
+ fake_bot?: boolean;
19401
+ /**
19402
+ *
19403
+ * @type {string}
19404
+ * @memberof HitSessionStart
19405
+ */
19406
+ geolocation_country?: string;
19407
+ /**
19408
+ *
19409
+ * @type {number}
19410
+ * @memberof HitSessionStart
19411
+ */
19412
+ geolocation_latitude?: number;
19413
+ /**
19414
+ *
19415
+ * @type {number}
19416
+ * @memberof HitSessionStart
19417
+ */
19418
+ geolocation_longitude?: number;
19419
+ /**
19420
+ *
19421
+ * @type {string}
19422
+ * @memberof HitSessionStart
19423
+ */
19424
+ geolocation_province?: string;
19425
+ /**
19426
+ *
19427
+ * @type {boolean}
19428
+ * @memberof HitSessionStart
19429
+ */
19430
+ no_cookie_support?: boolean;
19431
+ /**
19432
+ *
19433
+ * @type {boolean}
19434
+ * @memberof HitSessionStart
19435
+ */
19436
+ prefetch?: boolean;
19437
+ /**
19438
+ *
19439
+ * @type {string}
19440
+ * @memberof HitSessionStart
19441
+ */
19442
+ referrer?: string;
19443
+ /**
19444
+ *
19445
+ * @type {number}
19446
+ * @memberof HitSessionStart
19447
+ */
19448
+ screen_height?: number;
19449
+ /**
19450
+ *
19451
+ * @type {number}
19452
+ * @memberof HitSessionStart
19453
+ */
19454
+ screen_width?: number;
19455
+ /**
19456
+ *
19457
+ * @type {number}
19458
+ * @memberof HitSessionStart
19459
+ */
19460
+ time_on_Site?: number;
19461
+ /**
19462
+ *
19463
+ * @type {string}
19464
+ * @memberof HitSessionStart
19465
+ */
19466
+ user_agent?: string;
19467
+ /**
19468
+ *
19469
+ * @type {string}
19470
+ * @memberof HitSessionStart
19471
+ */
19472
+ user_ip?: string;
19473
+ }
19474
+ /**
19475
+ *
19476
+ * @export
19477
+ * @interface HitSessionUtm
19478
+ */
19479
+ export interface HitSessionUtm {
19480
+ /**
19481
+ *
19482
+ * @type {string}
19483
+ * @memberof HitSessionUtm
19484
+ */
19485
+ fb_ad_id?: string;
19486
+ /**
19487
+ *
19488
+ * @type {string}
19489
+ * @memberof HitSessionUtm
19490
+ */
19491
+ fbclid?: string;
19492
+ /**
19493
+ *
19494
+ * @type {string}
19495
+ * @memberof HitSessionUtm
19496
+ */
19497
+ gbraid?: string;
19498
+ /**
19499
+ *
19500
+ * @type {string}
19501
+ * @memberof HitSessionUtm
19502
+ */
19503
+ gclid?: string;
19504
+ /**
19505
+ *
19506
+ * @type {string}
19507
+ * @memberof HitSessionUtm
19508
+ */
19509
+ msclkid?: string;
19510
+ /**
19511
+ *
19512
+ * @type {string}
19513
+ * @memberof HitSessionUtm
19514
+ */
19515
+ ttclid?: string;
19516
+ /**
19517
+ *
19518
+ * @type {string}
19519
+ * @memberof HitSessionUtm
19520
+ */
19521
+ uc_message_id?: string;
19522
+ /**
19523
+ *
19524
+ * @type {string}
19525
+ * @memberof HitSessionUtm
19526
+ */
19527
+ utm_campaign?: string;
19528
+ /**
19529
+ *
19530
+ * @type {string}
19531
+ * @memberof HitSessionUtm
19532
+ */
19533
+ utm_content?: string;
19534
+ /**
19535
+ *
19536
+ * @type {string}
19537
+ * @memberof HitSessionUtm
19538
+ */
19539
+ utm_id?: string;
19540
+ /**
19541
+ *
19542
+ * @type {string}
19543
+ * @memberof HitSessionUtm
19544
+ */
19545
+ utm_medium?: string;
19546
+ /**
19547
+ *
19548
+ * @type {string}
19549
+ * @memberof HitSessionUtm
19550
+ */
19551
+ utm_source?: string;
19552
+ /**
19553
+ *
19554
+ * @type {string}
19555
+ * @memberof HitSessionUtm
19556
+ */
19557
+ utm_term?: string;
19558
+ /**
19559
+ *
19560
+ * @type {string}
19561
+ * @memberof HitSessionUtm
19562
+ */
19563
+ vmcid?: string;
19564
+ /**
19565
+ *
19566
+ * @type {string}
19567
+ * @memberof HitSessionUtm
19568
+ */
19569
+ wbraid?: string;
19570
+ }
19235
19571
  /**
19236
19572
  *
19237
19573
  * @export
@@ -37320,6 +37656,14 @@ export declare const ConversationApiFetchParamCreator: (configuration?: Configur
37320
37656
  * @throws {RequiredError}
37321
37657
  */
37322
37658
  getConversation(conversation_uuid: string, limit?: number, options?: any): FetchArgs;
37659
+ /**
37660
+ * Get a webchat conversation context
37661
+ * @summary Get a webchat conversation context
37662
+ * @param {string} conversation_uuid
37663
+ * @param {*} [options] Override http request option.
37664
+ * @throws {RequiredError}
37665
+ */
37666
+ getConversationContext(conversation_uuid: string, options?: any): FetchArgs;
37323
37667
  /**
37324
37668
  * Retrieve conversation messages since a particular time
37325
37669
  * @summary Retrieve conversation messages
@@ -37418,6 +37762,14 @@ export declare const ConversationApiFp: (configuration?: Configuration) => {
37418
37762
  * @throws {RequiredError}
37419
37763
  */
37420
37764
  getConversation(conversation_uuid: string, limit?: number, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationResponse>;
37765
+ /**
37766
+ * Get a webchat conversation context
37767
+ * @summary Get a webchat conversation context
37768
+ * @param {string} conversation_uuid
37769
+ * @param {*} [options] Override http request option.
37770
+ * @throws {RequiredError}
37771
+ */
37772
+ getConversationContext(conversation_uuid: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<ConversationWebchatContext>;
37421
37773
  /**
37422
37774
  * Retrieve conversation messages since a particular time
37423
37775
  * @summary Retrieve conversation messages
@@ -37516,6 +37868,14 @@ export declare const ConversationApiFactory: (configuration?: Configuration, fet
37516
37868
  * @throws {RequiredError}
37517
37869
  */
37518
37870
  getConversation(conversation_uuid: string, limit?: number, options?: any): Promise<ConversationResponse>;
37871
+ /**
37872
+ * Get a webchat conversation context
37873
+ * @summary Get a webchat conversation context
37874
+ * @param {string} conversation_uuid
37875
+ * @param {*} [options] Override http request option.
37876
+ * @throws {RequiredError}
37877
+ */
37878
+ getConversationContext(conversation_uuid: string, options?: any): Promise<ConversationWebchatContext>;
37519
37879
  /**
37520
37880
  * Retrieve conversation messages since a particular time
37521
37881
  * @summary Retrieve conversation messages
@@ -37618,6 +37978,15 @@ export interface ConversationApiInterface {
37618
37978
  * @memberof ConversationApiInterface
37619
37979
  */
37620
37980
  getConversation(conversation_uuid: string, limit?: number, options?: any): Promise<ConversationResponse>;
37981
+ /**
37982
+ * Get a webchat conversation context
37983
+ * @summary Get a webchat conversation context
37984
+ * @param {string} conversation_uuid
37985
+ * @param {*} [options] Override http request option.
37986
+ * @throws {RequiredError}
37987
+ * @memberof ConversationApiInterface
37988
+ */
37989
+ getConversationContext(conversation_uuid: string, options?: any): Promise<ConversationWebchatContext>;
37621
37990
  /**
37622
37991
  * Retrieve conversation messages since a particular time
37623
37992
  * @summary Retrieve conversation messages
@@ -37729,6 +38098,15 @@ export declare class ConversationApi extends BaseAPI implements ConversationApiI
37729
38098
  * @memberof ConversationApi
37730
38099
  */
37731
38100
  getConversation(conversation_uuid: string, limit?: number, options?: any): Promise<ConversationResponse>;
38101
+ /**
38102
+ * Get a webchat conversation context
38103
+ * @summary Get a webchat conversation context
38104
+ * @param {string} conversation_uuid
38105
+ * @param {*} [options] Override http request option.
38106
+ * @throws {RequiredError}
38107
+ * @memberof ConversationApi
38108
+ */
38109
+ getConversationContext(conversation_uuid: string, options?: any): Promise<ConversationWebchatContext>;
37732
38110
  /**
37733
38111
  * Retrieve conversation messages since a particular time
37734
38112
  * @summary Retrieve conversation messages
package/dist/api.js CHANGED
@@ -507,6 +507,7 @@ var ConversationWebsocketMessage;
507
507
  EventTypeEnum[EventTypeEnum["Typing"] = 'typing'] = "Typing";
508
508
  EventTypeEnum[EventTypeEnum["AddCoupon"] = 'add coupon'] = "AddCoupon";
509
509
  EventTypeEnum[EventTypeEnum["AddItem"] = 'add item'] = "AddItem";
510
+ EventTypeEnum[EventTypeEnum["WebchatContext"] = 'webchat context'] = "WebchatContext";
510
511
  })(EventTypeEnum = ConversationWebsocketMessage.EventTypeEnum || (ConversationWebsocketMessage.EventTypeEnum = {}));
511
512
  /**
512
513
  * @export
@@ -5589,6 +5590,52 @@ var ConversationApiFetchParamCreator = function (configuration) {
5589
5590
  options: localVarRequestOptions,
5590
5591
  };
5591
5592
  },
5593
+ /**
5594
+ * Get a webchat conversation context
5595
+ * @summary Get a webchat conversation context
5596
+ * @param {string} conversation_uuid
5597
+ * @param {*} [options] Override http request option.
5598
+ * @throws {RequiredError}
5599
+ */
5600
+ getConversationContext: function (conversation_uuid, options) {
5601
+ if (options === void 0) { options = {}; }
5602
+ // verify required parameter 'conversation_uuid' is not null or undefined
5603
+ if (conversation_uuid === null || conversation_uuid === undefined) {
5604
+ throw new RequiredError('conversation_uuid', 'Required parameter conversation_uuid was null or undefined when calling getConversationContext.');
5605
+ }
5606
+ var localVarPath = "/conversation/conversations/{conversation_uuid}/context"
5607
+ .replace("{".concat("conversation_uuid", "}"), encodeURIComponent(String(conversation_uuid)));
5608
+ var localVarUrlObj = url.parse(localVarPath, true);
5609
+ var localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
5610
+ var localVarHeaderParameter = {};
5611
+ var localVarQueryParameter = {};
5612
+ if (configuration && configuration.apiVersion) {
5613
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
5614
+ }
5615
+ // authentication ultraCartOauth required
5616
+ // oauth required
5617
+ if (configuration && configuration.accessToken) {
5618
+ var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
5619
+ ? configuration.accessToken("ultraCartOauth", ["conversation_write"])
5620
+ : configuration.accessToken;
5621
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
5622
+ }
5623
+ // authentication ultraCartSimpleApiKey required
5624
+ if (configuration && configuration.apiKey) {
5625
+ var localVarApiKeyValue = typeof configuration.apiKey === 'function'
5626
+ ? configuration.apiKey("x-ultracart-simple-key")
5627
+ : configuration.apiKey;
5628
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
5629
+ }
5630
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
5631
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
5632
+ delete localVarUrlObj.search;
5633
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
5634
+ return {
5635
+ url: url.format(localVarUrlObj),
5636
+ options: localVarRequestOptions,
5637
+ };
5638
+ },
5592
5639
  /**
5593
5640
  * Retrieve conversation messages since a particular time
5594
5641
  * @summary Retrieve conversation messages
@@ -6055,6 +6102,28 @@ var ConversationApiFp = function (configuration) {
6055
6102
  });
6056
6103
  };
6057
6104
  },
6105
+ /**
6106
+ * Get a webchat conversation context
6107
+ * @summary Get a webchat conversation context
6108
+ * @param {string} conversation_uuid
6109
+ * @param {*} [options] Override http request option.
6110
+ * @throws {RequiredError}
6111
+ */
6112
+ getConversationContext: function (conversation_uuid, options) {
6113
+ var localVarFetchArgs = (0, exports.ConversationApiFetchParamCreator)(configuration).getConversationContext(conversation_uuid, options);
6114
+ return function (fetch, basePath) {
6115
+ if (fetch === void 0) { fetch = portableFetch; }
6116
+ if (basePath === void 0) { basePath = BASE_PATH; }
6117
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
6118
+ if (response.status >= 200 && response.status < 300) {
6119
+ return response.json();
6120
+ }
6121
+ else {
6122
+ throw response;
6123
+ }
6124
+ });
6125
+ };
6126
+ },
6058
6127
  /**
6059
6128
  * Retrieve conversation messages since a particular time
6060
6129
  * @summary Retrieve conversation messages
@@ -6274,6 +6343,16 @@ var ConversationApiFactory = function (configuration, fetch, basePath) {
6274
6343
  getConversation: function (conversation_uuid, limit, options) {
6275
6344
  return (0, exports.ConversationApiFp)(configuration).getConversation(conversation_uuid, limit, options)(fetch, basePath);
6276
6345
  },
6346
+ /**
6347
+ * Get a webchat conversation context
6348
+ * @summary Get a webchat conversation context
6349
+ * @param {string} conversation_uuid
6350
+ * @param {*} [options] Override http request option.
6351
+ * @throws {RequiredError}
6352
+ */
6353
+ getConversationContext: function (conversation_uuid, options) {
6354
+ return (0, exports.ConversationApiFp)(configuration).getConversationContext(conversation_uuid, options)(fetch, basePath);
6355
+ },
6277
6356
  /**
6278
6357
  * Retrieve conversation messages since a particular time
6279
6358
  * @summary Retrieve conversation messages
@@ -6405,6 +6484,17 @@ var ConversationApi = /** @class */ (function (_super) {
6405
6484
  ConversationApi.prototype.getConversation = function (conversation_uuid, limit, options) {
6406
6485
  return (0, exports.ConversationApiFp)(this.configuration).getConversation(conversation_uuid, limit, options)(this.fetch, this.basePath);
6407
6486
  };
6487
+ /**
6488
+ * Get a webchat conversation context
6489
+ * @summary Get a webchat conversation context
6490
+ * @param {string} conversation_uuid
6491
+ * @param {*} [options] Override http request option.
6492
+ * @throws {RequiredError}
6493
+ * @memberof ConversationApi
6494
+ */
6495
+ ConversationApi.prototype.getConversationContext = function (conversation_uuid, options) {
6496
+ return (0, exports.ConversationApiFp)(this.configuration).getConversationContext(conversation_uuid, options)(this.fetch, this.basePath);
6497
+ };
6408
6498
  /**
6409
6499
  * Retrieve conversation messages since a particular time
6410
6500
  * @summary Retrieve conversation messages
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "3.10.68",
3
+ "version": "3.10.69",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "keywords": [