autumn-js
Version:
Autumn JS Library
77 lines (74 loc) • 3.33 kB
JavaScript
"use client";
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/libraries/react/client/types/clientAttachTypes.ts
var clientAttachTypes_exports = {};
__export(clientAttachTypes_exports, {
AttachFeatureOptionsSchema: () => AttachFeatureOptionsSchema,
AttachParamsSchema: () => AttachParamsSchema,
CheckoutParamsSchema: () => CheckoutParamsSchema
});
module.exports = __toCommonJS(clientAttachTypes_exports);
var import_v4 = require("zod/v4");
var AttachFeatureOptionsSchema = import_v4.z.object({
featureId: import_v4.z.string(),
quantity: import_v4.z.number()
});
var AttachParamsSchema = import_v4.z.object({
productId: import_v4.z.string().optional(),
entityId: import_v4.z.string().optional(),
options: import_v4.z.array(AttachFeatureOptionsSchema).optional(),
productIds: import_v4.z.array(import_v4.z.string()).optional(),
freeTrial: import_v4.z.boolean().optional(),
successUrl: import_v4.z.string().optional(),
metadata: import_v4.z.record(import_v4.z.string(), import_v4.z.string()).optional(),
forceCheckout: import_v4.z.boolean().optional(),
/**
* @deprecated This field is deprecated and will be removed in a future version.
*/
dialog: import_v4.z.any().optional().describe(
"DEPRECATED: This field is deprecated and will be removed in a future version. Please use the checkout() method instead."
),
entityData: import_v4.z.any().optional(),
openInNewTab: import_v4.z.boolean().optional(),
reward: import_v4.z.string().optional(),
checkoutSessionParams: import_v4.z.record(import_v4.z.string(), import_v4.z.any()).optional(),
newBillingSubscription: import_v4.z.boolean().optional()
});
var CheckoutParamsSchema = import_v4.z.object({
productId: import_v4.z.string().optional(),
productIds: import_v4.z.array(import_v4.z.string()).optional(),
entityId: import_v4.z.string().optional(),
entityData: import_v4.z.any().optional(),
options: import_v4.z.array(AttachFeatureOptionsSchema).optional(),
successUrl: import_v4.z.string().optional(),
openInNewTab: import_v4.z.boolean().optional(),
dialog: import_v4.z.any().optional(),
forceCheckout: import_v4.z.boolean().optional(),
freeTrial: import_v4.z.boolean().optional(),
checkoutSessionParams: import_v4.z.record(import_v4.z.string(), import_v4.z.any()).optional(),
reward: import_v4.z.string().optional(),
newBillingSubscription: import_v4.z.boolean().optional()
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
AttachFeatureOptionsSchema,
AttachParamsSchema,
CheckoutParamsSchema
});