@wix/auto_sdk_ecom_subscription-contracts 1.0.143 → 1.0.145

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.
@@ -1,16 +1,24 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { SubscriptionContract, SubscriptionContractCreatedEnvelope, SubscriptionContractDeletedEnvelope, SubscriptionContractUpdatedEnvelope, SubscriptionContractsQueryBuilder, SubscriptionContractQuery, typedQuerySubscriptionContracts } from './index.typings.js';
3
- export { AccountInfo, AccountInfoMetadata, ActionEvent, ActionInitiator, ActionInitiatorWithLiterals, ActivityAuthor, ActivityAuthorValueOneOf, ActivityType, ActivityTypeWithLiterals, AdditionalFee, AdditionalFeeDelta, AdditionalFeeDeltaDeltaDetailsOneOf, AdditionalFeeSource, AdditionalFeeSourceWithLiterals, Address, AddressLocation, AddressWithContact, AdjustmentType, AdjustmentTypeWithLiterals, ApplicationError, AppliedDiscount, AppliedDiscountDelta, AppliedDiscountDeltaDeltaDetailsOneOf, AppliedDiscountDiscountSourceOneOf, BaseEventMetadata, BillingAdjustment, BillingAdjustmentPriceSummary, BillingSettings, BulkActionMetadata, BulkCreateSubscriptionContractsRequest, BulkCreateSubscriptionContractsResponse, BulkSubscriptionContractResult, BulkUpdateSubscriptionContractsRequest, BulkUpdateSubscriptionContractsResponse, BuyerInfo, BuyerInfoIdOneOf, CatalogReference, CatalogReferenceOptionsBeforeChange, ChangeType, ChangeTypeWithLiterals, ChangesAppliedActivity, ChangesAppliedActivityTargetOneOf, ChannelInfo, ChannelType, ChannelTypeWithLiterals, ChargeType, ChargeTypeWithLiterals, Color, CommitSubscriptionContractChangesRequest, CommitSubscriptionContractChangesResponse, CommonQueryWithEntityContext, ContractChange, ContractChangeValueOneOf, ContractTarget, Coupon, CreateSubscriptionContractRequest, CreateSubscriptionContractResponse, CurrencyConversionDetails, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomField, CyclePriceOverride, DecimalQuantity, DecimalQuantityUnitOneOf, DeliveryLogistics, DeliveryLogisticsAddressOneOf, DeliveryProfileIdBeforeChange, DeliveryTimeSlot, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, DescriptionLinesBeforeChange, DigitalFile, DigitalFileBeforeChange, Dimensions, DimensionsUnit, DimensionsUnitWithLiterals, DiscountReason, DiscountReasonWithLiterals, DiscountRule, DiscountRuleName, DiscountType, DiscountTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, FocalPoint, FreeTrialPeriod, FulfillerIdBeforeChange, FullAddressContactDetails, GetSubscriptionContractRequest, GetSubscriptionContractResponse, IdentificationData, IdentificationDataIdOneOf, ImageBeforeChange, InventoryAppIdBeforeChange, ItemChangedDetails, ItemCombination, ItemCombinationLineItem, ItemMetadata, ItemModifier, ItemTaxFullDetails, ItemType, ItemTypeBeforeChange, ItemTypeItemTypeDataOneOf, ItemTypePreset, ItemTypePresetWithLiterals, JurisdictionType, JurisdictionTypeWithLiterals, LineItemChanges, LineItemCyclePriceOverrides, LineItemDelta, LineItemDeltaDeltaDetailsOneOf, LineItemDiscount, LineItemQuantityChange, LineItemQuantityChangeType, LineItemQuantityChangeTypeWithLiterals, LineItemTaxBreakdown, LineItemTaxInfo, Location, LocationAndQuantity, ManagedAdditionalFee, ManagedDiscount, ManagedLineItem, MaskedSubscriptionContract, MeasurementUnit, MeasurementUnitWithLiterals, MerchantDiscount, MerchantDiscountMerchantDiscountReasonOneOf, MessageEnvelope, ModifierGroup, ModifierGroupsBeforeChange, OrderLineItem, OrderTaxBreakdown, OrderTaxInfo, PaymentOptionType, PaymentOptionTypeWithLiterals, PhysicalProperties, PhysicalPropertiesBeforeChange, PickupAddress, PickupDetails, PickupMethod, PickupMethodWithLiterals, PlainTextValue, PlatformFee, PlatformFeeSummary, Price, PriceDescription, PriceDescriptionBeforeChange, PriceSummary, PriceUndeterminedBeforeChange, ProductName, ProductNameBeforeChange, ProductPeriodAlignment, ProductPeriodAlignmentWithLiterals, QuerySubscriptionContractsRequest, QuerySubscriptionContractsResponse, RestockLocation, RestoreInfo, RootCatalogItemIdBeforeChange, ServiceProperties, ShippingGroupIdBeforeChange, ShippingInformation, ShippingPrice, ShippingRegion, SortOrder, SortOrderWithLiterals, Sorting, SpecificItemsCouponBehavior, SpecificItemsCouponBehaviorWithLiterals, StreetAddress, SubscriptionCommitSettings, SubscriptionContractActivity, SubscriptionContractActivityContentOneOf, SubscriptionContractActivityTargetOneOf, SubscriptionContractCanceled, SubscriptionContractChangesCommitted, SubscriptionContractChargeUpcoming, SubscriptionContractDiffs, SubscriptionContractExpired, SubscriptionContractQuerySpec, SubscriptionContractSettings, SubscriptionContractsQueryResult, SubscriptionDescription, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionInfo, SubscriptionSettings, SubscriptionSettingsProductPeriodAlignment, SubscriptionSettingsProductPeriodAlignmentWithLiterals, SubscriptionTitle, TaxInfoBeforeChange, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, TotalPriceChange, TranslatableString, TranslatedValue, UpdateSubscriptionContractRequest, UpdateSubscriptionContractResponse, V1BillingSettings, V1CyclePriceOverride, V1FreeTrialPeriod, V1SubscriptionDescription, V1SubscriptionSettings, V1SubscriptionTitle, V2SubscriptionFrequency, V2SubscriptionFrequencyWithLiterals, VatId, VatType, VatTypeWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals, utils } from './index.typings.js';
2
+ import { SubscriptionContract, GetSubscriptionContractApplicationErrors, SubscriptionContractCommittedEnvelope, SubscriptionContractCreatedEnvelope, SubscriptionContractDeletedEnvelope, SubscriptionContractUpdatedEnvelope, SubscriptionContractsQueryBuilder, SubscriptionContractQuery, typedQuerySubscriptionContracts } from './index.typings.js';
3
+ export { AccountInfo, AccountInfoMetadata, ActionEvent, ActionInitiator, ActionInitiatorWithLiterals, ActivityAuthor, ActivityAuthorValueOneOf, ActivityType, ActivityTypeWithLiterals, AdditionalFee, AdditionalFeeDelta, AdditionalFeeDeltaDeltaDetailsOneOf, AdditionalFeeSource, AdditionalFeeSourceWithLiterals, AdditionalFeeSummary, Address, AddressLocation, AddressWithContact, AdjustmentType, AdjustmentTypeWithLiterals, ApplicationError, AppliedDiscount, AppliedDiscountDelta, AppliedDiscountDeltaDeltaDetailsOneOf, AppliedDiscountDiscountSourceOneOf, BaseEventMetadata, BillingAdjustment, BillingAdjustmentPriceSummary, BillingSettings, BulkActionMetadata, BulkCreateSubscriptionContractsRequest, BulkCreateSubscriptionContractsResponse, BulkSubscriptionContractResult, BulkUpdateSubscriptionContractsRequest, BulkUpdateSubscriptionContractsResponse, BuyerInfo, BuyerInfoIdOneOf, CatalogReference, CatalogReferenceOptionsBeforeChange, ChangeType, ChangeTypeWithLiterals, ChangesAppliedActivity, ChangesAppliedActivityTargetOneOf, ChannelInfo, ChannelType, ChannelTypeWithLiterals, ChargeType, ChargeTypeWithLiterals, Color, CommitSubscriptionContractChangesRequest, CommitSubscriptionContractChangesResponse, CommonQueryWithEntityContext, ContractChange, ContractChangeChangeDetailsOneOf, ContractChangeType, ContractChangeTypeWithLiterals, ContractTarget, Coupon, CreateSubscriptionContractRequest, CreateSubscriptionContractResponse, CurrencyConversionDetails, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomField, CyclePriceOverride, DecimalQuantity, DecimalQuantityUnitOneOf, DeliveryLogistics, DeliveryLogisticsAddressOneOf, DeliveryProfileIdBeforeChange, DeliveryTimeSlot, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineTypeWithLiterals, DescriptionLineValueOneOf, DescriptionLinesBeforeChange, DigitalFile, DigitalFileBeforeChange, Dimensions, DimensionsUnit, DimensionsUnitWithLiterals, DiscountReason, DiscountReasonWithLiterals, DiscountRule, DiscountRuleName, DiscountSummary, DiscountType, DiscountTypeWithLiterals, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, FocalPoint, FreeTrialPeriod, FulfillerIdBeforeChange, FullAddressContactDetails, GetSubscriptionContractRequest, GetSubscriptionContractResponse, IdentificationData, IdentificationDataIdOneOf, ImageBeforeChange, InventoryAppIdBeforeChange, ItemChangedDetails, ItemCombination, ItemCombinationLineItem, ItemMetadata, ItemModifier, ItemTaxFullDetails, ItemType, ItemTypeBeforeChange, ItemTypeItemTypeDataOneOf, ItemTypePreset, ItemTypePresetWithLiterals, JurisdictionType, JurisdictionTypeWithLiterals, LineItemChanges, LineItemCyclePriceOverrides, LineItemDelta, LineItemDeltaDeltaDetailsOneOf, LineItemDiscount, LineItemQuantityChange, LineItemQuantityChangeType, LineItemQuantityChangeTypeWithLiterals, LineItemSummary, LineItemTaxBreakdown, LineItemTaxInfo, Location, LocationAndQuantity, MaskedSubscriptionContract, MeasurementUnit, MeasurementUnitWithLiterals, MerchantDiscount, MerchantDiscountMerchantDiscountReasonOneOf, MessageEnvelope, ModifierGroup, ModifierGroupsBeforeChange, OrderLineItem, OrderTaxBreakdown, OrderTaxInfo, PaymentOptionType, PaymentOptionTypeWithLiterals, PhysicalProperties, PhysicalPropertiesBeforeChange, PickupAddress, PickupDetails, PickupMethod, PickupMethodWithLiterals, PlainTextValue, PlatformFee, PlatformFeeSummary, Price, PriceDescription, PriceDescriptionBeforeChange, PriceSummary, PriceUndeterminedBeforeChange, ProductName, ProductNameBeforeChange, ProductPeriodAlignment, ProductPeriodAlignmentWithLiterals, QuerySubscriptionContractsRequest, QuerySubscriptionContractsResponse, RestockLocation, RestoreInfo, RootCatalogItemIdBeforeChange, ServiceProperties, ShippingGroupIdBeforeChange, ShippingInformation, ShippingPrice, ShippingRegion, SortOrder, SortOrderWithLiterals, Sorting, SpecificItemsCouponBehavior, SpecificItemsCouponBehaviorWithLiterals, StreetAddress, SubscriptionCommitSettings, SubscriptionContractActivity, SubscriptionContractActivityContentOneOf, SubscriptionContractActivityTargetOneOf, SubscriptionContractCanceled, SubscriptionContractChangesCommitted, SubscriptionContractChargeUpcoming, SubscriptionContractDiffs, SubscriptionContractExpired, SubscriptionContractQuerySpec, SubscriptionContractSettings, SubscriptionContractsQueryResult, SubscriptionDescription, SubscriptionFrequency, SubscriptionFrequencyWithLiterals, SubscriptionInfo, SubscriptionSettings, SubscriptionSettingsProductPeriodAlignment, SubscriptionSettingsProductPeriodAlignmentWithLiterals, SubscriptionTitle, TaxInfoBeforeChange, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, TaxableAddressTypeWithLiterals, TotalPriceChange, TranslatableString, TranslatedValue, UpdateSubscriptionContractRequest, UpdateSubscriptionContractResponse, V1BillingSettings, V1CyclePriceOverride, V1FreeTrialPeriod, V1SubscriptionDescription, V1SubscriptionSettings, V1SubscriptionTitle, V2SubscriptionFrequency, V2SubscriptionFrequencyWithLiterals, VatId, VatType, VatTypeWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, WeightUnit, WeightUnitWithLiterals, utils } from './index.typings.js';
4
4
 
