ultracart_rest_api_v2_typescript 4.0.54-RC → 4.0.55-RC

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -242,6 +242,7 @@ src/models/CustomerEmailListChanges.ts
242
242
  src/models/CustomerLoyalty.ts
243
243
  src/models/CustomerLoyaltyLedger.ts
244
244
  src/models/CustomerLoyaltyRedemption.ts
245
+ src/models/CustomerMagicLinkResponse.ts
245
246
  src/models/CustomerMergeRequest.ts
246
247
  src/models/CustomerOrdersSummary.ts
247
248
  src/models/CustomerPricingTier.ts
@@ -629,6 +630,8 @@ src/models/SingleSignOnTokenResponse.ts
629
630
  src/models/SovosConfig.ts
630
631
  src/models/StateProvince.ts
631
632
  src/models/StepWaiting.ts
633
+ src/models/StoreFront.ts
634
+ src/models/StoreFrontsResponse.ts
632
635
  src/models/TaxCity.ts
633
636
  src/models/TaxCountry.ts
634
637
  src/models/TaxCountryCode.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@4.0.54-RC
1
+ ## ultracart_rest_api_v2_typescript@4.0.55-RC
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install ultracart_rest_api_v2_typescript@4.0.54-RC --save
39
+ npm install ultracart_rest_api_v2_typescript@4.0.55-RC --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
+ | 4.0.55-RC | 08/12/2022 | internal code to allow merchant login as customer |
57
58
  | 4.0.54-RC | 08/11/2022 | fix entry_dts type on gift certificate ledger |
58
59
  | 4.0.53-RC | 08/10/2022 | conversation event refactoring |
