{"version":3,"sources":["../../src/payments-platform-v1-checkout-session-checkout-sessions.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const GenerateCheckoutSessionRequest = z.object({\n  cart: z\n    .object({\n      items: z\n        .array(\n          z.object({\n            name: z\n              .string()\n              .describe('Name of the item, shown on the checkout page.')\n              .min(1)\n              .max(255),\n            quantity: z\n              .number()\n              .int()\n              .describe('Quantity of this item to charge for.')\n              .min(1),\n            price: z\n              .string()\n              .describe(\n                'Per-unit price as a decimal string in the merchant account currency. For example, `\"19.99\"`.'\n              )\n              .min(1)\n              .max(50),\n            subscriptionInfo: z\n              .object({\n                subscriptionSettings: z\n                  .object({\n                    frequency: z.enum([\n                      'UNDEFINED',\n                      'DAY',\n                      'WEEK',\n                      'MONTH',\n                      'YEAR',\n                    ]),\n                    interval: z\n                      .number()\n                      .int()\n                      .describe(\n                        \"Number of frequency units between charges. For `DAY` frequency, the minimum is 7. The shortest\\nbilling cadence supported is weekly; values 1–6 with `frequency: DAY` are rejected with\\n`INVALID_ARGUMENT` (rule code `MIN_VALUE`). Default: `1`.\\n\\nNote that `freeTrialPeriod.interval` doesn't share this floor: a `DAY` trial may have\\n`interval` as low as 1.\"\n                      )\n                      .min(1)\n                      .max(3650)\n                      .optional()\n                      .nullable(),\n                    autoRenewal: z\n                      .boolean()\n                      .describe(\n                        \"Whether the subscription renews automatically. Can't be `true` when `billingCycles` is set.\\n\\nDefault: `true` when both `autoRenewal` and `billingCycles` are omitted; `false` when `billingCycles`\\nis set and `autoRenewal` is omitted.\"\n                      )\n                      .optional()\n                      .nullable(),\n                    billingCycles: z\n                      .number()\n                      .int()\n                      .describe(\n                        \"Number of billing cycles before the subscription stops. Can't be set when `autoRenewal` is `true`.\\n\\nWhen omitted along with `autoRenewal`, the subscription renews indefinitely.\"\n                      )\n                      .min(1)\n                      .optional()\n                      .nullable(),\n                    freeTrialPeriod: z\n                      .object({\n                        frequency: z.enum([\n                          'UNDEFINED',\n                          'DAY',\n                          'WEEK',\n                          'MONTH',\n                          'YEAR',\n                        ]),\n                        interval: z\n                          .number()\n                          .int()\n                          .describe(\n                            \"Length of the trial period in `frequency` units. For example, `interval: 14` with `frequency: DAY`\\ngives a 14-day trial.\\n\\nUnlike `SubscriptionSettings.interval`, this field's `DAY` floor is `1`. No weekly floor applies\\nto the trial length. Values ≤ 0 are rejected with `INVALID_ARGUMENT` (rule code\\n`MIN_VALUE`).\"\n                          )\n                          .min(1)\n                          .max(999)\n                          .optional(),\n                      })\n                      .describe('Free trial period before the first charge.')\n                      .optional(),\n                  })\n                  .describe(\n                    'Billing frequency, cycles, and free trial configuration. Required when `subscriptionInfo` is set on a\\nline item.'\n                  ),\n                title: z\n                  .string()\n                  .describe(\n                    'Subscription name shown to the buyer in the recurring-billing summary block on the Wix-hosted\\ncheckout page (the heading of that block).'\n                  )\n                  .max(150)\n                  .optional()\n                  .nullable(),\n                description: z\n                  .string()\n                  .describe(\n                    'Subscription description shown to the buyer in the recurring-billing summary block on the\\nWix-hosted checkout page (the body text below the title).'\n                  )\n                  .max(500)\n                  .optional()\n                  .nullable(),\n              })\n              .describe(\n                'Subscription configuration. When set, the line item follows a scheduled-billing model defined by\\n`subscriptionSettings` instead of a single immediate charge. The recurring charge each billing\\ncycle is `price × quantity`, and `quantity` is locked at session creation.\\n\\nAt most 1 line item per request may set `subscriptionInfo`. Wix rejects requests with 2 or more\\nsubscription line items with `MULTIPLE_SUBSCRIPTION_ITEMS`.'\n              )\n              .optional(),\n            physicalProperties: z\n              .object({\n                shippable: z\n                  .boolean()\n                  .describe('Whether the item requires shipping.')\n                  .optional()\n                  .nullable(),\n              })\n              .describe(\n                'Optional. Physical properties of the item, used when the item requires shipping.'\n              )\n              .optional(),\n          })\n        )\n        .max(100),\n      customerInfo: z\n        .object({\n          firstName: z\n            .string()\n            .describe(\"Buyer's first name.\")\n            .max(100)\n            .optional()\n            .nullable(),\n          lastName: z\n            .string()\n            .describe(\"Buyer's last name.\")\n            .max(100)\n            .optional()\n            .nullable(),\n          phone: z\n            .string()\n            .describe(\"Buyer's phone number.\")\n            .optional()\n            .nullable(),\n          email: z\n            .string()\n            .describe(\"Buyer's email address.\")\n            .email()\n            .optional()\n            .nullable(),\n        })\n        .describe(\n          'Buyer details used to pre-fill the checkout form. The buyer can edit any of these fields on the\\nWix checkout page.'\n        )\n        .optional(),\n    })\n    .describe(\n      'Items, quantities, and prices the buyer is paying for, plus optional pre-fill customer details.'\n    ),\n  options: z.object({\n    callbackUrls: z\n      .object({\n        postFlowUrl: z\n          .string()\n          .describe(\n            'URL the buyer is redirected to from the Wix checkout page when they choose to leave without\\ncompleting payment, either when they click **Continue browsing** or when they navigate back to\\na cart-style page.\\n\\nDeprecated. Use `continueBrowsingUrl` instead.'\n          )\n          .url()\n          .optional()\n          .nullable(),\n        thankYouPageUrl: z\n          .string()\n          .describe(\n            'URL the buyer is redirected to after a successful payment.'\n          )\n          .url(),\n        continueBrowsingUrl: z\n          .string()\n          .describe(\n            'URL the buyer is redirected to from the Wix checkout page when they choose to leave without\\ncompleting payment, either when they click **Continue browsing** or when they navigate back to\\na cart-style page.'\n          )\n          .url()\n          .optional()\n          .nullable(),\n      })\n      .describe(\n        'URLs the buyer is redirected to after completing or leaving the checkout flow.'\n      ),\n  }),\n});\nexport const GenerateCheckoutSessionResponse = z.object({\n  checkoutSession: z\n    .object({\n      _id: z\n        .string()\n        .describe('Checkout session ID.')\n        .regex(\n          /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n          'Must be a valid GUID'\n        )\n        .optional()\n        .nullable(),\n      redirectUrl: z\n        .string()\n        .describe(\n          \"URL of the Wix-hosted checkout page where the buyer completes payment. The buyer enters the page\\nas an anonymous shopper, and any session held by the calling app isn't carried over.\\n\\nThe URL carries query parameters Wix needs to render the page correctly (for example, a\\n`successUrl` parameter derived from `callbackUrls.thankYouPageUrl`). Pass the URL through to the\\nbuyer unchanged. Don't strip, reorder, rewrite, or otherwise mutate its query string.\"\n        )\n        .url()\n        .optional()\n        .nullable(),\n    })\n    .describe('The created checkout session.')\n    .optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,iCAAmC,SAAO;AAAA,EACrD,MACG,SAAO;AAAA,IACN,OACG;AAAA,MACG,SAAO;AAAA,QACP,MACG,SAAO,EACP,SAAS,+CAA+C,EACxD,IAAI,CAAC,EACL,IAAI,GAAG;AAAA,QACV,UACG,SAAO,EACP,IAAI,EACJ,SAAS,sCAAsC,EAC/C,IAAI,CAAC;AAAA,QACR,OACG,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,IAAI,EAAE;AAAA,QACT,kBACG,SAAO;AAAA,UACN,sBACG,SAAO;AAAA,YACN,WAAa,OAAK;AAAA,cAChB;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,YACF,CAAC;AAAA,YACD,UACG,SAAO,EACP,IAAI,EACJ;AAAA,cACC;AAAA,YACF,EACC,IAAI,CAAC,EACL,IAAI,IAAI,EACR,SAAS,EACT,SAAS;AAAA,YACZ,aACG,UAAQ,EACR;AAAA,cACC;AAAA,YACF,EACC,SAAS,EACT,SAAS;AAAA,YACZ,eACG,SAAO,EACP,IAAI,EACJ;AAAA,cACC;AAAA,YACF,EACC,IAAI,CAAC,EACL,SAAS,EACT,SAAS;AAAA,YACZ,iBACG,SAAO;AAAA,cACN,WAAa,OAAK;AAAA,gBAChB;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,cACF,CAAC;AAAA,cACD,UACG,SAAO,EACP,IAAI,EACJ;AAAA,gBACC;AAAA,cACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS;AAAA,YACd,CAAC,EACA,SAAS,4CAA4C,EACrD,SAAS;AAAA,UACd,CAAC,EACA;AAAA,YACC;AAAA,UACF;AAAA,UACF,OACG,SAAO,EACP;AAAA,YACC;AA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