Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions src/component/_generated/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
"internal",
{
product: {
benefits: Array<{
createdAt: string;
deletable: boolean;
description: string;
id: string;
metadata?: Record<string, any>;
modifiedAt: string | null;
organizationId: string;
properties?: any;
selectable: boolean;
type: string;
}>;
createdAt: string;
description: string | null;
id: string;
Expand Down Expand Up @@ -59,18 +71,27 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
organizationId: string;
prices: Array<{
amountType?: string;
capAmount?: number | null;
createdAt: string;
id: string;
isArchived: boolean;
maximumAmount?: number | null;
meter?: { id: string; name: string };
meterId?: string;
minimumAmount?: number | null;
modifiedAt: string | null;
presetAmount?: number | null;
priceAmount?: number;
priceCurrency?: string;
productId: string;
recurringInterval?: "day" | "week" | "month" | "year" | null;
seatTiers?: Array<{
maxSeats: number | null;
minSeats: number;
pricePerSeat: number;
}>;
type?: string;
unitAmount?: string;
}>;
recurringInterval?: "day" | "week" | "month" | "year" | null;
};
Expand Down Expand Up @@ -128,6 +149,18 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
modifiedAt: string | null;
priceId?: string;
product: {
benefits: Array<{
createdAt: string;
deletable: boolean;
description: string;
id: string;
metadata?: Record<string, any>;
modifiedAt: string | null;
organizationId: string;
properties?: any;
selectable: boolean;
type: string;
}>;
createdAt: string;
description: string | null;
id: string;
Expand Down Expand Up @@ -158,18 +191,27 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
organizationId: string;
prices: Array<{
amountType?: string;
capAmount?: number | null;
createdAt: string;
id: string;
isArchived: boolean;
maximumAmount?: number | null;
meter?: { id: string; name: string };
meterId?: string;
minimumAmount?: number | null;
modifiedAt: string | null;
presetAmount?: number | null;
priceAmount?: number;
priceCurrency?: string;
productId: string;
recurringInterval?: "day" | "week" | "month" | "year" | null;
seatTiers?: Array<{
maxSeats: number | null;
minSeats: number;
pricePerSeat: number;
}>;
type?: string;
unitAmount?: string;
}>;
recurringInterval?: "day" | "week" | "month" | "year" | null;
};
Expand All @@ -192,6 +234,18 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
"internal",
{ id: string },
{
benefits: Array<{
createdAt: string;
deletable: boolean;
description: string;
id: string;
metadata?: Record<string, any>;
modifiedAt: string | null;
organizationId: string;
properties?: any;
selectable: boolean;
type: string;
}>;
createdAt: string;
description: string | null;
id: string;
Expand Down Expand Up @@ -222,18 +276,27 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
organizationId: string;
prices: Array<{
amountType?: string;
capAmount?: number | null;
createdAt: string;
id: string;
isArchived: boolean;
maximumAmount?: number | null;
meter?: { id: string; name: string };
meterId?: string;
minimumAmount?: number | null;
modifiedAt: string | null;
presetAmount?: number | null;
priceAmount?: number;
priceCurrency?: string;
productId: string;
recurringInterval?: "day" | "week" | "month" | "year" | null;
seatTiers?: Array<{
maxSeats: number | null;
minSeats: number;
pricePerSeat: number;
}>;
type?: string;
unitAmount?: string;
}>;
recurringInterval?: "day" | "week" | "month" | "year" | null;
} | null,
Expand Down Expand Up @@ -305,6 +368,18 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
"internal",
{ includeArchived?: boolean },
Array<{
benefits: Array<{
createdAt: string;
deletable: boolean;
description: string;
id: string;
metadata?: Record<string, any>;
modifiedAt: string | null;
organizationId: string;
properties?: any;
selectable: boolean;
type: string;
}>;
createdAt: string;
description: string | null;
id: string;
Expand Down Expand Up @@ -336,18 +411,27 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
priceAmount?: number;
prices: Array<{
amountType?: string;
capAmount?: number | null;
createdAt: string;
id: string;
isArchived: boolean;
maximumAmount?: number | null;
meter?: { id: string; name: string };
meterId?: string;
minimumAmount?: number | null;
modifiedAt: string | null;
presetAmount?: number | null;
priceAmount?: number;
priceCurrency?: string;
productId: string;
recurringInterval?: "day" | "week" | "month" | "year" | null;
seatTiers?: Array<{
maxSeats: number | null;
minSeats: number;
pricePerSeat: number;
}>;
type?: string;
unitAmount?: string;
}>;
recurringInterval?: "day" | "week" | "month" | "year" | null;
}>,
Expand All @@ -374,6 +458,18 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
modifiedAt: string | null;
priceId?: string;
product: {
benefits: Array<{
createdAt: string;
deletable: boolean;
description: string;
id: string;
metadata?: Record<string, any>;
modifiedAt: string | null;
organizationId: string;
properties?: any;
selectable: boolean;
type: string;
}>;
createdAt: string;
description: string | null;
id: string;
Expand Down Expand Up @@ -404,18 +500,27 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
organizationId: string;
prices: Array<{
amountType?: string;
capAmount?: number | null;
createdAt: string;
id: string;
isArchived: boolean;
maximumAmount?: number | null;
meter?: { id: string; name: string };
meterId?: string;
minimumAmount?: number | null;
modifiedAt: string | null;
presetAmount?: number | null;
priceAmount?: number;
priceCurrency?: string;
productId: string;
recurringInterval?: "day" | "week" | "month" | "year" | null;
seatTiers?: Array<{
maxSeats: number | null;
minSeats: number;
pricePerSeat: number;
}>;
type?: string;
unitAmount?: string;
}>;
recurringInterval?: "day" | "week" | "month" | "year" | null;
} | null;
Expand All @@ -438,6 +543,18 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
"internal",
{
product: {
benefits: Array<{
createdAt: string;
deletable: boolean;
description: string;
id: string;
metadata?: Record<string, any>;
modifiedAt: string | null;
organizationId: string;
properties?: any;
selectable: boolean;
type: string;
}>;
createdAt: string;
description: string | null;
id: string;
Expand Down Expand Up @@ -468,18 +585,27 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
organizationId: string;
prices: Array<{
amountType?: string;
capAmount?: number | null;
createdAt: string;
id: string;
isArchived: boolean;
maximumAmount?: number | null;
meter?: { id: string; name: string };
meterId?: string;
minimumAmount?: number | null;
modifiedAt: string | null;
presetAmount?: number | null;
priceAmount?: number;
priceCurrency?: string;
productId: string;
recurringInterval?: "day" | "week" | "month" | "year" | null;
seatTiers?: Array<{
maxSeats: number | null;
minSeats: number;
pricePerSeat: number;
}>;
type?: string;
unitAmount?: string;
}>;
recurringInterval?: "day" | "week" | "month" | "year" | null;
};
Expand All @@ -493,6 +619,18 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
{
polarAccessToken: string;
products: Array<{
benefits: Array<{
createdAt: string;
deletable: boolean;
description: string;
id: string;
metadata?: Record<string, any>;
modifiedAt: string | null;
organizationId: string;
properties?: any;
selectable: boolean;
type: string;
}>;
createdAt: string;
description: string | null;
id: string;
Expand Down Expand Up @@ -523,18 +661,27 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
organizationId: string;
prices: Array<{
amountType?: string;
capAmount?: number | null;
createdAt: string;
id: string;
isArchived: boolean;
maximumAmount?: number | null;
meter?: { id: string; name: string };
meterId?: string;
minimumAmount?: number | null;
modifiedAt: string | null;
presetAmount?: number | null;
priceAmount?: number;
priceCurrency?: string;
productId: string;
recurringInterval?: "day" | "week" | "month" | "year" | null;
seatTiers?: Array<{
maxSeats: number | null;
minSeats: number;
pricePerSeat: number;
}>;
type?: string;
unitAmount?: string;
}>;
recurringInterval?: "day" | "week" | "month" | "year" | null;
}>;
Expand Down
32 changes: 32 additions & 0 deletions src/component/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,38 @@ export default defineSchema(
maximumAmount: v.optional(v.union(v.number(), v.null())),
minimumAmount: v.optional(v.union(v.number(), v.null())),
presetAmount: v.optional(v.union(v.number(), v.null())),
seatTiers: v.optional(
v.array(
v.object({
minSeats: v.number(),
maxSeats: v.union(v.number(), v.null()),
pricePerSeat: v.number(),
}),
),
),
unitAmount: v.optional(v.string()),
capAmount: v.optional(v.union(v.number(), v.null())),
meterId: v.optional(v.string()),
meter: v.optional(
v.object({
id: v.string(),
name: v.string(),
}),
),
}),
),
benefits: v.array(
v.object({
id: v.string(),
createdAt: v.string(),
modifiedAt: v.union(v.string(), v.null()),
type: v.string(),
description: v.string(),
selectable: v.boolean(),
deletable: v.boolean(),
organizationId: v.string(),
metadata: v.optional(v.record(v.string(), v.any())),
properties: v.optional(v.any()),
}),
),
medias: v.array(
Expand Down
Loading