59
60
  | 4.0.52-RC | 08/05/2022 | conversation adjustments for ES integration |
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { AdjustInternalCertificateRequest, AdjustInternalCertificateResponse, BaseResponse, Customer, CustomerEditorValues, CustomerEmailListChanges, CustomerMergeRequest, CustomerQuery, CustomerResponse, CustomerStoreCreditAddRequest, CustomerStoreCreditResponse, CustomersResponse, DataTablesServerSideResponse, EmailListsResponse, EmailVerifyTokenRequest, EmailVerifyTokenResponse, EmailVerifyTokenValidateRequest, EmailVerifyTokenValidateResponse, LookupRequest, LookupResponse } from '../models';
13
+ import { AdjustInternalCertificateRequest, AdjustInternalCertificateResponse, BaseResponse, Customer, CustomerEditorValues, CustomerEmailListChanges, CustomerMagicLinkResponse, CustomerMergeRequest, CustomerQuery, CustomerResponse, CustomerStoreCreditAddRequest, CustomerStoreCreditResponse, CustomersResponse, DataTablesServerSideResponse, EmailListsResponse, EmailVerifyTokenRequest, EmailVerifyTokenResponse, EmailVerifyTokenValidateRequest, EmailVerifyTokenValidateResponse, LookupRequest, LookupResponse } from '../models';
14
14
  export interface AddCustomerStoreCreditRequest {
15
15
  customerProfileOid: number;
16
16
  storeCreditRequest: CustomerStoreCreditAddRequest;
@@ -81,6 +81,10 @@ export interface GetCustomersForDataTablesRequest {
81
81
  export interface GetEmailVerificationTokenRequest {
82
82
  tokenRequest: EmailVerifyTokenRequest;
83
83
  }
84
+ export interface GetMagicLinkRequest {
85
+ customerProfileOid: number;
86
+ storefrontHostName: string;
87
+ }
84
88
  export interface InsertCustomerRequest {
85
89
  customer: Customer;
86
90
  expand?: string;
@@ -318,6 +322,21 @@ export interface CustomerApiInterface {
318
322
  * Create a token that can be used to verify a customer email address
319
323
  */
320
324
  getEmailVerificationToken(requestParameters: GetEmailVerificationTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmailVerifyTokenResponse>;
325
+ /**
326
+ * Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.
327
+ * @summary getMagicLink
328
+ * @param {number} customerProfileOid The customer_profile_oid of the customer.
329
+ * @param {string} storefrontHostName The storefront to log into.
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ * @memberof CustomerApiInterface
333
+ */
334
+ getMagicLinkRaw(requestParameters: GetMagicLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerMagicLinkResponse>>;
335
+ /**
336
+ * Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.
337
+ * getMagicLink
338
+ */
339
+ getMagicLink(requestParameters: GetMagicLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerMagicLinkResponse>;
321
340
  /**
322
341
  * Insert a customer on the UltraCart account.
323
342
  * @summary Insert a customer
@@ -532,6 +551,16 @@ export declare class CustomerApi extends runtime.BaseAPI implements CustomerApiI
532
551
  * Create a token that can be used to verify a customer email address
533
552
  */
534
553
  getEmailVerificationToken(requestParameters: GetEmailVerificationTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmailVerifyTokenResponse>;
554
+ /**
555
+ * Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.
556
+ * getMagicLink
557
+ */
558
+ getMagicLinkRaw(requestParameters: GetMagicLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerMagicLinkResponse>>;
559
+ /**
560
+ * Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.
561
+ * getMagicLink
562
+ */
563
+ getMagicLink(requestParameters: GetMagicLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerMagicLinkResponse>;
535
564
  /**
536
565
  * Insert a customer on the UltraCart account.
537
566
  * Insert a customer
@@ -905,6 +905,68 @@ var CustomerApi = /** @class */ (function (_super) {
905
905
  });
906
906
  });
907
907
  };
908
+ /**
909
+ * Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.
910
+ * getMagicLink
911
+ */
912
+ CustomerApi.prototype.getMagicLinkRaw = function (requestParameters, initOverrides) {
913
+ return __awaiter(this, void 0, void 0, function () {
914
+ var queryParameters, headerParameters, _a, _b, response;
915
+ return __generator(this, function (_c) {
916
+ switch (_c.label) {
917
+ case 0:
918
+ if (requestParameters.customerProfileOid === null || requestParameters.customerProfileOid === undefined) {
919
+ throw new runtime.RequiredError('customerProfileOid', 'Required parameter requestParameters.customerProfileOid was null or undefined when calling getMagicLink.');
920
+ }
921
+ if (requestParameters.storefrontHostName === null || requestParameters.storefrontHostName === undefined) {
922
+ throw new runtime.RequiredError('storefrontHostName', 'Required parameter requestParameters.storefrontHostName was null or undefined when calling getMagicLink.');
923
+ }
924
+ queryParameters = {};
925
+ headerParameters = {};
926
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
927
+ // oauth required
928
+ _a = headerParameters;
929
+ _b = "Authorization";
930
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["customer_write"])];
931
+ case 1:
932
+ // oauth required
933
+ _a[_b] = _c.sent();
934
+ _c.label = 2;
935
+ case 2:
936
+ if (this.configuration && this.configuration.apiKey) {
937
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
938
+ }
939
+ return [4 /*yield*/, this.request({
940
+ path: "/customer/customers/{customer_profile_oid}/magic_link/{storefront_host_name}".replace("{".concat("customer_profile_oid", "}"), encodeURIComponent(String(requestParameters.customerProfileOid))).replace("{".concat("storefront_host_name", "}"), encodeURIComponent(String(requestParameters.storefrontHostName))),
941
+ method: 'PUT',
942
+ headers: headerParameters,
943
+ query: queryParameters,
944
+ }, initOverrides)];
945
+ case 3:
946
+ response = _c.sent();
947
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.CustomerMagicLinkResponseFromJSON)(jsonValue); })];
948
+ }
949
+ });
950
+ });
951
+ };
952
+ /**
953
+ * Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.
954
+ * getMagicLink
955
+ */
956
+ CustomerApi.prototype.getMagicLink = function (requestParameters, initOverrides) {
957
+ return __awaiter(this, void 0, void 0, function () {
958
+ var response;
959
+ return __generator(this, function (_a) {
960
+ switch (_a.label) {
961
+ case 0: return [4 /*yield*/, this.getMagicLinkRaw(requestParameters, initOverrides)];
962
+ case 1:
963
+ response = _a.sent();
964
+ return [4 /*yield*/, response.value()];
965
+ case 2: return [2 /*return*/, _a.sent()];
966
+ }
967
+ });
968
+ });
969
+ };
908
970
  /**
909
971
  * Insert a customer on the UltraCart account.
910
972
  * Insert a customer
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { AddLibraryItemRequest, ApplyLibraryItemRequest, ApplyLibraryItemResponse, BaseResponse, CountriesResponse, EmailBaseTemplateListResponse, EmailCampaign, EmailCampaignFolder, EmailCampaignFolderResponse, EmailCampaignFoldersResponse, EmailCampaignResponse, EmailCampaignsResponse, EmailClicksResponse, EmailCommseq, EmailCommseqEmail, EmailCommseqEmailResponse, EmailCommseqEmailSendTestRequest, EmailCommseqEmailSendTestResponse, EmailCommseqEmailsRequest, EmailCommseqEmailsResponse, EmailCommseqPostcard, EmailCommseqPostcardResponse, EmailCommseqPostcardSendTestRequest, EmailCommseqPostcardSendTestResponse, EmailCommseqPostcardsRequest, EmailCommseqPostcardsResponse, EmailCommseqResponse, EmailCommseqSequenceTestRequest, EmailCommseqSequenceTestResponse, EmailCommseqStatResponse, EmailCommseqStepLogsResponse, EmailCommseqWebhookSendTestRequest, EmailCommseqWebhookSendTestResponse, EmailCommseqsResponse, EmailCustomer, EmailCustomerEditorUrlResponse, EmailCustomersResponse, EmailDashboardActivityResponse, EmailDashboardStatsResponse, EmailDomain, EmailEditorTokenResponse, EmailFlow, EmailFlowBackPopulateRequest, EmailFlowBackPopulateResponse, EmailFlowFolder, EmailFlowFolderResponse, EmailFlowFoldersResponse, EmailFlowResponse, EmailFlowsResponse, EmailGlobalSettings, EmailGlobalSettingsResponse, EmailGlobalUnsubscribeRequest, EmailGlobalUnsubscribeResponse, EmailHistogramPropertyNamesResponse, EmailHistogramPropertyValuesResponse, EmailList, EmailListArchiveResponse, EmailListCustomersResponse, EmailListResponse, EmailListSegmentFolder, EmailListSegmentFolderResponse, EmailListSegmentFoldersResponse, EmailListSubscribeResponse, EmailListsResponse, EmailOrdersResponse, EmailPerformanceResponse, EmailPlan, EmailPlanResponse, EmailSegment, EmailSegmentArchiveResponse, EmailSegmentCustomersResponse, EmailSegmentDownloadPrepareResponse, EmailSegmentResponse, EmailSegmentsResponse, EmailSendingDomainResponse, EmailSendingDomainsResponse, EmailSettings, EmailSettingsResponse, EmailStatPostcardSummaryRequest, EmailStatPostcardSummaryResponse, EmailStatSummaryRequest, EmailStatSummaryResponse, EmailStepStatRequest, EmailStepStatResponse, EmailStepWaitingRequest, EmailStepWaitingResponse, EmailTemplate, EmailTemplatesResponse, EmailThirdPartyListImportRequest, EmailThirdPartyProvidersResponse, EmailWebhookEditorValuesResponse, Experiment, ExperimentResponse, ExperimentsResponse, GeocodeRequest, GeocodeResponse, LibraryFilterValuesResponse, LibraryItem, LibraryItemQuery, LibraryItemResponse, LibraryItemsResponse, LookupRequest, LookupResponse, PricingTiersResponse, PublishLibraryItemRequest, ScreenRecordingHeatmapIndexRequest, ScreenRecordingHeatmapIndexResponse, ScreenRecordingHeatmapRequest, ScreenRecordingHeatmapReset, ScreenRecordingHeatmapResponse, ScreenRecordingMerchantNotesRequest, ScreenRecordingPageViewDataResponse, ScreenRecordingQueryRequest, ScreenRecordingQueryResponse, ScreenRecordingResponse, ScreenRecordingSegment, ScreenRecordingSegmentResponse, ScreenRecordingSegmentsResponse, ScreenRecordingSettings, ScreenRecordingSettingsResponse, ScreenRecordingTagsRequest, ScreenRecordingTagsResponse, ScreenshotsResponse, ThumbnailParametersRequest, ThumbnailParametersResponse, TransactionEmail, TransactionEmailListResponse, TransactionEmailResponse, Twilio, TwilioResponse, TwiliosResponse } from '../models';
13
+ import { AddLibraryItemRequest, ApplyLibraryItemRequest, ApplyLibraryItemResponse, BaseResponse, CountriesResponse, EmailBaseTemplateListResponse, EmailCampaign, EmailCampaignFolder, EmailCampaignFolderResponse, EmailCampaignFoldersResponse, EmailCampaignResponse, EmailCampaignsResponse, EmailClicksResponse, EmailCommseq, EmailCommseqEmail, EmailCommseqEmailResponse, EmailCommseqEmailSendTestRequest, EmailCommseqEmailSendTestResponse, EmailCommseqEmailsRequest, EmailCommseqEmailsResponse, EmailCommseqPostcard, EmailCommseqPostcardResponse, EmailCommseqPostcardSendTestRequest, EmailCommseqPostcardSendTestResponse, EmailCommseqPostcardsRequest, EmailCommseqPostcardsResponse, EmailCommseqResponse, EmailCommseqSequenceTestRequest, EmailCommseqSequenceTestResponse, EmailCommseqStatResponse, EmailCommseqStepLogsResponse, EmailCommseqWebhookSendTestRequest, EmailCommseqWebhookSendTestResponse, EmailCommseqsResponse, EmailCustomer, EmailCustomerEditorUrlResponse, EmailCustomersResponse, EmailDashboardActivityResponse, EmailDashboardStatsResponse, EmailDomain, EmailEditorTokenResponse, EmailFlow, EmailFlowBackPopulateRequest, EmailFlowBackPopulateResponse, EmailFlowFolder, EmailFlowFolderResponse, EmailFlowFoldersResponse, EmailFlowResponse, EmailFlowsResponse, EmailGlobalSettings, EmailGlobalSettingsResponse, EmailGlobalUnsubscribeRequest, EmailGlobalUnsubscribeResponse, EmailHistogramPropertyNamesResponse, EmailHistogramPropertyValuesResponse, EmailList, EmailListArchiveResponse, EmailListCustomersResponse, EmailListResponse, EmailListSegmentFolder, EmailListSegmentFolderResponse, EmailListSegmentFoldersResponse, EmailListSubscribeResponse, EmailListsResponse, EmailOrdersResponse, EmailPerformanceResponse, EmailPlan, EmailPlanResponse, EmailSegment, EmailSegmentArchiveResponse, EmailSegmentCustomersResponse, EmailSegmentDownloadPrepareResponse, EmailSegmentResponse, EmailSegmentsResponse, EmailSendingDomainResponse, EmailSendingDomainsResponse, EmailSettings, EmailSettingsResponse, EmailStatPostcardSummaryRequest, EmailStatPostcardSummaryResponse, EmailStatSummaryRequest, EmailStatSummaryResponse, EmailStepStatRequest, EmailStepStatResponse, EmailStepWaitingRequest, EmailStepWaitingResponse, EmailTemplate, EmailTemplatesResponse, EmailThirdPartyListImportRequest, EmailThirdPartyProvidersResponse, EmailWebhookEditorValuesResponse, Experiment, ExperimentResponse, ExperimentsResponse, GeocodeRequest, GeocodeResponse, LibraryFilterValuesResponse, LibraryItem, LibraryItemQuery, LibraryItemResponse, LibraryItemsResponse, LookupRequest, LookupResponse, PricingTiersResponse, PublishLibraryItemRequest, ScreenRecordingHeatmapIndexRequest, ScreenRecordingHeatmapIndexResponse, ScreenRecordingHeatmapRequest, ScreenRecordingHeatmapReset, ScreenRecordingHeatmapResponse, ScreenRecordingMerchantNotesRequest, ScreenRecordingPageViewDataResponse, ScreenRecordingQueryRequest, ScreenRecordingQueryResponse, ScreenRecordingResponse, ScreenRecordingSegment, ScreenRecordingSegmentResponse, ScreenRecordingSegmentsResponse, ScreenRecordingSettings, ScreenRecordingSettingsResponse, ScreenRecordingTagsRequest, ScreenRecordingTagsResponse, ScreenshotsResponse, StoreFrontsResponse, ThumbnailParametersRequest, ThumbnailParametersResponse, TransactionEmail, TransactionEmailListResponse, TransactionEmailResponse, Twilio, TwilioResponse, TwiliosResponse } from '../models';
14
14
  export interface AddToLibraryRequest {
15
15
  addLibraryRequest: AddLibraryItemRequest;
16
16
  }
@@ -2108,6 +2108,18 @@ export interface StorefrontApiInterface {
2108
2108
  * Retrieve pricing tiers
2109
2109
  */
2110
2110
  getStoreFrontPricingTiers(requestParameters: GetStoreFrontPricingTiersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PricingTiersResponse>;
2111
+ /**
2112
+ *
2113
+ * @summary Get storefronts (internal use only for security reasons)
2114
+ * @param {*} [options] Override http request option.
2115
+ * @throws {RequiredError}
2116
+ * @memberof StorefrontApiInterface
2117
+ */
2118
+ getStoreFrontsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StoreFrontsResponse>>;
2119
+ /**
2120
+ * Get storefronts (internal use only for security reasons)
2121
+ */
2122
+ getStoreFronts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StoreFrontsResponse>;
2111
2123
  /**
2112
2124
  *
2113
2125
  * @summary Get thumbnail parameters
@@ -3855,6 +3867,14 @@ export declare class StorefrontApi extends runtime.BaseAPI implements Storefront
3855
3867
  * Retrieve pricing tiers
3856
3868
  */
3857
3869
  getStoreFrontPricingTiers(requestParameters?: GetStoreFrontPricingTiersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PricingTiersResponse>;
3870
+ /**
3871
+ * Get storefronts (internal use only for security reasons)
3872
+ */
3873
+ getStoreFrontsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StoreFrontsResponse>>;
3874
+ /**
3875
+ * Get storefronts (internal use only for security reasons)
3876
+ */
3877
+ getStoreFronts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StoreFrontsResponse>;
3858
3878
  /**
3859
3879
  * Get thumbnail parameters
3860
3880
  */
@@ -6440,6 +6440,63 @@ var StorefrontApi = /** @class */ (function (_super) {
6440
6440
  });
6441
6441
  });
6442
6442
  };
