@wix/auto_sdk_ecom_checkout-templates 1.0.0
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 +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.context.d.ts +32 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.context.js +61 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.context.js.map +1 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.http.d.ts +67 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.http.js +377 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.http.js.map +1 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.d.ts +29 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.js +161 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.js.map +1 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.public.d.ts +111 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.public.js +268 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.public.js.map +1 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.types.d.ts +2224 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.types.js +259 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.types.js.map +1 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.universal.d.ts +2538 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.universal.js +710 -0
- package/build/cjs/src/ecom-v1-checkout-template-checkout-templates.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.context.d.ts +32 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.context.js +32 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.context.js.map +1 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.http.d.ts +67 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.http.js +367 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.http.js.map +1 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.meta.d.ts +29 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.meta.js +128 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.meta.js.map +1 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.public.d.ts +111 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.public.js +232 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.public.js.map +1 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.types.d.ts +2224 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.types.js +256 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.types.js.map +1 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.universal.d.ts +2538 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.universal.js +677 -0
- package/build/es/src/ecom-v1-checkout-template-checkout-templates.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.context.d.ts +32 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.context.js +61 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.context.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.http.d.ts +67 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.http.js +377 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.http.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.d.ts +29 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.js +161 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.meta.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.public.d.ts +111 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.public.js +268 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.public.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.types.d.ts +2243 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.types.js +259 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.types.js.map +1 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.universal.d.ts +2694 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.universal.js +710 -0
- package/build/internal/cjs/src/ecom-v1-checkout-template-checkout-templates.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.context.d.ts +32 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.context.js +32 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.context.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.http.d.ts +67 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.http.js +367 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.http.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.meta.d.ts +29 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.meta.js +128 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.meta.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.public.d.ts +111 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.public.js +232 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.public.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.types.d.ts +2243 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.types.js +256 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.types.js.map +1 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.universal.d.ts +2694 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.universal.js +677 -0
- package/build/internal/es/src/ecom-v1-checkout-template-checkout-templates.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/ecom-v1-checkout-template-checkout-templates.context.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/ecom-v1-checkout-template-checkout-templates.context.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gGAA8E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/ecom-v1-checkout-template-checkout-templates.universal.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/ecom-v1-checkout-template-checkout-templates.universal.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.typings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kGAAgF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/ecom-v1-checkout-template-checkout-templates.meta.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./src/ecom-v1-checkout-template-checkout-templates.meta.js"), exports);
|
|
18
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6FAA2E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createCheckoutTemplate as publicCreateCheckoutTemplate, getCheckoutTemplate as publicGetCheckoutTemplate, updateCheckoutTemplate as publicUpdateCheckoutTemplate, deleteCheckoutTemplate as publicDeleteCheckoutTemplate, queryCheckoutTemplates as publicQueryCheckoutTemplates, createCheckoutFromTemplate as publicCreateCheckoutFromTemplate, createAndRedirectToCheckout as publicCreateAndRedirectToCheckout } from './ecom-v1-checkout-template-checkout-templates.public.js';
|
|
2
|
+
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
3
|
+
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
4
|
+
import { onCheckoutTemplateCreated as publicOnCheckoutTemplateCreated } from './ecom-v1-checkout-template-checkout-templates.public.js';
|
|
5
|
+
import { onCheckoutTemplateDeleted as publicOnCheckoutTemplateDeleted } from './ecom-v1-checkout-template-checkout-templates.public.js';
|
|
6
|
+
import { onCheckoutTemplateUpdated as publicOnCheckoutTemplateUpdated } from './ecom-v1-checkout-template-checkout-templates.public.js';
|
|
7
|
+
import { onCheckoutTemplateUsed as publicOnCheckoutTemplateUsed } from './ecom-v1-checkout-template-checkout-templates.public.js';
|
|
8
|
+
export declare const createCheckoutTemplate: MaybeContext<BuildRESTFunction<typeof publicCreateCheckoutTemplate> & typeof publicCreateCheckoutTemplate>;
|
|
9
|
+
export declare const getCheckoutTemplate: MaybeContext<BuildRESTFunction<typeof publicGetCheckoutTemplate> & typeof publicGetCheckoutTemplate>;
|
|
10
|
+
export declare const updateCheckoutTemplate: MaybeContext<BuildRESTFunction<typeof publicUpdateCheckoutTemplate> & typeof publicUpdateCheckoutTemplate>;
|
|
11
|
+
export declare const deleteCheckoutTemplate: MaybeContext<BuildRESTFunction<typeof publicDeleteCheckoutTemplate> & typeof publicDeleteCheckoutTemplate>;
|
|
12
|
+
export declare const queryCheckoutTemplates: MaybeContext<BuildRESTFunction<typeof publicQueryCheckoutTemplates> & typeof publicQueryCheckoutTemplates>;
|
|
13
|
+
export declare const createCheckoutFromTemplate: MaybeContext<BuildRESTFunction<typeof publicCreateCheckoutFromTemplate> & typeof publicCreateCheckoutFromTemplate>;
|
|
14
|
+
export declare const createAndRedirectToCheckout: MaybeContext<BuildRESTFunction<typeof publicCreateAndRedirectToCheckout> & typeof publicCreateAndRedirectToCheckout>;
|
|
15
|
+
/**
|
|
16
|
+
* Triggered when a checkout template is created.
|
|
17
|
+
*/
|
|
18
|
+
export declare const onCheckoutTemplateCreated: ReturnType<typeof createEventModule<typeof publicOnCheckoutTemplateCreated>>;
|
|
19
|
+
/**
|
|
20
|
+
* Triggered when a checkout template is deleted.
|
|
21
|
+
*/
|
|
22
|
+
export declare const onCheckoutTemplateDeleted: ReturnType<typeof createEventModule<typeof publicOnCheckoutTemplateDeleted>>;
|
|
23
|
+
/**
|
|
24
|
+
* Triggered when a checkout template is updated.
|
|
25
|
+
*/
|
|
26
|
+
export declare const onCheckoutTemplateUpdated: ReturnType<typeof createEventModule<typeof publicOnCheckoutTemplateUpdated>>;
|
|
27
|
+
/**
|
|
28
|
+
* Triggered when a checkout is created from a checkout template.
|
|
29
|
+
*/
|
|
30
|
+
export declare const onCheckoutTemplateUsed: ReturnType<typeof createEventModule<typeof publicOnCheckoutTemplateUsed>>;
|
|
31
|
+
export { Status, DescriptionLineType, PaymentOptionType, ItemTypeItemType, SubscriptionFrequency, FileType, SortOrder, JurisdictionType, ItemAvailabilityStatus, TaxableAddressType, VatType, PickupMethod, ChargeType, RuleType, DiscountType, WeightUnit, RateType, ManualCalculationReason, FallbackReason, ChannelType, AdditionalFeeSource, Severity, NameInOther, NameInLineItem, SuggestedFix, WebhookIdentityType, } from './ecom-v1-checkout-template-checkout-templates.universal.js';
|
|
32
|
+
export { CheckoutTemplate, CheckoutCustomization, WebClientCustomization, V1LineItem, CatalogReference, CatalogOverrideFields, ProductName, DescriptionLine, DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, PlainTextValue, Color, PhysicalProperties, PaymentOption, CustomLineItem, PriceDescription, ItemType, ItemTypeItemTypeDataOneOf, SubscriptionOptionInfo, SubscriptionSettings, FreeTrialPeriod, Title, Description, SecuredMedia, ServiceProperties, Policy, ExtendedFields, CustomContentReference, ExternalReference, CreateCheckoutTemplateRequest, CreateCheckoutTemplateResponse, GetCheckoutTemplateRequest, GetCheckoutTemplateResponse, UpdateCheckoutTemplateRequest, UpdateCheckoutTemplateResponse, DeleteCheckoutTemplateRequest, DeleteCheckoutTemplateResponse, QueryCheckoutTemplatesRequest, CursorQuery, CursorQueryPagingMethodOneOf, Sorting, CursorPaging, QueryCheckoutTemplatesResponse, CursorPagingMetadata, Cursors, CreateCheckoutFromTemplateRequest, CreateCheckoutFromTemplateResponse, CheckoutTemplateUsed, Checkout, LineItem, MultiCurrencyPrice, ItemTaxFullDetails, TaxRateBreakdown, TaxBreakdown, FocalPoint, ItemAvailabilityInfo, Scope, Group, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, AddressWithContact, Address, StreetAddress, AddressLocation, FullAddressContactDetails, VatId, ShippingInfo, SelectedCarrierServiceOption, DeliveryLogistics, PickupDetails, DeliveryTimeSlot, SelectedCarrierServiceOptionPrices, SelectedCarrierServiceOptionOtherCharge, DeliveryAllocation, Carrier, Region, ApplicableLineItems, ShippingRegion, CarrierServiceOption, ShippingOption, ShippingPrice, OtherCharge, BuyerInfo, BuyerInfoIdOneOf, PriceSummary, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, Details, DetailsKindOneOf, ApplicationError, ValidationError, FieldViolation, SystemError, CarrierErrors, CarrierError, GiftCard, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, Coupon, MerchantDiscount, DiscountRule, DiscountRuleName, LineItemDiscount, CustomField, TaxSummary, TaxCalculationDetails, TaxCalculationDetailsCalculationDetailsOneOf, AutoTaxFallbackCalculationDetails, AggregatedTaxBreakdown, CreatedBy, CreatedByIdOneOf, MembershipOptions, Membership, MembershipName, MembershipPaymentCredits, InvalidMembership, SelectedMemberships, SelectedMembership, AdditionalFee, ConversionInfo, Violation, Target, TargetTargetTypeOneOf, Other, TargetLineItem, CustomSettings, CreateAndRedirectToCheckoutRequest, RawHttpResponse, HeadersEntry, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, RestoreInfo, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, MessageEnvelope, IdentificationData, IdentificationDataIdOneOf, CheckoutTemplateNonNullableFields, CreateCheckoutTemplateResponseNonNullableFields, GetCheckoutTemplateResponseNonNullableFields, UpdateCheckoutTemplateResponseNonNullableFields, QueryCheckoutTemplatesResponseNonNullableFields, CreateCheckoutFromTemplateResponseNonNullableFields, RawHttpResponseNonNullableFields, BaseEventMetadata, EventMetadata, CheckoutTemplateCreatedEnvelope, CheckoutTemplateDeletedEnvelope, CheckoutTemplateUpdatedEnvelope, CheckoutTemplateUsedEnvelope, UpdateCheckoutTemplate, CheckoutTemplatesQueryResult, CheckoutTemplatesQueryBuilder, } from './ecom-v1-checkout-template-checkout-templates.universal.js';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebhookIdentityType = exports.SuggestedFix = exports.NameInLineItem = exports.NameInOther = exports.Severity = exports.AdditionalFeeSource = exports.ChannelType = exports.FallbackReason = exports.ManualCalculationReason = exports.RateType = exports.WeightUnit = exports.DiscountType = exports.RuleType = exports.ChargeType = exports.PickupMethod = exports.VatType = exports.TaxableAddressType = exports.ItemAvailabilityStatus = exports.JurisdictionType = exports.SortOrder = exports.FileType = exports.SubscriptionFrequency = exports.ItemTypeItemType = exports.PaymentOptionType = exports.DescriptionLineType = exports.Status = exports.onCheckoutTemplateUsed = exports.onCheckoutTemplateUpdated = exports.onCheckoutTemplateDeleted = exports.onCheckoutTemplateCreated = exports.createAndRedirectToCheckout = exports.createCheckoutFromTemplate = exports.queryCheckoutTemplates = exports.deleteCheckoutTemplate = exports.updateCheckoutTemplate = exports.getCheckoutTemplate = exports.createCheckoutTemplate = void 0;
|
|
4
|
+
const ecom_v1_checkout_template_checkout_templates_public_js_1 = require("./ecom-v1-checkout-template-checkout-templates.public.js");
|
|
5
|
+
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
6
|
+
const event_definition_modules_1 = require("@wix/sdk-runtime/event-definition-modules");
|
|
7
|
+
const ecom_v1_checkout_template_checkout_templates_public_js_2 = require("./ecom-v1-checkout-template-checkout-templates.public.js");
|
|
8
|
+
const ecom_v1_checkout_template_checkout_templates_public_js_3 = require("./ecom-v1-checkout-template-checkout-templates.public.js");
|
|
9
|
+
const ecom_v1_checkout_template_checkout_templates_public_js_4 = require("./ecom-v1-checkout-template-checkout-templates.public.js");
|
|
10
|
+
const ecom_v1_checkout_template_checkout_templates_public_js_5 = require("./ecom-v1-checkout-template-checkout-templates.public.js");
|
|
11
|
+
exports.createCheckoutTemplate = (0, rest_modules_1.createRESTModule)(ecom_v1_checkout_template_checkout_templates_public_js_1.createCheckoutTemplate);
|
|
12
|
+
exports.getCheckoutTemplate = (0, rest_modules_1.createRESTModule)(ecom_v1_checkout_template_checkout_templates_public_js_1.getCheckoutTemplate);
|
|
13
|
+
exports.updateCheckoutTemplate = (0, rest_modules_1.createRESTModule)(ecom_v1_checkout_template_checkout_templates_public_js_1.updateCheckoutTemplate);
|
|
14
|
+
exports.deleteCheckoutTemplate = (0, rest_modules_1.createRESTModule)(ecom_v1_checkout_template_checkout_templates_public_js_1.deleteCheckoutTemplate);
|
|
15
|
+
exports.queryCheckoutTemplates = (0, rest_modules_1.createRESTModule)(ecom_v1_checkout_template_checkout_templates_public_js_1.queryCheckoutTemplates);
|
|
16
|
+
exports.createCheckoutFromTemplate = (0, rest_modules_1.createRESTModule)(ecom_v1_checkout_template_checkout_templates_public_js_1.createCheckoutFromTemplate);
|
|
17
|
+
exports.createAndRedirectToCheckout = (0, rest_modules_1.createRESTModule)(ecom_v1_checkout_template_checkout_templates_public_js_1.createAndRedirectToCheckout);
|
|
18
|
+
/**
|
|
19
|
+
* Triggered when a checkout template is created.
|
|
20
|
+
*/
|
|
21
|
+
exports.onCheckoutTemplateCreated = (0, event_definition_modules_1.createEventModule)(ecom_v1_checkout_template_checkout_templates_public_js_2.onCheckoutTemplateCreated);
|
|
22
|
+
/**
|
|
23
|
+
* Triggered when a checkout template is deleted.
|
|
24
|
+
*/
|
|
25
|
+
exports.onCheckoutTemplateDeleted = (0, event_definition_modules_1.createEventModule)(ecom_v1_checkout_template_checkout_templates_public_js_3.onCheckoutTemplateDeleted);
|
|
26
|
+
/**
|
|
27
|
+
* Triggered when a checkout template is updated.
|
|
28
|
+
*/
|
|
29
|
+
exports.onCheckoutTemplateUpdated = (0, event_definition_modules_1.createEventModule)(ecom_v1_checkout_template_checkout_templates_public_js_4.onCheckoutTemplateUpdated);
|
|
30
|
+
/**
|
|
31
|
+
* Triggered when a checkout is created from a checkout template.
|
|
32
|
+
*/
|
|
33
|
+
exports.onCheckoutTemplateUsed = (0, event_definition_modules_1.createEventModule)(ecom_v1_checkout_template_checkout_templates_public_js_5.onCheckoutTemplateUsed);
|
|
34
|
+
var ecom_v1_checkout_template_checkout_templates_universal_js_1 = require("./ecom-v1-checkout-template-checkout-templates.universal.js");
|
|
35
|
+
Object.defineProperty(exports, "Status", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.Status; } });
|
|
36
|
+
Object.defineProperty(exports, "DescriptionLineType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.DescriptionLineType; } });
|
|
37
|
+
Object.defineProperty(exports, "PaymentOptionType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.PaymentOptionType; } });
|
|
38
|
+
Object.defineProperty(exports, "ItemTypeItemType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.ItemTypeItemType; } });
|
|
39
|
+
Object.defineProperty(exports, "SubscriptionFrequency", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.SubscriptionFrequency; } });
|
|
40
|
+
Object.defineProperty(exports, "FileType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.FileType; } });
|
|
41
|
+
Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.SortOrder; } });
|
|
42
|
+
Object.defineProperty(exports, "JurisdictionType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.JurisdictionType; } });
|
|
43
|
+
Object.defineProperty(exports, "ItemAvailabilityStatus", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.ItemAvailabilityStatus; } });
|
|
44
|
+
Object.defineProperty(exports, "TaxableAddressType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.TaxableAddressType; } });
|
|
45
|
+
Object.defineProperty(exports, "VatType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.VatType; } });
|
|
46
|
+
Object.defineProperty(exports, "PickupMethod", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.PickupMethod; } });
|
|
47
|
+
Object.defineProperty(exports, "ChargeType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.ChargeType; } });
|
|
48
|
+
Object.defineProperty(exports, "RuleType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.RuleType; } });
|
|
49
|
+
Object.defineProperty(exports, "DiscountType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.DiscountType; } });
|
|
50
|
+
Object.defineProperty(exports, "WeightUnit", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.WeightUnit; } });
|
|
51
|
+
Object.defineProperty(exports, "RateType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.RateType; } });
|
|
52
|
+
Object.defineProperty(exports, "ManualCalculationReason", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.ManualCalculationReason; } });
|
|
53
|
+
Object.defineProperty(exports, "FallbackReason", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.FallbackReason; } });
|
|
54
|
+
Object.defineProperty(exports, "ChannelType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.ChannelType; } });
|
|
55
|
+
Object.defineProperty(exports, "AdditionalFeeSource", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.AdditionalFeeSource; } });
|
|
56
|
+
Object.defineProperty(exports, "Severity", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.Severity; } });
|
|
57
|
+
Object.defineProperty(exports, "NameInOther", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.NameInOther; } });
|
|
58
|
+
Object.defineProperty(exports, "NameInLineItem", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.NameInLineItem; } });
|
|
59
|
+
Object.defineProperty(exports, "SuggestedFix", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.SuggestedFix; } });
|
|
60
|
+
Object.defineProperty(exports, "WebhookIdentityType", { enumerable: true, get: function () { return ecom_v1_checkout_template_checkout_templates_universal_js_1.WebhookIdentityType; } });
|
|
61
|
+
//# sourceMappingURL=ecom-v1-checkout-template-checkout-templates.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecom-v1-checkout-template-checkout-templates.context.js","sourceRoot":"","sources":["../../../src/ecom-v1-checkout-template-checkout-templates.context.ts"],"names":[],"mappings":";;;AAAA,qIAQkE;AAClE,gEAAiE;AACjE,wFAA8E;AAE9E,qIAAwI;AACxI,qIAAwI;AACxI,qIAAwI;AACxI,qIAAkI;AAErH,QAAA,sBAAsB,GAGjB,IAAA,+BAAgB,EAAC,+EAA4B,CAAC,CAAC;AACpD,QAAA,mBAAmB,GAGd,IAAA,+BAAgB,EAAC,4EAAyB,CAAC,CAAC;AACjD,QAAA,sBAAsB,GAGjB,IAAA,+BAAgB,EAAC,+EAA4B,CAAC,CAAC;AACpD,QAAA,sBAAsB,GAGjB,IAAA,+BAAgB,EAAC,+EAA4B,CAAC,CAAC;AACpD,QAAA,sBAAsB,GAGjB,IAAA,+BAAgB,EAAC,+EAA4B,CAAC,CAAC;AACpD,QAAA,0BAA0B,GAGrB,IAAA,+BAAgB,EAAC,mFAAgC,CAAC,CAAC;AACxD,QAAA,2BAA2B,GAGtB,IAAA,+BAAgB,EAAC,oFAAiC,CAAC,CAAC;AACtE;;GAEG;AACU,QAAA,yBAAyB,GAElC,IAAA,4CAAiB,EAAC,kFAA+B,CAAC,CAAC;AACvD;;GAEG;AACU,QAAA,yBAAyB,GAElC,IAAA,4CAAiB,EAAC,kFAA+B,CAAC,CAAC;AACvD;;GAEG;AACU,QAAA,yBAAyB,GAElC,IAAA,4CAAiB,EAAC,kFAA+B,CAAC,CAAC;AACvD;;GAEG;AACU,QAAA,sBAAsB,GAE/B,IAAA,4CAAiB,EAAC,+EAA4B,CAAC,CAAC;AAEpD,yIA2BqE;AA1BnE,mJAAA,MAAM,OAAA;AACN,gKAAA,mBAAmB,OAAA;AACnB,8JAAA,iBAAiB,OAAA;AACjB,6JAAA,gBAAgB,OAAA;AAChB,kKAAA,qBAAqB,OAAA;AACrB,qJAAA,QAAQ,OAAA;AACR,sJAAA,SAAS,OAAA;AACT,6JAAA,gBAAgB,OAAA;AAChB,mKAAA,sBAAsB,OAAA;AACtB,+JAAA,kBAAkB,OAAA;AAClB,oJAAA,OAAO,OAAA;AACP,yJAAA,YAAY,OAAA;AACZ,uJAAA,UAAU,OAAA;AACV,qJAAA,QAAQ,OAAA;AACR,yJAAA,YAAY,OAAA;AACZ,uJAAA,UAAU,OAAA;AACV,qJAAA,QAAQ,OAAA;AACR,oKAAA,uBAAuB,OAAA;AACvB,2JAAA,cAAc,OAAA;AACd,wJAAA,WAAW,OAAA;AACX,gKAAA,mBAAmB,OAAA;AACnB,qJAAA,QAAQ,OAAA;AACR,wJAAA,WAAW,OAAA;AACX,2JAAA,cAAc,OAAA;AACd,yJAAA,YAAY,OAAA;AACZ,gKAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a checkout template.
|
|
4
|
+
*
|
|
5
|
+
* A checkout template is used to create a new checkout that will include predefined information. For example, a single link with
|
|
6
|
+
* a `checkoutTemplateId` can be shared with customers and each time the link is clicked, a new checkout page will be created
|
|
7
|
+
* for that customer with certain checkout information already populated.
|
|
8
|
+
*
|
|
9
|
+
* The customizable features include the option to allow or to lock coupon codes or gift cards. For example, if a store owner is
|
|
10
|
+
* using the checkout template to offer a flash sale to their social media followers, they may want to lock the option to apply an
|
|
11
|
+
* additional coupon on top of the sale being offered. If so, they can set `customization.lockedCoupon` to `true`.
|
|
12
|
+
*
|
|
13
|
+
* A checkout can be created with a checkout template by calling `createCheckoutFromTemplate()`. The site may add further customizations to the new checkout and then redirect the customer using the new checkout's `checkoutUrl`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createCheckoutTemplate(payload: object): RequestOptionsFactory<any>;
|
|
16
|
+
/** Retrieves a checkout template. */
|
|
17
|
+
export declare function getCheckoutTemplate(payload: object): RequestOptionsFactory<any>;
|
|
18
|
+
/**
|
|
19
|
+
* Updates a checkout template.
|
|
20
|
+
*
|
|
21
|
+
* If the info in a checkout template is updated, only new checkouts created from this template will include the updated items. Checkouts previously
|
|
22
|
+
* created from this template before the update will not be affected.
|
|
23
|
+
*/
|
|
24
|
+
export declare function updateCheckoutTemplate(payload: object): RequestOptionsFactory<any>;
|
|
25
|
+
/**
|
|
26
|
+
* Deletes a checkout template.
|
|
27
|
+
*
|
|
28
|
+
* If a checkout template is deleted and a customer attempts to create a checkout with that `checkoutTemplateId` then
|
|
29
|
+
* the customer will be redirected to the domain site.
|
|
30
|
+
*/
|
|
31
|
+
export declare function deleteCheckoutTemplate(payload: object): RequestOptionsFactory<any>;
|
|
32
|
+
/**
|
|
33
|
+
* Creates a query to retrieve a list of checkout templates.
|
|
34
|
+
*
|
|
35
|
+
* The `queryCheckoutTemplates()` function builds a query to retrieve a list of checkout templates and returns a `CheckoutTemplatesQueryBuilder` object.
|
|
36
|
+
*
|
|
37
|
+
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
38
|
+
*
|
|
39
|
+
* You can refine the query by chaining `CheckoutTemplatesQueryBuilder` functions onto the query. `CheckoutTemplatesQueryBuilder` functions enable you to sort, filter, and control the results that `queryCheckoutTemplates()` returns.
|
|
40
|
+
*
|
|
41
|
+
* `queryCheckoutTemplates()` runs with the following `CheckoutTemplatesQueryBuilder` default that you can override:
|
|
42
|
+
* + `ascending("_id")`
|
|
43
|
+
*
|
|
44
|
+
* The functions that are chained to `queryCheckoutTemplates()` are applied in the order they are called. For example, if you apply `ascending("status")` and then `ascending("_id")`, the results are sorted first by the `"status"`, and then, if there are multiple results with the same `"status"`, the items are sorted by `"_id"`.
|
|
45
|
+
*
|
|
46
|
+
* The following `CheckoutTemplatesQueryBuilder` functions are supported for the `queryCheckoutTemplates()` function. For a full description of the checkout template object, see the object returned for the `items` property in `CheckoutTemplatesQueryResult`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function queryCheckoutTemplates(payload: object): RequestOptionsFactory<any>;
|
|
49
|
+
/**
|
|
50
|
+
* Creates a new checkout based on the checkout template.
|
|
51
|
+
*
|
|
52
|
+
* Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.
|
|
53
|
+
*
|
|
54
|
+
* The customer can be directed to the new checkout using the checkout's `checkoutUrl`.
|
|
55
|
+
*/
|
|
56
|
+
export declare function createCheckoutFromTemplate(payload: object): RequestOptionsFactory<any>;
|
|
57
|
+
/**
|
|
58
|
+
* Creates a new checkout based on the checkout template and redirects to the new checkout page.
|
|
59
|
+
*
|
|
60
|
+
* Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.
|
|
61
|
+
*
|
|
62
|
+
* To build a URL that uses this function, follow this format:
|
|
63
|
+
* `https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout?siteId={siteId}`
|
|
64
|
+
*
|
|
65
|
+
* To create a checkout but not automatically redirect to the checkout page, use `createCheckoutFromTemplate()`.
|
|
66
|
+
*/
|
|
67
|
+
export declare function createAndRedirectToCheckout(payload: object): RequestOptionsFactory<any>;
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAndRedirectToCheckout = exports.createCheckoutFromTemplate = exports.queryCheckoutTemplates = exports.deleteCheckoutTemplate = exports.updateCheckoutTemplate = exports.getCheckoutTemplate = exports.createCheckoutTemplate = void 0;
|
|
4
|
+
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
5
|
+
const float_1 = require("@wix/sdk-runtime/transformations/float");
|
|
6
|
+
const float_2 = require("@wix/sdk-runtime/transformations/float");
|
|
7
|
+
const bytes_1 = require("@wix/sdk-runtime/transformations/bytes");
|
|
8
|
+
const timestamp_1 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
9
|
+
const timestamp_2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
10
|
+
const field_mask_1 = require("@wix/sdk-runtime/transformations/field-mask");
|
|
11
|
+
const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
12
|
+
const rest_modules_2 = require("@wix/sdk-runtime/rest-modules");
|
|
13
|
+
function resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl(opts) {
|
|
14
|
+
const domainToMappings = {
|
|
15
|
+
'www._base_domain_': [
|
|
16
|
+
{
|
|
17
|
+
srcPath: '/ecom/v1/checkout-templates',
|
|
18
|
+
destPath: '/v1/checkout-templates',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
'www.wixapis.com': [
|
|
22
|
+
{
|
|
23
|
+
srcPath: '/ecom/v1/checkout-templates',
|
|
24
|
+
destPath: '/v1/checkout-templates',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
return (0, rest_modules_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
29
|
+
}
|
|
30
|
+
const PACKAGE_NAME = '@wix/auto_sdk_ecom_checkout-templates';
|
|
31
|
+
/**
|
|
32
|
+
* Creates a checkout template.
|
|
33
|
+
*
|
|
34
|
+
* A checkout template is used to create a new checkout that will include predefined information. For example, a single link with
|
|
35
|
+
* a `checkoutTemplateId` can be shared with customers and each time the link is clicked, a new checkout page will be created
|
|
36
|
+
* for that customer with certain checkout information already populated.
|
|
37
|
+
*
|
|
38
|
+
* The customizable features include the option to allow or to lock coupon codes or gift cards. For example, if a store owner is
|
|
39
|
+
* using the checkout template to offer a flash sale to their social media followers, they may want to lock the option to apply an
|
|
40
|
+
* additional coupon on top of the sale being offered. If so, they can set `customization.lockedCoupon` to `true`.
|
|
41
|
+
*
|
|
42
|
+
* A checkout can be created with a checkout template by calling `createCheckoutFromTemplate()`. The site may add further customizations to the new checkout and then redirect the customer using the new checkout's `checkoutUrl`.
|
|
43
|
+
*/
|
|
44
|
+
function createCheckoutTemplate(payload) {
|
|
45
|
+
function __createCheckoutTemplate({ host }) {
|
|
46
|
+
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
|
47
|
+
{
|
|
48
|
+
transformFn: float_1.transformSDKFloatToRESTFloat,
|
|
49
|
+
paths: [
|
|
50
|
+
{
|
|
51
|
+
path: 'checkoutTemplate.lineItems.catalogOverrideFields.physicalProperties.weight',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
path: 'checkoutTemplate.customLineItems.physicalProperties.weight',
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
|
|
60
|
+
paths: [
|
|
61
|
+
{
|
|
62
|
+
path: 'checkoutTemplate.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
path: 'checkoutTemplate.customLineItems.serviceProperties.scheduledDate',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
]);
|
|
70
|
+
const metadata = {
|
|
71
|
+
entityFqdn: 'wix.ecom.v1.checkout_template',
|
|
72
|
+
method: 'POST',
|
|
73
|
+
methodFqn: 'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateCheckoutTemplate',
|
|
74
|
+
packageName: PACKAGE_NAME,
|
|
75
|
+
url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({
|
|
76
|
+
protoPath: '/v1/checkout-templates',
|
|
77
|
+
data: serializedData,
|
|
78
|
+
host,
|
|
79
|
+
}),
|
|
80
|
+
data: serializedData,
|
|
81
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
82
|
+
{
|
|
83
|
+
transformFn: float_2.transformRESTFloatToSDKFloat,
|
|
84
|
+
paths: [
|
|
85
|
+
{
|
|
86
|
+
path: 'checkoutTemplate.lineItems.catalogOverrideFields.physicalProperties.weight',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
path: 'checkoutTemplate.customLineItems.physicalProperties.weight',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
|
95
|
+
paths: [
|
|
96
|
+
{
|
|
97
|
+
path: 'checkoutTemplate.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
path: 'checkoutTemplate.customLineItems.serviceProperties.scheduledDate',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
]),
|
|
105
|
+
};
|
|
106
|
+
return metadata;
|
|
107
|
+
}
|
|
108
|
+
return __createCheckoutTemplate;
|
|
109
|
+
}
|
|
110
|
+
exports.createCheckoutTemplate = createCheckoutTemplate;
|
|
111
|
+
/** Retrieves a checkout template. */
|
|
112
|
+
function getCheckoutTemplate(payload) {
|
|
113
|
+
function __getCheckoutTemplate({ host }) {
|
|
114
|
+
const metadata = {
|
|
115
|
+
entityFqdn: 'wix.ecom.v1.checkout_template',
|
|
116
|
+
method: 'GET',
|
|
117
|
+
methodFqn: 'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.GetCheckoutTemplate',
|
|
118
|
+
packageName: PACKAGE_NAME,
|
|
119
|
+
url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({
|
|
120
|
+
protoPath: '/v1/checkout-templates/{checkoutTemplateId}',
|
|
121
|
+
data: payload,
|
|
122
|
+
host,
|
|
123
|
+
}),
|
|
124
|
+
params: (0, rest_modules_1.toURLSearchParams)(payload),
|
|
125
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
126
|
+
{
|
|
127
|
+
transformFn: float_2.transformRESTFloatToSDKFloat,
|
|
128
|
+
paths: [
|
|
129
|
+
{
|
|
130
|
+
path: 'checkoutTemplate.lineItems.catalogOverrideFields.physicalProperties.weight',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
path: 'checkoutTemplate.customLineItems.physicalProperties.weight',
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
|
139
|
+
paths: [
|
|
140
|
+
{
|
|
141
|
+
path: 'checkoutTemplate.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
path: 'checkoutTemplate.customLineItems.serviceProperties.scheduledDate',
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
]),
|
|
149
|
+
};
|
|
150
|
+
return metadata;
|
|
151
|
+
}
|
|
152
|
+
return __getCheckoutTemplate;
|
|
153
|
+
}
|
|
154
|
+
exports.getCheckoutTemplate = getCheckoutTemplate;
|
|
155
|
+
/**
|
|
156
|
+
* Updates a checkout template.
|
|
157
|
+
*
|
|
158
|
+
* If the info in a checkout template is updated, only new checkouts created from this template will include the updated items. Checkouts previously
|
|
159
|
+
* created from this template before the update will not be affected.
|
|
160
|
+
*/
|
|
161
|
+
function updateCheckoutTemplate(payload) {
|
|
162
|
+
function __updateCheckoutTemplate({ host }) {
|
|
163
|
+
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
|
164
|
+
{
|
|
165
|
+
transformFn: field_mask_1.transformSDKFieldMaskToRESTFieldMask,
|
|
166
|
+
paths: [{ path: 'fieldMask' }],
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
transformFn: float_1.transformSDKFloatToRESTFloat,
|
|
170
|
+
paths: [
|
|
171
|
+
{
|
|
172
|
+
path: 'checkoutTemplate.lineItems.catalogOverrideFields.physicalProperties.weight',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
path: 'checkoutTemplate.customLineItems.physicalProperties.weight',
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
|
|
181
|
+
paths: [
|
|
182
|
+
{
|
|
183
|
+
path: 'checkoutTemplate.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
path: 'checkoutTemplate.customLineItems.serviceProperties.scheduledDate',
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
]);
|
|
191
|
+
const metadata = {
|
|
192
|
+
entityFqdn: 'wix.ecom.v1.checkout_template',
|
|
193
|
+
method: 'PATCH',
|
|
194
|
+
methodFqn: 'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.UpdateCheckoutTemplate',
|
|
195
|
+
packageName: PACKAGE_NAME,
|
|
196
|
+
url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({
|
|
197
|
+
protoPath: '/v1/checkout-templates/{checkoutTemplate.id}',
|
|
198
|
+
data: serializedData,
|
|
199
|
+
host,
|
|
200
|
+
}),
|
|
201
|
+
data: serializedData,
|
|
202
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
203
|
+
{
|
|
204
|
+
transformFn: float_2.transformRESTFloatToSDKFloat,
|
|
205
|
+
paths: [
|
|
206
|
+
{
|
|
207
|
+
path: 'checkoutTemplate.lineItems.catalogOverrideFields.physicalProperties.weight',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
path: 'checkoutTemplate.customLineItems.physicalProperties.weight',
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
|
216
|
+
paths: [
|
|
217
|
+
{
|
|
218
|
+
path: 'checkoutTemplate.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
path: 'checkoutTemplate.customLineItems.serviceProperties.scheduledDate',
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
},
|
|
225
|
+
]),
|
|
226
|
+
};
|
|
227
|
+
return metadata;
|
|
228
|
+
}
|
|
229
|
+
return __updateCheckoutTemplate;
|
|
230
|
+
}
|
|
231
|
+
exports.updateCheckoutTemplate = updateCheckoutTemplate;
|
|
232
|
+
/**
|
|
233
|
+
* Deletes a checkout template.
|
|
234
|
+
*
|
|
235
|
+
* If a checkout template is deleted and a customer attempts to create a checkout with that `checkoutTemplateId` then
|
|
236
|
+
* the customer will be redirected to the domain site.
|
|
237
|
+
*/
|
|
238
|
+
function deleteCheckoutTemplate(payload) {
|
|
239
|
+
function __deleteCheckoutTemplate({ host }) {
|
|
240
|
+
const metadata = {
|
|
241
|
+
entityFqdn: 'wix.ecom.v1.checkout_template',
|
|
242
|
+
method: 'DELETE',
|
|
243
|
+
methodFqn: 'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.DeleteCheckoutTemplate',
|
|
244
|
+
packageName: PACKAGE_NAME,
|
|
245
|
+
url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({
|
|
246
|
+
protoPath: '/v1/checkout-templates/{checkoutTemplateId}',
|
|
247
|
+
data: payload,
|
|
248
|
+
host,
|
|
249
|
+
}),
|
|
250
|
+
params: (0, rest_modules_1.toURLSearchParams)(payload),
|
|
251
|
+
};
|
|
252
|
+
return metadata;
|
|
253
|
+
}
|
|
254
|
+
return __deleteCheckoutTemplate;
|
|
255
|
+
}
|
|
256
|
+
exports.deleteCheckoutTemplate = deleteCheckoutTemplate;
|
|
257
|
+
/**
|
|
258
|
+
* Creates a query to retrieve a list of checkout templates.
|
|
259
|
+
*
|
|
260
|
+
* The `queryCheckoutTemplates()` function builds a query to retrieve a list of checkout templates and returns a `CheckoutTemplatesQueryBuilder` object.
|
|
261
|
+
*
|
|
262
|
+
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
263
|
+
*
|
|
264
|
+
* You can refine the query by chaining `CheckoutTemplatesQueryBuilder` functions onto the query. `CheckoutTemplatesQueryBuilder` functions enable you to sort, filter, and control the results that `queryCheckoutTemplates()` returns.
|
|
265
|
+
*
|
|
266
|
+
* `queryCheckoutTemplates()` runs with the following `CheckoutTemplatesQueryBuilder` default that you can override:
|
|
267
|
+
* + `ascending("_id")`
|
|
268
|
+
*
|
|
269
|
+
* The functions that are chained to `queryCheckoutTemplates()` are applied in the order they are called. For example, if you apply `ascending("status")` and then `ascending("_id")`, the results are sorted first by the `"status"`, and then, if there are multiple results with the same `"status"`, the items are sorted by `"_id"`.
|
|
270
|
+
*
|
|
271
|
+
* The following `CheckoutTemplatesQueryBuilder` functions are supported for the `queryCheckoutTemplates()` function. For a full description of the checkout template object, see the object returned for the `items` property in `CheckoutTemplatesQueryResult`.
|
|
272
|
+
*/
|
|
273
|
+
function queryCheckoutTemplates(payload) {
|
|
274
|
+
function __queryCheckoutTemplates({ host }) {
|
|
275
|
+
const metadata = {
|
|
276
|
+
entityFqdn: 'wix.ecom.v1.checkout_template',
|
|
277
|
+
method: 'POST',
|
|
278
|
+
methodFqn: 'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.QueryCheckoutTemplates',
|
|
279
|
+
packageName: PACKAGE_NAME,
|
|
280
|
+
url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({
|
|
281
|
+
protoPath: '/v1/checkout-templates/query',
|
|
282
|
+
data: payload,
|
|
283
|
+
host,
|
|
284
|
+
}),
|
|
285
|
+
data: payload,
|
|
286
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
287
|
+
{
|
|
288
|
+
transformFn: float_2.transformRESTFloatToSDKFloat,
|
|
289
|
+
paths: [
|
|
290
|
+
{
|
|
291
|
+
path: 'checkoutTemplates.lineItems.catalogOverrideFields.physicalProperties.weight',
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
path: 'checkoutTemplates.customLineItems.physicalProperties.weight',
|
|
295
|
+
},
|
|
296
|
+
],
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
|
300
|
+
paths: [
|
|
301
|
+
{
|
|
302
|
+
path: 'checkoutTemplates.customLineItems.subscriptionOptionInfo.subscriptionSettings.startDate',
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
path: 'checkoutTemplates.customLineItems.serviceProperties.scheduledDate',
|
|
306
|
+
},
|
|
307
|
+
],
|
|
308
|
+
},
|
|
309
|
+
]),
|
|
310
|
+
};
|
|
311
|
+
return metadata;
|
|
312
|
+
}
|
|
313
|
+
return __queryCheckoutTemplates;
|
|
314
|
+
}
|
|
315
|
+
exports.queryCheckoutTemplates = queryCheckoutTemplates;
|
|
316
|
+
/**
|
|
317
|
+
* Creates a new checkout based on the checkout template.
|
|
318
|
+
*
|
|
319
|
+
* Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.
|
|
320
|
+
*
|
|
321
|
+
* The customer can be directed to the new checkout using the checkout's `checkoutUrl`.
|
|
322
|
+
*/
|
|
323
|
+
function createCheckoutFromTemplate(payload) {
|
|
324
|
+
function __createCheckoutFromTemplate({ host }) {
|
|
325
|
+
const metadata = {
|
|
326
|
+
entityFqdn: 'wix.ecom.v1.checkout_template',
|
|
327
|
+
method: 'POST',
|
|
328
|
+
methodFqn: 'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateCheckoutFromTemplate',
|
|
329
|
+
packageName: PACKAGE_NAME,
|
|
330
|
+
url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({
|
|
331
|
+
protoPath: '/v1/checkout-templates/{checkoutTemplateId}/create-checkout-from-template',
|
|
332
|
+
data: payload,
|
|
333
|
+
host,
|
|
334
|
+
}),
|
|
335
|
+
data: payload,
|
|
336
|
+
};
|
|
337
|
+
return metadata;
|
|
338
|
+
}
|
|
339
|
+
return __createCheckoutFromTemplate;
|
|
340
|
+
}
|
|
341
|
+
exports.createCheckoutFromTemplate = createCheckoutFromTemplate;
|
|
342
|
+
/**
|
|
343
|
+
* Creates a new checkout based on the checkout template and redirects to the new checkout page.
|
|
344
|
+
*
|
|
345
|
+
* Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`.
|
|
346
|
+
*
|
|
347
|
+
* To build a URL that uses this function, follow this format:
|
|
348
|
+
* `https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout?siteId={siteId}`
|
|
349
|
+
*
|
|
350
|
+
* To create a checkout but not automatically redirect to the checkout page, use `createCheckoutFromTemplate()`.
|
|
351
|
+
*/
|
|
352
|
+
function createAndRedirectToCheckout(payload) {
|
|
353
|
+
function __createAndRedirectToCheckout({ host }) {
|
|
354
|
+
const metadata = {
|
|
355
|
+
entityFqdn: 'wix.ecom.v1.checkout_template',
|
|
356
|
+
method: 'GET',
|
|
357
|
+
methodFqn: 'wix.ecom.checkout_template.api.v1.CheckoutTemplateService.CreateAndRedirectToCheckout',
|
|
358
|
+
packageName: PACKAGE_NAME,
|
|
359
|
+
url: resolveWixEcomCheckoutTemplateApiV1CheckoutTemplateServiceUrl({
|
|
360
|
+
protoPath: '/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout',
|
|
361
|
+
data: payload,
|
|
362
|
+
host,
|
|
363
|
+
}),
|
|
364
|
+
params: (0, rest_modules_1.toURLSearchParams)(payload),
|
|
365
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
366
|
+
{
|
|
367
|
+
transformFn: bytes_1.transformRESTBytesToSDKBytes,
|
|
368
|
+
paths: [{ path: 'body' }],
|
|
369
|
+
},
|
|
370
|
+
]),
|
|
371
|
+
};
|
|
372
|
+
return metadata;
|
|
373
|
+
}
|
|
374
|
+
return __createAndRedirectToCheckout;
|
|
375
|
+
}
|
|
376
|
+
exports.createAndRedirectToCheckout = createAndRedirectToCheckout;
|
|
377
|
+
//# sourceMappingURL=ecom-v1-checkout-template-checkout-templates.http.js.map
|