autumn-js
Version:
Autumn JS Library
209 lines (206 loc) • 6.66 kB
TypeScript
import { z } from 'zod';
declare const entityDataParamsSchema: z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
featureId: z.ZodString;
}, "strip", z.ZodTypeAny, {
featureId: string;
name?: string | undefined;
}, {
featureId: string;
name?: string | undefined;
}>;
declare const attachFeatureOptionsSchema: z.ZodObject<{
featureId: z.ZodString;
quantity: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
featureId: string;
quantity: number;
}, {
featureId: string;
quantity: number;
}>;
declare const attachParamsSchema: z.ZodObject<{
productId: z.ZodOptional<z.ZodString>;
entityId: z.ZodOptional<z.ZodString>;
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
featureId: z.ZodString;
quantity: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
featureId: string;
quantity: number;
}, {
featureId: string;
quantity: number;
}>, "many">>;
productIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
freeTrial: z.ZodOptional<z.ZodBoolean>;
successUrl: z.ZodOptional<z.ZodString>;
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
forceCheckout: z.ZodOptional<z.ZodBoolean>;
entityData: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
featureId: z.ZodString;
}, "strip", z.ZodTypeAny, {
featureId: string;
name?: string | undefined;
}, {
featureId: string;
name?: string | undefined;
}>>;
openInNewTab: z.ZodOptional<z.ZodBoolean>;
reward: z.ZodOptional<z.ZodString>;
checkoutSessionParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, "strip", z.ZodTypeAny, {
options?: {
featureId: string;
quantity: number;
}[] | undefined;
productId?: string | undefined;
entityId?: string | undefined;
productIds?: string[] | undefined;
freeTrial?: boolean | undefined;
successUrl?: string | undefined;
metadata?: Record<string, string> | undefined;
forceCheckout?: boolean | undefined;
entityData?: {
featureId: string;
name?: string | undefined;
} | undefined;
openInNewTab?: boolean | undefined;
reward?: string | undefined;
checkoutSessionParams?: Record<string, any> | undefined;
}, {
options?: {
featureId: string;
quantity: number;
}[] | undefined;
productId?: string | undefined;
entityId?: string | undefined;
productIds?: string[] | undefined;
freeTrial?: boolean | undefined;
successUrl?: string | undefined;
metadata?: Record<string, string> | undefined;
forceCheckout?: boolean | undefined;
entityData?: {
featureId: string;
name?: string | undefined;
} | undefined;
openInNewTab?: boolean | undefined;
reward?: string | undefined;
checkoutSessionParams?: Record<string, any> | undefined;
}>;
declare const cancelParamsSchema: z.ZodObject<{
productId: z.ZodString;
entityId: z.ZodOptional<z.ZodString>;
cancelImmediately: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
productId: string;
entityId?: string | undefined;
cancelImmediately?: boolean | undefined;
}, {
productId: string;
entityId?: string | undefined;
cancelImmediately?: boolean | undefined;
}>;
declare const checkParamsSchema: z.ZodObject<{
featureId: z.ZodOptional<z.ZodString>;
productId: z.ZodOptional<z.ZodString>;
entityId: z.ZodOptional<z.ZodString>;
requiredBalance: z.ZodOptional<z.ZodNumber>;
sendEvent: z.ZodOptional<z.ZodBoolean>;
withPreview: z.ZodOptional<z.ZodBoolean>;
entityData: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
featureId: z.ZodString;
}, "strip", z.ZodTypeAny, {
featureId: string;
name?: string | undefined;
}, {
featureId: string;
name?: string | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
featureId?: string | undefined;
productId?: string | undefined;
entityId?: string | undefined;
entityData?: {
featureId: string;
name?: string | undefined;
} | undefined;
requiredBalance?: number | undefined;
sendEvent?: boolean | undefined;
withPreview?: boolean | undefined;
}, {
featureId?: string | undefined;
productId?: string | undefined;
entityId?: string | undefined;
entityData?: {
featureId: string;
name?: string | undefined;
} | undefined;
requiredBalance?: number | undefined;
sendEvent?: boolean | undefined;
withPreview?: boolean | undefined;
}>;
declare const trackParamsSchema: z.ZodObject<{
featureId: z.ZodOptional<z.ZodString>;
eventName: z.ZodOptional<z.ZodString>;
entityId: z.ZodOptional<z.ZodString>;
value: z.ZodOptional<z.ZodNumber>;
idempotencyKey: z.ZodOptional<z.ZodString>;
entityData: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
featureId: z.ZodString;
}, "strip", z.ZodTypeAny, {
featureId: string;
name?: string | undefined;
}, {
featureId: string;
name?: string | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
featureId?: string | undefined;
value?: number | undefined;
entityId?: string | undefined;
entityData?: {
featureId: string;
name?: string | undefined;
} | undefined;
eventName?: string | undefined;
idempotencyKey?: string | undefined;
}, {
featureId?: string | undefined;
value?: number | undefined;
entityId?: string | undefined;
entityData?: {
featureId: string;
name?: string | undefined;
} | undefined;
eventName?: string | undefined;
idempotencyKey?: string | undefined;
}>;
declare const openBillingPortalParamsSchema: z.ZodObject<{
returnUrl: z.ZodOptional<z.ZodString>;
openInNewTab: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
openInNewTab?: boolean | undefined;
returnUrl?: string | undefined;
}, {
openInNewTab?: boolean | undefined;
returnUrl?: string | undefined;
}>;
declare const createReferralCodeParamsSchema: z.ZodObject<{
programId: z.ZodString;
}, "strip", z.ZodTypeAny, {
programId: string;
}, {
programId: string;
}>;
declare const redeemReferralCodeParamsSchema: z.ZodObject<{
code: z.ZodString;
}, "strip", z.ZodTypeAny, {
code: string;
}, {
code: string;
}>;
export { attachFeatureOptionsSchema, attachParamsSchema, cancelParamsSchema, checkParamsSchema, createReferralCodeParamsSchema, entityDataParamsSchema, openBillingPortalParamsSchema, redeemReferralCodeParamsSchema, trackParamsSchema };