6443
+ /**
6444
+ * Get storefronts (internal use only for security reasons)
6445
+ */
6446
+ StorefrontApi.prototype.getStoreFrontsRaw = function (initOverrides) {
6447
+ return __awaiter(this, void 0, void 0, function () {
6448
+ var queryParameters, headerParameters, _a, _b, response;
6449
+ return __generator(this, function (_c) {
6450
+ switch (_c.label) {
6451
+ case 0:
6452
+ queryParameters = {};
6453
+ headerParameters = {};
6454
+ if (this.configuration && this.configuration.apiKey) {
6455
+ headerParameters["x-ultracart-browser-key"] = this.configuration.apiKey("x-ultracart-browser-key"); // ultraCartBrowserApiKey authentication
6456
+ }
6457
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
6458
+ // oauth required
6459
+ _a = headerParameters;
6460
+ _b = "Authorization";
6461
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "chargeback_read", "chargeback_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write"])];
6462
+ case 1:
6463
+ // oauth required
6464
+ _a[_b] = _c.sent();
6465
+ _c.label = 2;
6466
+ case 2:
6467
+ if (this.configuration && this.configuration.apiKey) {
6468
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
6469
+ }
6470
+ return [4 /*yield*/, this.request({
6471
+ path: "/storefront/",
6472
+ method: 'GET',
6473
+ headers: headerParameters,
6474
+ query: queryParameters,
6475
+ }, initOverrides)];
6476
+ case 3:
6477
+ response = _c.sent();
6478
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.StoreFrontsResponseFromJSON)(jsonValue); })];
6479
+ }
6480
+ });
6481
+ });
6482
+ };
6483
+ /**
6484
+ * Get storefronts (internal use only for security reasons)
6485
+ */
6486
+ StorefrontApi.prototype.getStoreFronts = function (initOverrides) {
6487
+ return __awaiter(this, void 0, void 0, function () {
6488
+ var response;
6489
+ return __generator(this, function (_a) {
6490
+ switch (_a.label) {
6491
+ case 0: return [4 /*yield*/, this.getStoreFrontsRaw(initOverrides)];
6492
+ case 1:
6493
+ response = _a.sent();
6494
+ return [4 /*yield*/, response.value()];
6495
+ case 2: return [2 /*return*/, _a.sent()];
6496
+ }
6497
+ });
6498
+ });
6499
+ };
6443
6500
  /**
6444
6501
  * Get thumbnail parameters
6445
6502
  */
