@wix/auto_sdk_ecom_subscription-contracts 1.0.144 → 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";
@@ -649,6 +664,65 @@ var utils = {
649
664
 
650
665
  // src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.ts
651
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 = [
652
726
  { path: "entity.createdDate" },
653
727
  { path: "entity.updatedDate" },
654
728
  { path: "entity.subscriptionSettings.startDate" },
@@ -662,17 +736,17 @@ var TRANSFORM_PATHS_03 = [
662
736
  { path: "entity.activities.createdDate" },
663
737
  { path: "metadata.eventTime" }
664
738
  ];
665
- var TRANSFORM_PATHS_13 = [{ path: "entity.lineItems.image" }];
666
- var TRANSFORM_PATHS_23 = [
739
+ var TRANSFORM_PATHS_5 = [{ path: "entity.lineItems.image" }];
740
+ var TRANSFORM_PATHS_6 = [
667
741
  { path: "entity.lineItems.physicalProperties.weight" }
668
742
  ];
669
- var TRANSFORM_PATHS_33 = [
743
+ var TRANSFORM_PATHS_7 = [
670
744
  { path: "entity.billingInfo.address" },
671
745
  { path: "entity.shippingInfo.logistics.shippingDestination.address" },
672
746
  { path: "entity.shippingInfo.logistics.pickupDetails.address" },
673
747
  { path: "entity.recipientInfo.address" }
674
748
  ];
675
- var TRANSFORM_PATHS_4 = [
749
+ var TRANSFORM_PATHS_8 = [
676
750
  { path: "undefined.createdDate" },
677
751
  { path: "undefined.updatedDate" },
678
752
  { path: "undefined.subscriptionSettings.startDate" },
@@ -688,17 +762,17 @@ var TRANSFORM_PATHS_4 = [
688
762
  { path: "undefined.activities.createdDate" },
689
763
  { path: "metadata.eventTime" }
690
764
  ];
691
- var TRANSFORM_PATHS_5 = [{ path: "undefined.lineItems.image" }];
692
- var TRANSFORM_PATHS_6 = [
765
+ var TRANSFORM_PATHS_9 = [{ path: "undefined.lineItems.image" }];
766
+ var TRANSFORM_PATHS_10 = [
693
767
  { path: "undefined.lineItems.physicalProperties.weight" }
694
768
  ];
695
- var TRANSFORM_PATHS_7 = [
769
+ var TRANSFORM_PATHS_11 = [
696
770
  { path: "undefined.billingInfo.address" },
697
771
  { path: "undefined.shippingInfo.logistics.shippingDestination.address" },
698
772
  { path: "undefined.shippingInfo.logistics.pickupDetails.address" },
699
773
  { path: "undefined.recipientInfo.address" }
700
774
  ];
701
- var TRANSFORM_PATHS_8 = [
775
+ var TRANSFORM_PATHS_122 = [
702
776
  { path: "entity.createdDate" },
703
777
  { path: "entity.updatedDate" },
704
778
  { path: "entity.subscriptionSettings.startDate" },
@@ -725,15 +799,15 @@ var TRANSFORM_PATHS_8 = [
725
799
  { path: "modifiedFields.shippingInfo.logistics.deliveryTimeSlot.to" },
726
800
  { path: "modifiedFields.activities.createdDate" }
727
801
  ];
728
- var TRANSFORM_PATHS_9 = [
802
+ var TRANSFORM_PATHS_132 = [
729
803
  { path: "entity.lineItems.image" },
730
804
  { path: "modifiedFields.lineItems.image" }
731
805
  ];
732
- var TRANSFORM_PATHS_10 = [
806
+ var TRANSFORM_PATHS_14 = [
733
807
  { path: "entity.lineItems.physicalProperties.weight" },
734
808
  { path: "modifiedFields.lineItems.physicalProperties.weight" }
735
809
  ];
736
- var TRANSFORM_PATHS_11 = [
810
+ var TRANSFORM_PATHS_15 = [
737
811
  { path: "entity.billingInfo.address" },
738
812
  { path: "entity.shippingInfo.logistics.shippingDestination.address" },
739
813
  { path: "entity.shippingInfo.logistics.pickupDetails.address" },
@@ -763,8 +837,8 @@ function typedQuerySubscriptionContracts2(httpClient) {
763
837
  { httpClient }
764
838
  );
765
839
  }
766
- var onSubscriptionContractCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
767
- "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",
768
842
  true,
769
843
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
770
844
  (0, import_transform_paths3.transformPaths)(event, [
@@ -787,8 +861,8 @@ var onSubscriptionContractCreated = /* @__PURE__ */ (0, import_sdk_types.EventDe
787
861
  ])
788
862
  )
789
863
  )();
790
- var onSubscriptionContractDeleted = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
791
- "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",
792
866
  true,
793
867
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
794
868
  (0, import_transform_paths3.transformPaths)(event, [
@@ -811,8 +885,8 @@ var onSubscriptionContractDeleted = /* @__PURE__ */ (0, import_sdk_types.EventDe
811
885
  ])
812
886
  )
813
887
  )();
814
- var onSubscriptionContractUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
815
- "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",
816
890
  true,
817
891
  (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
818
892
  (0, import_transform_paths3.transformPaths)(event, [
@@ -835,6 +909,30 @@ var onSubscriptionContractUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDe
835
909
  ])
836
910
  )
837
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
+ )();
838
936
 
839
937
  // src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.ts
840
938
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
@@ -853,6 +951,7 @@ function customQuerySubscriptionContracts(httpClient) {
853
951
  }
854
952
  var getSubscriptionContract4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getSubscriptionContract3);
855
953
  var querySubscriptionContracts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQuerySubscriptionContracts);
954
+ var onSubscriptionContractCommitted2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onSubscriptionContractCommitted);
856
955
  var onSubscriptionContractCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
857
956
  onSubscriptionContractCreated
858
957
  );
@@ -871,6 +970,7 @@ var onSubscriptionContractUpdated2 = /* @__PURE__ */ (0, import_event_definition
871
970
  ChangeType,
872
971
  ChannelType,
873
972
  ChargeType,
973
+ ContractChangeType,
874
974
  DescriptionLineType,
875
975
  DimensionsUnit,
876
976
  DiscountReason,
@@ -892,6 +992,7 @@ var onSubscriptionContractUpdated2 = /* @__PURE__ */ (0, import_event_definition
892
992
  WebhookIdentityType,
893
993
  WeightUnit,
894
994
  getSubscriptionContract,
995
+ onSubscriptionContractCommitted,
895
996
  onSubscriptionContractCreated,
896
997
  onSubscriptionContractDeleted,
897
998
  onSubscriptionContractUpdated,