5
5
  declare function getSubscriptionContract$1(httpClient: HttpClient): GetSubscriptionContractSignature;
6
6
  interface GetSubscriptionContractSignature {
7
7
  /**
8
- * Retrieves a SubscriptionContract.
9
- * @param - ID of the SubscriptionContract to retrieve.
10
- * @returns The requested SubscriptionContract.
8
+ * Retrieves a subscription contract.
9
+ *
10
+ *
11
+ * To retrieve the subscription contract an order was created from, specify the order's `lineItems.subscriptionInfo.id` as `subscriptionContractId`. You can retrieve the order with [Get Order](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/get-order).
12
+ *
13
+ * To retrieve the orders created from a subscription contract, call [Search Orders](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/orders/orders/search-orders) with a filter on `lineItems.subscriptionInfo.id`.
14
+ * @param - ID of the subscription contract to retrieve.
15
+ * @returns Retrieved subscription contract.
11
16
  */
12
- (subscriptionContractId: string): Promise<NonNullablePaths<SubscriptionContract, `subscriptionSettings.frequency` | `subscriptionSettings.autoRenewal` | `subscriptionSettings.enableCustomerCancellation` | `subscriptionSettings.freeTrialPeriod.frequency` | `subscriptionSettings.freeTrialPeriod.interval` | `lineItems` | `lineItems.${number}._id` | `lineItems.${number}.productName.original` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.quantity` | `lineItems.${number}.totalDiscount.amount` | `lineItems.${number}.totalDiscount.formattedAmount` | `lineItems.${number}.physicalProperties.shippable` | `lineItems.${number}.itemType.preset` | `lineItems.${number}.itemType.custom` | `lineItems.${number}.paymentOption` | `lineItems.${number}.taxDetails.taxRate` | `lineItems.${number}.taxInfo.taxIncludedInPrice` | `lineItems.${number}.digitalFile.fileId` | `lineItems.${number}.subscriptionInfo.cycleNumber` | `lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.enableCustomerCancellation` | `lineItems.${number}.priceDescription.original` | `lineItems.${number}.taxableAddress.addressType` | `lineItems.${number}.priceUndetermined` | `lineItems.${number}.fixedQuantity` | `lineItems.${number}.decimalQuantity.measurementUnit` | `lineItems.${number}.decimalQuantity.otherUnit` | `lineItems.${number}.decimalQuantity.value` | `lineItems.${number}.decimalQuantity.description.original` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `weightUnit` | `taxIncludedInPrices` | `platformFeeSummary.fees` | `platformFeeSummary.fees.${number}.lineItemId` | `platformFeeSummary.fees.${number}.chargeType` | `platformFeeSummary.fees.${number}.percentageRate` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `shippingInfo.title` | `shippingInfo.logistics.pickupDetails.pickupMethod` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.merchantDiscount.discountReason` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `channelInfo.type` | `customFields` | `customFields.${number}.title` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}._id` | `additionalFees.${number}.source` | `activities` | `activities.${number}.changesApplied.draftSubscriptionContractId` | `activities.${number}._id` | `activities.${number}.author.userId` | `activities.${number}.author.appId` | `activities.${number}.activityType`, 4>>;
17
+ (subscriptionContractId: string): Promise<NonNullablePaths<SubscriptionContract, `subscriptionDescription.original` | `subscriptionSettings.frequency` | `subscriptionSettings.autoRenewal` | `subscriptionSettings.enableCustomerCancellation` | `subscriptionSettings.freeTrialPeriod.frequency` | `subscriptionSettings.freeTrialPeriod.interval` | `lineItems` | `lineItems.${number}._id` | `lineItems.${number}.productName.original` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.quantity` | `lineItems.${number}.totalDiscount.amount` | `lineItems.${number}.totalDiscount.formattedAmount` | `lineItems.${number}.physicalProperties.shippable` | `lineItems.${number}.itemType.preset` | `lineItems.${number}.itemType.custom` | `lineItems.${number}.paymentOption` | `lineItems.${number}.taxDetails.taxRate` | `lineItems.${number}.taxInfo.taxIncludedInPrice` | `lineItems.${number}.digitalFile.fileId` | `lineItems.${number}.subscriptionInfo.cycleNumber` | `lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `lineItems.${number}.subscriptionInfo.subscriptionSettings.enableCustomerCancellation` | `lineItems.${number}.priceDescription.original` | `lineItems.${number}.taxableAddress.addressType` | `lineItems.${number}.priceUndetermined` | `lineItems.${number}.fixedQuantity` | `lineItems.${number}.decimalQuantity.measurementUnit` | `lineItems.${number}.decimalQuantity.otherUnit` | `lineItems.${number}.decimalQuantity.value` | `lineItems.${number}.decimalQuantity.description.original` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `weightUnit` | `taxIncludedInPrices` | `platformFeeSummary.fees` | `platformFeeSummary.fees.${number}.lineItemId` | `platformFeeSummary.fees.${number}.chargeType` | `platformFeeSummary.fees.${number}.percentageRate` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `shippingInfo.title` | `shippingInfo.logistics.pickupDetails.pickupMethod` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.merchantDiscount.discountReason` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `channelInfo.type` | `customFields` | `customFields.${number}.title` | `subscriptionTitle.original` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}._id` | `additionalFees.${number}.source`, 4> & {
18
+ __applicationErrorsType?: GetSubscriptionContractApplicationErrors;
19
+ }>;
13
20
  }
21
+ declare const onSubscriptionContractCommitted$1: EventDefinition<SubscriptionContractCommittedEnvelope, "wix.ecom.subscription_contracts.v1.subscription_contract_committed">;
14
22
  declare const onSubscriptionContractCreated$1: EventDefinition<SubscriptionContractCreatedEnvelope, "wix.ecom.subscription_contracts.v1.subscription_contract_created">;
15
23
  declare const onSubscriptionContractDeleted$1: EventDefinition<SubscriptionContractDeletedEnvelope, "wix.ecom.subscription_contracts.v1.subscription_contract_deleted">;
16
24
  declare const onSubscriptionContractUpdated$1: EventDefinition<SubscriptionContractUpdatedEnvelope, "wix.ecom.subscription_contracts.v1.subscription_contract_updated">;
@@ -21,11 +29,24 @@ declare function customQuerySubscriptionContracts(httpClient: HttpClient): {
21
29
  };
22
30
  declare const getSubscriptionContract: MaybeContext<BuildRESTFunction<typeof getSubscriptionContract$1> & typeof getSubscriptionContract$1>;
23
31
  declare const querySubscriptionContracts: MaybeContext<BuildRESTFunction<typeof customQuerySubscriptionContracts> & typeof customQuerySubscriptionContracts>;
24
- /** */
32
+ /**
33
+ * Triggered when changes from a draft subscription contract are committed to a subscription contract.
34
+ * The event holds the updated contract and every change that was applied.
35
+ */
36
+ declare const onSubscriptionContractCommitted: BuildEventDefinition<typeof onSubscriptionContractCommitted$1> & typeof onSubscriptionContractCommitted$1;
37
+ /**
38
+ * Triggered when a subscription contract is created. A subscription contract is created when a buyer checks out with a subscription item.
39
+ */
25
40
  declare const onSubscriptionContractCreated: BuildEventDefinition<typeof onSubscriptionContractCreated$1> & typeof onSubscriptionContractCreated$1;
26
- /** */
41
+ /**
42
+ * Triggered when a subscription contract is deleted. A subscription contract is deleted when the buyer's personal data is erased. It isn't deleted when the subscription ends.
43
+ */
27
44
  declare const onSubscriptionContractDeleted: BuildEventDefinition<typeof onSubscriptionContractDeleted$1> & typeof onSubscriptionContractDeleted$1;
28
- /** */
45
+ /**
46
+ * Triggered when a subscription contract is updated.
47
+ * Fires when changes from a draft subscription contract are committed, and when the contract's `priceSummary` is set to the billed totals at the start of the first billing cycle.
48
+ * Also fires right after a subscription contract is created, while billing for the subscription is set up. These updates can leave every documented field unchanged.
49
+ */
29
50
  declare const onSubscriptionContractUpdated: BuildEventDefinition<typeof onSubscriptionContractUpdated$1> & typeof onSubscriptionContractUpdated$1;
30
51
 
31
- export { SubscriptionContract, SubscriptionContractCreatedEnvelope, SubscriptionContractDeletedEnvelope, SubscriptionContractQuery, SubscriptionContractUpdatedEnvelope, SubscriptionContractsQueryBuilder, getSubscriptionContract, onSubscriptionContractCreated, onSubscriptionContractDeleted, onSubscriptionContractUpdated, querySubscriptionContracts };
52
+ export { GetSubscriptionContractApplicationErrors, SubscriptionContract, SubscriptionContractCommittedEnvelope, SubscriptionContractCreatedEnvelope, SubscriptionContractDeletedEnvelope, SubscriptionContractQuery, SubscriptionContractUpdatedEnvelope, SubscriptionContractsQueryBuilder, getSubscriptionContract, onSubscriptionContractCommitted, onSubscriptionContractCreated, onSubscriptionContractDeleted, onSubscriptionContractUpdated, querySubscriptionContracts };
@@ -27,6 +27,7 @@ __export(index_exports, {
27
27
  ChangeType: () => ChangeType,
28
28
  ChannelType: () => ChannelType,
29
29
  ChargeType: () => ChargeType,
30
+ ContractChangeType: () => ContractChangeType,
30
31
  DescriptionLineType: () => DescriptionLineType,
31
32
  DimensionsUnit: () => DimensionsUnit,
32
33
  DiscountReason: () => DiscountReason,
@@ -48,6 +49,7 @@ __export(index_exports, {
48
49
  WebhookIdentityType: () => WebhookIdentityType,
49
50
  WeightUnit: () => WeightUnit,
50
51
  getSubscriptionContract: () => getSubscriptionContract4,
52
+ onSubscriptionContractCommitted: () => onSubscriptionContractCommitted2,
51
53
  onSubscriptionContractCreated: () => onSubscriptionContractCreated2,
52
54
  onSubscriptionContractDeleted: () => onSubscriptionContractDeleted2,
53
55
  onSubscriptionContractUpdated: () => onSubscriptionContractUpdated2,
@@ -476,10 +478,23 @@ var SpecificItemsCouponBehavior = /* @__PURE__ */ ((SpecificItemsCouponBehavior2
476
478
  return SpecificItemsCouponBehavior2;
477
479
  })(SpecificItemsCouponBehavior || {});
478
480
  var LineItemQuantityChangeType = /* @__PURE__ */ ((LineItemQuantityChangeType2) => {
481
+ LineItemQuantityChangeType2["UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE"] = "UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE";
479
482
  LineItemQuantityChangeType2["QUANTITY_INCREASED"] = "QUANTITY_INCREASED";
480
483
  LineItemQuantityChangeType2["QUANTITY_DECREASED"] = "QUANTITY_DECREASED";
481
484
  return LineItemQuantityChangeType2;
482
485
  })(LineItemQuantityChangeType || {});
486
+ var ContractChangeType = /* @__PURE__ */ ((ContractChangeType2) => {
487
+ ContractChangeType2["UNKNOWN_CONTRACT_CHANGE_TYPE"] = "UNKNOWN_CONTRACT_CHANGE_TYPE";
488
+ ContractChangeType2["LINE_ITEM_CHANGED"] = "LINE_ITEM_CHANGED";
489
+ ContractChangeType2["LINE_ITEM_ADDED"] = "LINE_ITEM_ADDED";
490
+ ContractChangeType2["LINE_ITEM_REMOVED"] = "LINE_ITEM_REMOVED";
491
+ ContractChangeType2["DISCOUNT_ADDED"] = "DISCOUNT_ADDED";
492
+ ContractChangeType2["DISCOUNT_REMOVED"] = "DISCOUNT_REMOVED";
493
+ ContractChangeType2["ADDITIONAL_FEE_ADDED"] = "ADDITIONAL_FEE_ADDED";
494
+ ContractChangeType2["ADDITIONAL_FEE_REMOVED"] = "ADDITIONAL_FEE_REMOVED";
495
+ ContractChangeType2["TOTAL_PRICE_CHANGED"] = "TOTAL_PRICE_CHANGED";
496
+ return ContractChangeType2;
497
+ })(ContractChangeType || {});
483
498
  var ActivityType = /* @__PURE__ */ ((ActivityType2) => {
484
499
  ActivityType2["UNKNOWN_ACTIVITY_TYPE"] = "UNKNOWN_ACTIVITY_TYPE";
485
500
  ActivityType2["CHANGES_APPLIED"] = "CHANGES_APPLIED";
@@ -494,6 +509,7 @@ var ActionInitiator = /* @__PURE__ */ ((ActionInitiator2) => {
494
509
  return ActionInitiator2;
495
510
  })(ActionInitiator || {});
496
511
  var ChangeType = /* @__PURE__ */ ((ChangeType2) => {
512
+ ChangeType2["UNKNOWN_CHANGE_TYPE"] = "UNKNOWN_CHANGE_TYPE";
497
513
  ChangeType2["ADDED"] = "ADDED";
498
514
  ChangeType2["CHANGED"] = "CHANGED";
499
515
  ChangeType2["REMOVED"] = "REMOVED";
@@ -648,6 +664,65 @@ var utils = {
648
664
 
649
665
  // src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.ts
650
666
  var TRANSFORM_PATHS_03 = [
667
+ { path: "data.commitDate" },
668
+ { path: "data.subscriptionContract.createdDate" },
669
+ { path: "data.subscriptionContract.updatedDate" },
670
+ { path: "data.subscriptionContract.subscriptionSettings.startDate" },
671
+ { path: "data.subscriptionContract.lineItems.digitalFile.expirationDate" },
672
+ {
673
+ path: "data.subscriptionContract.lineItems.subscriptionInfo.subscriptionSettings.startDate"
674
+ },
675
+ {
676
+ path: "data.subscriptionContract.lineItems.serviceProperties.scheduledDate"
677
+ },
678
+ { path: "data.subscriptionContract.lineItems.serviceProperties.endDate" },
679
+ { path: "data.subscriptionContract.shippingInfo.logistics.deliverByDate" },
680
+ {
681
+ path: "data.subscriptionContract.shippingInfo.logistics.deliveryTimeSlot.from"
682
+ },
683
+ {
684
+ path: "data.subscriptionContract.shippingInfo.logistics.deliveryTimeSlot.to"
685
+ },
686
+ { path: "data.subscriptionContract.activities.createdDate" },
687
+ {
688
+ path: "data.changes.lineItems.changed.digitalFileBeforeChange.digitalFile.expirationDate"
689
+ },
690
+ { path: "data.changes.lineItems.lineItem.digitalFile.expirationDate" },
691
+ {
692
+ path: "data.changes.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
693
+ },
694
+ { path: "data.changes.lineItems.lineItem.serviceProperties.scheduledDate" },
695
+ { path: "data.changes.lineItems.lineItem.serviceProperties.endDate" },
696
+ { path: "data.changes.shippingInfo.logistics.deliverByDate" },
697
+ { path: "data.changes.shippingInfo.logistics.deliveryTimeSlot.from" },
698
+ { path: "data.changes.shippingInfo.logistics.deliveryTimeSlot.to" },
699
+ { path: "metadata.eventTime" }
700
+ ];
701
+ var TRANSFORM_PATHS_13 = [
702
+ { path: "data.subscriptionContract.lineItems.image" },
703
+ { path: "data.changes.lineItems.changed.imageBeforeChange.image" },
704
+ { path: "data.changes.lineItems.lineItem.image" }
705
+ ];
706
+ var TRANSFORM_PATHS_23 = [
707
+ { path: "data.subscriptionContract.lineItems.physicalProperties.weight" },
708
+ {
709
+ path: "data.changes.lineItems.changed.physicalPropertiesBeforeChange.physicalProperties.weight"
710
+ },
711
+ { path: "data.changes.lineItems.lineItem.physicalProperties.weight" }
712
+ ];
713
+ var TRANSFORM_PATHS_33 = [
714
+ { path: "data.subscriptionContract.billingInfo.address" },
715
+ {
716
+ path: "data.subscriptionContract.shippingInfo.logistics.shippingDestination.address"
717
+ },
718
+ {
719
+ path: "data.subscriptionContract.shippingInfo.logistics.pickupDetails.address"
720
+ },
721
+ { path: "data.subscriptionContract.recipientInfo.address" },
722
+ { path: "data.changes.shippingInfo.logistics.shippingDestination.address" },
723
+ { path: "data.changes.shippingInfo.logistics.pickupDetails.address" }
724
+ ];
725
+ var TRANSFORM_PATHS_4 = [
651
726
  { path: "entity.createdDate" },
652
727
  { path: "entity.updatedDate" },
653
728
  { path: "entity.subscriptionSettings.startDate" },
@@ -661,17 +736,17 @@ var TRANSFORM_PATHS_03 = [
661
736
  { path: "entity.activities.createdDate" },
662
737
  { path: "metadata.eventTime" }
663
738
  ];
664
- var TRANSFORM_PATHS_13 = [{ path: "entity.lineItems.image" }];
665
- var TRANSFORM_PATHS_23 = [
739
+ var TRANSFORM_PATHS_5 = [{ path: "entity.lineItems.image" }];
740
+ var TRANSFORM_PATHS_6 = [
666
741
  { path: "entity.lineItems.physicalProperties.weight" }
667
742
  ];
668
- var TRANSFORM_PATHS_33 = [
743
+ var TRANSFORM_PATHS_7 = [
669
744
  { path: "entity.billingInfo.address" },
670
745
  { path: "entity.shippingInfo.logistics.shippingDestination.address" },
671
746
  { path: "entity.shippingInfo.logistics.pickupDetails.address" },
672
747
  { path: "entity.recipientInfo.address" }
673
748
  ];
674
- var TRANSFORM_PATHS_4 = [
749
+ var TRANSFORM_PATHS_8 = [
675
750
  { path: "undefined.createdDate" },
676
751
  { path: "undefined.updatedDate" },
677
752
  { path: "undefined.subscriptionSettings.startDate" },
@@ -687,17 +762,17 @@ var TRANSFORM_PATHS_4 = [
687
762
  { path: "undefined.activities.createdDate" },
688
763
  { path: "metadata.eventTime" }
689
764
  ];
690
- var TRANSFORM_PATHS_5 = [{ path: "undefined.lineItems.image" }];
691
- var TRANSFORM_PATHS_6 = [
765
+ var TRANSFORM_PATHS_9 = [{ path: "undefined.lineItems.image" }];
766
+ var TRANSFORM_PATHS_10 = [
692
767
  { path: "undefined.lineItems.physicalProperties.weight" }
693
768
  ];
694
- var TRANSFORM_PATHS_7 = [
769
+ var TRANSFORM_PATHS_11 = [
695
770
  { path: "undefined.billingInfo.address" },
696
771
  { path: "undefined.shippingInfo.logistics.shippingDestination.address" },
697
772
  { path: "undefined.shippingInfo.logistics.pickupDetails.address" },
698
773
  { path: "undefined.recipientInfo.address" }
699
774
  ];
700
- var TRANSFORM_PATHS_8 = [
775
+ var TRANSFORM_PATHS_122 = [
701
776
  { path: "entity.createdDate" },
702
777
  { path: "entity.updatedDate" },
703
778
  { path: "entity.subscriptionSettings.startDate" },
@@ -724,15 +799,15 @@ var TRANSFORM_PATHS_8 = [
724
799
  { path: "modifiedFields.shippingInfo.logistics.deliveryTimeSlot.to" },
725
800
  { path: "modifiedFields.activities.createdDate" }
726
801
  ];
727
- var TRANSFORM_PATHS_9 = [
802
+ var TRANSFORM_PATHS_132 = [
728
803
  { path: "entity.lineItems.image" },
729
804
  { path: "modifiedFields.lineItems.image" }
730
805
  ];
731
- var TRANSFORM_PATHS_10 = [
806
+ var TRANSFORM_PATHS_14 = [
732
807
  { path: "entity.lineItems.physicalProperties.weight" },
733
808
  { path: "modifiedFields.lineItems.physicalProperties.weight" }
734
809
  ];
735
- var TRANSFORM_PATHS_11 = [
810
+ var TRANSFORM_PATHS_15 = [
736
811
  { path: "entity.billingInfo.address" },
737
812
  { path: "entity.shippingInfo.logistics.shippingDestination.address" },
738
813
  { path: "entity.shippingInfo.logistics.pickupDetails.address" },
@@ -762,8 +837,8 @@ function typedQuerySubscriptionContracts2(httpClient) {
762
837
  { httpClient }
763
838
  );
764
839
  }
765
- var onSubscriptionContractCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
766
- "wix.ecom.subscription_contracts.v1.subscription_contract_created",
840
+ var onSubscriptionContractCommitted = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
841
+ "wix.ecom.subscription_contracts.v1.subscription_contract_committed",
767
842
  true,
768
843
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
769
844
  (0, import_transform_paths3.transformPaths)(event, [
@@ -786,8 +861,8 @@ var onSubscriptionContractCreated = /* @__PURE__ */ (0, import_sdk_types.EventDe
786
861
  ])
787
862
  )
788
863
  )();
789
- var onSubscriptionContractDeleted = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
790
- "wix.ecom.subscription_contracts.v1.subscription_contract_deleted",
864
+ var onSubscriptionContractCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
865
+ "wix.ecom.subscription_contracts.v1.subscription_contract_created",
791
866
  true,
792
867
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
793
868
  (0, import_transform_paths3.transformPaths)(event, [
@@ -810,8 +885,8 @@ var onSubscriptionContractDeleted = /* @__PURE__ */ (0, import_sdk_types.EventDe
810
885
  ])
811
886
  )
812
887
  )();
813
- var onSubscriptionContractUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
814
- "wix.ecom.subscription_contracts.v1.subscription_contract_updated",
888
+ var onSubscriptionContractDeleted = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
889
+ "wix.ecom.subscription_contracts.v1.subscription_contract_deleted",
815
890
  true,
816
891
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
817
892
  (0, import_transform_paths3.transformPaths)(event, [
@@ -834,6 +909,30 @@ var onSubscriptionContractUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDe
834
909
  ])
835
910
  )
836
911
  )();
912
+ var onSubscriptionContractUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
913
+ "wix.ecom.subscription_contracts.v1.subscription_contract_updated",
914
+ true,
915
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
916
+ (0, import_transform_paths3.transformPaths)(event, [
917
+ {
918
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
919
+ paths: TRANSFORM_PATHS_122
920
+ },
921
+ {
922
+ transformFn: import_image2.transformRESTImageToSDKImage,
923
+ paths: TRANSFORM_PATHS_132
924
+ },
925
+ {
926
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
927
+ paths: TRANSFORM_PATHS_14
928
+ },
929
+ {
930
+ transformFn: import_address2.transformRESTAddressToSDKAddress,
931
+ paths: TRANSFORM_PATHS_15
932
+ }
933
+ ])
934
+ )
935
+ )();
837
936
 
838
937
  // src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.ts
839
938
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
@@ -852,6 +951,7 @@ function customQuerySubscriptionContracts(httpClient) {
852
951
  }
853
952
  var getSubscriptionContract4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getSubscriptionContract3);
854
953
  var querySubscriptionContracts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQuerySubscriptionContracts);
954
+ var onSubscriptionContractCommitted2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onSubscriptionContractCommitted);
855
955
  var onSubscriptionContractCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
856
956
  onSubscriptionContractCreated
857
957
  );
@@ -870,6 +970,7 @@ var onSubscriptionContractUpdated2 = /* @__PURE__ */ (0, import_event_definition
870
970
  ChangeType,
871
971
  ChannelType,
872
972
  ChargeType,
973
+ ContractChangeType,
873
974
  DescriptionLineType,
874
975
  DimensionsUnit,
875
976
  DiscountReason,
@@ -891,6 +992,7 @@ var onSubscriptionContractUpdated2 = /* @__PURE__ */ (0, import_event_definition
891
992
  WebhookIdentityType,
892
993
  WeightUnit,
893
994
  getSubscriptionContract,
995
+ onSubscriptionContractCommitted,
894
996
  onSubscriptionContractCreated,
895
997
  onSubscriptionContractDeleted,
896
998
  onSubscriptionContractUpdated,