@wix/auto_sdk_ecom_subscription-contracts 1.0.65 → 1.0.67
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 +8 -18
- package/build/cjs/index.js +65 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -1
- package/build/cjs/index.typings.js +49 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +8 -18
- package/build/es/index.mjs +65 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -1
- package/build/es/index.typings.mjs +47 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -18
- package/build/internal/cjs/index.js +65 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +7 -1
- package/build/internal/cjs/index.typings.js +49 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -18
- package/build/internal/es/index.mjs +65 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +7 -1
- package/build/internal/es/index.typings.mjs +47 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -2060,5 +2060,11 @@ interface SubscriptionContractsQueryBuilder {
|
|
|
2060
2060
|
/** @documentationMaturity preview */
|
|
2061
2061
|
find: () => Promise<SubscriptionContractsQueryResult>;
|
|
2062
2062
|
}
|
|
2063
|
+
/**
|
|
2064
|
+
* @hidden
|
|
2065
|
+
* @fqn wix.ecom.subscription_contracts.v1.SubscriptionContracts.QuerySubscriptionContracts
|
|
2066
|
+
* @requiredField query
|
|
2067
|
+
*/
|
|
2068
|
+
declare function typedQuerySubscriptionContracts(query: CursorQuery): Promise<NonNullablePaths<QuerySubscriptionContractsResponse, `subscriptionContracts` | `subscriptionContracts.${number}.subscriptionSettings.frequency` | `subscriptionContracts.${number}.subscriptionSettings.autoRenewal` | `subscriptionContracts.${number}.subscriptionSettings.enableCustomerCancellation` | `subscriptionContracts.${number}.subscriptionSettings.freeTrialPeriod.frequency` | `subscriptionContracts.${number}.subscriptionSettings.freeTrialPeriod.interval` | `subscriptionContracts.${number}.buyerInfo.visitorId` | `subscriptionContracts.${number}.buyerInfo.memberId` | `subscriptionContracts.${number}.weightUnit` | `subscriptionContracts.${number}.taxIncludedInPrices` | `subscriptionContracts.${number}.shippingInfo.title` | `subscriptionContracts.${number}.channelInfo.type`, 6>>;
|
|
2063
2069
|
|
|
2064
|
-
export { type ActionEvent, type AdditionalFee, type Address, type AddressLocation, type AddressWithContact, AdjustmentType, type AdjustmentTypeWithLiterals, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, type BaseEventMetadata, type BillingAdjustment, type BillingAdjustmentPriceSummary, type BulkActionMetadata, type BulkCreateSubscriptionContractsRequest, type BulkCreateSubscriptionContractsResponse, type BulkSubscriptionContractResult, type BulkUpdateSubscriptionContractsRequest, type BulkUpdateSubscriptionContractsResponse, type BuyerInfo, type BuyerInfoIdOneOf, type CatalogReference, type ChannelInfo, ChannelType, type ChannelTypeWithLiterals, type Color, type Coupon, type CreateSubscriptionContractRequest, type CreateSubscriptionContractResponse, type CurrencyConversionDetails, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomField, type DeliveryLogistics, type DeliveryLogisticsAddressOneOf, type DeliveryTimeSlot, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type DigitalFile, DiscountReason, type DiscountReasonWithLiterals, type DiscountRule, type DiscountRuleName, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type FocalPoint, type FreeTrialPeriod, type FullAddressContactDetails, type GetSubscriptionContractRequest, type GetSubscriptionContractResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type ItemModifier, type ItemTaxFullDetails, type ItemType, type ItemTypeItemTypeDataOneOf, ItemTypePreset, type ItemTypePresetWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LineItemDiscount, type LineItemTaxBreakdown, type LineItemTaxInfo, type Location, type LocationAndQuantity, type MaskedSubscriptionContract, type MerchantDiscount, type MerchantDiscountMerchantDiscountReasonOneOf, type MessageEnvelope, type ModifierGroup, type OrderLineItem, type OrderTaxBreakdown, type OrderTaxInfo, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PhysicalProperties, type PickupAddress, type PickupDetails, PickupMethod, type PickupMethodWithLiterals, type PlainTextValue, type Price, type PriceDescription, type PriceSummary, type ProductName, type QuerySubscriptionContractsRequest, type QuerySubscriptionContractsResponse, type RestoreInfo, type ShippingInformation, type ShippingPrice, type ShippingRegion, SortOrder, type SortOrderWithLiterals, type Sorting, type StreetAddress, type SubscriptionContract, type SubscriptionContractCreatedEnvelope, type SubscriptionContractDeletedEnvelope, type SubscriptionContractUpdatedEnvelope, type SubscriptionContractsQueryBuilder, type SubscriptionContractsQueryResult, type SubscriptionDescription, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionInfo, type SubscriptionSettings, type SubscriptionTitle, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type TranslatableString, type UpdateSubscriptionContractRequest, type UpdateSubscriptionContractResponse, type V1FreeTrialPeriod, type V1SubscriptionDescription, type V1SubscriptionSettings, type V1SubscriptionTitle, V2SubscriptionFrequency, type V2SubscriptionFrequencyWithLiterals, type VatId, VatType, type VatTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, getSubscriptionContract, onSubscriptionContractCreated, onSubscriptionContractDeleted, onSubscriptionContractUpdated, querySubscriptionContracts };
|
|
2070
|
+
export { type ActionEvent, type AdditionalFee, type Address, type AddressLocation, type AddressWithContact, AdjustmentType, type AdjustmentTypeWithLiterals, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, type BaseEventMetadata, type BillingAdjustment, type BillingAdjustmentPriceSummary, type BulkActionMetadata, type BulkCreateSubscriptionContractsRequest, type BulkCreateSubscriptionContractsResponse, type BulkSubscriptionContractResult, type BulkUpdateSubscriptionContractsRequest, type BulkUpdateSubscriptionContractsResponse, type BuyerInfo, type BuyerInfoIdOneOf, type CatalogReference, type ChannelInfo, ChannelType, type ChannelTypeWithLiterals, type Color, type Coupon, type CreateSubscriptionContractRequest, type CreateSubscriptionContractResponse, type CurrencyConversionDetails, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomField, type DeliveryLogistics, type DeliveryLogisticsAddressOneOf, type DeliveryTimeSlot, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type DigitalFile, DiscountReason, type DiscountReasonWithLiterals, type DiscountRule, type DiscountRuleName, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type FocalPoint, type FreeTrialPeriod, type FullAddressContactDetails, type GetSubscriptionContractRequest, type GetSubscriptionContractResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type ItemModifier, type ItemTaxFullDetails, type ItemType, type ItemTypeItemTypeDataOneOf, ItemTypePreset, type ItemTypePresetWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LineItemDiscount, type LineItemTaxBreakdown, type LineItemTaxInfo, type Location, type LocationAndQuantity, type MaskedSubscriptionContract, type MerchantDiscount, type MerchantDiscountMerchantDiscountReasonOneOf, type MessageEnvelope, type ModifierGroup, type OrderLineItem, type OrderTaxBreakdown, type OrderTaxInfo, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PhysicalProperties, type PickupAddress, type PickupDetails, PickupMethod, type PickupMethodWithLiterals, type PlainTextValue, type Price, type PriceDescription, type PriceSummary, type ProductName, type QuerySubscriptionContractsRequest, type QuerySubscriptionContractsResponse, type RestoreInfo, type ShippingInformation, type ShippingPrice, type ShippingRegion, SortOrder, type SortOrderWithLiterals, type Sorting, type StreetAddress, type SubscriptionContract, type SubscriptionContractCreatedEnvelope, type SubscriptionContractDeletedEnvelope, type SubscriptionContractUpdatedEnvelope, type SubscriptionContractsQueryBuilder, type SubscriptionContractsQueryResult, type SubscriptionDescription, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionInfo, type SubscriptionSettings, type SubscriptionTitle, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type TranslatableString, type UpdateSubscriptionContractRequest, type UpdateSubscriptionContractResponse, type V1FreeTrialPeriod, type V1SubscriptionDescription, type V1SubscriptionSettings, type V1SubscriptionTitle, V2SubscriptionFrequency, type V2SubscriptionFrequencyWithLiterals, type VatId, VatType, type VatTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, getSubscriptionContract, onSubscriptionContractCreated, onSubscriptionContractDeleted, onSubscriptionContractUpdated, querySubscriptionContracts, typedQuerySubscriptionContracts };
|
|
@@ -37,7 +37,8 @@ __export(index_typings_exports, {
|
|
|
37
37
|
WebhookIdentityType: () => WebhookIdentityType,
|
|
38
38
|
WeightUnit: () => WeightUnit,
|
|
39
39
|
getSubscriptionContract: () => getSubscriptionContract2,
|
|
40
|
-
querySubscriptionContracts: () => querySubscriptionContracts2
|
|
40
|
+
querySubscriptionContracts: () => querySubscriptionContracts2,
|
|
41
|
+
typedQuerySubscriptionContracts: () => typedQuerySubscriptionContracts
|
|
41
42
|
});
|
|
42
43
|
module.exports = __toCommonJS(index_typings_exports);
|
|
43
44
|
|
|
@@ -494,6 +495,51 @@ function querySubscriptionContracts2() {
|
|
|
494
495
|
transformationPaths: {}
|
|
495
496
|
});
|
|
496
497
|
}
|
|
498
|
+
async function typedQuerySubscriptionContracts(query) {
|
|
499
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
500
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
501
|
+
const reqOpts = querySubscriptionContracts(
|
|
502
|
+
payload
|
|
503
|
+
);
|
|
504
|
+
sideEffects?.onSiteCall?.();
|
|
505
|
+
try {
|
|
506
|
+
const result = await httpClient.request(reqOpts);
|
|
507
|
+
sideEffects?.onSuccess?.(result);
|
|
508
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
509
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
510
|
+
{
|
|
511
|
+
transformFn: import_image.transformRESTImageToSDKImage,
|
|
512
|
+
paths: [{ path: "subscriptionContracts.lineItems.image" }]
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
transformFn: import_address.transformRESTAddressToSDKAddress,
|
|
516
|
+
paths: [
|
|
517
|
+
{ path: "subscriptionContracts.billingInfo.address" },
|
|
518
|
+
{
|
|
519
|
+
path: "subscriptionContracts.shippingInfo.logistics.shippingDestination.address"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
path: "subscriptionContracts.shippingInfo.logistics.pickupDetails.address"
|
|
523
|
+
},
|
|
524
|
+
{ path: "subscriptionContracts.recipientInfo.address" }
|
|
525
|
+
]
|
|
526
|
+
}
|
|
527
|
+
])
|
|
528
|
+
);
|
|
529
|
+
} catch (err) {
|
|
530
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
531
|
+
err,
|
|
532
|
+
{
|
|
533
|
+
spreadPathsToArguments: {},
|
|
534
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
535
|
+
singleArgumentUnchanged: false
|
|
536
|
+
},
|
|
537
|
+
["query"]
|
|
538
|
+
);
|
|
539
|
+
sideEffects?.onError?.(err);
|
|
540
|
+
throw transformedError;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
497
543
|
// Annotate the CommonJS export names for ESM import in node:
|
|
498
544
|
0 && (module.exports = {
|
|
499
545
|
AdjustmentType,
|
|
@@ -513,6 +559,7 @@ function querySubscriptionContracts2() {
|
|
|
513
559
|
WebhookIdentityType,
|
|
514
560
|
WeightUnit,
|
|
515
561
|
getSubscriptionContract,
|
|
516
|
-
querySubscriptionContracts
|
|
562
|
+
querySubscriptionContracts,
|
|
563
|
+
typedQuerySubscriptionContracts
|
|
517
564
|
});
|
|
518
565
|
//# sourceMappingURL=index.typings.js.map
|