@@ -0,0 +1,54 @@
1
+ /**
2
+ * UltraCart Rest API V2
3
+ * UltraCart REST API Version 2
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: support@ultracart.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ModelError } from './ModelError';
13
+ import { ResponseMetadata } from './ResponseMetadata';
14
+ import { Warning } from './Warning';
15
+ /**
16
+ *
17
+ * @export
18
+ * @interface CustomerMagicLinkResponse
19
+ */
20
+ export interface CustomerMagicLinkResponse {
21
+ /**
22
+ *
23
+ * @type {ModelError}
24
+ * @memberof CustomerMagicLinkResponse
25
+ */
26
+ error?: ModelError;
27
+ /**
28
+ *
29
+ * @type {ResponseMetadata}
30
+ * @memberof CustomerMagicLinkResponse
31
+ */
32
+ metadata?: ResponseMetadata;
33
+ /**
34
+ * Indicates if API call was successful
35
+ * @type {boolean}
36
+ * @memberof CustomerMagicLinkResponse
37
+ */
38
+ success?: boolean;
39
+ /**
40
+ * URL
41
+ * @type {string}
42
+ * @memberof CustomerMagicLinkResponse
43
+ */
44
+ url?: string;
45
+ /**
46
+ *
47
+ * @type {Warning}
48
+ * @memberof CustomerMagicLinkResponse
49
+ */
50
+ warning?: Warning;
51
+ }
52
+ export declare function CustomerMagicLinkResponseFromJSON(json: any): CustomerMagicLinkResponse;
53
+ export declare function CustomerMagicLinkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomerMagicLinkResponse;
54
+ export declare function CustomerMagicLinkResponseToJSON(value?: CustomerMagicLinkResponse | null): any;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * UltraCart Rest API V2
6
+ * UltraCart REST API Version 2
7
+ *
8
+ * The version of the OpenAPI document: 2.0.0
9
+ * Contact: support@ultracart.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.CustomerMagicLinkResponseToJSON = exports.CustomerMagicLinkResponseFromJSONTyped = exports.CustomerMagicLinkResponseFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var ModelError_1 = require("./ModelError");
19
+ var ResponseMetadata_1 = require("./ResponseMetadata");
20
+ var Warning_1 = require("./Warning");
21
+ function CustomerMagicLinkResponseFromJSON(json) {
22
+ return CustomerMagicLinkResponseFromJSONTyped(json, false);
23
+ }
24
+ exports.CustomerMagicLinkResponseFromJSON = CustomerMagicLinkResponseFromJSON;
25
+ function CustomerMagicLinkResponseFromJSONTyped(json, ignoreDiscriminator) {
26
+ if ((json === undefined) || (json === null)) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'error': !(0, runtime_1.exists)(json, 'error') ? undefined : (0, ModelError_1.ModelErrorFromJSON)(json['error']),
31
+ 'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, ResponseMetadata_1.ResponseMetadataFromJSON)(json['metadata']),
32
+ 'success': !(0, runtime_1.exists)(json, 'success') ? undefined : json['success'],
33
+ 'url': !(0, runtime_1.exists)(json, 'url') ? undefined : json['url'],
34
+ 'warning': !(0, runtime_1.exists)(json, 'warning') ? undefined : (0, Warning_1.WarningFromJSON)(json['warning']),
35
+ };
36
+ }
37
+ exports.CustomerMagicLinkResponseFromJSONTyped = CustomerMagicLinkResponseFromJSONTyped;
38
+ function CustomerMagicLinkResponseToJSON(value) {
39
+ if (value === undefined) {
40
+ return undefined;
41
+ }
42
+ if (value === null) {
43
+ return null;
44
+ }
45
+ return {
46
+ 'error': (0, ModelError_1.ModelErrorToJSON)(value.error),
47
+ 'metadata': (0, ResponseMetadata_1.ResponseMetadataToJSON)(value.metadata),
48
+ 'success': value.success,
49
+ 'url': value.url,
50
+ 'warning': (0, Warning_1.WarningToJSON)(value.warning),
51
+ };
52
+ }
53
+ exports.CustomerMagicLinkResponseToJSON = CustomerMagicLinkResponseToJSON;
@@ -0,0 +1,87 @@
1
+ /**
2
+ * UltraCart Rest API V2
3
+ * UltraCart REST API Version 2
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: support@ultracart.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface StoreFront
16
+ */
17
+ export interface StoreFront {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof StoreFront
22
+ */
23
+ host_alias1?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof StoreFront
28
+ */
29
+ host_alias2?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof StoreFront
34
+ */
35
+ host_alias3?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof StoreFront
40
+ */
41
+ host_alias4?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof StoreFront
46
+ */
47
+ host_alias5?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof StoreFront
52
+ */
53
+ host_name?: string;
54
+ /**
55
+ *
56
+ * @type {boolean}
57
+ * @memberof StoreFront
58
+ */
59
+ locked?: boolean;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof StoreFront
64
+ */
65
+ merchant_id?: string;
66
+ /**
67
+ *
68
+ * @type {boolean}
69
+ * @memberof StoreFront
70
+ */
71
+ redirect_aliases?: boolean;
72
+ /**
73
+ *
74
+ * @type {number}
75
+ * @memberof StoreFront
76
+ */
77
+ storefront_oid?: number;
78
+ /**
79
+ *
80
+ * @type {string}
81
+ * @memberof StoreFront
82
+ */
83
+ unlock_password?: string;
84
+ }
85
+ export declare function StoreFrontFromJSON(json: any): StoreFront;
86
+ export declare function StoreFrontFromJSONTyped(json: any, ignoreDiscriminator: boolean): StoreFront;
87
+ export declare function StoreFrontToJSON(value?: StoreFront | null): any;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * UltraCart Rest API V2
6
+ * UltraCart REST API Version 2
7
+ *
8
+ * The version of the OpenAPI document: 2.0.0
9
+ * Contact: support@ultracart.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.StoreFrontToJSON = exports.StoreFrontFromJSONTyped = exports.StoreFrontFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ function StoreFrontFromJSON(json) {
19
+ return StoreFrontFromJSONTyped(json, false);
20
+ }
21
+ exports.StoreFrontFromJSON = StoreFrontFromJSON;
22
+ function StoreFrontFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'host_alias1': !(0, runtime_1.exists)(json, 'host_alias1') ? undefined : json['host_alias1'],
28
+ 'host_alias2': !(0, runtime_1.exists)(json, 'host_alias2') ? undefined : json['host_alias2'],
29
+ 'host_alias3': !(0, runtime_1.exists)(json, 'host_alias3') ? undefined : json['host_alias3'],
30
+ 'host_alias4': !(0, runtime_1.exists)(json, 'host_alias4') ? undefined : json['host_alias4'],
31
+ 'host_alias5': !(0, runtime_1.exists)(json, 'host_alias5') ? undefined : json['host_alias5'],
32
+ 'host_name': !(0, runtime_1.exists)(json, 'host_name') ? undefined : json['host_name'],
33
+ 'locked': !(0, runtime_1.exists)(json, 'locked') ? undefined : json['locked'],
34
+ 'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
35
+ 'redirect_aliases': !(0, runtime_1.exists)(json, 'redirect_aliases') ? undefined : json['redirect_aliases'],
36
+ 'storefront_oid': !(0, runtime_1.exists)(json, 'storefront_oid') ? undefined : json['storefront_oid'],
37
+ 'unlock_password': !(0, runtime_1.exists)(json, 'unlock_password') ? undefined : json['unlock_password'],
38
+ };
39
+ }
40
+ exports.StoreFrontFromJSONTyped = StoreFrontFromJSONTyped;
41
+ function StoreFrontToJSON(value) {
42
+ if (value === undefined) {
43
+ return undefined;
44
+ }
45
+ if (value === null) {
46
+ return null;
47
+ }
48
+ return {
49
+ 'host_alias1': value.host_alias1,
50
+ 'host_alias2': value.host_alias2,
51
+ 'host_alias3': value.host_alias3,
52
+ 'host_alias4': value.host_alias4,
53
+ 'host_alias5': value.host_alias5,
54
+ 'host_name': value.host_name,
55
+ 'locked': value.locked,
56
+ 'merchant_id': value.merchant_id,
57
+ 'redirect_aliases': value.redirect_aliases,
58
+ 'storefront_oid': value.storefront_oid,
59
+ 'unlock_password': value.unlock_password,
60
+ };
61
+ }
62
+ exports.StoreFrontToJSON = StoreFrontToJSON;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * UltraCart Rest API V2
3
+ * UltraCart REST API Version 2
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: support@ultracart.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ModelError } from './ModelError';
13
+ import { ResponseMetadata } from './ResponseMetadata';
14
+ import { StoreFront } from './StoreFront';
15
+ import { Warning } from './Warning';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface StoreFrontsResponse
20
+ */
21
+ export interface StoreFrontsResponse {
22
+ /**
23
+ *
24
+ * @type {ModelError}
25
+ * @memberof StoreFrontsResponse
26
+ */
27
+ error?: ModelError;
28
+ /**
29
+ *
30
+ * @type {ResponseMetadata}
31
+ * @memberof StoreFrontsResponse
32
+ */
33
+ metadata?: ResponseMetadata;
34
+ /**
35
+ *
36
+ * @type {Array<StoreFront>}
37
+ * @memberof StoreFrontsResponse
38
+ */
39
+ storeFronts?: Array<StoreFront>;
40
+ /**
41
+ * Indicates if API call was successful
42
+ * @type {boolean}
43
+ * @memberof StoreFrontsResponse
44
+ */
45
+ success?: boolean;
46
+ /**
47
+ *
48
+ * @type {Warning}
49
+ * @memberof StoreFrontsResponse
50
+ */
51
+ warning?: Warning;
52
+ }
53
+ export declare function StoreFrontsResponseFromJSON(json: any): StoreFrontsResponse;
54
+ export declare function StoreFrontsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StoreFrontsResponse;
55
+ export declare function StoreFrontsResponseToJSON(value?: StoreFrontsResponse | null): any;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * UltraCart Rest API V2
6
+ * UltraCart REST API Version 2
7
+ *
8
+ * The version of the OpenAPI document: 2.0.0
9
+ * Contact: support@ultracart.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.StoreFrontsResponseToJSON = exports.StoreFrontsResponseFromJSONTyped = exports.StoreFrontsResponseFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var ModelError_1 = require("./ModelError");
19
+ var ResponseMetadata_1 = require("./ResponseMetadata");
20
+ var StoreFront_1 = require("./StoreFront");
21
+ var Warning_1 = require("./Warning");
22
+ function StoreFrontsResponseFromJSON(json) {
23
+ return StoreFrontsResponseFromJSONTyped(json, false);
24
+ }
25
+ exports.StoreFrontsResponseFromJSON = StoreFrontsResponseFromJSON;
26
+ function StoreFrontsResponseFromJSONTyped(json, ignoreDiscriminator) {
27
+ if ((json === undefined) || (json === null)) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'error': !(0, runtime_1.exists)(json, 'error') ? undefined : (0, ModelError_1.ModelErrorFromJSON)(json['error']),
32
+ 'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, ResponseMetadata_1.ResponseMetadataFromJSON)(json['metadata']),
33
+ 'storeFronts': !(0, runtime_1.exists)(json, 'storeFronts') ? undefined : (json['storeFronts'].map(StoreFront_1.StoreFrontFromJSON)),
34
+ 'success': !(0, runtime_1.exists)(json, 'success') ? undefined : json['success'],
35
+ 'warning': !(0, runtime_1.exists)(json, 'warning') ? undefined : (0, Warning_1.WarningFromJSON)(json['warning']),
36
+ };
37
+ }
38
+ exports.StoreFrontsResponseFromJSONTyped = StoreFrontsResponseFromJSONTyped;
39
+ function StoreFrontsResponseToJSON(value) {
40
+ if (value === undefined) {
41
+ return undefined;
42
+ }
43
+ if (value === null) {
44
+ return null;
45
+ }
46
+ return {
47
+ 'error': (0, ModelError_1.ModelErrorToJSON)(value.error),
48
+ 'metadata': (0, ResponseMetadata_1.ResponseMetadataToJSON)(value.metadata),
49
+ 'storeFronts': value.storeFronts === undefined ? undefined : (value.storeFronts.map(StoreFront_1.StoreFrontToJSON)),
50
+ 'success': value.success,
51
+ 'warning': (0, Warning_1.WarningToJSON)(value.warning),
52
+ };
53
+ }
54
+ exports.StoreFrontsResponseToJSON = StoreFrontsResponseToJSON;
@@ -217,6 +217,7 @@ export * from './CustomerEmailListChanges';
217
217
  export * from './CustomerLoyalty';
