hostinger-api-sdk 1.40.3 → 1.41.1

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.
Files changed (92) hide show
  1. package/README.md +2 -2
  2. package/api.ts +7273 -3513
  3. package/base.ts +1 -1
  4. package/common.ts +1 -1
  5. package/configuration.ts +2 -2
  6. package/dist/api.d.ts +10977 -8171
  7. package/dist/api.js +1973 -100
  8. package/dist/base.d.ts +1 -1
  9. package/dist/base.js +1 -1
  10. package/dist/common.d.ts +1 -1
  11. package/dist/common.js +1 -1
  12. package/dist/configuration.d.ts +1 -1
  13. package/dist/configuration.js +2 -2
  14. package/dist/esm/api.d.ts +10977 -8171
  15. package/dist/esm/api.js +1969 -109
  16. package/dist/esm/base.d.ts +1 -1
  17. package/dist/esm/base.js +1 -1
  18. package/dist/esm/common.d.ts +1 -1
  19. package/dist/esm/common.js +1 -1
  20. package/dist/esm/configuration.d.ts +1 -1
  21. package/dist/esm/configuration.js +2 -2
  22. package/dist/esm/index.d.ts +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +1 -1
  26. package/docs/EcommerceDiscountsApi.md +129 -0
  27. package/docs/EcommerceListDiscountsV1200Response.md +22 -0
  28. package/docs/EcommerceListProductVariantsV1200Response.md +22 -0
  29. package/docs/EcommerceListProductsV1200Response.md +22 -0
  30. package/docs/EcommerceListStoreOrdersV1200Response.md +22 -0
  31. package/docs/EcommerceOrdersApi.md +269 -0
  32. package/docs/EcommercePaymentsApi.md +114 -0
  33. package/docs/EcommerceProductVariantsApi.md +251 -0
  34. package/docs/EcommerceProductsApi.md +188 -0
  35. package/docs/EcommerceSalesChannelsApi.md +5 -5
  36. package/docs/EcommerceV1DiscountCreateDiscountRequest.md +38 -0
  37. package/docs/EcommerceV1DiscountDiscountResource.md +40 -0
  38. package/docs/EcommerceV1DiscountDiscountResponseResource.md +20 -0
  39. package/docs/EcommerceV1OrderCancelRequest.md +20 -0
  40. package/docs/EcommerceV1OrderFulfillRequest.md +26 -0
  41. package/docs/EcommerceV1OrderFulfillRequestItemsInner.md +22 -0
  42. package/docs/EcommerceV1OrderOrderDetailResource.md +60 -0
  43. package/docs/EcommerceV1OrderOrderDetailResourceBillingAddress.md +37 -0
  44. package/docs/EcommerceV1OrderOrderDetailResourceFulfillmentsInner.md +28 -0
  45. package/docs/EcommerceV1OrderOrderDetailResourceFulfillmentsInnerTrackingInner.md +22 -0
  46. package/docs/EcommerceV1OrderOrderDetailResourceItemsInner.md +36 -0
  47. package/docs/EcommerceV1OrderOrderDetailResourceShippingAddress.md +37 -0
  48. package/docs/EcommerceV1OrderOrderDetailResponseResource.md +20 -0
  49. package/docs/EcommerceV1OrderOrderResource.md +38 -0
  50. package/docs/EcommerceV1OrderOrderResponseResource.md +20 -0
  51. package/docs/EcommerceV1PaymentProviderPaymentProviderConnectLinkResource.md +20 -0
  52. package/docs/EcommerceV1PaymentProviderPaymentProviderConnectLinkResourceData.md +22 -0
  53. package/docs/EcommerceV1PaymentProviderPaymentProviderListResource.md +20 -0
  54. package/docs/EcommerceV1PaymentProviderPaymentProviderListResourceData.md +22 -0
  55. package/docs/EcommerceV1PaymentProviderPaymentProviderListResourceDataAvailableInner.md +28 -0
  56. package/docs/EcommerceV1PaymentProviderPaymentProviderListResourceDataConnectedInner.md +30 -0
  57. package/docs/EcommerceV1ProductProductDeletedResource.md +20 -0
  58. package/docs/EcommerceV1ProductProductDeletedResourceData.md +24 -0
  59. package/docs/EcommerceV1ProductProductResource.md +36 -0
  60. package/docs/EcommerceV1ProductProductResourceMediaInner.md +24 -0
  61. package/docs/EcommerceV1ProductProductResourcePriceRange.md +25 -0
  62. package/docs/EcommerceV1ProductProductResourceVariantsInner.md +32 -0
  63. package/docs/EcommerceV1ProductProductResourceVariantsInnerOptionsInner.md +22 -0
  64. package/docs/EcommerceV1ProductProductResourceVariantsInnerPricesInner.md +24 -0
  65. package/docs/EcommerceV1ProductProductResponseResource.md +20 -0
  66. package/docs/EcommerceV1ProductUpdateRequest.md +24 -0
  67. package/docs/EcommerceV1SalesChannelStoreRequest.md +3 -3
  68. package/docs/EcommerceV1VariantBatchUpdateVariantsRequest.md +20 -0
  69. package/docs/EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner.md +28 -0
  70. package/docs/EcommerceV1VariantBatchUpdateVariantsRequestVariantsInnerPricesInner.md +24 -0
  71. package/docs/EcommerceV1VariantCreateVariantRequest.md +30 -0
  72. package/docs/EcommerceV1VariantCreateVariantRequestOptionsInner.md +22 -0
  73. package/docs/EcommerceV1VariantCreateVariantRequestPricesInner.md +24 -0
  74. package/docs/EcommerceV1VariantVariantDeletedResource.md +20 -0
  75. package/docs/EcommerceV1VariantVariantDeletedResourceData.md +22 -0
  76. package/docs/EcommerceV1VariantVariantListResponseResource.md +20 -0
  77. package/docs/EcommerceV1VariantVariantResource.md +32 -0
  78. package/docs/EcommerceV1VariantVariantResourceOptionsInner.md +22 -0
  79. package/docs/EcommerceV1VariantVariantResponseResource.md +20 -0
  80. package/docs/ReachProfilesApi.md +108 -0
  81. package/docs/ReachSegmentsApi.md +113 -0
  82. package/docs/ReachV1ContactsSegmentsProfileFilterContactsRequest.md +33 -0
  83. package/docs/ReachV1ContactsSegmentsProfileFilterContactsRequestConditionsInner.md +24 -0
  84. package/docs/ReachV1ContactsSegmentsSegmentFilterAttributeResource.md +27 -0
  85. package/docs/ReachV1ContactsSegmentsSegmentFilterAttributesResource.md +23 -0
  86. package/docs/ReachV1ContactsSegmentsSegmentFilterOperatorResource.md +29 -0
  87. package/docs/ReachV1ContactsStoreRequest.md +2 -0
  88. package/docs/ReachV1ProfilesDomainsSendingDomainResource.md +29 -0
  89. package/docs/ReachV1ProfilesDomainsSuspendedSenderEmailResource.md +25 -0
  90. package/docs/ReachV1ProfilesFeaturesPlanFeatureResource.md +25 -0
  91. package/index.ts +1 -1
  92. package/package.json +1 -1
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.42.3
6
+ * API Version: 1.43.1
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -211,10 +211,46 @@ export const DomainsV1WHOISStoreRequestEntityTypeEnum = {
211
211
  Individual: 'individual',
212
212
  Organization: 'organization'
213
213
  };
214
+ export const EcommerceV1DiscountCreateDiscountRequestTypeEnum = {
215
+ Percentage: 'percentage',
216
+ Fixed: 'fixed',
217
+ FreeShipping: 'free_shipping'
218
+ };
219
+ export const EcommerceV1DiscountCreateDiscountRequestAllocationEnum = {
220
+ Total: 'total',
221
+ Item: 'item'
222
+ };
223
+ export const EcommerceV1DiscountDiscountResourceTypeEnum = {
224
+ Percentage: 'percentage',
225
+ Fixed: 'fixed',
226
+ FreeShipping: 'free_shipping'
227
+ };
228
+ export const EcommerceV1DiscountDiscountResourceAllocationEnum = {
229
+ Total: 'total',
230
+ Item: 'item'
231
+ };
232
+ export const EcommerceV1PaymentProviderPaymentProviderListResourceDataConnectedInnerStatusEnum = {
233
+ Connected: 'connected',
234
+ Pending: 'pending',
235
+ New: 'new',
236
+ Invalid: 'invalid'
237
+ };
214
238
  export const EcommerceV1ProductProductCreationResourceProductTypeEnum = {
215
239
  Physical: 'physical',
216
240
  Digital: 'digital'
217
241
  };
242
+ export const EcommerceV1ProductProductResourceStatusEnum = {
243
+ Draft: 'draft',
244
+ Proposed: 'proposed',
245
+ Published: 'published',
246
+ Rejected: 'rejected',
247
+ Archived: 'archived'
248
+ };
249
+ export const EcommerceV1ProductUpdateRequestStatusEnum = {
250
+ Draft: 'draft',
251
+ Published: 'published',
252
+ Archived: 'archived'
253
+ };
218
254
  export const EcommerceV1SalesChannelSalesChannelCreationResourceSalesChannelTypeEnum = {
219
255
  Builder: 'builder',
220
256
  Horizons: 'horizons',
@@ -232,7 +268,8 @@ export const EcommerceV1SalesChannelSalesChannelListResourceSalesChannelsInnerTy
232
268
  Wordpress: 'wordpress'
233
269
  };
234
270
  export const EcommerceV1SalesChannelStoreRequestTypeEnum = {
235
- Custom: 'custom'
271
+ Custom: 'custom',
272
+ QuickLink: 'quick-link'
236
273
  };
237
274
  export const EcommerceV1StoreStoreCreationResourceSalesChannelTypeEnum = {
238
275
  Builder: 'builder',
@@ -607,6 +644,49 @@ export const ReachV1ContactsProfileContactUpdateResourceSubscriptionStatusEnum =
607
644
  Confirmed: 'confirmed',
608
645
  Pending: 'pending'
609
646
  };
