Skip to content

ProductCatalogJson

JSON catalog codec: public discriminants and canonical decimal-string money; decodes to native bigint.

const ProductCatalogJson: Schema.Struct<{
product: Schema.Struct<{
id: Schema.brand<Schema.String, "ProductId">;
name: Schema.String;
description: Schema.OptionFromNullOr<Schema.String>;
createdAt: Schema.brand<Schema.Int, "EpochMilliseconds">;
updatedAt: Schema.brand<Schema.Int, "EpochMilliseconds">;
}>;
tiers: Schema.$Array<Schema.Struct<{
id: Schema.brand<Schema.String, "TierId">;
productId: Schema.brand<Schema.String, "ProductId">;
name: Schema.String;
fulfillment: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
type: Schema.Literal<...>;
}>, Schema.Struct<{
type: Schema.Literal<...>;
entitlements: Schema.OptionFromOptionalKey<...>;
licensing: Schema.OptionFromOptionalKey<...>;
}>]>;
createdAt: Schema.brand<Schema.Int, "EpochMilliseconds">;
updatedAt: Schema.brand<Schema.Int, "EpochMilliseconds">;
}>>;
prices: Schema.$Array<Schema.Struct<{
id: Schema.brand<Schema.String, "PriceId">;
tierId: Schema.brand<Schema.String, "TierId">;
currency: Schema.brand<Schema.String, "Currency">;
billingTerms: Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
type: Schema.Literal<...>;
}>, Schema.Struct<{
type: Schema.Literal<...>;
interval: Schema.Literals<...>;
}>]>;
createdAt: Schema.brand<Schema.Int, "EpochMilliseconds">;
updatedAt: Schema.brand<Schema.Int, "EpochMilliseconds">;
amount: Schema.compose<Schema.brand<Schema.BigInt, "MinorCurrencyUnits">, Schema.compose<Schema.BigIntFromString, Schema.String>>;
}>>;
}>;