218
218
  export * from './CustomerLoyaltyLedger';
219
219
  export * from './CustomerLoyaltyRedemption';
220
+ export * from './CustomerMagicLinkResponse';
220
221
  export * from './CustomerMergeRequest';
221
222
  export * from './CustomerOrdersSummary';
222
223
  export * from './CustomerPricingTier';
@@ -604,6 +605,8 @@ export * from './SingleSignOnTokenResponse';
604
605
  export * from './SovosConfig';
605
606
  export * from './StateProvince';
606
607
  export * from './StepWaiting';
608
+ export * from './StoreFront';
609
+ export * from './StoreFrontsResponse';
607
610
  export * from './TaxCity';
608
611
  export * from './TaxCountry';
609
612
  export * from './TaxCountryCode';
@@ -235,6 +235,7 @@ __exportStar(require("./CustomerEmailListChanges"), exports);
235
235
  __exportStar(require("./CustomerLoyalty"), exports);
236
236
  __exportStar(require("./CustomerLoyaltyLedger"), exports);
237
237
  __exportStar(require("./CustomerLoyaltyRedemption"), exports);
238
+ __exportStar(require("./CustomerMagicLinkResponse"), exports);
238
239
  __exportStar(require("./CustomerMergeRequest"), exports);
239
240
  __exportStar(require("./CustomerOrdersSummary"), exports);
