@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.mjs';
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.mjs';
2
+ import { SubscriptionContract, GetSubscriptionContractApplicationErrors, SubscriptionContractCommittedEnvelope, SubscriptionContractCreatedEnvelope, SubscriptionContractDeletedEnvelope, SubscriptionContractUpdatedEnvelope, SubscriptionContractsQueryBuilder, SubscriptionContractQuery, typedQuerySubscriptionContracts } from './index.typings.mjs';
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.mjs';
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 };
@@ -421,10 +421,23 @@ var SpecificItemsCouponBehavior = /* @__PURE__ */ ((SpecificItemsCouponBehavior2
421
421
  return SpecificItemsCouponBehavior2;
422
422
  })(SpecificItemsCouponBehavior || {});
423
423
  var LineItemQuantityChangeType = /* @__PURE__ */ ((LineItemQuantityChangeType2) => {
424
+ LineItemQuantityChangeType2["UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE"] = "UNKNOWN_LINE_ITEM_QUANTITY_CHANGE_TYPE";
424
425
  LineItemQuantityChangeType2["QUANTITY_INCREASED"] = "QUANTITY_INCREASED";
425
426
  LineItemQuantityChangeType2["QUANTITY_DECREASED"] = "QUANTITY_DECREASED";
426
427
  return LineItemQuantityChangeType2;
427
428
  })(LineItemQuantityChangeType || {});