647
+ export const ReachV1ContactsSegmentsProfileFilterContactsRequestLogicEnum = {
648
+ And: 'AND',
649
+ Or: 'OR'
650
+ };
651
+ export const ReachV1ContactsSegmentsProfileFilterContactsRequestSortByEnum = {
652
+ Email: 'email',
653
+ Name: 'name',
654
+ Surname: 'surname',
655
+ Phone: 'phone',
656
+ SubscriptionStatus: 'subscription_status'
657
+ };
658
+ export const ReachV1ContactsSegmentsProfileFilterContactsRequestSortDirectionEnum = {
659
+ Asc: 'asc',
660
+ Desc: 'desc'
661
+ };
662
+ export const ReachV1ContactsSegmentsProfileFilterContactsRequestConditionsInnerOperatorEnum = {
663
+ Equals: 'equals',
664
+ NotEquals: 'not_equals',
665
+ Contains: 'contains',
666
+ NotContains: 'not_contains',
667
+ Gte: 'gte',
668
+ Lte: 'lte',
669
+ Exists: 'exists',
670
+ WithinLastDays: 'within_last_days',
671
+ NotWithinLastDays: 'not_within_last_days',
672
+ OlderThanDays: 'older_than_days',
673
+ Processed: 'processed',
674
+ NotProcessed: 'not_processed',
675
+ Delivered: 'delivered',
676
+ NotDelivered: 'not_delivered',
677
+ Dropped: 'dropped',
678
+ NotDropped: 'not_dropped',
679
+ Bounced: 'bounced',
680
+ NotBounced: 'not_bounced',
681
+ SoftBounced: 'soft_bounced',
682
+ NotSoftBounced: 'not_soft_bounced',
683
+ Opened: 'opened',
684
+ NotOpened: 'not_opened',
685
+ Clicked: 'clicked',
686
+ NotClicked: 'not_clicked',
687
+ Unsubscribed: 'unsubscribed',
688
+ NotUnsubscribed: 'not_unsubscribed'
689
+ };
610
690
  export const ReachV1ContactsSegmentsProfileStoreRequestLogicEnum = {
611
691
  And: 'AND',
612
692
  Or: 'OR'
@@ -643,6 +723,50 @@ export const ReachV1ContactsSegmentsProfileUpdateRequestLogicEnum = {
643
723
  And: 'AND',
644
724
  Or: 'OR'
645
725
  };
726
+ export const ReachV1ContactsSegmentsSegmentFilterAttributeResourceTypeEnum = {
727
+ Contacts: 'contacts',
728
+ ContactMetadata: 'contact_metadata',
729
+ CampaignEvents: 'campaign_events',
730
+ ContactTags: 'contact_tags',
731
+ Campaigns: 'campaigns',
732
+ OptInMethod: 'opt_in_method',
733
+ ContactFieldValues: 'contact_field_values',
734
+ ContactFieldSelections: 'contact_field_selections'
735
+ };
736
+ export const ReachV1ContactsSegmentsSegmentFilterOperatorResourceOperatorEnum = {
737
+ Equals: 'equals',
738
+ NotEquals: 'not_equals',
739
+ Contains: 'contains',
740
+ NotContains: 'not_contains',
741
+ Gte: 'gte',
742
+ Lte: 'lte',
743
+ Exists: 'exists',
744
+ WithinLastDays: 'within_last_days',
745
+ NotWithinLastDays: 'not_within_last_days',
746
+ OlderThanDays: 'older_than_days',
747
+ Processed: 'processed',
748
+ NotProcessed: 'not_processed',
749
+ Delivered: 'delivered',
750
+ NotDelivered: 'not_delivered',
751
+ Dropped: 'dropped',
752
+ NotDropped: 'not_dropped',
753
+ Bounced: 'bounced',
754
+ NotBounced: 'not_bounced',
755
+ SoftBounced: 'soft_bounced',
756
+ NotSoftBounced: 'not_soft_bounced',
757
+ Opened: 'opened',
758
+ NotOpened: 'not_opened',
759
+ Clicked: 'clicked',
760
+ NotClicked: 'not_clicked',
761
+ Unsubscribed: 'unsubscribed',
762
+ NotUnsubscribed: 'not_unsubscribed'
763
+ };
764
+ export const ReachV1ContactsSegmentsSegmentFilterOperatorResourceInputTypeEnum = {
765
+ Text: 'text',
766
+ Number: 'number',
767
+ Date: 'date',
768
+ Select: 'select'
769
+ };
646
770
  export const ReachV1ContactsSegmentsSegmentationContactResourceSubscriptionStatusEnum = {
647
771
  Subscribed: 'subscribed',
648
772
  Unsubscribed: 'unsubscribed',
@@ -744,6 +868,21 @@ export const ReachV1FormsFormTagResourceTypeEnum = {
744
868
  Import: 'import',
745
869
  System: 'system'
746
870
  };
871
+ export const ReachV1ProfilesDomainsSendingDomainResourceStatusEnum = {
872
+ Active: 'active',
873
+ Inactive: 'inactive',
874
+ Pending: 'pending',
875
+ Blocked: 'blocked'
876
+ };
877
+ export const ReachV1ProfilesFeaturesPlanFeatureResourceFeatureEnum = {
878
+ AutomationActivation: 'AutomationActivation',
879
+ SmartSending: 'SmartSending',
880
+ AiGenerateSubjectLines: 'AiGenerateSubjectLines',
881
+ TemplateCheckerAnalysis: 'TemplateCheckerAnalysis',
882
+ RemoveSignature: 'RemoveSignature',
883
+ Collaborators: 'Collaborators',
884
+ HtmlCodeEditor: 'HtmlCodeEditor'
885
+ };
747
886
  export const VPSV1ActionActionResourceStateEnum = {
748
887
  Success: 'success',
749
888
  Error: 'error',
@@ -8435,19 +8574,63 @@ export class DomainsWHOISApi extends BaseAPI {
8435
8574
  }
8436
8575
  }
8437
8576
  /**
8438
- * EcommerceMiscellaneousApi - axios parameter creator
8577
+ * EcommerceDiscountsApi - axios parameter creator
8439
8578
  * @export
8440
8579
  */
8441
- export const EcommerceMiscellaneousApiAxiosParamCreator = function (configuration) {
8580
+ export const EcommerceDiscountsApiAxiosParamCreator = function (configuration) {
8442
8581
  return {
8443
8582
  /**
8444
- * Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
8445
- * @summary Get custom storefront setup instructions
8583
+ * Create a discount for a store. Fixed discounts take an amount in the smallest currency unit (e.g. $10 is 1000); percentage discounts take a whole-number value between 1 and 100. Free-shipping discounts ignore value. Returns the created discount.
8584
+ * @summary Create a discount
8585
+ * @param {string} storeId The ID of the store to create the discount for.
8586
+ * @param {EcommerceV1DiscountCreateDiscountRequest} ecommerceV1DiscountCreateDiscountRequest
8446
8587
  * @param {*} [options] Override http request option.
8447
8588
  * @throws {RequiredError}
8448
8589
  */
8449
- getCustomStorefrontSetupInstructionsV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
8450
- const localVarPath = `/api/ecommerce/v1/miscellaneous/custom-storefront-instructions`;
8590
+ createADiscountV1: (storeId_1, ecommerceV1DiscountCreateDiscountRequest_1, ...args_1) => __awaiter(this, [storeId_1, ecommerceV1DiscountCreateDiscountRequest_1, ...args_1], void 0, function* (storeId, ecommerceV1DiscountCreateDiscountRequest, options = {}) {
8591
+ // verify required parameter 'storeId' is not null or undefined
8592
+ assertParamExists('createADiscountV1', 'storeId', storeId);
8593
+ // verify required parameter 'ecommerceV1DiscountCreateDiscountRequest' is not null or undefined
8594
+ assertParamExists('createADiscountV1', 'ecommerceV1DiscountCreateDiscountRequest', ecommerceV1DiscountCreateDiscountRequest);
8595
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/discounts`
8596
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
8597
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8598
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8599
+ let baseOptions;
8600
+ if (configuration) {
8601
+ baseOptions = configuration.baseOptions;
8602
+ }
8603
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
8604
+ const localVarHeaderParameter = {};
8605
+ const localVarQueryParameter = {};
8606
+ // authentication apiToken required
8607
+ // http bearer authentication required
8608
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
8609
+ localVarHeaderParameter['Content-Type'] = 'application/json';
8610
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
8611
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8612
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
8613
+ localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1DiscountCreateDiscountRequest, localVarRequestOptions, configuration);
8614
+ return {
8615
+ url: toPathString(localVarUrlObj),
8616
+ options: localVarRequestOptions,
8617
+ };
8618
+ }),
8619
+ /**
8620
+ * List a store\'s discounts. Filter by free text over code and name, or by disabled state. Amounts for fixed discounts are integers in the smallest currency unit; percentage discounts carry a whole-number value between 1 and 100.
8621
+ * @summary List discounts
8622
+ * @param {string} storeId The ID of the store to list discounts for.
8623
+ * @param {string} [q] Free-text search over discount code and name.
8624
+ * @param {ListDiscountsV1IsDisabledEnum} [isDisabled] Filter by disabled state.
8625
+ * @param {number} [page] Page number
8626
+ * @param {*} [options] Override http request option.
8627
+ * @throws {RequiredError}
8628
+ */
8629
+ listDiscountsV1: (storeId_1, q_1, isDisabled_1, page_1, ...args_1) => __awaiter(this, [storeId_1, q_1, isDisabled_1, page_1, ...args_1], void 0, function* (storeId, q, isDisabled, page, options = {}) {
8630
+ // verify required parameter 'storeId' is not null or undefined
8631
+ assertParamExists('listDiscountsV1', 'storeId', storeId);
8632
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/discounts`
8633
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
8451
8634
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
8452
8635
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8453
8636
  let baseOptions;
@@ -8460,6 +8643,15 @@ export const EcommerceMiscellaneousApiAxiosParamCreator = function (configuratio
8460
8643
  // authentication apiToken required
8461
8644
  // http bearer authentication required
8462
8645
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
8646
+ if (q !== undefined) {
8647
+ localVarQueryParameter['q'] = q;
8648
+ }
8649
+ if (isDisabled !== undefined) {
8650
+ localVarQueryParameter['is_disabled'] = isDisabled;
8651
+ }
8652
+ if (page !== undefined) {
8653
+ localVarQueryParameter['page'] = page;
8654
+ }
8463
8655
  setSearchParams(localVarUrlObj, localVarQueryParameter);
8464
8656
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8465
8657
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -8471,102 +8663,151 @@ export const EcommerceMiscellaneousApiAxiosParamCreator = function (configuratio
8471
8663
  };
8472
8664
  };
8473
8665
  /**
8474
- * EcommerceMiscellaneousApi - functional programming interface
8666
+ * EcommerceDiscountsApi - functional programming interface
8475
8667
  * @export
8476
8668
  */
8477
- export const EcommerceMiscellaneousApiFp = function (configuration) {
8478
- const localVarAxiosParamCreator = EcommerceMiscellaneousApiAxiosParamCreator(configuration);
8669
+ export const EcommerceDiscountsApiFp = function (configuration) {
8670
+ const localVarAxiosParamCreator = EcommerceDiscountsApiAxiosParamCreator(configuration);
8479
8671
  return {
8480
8672
  /**
8481
- * Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
8482
- * @summary Get custom storefront setup instructions
8673
+ * Create a discount for a store. Fixed discounts take an amount in the smallest currency unit (e.g. $10 is 1000); percentage discounts take a whole-number value between 1 and 100. Free-shipping discounts ignore value. Returns the created discount.
8674
+ * @summary Create a discount
8675
+ * @param {string} storeId The ID of the store to create the discount for.
8676
+ * @param {EcommerceV1DiscountCreateDiscountRequest} ecommerceV1DiscountCreateDiscountRequest
8483
8677
  * @param {*} [options] Override http request option.
8484
8678
  * @throws {RequiredError}
8485
8679
  */
8486
- getCustomStorefrontSetupInstructionsV1(options) {
8680
+ createADiscountV1(storeId, ecommerceV1DiscountCreateDiscountRequest, options) {
8487
8681
  return __awaiter(this, void 0, void 0, function* () {
8488
8682
  var _a, _b;
8489
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getCustomStorefrontSetupInstructionsV1(options);
8490
- const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceMiscellaneousApi.getCustomStorefrontSetupInstructionsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
8683
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createADiscountV1(storeId, ecommerceV1DiscountCreateDiscountRequest, options);
8684
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceDiscountsApi.createADiscountV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
8685
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8686
+ });
8687
+ },
8688
+ /**
8689
+ * List a store\'s discounts. Filter by free text over code and name, or by disabled state. Amounts for fixed discounts are integers in the smallest currency unit; percentage discounts carry a whole-number value between 1 and 100.
8690
+ * @summary List discounts
8691
+ * @param {string} storeId The ID of the store to list discounts for.
8692
+ * @param {string} [q] Free-text search over discount code and name.
8693
+ * @param {ListDiscountsV1IsDisabledEnum} [isDisabled] Filter by disabled state.
8694
+ * @param {number} [page] Page number
8695
+ * @param {*} [options] Override http request option.
8696
+ * @throws {RequiredError}
8697
+ */
8698
+ listDiscountsV1(storeId, q, isDisabled, page, options) {
8699
+ return __awaiter(this, void 0, void 0, function* () {
8700
+ var _a, _b;
8701
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listDiscountsV1(storeId, q, isDisabled, page, options);
8702
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceDiscountsApi.listDiscountsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
8491
8703
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8492
8704
  });
8493
8705
  },
8494
8706
  };
8495
8707
  };
8496
8708
  /**
8497
- * EcommerceMiscellaneousApi - factory interface
8709
+ * EcommerceDiscountsApi - factory interface
8498
8710
  * @export
8499
8711
  */
8500
- export const EcommerceMiscellaneousApiFactory = function (configuration, basePath, axios) {
8501
- const localVarFp = EcommerceMiscellaneousApiFp(configuration);
8712
+ export const EcommerceDiscountsApiFactory = function (configuration, basePath, axios) {
8713
+ const localVarFp = EcommerceDiscountsApiFp(configuration);
8502
8714
  return {
8503
8715
  /**
8504
- * Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
8505
- * @summary Get custom storefront setup instructions
8716
+ * Create a discount for a store. Fixed discounts take an amount in the smallest currency unit (e.g. $10 is 1000); percentage discounts take a whole-number value between 1 and 100. Free-shipping discounts ignore value. Returns the created discount.
8717
+ * @summary Create a discount
8718
+ * @param {string} storeId The ID of the store to create the discount for.
8719
+ * @param {EcommerceV1DiscountCreateDiscountRequest} ecommerceV1DiscountCreateDiscountRequest
8506
8720
  * @param {*} [options] Override http request option.
8507
8721
  * @throws {RequiredError}
8508
8722
  */
8509
- getCustomStorefrontSetupInstructionsV1(options) {
8510
- return localVarFp.getCustomStorefrontSetupInstructionsV1(options).then((request) => request(axios, basePath));
8723
+ createADiscountV1(storeId, ecommerceV1DiscountCreateDiscountRequest, options) {
8724
+ return localVarFp.createADiscountV1(storeId, ecommerceV1DiscountCreateDiscountRequest, options).then((request) => request(axios, basePath));
8725
+ },
8726
+ /**
8727
+ * List a store\'s discounts. Filter by free text over code and name, or by disabled state. Amounts for fixed discounts are integers in the smallest currency unit; percentage discounts carry a whole-number value between 1 and 100.
8728
+ * @summary List discounts
8729
+ * @param {string} storeId The ID of the store to list discounts for.
8730
+ * @param {string} [q] Free-text search over discount code and name.
8731
+ * @param {ListDiscountsV1IsDisabledEnum} [isDisabled] Filter by disabled state.
8732
+ * @param {number} [page] Page number
8733
+ * @param {*} [options] Override http request option.
8734
+ * @throws {RequiredError}
8735
+ */
8736
+ listDiscountsV1(storeId, q, isDisabled, page, options) {
8737
+ return localVarFp.listDiscountsV1(storeId, q, isDisabled, page, options).then((request) => request(axios, basePath));
8511
8738
  },
8512
8739
  };
8513
8740
  };
8514
8741
  /**
8515
- * EcommerceMiscellaneousApi - object-oriented interface
8742
+ * EcommerceDiscountsApi - object-oriented interface
8516
8743
  * @export
8517
- * @class EcommerceMiscellaneousApi
8744
+ * @class EcommerceDiscountsApi
8518
8745
  * @extends {BaseAPI}
8519
8746
  */
8520
- export class EcommerceMiscellaneousApi extends BaseAPI {
8747
+ export class EcommerceDiscountsApi extends BaseAPI {
8521
8748
  /**
8522
- * Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
8523
- * @summary Get custom storefront setup instructions
8749
+ * Create a discount for a store. Fixed discounts take an amount in the smallest currency unit (e.g. $10 is 1000); percentage discounts take a whole-number value between 1 and 100. Free-shipping discounts ignore value. Returns the created discount.
8750
+ * @summary Create a discount
8751
+ * @param {string} storeId The ID of the store to create the discount for.
8752
+ * @param {EcommerceV1DiscountCreateDiscountRequest} ecommerceV1DiscountCreateDiscountRequest
8524
8753
  * @param {*} [options] Override http request option.
8525
8754
  * @throws {RequiredError}
8526
- * @memberof EcommerceMiscellaneousApi
8755
+ * @memberof EcommerceDiscountsApi
8527
8756
  */
8528
- getCustomStorefrontSetupInstructionsV1(options) {
8529
- return EcommerceMiscellaneousApiFp(this.configuration).getCustomStorefrontSetupInstructionsV1(options).then((request) => request(this.axios, this.basePath));
8757
+ createADiscountV1(storeId, ecommerceV1DiscountCreateDiscountRequest, options) {
8758
+ return EcommerceDiscountsApiFp(this.configuration).createADiscountV1(storeId, ecommerceV1DiscountCreateDiscountRequest, options).then((request) => request(this.axios, this.basePath));
8759
+ }
8760
+ /**
8761
+ * List a store\'s discounts. Filter by free text over code and name, or by disabled state. Amounts for fixed discounts are integers in the smallest currency unit; percentage discounts carry a whole-number value between 1 and 100.
8762
+ * @summary List discounts
8763
+ * @param {string} storeId The ID of the store to list discounts for.
8764
+ * @param {string} [q] Free-text search over discount code and name.
8765
+ * @param {ListDiscountsV1IsDisabledEnum} [isDisabled] Filter by disabled state.
8766
+ * @param {number} [page] Page number
8767
+ * @param {*} [options] Override http request option.
8768
+ * @throws {RequiredError}
8769
+ * @memberof EcommerceDiscountsApi
8770
+ */
8771
+ listDiscountsV1(storeId, q, isDisabled, page, options) {
8772
+ return EcommerceDiscountsApiFp(this.configuration).listDiscountsV1(storeId, q, isDisabled, page, options).then((request) => request(this.axios, this.basePath));
8530
8773
  }
8531
8774
  }
8532
8775
  /**
8533
- * EcommercePaymentsApi - axios parameter creator
8534
8776
  * @export
8535
8777
  */
8536
- export const EcommercePaymentsApiAxiosParamCreator = function (configuration) {
8778
+ export const ListDiscountsV1IsDisabledEnum = {
8779
+ True: 'true',
8780
+ False: 'false'
8781
+ };
8782
+ /**
8783
+ * EcommerceMiscellaneousApi - axios parameter creator
8784
+ * @export
8785
+ */
8786
+ export const EcommerceMiscellaneousApiAxiosParamCreator = function (configuration) {
8537
8787
  return {
8538
8788
  /**
8539
- * Enable a manual payment method so the store can accept orders without an online payment provider.
8540
- * @summary Enable manual payment method
8541
- * @param {string} storeId The ID of the store to enable manual payment for.
8542
- * @param {EcommerceV1PaymentEnableManualPaymentRequest} ecommerceV1PaymentEnableManualPaymentRequest
8789
+ * Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
8790
+ * @summary Get custom storefront setup instructions
8543
8791
  * @param {*} [options] Override http request option.
8544
8792
  * @throws {RequiredError}
8545
8793
  */
8546
- enableManualPaymentMethodV1: (storeId_1, ecommerceV1PaymentEnableManualPaymentRequest_1, ...args_1) => __awaiter(this, [storeId_1, ecommerceV1PaymentEnableManualPaymentRequest_1, ...args_1], void 0, function* (storeId, ecommerceV1PaymentEnableManualPaymentRequest, options = {}) {
8547
- // verify required parameter 'storeId' is not null or undefined
8548
- assertParamExists('enableManualPaymentMethodV1', 'storeId', storeId);
8549
- // verify required parameter 'ecommerceV1PaymentEnableManualPaymentRequest' is not null or undefined
8550
- assertParamExists('enableManualPaymentMethodV1', 'ecommerceV1PaymentEnableManualPaymentRequest', ecommerceV1PaymentEnableManualPaymentRequest);
8551
- const localVarPath = `/api/ecommerce/v1/stores/{store_id}/payment-methods/manual`
8552
- .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
8794
+ getCustomStorefrontSetupInstructionsV1: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
8795
+ const localVarPath = `/api/ecommerce/v1/miscellaneous/custom-storefront-instructions`;
8553
8796
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
8554
8797
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8555
8798
  let baseOptions;
8556
8799
  if (configuration) {
8557
8800
  baseOptions = configuration.baseOptions;
8558
8801
  }
8559
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
8802
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
8560
8803
  const localVarHeaderParameter = {};
8561
8804
  const localVarQueryParameter = {};
8562
8805
  // authentication apiToken required
8563
8806
  // http bearer authentication required
8564
8807
  yield setBearerAuthToObject(localVarHeaderParameter, configuration);
8565
- localVarHeaderParameter['Content-Type'] = 'application/json';
8566
8808
  setSearchParams(localVarUrlObj, localVarQueryParameter);
8567
8809
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8568
8810
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
8569
- localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1PaymentEnableManualPaymentRequest, localVarRequestOptions, configuration);
8570
8811
  return {
8571
8812
  url: toPathString(localVarUrlObj),
8572
8813
  options: localVarRequestOptions,
@@ -8575,80 +8816,1141 @@ export const EcommercePaymentsApiAxiosParamCreator = function (configuration) {
8575
8816
  };
8576
8817
  };
8577
8818
  /**
8578
- * EcommercePaymentsApi - functional programming interface
8819
+ * EcommerceMiscellaneousApi - functional programming interface
8579
8820
  * @export
8580
8821
  */
8581
- export const EcommercePaymentsApiFp = function (configuration) {
8582
- const localVarAxiosParamCreator = EcommercePaymentsApiAxiosParamCreator(configuration);
8822
+ export const EcommerceMiscellaneousApiFp = function (configuration) {
8823
+ const localVarAxiosParamCreator = EcommerceMiscellaneousApiAxiosParamCreator(configuration);
8583
8824
  return {
8584
8825
  /**
8585
- * Enable a manual payment method so the store can accept orders without an online payment provider.
8586
- * @summary Enable manual payment method
8587
- * @param {string} storeId The ID of the store to enable manual payment for.
8588
- * @param {EcommerceV1PaymentEnableManualPaymentRequest} ecommerceV1PaymentEnableManualPaymentRequest
8826
+ * Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
8827
+ * @summary Get custom storefront setup instructions
8589
8828
  * @param {*} [options] Override http request option.
8590
8829
  * @throws {RequiredError}
8591
8830
  */
8592
- enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options) {
8831
+ getCustomStorefrontSetupInstructionsV1(options) {
8593
8832
  return __awaiter(this, void 0, void 0, function* () {
8594
8833
  var _a, _b;
8595
- const localVarAxiosArgs = yield localVarAxiosParamCreator.enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options);
8596
- const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommercePaymentsApi.enableManualPaymentMethodV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
8834
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCustomStorefrontSetupInstructionsV1(options);
8835
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceMiscellaneousApi.getCustomStorefrontSetupInstructionsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
8597
8836
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8598
8837
  });
8599
8838
  },
8600
8839
  };
8601
8840
  };
8602
8841
  /**
8603
- * EcommercePaymentsApi - factory interface
8842
+ * EcommerceMiscellaneousApi - factory interface
8604
8843
  * @export
8605
8844
  */
8606
- export const EcommercePaymentsApiFactory = function (configuration, basePath, axios) {
8607
- const localVarFp = EcommercePaymentsApiFp(configuration);
8845
+ export const EcommerceMiscellaneousApiFactory = function (configuration, basePath, axios) {
8846
+ const localVarFp = EcommerceMiscellaneousApiFp(configuration);
8608
8847
  return {
8609
8848
  /**
8610
- * Enable a manual payment method so the store can accept orders without an online payment provider.
8611
- * @summary Enable manual payment method
8612
- * @param {string} storeId The ID of the store to enable manual payment for.
8613
- * @param {EcommerceV1PaymentEnableManualPaymentRequest} ecommerceV1PaymentEnableManualPaymentRequest
8849
+ * Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
8850
+ * @summary Get custom storefront setup instructions
8614
8851
  * @param {*} [options] Override http request option.
8615
8852
  * @throws {RequiredError}
8616
8853
  */
8617
- enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options) {
8618
- return localVarFp.enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options).then((request) => request(axios, basePath));
8854
+ getCustomStorefrontSetupInstructionsV1(options) {
8855
+ return localVarFp.getCustomStorefrontSetupInstructionsV1(options).then((request) => request(axios, basePath));
8619
8856
  },
8620
8857
  };
8621
8858
  };
8622
8859
  /**
8623
- * EcommercePaymentsApi - object-oriented interface
8860
+ * EcommerceMiscellaneousApi - object-oriented interface
8624
8861
  * @export
8625
- * @class EcommercePaymentsApi
8862
+ * @class EcommerceMiscellaneousApi
8626
8863
  * @extends {BaseAPI}
8627
8864
  */
8628
- export class EcommercePaymentsApi extends BaseAPI {
8865
+ export class EcommerceMiscellaneousApi extends BaseAPI {
8629
8866
  /**
8630
- * Enable a manual payment method so the store can accept orders without an online payment provider.
8631
- * @summary Enable manual payment method
8632
- * @param {string} storeId The ID of the store to enable manual payment for.
8633
- * @param {EcommerceV1PaymentEnableManualPaymentRequest} ecommerceV1PaymentEnableManualPaymentRequest
8867
+ * Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.
8868
+ * @summary Get custom storefront setup instructions
8634
8869
  * @param {*} [options] Override http request option.
8635
8870
  * @throws {RequiredError}
8636
- * @memberof EcommercePaymentsApi
8871
+ * @memberof EcommerceMiscellaneousApi
8637
8872
  */
8638
- enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options) {
8639
- return EcommercePaymentsApiFp(this.configuration).enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options).then((request) => request(this.axios, this.basePath));
8873
+ getCustomStorefrontSetupInstructionsV1(options) {
8874
+ return EcommerceMiscellaneousApiFp(this.configuration).getCustomStorefrontSetupInstructionsV1(options).then((request) => request(this.axios, this.basePath));
8640
8875
  }
8641
8876
  }
8642
8877
  /**
8643
- * EcommerceProductsApi - axios parameter creator
8878
+ * EcommerceOrdersApi - axios parameter creator
8644
8879
  * @export
8645
8880
  */
8646
- export const EcommerceProductsApiAxiosParamCreator = function (configuration) {
8881
+ export const EcommerceOrdersApiAxiosParamCreator = function (configuration) {
8647
8882
  return {
8648
8883
  /**
8649
- * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
8650
- * @summary Create a product image upload URL
8651
- * @param {string} storeId The ID of the store the product belongs to.
8884
+ * Cancel the order and optionally email the customer. Returns the updated order summary.
8885
+ * @summary Cancel an order
8886
+ * @param {string} storeId The ID of the store that owns the order.
8887
+ * @param {string} orderId The ID of the order to cancel.
8888
+ * @param {EcommerceV1OrderCancelRequest} ecommerceV1OrderCancelRequest
8889
+ * @param {*} [options] Override http request option.
8890
+ * @throws {RequiredError}
8891
+ */
8892
+ cancelAnOrderV1: (storeId_1, orderId_1, ecommerceV1OrderCancelRequest_1, ...args_1) => __awaiter(this, [storeId_1, orderId_1, ecommerceV1OrderCancelRequest_1, ...args_1], void 0, function* (storeId, orderId, ecommerceV1OrderCancelRequest, options = {}) {
8893
+ // verify required parameter 'storeId' is not null or undefined
8894
+ assertParamExists('cancelAnOrderV1', 'storeId', storeId);
8895
+ // verify required parameter 'orderId' is not null or undefined
8896
+ assertParamExists('cancelAnOrderV1', 'orderId', orderId);
8897
+ // verify required parameter 'ecommerceV1OrderCancelRequest' is not null or undefined
8898
+ assertParamExists('cancelAnOrderV1', 'ecommerceV1OrderCancelRequest', ecommerceV1OrderCancelRequest);
8899
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/orders/{order_id}/cancel`
8900
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
8901
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
8902
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8903
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8904
+ let baseOptions;
8905
+ if (configuration) {
8906
+ baseOptions = configuration.baseOptions;
8907
+ }
8908
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
8909
+ const localVarHeaderParameter = {};
8910
+ const localVarQueryParameter = {};
8911
+ // authentication apiToken required
8912
+ // http bearer authentication required
8913
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
8914
+ localVarHeaderParameter['Content-Type'] = 'application/json';
8915
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
8916
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8917
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
8918
+ localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1OrderCancelRequest, localVarRequestOptions, configuration);
8919
+ return {
8920
+ url: toPathString(localVarUrlObj),
8921
+ options: localVarRequestOptions,
8922
+ };
8923
+ }),
8924
+ /**
8925
+ * Create a fulfilment for the order and attach tracking in one call. Omit items to fulfil every remaining unfulfilled item. Returns the updated order summary.
8926
+ * @summary Fulfil an order
8927
+ * @param {string} storeId The ID of the store that owns the order.
8928
+ * @param {string} orderId The ID of the order to fulfil.
8929
+ * @param {EcommerceV1OrderFulfillRequest} ecommerceV1OrderFulfillRequest
8930
+ * @param {*} [options] Override http request option.
8931
+ * @throws {RequiredError}
8932
+ */
8933
+ fulfilAnOrderV1: (storeId_1, orderId_1, ecommerceV1OrderFulfillRequest_1, ...args_1) => __awaiter(this, [storeId_1, orderId_1, ecommerceV1OrderFulfillRequest_1, ...args_1], void 0, function* (storeId, orderId, ecommerceV1OrderFulfillRequest, options = {}) {
8934
+ // verify required parameter 'storeId' is not null or undefined
8935
+ assertParamExists('fulfilAnOrderV1', 'storeId', storeId);
8936
+ // verify required parameter 'orderId' is not null or undefined
8937
+ assertParamExists('fulfilAnOrderV1', 'orderId', orderId);
8938
+ // verify required parameter 'ecommerceV1OrderFulfillRequest' is not null or undefined
8939
+ assertParamExists('fulfilAnOrderV1', 'ecommerceV1OrderFulfillRequest', ecommerceV1OrderFulfillRequest);
8940
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/orders/{order_id}/fulfill`
8941
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
8942
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
8943
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8944
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8945
+ let baseOptions;
8946
+ if (configuration) {
8947
+ baseOptions = configuration.baseOptions;
8948
+ }
8949
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
8950
+ const localVarHeaderParameter = {};
8951
+ const localVarQueryParameter = {};
8952
+ // authentication apiToken required
8953
+ // http bearer authentication required
8954
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
8955
+ localVarHeaderParameter['Content-Type'] = 'application/json';
8956
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
8957
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8958
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
8959
+ localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1OrderFulfillRequest, localVarRequestOptions, configuration);
8960
+ return {
8961
+ url: toPathString(localVarUrlObj),
8962
+ options: localVarRequestOptions,
8963
+ };
8964
+ }),
8965
+ /**
8966
+ * List a store\'s orders newest first as summaries. Filter by status, payment or fulfilment status, customer email, order number or a free-text query. Amounts are in the smallest currency unit. Retrieve a single order for its line items, addresses and fulfilments.
8967
+ * @summary List store orders
8968
+ * @param {string} storeId The ID of the store to list orders for.
8969
+ * @param {Array<ListStoreOrdersV1StatusEnum>} [status] Order statuses to include.
8970
+ * @param {Array<ListStoreOrdersV1PaymentStatusEnum>} [paymentStatus] Payment statuses to include. A paid order is \&quot;captured\&quot;.
8971
+ * @param {Array<ListStoreOrdersV1FulfillmentStatusEnum>} [fulfillmentStatus] Fulfilment statuses to include.
8972
+ * @param {string} [email] Customer email, matched exactly.
8973
+ * @param {string} [displayId] The order number the merchant and customer see.
8974
+ * @param {string} [q] Free-text search over customer name, email, order number and line items.
8975
+ * @param {string} [createdAtFrom] Earliest creation time to include, inclusive. Accepts a date or ISO date-time (UTC).
8976
+ * @param {string} [createdAtTo] Latest creation time to include, inclusive. A bare date covers that whole day.
8977
+ * @param {number} [page] Page number
8978
+ * @param {*} [options] Override http request option.
8979
+ * @throws {RequiredError}
8980
+ */
8981
+ listStoreOrdersV1: (storeId_1, status_1, paymentStatus_1, fulfillmentStatus_1, email_1, displayId_1, q_1, createdAtFrom_1, createdAtTo_1, page_1, ...args_1) => __awaiter(this, [storeId_1, status_1, paymentStatus_1, fulfillmentStatus_1, email_1, displayId_1, q_1, createdAtFrom_1, createdAtTo_1, page_1, ...args_1], void 0, function* (storeId, status, paymentStatus, fulfillmentStatus, email, displayId, q, createdAtFrom, createdAtTo, page, options = {}) {
8982
+ // verify required parameter 'storeId' is not null or undefined
8983
+ assertParamExists('listStoreOrdersV1', 'storeId', storeId);
8984
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/orders`
8985
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
8986
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8987
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8988
+ let baseOptions;
8989
+ if (configuration) {
8990
+ baseOptions = configuration.baseOptions;
8991
+ }
8992
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
8993
+ const localVarHeaderParameter = {};
8994
+ const localVarQueryParameter = {};
8995
+ // authentication apiToken required
8996
+ // http bearer authentication required
8997
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
8998
+ if (status) {
8999
+ localVarQueryParameter['status'] = status;
9000
+ }
9001
+ if (paymentStatus) {
9002
+ localVarQueryParameter['payment_status'] = paymentStatus;
9003
+ }
9004
+ if (fulfillmentStatus) {
9005
+ localVarQueryParameter['fulfillment_status'] = fulfillmentStatus;
9006
+ }
9007
+ if (email !== undefined) {
9008
+ localVarQueryParameter['email'] = email;
9009
+ }
9010
+ if (displayId !== undefined) {
9011
+ localVarQueryParameter['display_id'] = displayId;
9012
+ }
9013
+ if (q !== undefined) {
9014
+ localVarQueryParameter['q'] = q;
9015
+ }
9016
+ if (createdAtFrom !== undefined) {
9017
+ localVarQueryParameter['created_at_from'] = createdAtFrom;
9018
+ }
9019
+ if (createdAtTo !== undefined) {
9020
+ localVarQueryParameter['created_at_to'] = createdAtTo;
9021
+ }
9022
+ if (page !== undefined) {
9023
+ localVarQueryParameter['page'] = page;
9024
+ }
9025
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9026
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9027
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
9028
+ return {
9029
+ url: toPathString(localVarUrlObj),
9030
+ options: localVarRequestOptions,
9031
+ };
9032
+ }),
9033
+ /**
9034
+ * Retrieve one order in full: line items (each with the id the fulfil endpoint needs), addresses, the totals breakdown and fulfilments with tracking. Amounts are in the smallest currency unit.
9035
+ * @summary Retrieve an order
9036
+ * @param {string} storeId The ID of the store that owns the order.
9037
+ * @param {string} orderId The ID of the order to retrieve.
9038
+ * @param {*} [options] Override http request option.
9039
+ * @throws {RequiredError}
9040
+ */
9041
+ retrieveAnOrderV1: (storeId_1, orderId_1, ...args_1) => __awaiter(this, [storeId_1, orderId_1, ...args_1], void 0, function* (storeId, orderId, options = {}) {
9042
+ // verify required parameter 'storeId' is not null or undefined
9043
+ assertParamExists('retrieveAnOrderV1', 'storeId', storeId);
9044
+ // verify required parameter 'orderId' is not null or undefined
9045
+ assertParamExists('retrieveAnOrderV1', 'orderId', orderId);
9046
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/orders/{order_id}`
9047
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
9048
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
9049
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
9050
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
9051
+ let baseOptions;
9052
+ if (configuration) {
9053
+ baseOptions = configuration.baseOptions;
9054
+ }
9055
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
9056
+ const localVarHeaderParameter = {};
9057
+ const localVarQueryParameter = {};
9058
+ // authentication apiToken required
9059
+ // http bearer authentication required
9060
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
9061
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9062
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9063
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
9064
+ return {
9065
+ url: toPathString(localVarUrlObj),
9066
+ options: localVarRequestOptions,
9067
+ };
9068
+ }),
9069
+ };
9070
+ };
9071
+ /**
9072
+ * EcommerceOrdersApi - functional programming interface
9073
+ * @export
9074
+ */
9075
+ export const EcommerceOrdersApiFp = function (configuration) {
9076
+ const localVarAxiosParamCreator = EcommerceOrdersApiAxiosParamCreator(configuration);
9077
+ return {
9078
+ /**
9079
+ * Cancel the order and optionally email the customer. Returns the updated order summary.
9080
+ * @summary Cancel an order
9081
+ * @param {string} storeId The ID of the store that owns the order.
9082
+ * @param {string} orderId The ID of the order to cancel.
9083
+ * @param {EcommerceV1OrderCancelRequest} ecommerceV1OrderCancelRequest
9084
+ * @param {*} [options] Override http request option.
9085
+ * @throws {RequiredError}
9086
+ */
9087
+ cancelAnOrderV1(storeId, orderId, ecommerceV1OrderCancelRequest, options) {
9088
+ return __awaiter(this, void 0, void 0, function* () {
9089
+ var _a, _b;
9090
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelAnOrderV1(storeId, orderId, ecommerceV1OrderCancelRequest, options);
9091
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceOrdersApi.cancelAnOrderV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9092
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9093
+ });
9094
+ },
9095
+ /**
9096
+ * Create a fulfilment for the order and attach tracking in one call. Omit items to fulfil every remaining unfulfilled item. Returns the updated order summary.
9097
+ * @summary Fulfil an order
9098
+ * @param {string} storeId The ID of the store that owns the order.
9099
+ * @param {string} orderId The ID of the order to fulfil.
9100
+ * @param {EcommerceV1OrderFulfillRequest} ecommerceV1OrderFulfillRequest
9101
+ * @param {*} [options] Override http request option.
9102
+ * @throws {RequiredError}
9103
+ */
9104
+ fulfilAnOrderV1(storeId, orderId, ecommerceV1OrderFulfillRequest, options) {
9105
+ return __awaiter(this, void 0, void 0, function* () {
9106
+ var _a, _b;
9107
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.fulfilAnOrderV1(storeId, orderId, ecommerceV1OrderFulfillRequest, options);
9108
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceOrdersApi.fulfilAnOrderV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9109
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9110
+ });
9111
+ },
9112
+ /**
9113
+ * List a store\'s orders newest first as summaries. Filter by status, payment or fulfilment status, customer email, order number or a free-text query. Amounts are in the smallest currency unit. Retrieve a single order for its line items, addresses and fulfilments.
9114
+ * @summary List store orders
9115
+ * @param {string} storeId The ID of the store to list orders for.
9116
+ * @param {Array<ListStoreOrdersV1StatusEnum>} [status] Order statuses to include.
9117
+ * @param {Array<ListStoreOrdersV1PaymentStatusEnum>} [paymentStatus] Payment statuses to include. A paid order is \&quot;captured\&quot;.
9118
+ * @param {Array<ListStoreOrdersV1FulfillmentStatusEnum>} [fulfillmentStatus] Fulfilment statuses to include.
9119
+ * @param {string} [email] Customer email, matched exactly.
9120
+ * @param {string} [displayId] The order number the merchant and customer see.
9121
+ * @param {string} [q] Free-text search over customer name, email, order number and line items.
9122
+ * @param {string} [createdAtFrom] Earliest creation time to include, inclusive. Accepts a date or ISO date-time (UTC).
9123
+ * @param {string} [createdAtTo] Latest creation time to include, inclusive. A bare date covers that whole day.
9124
+ * @param {number} [page] Page number
9125
+ * @param {*} [options] Override http request option.
9126
+ * @throws {RequiredError}
9127
+ */
9128
+ listStoreOrdersV1(storeId, status, paymentStatus, fulfillmentStatus, email, displayId, q, createdAtFrom, createdAtTo, page, options) {
9129
+ return __awaiter(this, void 0, void 0, function* () {
9130
+ var _a, _b;
9131
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listStoreOrdersV1(storeId, status, paymentStatus, fulfillmentStatus, email, displayId, q, createdAtFrom, createdAtTo, page, options);
9132
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceOrdersApi.listStoreOrdersV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9133
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9134
+ });
9135
+ },
9136
+ /**
9137
+ * Retrieve one order in full: line items (each with the id the fulfil endpoint needs), addresses, the totals breakdown and fulfilments with tracking. Amounts are in the smallest currency unit.
9138
+ * @summary Retrieve an order
9139
+ * @param {string} storeId The ID of the store that owns the order.
9140
+ * @param {string} orderId The ID of the order to retrieve.
9141
+ * @param {*} [options] Override http request option.
9142
+ * @throws {RequiredError}
9143
+ */
9144
+ retrieveAnOrderV1(storeId, orderId, options) {
9145
+ return __awaiter(this, void 0, void 0, function* () {
9146
+ var _a, _b;
9147
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.retrieveAnOrderV1(storeId, orderId, options);
9148
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceOrdersApi.retrieveAnOrderV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9149
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9150
+ });
9151
+ },
9152
+ };
9153
+ };
9154
+ /**
9155
+ * EcommerceOrdersApi - factory interface
9156
+ * @export
9157
+ */
9158
+ export const EcommerceOrdersApiFactory = function (configuration, basePath, axios) {
9159
+ const localVarFp = EcommerceOrdersApiFp(configuration);
9160
+ return {
9161
+ /**
9162
+ * Cancel the order and optionally email the customer. Returns the updated order summary.
9163
+ * @summary Cancel an order
9164
+ * @param {string} storeId The ID of the store that owns the order.
9165
+ * @param {string} orderId The ID of the order to cancel.
9166
+ * @param {EcommerceV1OrderCancelRequest} ecommerceV1OrderCancelRequest
9167
+ * @param {*} [options] Override http request option.
9168
+ * @throws {RequiredError}
9169
+ */
9170
+ cancelAnOrderV1(storeId, orderId, ecommerceV1OrderCancelRequest, options) {
9171
+ return localVarFp.cancelAnOrderV1(storeId, orderId, ecommerceV1OrderCancelRequest, options).then((request) => request(axios, basePath));
9172
+ },
9173
+ /**
9174
+ * Create a fulfilment for the order and attach tracking in one call. Omit items to fulfil every remaining unfulfilled item. Returns the updated order summary.
9175
+ * @summary Fulfil an order
9176
+ * @param {string} storeId The ID of the store that owns the order.
9177
+ * @param {string} orderId The ID of the order to fulfil.
9178
+ * @param {EcommerceV1OrderFulfillRequest} ecommerceV1OrderFulfillRequest
9179
+ * @param {*} [options] Override http request option.
9180
+ * @throws {RequiredError}
9181
+ */
9182
+ fulfilAnOrderV1(storeId, orderId, ecommerceV1OrderFulfillRequest, options) {
9183
+ return localVarFp.fulfilAnOrderV1(storeId, orderId, ecommerceV1OrderFulfillRequest, options).then((request) => request(axios, basePath));
9184
+ },
9185
+ /**
9186
+ * List a store\'s orders newest first as summaries. Filter by status, payment or fulfilment status, customer email, order number or a free-text query. Amounts are in the smallest currency unit. Retrieve a single order for its line items, addresses and fulfilments.
9187
+ * @summary List store orders
9188
+ * @param {string} storeId The ID of the store to list orders for.
9189
+ * @param {Array<ListStoreOrdersV1StatusEnum>} [status] Order statuses to include.
9190
+ * @param {Array<ListStoreOrdersV1PaymentStatusEnum>} [paymentStatus] Payment statuses to include. A paid order is \&quot;captured\&quot;.
9191
+ * @param {Array<ListStoreOrdersV1FulfillmentStatusEnum>} [fulfillmentStatus] Fulfilment statuses to include.
9192
+ * @param {string} [email] Customer email, matched exactly.
9193
+ * @param {string} [displayId] The order number the merchant and customer see.
9194
+ * @param {string} [q] Free-text search over customer name, email, order number and line items.
9195
+ * @param {string} [createdAtFrom] Earliest creation time to include, inclusive. Accepts a date or ISO date-time (UTC).
9196
+ * @param {string} [createdAtTo] Latest creation time to include, inclusive. A bare date covers that whole day.
9197
+ * @param {number} [page] Page number
9198
+ * @param {*} [options] Override http request option.
9199
+ * @throws {RequiredError}
9200
+ */
9201
+ listStoreOrdersV1(storeId, status, paymentStatus, fulfillmentStatus, email, displayId, q, createdAtFrom, createdAtTo, page, options) {
9202
+ return localVarFp.listStoreOrdersV1(storeId, status, paymentStatus, fulfillmentStatus, email, displayId, q, createdAtFrom, createdAtTo, page, options).then((request) => request(axios, basePath));
9203
+ },
9204
+ /**
9205
+ * Retrieve one order in full: line items (each with the id the fulfil endpoint needs), addresses, the totals breakdown and fulfilments with tracking. Amounts are in the smallest currency unit.
9206
+ * @summary Retrieve an order
9207
+ * @param {string} storeId The ID of the store that owns the order.
9208
+ * @param {string} orderId The ID of the order to retrieve.
9209
+ * @param {*} [options] Override http request option.
9210
+ * @throws {RequiredError}
9211
+ */
9212
+ retrieveAnOrderV1(storeId, orderId, options) {
9213
+ return localVarFp.retrieveAnOrderV1(storeId, orderId, options).then((request) => request(axios, basePath));
9214
+ },
9215
+ };
9216
+ };
9217
+ /**
9218
+ * EcommerceOrdersApi - object-oriented interface
9219
+ * @export
9220
+ * @class EcommerceOrdersApi
9221
+ * @extends {BaseAPI}
9222
+ */
9223
+ export class EcommerceOrdersApi extends BaseAPI {
9224
+ /**
9225
+ * Cancel the order and optionally email the customer. Returns the updated order summary.
9226
+ * @summary Cancel an order
9227
+ * @param {string} storeId The ID of the store that owns the order.
9228
+ * @param {string} orderId The ID of the order to cancel.
9229
+ * @param {EcommerceV1OrderCancelRequest} ecommerceV1OrderCancelRequest
9230
+ * @param {*} [options] Override http request option.
9231
+ * @throws {RequiredError}
9232
+ * @memberof EcommerceOrdersApi
9233
+ */
9234
+ cancelAnOrderV1(storeId, orderId, ecommerceV1OrderCancelRequest, options) {
9235
+ return EcommerceOrdersApiFp(this.configuration).cancelAnOrderV1(storeId, orderId, ecommerceV1OrderCancelRequest, options).then((request) => request(this.axios, this.basePath));
9236
+ }
9237
+ /**
9238
+ * Create a fulfilment for the order and attach tracking in one call. Omit items to fulfil every remaining unfulfilled item. Returns the updated order summary.
9239
+ * @summary Fulfil an order
9240
+ * @param {string} storeId The ID of the store that owns the order.
9241
+ * @param {string} orderId The ID of the order to fulfil.
9242
+ * @param {EcommerceV1OrderFulfillRequest} ecommerceV1OrderFulfillRequest
9243
+ * @param {*} [options] Override http request option.
9244
+ * @throws {RequiredError}
9245
+ * @memberof EcommerceOrdersApi
9246
+ */
9247
+ fulfilAnOrderV1(storeId, orderId, ecommerceV1OrderFulfillRequest, options) {
9248
+ return EcommerceOrdersApiFp(this.configuration).fulfilAnOrderV1(storeId, orderId, ecommerceV1OrderFulfillRequest, options).then((request) => request(this.axios, this.basePath));
9249
+ }
9250
+ /**
9251
+ * List a store\'s orders newest first as summaries. Filter by status, payment or fulfilment status, customer email, order number or a free-text query. Amounts are in the smallest currency unit. Retrieve a single order for its line items, addresses and fulfilments.
9252
+ * @summary List store orders
9253
+ * @param {string} storeId The ID of the store to list orders for.
9254
+ * @param {Array<ListStoreOrdersV1StatusEnum>} [status] Order statuses to include.
9255
+ * @param {Array<ListStoreOrdersV1PaymentStatusEnum>} [paymentStatus] Payment statuses to include. A paid order is \&quot;captured\&quot;.
9256
+ * @param {Array<ListStoreOrdersV1FulfillmentStatusEnum>} [fulfillmentStatus] Fulfilment statuses to include.
9257
+ * @param {string} [email] Customer email, matched exactly.
9258
+ * @param {string} [displayId] The order number the merchant and customer see.
9259
+ * @param {string} [q] Free-text search over customer name, email, order number and line items.
9260
+ * @param {string} [createdAtFrom] Earliest creation time to include, inclusive. Accepts a date or ISO date-time (UTC).
9261
+ * @param {string} [createdAtTo] Latest creation time to include, inclusive. A bare date covers that whole day.
9262
+ * @param {number} [page] Page number
9263
+ * @param {*} [options] Override http request option.
9264
+ * @throws {RequiredError}
9265
+ * @memberof EcommerceOrdersApi
9266
+ */
9267
+ listStoreOrdersV1(storeId, status, paymentStatus, fulfillmentStatus, email, displayId, q, createdAtFrom, createdAtTo, page, options) {
9268
+ return EcommerceOrdersApiFp(this.configuration).listStoreOrdersV1(storeId, status, paymentStatus, fulfillmentStatus, email, displayId, q, createdAtFrom, createdAtTo, page, options).then((request) => request(this.axios, this.basePath));
9269
+ }
9270
+ /**
9271
+ * Retrieve one order in full: line items (each with the id the fulfil endpoint needs), addresses, the totals breakdown and fulfilments with tracking. Amounts are in the smallest currency unit.
9272
+ * @summary Retrieve an order
9273
+ * @param {string} storeId The ID of the store that owns the order.
9274
+ * @param {string} orderId The ID of the order to retrieve.
9275
+ * @param {*} [options] Override http request option.
9276
+ * @throws {RequiredError}
9277
+ * @memberof EcommerceOrdersApi
9278
+ */
9279
+ retrieveAnOrderV1(storeId, orderId, options) {
9280
+ return EcommerceOrdersApiFp(this.configuration).retrieveAnOrderV1(storeId, orderId, options).then((request) => request(this.axios, this.basePath));
9281
+ }
9282
+ }
9283
+ /**
9284
+ * @export
9285
+ */
9286
+ export const ListStoreOrdersV1StatusEnum = {
9287
+ Pending: 'pending',
9288
+ Completed: 'completed',
9289
+ Archived: 'archived',
9290
+ Canceled: 'canceled',
9291
+ RequiresAction: 'requires_action'
9292
+ };
9293
+ /**
9294
+ * @export
9295
+ */
9296
+ export const ListStoreOrdersV1PaymentStatusEnum = {
9297
+ NotPaid: 'not_paid',
9298
+ Awaiting: 'awaiting',
9299
+ Captured: 'captured',
9300
+ PartiallyRefunded: 'partially_refunded',
9301
+ Refunded: 'refunded',
9302
+ Canceled: 'canceled',
9303
+ RequiresAction: 'requires_action',
9304
+ NotRequired: 'not_required'
9305
+ };
9306
+ /**
9307
+ * @export
9308
+ */
9309
+ export const ListStoreOrdersV1FulfillmentStatusEnum = {
9310
+ NotFulfilled: 'not_fulfilled',
9311
+ PartiallyFulfilled: 'partially_fulfilled',
9312
+ Fulfilled: 'fulfilled',
9313
+ PartiallyShipped: 'partially_shipped',
9314
+ Shipped: 'shipped',
9315
+ PartiallyReturned: 'partially_returned',
9316
+ Returned: 'returned',
9317
+ Canceled: 'canceled',
9318
+ RequiresAction: 'requires_action'
9319
+ };
9320
+ /**
9321
+ * EcommercePaymentsApi - axios parameter creator
9322
+ * @export
9323
+ */
9324
+ export const EcommercePaymentsApiAxiosParamCreator = function (configuration) {
9325
+ return {
9326
+ /**
9327
+ * Create an onboarding link for connecting a payment gateway to the store. Returns the gateway onboarding URL for the merchant to open and a deep-link into the store admin.
9328
+ * @summary Create a payment provider connect link
9329
+ * @param {string} storeId The ID of the store to connect the payment provider to.
9330
+ * @param {string} providerId The ID of the payment gateway to connect, e.g. stripe.
9331
+ * @param {*} [options] Override http request option.
9332
+ * @throws {RequiredError}
9333
+ */
9334
+ createAPaymentProviderConnectLinkV1: (storeId_1, providerId_1, ...args_1) => __awaiter(this, [storeId_1, providerId_1, ...args_1], void 0, function* (storeId, providerId, options = {}) {
9335
+ // verify required parameter 'storeId' is not null or undefined
9336
+ assertParamExists('createAPaymentProviderConnectLinkV1', 'storeId', storeId);
9337
+ // verify required parameter 'providerId' is not null or undefined
9338
+ assertParamExists('createAPaymentProviderConnectLinkV1', 'providerId', providerId);
9339
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/payment-providers/{provider_id}/connect-link`
9340
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
9341
+ .replace(`{${"provider_id"}}`, encodeURIComponent(String(providerId)));
9342
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
9343
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
9344
+ let baseOptions;
9345
+ if (configuration) {
9346
+ baseOptions = configuration.baseOptions;
9347
+ }
9348
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
9349
+ const localVarHeaderParameter = {};
9350
+ const localVarQueryParameter = {};
9351
+ // authentication apiToken required
9352
+ // http bearer authentication required
9353
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
9354
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9355
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9356
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
9357
+ return {
9358
+ url: toPathString(localVarUrlObj),
9359
+ options: localVarRequestOptions,
9360
+ };
9361
+ }),
9362
+ /**
9363
+ * Enable a manual payment method so the store can accept orders without an online payment provider.
9364
+ * @summary Enable manual payment method
9365
+ * @param {string} storeId The ID of the store to enable manual payment for.
9366
+ * @param {EcommerceV1PaymentEnableManualPaymentRequest} ecommerceV1PaymentEnableManualPaymentRequest
9367
+ * @param {*} [options] Override http request option.
9368
+ * @throws {RequiredError}
9369
+ */
9370
+ enableManualPaymentMethodV1: (storeId_1, ecommerceV1PaymentEnableManualPaymentRequest_1, ...args_1) => __awaiter(this, [storeId_1, ecommerceV1PaymentEnableManualPaymentRequest_1, ...args_1], void 0, function* (storeId, ecommerceV1PaymentEnableManualPaymentRequest, options = {}) {
9371
+ // verify required parameter 'storeId' is not null or undefined
9372
+ assertParamExists('enableManualPaymentMethodV1', 'storeId', storeId);
9373
+ // verify required parameter 'ecommerceV1PaymentEnableManualPaymentRequest' is not null or undefined
9374
+ assertParamExists('enableManualPaymentMethodV1', 'ecommerceV1PaymentEnableManualPaymentRequest', ecommerceV1PaymentEnableManualPaymentRequest);
9375
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/payment-methods/manual`
9376
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
9377
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
9378
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
9379
+ let baseOptions;
9380
+ if (configuration) {
9381
+ baseOptions = configuration.baseOptions;
9382
+ }
9383
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
9384
+ const localVarHeaderParameter = {};
9385
+ const localVarQueryParameter = {};
9386
+ // authentication apiToken required
9387
+ // http bearer authentication required
9388
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
9389
+ localVarHeaderParameter['Content-Type'] = 'application/json';
9390
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9391
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9392
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
9393
+ localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1PaymentEnableManualPaymentRequest, localVarRequestOptions, configuration);
9394
+ return {
9395
+ url: toPathString(localVarUrlObj),
9396
+ options: localVarRequestOptions,
9397
+ };
9398
+ }),
9399
+ /**
9400
+ * List a store\'s payment providers, split into providers already connected to the store and gateways available to install. Never exposes gateway credentials, secrets, or configuration.
9401
+ * @summary List store payment providers
9402
+ * @param {string} storeId The ID of the store to list payment providers for.
9403
+ * @param {boolean} [includeCurrencyUnsupported] Include gateways that do not support the store currency in the available list.
9404
+ * @param {*} [options] Override http request option.
9405
+ * @throws {RequiredError}
9406
+ */
9407
+ listStorePaymentProvidersV1: (storeId_1, includeCurrencyUnsupported_1, ...args_1) => __awaiter(this, [storeId_1, includeCurrencyUnsupported_1, ...args_1], void 0, function* (storeId, includeCurrencyUnsupported, options = {}) {
9408
+ // verify required parameter 'storeId' is not null or undefined
9409
+ assertParamExists('listStorePaymentProvidersV1', 'storeId', storeId);
9410
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/payment-providers`
9411
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
9412
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
9413
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
9414
+ let baseOptions;
9415
+ if (configuration) {
9416
+ baseOptions = configuration.baseOptions;
9417
+ }
9418
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
9419
+ const localVarHeaderParameter = {};
9420
+ const localVarQueryParameter = {};
9421
+ // authentication apiToken required
9422
+ // http bearer authentication required
9423
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
9424
+ if (includeCurrencyUnsupported !== undefined) {
9425
+ localVarQueryParameter['include_currency_unsupported'] = includeCurrencyUnsupported;
9426
+ }
9427
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9428
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9429
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
9430
+ return {
9431
+ url: toPathString(localVarUrlObj),
9432
+ options: localVarRequestOptions,
9433
+ };
9434
+ }),
9435
+ };
9436
+ };
9437
+ /**
9438
+ * EcommercePaymentsApi - functional programming interface
9439
+ * @export
9440
+ */
9441
+ export const EcommercePaymentsApiFp = function (configuration) {
9442
+ const localVarAxiosParamCreator = EcommercePaymentsApiAxiosParamCreator(configuration);
9443
+ return {
9444
+ /**
9445
+ * Create an onboarding link for connecting a payment gateway to the store. Returns the gateway onboarding URL for the merchant to open and a deep-link into the store admin.
9446
+ * @summary Create a payment provider connect link
9447
+ * @param {string} storeId The ID of the store to connect the payment provider to.
9448
+ * @param {string} providerId The ID of the payment gateway to connect, e.g. stripe.
9449
+ * @param {*} [options] Override http request option.
9450
+ * @throws {RequiredError}
9451
+ */
9452
+ createAPaymentProviderConnectLinkV1(storeId, providerId, options) {
9453
+ return __awaiter(this, void 0, void 0, function* () {
9454
+ var _a, _b;
9455
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createAPaymentProviderConnectLinkV1(storeId, providerId, options);
9456
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommercePaymentsApi.createAPaymentProviderConnectLinkV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9457
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9458
+ });
9459
+ },
9460
+ /**
9461
+ * Enable a manual payment method so the store can accept orders without an online payment provider.
9462
+ * @summary Enable manual payment method
9463
+ * @param {string} storeId The ID of the store to enable manual payment for.
9464
+ * @param {EcommerceV1PaymentEnableManualPaymentRequest} ecommerceV1PaymentEnableManualPaymentRequest
9465
+ * @param {*} [options] Override http request option.
9466
+ * @throws {RequiredError}
9467
+ */
9468
+ enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options) {
9469
+ return __awaiter(this, void 0, void 0, function* () {
9470
+ var _a, _b;
9471
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options);
9472
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommercePaymentsApi.enableManualPaymentMethodV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9473
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9474
+ });
9475
+ },
9476
+ /**
9477
+ * List a store\'s payment providers, split into providers already connected to the store and gateways available to install. Never exposes gateway credentials, secrets, or configuration.
9478
+ * @summary List store payment providers
9479
+ * @param {string} storeId The ID of the store to list payment providers for.
9480
+ * @param {boolean} [includeCurrencyUnsupported] Include gateways that do not support the store currency in the available list.
9481
+ * @param {*} [options] Override http request option.
9482
+ * @throws {RequiredError}
9483
+ */
9484
+ listStorePaymentProvidersV1(storeId, includeCurrencyUnsupported, options) {
9485
+ return __awaiter(this, void 0, void 0, function* () {
9486
+ var _a, _b;
9487
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listStorePaymentProvidersV1(storeId, includeCurrencyUnsupported, options);
9488
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommercePaymentsApi.listStorePaymentProvidersV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9489
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9490
+ });
9491
+ },
9492
+ };
9493
+ };
9494
+ /**
9495
+ * EcommercePaymentsApi - factory interface
9496
+ * @export
9497
+ */
9498
+ export const EcommercePaymentsApiFactory = function (configuration, basePath, axios) {
9499
+ const localVarFp = EcommercePaymentsApiFp(configuration);
9500
+ return {
9501
+ /**
9502
+ * Create an onboarding link for connecting a payment gateway to the store. Returns the gateway onboarding URL for the merchant to open and a deep-link into the store admin.
9503
+ * @summary Create a payment provider connect link
9504
+ * @param {string} storeId The ID of the store to connect the payment provider to.
9505
+ * @param {string} providerId The ID of the payment gateway to connect, e.g. stripe.
9506
+ * @param {*} [options] Override http request option.
9507
+ * @throws {RequiredError}
9508
+ */
9509
+ createAPaymentProviderConnectLinkV1(storeId, providerId, options) {
9510
+ return localVarFp.createAPaymentProviderConnectLinkV1(storeId, providerId, options).then((request) => request(axios, basePath));
9511
+ },
9512
+ /**
9513
+ * Enable a manual payment method so the store can accept orders without an online payment provider.
9514
+ * @summary Enable manual payment method
9515
+ * @param {string} storeId The ID of the store to enable manual payment for.
9516
+ * @param {EcommerceV1PaymentEnableManualPaymentRequest} ecommerceV1PaymentEnableManualPaymentRequest
9517
+ * @param {*} [options] Override http request option.
9518
+ * @throws {RequiredError}
9519
+ */
9520
+ enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options) {
9521
+ return localVarFp.enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options).then((request) => request(axios, basePath));
9522
+ },
9523
+ /**
9524
+ * List a store\'s payment providers, split into providers already connected to the store and gateways available to install. Never exposes gateway credentials, secrets, or configuration.
9525
+ * @summary List store payment providers
9526
+ * @param {string} storeId The ID of the store to list payment providers for.
9527
+ * @param {boolean} [includeCurrencyUnsupported] Include gateways that do not support the store currency in the available list.
9528
+ * @param {*} [options] Override http request option.
9529
+ * @throws {RequiredError}
9530
+ */
9531
+ listStorePaymentProvidersV1(storeId, includeCurrencyUnsupported, options) {
9532
+ return localVarFp.listStorePaymentProvidersV1(storeId, includeCurrencyUnsupported, options).then((request) => request(axios, basePath));
9533
+ },
9534
+ };
9535
+ };
9536
+ /**
9537
+ * EcommercePaymentsApi - object-oriented interface
9538
+ * @export
9539
+ * @class EcommercePaymentsApi
9540
+ * @extends {BaseAPI}
9541
+ */
9542
+ export class EcommercePaymentsApi extends BaseAPI {
9543
+ /**
9544
+ * Create an onboarding link for connecting a payment gateway to the store. Returns the gateway onboarding URL for the merchant to open and a deep-link into the store admin.
9545
+ * @summary Create a payment provider connect link
9546
+ * @param {string} storeId The ID of the store to connect the payment provider to.
9547
+ * @param {string} providerId The ID of the payment gateway to connect, e.g. stripe.
9548
+ * @param {*} [options] Override http request option.
9549
+ * @throws {RequiredError}
9550
+ * @memberof EcommercePaymentsApi
9551
+ */
9552
+ createAPaymentProviderConnectLinkV1(storeId, providerId, options) {
9553
+ return EcommercePaymentsApiFp(this.configuration).createAPaymentProviderConnectLinkV1(storeId, providerId, options).then((request) => request(this.axios, this.basePath));
9554
+ }
9555
+ /**
9556
+ * Enable a manual payment method so the store can accept orders without an online payment provider.
9557
+ * @summary Enable manual payment method
9558
+ * @param {string} storeId The ID of the store to enable manual payment for.
9559
+ * @param {EcommerceV1PaymentEnableManualPaymentRequest} ecommerceV1PaymentEnableManualPaymentRequest
9560
+ * @param {*} [options] Override http request option.
9561
+ * @throws {RequiredError}
9562
+ * @memberof EcommercePaymentsApi
9563
+ */
9564
+ enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options) {
9565
+ return EcommercePaymentsApiFp(this.configuration).enableManualPaymentMethodV1(storeId, ecommerceV1PaymentEnableManualPaymentRequest, options).then((request) => request(this.axios, this.basePath));
9566
+ }
9567
+ /**
9568
+ * List a store\'s payment providers, split into providers already connected to the store and gateways available to install. Never exposes gateway credentials, secrets, or configuration.
9569
+ * @summary List store payment providers
9570
+ * @param {string} storeId The ID of the store to list payment providers for.
9571
+ * @param {boolean} [includeCurrencyUnsupported] Include gateways that do not support the store currency in the available list.
9572
+ * @param {*} [options] Override http request option.
9573
+ * @throws {RequiredError}
9574
+ * @memberof EcommercePaymentsApi
9575
+ */
9576
+ listStorePaymentProvidersV1(storeId, includeCurrencyUnsupported, options) {
9577
+ return EcommercePaymentsApiFp(this.configuration).listStorePaymentProvidersV1(storeId, includeCurrencyUnsupported, options).then((request) => request(this.axios, this.basePath));
9578
+ }
9579
+ }
9580
+ /**
9581
+ * EcommerceProductVariantsApi - axios parameter creator
9582
+ * @export
9583
+ */
9584
+ export const EcommerceProductVariantsApiAxiosParamCreator = function (configuration) {
9585
+ return {
9586
+ /**
9587
+ * Add a variant to a product along one or more option dimensions (e.g. Size, Color). Options missing from the product are created automatically; provide a value for every option the product already has. Prices are integers in the smallest currency unit and default to the store currency. Returns the created variant.
9588
+ * @summary Create a product variant
9589
+ * @param {string} storeId The ID of the store that owns the product.
9590
+ * @param {string} productId The ID of the product to add the variant to.
9591
+ * @param {EcommerceV1VariantCreateVariantRequest} ecommerceV1VariantCreateVariantRequest
9592
+ * @param {*} [options] Override http request option.
9593
+ * @throws {RequiredError}
9594
+ */
9595
+ createAProductVariantV1: (storeId_1, productId_1, ecommerceV1VariantCreateVariantRequest_1, ...args_1) => __awaiter(this, [storeId_1, productId_1, ecommerceV1VariantCreateVariantRequest_1, ...args_1], void 0, function* (storeId, productId, ecommerceV1VariantCreateVariantRequest, options = {}) {
9596
+ // verify required parameter 'storeId' is not null or undefined
9597
+ assertParamExists('createAProductVariantV1', 'storeId', storeId);
9598
+ // verify required parameter 'productId' is not null or undefined
9599
+ assertParamExists('createAProductVariantV1', 'productId', productId);
9600
+ // verify required parameter 'ecommerceV1VariantCreateVariantRequest' is not null or undefined
9601
+ assertParamExists('createAProductVariantV1', 'ecommerceV1VariantCreateVariantRequest', ecommerceV1VariantCreateVariantRequest);
9602
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}/variants`
9603
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
9604
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
9605
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
9606
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
9607
+ let baseOptions;
9608
+ if (configuration) {
9609
+ baseOptions = configuration.baseOptions;
9610
+ }
9611
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
9612
+ const localVarHeaderParameter = {};
9613
+ const localVarQueryParameter = {};
9614
+ // authentication apiToken required
9615
+ // http bearer authentication required
9616
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
9617
+ localVarHeaderParameter['Content-Type'] = 'application/json';
9618
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9619
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9620
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
9621
+ localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1VariantCreateVariantRequest, localVarRequestOptions, configuration);
9622
+ return {
9623
+ url: toPathString(localVarUrlObj),
9624
+ options: localVarRequestOptions,
9625
+ };
9626
+ }),
9627
+ /**
9628
+ * Delete a single variant from the product.
9629
+ * @summary Delete a product variant
9630
+ * @param {string} storeId The ID of the store that owns the product.
9631
+ * @param {string} productId The ID of the product that owns the variant.
9632
+ * @param {string} variantId The ID of the variant to delete.
9633
+ * @param {*} [options] Override http request option.
9634
+ * @throws {RequiredError}
9635
+ */
9636
+ deleteAProductVariantV1: (storeId_1, productId_1, variantId_1, ...args_1) => __awaiter(this, [storeId_1, productId_1, variantId_1, ...args_1], void 0, function* (storeId, productId, variantId, options = {}) {
9637
+ // verify required parameter 'storeId' is not null or undefined
9638
+ assertParamExists('deleteAProductVariantV1', 'storeId', storeId);
9639
+ // verify required parameter 'productId' is not null or undefined
9640
+ assertParamExists('deleteAProductVariantV1', 'productId', productId);
9641
+ // verify required parameter 'variantId' is not null or undefined
9642
+ assertParamExists('deleteAProductVariantV1', 'variantId', variantId);
9643
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}/variants/{variant_id}`
9644
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
9645
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)))
9646
+ .replace(`{${"variant_id"}}`, encodeURIComponent(String(variantId)));
9647
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
9648
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
9649
+ let baseOptions;
9650
+ if (configuration) {
9651
+ baseOptions = configuration.baseOptions;
9652
+ }
9653
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
9654
+ const localVarHeaderParameter = {};
9655
+ const localVarQueryParameter = {};
9656
+ // authentication apiToken required
9657
+ // http bearer authentication required
9658
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
9659
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9660
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9661
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
9662
+ return {
9663
+ url: toPathString(localVarUrlObj),
9664
+ options: localVarRequestOptions,
9665
+ };
9666
+ }),
9667
+ /**
9668
+ * List a product\'s variants, ordered by rank, with their options, prices and inventory. Prices are integers in the smallest currency unit and live on variants.
9669
+ * @summary List product variants
9670
+ * @param {string} storeId The ID of the store that owns the product.
9671
+ * @param {string} productId The ID of the product to list variants for.
9672
+ * @param {number} [page] Page number
9673
+ * @param {*} [options] Override http request option.
9674
+ * @throws {RequiredError}
9675
+ */
9676
+ listProductVariantsV1: (storeId_1, productId_1, page_1, ...args_1) => __awaiter(this, [storeId_1, productId_1, page_1, ...args_1], void 0, function* (storeId, productId, page, options = {}) {
9677
+ // verify required parameter 'storeId' is not null or undefined
9678
+ assertParamExists('listProductVariantsV1', 'storeId', storeId);
9679
+ // verify required parameter 'productId' is not null or undefined
9680
+ assertParamExists('listProductVariantsV1', 'productId', productId);
9681
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}/variants`
9682
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
9683
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
9684
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
9685
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
9686
+ let baseOptions;
9687
+ if (configuration) {
9688
+ baseOptions = configuration.baseOptions;
9689
+ }
9690
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
9691
+ const localVarHeaderParameter = {};
9692
+ const localVarQueryParameter = {};
9693
+ // authentication apiToken required
9694
+ // http bearer authentication required
9695
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
9696
+ if (page !== undefined) {
9697
+ localVarQueryParameter['page'] = page;
9698
+ }
9699
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9700
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9701
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
9702
+ return {
9703
+ url: toPathString(localVarUrlObj),
9704
+ options: localVarRequestOptions,
9705
+ };
9706
+ }),
9707
+ /**
9708
+ * Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
9709
+ * @summary Update product variants in batch
9710
+ * @param {string} storeId The ID of the store that owns the product.
9711
+ * @param {string} productId The ID of the product whose variants are being updated.
9712
+ * @param {EcommerceV1VariantBatchUpdateVariantsRequest} ecommerceV1VariantBatchUpdateVariantsRequest
9713
+ * @param {*} [options] Override http request option.
9714
+ * @throws {RequiredError}
9715
+ */
9716
+ updateProductVariantsInBatchV1: (storeId_1, productId_1, ecommerceV1VariantBatchUpdateVariantsRequest_1, ...args_1) => __awaiter(this, [storeId_1, productId_1, ecommerceV1VariantBatchUpdateVariantsRequest_1, ...args_1], void 0, function* (storeId, productId, ecommerceV1VariantBatchUpdateVariantsRequest, options = {}) {
9717
+ // verify required parameter 'storeId' is not null or undefined
9718
+ assertParamExists('updateProductVariantsInBatchV1', 'storeId', storeId);
9719
+ // verify required parameter 'productId' is not null or undefined
9720
+ assertParamExists('updateProductVariantsInBatchV1', 'productId', productId);
9721
+ // verify required parameter 'ecommerceV1VariantBatchUpdateVariantsRequest' is not null or undefined
9722
+ assertParamExists('updateProductVariantsInBatchV1', 'ecommerceV1VariantBatchUpdateVariantsRequest', ecommerceV1VariantBatchUpdateVariantsRequest);
9723
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}/variants/batch`
9724
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
9725
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
9726
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
9727
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
9728
+ let baseOptions;
9729
+ if (configuration) {
9730
+ baseOptions = configuration.baseOptions;
9731
+ }
9732
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
9733
+ const localVarHeaderParameter = {};
9734
+ const localVarQueryParameter = {};
9735
+ // authentication apiToken required
9736
+ // http bearer authentication required
9737
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
9738
+ localVarHeaderParameter['Content-Type'] = 'application/json';
9739
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9740
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9741
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
9742
+ localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1VariantBatchUpdateVariantsRequest, localVarRequestOptions, configuration);
9743
+ return {
9744
+ url: toPathString(localVarUrlObj),
9745
+ options: localVarRequestOptions,
9746
+ };
9747
+ }),
9748
+ };
9749
+ };
9750
+ /**
9751
+ * EcommerceProductVariantsApi - functional programming interface
9752
+ * @export
9753
+ */
9754
+ export const EcommerceProductVariantsApiFp = function (configuration) {
9755
+ const localVarAxiosParamCreator = EcommerceProductVariantsApiAxiosParamCreator(configuration);
9756
+ return {
9757
+ /**
9758
+ * Add a variant to a product along one or more option dimensions (e.g. Size, Color). Options missing from the product are created automatically; provide a value for every option the product already has. Prices are integers in the smallest currency unit and default to the store currency. Returns the created variant.
9759
+ * @summary Create a product variant
9760
+ * @param {string} storeId The ID of the store that owns the product.
9761
+ * @param {string} productId The ID of the product to add the variant to.
9762
+ * @param {EcommerceV1VariantCreateVariantRequest} ecommerceV1VariantCreateVariantRequest
9763
+ * @param {*} [options] Override http request option.
9764
+ * @throws {RequiredError}
9765
+ */
9766
+ createAProductVariantV1(storeId, productId, ecommerceV1VariantCreateVariantRequest, options) {
9767
+ return __awaiter(this, void 0, void 0, function* () {
9768
+ var _a, _b;
9769
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createAProductVariantV1(storeId, productId, ecommerceV1VariantCreateVariantRequest, options);
9770
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductVariantsApi.createAProductVariantV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9771
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9772
+ });
9773
+ },
9774
+ /**
9775
+ * Delete a single variant from the product.
9776
+ * @summary Delete a product variant
9777
+ * @param {string} storeId The ID of the store that owns the product.
9778
+ * @param {string} productId The ID of the product that owns the variant.
9779
+ * @param {string} variantId The ID of the variant to delete.
9780
+ * @param {*} [options] Override http request option.
9781
+ * @throws {RequiredError}
9782
+ */
9783
+ deleteAProductVariantV1(storeId, productId, variantId, options) {
9784
+ return __awaiter(this, void 0, void 0, function* () {
9785
+ var _a, _b;
9786
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAProductVariantV1(storeId, productId, variantId, options);
9787
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductVariantsApi.deleteAProductVariantV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9788
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9789
+ });
9790
+ },
9791
+ /**
9792
+ * List a product\'s variants, ordered by rank, with their options, prices and inventory. Prices are integers in the smallest currency unit and live on variants.
9793
+ * @summary List product variants
9794
+ * @param {string} storeId The ID of the store that owns the product.
9795
+ * @param {string} productId The ID of the product to list variants for.
9796
+ * @param {number} [page] Page number
9797
+ * @param {*} [options] Override http request option.
9798
+ * @throws {RequiredError}
9799
+ */
9800
+ listProductVariantsV1(storeId, productId, page, options) {
9801
+ return __awaiter(this, void 0, void 0, function* () {
9802
+ var _a, _b;
9803
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listProductVariantsV1(storeId, productId, page, options);
9804
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductVariantsApi.listProductVariantsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9805
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9806
+ });
9807
+ },
9808
+ /**
9809
+ * Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
9810
+ * @summary Update product variants in batch
9811
+ * @param {string} storeId The ID of the store that owns the product.
9812
+ * @param {string} productId The ID of the product whose variants are being updated.
9813
+ * @param {EcommerceV1VariantBatchUpdateVariantsRequest} ecommerceV1VariantBatchUpdateVariantsRequest
9814
+ * @param {*} [options] Override http request option.
9815
+ * @throws {RequiredError}
9816
+ */
9817
+ updateProductVariantsInBatchV1(storeId, productId, ecommerceV1VariantBatchUpdateVariantsRequest, options) {
9818
+ return __awaiter(this, void 0, void 0, function* () {
9819
+ var _a, _b;
9820
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateProductVariantsInBatchV1(storeId, productId, ecommerceV1VariantBatchUpdateVariantsRequest, options);
9821
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductVariantsApi.updateProductVariantsInBatchV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9822
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9823
+ });
9824
+ },
9825
+ };
9826
+ };
9827
+ /**
9828
+ * EcommerceProductVariantsApi - factory interface
9829
+ * @export
9830
+ */
9831
+ export const EcommerceProductVariantsApiFactory = function (configuration, basePath, axios) {
9832
+ const localVarFp = EcommerceProductVariantsApiFp(configuration);
9833
+ return {
9834
+ /**
9835
+ * Add a variant to a product along one or more option dimensions (e.g. Size, Color). Options missing from the product are created automatically; provide a value for every option the product already has. Prices are integers in the smallest currency unit and default to the store currency. Returns the created variant.
9836
+ * @summary Create a product variant
9837
+ * @param {string} storeId The ID of the store that owns the product.
9838
+ * @param {string} productId The ID of the product to add the variant to.
9839
+ * @param {EcommerceV1VariantCreateVariantRequest} ecommerceV1VariantCreateVariantRequest
9840
+ * @param {*} [options] Override http request option.
9841
+ * @throws {RequiredError}
9842
+ */
9843
+ createAProductVariantV1(storeId, productId, ecommerceV1VariantCreateVariantRequest, options) {
9844
+ return localVarFp.createAProductVariantV1(storeId, productId, ecommerceV1VariantCreateVariantRequest, options).then((request) => request(axios, basePath));
9845
+ },
9846
+ /**
9847
+ * Delete a single variant from the product.
9848
+ * @summary Delete a product variant
9849
+ * @param {string} storeId The ID of the store that owns the product.
9850
+ * @param {string} productId The ID of the product that owns the variant.
9851
+ * @param {string} variantId The ID of the variant to delete.
9852
+ * @param {*} [options] Override http request option.
9853
+ * @throws {RequiredError}
9854
+ */
9855
+ deleteAProductVariantV1(storeId, productId, variantId, options) {
9856
+ return localVarFp.deleteAProductVariantV1(storeId, productId, variantId, options).then((request) => request(axios, basePath));
9857
+ },
9858
+ /**
9859
+ * List a product\'s variants, ordered by rank, with their options, prices and inventory. Prices are integers in the smallest currency unit and live on variants.
9860
+ * @summary List product variants
9861
+ * @param {string} storeId The ID of the store that owns the product.
9862
+ * @param {string} productId The ID of the product to list variants for.
9863
+ * @param {number} [page] Page number
9864
+ * @param {*} [options] Override http request option.
9865
+ * @throws {RequiredError}
9866
+ */
9867
+ listProductVariantsV1(storeId, productId, page, options) {
9868
+ return localVarFp.listProductVariantsV1(storeId, productId, page, options).then((request) => request(axios, basePath));
9869
+ },
9870
+ /**
9871
+ * Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
9872
+ * @summary Update product variants in batch
9873
+ * @param {string} storeId The ID of the store that owns the product.
9874
+ * @param {string} productId The ID of the product whose variants are being updated.
9875
+ * @param {EcommerceV1VariantBatchUpdateVariantsRequest} ecommerceV1VariantBatchUpdateVariantsRequest
9876
+ * @param {*} [options] Override http request option.
9877
+ * @throws {RequiredError}
9878
+ */
9879
+ updateProductVariantsInBatchV1(storeId, productId, ecommerceV1VariantBatchUpdateVariantsRequest, options) {
9880
+ return localVarFp.updateProductVariantsInBatchV1(storeId, productId, ecommerceV1VariantBatchUpdateVariantsRequest, options).then((request) => request(axios, basePath));
9881
+ },
9882
+ };
9883
+ };
9884
+ /**
9885
+ * EcommerceProductVariantsApi - object-oriented interface
9886
+ * @export
9887
+ * @class EcommerceProductVariantsApi
9888
+ * @extends {BaseAPI}
9889
+ */
9890
+ export class EcommerceProductVariantsApi extends BaseAPI {
9891
+ /**
9892
+ * Add a variant to a product along one or more option dimensions (e.g. Size, Color). Options missing from the product are created automatically; provide a value for every option the product already has. Prices are integers in the smallest currency unit and default to the store currency. Returns the created variant.
9893
+ * @summary Create a product variant
9894
+ * @param {string} storeId The ID of the store that owns the product.
9895
+ * @param {string} productId The ID of the product to add the variant to.
9896
+ * @param {EcommerceV1VariantCreateVariantRequest} ecommerceV1VariantCreateVariantRequest
9897
+ * @param {*} [options] Override http request option.
9898
+ * @throws {RequiredError}
9899
+ * @memberof EcommerceProductVariantsApi
9900
+ */
9901
+ createAProductVariantV1(storeId, productId, ecommerceV1VariantCreateVariantRequest, options) {
9902
+ return EcommerceProductVariantsApiFp(this.configuration).createAProductVariantV1(storeId, productId, ecommerceV1VariantCreateVariantRequest, options).then((request) => request(this.axios, this.basePath));
9903
+ }
9904
+ /**
9905
+ * Delete a single variant from the product.
9906
+ * @summary Delete a product variant
9907
+ * @param {string} storeId The ID of the store that owns the product.
9908
+ * @param {string} productId The ID of the product that owns the variant.
9909
+ * @param {string} variantId The ID of the variant to delete.
9910
+ * @param {*} [options] Override http request option.
9911
+ * @throws {RequiredError}
9912
+ * @memberof EcommerceProductVariantsApi
9913
+ */
9914
+ deleteAProductVariantV1(storeId, productId, variantId, options) {
9915
+ return EcommerceProductVariantsApiFp(this.configuration).deleteAProductVariantV1(storeId, productId, variantId, options).then((request) => request(this.axios, this.basePath));
9916
+ }
9917
+ /**
9918
+ * List a product\'s variants, ordered by rank, with their options, prices and inventory. Prices are integers in the smallest currency unit and live on variants.
9919
+ * @summary List product variants
9920
+ * @param {string} storeId The ID of the store that owns the product.
9921
+ * @param {string} productId The ID of the product to list variants for.
9922
+ * @param {number} [page] Page number
9923
+ * @param {*} [options] Override http request option.
9924
+ * @throws {RequiredError}
9925
+ * @memberof EcommerceProductVariantsApi
9926
+ */
9927
+ listProductVariantsV1(storeId, productId, page, options) {
9928
+ return EcommerceProductVariantsApiFp(this.configuration).listProductVariantsV1(storeId, productId, page, options).then((request) => request(this.axios, this.basePath));
9929
+ }
9930
+ /**
9931
+ * Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
9932
+ * @summary Update product variants in batch
9933
+ * @param {string} storeId The ID of the store that owns the product.
9934
+ * @param {string} productId The ID of the product whose variants are being updated.
9935
+ * @param {EcommerceV1VariantBatchUpdateVariantsRequest} ecommerceV1VariantBatchUpdateVariantsRequest
9936
+ * @param {*} [options] Override http request option.
9937
+ * @throws {RequiredError}
9938
+ * @memberof EcommerceProductVariantsApi
9939
+ */
9940
+ updateProductVariantsInBatchV1(storeId, productId, ecommerceV1VariantBatchUpdateVariantsRequest, options) {
9941
+ return EcommerceProductVariantsApiFp(this.configuration).updateProductVariantsInBatchV1(storeId, productId, ecommerceV1VariantBatchUpdateVariantsRequest, options).then((request) => request(this.axios, this.basePath));
9942
+ }
9943
+ }
9944
+ /**
9945
+ * EcommerceProductsApi - axios parameter creator
9946
+ * @export
9947
+ */
9948
+ export const EcommerceProductsApiAxiosParamCreator = function (configuration) {
9949
+ return {
9950
+ /**
9951
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
9952
+ * @summary Create a product image upload URL
9953
+ * @param {string} storeId The ID of the store the product belongs to.
8652
9954
  * @param {string} productId The ID of the product the image will be attached to.
8653
9955
  * @param {*} [options] Override http request option.
8654
9956
  * @throws {RequiredError}
@@ -8755,6 +10057,135 @@ export const EcommerceProductsApiAxiosParamCreator = function (configuration) {
8755
10057
  options: localVarRequestOptions,
8756
10058
  };
8757
10059
  }),
10060
+ /**
10061
+ * Delete a product and its variants from the store. A subscription product with active subscribers is archived instead of deleted so its data stays available.
10062
+ * @summary Delete a product
10063
+ * @param {string} storeId The ID of the store that owns the product.
10064
+ * @param {string} productId The ID of the product to delete.
10065
+ * @param {*} [options] Override http request option.
10066
+ * @throws {RequiredError}
10067
+ */
10068
+ deleteAProductV1: (storeId_1, productId_1, ...args_1) => __awaiter(this, [storeId_1, productId_1, ...args_1], void 0, function* (storeId, productId, options = {}) {
10069
+ // verify required parameter 'storeId' is not null or undefined
10070
+ assertParamExists('deleteAProductV1', 'storeId', storeId);
10071
+ // verify required parameter 'productId' is not null or undefined
10072
+ assertParamExists('deleteAProductV1', 'productId', productId);
10073
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}`
10074
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
10075
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
10076
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
10077
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
10078
+ let baseOptions;
10079
+ if (configuration) {
10080
+ baseOptions = configuration.baseOptions;
10081
+ }
10082
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
10083
+ const localVarHeaderParameter = {};
10084
+ const localVarQueryParameter = {};
10085
+ // authentication apiToken required
10086
+ // http bearer authentication required
10087
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
10088
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
10089
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10090
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
10091
+ return {
10092
+ url: toPathString(localVarUrlObj),
10093
+ options: localVarRequestOptions,
10094
+ };
10095
+ }),
10096
+ /**
10097
+ * List a store\'s products newest first as lean summaries (name, status, thumbnail, variant count and price range). Prices are integers in the smallest currency unit and live on variants. Filter by status, free text or a set of product ids. Use include=variants to embed each product\'s variants with prices and inventory, and include=media to embed its media.
10098
+ * @summary List products
10099
+ * @param {string} storeId The ID of the store to list products for.
10100
+ * @param {Array<string>} [productIds] Restrict to these product ids. Doubles as a single-product lookup. Up to 200 ids.
10101
+ * @param {Array<ListProductsV1StatusEnum>} [status] Product statuses to include.
10102
+ * @param {string} [q] Free-text search over product title and SKU.
10103
+ * @param {Array<ListProductsV1IncludeEnum>} [include] Opt-in heavy data: \&quot;variants\&quot; embeds each product\&#39;s variants; \&quot;media\&quot; embeds its media.
10104
+ * @param {number} [page] Page number
10105
+ * @param {*} [options] Override http request option.
10106
+ * @throws {RequiredError}
10107
+ */
10108
+ listProductsV1: (storeId_1, productIds_1, status_1, q_1, include_1, page_1, ...args_1) => __awaiter(this, [storeId_1, productIds_1, status_1, q_1, include_1, page_1, ...args_1], void 0, function* (storeId, productIds, status, q, include, page, options = {}) {
10109
+ // verify required parameter 'storeId' is not null or undefined
10110
+ assertParamExists('listProductsV1', 'storeId', storeId);
10111
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products`
10112
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
10113
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
10114
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
10115
+ let baseOptions;
10116
+ if (configuration) {
10117
+ baseOptions = configuration.baseOptions;
10118
+ }
10119
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
10120
+ const localVarHeaderParameter = {};
10121
+ const localVarQueryParameter = {};
10122
+ // authentication apiToken required
10123
+ // http bearer authentication required
10124
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
10125
+ if (productIds) {
10126
+ localVarQueryParameter['product_ids'] = productIds;
10127
+ }
10128
+ if (status) {
10129
+ localVarQueryParameter['status'] = status;
10130
+ }
10131
+ if (q !== undefined) {
10132
+ localVarQueryParameter['q'] = q;
10133
+ }
10134
+ if (include) {
10135
+ localVarQueryParameter['include'] = include;
10136
+ }
10137
+ if (page !== undefined) {
10138
+ localVarQueryParameter['page'] = page;
10139
+ }
10140
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
10141
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10142
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
10143
+ return {
10144
+ url: toPathString(localVarUrlObj),
10145
+ options: localVarRequestOptions,
10146
+ };
10147
+ }),
10148
+ /**
10149
+ * Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
10150
+ * @summary Update a product
10151
+ * @param {string} storeId The ID of the store that owns the product.
10152
+ * @param {string} productId The ID of the product to update.
10153
+ * @param {EcommerceV1ProductUpdateRequest} ecommerceV1ProductUpdateRequest
10154
+ * @param {*} [options] Override http request option.
10155
+ * @throws {RequiredError}
10156
+ */
10157
+ updateAProductV1: (storeId_1, productId_1, ecommerceV1ProductUpdateRequest_1, ...args_1) => __awaiter(this, [storeId_1, productId_1, ecommerceV1ProductUpdateRequest_1, ...args_1], void 0, function* (storeId, productId, ecommerceV1ProductUpdateRequest, options = {}) {
10158
+ // verify required parameter 'storeId' is not null or undefined
10159
+ assertParamExists('updateAProductV1', 'storeId', storeId);
10160
+ // verify required parameter 'productId' is not null or undefined
10161
+ assertParamExists('updateAProductV1', 'productId', productId);
10162
+ // verify required parameter 'ecommerceV1ProductUpdateRequest' is not null or undefined
10163
+ assertParamExists('updateAProductV1', 'ecommerceV1ProductUpdateRequest', ecommerceV1ProductUpdateRequest);
10164
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}`
10165
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
10166
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
10167
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
10168
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
10169
+ let baseOptions;
10170
+ if (configuration) {
10171
+ baseOptions = configuration.baseOptions;
10172
+ }
10173
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
10174
+ const localVarHeaderParameter = {};
10175
+ const localVarQueryParameter = {};
10176
+ // authentication apiToken required
10177
+ // http bearer authentication required
10178
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
10179
+ localVarHeaderParameter['Content-Type'] = 'application/json';
10180
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
10181
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10182
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
10183
+ localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1ProductUpdateRequest, localVarRequestOptions, configuration);
10184
+ return {
10185
+ url: toPathString(localVarUrlObj),
10186
+ options: localVarRequestOptions,
10187
+ };
10188
+ }),
8758
10189
  /**
8759
10190
  * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
8760
10191
  * @summary Upload and attach a product image
@@ -8829,27 +10260,80 @@ export const EcommerceProductsApiFp = function (configuration) {
8829
10260
  * @param {*} [options] Override http request option.
8830
10261
  * @throws {RequiredError}
8831
10262
  */
8832
- createDigitalProductV1(storeId, ecommerceV1ProductCreateDigitalProductRequest, options) {
10263
+ createDigitalProductV1(storeId, ecommerceV1ProductCreateDigitalProductRequest, options) {
10264
+ return __awaiter(this, void 0, void 0, function* () {
10265
+ var _a, _b;
10266
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createDigitalProductV1(storeId, ecommerceV1ProductCreateDigitalProductRequest, options);
10267
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductsApi.createDigitalProductV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
10268
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
10269
+ });
10270
+ },
10271
+ /**
10272
+ * Create a published physical product with a single variant priced in the store currency.
10273
+ * @summary Create physical product
10274
+ * @param {string} storeId The ID of the store to create the product in.
10275
+ * @param {EcommerceV1ProductCreatePhysicalProductRequest} ecommerceV1ProductCreatePhysicalProductRequest
10276
+ * @param {*} [options] Override http request option.
10277
+ * @throws {RequiredError}
10278
+ */
10279
+ createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options) {
10280
+ return __awaiter(this, void 0, void 0, function* () {
10281
+ var _a, _b;
10282
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options);
10283
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductsApi.createPhysicalProductV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
10284
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
10285
+ });
10286
+ },
10287
+ /**
10288
+ * Delete a product and its variants from the store. A subscription product with active subscribers is archived instead of deleted so its data stays available.
10289
+ * @summary Delete a product
10290
+ * @param {string} storeId The ID of the store that owns the product.
10291
+ * @param {string} productId The ID of the product to delete.
10292
+ * @param {*} [options] Override http request option.
10293
+ * @throws {RequiredError}
10294
+ */
10295
+ deleteAProductV1(storeId, productId, options) {
10296
+ return __awaiter(this, void 0, void 0, function* () {
10297
+ var _a, _b;
10298
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteAProductV1(storeId, productId, options);
10299
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductsApi.deleteAProductV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
10300
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
10301
+ });
10302
+ },
10303
+ /**
10304
+ * List a store\'s products newest first as lean summaries (name, status, thumbnail, variant count and price range). Prices are integers in the smallest currency unit and live on variants. Filter by status, free text or a set of product ids. Use include=variants to embed each product\'s variants with prices and inventory, and include=media to embed its media.
10305
+ * @summary List products
10306
+ * @param {string} storeId The ID of the store to list products for.
10307
+ * @param {Array<string>} [productIds] Restrict to these product ids. Doubles as a single-product lookup. Up to 200 ids.
10308
+ * @param {Array<ListProductsV1StatusEnum>} [status] Product statuses to include.
10309
+ * @param {string} [q] Free-text search over product title and SKU.
10310
+ * @param {Array<ListProductsV1IncludeEnum>} [include] Opt-in heavy data: \&quot;variants\&quot; embeds each product\&#39;s variants; \&quot;media\&quot; embeds its media.
10311
+ * @param {number} [page] Page number
10312
+ * @param {*} [options] Override http request option.
10313
+ * @throws {RequiredError}
10314
+ */
10315
+ listProductsV1(storeId, productIds, status, q, include, page, options) {
8833
10316
  return __awaiter(this, void 0, void 0, function* () {
8834
10317
  var _a, _b;
8835
- const localVarAxiosArgs = yield localVarAxiosParamCreator.createDigitalProductV1(storeId, ecommerceV1ProductCreateDigitalProductRequest, options);
8836
- const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductsApi.createDigitalProductV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
10318
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listProductsV1(storeId, productIds, status, q, include, page, options);
10319
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductsApi.listProductsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
8837
10320
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8838
10321
  });
8839
10322
  },
8840
10323
  /**
8841
- * Create a published physical product with a single variant priced in the store currency.
8842
- * @summary Create physical product
8843
- * @param {string} storeId The ID of the store to create the product in.
8844
- * @param {EcommerceV1ProductCreatePhysicalProductRequest} ecommerceV1ProductCreatePhysicalProductRequest
10324
+ * Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
10325
+ * @summary Update a product
10326
+ * @param {string} storeId The ID of the store that owns the product.
10327
+ * @param {string} productId The ID of the product to update.
10328
+ * @param {EcommerceV1ProductUpdateRequest} ecommerceV1ProductUpdateRequest
8845
10329
  * @param {*} [options] Override http request option.
8846
10330
  * @throws {RequiredError}
8847
10331
  */
8848
- createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options) {
10332
+ updateAProductV1(storeId, productId, ecommerceV1ProductUpdateRequest, options) {
8849
10333
  return __awaiter(this, void 0, void 0, function* () {
8850
10334
  var _a, _b;
8851
- const localVarAxiosArgs = yield localVarAxiosParamCreator.createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options);
8852
- const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductsApi.createPhysicalProductV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
10335
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAProductV1(storeId, productId, ecommerceV1ProductUpdateRequest, options);
10336
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductsApi.updateAProductV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
8853
10337
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8854
10338
  });
8855
10339
  },
@@ -8912,6 +10396,44 @@ export const EcommerceProductsApiFactory = function (configuration, basePath, ax
8912
10396
  createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options) {
8913
10397
  return localVarFp.createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(axios, basePath));
8914
10398
  },
10399
+ /**
10400
+ * Delete a product and its variants from the store. A subscription product with active subscribers is archived instead of deleted so its data stays available.
10401
+ * @summary Delete a product
10402
+ * @param {string} storeId The ID of the store that owns the product.
10403
+ * @param {string} productId The ID of the product to delete.
10404
+ * @param {*} [options] Override http request option.
10405
+ * @throws {RequiredError}
10406
+ */
10407
+ deleteAProductV1(storeId, productId, options) {
10408
+ return localVarFp.deleteAProductV1(storeId, productId, options).then((request) => request(axios, basePath));
10409
+ },
10410
+ /**
10411
+ * List a store\'s products newest first as lean summaries (name, status, thumbnail, variant count and price range). Prices are integers in the smallest currency unit and live on variants. Filter by status, free text or a set of product ids. Use include=variants to embed each product\'s variants with prices and inventory, and include=media to embed its media.
10412
+ * @summary List products
10413
+ * @param {string} storeId The ID of the store to list products for.
10414
+ * @param {Array<string>} [productIds] Restrict to these product ids. Doubles as a single-product lookup. Up to 200 ids.
10415
+ * @param {Array<ListProductsV1StatusEnum>} [status] Product statuses to include.
10416
+ * @param {string} [q] Free-text search over product title and SKU.
10417
+ * @param {Array<ListProductsV1IncludeEnum>} [include] Opt-in heavy data: \&quot;variants\&quot; embeds each product\&#39;s variants; \&quot;media\&quot; embeds its media.
10418
+ * @param {number} [page] Page number
10419
+ * @param {*} [options] Override http request option.
10420
+ * @throws {RequiredError}
10421
+ */
10422
+ listProductsV1(storeId, productIds, status, q, include, page, options) {
10423
+ return localVarFp.listProductsV1(storeId, productIds, status, q, include, page, options).then((request) => request(axios, basePath));
10424
+ },
10425
+ /**
10426
+ * Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
10427
+ * @summary Update a product
10428
+ * @param {string} storeId The ID of the store that owns the product.
10429
+ * @param {string} productId The ID of the product to update.
10430
+ * @param {EcommerceV1ProductUpdateRequest} ecommerceV1ProductUpdateRequest
10431
+ * @param {*} [options] Override http request option.
10432
+ * @throws {RequiredError}
10433
+ */
10434
+ updateAProductV1(storeId, productId, ecommerceV1ProductUpdateRequest, options) {
10435
+ return localVarFp.updateAProductV1(storeId, productId, ecommerceV1ProductUpdateRequest, options).then((request) => request(axios, basePath));
10436
+ },
8915
10437
  /**
8916
10438
  * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
8917
10439
  * @summary Upload and attach a product image
@@ -8969,6 +10491,47 @@ export class EcommerceProductsApi extends BaseAPI {
8969
10491
  createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options) {
8970
10492
  return EcommerceProductsApiFp(this.configuration).createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(this.axios, this.basePath));
8971
10493
  }
10494
+ /**
10495
+ * Delete a product and its variants from the store. A subscription product with active subscribers is archived instead of deleted so its data stays available.
10496
+ * @summary Delete a product
10497
+ * @param {string} storeId The ID of the store that owns the product.
10498
+ * @param {string} productId The ID of the product to delete.
10499
+ * @param {*} [options] Override http request option.
10500
+ * @throws {RequiredError}
10501
+ * @memberof EcommerceProductsApi
10502
+ */
10503
+ deleteAProductV1(storeId, productId, options) {
10504
+ return EcommerceProductsApiFp(this.configuration).deleteAProductV1(storeId, productId, options).then((request) => request(this.axios, this.basePath));
10505
+ }
10506
+ /**
10507
+ * List a store\'s products newest first as lean summaries (name, status, thumbnail, variant count and price range). Prices are integers in the smallest currency unit and live on variants. Filter by status, free text or a set of product ids. Use include=variants to embed each product\'s variants with prices and inventory, and include=media to embed its media.
10508
+ * @summary List products
10509
+ * @param {string} storeId The ID of the store to list products for.
10510
+ * @param {Array<string>} [productIds] Restrict to these product ids. Doubles as a single-product lookup. Up to 200 ids.
10511
+ * @param {Array<ListProductsV1StatusEnum>} [status] Product statuses to include.
10512
+ * @param {string} [q] Free-text search over product title and SKU.
10513
+ * @param {Array<ListProductsV1IncludeEnum>} [include] Opt-in heavy data: \&quot;variants\&quot; embeds each product\&#39;s variants; \&quot;media\&quot; embeds its media.
10514
+ * @param {number} [page] Page number
10515
+ * @param {*} [options] Override http request option.
10516
+ * @throws {RequiredError}
10517
+ * @memberof EcommerceProductsApi
10518
+ */
10519
+ listProductsV1(storeId, productIds, status, q, include, page, options) {
10520
+ return EcommerceProductsApiFp(this.configuration).listProductsV1(storeId, productIds, status, q, include, page, options).then((request) => request(this.axios, this.basePath));
10521
+ }
10522
+ /**
10523
+ * Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
10524
+ * @summary Update a product
10525
+ * @param {string} storeId The ID of the store that owns the product.
10526
+ * @param {string} productId The ID of the product to update.
10527
+ * @param {EcommerceV1ProductUpdateRequest} ecommerceV1ProductUpdateRequest
10528
+ * @param {*} [options] Override http request option.
10529
+ * @throws {RequiredError}
10530
+ * @memberof EcommerceProductsApi
10531
+ */
10532
+ updateAProductV1(storeId, productId, ecommerceV1ProductUpdateRequest, options) {
10533
+ return EcommerceProductsApiFp(this.configuration).updateAProductV1(storeId, productId, ecommerceV1ProductUpdateRequest, options).then((request) => request(this.axios, this.basePath));
10534
+ }
8972
10535
  /**
8973
10536
  * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
8974
10537
  * @summary Upload and attach a product image
@@ -8983,6 +10546,23 @@ export class EcommerceProductsApi extends BaseAPI {
8983
10546
  return EcommerceProductsApiFp(this.configuration).uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options).then((request) => request(this.axios, this.basePath));
8984
10547
  }
8985
10548
  }
10549
+ /**
10550
+ * @export
10551
+ */
10552
+ export const ListProductsV1StatusEnum = {
10553
+ Draft: 'draft',
10554
+ Proposed: 'proposed',
10555
+ Published: 'published',
10556
+ Rejected: 'rejected',
10557
+ Archived: 'archived'
10558
+ };
10559
+ /**
10560
+ * @export
10561
+ */
10562
+ export const ListProductsV1IncludeEnum = {
10563
+ Variants: 'variants',
10564
+ Media: 'media'
10565
+ };
8986
10566
  /**
8987
10567
  * EcommerceSalesChannelsApi - axios parameter creator
8988
10568
  * @export
@@ -8990,18 +10570,18 @@ export class EcommerceProductsApi extends BaseAPI {
8990
10570
  export const EcommerceSalesChannelsApiAxiosParamCreator = function (configuration) {
8991
10571
  return {
8992
10572
  /**
8993
- * Create a custom sales channel for a store. Build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API.
8994
- * @summary Create custom sales channel
10573
+ * Create a sales channel for a store. A \"custom\" channel is headless: build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API. A \"quick-link\" channel is a hosted one-page store whose handle is auto-generated.
10574
+ * @summary Create a sales channel
8995
10575
  * @param {string} storeId The ID of the store to create the sales channel for.
8996
10576
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
8997
10577
  * @param {*} [options] Override http request option.
8998
10578
  * @throws {RequiredError}
8999
10579
  */
9000
- createCustomSalesChannelV1: (storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1) => __awaiter(this, [storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1], void 0, function* (storeId, ecommerceV1SalesChannelStoreRequest, options = {}) {
10580
+ createASalesChannelV1: (storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1) => __awaiter(this, [storeId_1, ecommerceV1SalesChannelStoreRequest_1, ...args_1], void 0, function* (storeId, ecommerceV1SalesChannelStoreRequest, options = {}) {
9001
10581
  // verify required parameter 'storeId' is not null or undefined
9002
- assertParamExists('createCustomSalesChannelV1', 'storeId', storeId);
10582
+ assertParamExists('createASalesChannelV1', 'storeId', storeId);
9003
10583
  // verify required parameter 'ecommerceV1SalesChannelStoreRequest' is not null or undefined
9004
- assertParamExists('createCustomSalesChannelV1', 'ecommerceV1SalesChannelStoreRequest', ecommerceV1SalesChannelStoreRequest);
10584
+ assertParamExists('createASalesChannelV1', 'ecommerceV1SalesChannelStoreRequest', ecommerceV1SalesChannelStoreRequest);
9005
10585
  const localVarPath = `/api/ecommerce/v1/stores/{store_id}/sales-channels`
9006
10586
  .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)));
9007
10587
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -9109,18 +10689,18 @@ export const EcommerceSalesChannelsApiFp = function (configuration) {
9109
10689
  const localVarAxiosParamCreator = EcommerceSalesChannelsApiAxiosParamCreator(configuration);
9110
10690
  return {
9111
10691
  /**
9112
- * Create a custom sales channel for a store. Build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API.
9113
- * @summary Create custom sales channel
10692
+ * Create a sales channel for a store. A \"custom\" channel is headless: build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API. A \"quick-link\" channel is a hosted one-page store whose handle is auto-generated.
10693
+ * @summary Create a sales channel
9114
10694
  * @param {string} storeId The ID of the store to create the sales channel for.
9115
10695
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
9116
10696
  * @param {*} [options] Override http request option.
9117
10697
  * @throws {RequiredError}
9118
10698
  */
9119
- createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
10699
+ createASalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
9120
10700
  return __awaiter(this, void 0, void 0, function* () {
9121
10701
  var _a, _b;
9122
- const localVarAxiosArgs = yield localVarAxiosParamCreator.createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options);
9123
- const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceSalesChannelsApi.createCustomSalesChannelV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
10702
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createASalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options);
10703
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceSalesChannelsApi.createASalesChannelV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
9124
10704
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9125
10705
  });
9126
10706
  },
@@ -9166,15 +10746,15 @@ export const EcommerceSalesChannelsApiFactory = function (configuration, basePat
9166
10746
  const localVarFp = EcommerceSalesChannelsApiFp(configuration);
9167
10747
  return {
9168
10748
  /**
9169
- * Create a custom sales channel for a store. Build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API.
9170
- * @summary Create custom sales channel
10749
+ * Create a sales channel for a store. A \"custom\" channel is headless: build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API. A \"quick-link\" channel is a hosted one-page store whose handle is auto-generated.
10750
+ * @summary Create a sales channel
9171
10751
  * @param {string} storeId The ID of the store to create the sales channel for.
9172
10752
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
9173
10753
  * @param {*} [options] Override http request option.
9174
10754
  * @throws {RequiredError}
9175
10755
  */
9176
- createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
9177
- return localVarFp.createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(axios, basePath));
10756
+ createASalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
10757
+ return localVarFp.createASalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(axios, basePath));
9178
10758
  },
9179
10759
  /**
9180
10760
  * List a store\'s active sales channels with their full metadata.
@@ -9208,16 +10788,16 @@ export const EcommerceSalesChannelsApiFactory = function (configuration, basePat
9208
10788
  */
9209
10789
  export class EcommerceSalesChannelsApi extends BaseAPI {
9210
10790
  /**
9211
- * Create a custom sales channel for a store. Build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API.
9212
- * @summary Create custom sales channel
10791
+ * Create a sales channel for a store. A \"custom\" channel is headless: build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API. A \"quick-link\" channel is a hosted one-page store whose handle is auto-generated.
10792
+ * @summary Create a sales channel
9213
10793
  * @param {string} storeId The ID of the store to create the sales channel for.
9214
10794
  * @param {EcommerceV1SalesChannelStoreRequest} ecommerceV1SalesChannelStoreRequest
9215
10795
  * @param {*} [options] Override http request option.
9216
10796
  * @throws {RequiredError}
9217
10797
  * @memberof EcommerceSalesChannelsApi
9218
10798
  */
9219
- createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
9220
- return EcommerceSalesChannelsApiFp(this.configuration).createCustomSalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(this.axios, this.basePath));
10799
+ createASalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options) {
10800
+ return EcommerceSalesChannelsApiFp(this.configuration).createASalesChannelV1(storeId, ecommerceV1SalesChannelStoreRequest, options).then((request) => request(this.axios, this.basePath));
9221
10801
  }
9222
10802
  /**
9223
10803
  * List a store\'s active sales channels with their full metadata.
@@ -19824,6 +21404,38 @@ export class ReachFormsApi extends BaseAPI {
19824
21404
  */
19825
21405
  export const ReachProfilesApiAxiosParamCreator = function (configuration) {
19826
21406
  return {
21407
+ /**
21408
+ * Get the sending domain connected to the profile, its verification status and any suspended sender addresses. Campaigns only go out once a domain is connected and active, so this is the cheapest way to check that precondition before building one. A profile with no domain connected returns the same shape with every field set to `null`. For the individual MX, SPF, DKIM and DMARC records behind the status, use the DNS status endpoint.
21409
+ * @summary Get connected sending domain
21410
+ * @param {string} profileUuid Profile uuid parameter
21411
+ * @param {*} [options] Override http request option.
21412
+ * @throws {RequiredError}
21413
+ */
21414
+ getConnectedSendingDomainV1: (profileUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, ...args_1], void 0, function* (profileUuid, options = {}) {
21415
+ // verify required parameter 'profileUuid' is not null or undefined
21416
+ assertParamExists('getConnectedSendingDomainV1', 'profileUuid', profileUuid);
21417
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/domains`
21418
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
21419
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
21420
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
21421
+ let baseOptions;
21422
+ if (configuration) {
21423
+ baseOptions = configuration.baseOptions;
21424
+ }
21425
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
21426
+ const localVarHeaderParameter = {};
21427
+ const localVarQueryParameter = {};
21428
+ // authentication apiToken required
21429
+ // http bearer authentication required
21430
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
21431
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
21432
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
21433
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
21434
+ return {
21435
+ url: toPathString(localVarUrlObj),
21436
+ options: localVarRequestOptions,
21437
+ };
21438
+ }),
19827
21439
  /**
19828
21440
  * Retrieve the DNS configuration status for a profile\'s domain. This endpoint reports the state of MX, SPF, DKIM and DMARC records, including the actual records found and the suggested records required for correct email delivery.
19829
21441
  * @summary Get profile domain DNS status
@@ -19888,6 +21500,38 @@ export const ReachProfilesApiAxiosParamCreator = function (configuration) {
19888
21500
  options: localVarRequestOptions,
19889
21501
  };
19890
21502
  }),
21503
+ /**
21504
+ * List which plan features the profile can use. This is the feature lock matrix, not a usage quota. `available` means the feature can be used right now and `locked` means it is not part of the base plan, so an upgrade is needed. For remaining emails, recipients and AI credits use the limits endpoint instead. Worth checking before building something that cannot be activated afterwards, such as an automation on a plan without automation activation.
21505
+ * @summary List plan feature access
21506
+ * @param {string} profileUuid Profile uuid parameter
21507
+ * @param {*} [options] Override http request option.
21508
+ * @throws {RequiredError}
21509
+ */
21510
+ listPlanFeatureAccessV1: (profileUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, ...args_1], void 0, function* (profileUuid, options = {}) {
21511
+ // verify required parameter 'profileUuid' is not null or undefined
21512
+ assertParamExists('listPlanFeatureAccessV1', 'profileUuid', profileUuid);
21513
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/features`
21514
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
21515
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
21516
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
21517
+ let baseOptions;
21518
+ if (configuration) {
21519
+ baseOptions = configuration.baseOptions;
21520
+ }
21521
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
21522
+ const localVarHeaderParameter = {};
21523
+ const localVarQueryParameter = {};
21524
+ // authentication apiToken required
21525
+ // http bearer authentication required
21526
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
21527
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
21528
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
21529
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
21530
+ return {
21531
+ url: toPathString(localVarUrlObj),
21532
+ options: localVarRequestOptions,
21533
+ };
21534
+ }),
19891
21535
  /**
19892
21536
  * This endpoint returns all profiles available to the client, including their basic information.
19893
21537
  * @summary List Profiles
@@ -19925,6 +21569,21 @@ export const ReachProfilesApiAxiosParamCreator = function (configuration) {
19925
21569
  export const ReachProfilesApiFp = function (configuration) {
19926
21570
  const localVarAxiosParamCreator = ReachProfilesApiAxiosParamCreator(configuration);
19927
21571
  return {
21572
+ /**
21573
+ * Get the sending domain connected to the profile, its verification status and any suspended sender addresses. Campaigns only go out once a domain is connected and active, so this is the cheapest way to check that precondition before building one. A profile with no domain connected returns the same shape with every field set to `null`. For the individual MX, SPF, DKIM and DMARC records behind the status, use the DNS status endpoint.
21574
+ * @summary Get connected sending domain
21575
+ * @param {string} profileUuid Profile uuid parameter
21576
+ * @param {*} [options] Override http request option.
21577
+ * @throws {RequiredError}
21578
+ */
21579
+ getConnectedSendingDomainV1(profileUuid, options) {
21580
+ return __awaiter(this, void 0, void 0, function* () {
21581
+ var _a, _b;
21582
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getConnectedSendingDomainV1(profileUuid, options);
21583
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachProfilesApi.getConnectedSendingDomainV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
21584
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
21585
+ });
21586
+ },
19928
21587
  /**
19929
21588
  * Retrieve the DNS configuration status for a profile\'s domain. This endpoint reports the state of MX, SPF, DKIM and DMARC records, including the actual records found and the suggested records required for correct email delivery.
19930
21589
  * @summary Get profile domain DNS status
@@ -19955,6 +21614,21 @@ export const ReachProfilesApiFp = function (configuration) {
19955
21614
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
19956
21615
  });
19957
21616
  },
21617
+ /**
21618
+ * List which plan features the profile can use. This is the feature lock matrix, not a usage quota. `available` means the feature can be used right now and `locked` means it is not part of the base plan, so an upgrade is needed. For remaining emails, recipients and AI credits use the limits endpoint instead. Worth checking before building something that cannot be activated afterwards, such as an automation on a plan without automation activation.
21619
+ * @summary List plan feature access
21620
+ * @param {string} profileUuid Profile uuid parameter
21621
+ * @param {*} [options] Override http request option.
21622
+ * @throws {RequiredError}
21623
+ */
21624
+ listPlanFeatureAccessV1(profileUuid, options) {
21625
+ return __awaiter(this, void 0, void 0, function* () {
21626
+ var _a, _b;
21627
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listPlanFeatureAccessV1(profileUuid, options);
21628
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachProfilesApi.listPlanFeatureAccessV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
21629
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
21630
+ });
21631
+ },
19958
21632
  /**
19959
21633
  * This endpoint returns all profiles available to the client, including their basic information.
19960
21634
  * @summary List Profiles
@@ -19978,6 +21652,16 @@ export const ReachProfilesApiFp = function (configuration) {
19978
21652
  export const ReachProfilesApiFactory = function (configuration, basePath, axios) {
19979
21653
  const localVarFp = ReachProfilesApiFp(configuration);
19980
21654
  return {
21655
+ /**
21656
+ * Get the sending domain connected to the profile, its verification status and any suspended sender addresses. Campaigns only go out once a domain is connected and active, so this is the cheapest way to check that precondition before building one. A profile with no domain connected returns the same shape with every field set to `null`. For the individual MX, SPF, DKIM and DMARC records behind the status, use the DNS status endpoint.
21657
+ * @summary Get connected sending domain
21658
+ * @param {string} profileUuid Profile uuid parameter
21659
+ * @param {*} [options] Override http request option.
21660
+ * @throws {RequiredError}
21661
+ */
21662
+ getConnectedSendingDomainV1(profileUuid, options) {
21663
+ return localVarFp.getConnectedSendingDomainV1(profileUuid, options).then((request) => request(axios, basePath));
21664
+ },
19981
21665
  /**
19982
21666
  * Retrieve the DNS configuration status for a profile\'s domain. This endpoint reports the state of MX, SPF, DKIM and DMARC records, including the actual records found and the suggested records required for correct email delivery.
19983
21667
  * @summary Get profile domain DNS status
@@ -19998,6 +21682,16 @@ export const ReachProfilesApiFactory = function (configuration, basePath, axios)
19998
21682
  getRemainingPlanLimitsV1(profileUuid, options) {
19999
21683
  return localVarFp.getRemainingPlanLimitsV1(profileUuid, options).then((request) => request(axios, basePath));
20000
21684
  },
21685
+ /**
21686
+ * List which plan features the profile can use. This is the feature lock matrix, not a usage quota. `available` means the feature can be used right now and `locked` means it is not part of the base plan, so an upgrade is needed. For remaining emails, recipients and AI credits use the limits endpoint instead. Worth checking before building something that cannot be activated afterwards, such as an automation on a plan without automation activation.
21687
+ * @summary List plan feature access
21688
+ * @param {string} profileUuid Profile uuid parameter
21689
+ * @param {*} [options] Override http request option.
21690
+ * @throws {RequiredError}
21691
+ */
21692
+ listPlanFeatureAccessV1(profileUuid, options) {
21693
+ return localVarFp.listPlanFeatureAccessV1(profileUuid, options).then((request) => request(axios, basePath));
21694
+ },
20001
21695
  /**
20002
21696
  * This endpoint returns all profiles available to the client, including their basic information.
20003
21697
  * @summary List Profiles
@@ -20016,6 +21710,17 @@ export const ReachProfilesApiFactory = function (configuration, basePath, axios)
20016
21710
  * @extends {BaseAPI}
20017
21711
  */
20018
21712
  export class ReachProfilesApi extends BaseAPI {
21713
+ /**
21714
+ * Get the sending domain connected to the profile, its verification status and any suspended sender addresses. Campaigns only go out once a domain is connected and active, so this is the cheapest way to check that precondition before building one. A profile with no domain connected returns the same shape with every field set to `null`. For the individual MX, SPF, DKIM and DMARC records behind the status, use the DNS status endpoint.
21715
+ * @summary Get connected sending domain
21716
+ * @param {string} profileUuid Profile uuid parameter
21717
+ * @param {*} [options] Override http request option.
21718
+ * @throws {RequiredError}
21719
+ * @memberof ReachProfilesApi
21720
+ */
21721
+ getConnectedSendingDomainV1(profileUuid, options) {
21722
+ return ReachProfilesApiFp(this.configuration).getConnectedSendingDomainV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
21723
+ }
20019
21724
  /**
20020
21725
  * Retrieve the DNS configuration status for a profile\'s domain. This endpoint reports the state of MX, SPF, DKIM and DMARC records, including the actual records found and the suggested records required for correct email delivery.
20021
21726
  * @summary Get profile domain DNS status
@@ -20038,6 +21743,17 @@ export class ReachProfilesApi extends BaseAPI {
20038
21743
  getRemainingPlanLimitsV1(profileUuid, options) {
20039
21744
  return ReachProfilesApiFp(this.configuration).getRemainingPlanLimitsV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
20040
21745
  }
21746
+ /**
21747
+ * List which plan features the profile can use. This is the feature lock matrix, not a usage quota. `available` means the feature can be used right now and `locked` means it is not part of the base plan, so an upgrade is needed. For remaining emails, recipients and AI credits use the limits endpoint instead. Worth checking before building something that cannot be activated afterwards, such as an automation on a plan without automation activation.
21748
+ * @summary List plan feature access
21749
+ * @param {string} profileUuid Profile uuid parameter
21750
+ * @param {*} [options] Override http request option.
21751
+ * @throws {RequiredError}
21752
+ * @memberof ReachProfilesApi
21753
+ */
21754
+ listPlanFeatureAccessV1(profileUuid, options) {
21755
+ return ReachProfilesApiFp(this.configuration).listPlanFeatureAccessV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
21756
+ }
20041
21757
  /**
20042
21758
  * This endpoint returns all profiles available to the client, including their basic information.
20043
21759
  * @summary List Profiles
@@ -20396,6 +22112,38 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration) {
20396
22112
  options: localVarRequestOptions,
20397
22113
  };
20398
22114
  }),
22115
+ /**
22116
+ * List every attribute a segment condition can filter on, with the operators each attribute accepts, the value format they expect and, where the value is constrained, the allowed values. The list is profile specific: it includes the profile\'s custom contact fields, its tags and its 20 most recently published campaigns, so the valid attributes cannot be hardcoded. Read it before creating or updating a segment to discover the valid `attribute`, `operator` and `value` combinations.
22117
+ * @summary List segment filter attributes
22118
+ * @param {string} profileUuid Profile uuid parameter
22119
+ * @param {*} [options] Override http request option.
22120
+ * @throws {RequiredError}
22121
+ */
22122
+ listSegmentFilterAttributesV1: (profileUuid_1, ...args_1) => __awaiter(this, [profileUuid_1, ...args_1], void 0, function* (profileUuid, options = {}) {
22123
+ // verify required parameter 'profileUuid' is not null or undefined
22124
+ assertParamExists('listSegmentFilterAttributesV1', 'profileUuid', profileUuid);
22125
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/filters/attributes`
22126
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
22127
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
22128
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
22129
+ let baseOptions;
22130
+ if (configuration) {
22131
+ baseOptions = configuration.baseOptions;
22132
+ }
22133
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
22134
+ const localVarHeaderParameter = {};
22135
+ const localVarQueryParameter = {};
22136
+ // authentication apiToken required
22137
+ // http bearer authentication required
22138
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
22139
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
22140
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
22141
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
22142
+ return {
22143
+ url: toPathString(localVarUrlObj),
22144
+ options: localVarRequestOptions,
22145
+ };
22146
+ }),
20399
22147
  /**
20400
22148
  * Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list the segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
20401
22149
  * @summary List segments
@@ -20425,6 +22173,43 @@ export const ReachSegmentsApiAxiosParamCreator = function (configuration) {
20425
22173
  options: localVarRequestOptions,
20426
22174
  };
20427
22175
  }),
22176
+ /**
22177
+ * Preview the contacts matching a set of conditions without saving a segment. The body is the same set of conditions accepted when creating or updating a segment, so this is how to check who a filter reaches, and how many, before persisting it. Nothing is stored and no contact is modified. Call the segment filter attributes endpoint first to discover the valid `attribute`, `operator` and `value` combinations.
22178
+ * @summary Preview contacts matching conditions
22179
+ * @param {string} profileUuid Profile uuid parameter
22180
+ * @param {ReachV1ContactsSegmentsProfileFilterContactsRequest} reachV1ContactsSegmentsProfileFilterContactsRequest
22181
+ * @param {*} [options] Override http request option.
22182
+ * @throws {RequiredError}
22183
+ */
22184
+ previewContactsMatchingConditionsV1: (profileUuid_1, reachV1ContactsSegmentsProfileFilterContactsRequest_1, ...args_1) => __awaiter(this, [profileUuid_1, reachV1ContactsSegmentsProfileFilterContactsRequest_1, ...args_1], void 0, function* (profileUuid, reachV1ContactsSegmentsProfileFilterContactsRequest, options = {}) {
22185
+ // verify required parameter 'profileUuid' is not null or undefined
22186
+ assertParamExists('previewContactsMatchingConditionsV1', 'profileUuid', profileUuid);
22187
+ // verify required parameter 'reachV1ContactsSegmentsProfileFilterContactsRequest' is not null or undefined
22188
+ assertParamExists('previewContactsMatchingConditionsV1', 'reachV1ContactsSegmentsProfileFilterContactsRequest', reachV1ContactsSegmentsProfileFilterContactsRequest);
22189
+ const localVarPath = `/api/reach/v1/profiles/{profileUuid}/segmentation/filters/contacts`
22190
+ .replace(`{${"profileUuid"}}`, encodeURIComponent(String(profileUuid)));
22191
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
22192
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
22193
+ let baseOptions;
22194
+ if (configuration) {
22195
+ baseOptions = configuration.baseOptions;
22196
+ }
22197
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
22198
+ const localVarHeaderParameter = {};
22199
+ const localVarQueryParameter = {};
22200
+ // authentication apiToken required
22201
+ // http bearer authentication required
22202
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
22203
+ localVarHeaderParameter['Content-Type'] = 'application/json';
22204
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
22205
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
22206
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
22207
+ localVarRequestOptions.data = serializeDataIfNeeded(reachV1ContactsSegmentsProfileFilterContactsRequest, localVarRequestOptions, configuration);
22208
+ return {
22209
+ url: toPathString(localVarUrlObj),
22210
+ options: localVarRequestOptions,
22211
+ };
22212
+ }),
20428
22213
  /**
20429
22214
  * Rename a segment and/or replace the conditions that define it. `name` is always required. Omit `conditions` to rename without touching the conditions; supply them and they replace the existing set entirely rather than being merged into it. Contacts are never modified, but which of them match the segment can change immediately.
20430
22215
  * @summary Update a profile segment
@@ -20625,6 +22410,21 @@ export const ReachSegmentsApiFp = function (configuration) {
20625
22410
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
20626
22411
  });
20627
22412
  },
22413
+ /**
22414
+ * List every attribute a segment condition can filter on, with the operators each attribute accepts, the value format they expect and, where the value is constrained, the allowed values. The list is profile specific: it includes the profile\'s custom contact fields, its tags and its 20 most recently published campaigns, so the valid attributes cannot be hardcoded. Read it before creating or updating a segment to discover the valid `attribute`, `operator` and `value` combinations.
22415
+ * @summary List segment filter attributes
22416
+ * @param {string} profileUuid Profile uuid parameter
22417
+ * @param {*} [options] Override http request option.
22418
+ * @throws {RequiredError}
22419
+ */
22420
+ listSegmentFilterAttributesV1(profileUuid, options) {
22421
+ return __awaiter(this, void 0, void 0, function* () {
22422
+ var _a, _b;
22423
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listSegmentFilterAttributesV1(profileUuid, options);
22424
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachSegmentsApi.listSegmentFilterAttributesV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
22425
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
22426
+ });
22427
+ },
20628
22428
  /**
20629
22429
  * Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list the segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
20630
22430
  * @summary List segments
@@ -20640,6 +22440,22 @@ export const ReachSegmentsApiFp = function (configuration) {
20640
22440
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
20641
22441
  });
20642
22442
  },
22443
+ /**
22444
+ * Preview the contacts matching a set of conditions without saving a segment. The body is the same set of conditions accepted when creating or updating a segment, so this is how to check who a filter reaches, and how many, before persisting it. Nothing is stored and no contact is modified. Call the segment filter attributes endpoint first to discover the valid `attribute`, `operator` and `value` combinations.
22445
+ * @summary Preview contacts matching conditions
22446
+ * @param {string} profileUuid Profile uuid parameter
22447
+ * @param {ReachV1ContactsSegmentsProfileFilterContactsRequest} reachV1ContactsSegmentsProfileFilterContactsRequest
22448
+ * @param {*} [options] Override http request option.
22449
+ * @throws {RequiredError}
22450
+ */
22451
+ previewContactsMatchingConditionsV1(profileUuid, reachV1ContactsSegmentsProfileFilterContactsRequest, options) {
22452
+ return __awaiter(this, void 0, void 0, function* () {
22453
+ var _a, _b;
22454
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.previewContactsMatchingConditionsV1(profileUuid, reachV1ContactsSegmentsProfileFilterContactsRequest, options);
22455
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['ReachSegmentsApi.previewContactsMatchingConditionsV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
22456
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
22457
+ });
22458
+ },
20643
22459
  /**
20644
22460
  * Rename a segment and/or replace the conditions that define it. `name` is always required. Omit `conditions` to rename without touching the conditions; supply them and they replace the existing set entirely rather than being merged into it. Contacts are never modified, but which of them match the segment can change immediately.
20645
22461
  * @summary Update a profile segment
@@ -20771,6 +22587,16 @@ export const ReachSegmentsApiFactory = function (configuration, basePath, axios)
20771
22587
  listSegmentContactsV1(segmentUuid, page, perPage, options) {
20772
22588
  return localVarFp.listSegmentContactsV1(segmentUuid, page, perPage, options).then((request) => request(axios, basePath));
20773
22589
  },
22590
+ /**
22591
+ * List every attribute a segment condition can filter on, with the operators each attribute accepts, the value format they expect and, where the value is constrained, the allowed values. The list is profile specific: it includes the profile\'s custom contact fields, its tags and its 20 most recently published campaigns, so the valid attributes cannot be hardcoded. Read it before creating or updating a segment to discover the valid `attribute`, `operator` and `value` combinations.
22592
+ * @summary List segment filter attributes
22593
+ * @param {string} profileUuid Profile uuid parameter
22594
+ * @param {*} [options] Override http request option.
22595
+ * @throws {RequiredError}
22596
+ */
22597
+ listSegmentFilterAttributesV1(profileUuid, options) {
22598
+ return localVarFp.listSegmentFilterAttributesV1(profileUuid, options).then((request) => request(axios, basePath));
22599
+ },
20774
22600
  /**
20775
22601
  * Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list the segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
20776
22602
  * @summary List segments
@@ -20781,6 +22607,17 @@ export const ReachSegmentsApiFactory = function (configuration, basePath, axios)
20781
22607
  listSegmentsV1(options) {
20782
22608
  return localVarFp.listSegmentsV1(options).then((request) => request(axios, basePath));
20783
22609
  },
22610
+ /**
22611
+ * Preview the contacts matching a set of conditions without saving a segment. The body is the same set of conditions accepted when creating or updating a segment, so this is how to check who a filter reaches, and how many, before persisting it. Nothing is stored and no contact is modified. Call the segment filter attributes endpoint first to discover the valid `attribute`, `operator` and `value` combinations.
22612
+ * @summary Preview contacts matching conditions
22613
+ * @param {string} profileUuid Profile uuid parameter
22614
+ * @param {ReachV1ContactsSegmentsProfileFilterContactsRequest} reachV1ContactsSegmentsProfileFilterContactsRequest
22615
+ * @param {*} [options] Override http request option.
22616
+ * @throws {RequiredError}
22617
+ */
22618
+ previewContactsMatchingConditionsV1(profileUuid, reachV1ContactsSegmentsProfileFilterContactsRequest, options) {
22619
+ return localVarFp.previewContactsMatchingConditionsV1(profileUuid, reachV1ContactsSegmentsProfileFilterContactsRequest, options).then((request) => request(axios, basePath));
22620
+ },
20784
22621
  /**
20785
22622
  * Rename a segment and/or replace the conditions that define it. `name` is always required. Omit `conditions` to rename without touching the conditions; supply them and they replace the existing set entirely rather than being merged into it. Contacts are never modified, but which of them match the segment can change immediately.
20786
22623
  * @summary Update a profile segment
@@ -20916,6 +22753,17 @@ export class ReachSegmentsApi extends BaseAPI {
20916
22753
  listSegmentContactsV1(segmentUuid, page, perPage, options) {
20917
22754
  return ReachSegmentsApiFp(this.configuration).listSegmentContactsV1(segmentUuid, page, perPage, options).then((request) => request(this.axios, this.basePath));
20918
22755
  }
22756
+ /**
22757
+ * List every attribute a segment condition can filter on, with the operators each attribute accepts, the value format they expect and, where the value is constrained, the allowed values. The list is profile specific: it includes the profile\'s custom contact fields, its tags and its 20 most recently published campaigns, so the valid attributes cannot be hardcoded. Read it before creating or updating a segment to discover the valid `attribute`, `operator` and `value` combinations.
22758
+ * @summary List segment filter attributes
22759
+ * @param {string} profileUuid Profile uuid parameter
22760
+ * @param {*} [options] Override http request option.
22761
+ * @throws {RequiredError}
22762
+ * @memberof ReachSegmentsApi
22763
+ */
22764
+ listSegmentFilterAttributesV1(profileUuid, options) {
22765
+ return ReachSegmentsApiFp(this.configuration).listSegmentFilterAttributesV1(profileUuid, options).then((request) => request(this.axios, this.basePath));
22766
+ }
20919
22767
  /**
20920
22768
  * Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts. **Deprecated.** This endpoint cannot target a profile, so it always falls back to the client\'s default profile and cannot list the segments of any other profile. Use `GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments` instead.
20921
22769
  * @summary List segments
@@ -20927,6 +22775,18 @@ export class ReachSegmentsApi extends BaseAPI {
20927
22775
  listSegmentsV1(options) {
20928
22776
  return ReachSegmentsApiFp(this.configuration).listSegmentsV1(options).then((request) => request(this.axios, this.basePath));
20929
22777
  }
22778
+ /**
22779
+ * Preview the contacts matching a set of conditions without saving a segment. The body is the same set of conditions accepted when creating or updating a segment, so this is how to check who a filter reaches, and how many, before persisting it. Nothing is stored and no contact is modified. Call the segment filter attributes endpoint first to discover the valid `attribute`, `operator` and `value` combinations.
22780
+ * @summary Preview contacts matching conditions
22781
+ * @param {string} profileUuid Profile uuid parameter
22782
+ * @param {ReachV1ContactsSegmentsProfileFilterContactsRequest} reachV1ContactsSegmentsProfileFilterContactsRequest
22783
+ * @param {*} [options] Override http request option.
22784
+ * @throws {RequiredError}
22785
+ * @memberof ReachSegmentsApi
22786
+ */
22787
+ previewContactsMatchingConditionsV1(profileUuid, reachV1ContactsSegmentsProfileFilterContactsRequest, options) {
22788
+ return ReachSegmentsApiFp(this.configuration).previewContactsMatchingConditionsV1(profileUuid, reachV1ContactsSegmentsProfileFilterContactsRequest, options).then((request) => request(this.axios, this.basePath));
22789
+ }
20930
22790
  /**
20931
22791
  * Rename a segment and/or replace the conditions that define it. `name` is always required. Omit `conditions` to rename without touching the conditions; supply them and they replace the existing set entirely rather than being merged into it. Contacts are never modified, but which of them match the segment can change immediately.
20932
22792
  * @summary Update a profile segment