240
241
  __exportStar(require("./CustomerPricingTier"), exports);
@@ -622,6 +623,8 @@ __exportStar(require("./SingleSignOnTokenResponse"), exports);
622
623
  __exportStar(require("./SovosConfig"), exports);
623
624
  __exportStar(require("./StateProvince"), exports);
624
625
  __exportStar(require("./StepWaiting"), exports);
626
+ __exportStar(require("./StoreFront"), exports);
627
+ __exportStar(require("./StoreFrontsResponse"), exports);
625
628
  __exportStar(require("./TaxCity"), exports);
626
629
  __exportStar(require("./TaxCountry"), exports);
627
630
  __exportStar(require("./TaxCountryCode"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.0.54-RC",
3
+ "version": "4.0.55-RC",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -33,6 +33,9 @@ import {
33
33
  CustomerEmailListChanges,
34
34
  CustomerEmailListChangesFromJSON,
35
35
  CustomerEmailListChangesToJSON,
36
+ CustomerMagicLinkResponse,
37
+ CustomerMagicLinkResponseFromJSON,
38
+ CustomerMagicLinkResponseToJSON,
36
39
  CustomerMergeRequest,
37
40
  CustomerMergeRequestFromJSON,
38
41
  CustomerMergeRequestToJSON,
@@ -160,6 +163,11 @@ export interface GetEmailVerificationTokenRequest {
160
163
  tokenRequest: EmailVerifyTokenRequest;
161
164
  }
162
165
 
166
+ export interface GetMagicLinkRequest {
167
+ customerProfileOid: number;
168
+ storefrontHostName: string;
169
+ }
170
+
163
171
  export interface InsertCustomerRequest {
164
172
  customer: Customer;
165
173
  expand?: string;
@@ -427,6 +435,23 @@ export interface CustomerApiInterface {
427
435
  */
428
436
  getEmailVerificationToken(requestParameters: GetEmailVerificationTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EmailVerifyTokenResponse>;
429
437
 
438
+ /**
439
+ * Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.
440
+ * @summary getMagicLink
441
+ * @param {number} customerProfileOid The customer_profile_oid of the customer.
442
+ * @param {string} storefrontHostName The storefront to log into.
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ * @memberof CustomerApiInterface
446
+ */
447
+ getMagicLinkRaw(requestParameters: GetMagicLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerMagicLinkResponse>>;
448
+
449
+ /**
450
+ * Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.
451
+ * getMagicLink
452
+ */
453
+ getMagicLink(requestParameters: GetMagicLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerMagicLinkResponse>;
454
+
430
455
  /**
431
456
  * Insert a customer on the UltraCart account.
432
457
  * @summary Insert a customer
@@ -1190,6 +1215,51 @@ export class CustomerApi extends runtime.BaseAPI implements CustomerApiInterface
1190
1215
  return await response.value();
1191
1216
  }
1192
1217
 
1218
+ /**
1219
+ * Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.
1220
+ * getMagicLink
1221
+ */
1222
+ async getMagicLinkRaw(requestParameters: GetMagicLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerMagicLinkResponse>> {
1223
+ if (requestParameters.customerProfileOid === null || requestParameters.customerProfileOid === undefined) {
1224
+ throw new runtime.RequiredError('customerProfileOid','Required parameter requestParameters.customerProfileOid was null or undefined when calling getMagicLink.');
1225
+ }
1226
+
1227
+ if (requestParameters.storefrontHostName === null || requestParameters.storefrontHostName === undefined) {
1228
+ throw new runtime.RequiredError('storefrontHostName','Required parameter requestParameters.storefrontHostName was null or undefined when calling getMagicLink.');
1229
+ }
1230
+
1231
+ const queryParameters: any = {};
1232
+
1233
+ const headerParameters: runtime.HTTPHeaders = {};
1234
+
1235
+ if (this.configuration && this.configuration.accessToken) {
1236
+ // oauth required
1237
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["customer_write"]);
1238
+ }
1239
+
1240
+ if (this.configuration && this.configuration.apiKey) {
1241
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1242
+ }
1243
+
1244
+ const response = await this.request({
1245
+ path: `/customer/customers/{customer_profile_oid}/magic_link/{storefront_host_name}`.replace(`{${"customer_profile_oid"}}`, encodeURIComponent(String(requestParameters.customerProfileOid))).replace(`{${"storefront_host_name"}}`, encodeURIComponent(String(requestParameters.storefrontHostName))),
1246
+ method: 'PUT',
1247
+ headers: headerParameters,
1248
+ query: queryParameters,
1249
+ }, initOverrides);
1250
+
1251
+ return new runtime.JSONApiResponse(response, (jsonValue) => CustomerMagicLinkResponseFromJSON(jsonValue));
1252
+ }
1253
+
1254
+ /**
1255
+ * Retrieves a magic link to allow a merchant to login as a customer. This method is a PUT call intentionally.
1256
+ * getMagicLink
1257
+ */
1258
+ async getMagicLink(requestParameters: GetMagicLinkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerMagicLinkResponse> {
1259
+ const response = await this.getMagicLinkRaw(requestParameters, initOverrides);
1260
+ return await response.value();
1261
+ }
1262
+
1193
1263
  /**
1194
1264
  * Insert a customer on the UltraCart account.
1195
1265
  * Insert a customer
@@ -387,6 +387,9 @@ import {
387
387
  ScreenshotsResponse,
388
388
  ScreenshotsResponseFromJSON,
389
389
  ScreenshotsResponseToJSON,
390
+ StoreFrontsResponse,
391
+ StoreFrontsResponseFromJSON,
392
+ StoreFrontsResponseToJSON,
390
393
  ThumbnailParametersRequest,
391
394
  ThumbnailParametersRequestFromJSON,
392
395
  ThumbnailParametersRequestToJSON,
@@ -2871,6 +2874,20 @@ export interface StorefrontApiInterface {
2871
2874
  */
2872
2875
  getStoreFrontPricingTiers(requestParameters: GetStoreFrontPricingTiersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PricingTiersResponse>;
2873
2876
 
2877
+ /**
2878
+ *
2879
+ * @summary Get storefronts (internal use only for security reasons)
2880
+ * @param {*} [options] Override http request option.
2881
+ * @throws {RequiredError}
2882
+ * @memberof StorefrontApiInterface
2883
+ */
2884
+ getStoreFrontsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StoreFrontsResponse>>;
2885
+
2886
+ /**
2887
+ * Get storefronts (internal use only for security reasons)
2888
+ */
2889
+ getStoreFronts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StoreFrontsResponse>;
2890
+
2874
2891
  /**
2875
2892
  *
2876
2893
  * @summary Get thumbnail parameters
@@ -8664,6 +8681,45 @@ export class StorefrontApi extends runtime.BaseAPI implements StorefrontApiInter
8664
8681
  return await response.value();
8665
8682
  }
8666
8683
 
8684
+ /**
8685
+ * Get storefronts (internal use only for security reasons)
8686
+ */
8687
+ async getStoreFrontsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StoreFrontsResponse>> {
8688
+ const queryParameters: any = {};
8689
+
8690
+ const headerParameters: runtime.HTTPHeaders = {};
8691
+
8692
+ if (this.configuration && this.configuration.apiKey) {
8693
+ headerParameters["x-ultracart-browser-key"] = this.configuration.apiKey("x-ultracart-browser-key"); // ultraCartBrowserApiKey authentication
8694
+ }
8695
+
8696
+ if (this.configuration && this.configuration.accessToken) {
8697
+ // oauth required
8698
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["affiliate_read", "affiliate_write", "auto_order_read", "auto_order_write", "channel_partner_read", "channel_partner_write", "chargeback_read", "chargeback_write", "checkout_read", "checkout_write", "configuration_read", "configuration_write", "conversation_read", "conversation_write", "coupon_read", "coupon_write", "customer_read", "customer_write", "fulfillment_read", "fulfillment_write", "gift_certificate_read", "gift_certificate_write", "integration_log_read", "integration_log_write", "order_read", "order_write", "item_read", "item_write", "storefront_read", "storefront_write", "tax_read", "tax_write", "webhook_read", "webhook_write", "ultrabooks_read", "ultrabooks_write", "user_read", "user_write"]);
8699
+ }
8700
+
8701
+ if (this.configuration && this.configuration.apiKey) {
8702
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
8703
+ }
8704
+
8705
+ const response = await this.request({
8706
+ path: `/storefront/`,
8707
+ method: 'GET',
8708
+ headers: headerParameters,
8709
+ query: queryParameters,
8710
+ }, initOverrides);
8711
+
8712
+ return new runtime.JSONApiResponse(response, (jsonValue) => StoreFrontsResponseFromJSON(jsonValue));
8713
+ }
8714
+
8715
+ /**
8716
+ * Get storefronts (internal use only for security reasons)
8717
+ */
8718
+ async getStoreFronts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StoreFrontsResponse> {
8719
+ const response = await this.getStoreFrontsRaw(initOverrides);
8720
+ return await response.value();
8721
+ }
8722
+
8667
8723
  /**
8668
8724
  * Get thumbnail parameters
8669
8725
  */
@@ -0,0 +1,107 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * UltraCart Rest API V2
5
+ * UltraCart REST API Version 2
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ * Contact: support@ultracart.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import {
17
+ ModelError,
18
+ ModelErrorFromJSON,
19
+ ModelErrorFromJSONTyped,
20
+ ModelErrorToJSON,
21
+ } from './ModelError';
22
+ import {
23
+ ResponseMetadata,
24
+ ResponseMetadataFromJSON,
25
+ ResponseMetadataFromJSONTyped,
26
+ ResponseMetadataToJSON,
27
+ } from './ResponseMetadata';
28
+ import {
29
+ Warning,
30
+ WarningFromJSON,
31
+ WarningFromJSONTyped,
32
+ WarningToJSON,
33
+ } from './Warning';
34
+
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface CustomerMagicLinkResponse
39
+ */
40
+ export interface CustomerMagicLinkResponse {
41
+ /**
42
+ *
43
+ * @type {ModelError}
44
+ * @memberof CustomerMagicLinkResponse
45
+ */
46
+ error?: ModelError;
47
+ /**
48
+ *
49
+ * @type {ResponseMetadata}
50
+ * @memberof CustomerMagicLinkResponse
51
+ */
52
+ metadata?: ResponseMetadata;
53
+ /**
54
+ * Indicates if API call was successful
55
+ * @type {boolean}
56
+ * @memberof CustomerMagicLinkResponse
57
+ */
58
+ success?: boolean;
59
+ /**
60
+ * URL
61
+ * @type {string}
62
+ * @memberof CustomerMagicLinkResponse
63
+ */
64
+ url?: string;
65
+ /**
66
+ *
67
+ * @type {Warning}
68
+ * @memberof CustomerMagicLinkResponse
69
+ */
70
+ warning?: Warning;
71
+ }
72
+
73
+ export function CustomerMagicLinkResponseFromJSON(json: any): CustomerMagicLinkResponse {
74
+ return CustomerMagicLinkResponseFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function CustomerMagicLinkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomerMagicLinkResponse {
78
+ if ((json === undefined) || (json === null)) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'error': !exists(json, 'error') ? undefined : ModelErrorFromJSON(json['error']),
84
+ 'metadata': !exists(json, 'metadata') ? undefined : ResponseMetadataFromJSON(json['metadata']),
85
+ 'success': !exists(json, 'success') ? undefined : json['success'],
86
+ 'url': !exists(json, 'url') ? undefined : json['url'],
87
+ 'warning': !exists(json, 'warning') ? undefined : WarningFromJSON(json['warning']),
88
+ };
89
+ }
90
+
91
+ export function CustomerMagicLinkResponseToJSON(value?: CustomerMagicLinkResponse | null): any {
92
+ if (value === undefined) {
93
+ return undefined;
94
+ }
95
+ if (value === null) {
96
+ return null;
97
+ }
98
+ return {
99
+
100
+ 'error': ModelErrorToJSON(value.error),
101
+ 'metadata': ResponseMetadataToJSON(value.metadata),
102
+ 'success': value.success,
103
+ 'url': value.url,
104
+ 'warning': WarningToJSON(value.warning),
105
+ };
106
+ }
107
+
@@ -0,0 +1,136 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * UltraCart Rest API V2
5
+ * UltraCart REST API Version 2
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ * Contact: support@ultracart.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface StoreFront
20
+ */
21
+ export interface StoreFront {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof StoreFront
26
+ */
27
+ host_alias1?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof StoreFront
32
+ */
33
+ host_alias2?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof StoreFront
38
+ */
39
+ host_alias3?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof StoreFront
44
+ */
45
+ host_alias4?: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof StoreFront
50
+ */
51
+ host_alias5?: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof StoreFront
56
+ */
57
+ host_name?: string;
58
+ /**
59
+ *
60
+ * @type {boolean}
61
+ * @memberof StoreFront
62
+ */
63
+ locked?: boolean;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof StoreFront
68
+ */
69
+ merchant_id?: string;
70
+ /**
71
+ *
72
+ * @type {boolean}
73
+ * @memberof StoreFront
74
+ */
75
+ redirect_aliases?: boolean;
76
+ /**
77
+ *
78
+ * @type {number}
79
+ * @memberof StoreFront
80
+ */
81
+ storefront_oid?: number;
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof StoreFront
86
+ */
87
+ unlock_password?: string;
88
+ }
89
+
90
+ export function StoreFrontFromJSON(json: any): StoreFront {
91
+ return StoreFrontFromJSONTyped(json, false);
92
+ }
93
+
94
+ export function StoreFrontFromJSONTyped(json: any, ignoreDiscriminator: boolean): StoreFront {
95
+ if ((json === undefined) || (json === null)) {
96
+ return json;
97
+ }
98
+ return {
99
+
100
+ 'host_alias1': !exists(json, 'host_alias1') ? undefined : json['host_alias1'],
101
+ 'host_alias2': !exists(json, 'host_alias2') ? undefined : json['host_alias2'],
102
+ 'host_alias3': !exists(json, 'host_alias3') ? undefined : json['host_alias3'],
103
+ 'host_alias4': !exists(json, 'host_alias4') ? undefined : json['host_alias4'],
104
+ 'host_alias5': !exists(json, 'host_alias5') ? undefined : json['host_alias5'],
105
+ 'host_name': !exists(json, 'host_name') ? undefined : json['host_name'],
106
+ 'locked': !exists(json, 'locked') ? undefined : json['locked'],
107
+ 'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
108
+ 'redirect_aliases': !exists(json, 'redirect_aliases') ? undefined : json['redirect_aliases'],
109
+ 'storefront_oid': !exists(json, 'storefront_oid') ? undefined : json['storefront_oid'],
110
+ 'unlock_password': !exists(json, 'unlock_password') ? undefined : json['unlock_password'],
111
+ };
112
+ }
113
+
114
+ export function StoreFrontToJSON(value?: StoreFront | null): any {
115
+ if (value === undefined) {
116
+ return undefined;
117
+ }
118
+ if (value === null) {
119
+ return null;
120
+ }
121
+ return {
122
+
123
+ 'host_alias1': value.host_alias1,
124
+ 'host_alias2': value.host_alias2,
125
+ 'host_alias3': value.host_alias3,
126
+ 'host_alias4': value.host_alias4,
127
+ 'host_alias5': value.host_alias5,
128
+ 'host_name': value.host_name,
129
+ 'locked': value.locked,
130
+ 'merchant_id': value.merchant_id,
131
+ 'redirect_aliases': value.redirect_aliases,
132
+ 'storefront_oid': value.storefront_oid,
133
+ 'unlock_password': value.unlock_password,
134
+ };
135
+ }
136
+
@@ -0,0 +1,113 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * UltraCart Rest API V2
5
+ * UltraCart REST API Version 2
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ * Contact: support@ultracart.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import {
17
+ ModelError,
18
+ ModelErrorFromJSON,
19
+ ModelErrorFromJSONTyped,
20
+ ModelErrorToJSON,
21
+ } from './ModelError';
22
+ import {
23
+ ResponseMetadata,
24
+ ResponseMetadataFromJSON,
25
+ ResponseMetadataFromJSONTyped,
26
+ ResponseMetadataToJSON,
27
+ } from './ResponseMetadata';
28
+ import {
29
+ StoreFront,
30
+ StoreFrontFromJSON,
31
+ StoreFrontFromJSONTyped,
32
+ StoreFrontToJSON,
33
+ } from './StoreFront';
34
+ import {
35
+ Warning,
36
+ WarningFromJSON,
37
+ WarningFromJSONTyped,
38
+ WarningToJSON,
39
+ } from './Warning';
40
+
41
+ /**
42
+ *
43
+ * @export
44
+ * @interface StoreFrontsResponse
45
+ */
46
+ export interface StoreFrontsResponse {
47
+ /**
48
+ *
49
+ * @type {ModelError}
50
+ * @memberof StoreFrontsResponse
51
+ */
52
+ error?: ModelError;
53
+ /**
54
+ *
55
+ * @type {ResponseMetadata}
56
+ * @memberof StoreFrontsResponse
57
+ */
58
+ metadata?: ResponseMetadata;
59
+ /**
60
+ *
61
+ * @type {Array<StoreFront>}
62
+ * @memberof StoreFrontsResponse
63
+ */
64
+ storeFronts?: Array<StoreFront>;
65
+ /**
66
+ * Indicates if API call was successful
67
+ * @type {boolean}
68
+ * @memberof StoreFrontsResponse
69
+ */
70
+ success?: boolean;
71
+ /**
72
+ *
73
+ * @type {Warning}
74
+ * @memberof StoreFrontsResponse
75
+ */
76
+ warning?: Warning;
77
+ }
78
+
79
+ export function StoreFrontsResponseFromJSON(json: any): StoreFrontsResponse {
80
+ return StoreFrontsResponseFromJSONTyped(json, false);
81
+ }
82
+
83
+ export function StoreFrontsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StoreFrontsResponse {
84
+ if ((json === undefined) || (json === null)) {
85
+ return json;
86
+ }
87
+ return {
88
+
89
+ 'error': !exists(json, 'error') ? undefined : ModelErrorFromJSON(json['error']),
90
+ 'metadata': !exists(json, 'metadata') ? undefined : ResponseMetadataFromJSON(json['metadata']),
91
+ 'storeFronts': !exists(json, 'storeFronts') ? undefined : ((json['storeFronts'] as Array<any>).map(StoreFrontFromJSON)),
92
+ 'success': !exists(json, 'success') ? undefined : json['success'],
93
+ 'warning': !exists(json, 'warning') ? undefined : WarningFromJSON(json['warning']),
94
+ };
95
+ }
96
+
97
+ export function StoreFrontsResponseToJSON(value?: StoreFrontsResponse | null): any {
98
+ if (value === undefined) {
99
+ return undefined;
100
+ }
101
+ if (value === null) {
102
+ return null;
103
+ }
104
+ return {
105
+
106
+ 'error': ModelErrorToJSON(value.error),
107
+ 'metadata': ResponseMetadataToJSON(value.metadata),
108
+ 'storeFronts': value.storeFronts === undefined ? undefined : ((value.storeFronts as Array<any>).map(StoreFrontToJSON)),
109
+ 'success': value.success,
110
+ 'warning': WarningToJSON(value.warning),
111
+ };
112
+ }
113
+
@@ -219,6 +219,7 @@ export * from './CustomerEmailListChanges';
219
219
  export * from './CustomerLoyalty';
220
220
  export * from './CustomerLoyaltyLedger';
221
221
  export * from './CustomerLoyaltyRedemption';
222
+ export * from './CustomerMagicLinkResponse';
222
223
  export * from './CustomerMergeRequest';
223
224
  export * from './CustomerOrdersSummary';
224
225
  export * from './CustomerPricingTier';
@@ -606,6 +607,8 @@ export * from './SingleSignOnTokenResponse';
606
607
  export * from './SovosConfig';
607
608
  export * from './StateProvince';
608
609
  export * from './StepWaiting';
610
+ export * from './StoreFront';
611
+ export * from './StoreFrontsResponse';
609
612
  export * from './TaxCity';
610
613
  export * from './TaxCountry';
611
614
  export * from './TaxCountryCode';