429
+ var ContractChangeType = /* @__PURE__ */ ((ContractChangeType2) => {
430
+ ContractChangeType2["UNKNOWN_CONTRACT_CHANGE_TYPE"] = "UNKNOWN_CONTRACT_CHANGE_TYPE";
431
+ ContractChangeType2["LINE_ITEM_CHANGED"] = "LINE_ITEM_CHANGED";
432
+ ContractChangeType2["LINE_ITEM_ADDED"] = "LINE_ITEM_ADDED";
433
+ ContractChangeType2["LINE_ITEM_REMOVED"] = "LINE_ITEM_REMOVED";
434
+ ContractChangeType2["DISCOUNT_ADDED"] = "DISCOUNT_ADDED";
435
+ ContractChangeType2["DISCOUNT_REMOVED"] = "DISCOUNT_REMOVED";
436
+ ContractChangeType2["ADDITIONAL_FEE_ADDED"] = "ADDITIONAL_FEE_ADDED";
437
+ ContractChangeType2["ADDITIONAL_FEE_REMOVED"] = "ADDITIONAL_FEE_REMOVED";
438
+ ContractChangeType2["TOTAL_PRICE_CHANGED"] = "TOTAL_PRICE_CHANGED";
439
+ return ContractChangeType2;
440
+ })(ContractChangeType || {});
428
441
  var ActivityType = /* @__PURE__ */ ((ActivityType2) => {
429
442
  ActivityType2["UNKNOWN_ACTIVITY_TYPE"] = "UNKNOWN_ACTIVITY_TYPE";
430
443
  ActivityType2["CHANGES_APPLIED"] = "CHANGES_APPLIED";
@@ -594,6 +607,65 @@ var utils = {
594
607
 
595
608
  // src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.ts
596
609
  var TRANSFORM_PATHS_03 = [
610
+ { path: "data.commitDate" },
611
+ { path: "data.subscriptionContract.createdDate" },
612
+ { path: "data.subscriptionContract.updatedDate" },
613
+ { path: "data.subscriptionContract.subscriptionSettings.startDate" },
614
+ { path: "data.subscriptionContract.lineItems.digitalFile.expirationDate" },
615
+ {
616
+ path: "data.subscriptionContract.lineItems.subscriptionInfo.subscriptionSettings.startDate"
617
+ },
618
+ {
619
+ path: "data.subscriptionContract.lineItems.serviceProperties.scheduledDate"
620
+ },
621
+ { path: "data.subscriptionContract.lineItems.serviceProperties.endDate" },
622
+ { path: "data.subscriptionContract.shippingInfo.logistics.deliverByDate" },
623
+ {
624
+ path: "data.subscriptionContract.shippingInfo.logistics.deliveryTimeSlot.from"
625
+ },
626
+ {
627
+ path: "data.subscriptionContract.shippingInfo.logistics.deliveryTimeSlot.to"
628
+ },
629
+ { path: "data.subscriptionContract.activities.createdDate" },
630
+ {
631
+ path: "data.changes.lineItems.changed.digitalFileBeforeChange.digitalFile.expirationDate"
632
+ },
633
+ { path: "data.changes.lineItems.lineItem.digitalFile.expirationDate" },
634
+ {
635
+ path: "data.changes.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
636
+ },
637
+ { path: "data.changes.lineItems.lineItem.serviceProperties.scheduledDate" },
638
+ { path: "data.changes.lineItems.lineItem.serviceProperties.endDate" },
639
+ { path: "data.changes.shippingInfo.logistics.deliverByDate" },
640
+ { path: "data.changes.shippingInfo.logistics.deliveryTimeSlot.from" },
641
+ { path: "data.changes.shippingInfo.logistics.deliveryTimeSlot.to" },
642
+ { path: "metadata.eventTime" }
643
+ ];
644
+ var TRANSFORM_PATHS_13 = [
645
+ { path: "data.subscriptionContract.lineItems.image" },
646
+ { path: "data.changes.lineItems.changed.imageBeforeChange.image" },
647
+ { path: "data.changes.lineItems.lineItem.image" }
648
+ ];
649
+ var TRANSFORM_PATHS_23 = [
650
+ { path: "data.subscriptionContract.lineItems.physicalProperties.weight" },
651
+ {
652
+ path: "data.changes.lineItems.changed.physicalPropertiesBeforeChange.physicalProperties.weight"
653
+ },
654
+ { path: "data.changes.lineItems.lineItem.physicalProperties.weight" }
655
+ ];
656
+ var TRANSFORM_PATHS_33 = [
657
+ { path: "data.subscriptionContract.billingInfo.address" },
658
+ {
659
+ path: "data.subscriptionContract.shippingInfo.logistics.shippingDestination.address"
660
+ },
661
+ {
662
+ path: "data.subscriptionContract.shippingInfo.logistics.pickupDetails.address"
663
+ },
664
+ { path: "data.subscriptionContract.recipientInfo.address" },
665
+ { path: "data.changes.shippingInfo.logistics.shippingDestination.address" },
666
+ { path: "data.changes.shippingInfo.logistics.pickupDetails.address" }
667
+ ];
668
+ var TRANSFORM_PATHS_4 = [
597
669
  { path: "entity.createdDate" },
598
670
  { path: "entity.updatedDate" },
599
671
  { path: "entity.subscriptionSettings.startDate" },
@@ -607,17 +679,17 @@ var TRANSFORM_PATHS_03 = [
607
679
  { path: "entity.activities.createdDate" },
608
680
  { path: "metadata.eventTime" }
609
681
  ];
610
- var TRANSFORM_PATHS_13 = [{ path: "entity.lineItems.image" }];
611
- var TRANSFORM_PATHS_23 = [
682
+ var TRANSFORM_PATHS_5 = [{ path: "entity.lineItems.image" }];
683
+ var TRANSFORM_PATHS_6 = [
612
684
  { path: "entity.lineItems.physicalProperties.weight" }
613
685
  ];
614
- var TRANSFORM_PATHS_33 = [
686
+ var TRANSFORM_PATHS_7 = [
615
687
  { path: "entity.billingInfo.address" },
616
688
  { path: "entity.shippingInfo.logistics.shippingDestination.address" },
617
689
  { path: "entity.shippingInfo.logistics.pickupDetails.address" },
618
690
  { path: "entity.recipientInfo.address" }
619
691
  ];
620
- var TRANSFORM_PATHS_4 = [
692
+ var TRANSFORM_PATHS_8 = [
621
693
  { path: "undefined.createdDate" },
622
694
  { path: "undefined.updatedDate" },
623
695
  { path: "undefined.subscriptionSettings.startDate" },
@@ -633,17 +705,17 @@ var TRANSFORM_PATHS_4 = [
633
705
  { path: "undefined.activities.createdDate" },
634
706
  { path: "metadata.eventTime" }
635
707
  ];
636
- var TRANSFORM_PATHS_5 = [{ path: "undefined.lineItems.image" }];
637
- var TRANSFORM_PATHS_6 = [
708
+ var TRANSFORM_PATHS_9 = [{ path: "undefined.lineItems.image" }];
709
+ var TRANSFORM_PATHS_10 = [
638
710
  { path: "undefined.lineItems.physicalProperties.weight" }
639
711
  ];
640
- var TRANSFORM_PATHS_7 = [
712
+ var TRANSFORM_PATHS_11 = [
641
713
  { path: "undefined.billingInfo.address" },
642
714
  { path: "undefined.shippingInfo.logistics.shippingDestination.address" },
643
715
  { path: "undefined.shippingInfo.logistics.pickupDetails.address" },
644
716
  { path: "undefined.recipientInfo.address" }
645
717
  ];
646
- var TRANSFORM_PATHS_8 = [
718
+ var TRANSFORM_PATHS_122 = [
647
719
  { path: "entity.createdDate" },
648
720
  { path: "entity.updatedDate" },
649
721
  { path: "entity.subscriptionSettings.startDate" },
@@ -670,15 +742,15 @@ var TRANSFORM_PATHS_8 = [
670
742
  { path: "modifiedFields.shippingInfo.logistics.deliveryTimeSlot.to" },
671
743
  { path: "modifiedFields.activities.createdDate" }
672
744
  ];
673
- var TRANSFORM_PATHS_9 = [
745
+ var TRANSFORM_PATHS_132 = [
674
746
  { path: "entity.lineItems.image" },
675
747
  { path: "modifiedFields.lineItems.image" }
676
748
  ];
677
- var TRANSFORM_PATHS_10 = [
749
+ var TRANSFORM_PATHS_14 = [
678
750
  { path: "entity.lineItems.physicalProperties.weight" },
679
751
  { path: "modifiedFields.lineItems.physicalProperties.weight" }
680
752
  ];
681
- var TRANSFORM_PATHS_11 = [
753
+ var TRANSFORM_PATHS_15 = [
682
754
  { path: "entity.billingInfo.address" },
683
755
  { path: "entity.shippingInfo.logistics.shippingDestination.address" },
684
756
  { path: "entity.shippingInfo.logistics.pickupDetails.address" },
@@ -708,8 +780,8 @@ function typedQuerySubscriptionContracts2(httpClient) {
708
780
  { httpClient }
709
781
  );
710
782
  }
711
- var onSubscriptionContractCreated = /* @__PURE__ */ EventDefinition(
712
- "wix.ecom.subscription_contracts.v1.subscription_contract_created",
783
+ var onSubscriptionContractCommitted = /* @__PURE__ */ EventDefinition(
784
+ "wix.ecom.subscription_contracts.v1.subscription_contract_committed",
713
785
  true,
714
786
  (event) => renameKeysFromRESTResponseToSDKResponse2(
715
787
  transformPaths3(event, [
@@ -732,8 +804,8 @@ var onSubscriptionContractCreated = /* @__PURE__ */ EventDefinition(
732
804
  ])
733
805
  )
734
806
  )();
735
- var onSubscriptionContractDeleted = /* @__PURE__ */ EventDefinition(
736
- "wix.ecom.subscription_contracts.v1.subscription_contract_deleted",
807
+ var onSubscriptionContractCreated = /* @__PURE__ */ EventDefinition(
808
+ "wix.ecom.subscription_contracts.v1.subscription_contract_created",
737
809
  true,
738
810
  (event) => renameKeysFromRESTResponseToSDKResponse2(
739
811
  transformPaths3(event, [
@@ -756,8 +828,8 @@ var onSubscriptionContractDeleted = /* @__PURE__ */ EventDefinition(
756
828
  ])
757
829
  )
758
830
  )();
759
- var onSubscriptionContractUpdated = /* @__PURE__ */ EventDefinition(
760
- "wix.ecom.subscription_contracts.v1.subscription_contract_updated",
831
+ var onSubscriptionContractDeleted = /* @__PURE__ */ EventDefinition(
832
+ "wix.ecom.subscription_contracts.v1.subscription_contract_deleted",
761
833
  true,
762
834
  (event) => renameKeysFromRESTResponseToSDKResponse2(
763
835
  transformPaths3(event, [
@@ -780,6 +852,30 @@ var onSubscriptionContractUpdated = /* @__PURE__ */ EventDefinition(
780
852
  ])
781
853
  )
782
854
  )();
855
+ var onSubscriptionContractUpdated = /* @__PURE__ */ EventDefinition(
856
+ "wix.ecom.subscription_contracts.v1.subscription_contract_updated",
857
+ true,
858
+ (event) => renameKeysFromRESTResponseToSDKResponse2(
859
+ transformPaths3(event, [
860
+ {
861
+ transformFn: transformRESTTimestampToSDKTimestamp2,
862
+ paths: TRANSFORM_PATHS_122
863
+ },
864
+ {
865
+ transformFn: transformRESTImageToSDKImage2,
866
+ paths: TRANSFORM_PATHS_132
867
+ },
868
+ {
869
+ transformFn: transformRESTFloatToSDKFloat2,
870
+ paths: TRANSFORM_PATHS_14
871
+ },
872
+ {
873
+ transformFn: transformRESTAddressToSDKAddress2,
874
+ paths: TRANSFORM_PATHS_15
875
+ }
876
+ ])
877
+ )
878
+ )();
783
879
 
784
880
  // src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.ts
785
881
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
@@ -798,6 +894,7 @@ function customQuerySubscriptionContracts(httpClient) {
798
894
  }
799
895
  var getSubscriptionContract4 = /* @__PURE__ */ createRESTModule(getSubscriptionContract3);
800
896
  var querySubscriptionContracts4 = /* @__PURE__ */ createRESTModule(customQuerySubscriptionContracts);
897
+ var onSubscriptionContractCommitted2 = /* @__PURE__ */ createEventModule(onSubscriptionContractCommitted);
801
898
  var onSubscriptionContractCreated2 = /* @__PURE__ */ createEventModule(
802
899
  onSubscriptionContractCreated
803
900
  );
@@ -815,6 +912,7 @@ export {
815
912
  ChangeType,
816
913
  ChannelType,
817
914
  ChargeType,
915
+ ContractChangeType,
818
916
  DescriptionLineType,
819
917
  DimensionsUnit,
820
918
  DiscountReason,
@@ -836,6 +934,7 @@ export {
836
934
  WebhookIdentityType,
837
935
  WeightUnit,
838
936
  getSubscriptionContract4 as getSubscriptionContract,
937
+ onSubscriptionContractCommitted2 as onSubscriptionContractCommitted,
839
938
  onSubscriptionContractCreated2 as onSubscriptionContractCreated,
840
939
  onSubscriptionContractDeleted2 as onSubscriptionContractDeleted,
841
940
  onSubscriptionContractUpdated2 as onSubscriptionContractUpdated,