@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.
- package/build/cjs/index.d.ts +31 -10
- package/build/cjs/index.js +118 -17
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +311 -187
- package/build/cjs/index.typings.js +15 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +245 -164
- package/build/cjs/meta.js +15 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +31 -10
- package/build/es/index.mjs +116 -17
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +311 -187
- package/build/es/index.typings.mjs +14 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +245 -164
- package/build/es/meta.mjs +14 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +31 -10
- package/build/internal/cjs/index.typings.d.ts +315 -189
- package/build/internal/cjs/meta.d.ts +249 -166
- package/build/internal/es/index.d.mts +31 -10
- package/build/internal/es/index.typings.d.mts +315 -189
- package/build/internal/es/meta.d.mts +249 -166
- package/package.json +2 -2
|
@@ -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,
|
|
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
|
|
9
|
-
*
|
|
10
|
-
*
|
|
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` | `
|
|
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 };
|