@wix/auto_sdk_ecom_checkout-settings 1.0.62 → 1.0.64
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.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +4 -4
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/ecom-v1-checkout-settings-checkout-settings.public.ts","../../src/ecom-v1-checkout-settings-checkout-settings.universal.ts","../../src/ecom-v1-checkout-settings-checkout-settings.http.ts","../../src/ecom-v1-checkout-settings-checkout-settings.context.ts"],"sourcesContent":["export * from './src/ecom-v1-checkout-settings-checkout-settings.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CheckoutSettings,\n CheckoutSettingsUpdatedEnvelope,\n GetCheckoutSettingsResponse,\n UpdateCheckoutSettingsResponse,\n getCheckoutSettings as universalGetCheckoutSettings,\n updateCheckoutSettings as universalUpdateCheckoutSettings,\n} from './ecom-v1-checkout-settings-checkout-settings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function getCheckoutSettings(\n httpClient: HttpClient\n): GetCheckoutSettingsSignature {\n return () =>\n universalGetCheckoutSettings(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetCheckoutSettingsSignature {\n /**\n * Retrieves the site's checkout settings.\n */\n (): Promise<\n NonNullablePaths<\n GetCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n >;\n}\n\nexport function updateCheckoutSettings(\n httpClient: HttpClient\n): UpdateCheckoutSettingsSignature {\n return (checkoutSettings: CheckoutSettings) =>\n universalUpdateCheckoutSettings(\n checkoutSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCheckoutSettingsSignature {\n /**\n * Updates the site's checkout settings.\n * @param - Checkout settings to update.\n */\n (checkoutSettings: CheckoutSettings): Promise<\n NonNullablePaths<\n UpdateCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n >;\n}\n\nexport const onCheckoutSettingsUpdated = EventDefinition(\n 'wix.ecom.v1.checkout_settings_updated',\n true,\n (event: CheckoutSettingsUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'entity.checkoutBrand.header.logo.image' },\n { path: 'entity.checkoutBrand.header.backgroundFill.image' },\n { path: 'modifiedFields.checkoutBrand.header.logo.image' },\n {\n path: 'modifiedFields.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ])\n )\n)<CheckoutSettingsUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n Alignment,\n BackgroundFill,\n BackgroundFillOptionsOneOf,\n BaseEventMetadata,\n CheckboxField,\n CheckoutBillingFields,\n CheckoutBrand,\n CheckoutFields,\n CheckoutHeader,\n CheckoutPolicies,\n CheckoutSettings,\n CheckoutSettingsUpdatedEnvelope,\n ContactUsPolicy,\n ContinueShopping,\n CustomCheckoutPolicy,\n DeleteCheckoutSettingsRequest,\n DeleteCheckoutSettingsResponse,\n DigitalItemPolicy,\n DisplayType,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n FocalPoint,\n GetCheckoutSettingsRequest,\n GetCheckoutSettingsResponse,\n GiftCardProviderWasProvisioned,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCheckoutSettingsRequest,\n ListCheckoutSettingsResponse,\n Logo,\n LogoSize,\n MessageEnvelope,\n PrivacyPolicy,\n RestoreInfo,\n ReturnPolicy,\n TermsAndConditionsPolicy,\n UpdateCheckoutSettingsRequest,\n UpdateCheckoutSettingsResponse,\n WebhookIdentityType,\n} from './ecom-v1-checkout-settings-checkout-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV1CheckoutSettings from './ecom-v1-checkout-settings-checkout-settings.http.js';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** Site-level settings that control the checkout experience, including policies, field visibility, and branding. */\nexport interface CheckoutSettings {\n /** Checkout policies. */\n checkoutPolicies?: CheckoutPolicies;\n /** Settings that apply to checkout fields and the checkout process. */\n checkoutFields?: CheckoutFields;\n /** Checkout brand settings. */\n checkoutBrand?: CheckoutBrand;\n /**\n * Date and time the checkout settings were created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the checkout settings were updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Billing information required to complete the checkout. */\n checkoutBillingFields?: CheckoutBillingFieldsWithLiterals;\n}\n\nexport interface CheckoutPolicies {\n /** Terms and conditions. */\n termsAndConditions?: TermsAndConditionsPolicy;\n /** Privacy policy. */\n privacyPolicy?: PrivacyPolicy;\n /** Return policy. */\n returnPolicy?: ReturnPolicy;\n /** Digital item policy. */\n digitalItemPolicy?: DigitalItemPolicy;\n /** \"Contact us\" information. */\n contactUs?: ContactUsPolicy;\n /** Custom policy. */\n customPolicy?: CustomCheckoutPolicy;\n}\n\nexport interface TermsAndConditionsPolicy {\n /**\n * Whether the terms and conditions policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Terms and conditions policy content. */\n content?: string | null;\n}\n\nexport interface PrivacyPolicy {\n /**\n * Whether the privacy policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Privacy policy content. */\n content?: string | null;\n}\n\nexport interface ReturnPolicy {\n /**\n * Whether the return policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Return policy content. */\n content?: string | null;\n}\n\nexport interface DigitalItemPolicy {\n /**\n * Whether the digital item policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Digital item policy content. */\n content?: string | null;\n}\n\nexport interface ContactUsPolicy {\n /**\n * Whether the contact us policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Contact us policy content. */\n content?: string | null;\n}\n\nexport interface CustomCheckoutPolicy {\n /**\n * Whether the custom policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Custom policy content. */\n content?: string | null;\n /** Custom policy title. */\n title?: string | null;\n}\n\nexport interface CheckoutFields {\n /**\n * Subscription checkbox. <br><br>\n *\n * Defaults:\n * + `visible`: `false`\n * + `checkedByDefault`: `false`\n */\n subscriptionCheckbox?: CheckboxField;\n /**\n * Policy agreement checkbox. <br><br>\n *\n * Defaults:\n * + `visible`: `false`\n * + `checkedByDefault`: `false`\n */\n policyAgreementCheckbox?: CheckboxField;\n /**\n * Whether the ability to redeem a gift card is enabled. <br><br>\n *\n * Default: `false`\n */\n giftCardRedeemEnabled?: boolean | null;\n /**\n * Whether to allow for MIT transactions. <br><br>\n *\n * Default: `false`\n */\n mitEnabled?: boolean | null;\n /**\n * Whether to allow for Auth & Capture transactions. <br><br>\n *\n * Default: `false`\n */\n delayCaptureEnabled?: boolean | null;\n /**\n * Whether to automatically capture the transaction before the authorization expires.\n *\n * Default: `true`\n * >**Note:** this setting is only relevant when `delay_capture_enabled: true`.\n */\n captureBeforeExpiryEnabled?: boolean | null;\n}\n\nexport interface CheckboxField {\n /** Whether the checkbox is visible to the customer. */\n visible?: boolean | null;\n /** Whether the checkbox is checked by default. */\n checkedByDefault?: boolean | null;\n}\n\nexport interface CheckoutBrand {\n /** Checkout header. */\n header?: CheckoutHeader;\n}\n\nexport interface CheckoutHeader {\n /**\n * Textual content to be included in the header (e.g. Business Name)\n * @maxLength 55\n */\n text?: string | null;\n /**\n * Text color hex code.\n * @format COLOR_HEX\n */\n textColor?: string | null;\n /** Specifications for when a logo is included in the header. */\n logo?: Logo;\n /**\n * Alignment within the header.\n *\n * >**Note:** `SIDE` alignment is decided depending on the locale's language. For example, scripts like Hebrew and Arabic will automatically align right-to-left.\n */\n alignment?: AlignmentWithLiterals;\n /**\n * Whether to display the 'Checkout' label within the header.\n * Depending on the locale, the label may be translated.\n */\n displayCheckoutLabel?: boolean | null;\n /** Continue shopping specifications. */\n continueShopping?: ContinueShopping;\n /** Background fill specifications. */\n backgroundFill?: BackgroundFill;\n}\n\nexport interface Logo {\n /** Size of the logo. */\n size?: LogoSizeWithLiterals;\n}\n\nexport interface FocalPoint {\n /** X-coordinate of the focal point. */\n x?: number;\n /** Y-coordinate of the focal point. */\n y?: number;\n /** crop by height */\n height?: number | null;\n /** crop by width */\n width?: number | null;\n}\n\nexport enum LogoSize {\n SMALL = 'SMALL',\n MEDIUM = 'MEDIUM',\n LARGE = 'LARGE',\n}\n\n/** @enumType */\nexport type LogoSizeWithLiterals = LogoSize | 'SMALL' | 'MEDIUM' | 'LARGE';\n\nexport enum Alignment {\n SIDE = 'SIDE',\n CENTER = 'CENTER',\n}\n\n/** @enumType */\nexport type AlignmentWithLiterals = Alignment | 'SIDE' | 'CENTER';\n\nexport interface ContinueShopping {\n /** Whether the continue shopping element is hidden. */\n hidden?: boolean | null;\n /** Display type for the continue shopping element. */\n displayType?: DisplayTypeWithLiterals;\n}\n\nexport enum DisplayType {\n TEXT = 'TEXT',\n ICON = 'ICON',\n}\n\n/** @enumType */\nexport type DisplayTypeWithLiterals = DisplayType | 'TEXT' | 'ICON';\n\nexport interface BackgroundFill extends BackgroundFillOptionsOneOf {\n /**\n * Background color hex code.\n * @format COLOR_HEX\n */\n color?: string | null;\n /** Background image. */\n image?: string;\n}\n\n/** @oneof */\nexport interface BackgroundFillOptionsOneOf {\n /**\n * Background color hex code.\n * @format COLOR_HEX\n */\n color?: string | null;\n /** Background image. */\n image?: string;\n}\n\nexport enum CheckoutBillingFields {\n /** All billing information fields are required. */\n All_FIELDS = 'All_FIELDS',\n /** Minimum required fields as defined by the country, payment method and payment provider. */\n MINIMUM_REQUIRED_FIELDS = 'MINIMUM_REQUIRED_FIELDS',\n}\n\n/** @enumType */\nexport type CheckoutBillingFieldsWithLiterals =\n | CheckoutBillingFields\n | 'All_FIELDS'\n | 'MINIMUM_REQUIRED_FIELDS';\n\nexport interface GetCheckoutSettingsRequest {}\n\nexport interface GetCheckoutSettingsResponse {\n /** Checkout settings. */\n checkoutSettings?: CheckoutSettings;\n}\n\nexport interface UpdateCheckoutSettingsRequest {\n /** Checkout settings to update. */\n checkoutSettings: CheckoutSettings;\n}\n\nexport interface UpdateCheckoutSettingsResponse {\n /** Updated checkout settings. */\n checkoutSettings?: CheckoutSettings;\n}\n\nexport interface ListCheckoutSettingsRequest {}\n\nexport interface ListCheckoutSettingsResponse {\n /** List of retrieved checkout settings. */\n checkoutSettings?: CheckoutSettings[];\n}\n\nexport interface GiftCardProviderWasProvisioned {\n /** The gift card provider which was installed */\n providerAppDefId?: string;\n providerInstanceId?: string;\n}\n\nexport interface Empty {}\n\nexport interface DeleteCheckoutSettingsRequest {}\n\nexport interface DeleteCheckoutSettingsResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface CheckoutSettingsUpdatedEnvelope {\n entity: CheckoutSettings;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when checkout settings are updated.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId ECOM.READ_CHECKOUT_SETTINGS\n * @webhook\n * @eventType wix.ecom.v1.checkout_settings_updated\n * @slug updated\n */\nexport declare function onCheckoutSettingsUpdated(\n handler: (event: CheckoutSettingsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the site's checkout settings.\n * @public\n * @permissionId ECOM.READ_CHECKOUT_SETTINGS\n * @applicableIdentity APP\n * @fqn wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.GetCheckoutSettings\n */\nexport async function getCheckoutSettings(): Promise<\n NonNullablePaths<\n GetCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixEcomV1CheckoutSettings.getCheckoutSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates the site's checkout settings.\n * @param checkoutSettings - Checkout settings to update.\n * @public\n * @requiredField checkoutSettings\n * @permissionId ECOM.UPDATE_CHECKOUT_SETTINGS\n * @applicableIdentity APP\n * @fqn wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.UpdateCheckoutSettings\n */\nexport async function updateCheckoutSettings(\n checkoutSettings: CheckoutSettings\n): Promise<\n NonNullablePaths<\n UpdateCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n checkoutSettings: checkoutSettings,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixEcomV1CheckoutSettings.updateCheckoutSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { checkoutSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['checkoutSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/checkout-settings',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n _: [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_checkout-settings';\n\n/** Retrieves the site's checkout settings. */\nexport function getCheckoutSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getCheckoutSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v1.checkout_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.GetCheckoutSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl({\n protoPath: '/v1/checkout-settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCheckoutSettings;\n}\n\n/** Updates the site's checkout settings. */\nexport function updateCheckoutSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateCheckoutSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.checkout_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.UpdateCheckoutSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl({\n protoPath: '/v1/checkout-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateCheckoutSettings;\n}\n","import {\n getCheckoutSettings as publicGetCheckoutSettings,\n updateCheckoutSettings as publicUpdateCheckoutSettings,\n} from './ecom-v1-checkout-settings-checkout-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCheckoutSettingsUpdated as publicOnCheckoutSettingsUpdated } from './ecom-v1-checkout-settings-checkout-settings.public.js';\n\nexport const getCheckoutSettings: MaybeContext<\n BuildRESTFunction<typeof publicGetCheckoutSettings> &\n typeof publicGetCheckoutSettings\n> = /*#__PURE__*/ createRESTModule(publicGetCheckoutSettings);\nexport const updateCheckoutSettings: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCheckoutSettings> &\n typeof publicUpdateCheckoutSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdateCheckoutSettings);\n/**\n * Triggered when checkout settings are updated.\n */\nexport const onCheckoutSettingsUpdated: BuildEventDefinition<\n typeof publicOnCheckoutSettingsUpdated\n> &\n typeof publicOnCheckoutSettingsUpdated = createEventModule(\n publicOnCheckoutSettingsUpdated\n);\n\nexport {\n LogoSize,\n Alignment,\n DisplayType,\n CheckoutBillingFields,\n WebhookIdentityType,\n} from './ecom-v1-checkout-settings-checkout-settings.universal.js';\nexport {\n CheckoutSettings,\n CheckoutPolicies,\n TermsAndConditionsPolicy,\n PrivacyPolicy,\n ReturnPolicy,\n DigitalItemPolicy,\n ContactUsPolicy,\n CustomCheckoutPolicy,\n CheckoutFields,\n CheckboxField,\n CheckoutBrand,\n CheckoutHeader,\n Logo,\n FocalPoint,\n ContinueShopping,\n BackgroundFill,\n BackgroundFillOptionsOneOf,\n GetCheckoutSettingsRequest,\n GetCheckoutSettingsResponse,\n UpdateCheckoutSettingsRequest,\n UpdateCheckoutSettingsResponse,\n ListCheckoutSettingsRequest,\n ListCheckoutSettingsResponse,\n GiftCardProviderWasProvisioned,\n Empty,\n DeleteCheckoutSettingsRequest,\n DeleteCheckoutSettingsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n CheckoutSettingsUpdatedEnvelope,\n} from './ecom-v1-checkout-settings-checkout-settings.universal.js';\nexport {\n LogoSizeWithLiterals,\n AlignmentWithLiterals,\n DisplayTypeWithLiterals,\n CheckoutBillingFieldsWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './ecom-v1-checkout-settings-checkout-settings.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,iCAAAC;AAAA,EAAA,8BAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,gBAA6C;AAC7C,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACJ9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,oBACd,SAC4B;AAC5B,WAAS,sBAAsB,EAAE,KAAK,GAAQ;AAC5C,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,Q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;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,6BAA6B;AAAA,UACrC,EAAE,MAAM,6BAA6B;AAAA,QACvC;AAAA,MACF;AAAA,MACA;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,yCAAyC;AAAA,UACjD,EAAE,MAAM,mDAAmD;AAAA,UAC3D,EAAE,MAAM,iDAAiD;AAAA,UACzD;AAAA,YACE,MAAM;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAmC;;;AG/FnC,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,0BAGK,2DAAiBA,uBAA4B;AAIxD,IAAMC,iCAG8B;AAAA,EACzC;AACF;","names":["getCheckoutSettings","onCheckoutSettingsUpdated","updateCheckoutSettings","import_rename_all_nested_keys","import_image","import_timestamp","import_transform_paths","import_float","import_timestamp","import_rest_modules","payload","import_image","import_transform_paths","LogoSize","Alignment","DisplayType","CheckoutBillingFields","WebhookIdentityType","getCheckoutSettings","sdkTransformError","updateCheckoutSettings","getCheckoutSettings","updateCheckoutSettings","import_rest_modules","getCheckoutSettings","updateCheckoutSettings","onCheckoutSettingsUpdated"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/ecom-v1-checkout-settings-checkout-settings.public.ts","../../src/ecom-v1-checkout-settings-checkout-settings.universal.ts","../../src/ecom-v1-checkout-settings-checkout-settings.http.ts","../../src/ecom-v1-checkout-settings-checkout-settings.context.ts"],"sourcesContent":["export * from './src/ecom-v1-checkout-settings-checkout-settings.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CheckoutSettings,\n CheckoutSettingsUpdatedEnvelope,\n GetCheckoutSettingsResponse,\n UpdateCheckoutSettingsResponse,\n getCheckoutSettings as universalGetCheckoutSettings,\n updateCheckoutSettings as universalUpdateCheckoutSettings,\n} from './ecom-v1-checkout-settings-checkout-settings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function getCheckoutSettings(\n httpClient: HttpClient\n): GetCheckoutSettingsSignature {\n return () =>\n universalGetCheckoutSettings(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetCheckoutSettingsSignature {\n /**\n * Retrieves the site's checkout settings.\n */\n (): Promise<\n NonNullablePaths<\n GetCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n >;\n}\n\nexport function updateCheckoutSettings(\n httpClient: HttpClient\n): UpdateCheckoutSettingsSignature {\n return (checkoutSettings: CheckoutSettings) =>\n universalUpdateCheckoutSettings(\n checkoutSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateCheckoutSettingsSignature {\n /**\n * Updates the site's checkout settings.\n * @param - Checkout settings to update.\n */\n (checkoutSettings: CheckoutSettings): Promise<\n NonNullablePaths<\n UpdateCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n >;\n}\n\nexport const onCheckoutSettingsUpdated = EventDefinition(\n 'wix.ecom.v1.checkout_settings_updated',\n true,\n (event: CheckoutSettingsUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'entity.checkoutBrand.header.logo.image' },\n { path: 'entity.checkoutBrand.header.backgroundFill.image' },\n { path: 'modifiedFields.checkoutBrand.header.logo.image' },\n {\n path: 'modifiedFields.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ])\n )\n)<CheckoutSettingsUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n Alignment,\n BackgroundFill,\n BackgroundFillOptionsOneOf,\n BaseEventMetadata,\n CheckboxField,\n CheckoutBillingFields,\n CheckoutBrand,\n CheckoutFields,\n CheckoutHeader,\n CheckoutPolicies,\n CheckoutSettings,\n CheckoutSettingsUpdatedEnvelope,\n ContactUsPolicy,\n ContinueShopping,\n CustomCheckoutPolicy,\n DeleteCheckoutSettingsRequest,\n DeleteCheckoutSettingsResponse,\n DigitalItemPolicy,\n DisplayType,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n FocalPoint,\n GetCheckoutSettingsRequest,\n GetCheckoutSettingsResponse,\n GiftCardProviderWasProvisioned,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListCheckoutSettingsRequest,\n ListCheckoutSettingsResponse,\n Logo,\n LogoSize,\n MessageEnvelope,\n PrivacyPolicy,\n RestoreInfo,\n ReturnPolicy,\n TermsAndConditionsPolicy,\n UpdateCheckoutSettingsRequest,\n UpdateCheckoutSettingsResponse,\n WebhookIdentityType,\n} from './ecom-v1-checkout-settings-checkout-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV1CheckoutSettings from './ecom-v1-checkout-settings-checkout-settings.http.js';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** Site-level settings that control the checkout experience, including policies, field visibility, and branding. */\nexport interface CheckoutSettings {\n /** Checkout policies. */\n checkoutPolicies?: CheckoutPolicies;\n /** Settings that apply to checkout fields and the checkout process. */\n checkoutFields?: CheckoutFields;\n /** Checkout brand settings. */\n checkoutBrand?: CheckoutBrand;\n /**\n * Date and time the checkout settings were created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the checkout settings were updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Billing information required to complete the checkout. */\n checkoutBillingFields?: CheckoutBillingFieldsWithLiterals;\n}\n\nexport interface CheckoutPolicies {\n /** Terms and conditions. */\n termsAndConditions?: TermsAndConditionsPolicy;\n /** Privacy policy. */\n privacyPolicy?: PrivacyPolicy;\n /** Return policy. */\n returnPolicy?: ReturnPolicy;\n /** Digital item policy. */\n digitalItemPolicy?: DigitalItemPolicy;\n /** \"Contact us\" information. */\n contactUs?: ContactUsPolicy;\n /** Custom policy. */\n customPolicy?: CustomCheckoutPolicy;\n}\n\nexport interface TermsAndConditionsPolicy {\n /**\n * Whether the terms and conditions policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Terms and conditions policy content. */\n content?: string | null;\n}\n\nexport interface PrivacyPolicy {\n /**\n * Whether the privacy policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Privacy policy content. */\n content?: string | null;\n}\n\nexport interface ReturnPolicy {\n /**\n * Whether the return policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Return policy content. */\n content?: string | null;\n}\n\nexport interface DigitalItemPolicy {\n /**\n * Whether the digital item policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Digital item policy content. */\n content?: string | null;\n}\n\nexport interface ContactUsPolicy {\n /**\n * Whether the contact us policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Contact us policy content. */\n content?: string | null;\n}\n\nexport interface CustomCheckoutPolicy {\n /**\n * Whether the custom policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Custom policy content. */\n content?: string | null;\n /** Custom policy title. */\n title?: string | null;\n}\n\nexport interface CheckoutFields {\n /**\n * Subscription checkbox. <br><br>\n *\n * Defaults:\n * + `visible`: `false`\n * + `checkedByDefault`: `false`\n */\n subscriptionCheckbox?: CheckboxField;\n /**\n * Policy agreement checkbox. <br><br>\n *\n * Defaults:\n * + `visible`: `false`\n * + `checkedByDefault`: `false`\n */\n policyAgreementCheckbox?: CheckboxField;\n /**\n * Whether the ability to redeem a gift card is enabled. <br><br>\n *\n * Default: `false`\n */\n giftCardRedeemEnabled?: boolean | null;\n /**\n * Whether to allow for MIT transactions. <br><br>\n *\n * Default: `false`\n */\n mitEnabled?: boolean | null;\n /**\n * Whether to allow for Auth & Capture transactions. <br><br>\n *\n * Default: `false`\n */\n delayCaptureEnabled?: boolean | null;\n /**\n * Whether to automatically capture the transaction before the authorization expires.\n *\n * Default: `true`\n * >**Note:** this setting is only relevant when `delay_capture_enabled: true`.\n */\n captureBeforeExpiryEnabled?: boolean | null;\n}\n\nexport interface CheckboxField {\n /** Whether the checkbox is visible to the customer. */\n visible?: boolean | null;\n /** Whether the checkbox is checked by default. */\n checkedByDefault?: boolean | null;\n}\n\nexport interface CheckoutBrand {\n /** Checkout header. */\n header?: CheckoutHeader;\n}\n\nexport interface CheckoutHeader {\n /**\n * Textual content to be included in the header (e.g. Business Name)\n * @maxLength 55\n */\n text?: string | null;\n /**\n * Text color hex code.\n * @format COLOR_HEX\n */\n textColor?: string | null;\n /** Specifications for when a logo is included in the header. */\n logo?: Logo;\n /**\n * Alignment within the header.\n *\n * >**Note:** `SIDE` alignment is decided depending on the locale's language. For example, scripts like Hebrew and Arabic will automatically align right-to-left.\n */\n alignment?: AlignmentWithLiterals;\n /**\n * Whether to display the 'Checkout' label within the header.\n * Depending on the locale, the label may be translated.\n */\n displayCheckoutLabel?: boolean | null;\n /** Continue shopping specifications. */\n continueShopping?: ContinueShopping;\n /** Background fill specifications. */\n backgroundFill?: BackgroundFill;\n}\n\nexport interface Logo {\n /** Size of the logo. */\n size?: LogoSizeWithLiterals;\n}\n\nexport interface FocalPoint {\n /** X-coordinate of the focal point. */\n x?: number;\n /** Y-coordinate of the focal point. */\n y?: number;\n /** crop by height */\n height?: number | null;\n /** crop by width */\n width?: number | null;\n}\n\nexport enum LogoSize {\n SMALL = 'SMALL',\n MEDIUM = 'MEDIUM',\n LARGE = 'LARGE',\n}\n\n/** @enumType */\nexport type LogoSizeWithLiterals = LogoSize | 'SMALL' | 'MEDIUM' | 'LARGE';\n\nexport enum Alignment {\n SIDE = 'SIDE',\n CENTER = 'CENTER',\n}\n\n/** @enumType */\nexport type AlignmentWithLiterals = Alignment | 'SIDE' | 'CENTER';\n\nexport interface ContinueShopping {\n /** Whether the continue shopping element is hidden. */\n hidden?: boolean | null;\n /** Display type for the continue shopping element. */\n displayType?: DisplayTypeWithLiterals;\n}\n\nexport enum DisplayType {\n TEXT = 'TEXT',\n ICON = 'ICON',\n}\n\n/** @enumType */\nexport type DisplayTypeWithLiterals = DisplayType | 'TEXT' | 'ICON';\n\nexport interface BackgroundFill extends BackgroundFillOptionsOneOf {\n /**\n * Background color hex code.\n * @format COLOR_HEX\n */\n color?: string | null;\n /** Background image. */\n image?: string;\n}\n\n/** @oneof */\nexport interface BackgroundFillOptionsOneOf {\n /**\n * Background color hex code.\n * @format COLOR_HEX\n */\n color?: string | null;\n /** Background image. */\n image?: string;\n}\n\nexport enum CheckoutBillingFields {\n /** All billing information fields are required. */\n All_FIELDS = 'All_FIELDS',\n /** Minimum required fields as defined by the country, payment method and payment provider. */\n MINIMUM_REQUIRED_FIELDS = 'MINIMUM_REQUIRED_FIELDS',\n}\n\n/** @enumType */\nexport type CheckoutBillingFieldsWithLiterals =\n | CheckoutBillingFields\n | 'All_FIELDS'\n | 'MINIMUM_REQUIRED_FIELDS';\n\nexport interface GetCheckoutSettingsRequest {}\n\nexport interface GetCheckoutSettingsResponse {\n /** Checkout settings. */\n checkoutSettings?: CheckoutSettings;\n}\n\nexport interface UpdateCheckoutSettingsRequest {\n /** Checkout settings to update. */\n checkoutSettings: CheckoutSettings;\n}\n\nexport interface UpdateCheckoutSettingsResponse {\n /** Updated checkout settings. */\n checkoutSettings?: CheckoutSettings;\n}\n\nexport interface ListCheckoutSettingsRequest {}\n\nexport interface ListCheckoutSettingsResponse {\n /** List of retrieved checkout settings. */\n checkoutSettings?: CheckoutSettings[];\n}\n\nexport interface GiftCardProviderWasProvisioned {\n /** The gift card provider which was installed */\n providerAppDefId?: string;\n providerInstanceId?: string;\n}\n\nexport interface Empty {}\n\nexport interface DeleteCheckoutSettingsRequest {}\n\nexport interface DeleteCheckoutSettingsResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface CheckoutSettingsUpdatedEnvelope {\n entity: CheckoutSettings;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when checkout settings are updated.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage_Wix_Rentals_App_Forms_submissions\n * @permissionScopeId SCOPE.RENTALS.MANAGE\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId ECOM.READ_CHECKOUT_SETTINGS\n * @webhook\n * @eventType wix.ecom.v1.checkout_settings_updated\n * @slug updated\n */\nexport declare function onCheckoutSettingsUpdated(\n handler: (event: CheckoutSettingsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the site's checkout settings.\n * @public\n * @permissionId ECOM.READ_CHECKOUT_SETTINGS\n * @applicableIdentity APP\n * @fqn wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.GetCheckoutSettings\n */\nexport async function getCheckoutSettings(): Promise<\n NonNullablePaths<\n GetCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixEcomV1CheckoutSettings.getCheckoutSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates the site's checkout settings.\n * @param checkoutSettings - Checkout settings to update.\n * @public\n * @requiredField checkoutSettings\n * @permissionId ECOM.UPDATE_CHECKOUT_SETTINGS\n * @applicableIdentity APP\n * @fqn wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.UpdateCheckoutSettings\n */\nexport async function updateCheckoutSettings(\n checkoutSettings: CheckoutSettings\n): Promise<\n NonNullablePaths<\n UpdateCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n checkoutSettings: checkoutSettings,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixEcomV1CheckoutSettings.updateCheckoutSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { checkoutSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['checkoutSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/checkout-settings',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n _: [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_checkout-settings';\n\n/** Retrieves the site's checkout settings. */\nexport function getCheckoutSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getCheckoutSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v1.checkout_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.GetCheckoutSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl({\n protoPath: '/v1/checkout-settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCheckoutSettings;\n}\n\n/** Updates the site's checkout settings. */\nexport function updateCheckoutSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateCheckoutSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.checkout_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.UpdateCheckoutSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl({\n protoPath: '/v1/checkout-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateCheckoutSettings;\n}\n","import {\n getCheckoutSettings as publicGetCheckoutSettings,\n updateCheckoutSettings as publicUpdateCheckoutSettings,\n} from './ecom-v1-checkout-settings-checkout-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onCheckoutSettingsUpdated as publicOnCheckoutSettingsUpdated } from './ecom-v1-checkout-settings-checkout-settings.public.js';\n\nexport const getCheckoutSettings: MaybeContext<\n BuildRESTFunction<typeof publicGetCheckoutSettings> &\n typeof publicGetCheckoutSettings\n> = /*#__PURE__*/ createRESTModule(publicGetCheckoutSettings);\nexport const updateCheckoutSettings: MaybeContext<\n BuildRESTFunction<typeof publicUpdateCheckoutSettings> &\n typeof publicUpdateCheckoutSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdateCheckoutSettings);\n/**\n * Triggered when checkout settings are updated.\n */\nexport const onCheckoutSettingsUpdated: BuildEventDefinition<\n typeof publicOnCheckoutSettingsUpdated\n> &\n typeof publicOnCheckoutSettingsUpdated = createEventModule(\n publicOnCheckoutSettingsUpdated\n);\n\nexport {\n LogoSize,\n Alignment,\n DisplayType,\n CheckoutBillingFields,\n WebhookIdentityType,\n} from './ecom-v1-checkout-settings-checkout-settings.universal.js';\nexport {\n CheckoutSettings,\n CheckoutPolicies,\n TermsAndConditionsPolicy,\n PrivacyPolicy,\n ReturnPolicy,\n DigitalItemPolicy,\n ContactUsPolicy,\n CustomCheckoutPolicy,\n CheckoutFields,\n CheckboxField,\n CheckoutBrand,\n CheckoutHeader,\n Logo,\n FocalPoint,\n ContinueShopping,\n BackgroundFill,\n BackgroundFillOptionsOneOf,\n GetCheckoutSettingsRequest,\n GetCheckoutSettingsResponse,\n UpdateCheckoutSettingsRequest,\n UpdateCheckoutSettingsResponse,\n ListCheckoutSettingsRequest,\n ListCheckoutSettingsResponse,\n GiftCardProviderWasProvisioned,\n Empty,\n DeleteCheckoutSettingsRequest,\n DeleteCheckoutSettingsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n CheckoutSettingsUpdatedEnvelope,\n} from './ecom-v1-checkout-settings-checkout-settings.universal.js';\nexport {\n LogoSizeWithLiterals,\n AlignmentWithLiterals,\n DisplayTypeWithLiterals,\n CheckoutBillingFieldsWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './ecom-v1-checkout-settings-checkout-settings.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,iCAAAC;AAAA,EAAA,8BAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,gBAA6C;AAC7C,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACJ9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AA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AAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAkBO,SAASC,wBACd,YACiC;AACjC,SAAO,CAAC,qBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,IAAM,gCAA4B;AAAA,EACvC;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,6BAA6B;AAAA,UACrC,EAAE,MAAM,6BAA6B;AAAA,QACvC;AAAA,MACF;AAAA,MACA;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,yCAAyC;AAAA,UACjD,EAAE,MAAM,mDAAmD;AAAA,UAC3D,EAAE,MAAM,iDAAiD;AAAA,UACzD;AAAA,YACE,MAAM;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAmC;;;AG/FnC,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,0BAGK,2DAAiBA,uBAA4B;AAIxD,IAAMC,iCAG8B;AAAA,EACzC;AACF;","names":["getCheckoutSettings","onCheckoutSettingsUpdated","updateCheckoutSettings","import_rename_all_nested_keys","import_image","import_timestamp","import_transform_paths","import_float","import_timestamp","import_rest_modules","payload","import_image","import_transform_paths","LogoSize","Alignment","DisplayType","CheckoutBillingFields","WebhookIdentityType","getCheckoutSettings","sdkTransformError","updateCheckoutSettings","getCheckoutSettings","updateCheckoutSettings","import_rest_modules","getCheckoutSettings","updateCheckoutSettings","onCheckoutSettingsUpdated"]}
|
|
@@ -494,6 +494,8 @@ interface CheckoutSettingsUpdatedEnvelope {
|
|
|
494
494
|
* Triggered when checkout settings are updated.
|
|
495
495
|
* @permissionScope Manage Stores - all permissions
|
|
496
496
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
497
|
+
* @permissionScope Manage_Wix_Rentals_App_Forms_submissions
|
|
498
|
+
* @permissionScopeId SCOPE.RENTALS.MANAGE
|
|
497
499
|
* @permissionScope Manage Stores
|
|
498
500
|
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
499
501
|
* @permissionScope Read eCommerce - all read permissions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/ecom-v1-checkout-settings-checkout-settings.universal.ts","../../src/ecom-v1-checkout-settings-checkout-settings.http.ts"],"sourcesContent":["export * from './src/ecom-v1-checkout-settings-checkout-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV1CheckoutSettings from './ecom-v1-checkout-settings-checkout-settings.http.js';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** Site-level settings that control the checkout experience, including policies, field visibility, and branding. */\nexport interface CheckoutSettings {\n /** Checkout policies. */\n checkoutPolicies?: CheckoutPolicies;\n /** Settings that apply to checkout fields and the checkout process. */\n checkoutFields?: CheckoutFields;\n /** Checkout brand settings. */\n checkoutBrand?: CheckoutBrand;\n /**\n * Date and time the checkout settings were created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the checkout settings were updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Billing information required to complete the checkout. */\n checkoutBillingFields?: CheckoutBillingFieldsWithLiterals;\n}\n\nexport interface CheckoutPolicies {\n /** Terms and conditions. */\n termsAndConditions?: TermsAndConditionsPolicy;\n /** Privacy policy. */\n privacyPolicy?: PrivacyPolicy;\n /** Return policy. */\n returnPolicy?: ReturnPolicy;\n /** Digital item policy. */\n digitalItemPolicy?: DigitalItemPolicy;\n /** \"Contact us\" information. */\n contactUs?: ContactUsPolicy;\n /** Custom policy. */\n customPolicy?: CustomCheckoutPolicy;\n}\n\nexport interface TermsAndConditionsPolicy {\n /**\n * Whether the terms and conditions policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Terms and conditions policy content. */\n content?: string | null;\n}\n\nexport interface PrivacyPolicy {\n /**\n * Whether the privacy policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Privacy policy content. */\n content?: string | null;\n}\n\nexport interface ReturnPolicy {\n /**\n * Whether the return policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Return policy content. */\n content?: string | null;\n}\n\nexport interface DigitalItemPolicy {\n /**\n * Whether the digital item policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Digital item policy content. */\n content?: string | null;\n}\n\nexport interface ContactUsPolicy {\n /**\n * Whether the contact us policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Contact us policy content. */\n content?: string | null;\n}\n\nexport interface CustomCheckoutPolicy {\n /**\n * Whether the custom policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Custom policy content. */\n content?: string | null;\n /** Custom policy title. */\n title?: string | null;\n}\n\nexport interface CheckoutFields {\n /**\n * Subscription checkbox. <br><br>\n *\n * Defaults:\n * + `visible`: `false`\n * + `checkedByDefault`: `false`\n */\n subscriptionCheckbox?: CheckboxField;\n /**\n * Policy agreement checkbox. <br><br>\n *\n * Defaults:\n * + `visible`: `false`\n * + `checkedByDefault`: `false`\n */\n policyAgreementCheckbox?: CheckboxField;\n /**\n * Whether the ability to redeem a gift card is enabled. <br><br>\n *\n * Default: `false`\n */\n giftCardRedeemEnabled?: boolean | null;\n /**\n * Whether to allow for MIT transactions. <br><br>\n *\n * Default: `false`\n */\n mitEnabled?: boolean | null;\n /**\n * Whether to allow for Auth & Capture transactions. <br><br>\n *\n * Default: `false`\n */\n delayCaptureEnabled?: boolean | null;\n /**\n * Whether to automatically capture the transaction before the authorization expires.\n *\n * Default: `true`\n * >**Note:** this setting is only relevant when `delay_capture_enabled: true`.\n */\n captureBeforeExpiryEnabled?: boolean | null;\n}\n\nexport interface CheckboxField {\n /** Whether the checkbox is visible to the customer. */\n visible?: boolean | null;\n /** Whether the checkbox is checked by default. */\n checkedByDefault?: boolean | null;\n}\n\nexport interface CheckoutBrand {\n /** Checkout header. */\n header?: CheckoutHeader;\n}\n\nexport interface CheckoutHeader {\n /**\n * Textual content to be included in the header (e.g. Business Name)\n * @maxLength 55\n */\n text?: string | null;\n /**\n * Text color hex code.\n * @format COLOR_HEX\n */\n textColor?: string | null;\n /** Specifications for when a logo is included in the header. */\n logo?: Logo;\n /**\n * Alignment within the header.\n *\n * >**Note:** `SIDE` alignment is decided depending on the locale's language. For example, scripts like Hebrew and Arabic will automatically align right-to-left.\n */\n alignment?: AlignmentWithLiterals;\n /**\n * Whether to display the 'Checkout' label within the header.\n * Depending on the locale, the label may be translated.\n */\n displayCheckoutLabel?: boolean | null;\n /** Continue shopping specifications. */\n continueShopping?: ContinueShopping;\n /** Background fill specifications. */\n backgroundFill?: BackgroundFill;\n}\n\nexport interface Logo {\n /** Size of the logo. */\n size?: LogoSizeWithLiterals;\n}\n\nexport interface FocalPoint {\n /** X-coordinate of the focal point. */\n x?: number;\n /** Y-coordinate of the focal point. */\n y?: number;\n /** crop by height */\n height?: number | null;\n /** crop by width */\n width?: number | null;\n}\n\nexport enum LogoSize {\n SMALL = 'SMALL',\n MEDIUM = 'MEDIUM',\n LARGE = 'LARGE',\n}\n\n/** @enumType */\nexport type LogoSizeWithLiterals = LogoSize | 'SMALL' | 'MEDIUM' | 'LARGE';\n\nexport enum Alignment {\n SIDE = 'SIDE',\n CENTER = 'CENTER',\n}\n\n/** @enumType */\nexport type AlignmentWithLiterals = Alignment | 'SIDE' | 'CENTER';\n\nexport interface ContinueShopping {\n /** Whether the continue shopping element is hidden. */\n hidden?: boolean | null;\n /** Display type for the continue shopping element. */\n displayType?: DisplayTypeWithLiterals;\n}\n\nexport enum DisplayType {\n TEXT = 'TEXT',\n ICON = 'ICON',\n}\n\n/** @enumType */\nexport type DisplayTypeWithLiterals = DisplayType | 'TEXT' | 'ICON';\n\nexport interface BackgroundFill extends BackgroundFillOptionsOneOf {\n /**\n * Background color hex code.\n * @format COLOR_HEX\n */\n color?: string | null;\n /** Background image. */\n image?: string;\n}\n\n/** @oneof */\nexport interface BackgroundFillOptionsOneOf {\n /**\n * Background color hex code.\n * @format COLOR_HEX\n */\n color?: string | null;\n /** Background image. */\n image?: string;\n}\n\nexport enum CheckoutBillingFields {\n /** All billing information fields are required. */\n All_FIELDS = 'All_FIELDS',\n /** Minimum required fields as defined by the country, payment method and payment provider. */\n MINIMUM_REQUIRED_FIELDS = 'MINIMUM_REQUIRED_FIELDS',\n}\n\n/** @enumType */\nexport type CheckoutBillingFieldsWithLiterals =\n | CheckoutBillingFields\n | 'All_FIELDS'\n | 'MINIMUM_REQUIRED_FIELDS';\n\nexport interface GetCheckoutSettingsRequest {}\n\nexport interface GetCheckoutSettingsResponse {\n /** Checkout settings. */\n checkoutSettings?: CheckoutSettings;\n}\n\nexport interface UpdateCheckoutSettingsRequest {\n /** Checkout settings to update. */\n checkoutSettings: CheckoutSettings;\n}\n\nexport interface UpdateCheckoutSettingsResponse {\n /** Updated checkout settings. */\n checkoutSettings?: CheckoutSettings;\n}\n\nexport interface ListCheckoutSettingsRequest {}\n\nexport interface ListCheckoutSettingsResponse {\n /** List of retrieved checkout settings. */\n checkoutSettings?: CheckoutSettings[];\n}\n\nexport interface GiftCardProviderWasProvisioned {\n /** The gift card provider which was installed */\n providerAppDefId?: string;\n providerInstanceId?: string;\n}\n\nexport interface Empty {}\n\nexport interface DeleteCheckoutSettingsRequest {}\n\nexport interface DeleteCheckoutSettingsResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface CheckoutSettingsUpdatedEnvelope {\n entity: CheckoutSettings;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when checkout settings are updated.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId ECOM.READ_CHECKOUT_SETTINGS\n * @webhook\n * @eventType wix.ecom.v1.checkout_settings_updated\n * @slug updated\n */\nexport declare function onCheckoutSettingsUpdated(\n handler: (event: CheckoutSettingsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the site's checkout settings.\n * @public\n * @permissionId ECOM.READ_CHECKOUT_SETTINGS\n * @applicableIdentity APP\n * @fqn wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.GetCheckoutSettings\n */\nexport async function getCheckoutSettings(): Promise<\n NonNullablePaths<\n GetCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixEcomV1CheckoutSettings.getCheckoutSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates the site's checkout settings.\n * @param checkoutSettings - Checkout settings to update.\n * @public\n * @requiredField checkoutSettings\n * @permissionId ECOM.UPDATE_CHECKOUT_SETTINGS\n * @applicableIdentity APP\n * @fqn wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.UpdateCheckoutSettings\n */\nexport async function updateCheckoutSettings(\n checkoutSettings: CheckoutSettings\n): Promise<\n NonNullablePaths<\n UpdateCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n checkoutSettings: checkoutSettings,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixEcomV1CheckoutSettings.updateCheckoutSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { checkoutSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['checkoutSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/checkout-settings',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n _: [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_checkout-settings';\n\n/** Retrieves the site's checkout settings. */\nexport function getCheckoutSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getCheckoutSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v1.checkout_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.GetCheckoutSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl({\n protoPath: '/v1/checkout-settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCheckoutSettings;\n}\n\n/** Updates the site's checkout settings. */\nexport function updateCheckoutSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateCheckoutSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.checkout_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.UpdateCheckoutSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl({\n protoPath: '/v1/checkout-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateCheckoutSettings;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,8BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AA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,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAWA,eAAsBC,wBACpB,kBAUA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU;AAAA,QACd,qEAAsC;AAAA,MACpC;AAAA,IACF,CAAC;AAAA,IACD;AAAA,MACE;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,mDAAmD;AAAA,UAC3D;AAAA,YACE,MAAM;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,UACgC,uBAAuB,OAAO;AAEpE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO;AAAA,UACL,wCAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO;AAAA,YACL,EAAE,MAAM,mDAAmD;AAAA,YAC3D;AAAA,cACE,MAAM;AAAA,YACR;AAAA,UACF;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,kBAAkB,OAAO;AAAA,QACrD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,kBAAkB;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getCheckoutSettings","updateCheckoutSettings","import_float","import_timestamp","import_rest_modules","payload","import_image","import_transform_paths","LogoSize","Alignment","DisplayType","CheckoutBillingFields","WebhookIdentityType","getCheckoutSettings","sdkTransformError","updateCheckoutSettings"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/ecom-v1-checkout-settings-checkout-settings.universal.ts","../../src/ecom-v1-checkout-settings-checkout-settings.http.ts"],"sourcesContent":["export * from './src/ecom-v1-checkout-settings-checkout-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixEcomV1CheckoutSettings from './ecom-v1-checkout-settings-checkout-settings.http.js';\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** Site-level settings that control the checkout experience, including policies, field visibility, and branding. */\nexport interface CheckoutSettings {\n /** Checkout policies. */\n checkoutPolicies?: CheckoutPolicies;\n /** Settings that apply to checkout fields and the checkout process. */\n checkoutFields?: CheckoutFields;\n /** Checkout brand settings. */\n checkoutBrand?: CheckoutBrand;\n /**\n * Date and time the checkout settings were created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the checkout settings were updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Billing information required to complete the checkout. */\n checkoutBillingFields?: CheckoutBillingFieldsWithLiterals;\n}\n\nexport interface CheckoutPolicies {\n /** Terms and conditions. */\n termsAndConditions?: TermsAndConditionsPolicy;\n /** Privacy policy. */\n privacyPolicy?: PrivacyPolicy;\n /** Return policy. */\n returnPolicy?: ReturnPolicy;\n /** Digital item policy. */\n digitalItemPolicy?: DigitalItemPolicy;\n /** \"Contact us\" information. */\n contactUs?: ContactUsPolicy;\n /** Custom policy. */\n customPolicy?: CustomCheckoutPolicy;\n}\n\nexport interface TermsAndConditionsPolicy {\n /**\n * Whether the terms and conditions policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Terms and conditions policy content. */\n content?: string | null;\n}\n\nexport interface PrivacyPolicy {\n /**\n * Whether the privacy policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Privacy policy content. */\n content?: string | null;\n}\n\nexport interface ReturnPolicy {\n /**\n * Whether the return policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Return policy content. */\n content?: string | null;\n}\n\nexport interface DigitalItemPolicy {\n /**\n * Whether the digital item policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Digital item policy content. */\n content?: string | null;\n}\n\nexport interface ContactUsPolicy {\n /**\n * Whether the contact us policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Contact us policy content. */\n content?: string | null;\n}\n\nexport interface CustomCheckoutPolicy {\n /**\n * Whether the custom policy is visible to the customer in the checkout page. <br><br>\n *\n * Default: `false`\n */\n visible?: boolean | null;\n /** Custom policy content. */\n content?: string | null;\n /** Custom policy title. */\n title?: string | null;\n}\n\nexport interface CheckoutFields {\n /**\n * Subscription checkbox. <br><br>\n *\n * Defaults:\n * + `visible`: `false`\n * + `checkedByDefault`: `false`\n */\n subscriptionCheckbox?: CheckboxField;\n /**\n * Policy agreement checkbox. <br><br>\n *\n * Defaults:\n * + `visible`: `false`\n * + `checkedByDefault`: `false`\n */\n policyAgreementCheckbox?: CheckboxField;\n /**\n * Whether the ability to redeem a gift card is enabled. <br><br>\n *\n * Default: `false`\n */\n giftCardRedeemEnabled?: boolean | null;\n /**\n * Whether to allow for MIT transactions. <br><br>\n *\n * Default: `false`\n */\n mitEnabled?: boolean | null;\n /**\n * Whether to allow for Auth & Capture transactions. <br><br>\n *\n * Default: `false`\n */\n delayCaptureEnabled?: boolean | null;\n /**\n * Whether to automatically capture the transaction before the authorization expires.\n *\n * Default: `true`\n * >**Note:** this setting is only relevant when `delay_capture_enabled: true`.\n */\n captureBeforeExpiryEnabled?: boolean | null;\n}\n\nexport interface CheckboxField {\n /** Whether the checkbox is visible to the customer. */\n visible?: boolean | null;\n /** Whether the checkbox is checked by default. */\n checkedByDefault?: boolean | null;\n}\n\nexport interface CheckoutBrand {\n /** Checkout header. */\n header?: CheckoutHeader;\n}\n\nexport interface CheckoutHeader {\n /**\n * Textual content to be included in the header (e.g. Business Name)\n * @maxLength 55\n */\n text?: string | null;\n /**\n * Text color hex code.\n * @format COLOR_HEX\n */\n textColor?: string | null;\n /** Specifications for when a logo is included in the header. */\n logo?: Logo;\n /**\n * Alignment within the header.\n *\n * >**Note:** `SIDE` alignment is decided depending on the locale's language. For example, scripts like Hebrew and Arabic will automatically align right-to-left.\n */\n alignment?: AlignmentWithLiterals;\n /**\n * Whether to display the 'Checkout' label within the header.\n * Depending on the locale, the label may be translated.\n */\n displayCheckoutLabel?: boolean | null;\n /** Continue shopping specifications. */\n continueShopping?: ContinueShopping;\n /** Background fill specifications. */\n backgroundFill?: BackgroundFill;\n}\n\nexport interface Logo {\n /** Size of the logo. */\n size?: LogoSizeWithLiterals;\n}\n\nexport interface FocalPoint {\n /** X-coordinate of the focal point. */\n x?: number;\n /** Y-coordinate of the focal point. */\n y?: number;\n /** crop by height */\n height?: number | null;\n /** crop by width */\n width?: number | null;\n}\n\nexport enum LogoSize {\n SMALL = 'SMALL',\n MEDIUM = 'MEDIUM',\n LARGE = 'LARGE',\n}\n\n/** @enumType */\nexport type LogoSizeWithLiterals = LogoSize | 'SMALL' | 'MEDIUM' | 'LARGE';\n\nexport enum Alignment {\n SIDE = 'SIDE',\n CENTER = 'CENTER',\n}\n\n/** @enumType */\nexport type AlignmentWithLiterals = Alignment | 'SIDE' | 'CENTER';\n\nexport interface ContinueShopping {\n /** Whether the continue shopping element is hidden. */\n hidden?: boolean | null;\n /** Display type for the continue shopping element. */\n displayType?: DisplayTypeWithLiterals;\n}\n\nexport enum DisplayType {\n TEXT = 'TEXT',\n ICON = 'ICON',\n}\n\n/** @enumType */\nexport type DisplayTypeWithLiterals = DisplayType | 'TEXT' | 'ICON';\n\nexport interface BackgroundFill extends BackgroundFillOptionsOneOf {\n /**\n * Background color hex code.\n * @format COLOR_HEX\n */\n color?: string | null;\n /** Background image. */\n image?: string;\n}\n\n/** @oneof */\nexport interface BackgroundFillOptionsOneOf {\n /**\n * Background color hex code.\n * @format COLOR_HEX\n */\n color?: string | null;\n /** Background image. */\n image?: string;\n}\n\nexport enum CheckoutBillingFields {\n /** All billing information fields are required. */\n All_FIELDS = 'All_FIELDS',\n /** Minimum required fields as defined by the country, payment method and payment provider. */\n MINIMUM_REQUIRED_FIELDS = 'MINIMUM_REQUIRED_FIELDS',\n}\n\n/** @enumType */\nexport type CheckoutBillingFieldsWithLiterals =\n | CheckoutBillingFields\n | 'All_FIELDS'\n | 'MINIMUM_REQUIRED_FIELDS';\n\nexport interface GetCheckoutSettingsRequest {}\n\nexport interface GetCheckoutSettingsResponse {\n /** Checkout settings. */\n checkoutSettings?: CheckoutSettings;\n}\n\nexport interface UpdateCheckoutSettingsRequest {\n /** Checkout settings to update. */\n checkoutSettings: CheckoutSettings;\n}\n\nexport interface UpdateCheckoutSettingsResponse {\n /** Updated checkout settings. */\n checkoutSettings?: CheckoutSettings;\n}\n\nexport interface ListCheckoutSettingsRequest {}\n\nexport interface ListCheckoutSettingsResponse {\n /** List of retrieved checkout settings. */\n checkoutSettings?: CheckoutSettings[];\n}\n\nexport interface GiftCardProviderWasProvisioned {\n /** The gift card provider which was installed */\n providerAppDefId?: string;\n providerInstanceId?: string;\n}\n\nexport interface Empty {}\n\nexport interface DeleteCheckoutSettingsRequest {}\n\nexport interface DeleteCheckoutSettingsResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface CheckoutSettingsUpdatedEnvelope {\n entity: CheckoutSettings;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when checkout settings are updated.\n * @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage_Wix_Rentals_App_Forms_submissions\n * @permissionScopeId SCOPE.RENTALS.MANAGE\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Read eCommerce - all read permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM\n * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read\n * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ\n * @permissionScope Read Orders\n * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS\n * @permissionScope Read Stores - all read permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionScope Manage eCommerce - all permissions\n * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM\n * @permissionScope Manage Orders\n * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS\n * @permissionId ECOM.READ_CHECKOUT_SETTINGS\n * @webhook\n * @eventType wix.ecom.v1.checkout_settings_updated\n * @slug updated\n */\nexport declare function onCheckoutSettingsUpdated(\n handler: (event: CheckoutSettingsUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the site's checkout settings.\n * @public\n * @permissionId ECOM.READ_CHECKOUT_SETTINGS\n * @applicableIdentity APP\n * @fqn wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.GetCheckoutSettings\n */\nexport async function getCheckoutSettings(): Promise<\n NonNullablePaths<\n GetCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n const reqOpts =\n ambassadorWixEcomV1CheckoutSettings.getCheckoutSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {},\n singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates the site's checkout settings.\n * @param checkoutSettings - Checkout settings to update.\n * @public\n * @requiredField checkoutSettings\n * @permissionId ECOM.UPDATE_CHECKOUT_SETTINGS\n * @applicableIdentity APP\n * @fqn wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.UpdateCheckoutSettings\n */\nexport async function updateCheckoutSettings(\n checkoutSettings: CheckoutSettings\n): Promise<\n NonNullablePaths<\n UpdateCheckoutSettingsResponse,\n | `checkoutSettings.checkoutBrand.header.logo.size`\n | `checkoutSettings.checkoutBrand.header.alignment`\n | `checkoutSettings.checkoutBrand.header.continueShopping.displayType`\n | `checkoutSettings.checkoutBillingFields`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n checkoutSettings: checkoutSettings,\n }),\n [\n {\n transformFn: transformSDKImageToRESTImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixEcomV1CheckoutSettings.updateCheckoutSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'checkoutSettings.checkoutBrand.header.logo.image' },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image',\n },\n ],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { checkoutSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['checkoutSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/checkout-settings',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n _: [\n {\n srcPath: '/ecom/v1/checkout-settings',\n destPath: '/v1/checkout-settings',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_checkout-settings';\n\n/** Retrieves the site's checkout settings. */\nexport function getCheckoutSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __getCheckoutSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.v1.checkout_settings',\n method: 'GET' as any,\n methodFqn:\n 'wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.GetCheckoutSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl({\n protoPath: '/v1/checkout-settings',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCheckoutSettings;\n}\n\n/** Updates the site's checkout settings. */\nexport function updateCheckoutSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __updateCheckoutSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.ecom.v1.checkout_settings',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.UpdateCheckoutSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl({\n protoPath: '/v1/checkout-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'checkoutSettings.createdDate' },\n { path: 'checkoutSettings.updatedDate' },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate',\n },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x',\n },\n {\n path: 'checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateCheckoutSettings;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAAA;AAAA,EAAA,8BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,oBACd,SAC4B;AAC5B,WAAS,sBAAsB,EAAE,KA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AM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU;AAAA,QACd,qEAAsC;AAAA,MACpC;AAAA,IACF,CAAC;AAAA,IACD;AAAA,MACE;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,mDAAmD;AAAA,UAC3D;AAAA,YACE,MAAM;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,UACgC,uBAAuB,OAAO;AAEpE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO;AAAA,UACL,wCAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO;AAAA,YACL,EAAE,MAAM,mDAAmD;AAAA,YAC3D;AAAA,cACE,MAAM;AAAA,YACR;AAAA,UACF;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,kBAAkB,OAAO;AAAA,QACrD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,kBAAkB;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getCheckoutSettings","updateCheckoutSettings","import_float","import_timestamp","import_rest_modules","payload","import_image","import_transform_paths","LogoSize","Alignment","DisplayType","CheckoutBillingFields","WebhookIdentityType","getCheckoutSettings","sdkTransformError","updateCheckoutSettings"]}
|