@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.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";
@@ -439,6 +452,7 @@ var ActionInitiator = /* @__PURE__ */ ((ActionInitiator2) => {
439
452
  return ActionInitiator2;
440
453
  })(ActionInitiator || {});
441
454
  var ChangeType = /* @__PURE__ */ ((ChangeType2) => {
455
+ ChangeType2["UNKNOWN_CHANGE_TYPE"] = "UNKNOWN_CHANGE_TYPE";
442
456
  ChangeType2["ADDED"] = "ADDED";
443
457
  ChangeType2["CHANGED"] = "CHANGED";
444
458
  ChangeType2["REMOVED"] = "REMOVED";
@@ -593,6 +607,65 @@ var utils = {
593
607
 
594
608
  // src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.ts
595
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 = [
596
669
  { path: "entity.createdDate" },
597
670
  { path: "entity.updatedDate" },
598
671
  { path: "entity.subscriptionSettings.startDate" },
@@ -606,17 +679,17 @@ var TRANSFORM_PATHS_03 = [
606
679
  { path: "entity.activities.createdDate" },
607
680
  { path: "metadata.eventTime" }
608
681
  ];
609
- var TRANSFORM_PATHS_13 = [{ path: "entity.lineItems.image" }];
610
- var TRANSFORM_PATHS_23 = [
682
+ var TRANSFORM_PATHS_5 = [{ path: "entity.lineItems.image" }];
683
+ var TRANSFORM_PATHS_6 = [
611
684
  { path: "entity.lineItems.physicalProperties.weight" }
612
685
  ];
613
- var TRANSFORM_PATHS_33 = [
686
+ var TRANSFORM_PATHS_7 = [
614
687
  { path: "entity.billingInfo.address" },
615
688
  { path: "entity.shippingInfo.logistics.shippingDestination.address" },
616
689
  { path: "entity.shippingInfo.logistics.pickupDetails.address" },
617
690
  { path: "entity.recipientInfo.address" }
618
691
  ];
619
- var TRANSFORM_PATHS_4 = [
692
+ var TRANSFORM_PATHS_8 = [
620
693
  { path: "undefined.createdDate" },
621
694
  { path: "undefined.updatedDate" },
622
695
  { path: "undefined.subscriptionSettings.startDate" },
@@ -632,17 +705,17 @@ var TRANSFORM_PATHS_4 = [
632
705
  { path: "undefined.activities.createdDate" },
633
706
  { path: "metadata.eventTime" }
634
707
  ];
635
- var TRANSFORM_PATHS_5 = [{ path: "undefined.lineItems.image" }];
636
- var TRANSFORM_PATHS_6 = [
708
+ var TRANSFORM_PATHS_9 = [{ path: "undefined.lineItems.image" }];
709
+ var TRANSFORM_PATHS_10 = [
637
710
  { path: "undefined.lineItems.physicalProperties.weight" }
638
711
  ];
639
- var TRANSFORM_PATHS_7 = [
712
+ var TRANSFORM_PATHS_11 = [
640
713
  { path: "undefined.billingInfo.address" },
641
714
  { path: "undefined.shippingInfo.logistics.shippingDestination.address" },
642
715
  { path: "undefined.shippingInfo.logistics.pickupDetails.address" },
643
716
  { path: "undefined.recipientInfo.address" }
644
717
  ];
645
- var TRANSFORM_PATHS_8 = [
718
+ var TRANSFORM_PATHS_122 = [
646
719
  { path: "entity.createdDate" },
647
720
  { path: "entity.updatedDate" },
648
721
  { path: "entity.subscriptionSettings.startDate" },
@@ -669,15 +742,15 @@ var TRANSFORM_PATHS_8 = [
669
742
  { path: "modifiedFields.shippingInfo.logistics.deliveryTimeSlot.to" },
670
743
  { path: "modifiedFields.activities.createdDate" }
671
744
  ];
672
- var TRANSFORM_PATHS_9 = [
745
+ var TRANSFORM_PATHS_132 = [
673
746
  { path: "entity.lineItems.image" },
674
747
  { path: "modifiedFields.lineItems.image" }
675
748
  ];
676
- var TRANSFORM_PATHS_10 = [
749
+ var TRANSFORM_PATHS_14 = [
677
750
  { path: "entity.lineItems.physicalProperties.weight" },
678
751
  { path: "modifiedFields.lineItems.physicalProperties.weight" }
679
752
  ];
680
- var TRANSFORM_PATHS_11 = [
753
+ var TRANSFORM_PATHS_15 = [
681
754
  { path: "entity.billingInfo.address" },
682
755
  { path: "entity.shippingInfo.logistics.shippingDestination.address" },
683
756
  { path: "entity.shippingInfo.logistics.pickupDetails.address" },
@@ -707,8 +780,8 @@ function typedQuerySubscriptionContracts2(httpClient) {
707
780
  { httpClient }
708
781
  );
709
782
  }
710
- var onSubscriptionContractCreated = /* @__PURE__ */ EventDefinition(
711
- "wix.ecom.subscription_contracts.v1.subscription_contract_created",
783
+ var onSubscriptionContractCommitted = /* @__PURE__ */ EventDefinition(
784
+ "wix.ecom.subscription_contracts.v1.subscription_contract_committed",
712
785
  true,
713
786
  (event) => renameKeysFromRESTResponseToSDKResponse2(
714
787
  transformPaths3(event, [
@@ -731,8 +804,8 @@ var onSubscriptionContractCreated = /* @__PURE__ */ EventDefinition(
731
804
  ])
732
805
  )
733
806
  )();
734
- var onSubscriptionContractDeleted = /* @__PURE__ */ EventDefinition(
735
- "wix.ecom.subscription_contracts.v1.subscription_contract_deleted",
807
+ var onSubscriptionContractCreated = /* @__PURE__ */ EventDefinition(
808
+ "wix.ecom.subscription_contracts.v1.subscription_contract_created",
736
809
  true,
737
810
  (event) => renameKeysFromRESTResponseToSDKResponse2(
738
811
  transformPaths3(event, [
@@ -755,8 +828,8 @@ var onSubscriptionContractDeleted = /* @__PURE__ */ EventDefinition(
755
828
  ])
756
829
  )
757
830
  )();
758
- var onSubscriptionContractUpdated = /* @__PURE__ */ EventDefinition(
759
- "wix.ecom.subscription_contracts.v1.subscription_contract_updated",
831
+ var onSubscriptionContractDeleted = /* @__PURE__ */ EventDefinition(
832
+ "wix.ecom.subscription_contracts.v1.subscription_contract_deleted",
760
833
  true,
761
834
  (event) => renameKeysFromRESTResponseToSDKResponse2(
762
835
  transformPaths3(event, [
@@ -779,6 +852,30 @@ var onSubscriptionContractUpdated = /* @__PURE__ */ EventDefinition(
779
852
  ])
780
853
  )
781
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
+ )();
782
879
 
783
880
  // src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.ts
784
881
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
@@ -797,6 +894,7 @@ function customQuerySubscriptionContracts(httpClient) {
797
894
  }
798
895
  var getSubscriptionContract4 = /* @__PURE__ */ createRESTModule(getSubscriptionContract3);
799
896
  var querySubscriptionContracts4 = /* @__PURE__ */ createRESTModule(customQuerySubscriptionContracts);
897
+ var onSubscriptionContractCommitted2 = /* @__PURE__ */ createEventModule(onSubscriptionContractCommitted);
800
898
  var onSubscriptionContractCreated2 = /* @__PURE__ */ createEventModule(
801
899
  onSubscriptionContractCreated
802
900
  );
@@ -814,6 +912,7 @@ export {
814
912
  ChangeType,
815
913
  ChannelType,
816
914
  ChargeType,
915
+ ContractChangeType,
817
916
  DescriptionLineType,
818
917
  DimensionsUnit,
819
918
  DiscountReason,
@@ -835,6 +934,7 @@ export {
835
934
  WebhookIdentityType,
836
935
  WeightUnit,
837
936
  getSubscriptionContract4 as getSubscriptionContract,
937
+ onSubscriptionContractCommitted2 as onSubscriptionContractCommitted,
838
938
  onSubscriptionContractCreated2 as onSubscriptionContractCreated,
839
939
  onSubscriptionContractDeleted2 as onSubscriptionContractDeleted,
840
940
  onSubscriptionContractUpdated2 as onSubscriptionContractUpdated,