@aventurevc/api-schemas 0.8.8 → 0.8.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,10 +7,14 @@ declare const BillingCheckoutMutationSchemaDefinition: z.ZodObject<{
7
7
  PRO_YEARLY: "PRO_YEARLY";
8
8
  PRO_YEARLY_PROMOTION: "PRO_YEARLY_PROMOTION";
9
9
  }>;
10
+ uiMode: z.ZodOptional<z.ZodEnum<{
11
+ ELEMENTS: "ELEMENTS";
12
+ HOSTED_PAGE: "HOSTED_PAGE";
13
+ }>>;
10
14
  }, z.core.$strip>;
11
15
  type BillingCheckoutMutationDefinition = z.infer<typeof BillingCheckoutMutationSchemaDefinition>;
12
16
  /**
13
- * Caller-selected plan for server-owned hosted Checkout creation.
17
+ * Caller-selected plan and Checkout presentation for server-owned Checkout creation.
14
18
  *
15
19
  * @openapiSchema BillingCheckoutMutation
16
20
  * @endpoint POST /v1/billing/checkout-sessions
@@ -1,12 +1,15 @@
1
1
  // LLM AGENTS MAY NOT EDIT THIS FILE UNDER ANY CIRCUMSTANCES. DO NOT EDIT - generated from Kotlin data classes via OpenAPI. Edit the backend owner and run: make docs-openapi && make docs-zod
2
2
  import { z } from "zod/v4";
3
+ import { BillingCheckoutUiModeSchema } from "./checkout-ui-mode.js";
3
4
  import { BillingPlanTypeSchema } from "./plan-type.js";
4
5
  const BillingCheckoutMutationSchemaDefinition = z.object({
5
- /** AI Plus or AI Pro plan to start through hosted Checkout */
6
+ /** AI Plus or AI Pro plan to start through Checkout */
6
7
  plan: BillingPlanTypeSchema,
8
+ /** How the caller presents Checkout; HOSTED_PAGE when omitted */
9
+ uiMode: BillingCheckoutUiModeSchema.optional(),
7
10
  });
8
11
  /**
9
- * Caller-selected plan for server-owned hosted Checkout creation.
12
+ * Caller-selected plan and Checkout presentation for server-owned Checkout creation.
10
13
  *
11
14
  * @openapiSchema BillingCheckoutMutation
12
15
  * @endpoint POST /v1/billing/checkout-sessions
@@ -0,0 +1,16 @@
1
+ import { z } from "zod/v4";
2
+ /**
3
+ * HOSTED_PAGE redirects the browser to Stripe's page at url. ELEMENTS renders the Payment Element in the caller's page with Stripe.js initCheckout using clientSecret and publishableKey, then confirms there.
4
+ *
5
+ * @openapiSchema BillingCheckoutUiMode
6
+ * @endpoint POST /v1/billing/checkout-sessions
7
+ * @usedBySchema BillingCheckoutMutationSchema
8
+ * @contractShape billing.checkout-ui-mode
9
+ * @contractRole canonical
10
+ */
11
+ export declare const BillingCheckoutUiModeSchema: z.ZodEnum<{
12
+ ELEMENTS: "ELEMENTS";
13
+ HOSTED_PAGE: "HOSTED_PAGE";
14
+ }>;
15
+ export type BillingCheckoutUiMode = z.infer<typeof BillingCheckoutUiModeSchema>;
16
+ //# sourceMappingURL=checkout-ui-mode.d.ts.map
@@ -0,0 +1,13 @@
1
+ // LLM AGENTS MAY NOT EDIT THIS FILE UNDER ANY CIRCUMSTANCES. DO NOT EDIT - generated from Kotlin data classes via OpenAPI. Edit the backend owner and run: make docs-openapi && make docs-zod
2
+ import { z } from "zod/v4";
3
+ /**
4
+ * HOSTED_PAGE redirects the browser to Stripe's page at url. ELEMENTS renders the Payment Element in the caller's page with Stripe.js initCheckout using clientSecret and publishableKey, then confirms there.
5
+ *
6
+ * @openapiSchema BillingCheckoutUiMode
7
+ * @endpoint POST /v1/billing/checkout-sessions
8
+ * @usedBySchema BillingCheckoutMutationSchema
9
+ * @contractShape billing.checkout-ui-mode
10
+ * @contractRole canonical
11
+ */
12
+ export const BillingCheckoutUiModeSchema = z.enum(["HOSTED_PAGE", "ELEMENTS"]);
13
+ //# sourceMappingURL=checkout-ui-mode.js.map
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod/v4";
2
2
  declare const BillingCheckoutSchemaDefinition: z.ZodObject<{
3
+ clientSecret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3
4
  expiresAt: z.ZodISODateTime;
4
5
  plan: z.ZodEnum<{
5
6
  PLUS_MONTHLY: "PLUS_MONTHLY";
@@ -8,11 +9,12 @@ declare const BillingCheckoutSchemaDefinition: z.ZodObject<{
8
9
  PRO_YEARLY: "PRO_YEARLY";
9
10
  PRO_YEARLY_PROMOTION: "PRO_YEARLY_PROMOTION";
10
11
  }>;
11
- url: z.ZodString;
12
+ publishableKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
14
  }, z.core.$strip>;
13
15
  type BillingCheckoutDefinition = z.infer<typeof BillingCheckoutSchemaDefinition>;
14
16
  /**
15
- * Hosted Checkout destination and expiry without provider identifiers.
17
+ * Checkout Session destination or client secret and expiry without provider identifiers.
16
18
  *
17
19
  * @openapiSchema BillingCheckout
18
20
  * @endpoint POST /v1/billing/checkout-sessions
@@ -2,14 +2,18 @@
2
2
  import { z } from "zod/v4";
3
3
  import { BillingPlanTypeSchema } from "./plan-type.js";
4
4
  const BillingCheckoutSchemaDefinition = z.object({
5
- /** When the Checkout page stops accepting payment */
5
+ /** Checkout Session client secret for Stripe.js initCheckout; set for ELEMENTS */
6
+ clientSecret: z.string().nullish(),
7
+ /** When the Checkout Session stops accepting payment */
6
8
  expiresAt: z.iso.datetime({ offset: true }),
7
9
  plan: BillingPlanTypeSchema,
8
- /** Hosted Checkout page to open in a browser to pay */
9
- url: z.string(),
10
+ /** Stripe publishable key that loads Stripe.js; set for ELEMENTS */
11
+ publishableKey: z.string().nullish(),
12
+ /** Hosted Checkout page to open in a browser; set for HOSTED_PAGE */
13
+ url: z.string().nullish(),
10
14
  });
11
15
  /**
12
- * Hosted Checkout destination and expiry without provider identifiers.
16
+ * Checkout Session destination or client secret and expiry without provider identifiers.
13
17
  *
14
18
  * @openapiSchema BillingCheckout
15
19
  * @endpoint POST /v1/billing/checkout-sessions
@@ -0,0 +1,16 @@
1
+ import { z } from "zod/v4";
2
+ /**
3
+ * Card on file that pays the subscription.
4
+ *
5
+ * @openapiSchema BillingPaymentMethod
6
+ * @endpoint POST /v1/billing/plan-change-previews
7
+ * @usedBySchema BillingPlanChangePreviewSchema
8
+ * @contractShape billing.payment-method
9
+ * @contractRole canonical
10
+ */
11
+ export declare const BillingPaymentMethodSchema: z.ZodObject<{
12
+ brand: z.ZodString;
13
+ last4: z.ZodString;
14
+ }, z.core.$strip>;
15
+ export type BillingPaymentMethod = z.infer<typeof BillingPaymentMethodSchema>;
16
+ //# sourceMappingURL=payment-method.d.ts.map
@@ -0,0 +1,18 @@
1
+ // LLM AGENTS MAY NOT EDIT THIS FILE UNDER ANY CIRCUMSTANCES. DO NOT EDIT - generated from Kotlin data classes via OpenAPI. Edit the backend owner and run: make docs-openapi && make docs-zod
2
+ import { z } from "zod/v4";
3
+ /**
4
+ * Card on file that pays the subscription.
5
+ *
6
+ * @openapiSchema BillingPaymentMethod
7
+ * @endpoint POST /v1/billing/plan-change-previews
8
+ * @usedBySchema BillingPlanChangePreviewSchema
9
+ * @contractShape billing.payment-method
10
+ * @contractRole canonical
11
+ */
12
+ export const BillingPaymentMethodSchema = z.object({
13
+ /** Card brand as Stripe reports it */
14
+ brand: z.string(),
15
+ /** Last four digits of the card number */
16
+ last4: z.string(),
17
+ });
18
+ //# sourceMappingURL=payment-method.js.map
@@ -13,6 +13,7 @@ type BillingPlanChangeMutationDefinition = z.infer<typeof BillingPlanChangeMutat
13
13
  * Caller-selected plan for changing a continuing AI Plus or AI Pro subscription.
14
14
  *
15
15
  * @openapiSchema BillingPlanChangeMutation
16
+ * @endpoint POST /v1/billing/plan-change-previews
16
17
  * @endpoint POST /v1/billing/plan-changes
17
18
  * @contractShape billing.plan-change-mutation
18
19
  * @contractRole canonical
@@ -9,6 +9,7 @@ const BillingPlanChangeMutationSchemaDefinition = z.object({
9
9
  * Caller-selected plan for changing a continuing AI Plus or AI Pro subscription.
10
10
  *
11
11
  * @openapiSchema BillingPlanChangeMutation
12
+ * @endpoint POST /v1/billing/plan-change-previews
12
13
  * @endpoint POST /v1/billing/plan-changes
13
14
  * @contractShape billing.plan-change-mutation
14
15
  * @contractRole canonical
@@ -0,0 +1,35 @@
1
+ import { z } from "zod/v4";
2
+ declare const BillingPlanChangePreviewSchemaDefinition: z.ZodObject<{
3
+ amountDue: z.ZodNumber;
4
+ currency: z.ZodString;
5
+ effectiveAt: z.ZodISODateTime;
6
+ paymentMethod: z.ZodOptional<z.ZodNullable<z.ZodObject<{
7
+ brand: z.ZodString;
8
+ last4: z.ZodString;
9
+ }, z.core.$strip>>>;
10
+ plan: z.ZodEnum<{
11
+ PLUS_MONTHLY: "PLUS_MONTHLY";
12
+ PLUS_YEARLY: "PLUS_YEARLY";
13
+ PRO_MONTHLY: "PRO_MONTHLY";
14
+ PRO_YEARLY: "PRO_YEARLY";
15
+ PRO_YEARLY_PROMOTION: "PRO_YEARLY_PROMOTION";
16
+ }>;
17
+ recurringPrice: z.ZodObject<{
18
+ cadence: z.ZodString;
19
+ currency: z.ZodString;
20
+ unitAmount: z.ZodNumber;
21
+ }, z.core.$strip>;
22
+ }, z.core.$strip>;
23
+ type BillingPlanChangePreviewDefinition = z.infer<typeof BillingPlanChangePreviewSchemaDefinition>;
24
+ /**
25
+ * Preview of POST /v1/billing/plan-changes for the same plan: the amount charged on confirmation, when the plan takes effect, the renewal price after it, and the card that pays.
26
+ *
27
+ * @openapiSchema BillingPlanChangePreview
28
+ * @endpoint POST /v1/billing/plan-change-previews
29
+ * @contractShape billing.plan-change-preview
30
+ * @contractRole canonical
31
+ */
32
+ export declare const BillingPlanChangePreviewSchema: z.ZodType<BillingPlanChangePreviewDefinition>;
33
+ export type BillingPlanChangePreview = z.infer<typeof BillingPlanChangePreviewSchema>;
34
+ export {};
35
+ //# sourceMappingURL=plan-change-preview.d.ts.map
@@ -0,0 +1,29 @@
1
+ // LLM AGENTS MAY NOT EDIT THIS FILE UNDER ANY CIRCUMSTANCES. DO NOT EDIT - generated from Kotlin data classes via OpenAPI. Edit the backend owner and run: make docs-openapi && make docs-zod
2
+ import { z } from "zod/v4";
3
+ import { BillingPaymentMethodSchema } from "./payment-method.js";
4
+ import { BillingPlanTypeSchema } from "./plan-type.js";
5
+ import { BillingRecurringPriceSchema } from "./recurring-price.js";
6
+ const BillingPlanChangePreviewSchemaDefinition = z.object({
7
+ /** Amount charged on confirmation in the currency's minor unit, after credit for unused time; 0 when the change waits for the period end */
8
+ amountDue: z.number().int(),
9
+ /** ISO 4217 currency code. */
10
+ currency: z.string(),
11
+ /** When the plan would take effect: now, or the current period end */
12
+ effectiveAt: z.iso.datetime({ offset: true }),
13
+ /** Card Stripe charges; absent when no card is on file */
14
+ paymentMethod: BillingPaymentMethodSchema.nullish(),
15
+ /** Plan the subscription would move to */
16
+ plan: BillingPlanTypeSchema,
17
+ /** Recurring charge after the change */
18
+ recurringPrice: BillingRecurringPriceSchema,
19
+ });
20
+ /**
21
+ * Preview of POST /v1/billing/plan-changes for the same plan: the amount charged on confirmation, when the plan takes effect, the renewal price after it, and the card that pays.
22
+ *
23
+ * @openapiSchema BillingPlanChangePreview
24
+ * @endpoint POST /v1/billing/plan-change-previews
25
+ * @contractShape billing.plan-change-preview
26
+ * @contractRole canonical
27
+ */
28
+ export const BillingPlanChangePreviewSchema = BillingPlanChangePreviewSchemaDefinition;
29
+ //# sourceMappingURL=plan-change-preview.js.map
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod/v4";
2
2
  declare const BillingPlanChangeSchemaDefinition: z.ZodObject<{
3
3
  effectiveAt: z.ZodISODateTime;
4
+ paymentClientSecret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
5
  paymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
6
  plan: z.ZodEnum<{
6
7
  PLUS_MONTHLY: "PLUS_MONTHLY";
@@ -9,6 +10,7 @@ declare const BillingPlanChangeSchemaDefinition: z.ZodObject<{
9
10
  PRO_YEARLY: "PRO_YEARLY";
10
11
  PRO_YEARLY_PROMOTION: "PRO_YEARLY_PROMOTION";
11
12
  }>;
13
+ publishableKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
14
  }, z.core.$strip>;
13
15
  type BillingPlanChangeDefinition = z.infer<typeof BillingPlanChangeSchemaDefinition>;
14
16
  /**
@@ -4,10 +4,14 @@ import { BillingPlanTypeSchema } from "./plan-type.js";
4
4
  const BillingPlanChangeSchemaDefinition = z.object({
5
5
  /** When the plan takes effect: now, or the current period end */
6
6
  effectiveAt: z.iso.datetime({ offset: true }),
7
+ /** PaymentIntent client secret of the same pending invoice, for Stripe.js to complete authentication or payment in the page; set exactly when paymentUrl is. */
8
+ paymentClientSecret: z.string().nullish(),
7
9
  /** Hosted invoice to pay when the upgrade's prorated charge needs the customer; the upgrade applies only after it is paid. Absent when no payment is pending. */
8
10
  paymentUrl: z.string().nullish(),
9
11
  /** Plan the subscription moves to */
10
12
  plan: BillingPlanTypeSchema,
13
+ /** Stripe publishable key for Stripe.js; set with paymentClientSecret */
14
+ publishableKey: z.string().nullish(),
11
15
  });
12
16
  /**
13
17
  * Plan change outcome: an upgrade applies now with a prorated invoice, a downgrade waits for the current period end.
@@ -6,11 +6,13 @@ import { z } from "zod/v4";
6
6
  * @endpoint GET /v1/billing/plans
7
7
  * @endpoint GET /v1/billing/subscription
8
8
  * @endpoint POST /v1/billing/checkout-sessions
9
+ * @endpoint POST /v1/billing/plan-change-previews
9
10
  * @endpoint POST /v1/billing/plan-changes
10
11
  * @usedBySchema BillingCatalogPlanSchema
11
12
  * @usedBySchema BillingCheckoutMutationSchema
12
13
  * @usedBySchema BillingCheckoutSchema
13
14
  * @usedBySchema BillingPlanChangeMutationSchema
15
+ * @usedBySchema BillingPlanChangePreviewSchema
14
16
  * @usedBySchema BillingPlanChangeSchema
15
17
  * @usedBySchema BillingSubscriptionSchema
16
18
  * @contractShape billing.plan-type
@@ -7,11 +7,13 @@ import { z } from "zod/v4";
7
7
  * @endpoint GET /v1/billing/plans
8
8
  * @endpoint GET /v1/billing/subscription
9
9
  * @endpoint POST /v1/billing/checkout-sessions
10
+ * @endpoint POST /v1/billing/plan-change-previews
10
11
  * @endpoint POST /v1/billing/plan-changes
11
12
  * @usedBySchema BillingCatalogPlanSchema
12
13
  * @usedBySchema BillingCheckoutMutationSchema
13
14
  * @usedBySchema BillingCheckoutSchema
14
15
  * @usedBySchema BillingPlanChangeMutationSchema
16
+ * @usedBySchema BillingPlanChangePreviewSchema
15
17
  * @usedBySchema BillingPlanChangeSchema
16
18
  * @usedBySchema BillingSubscriptionSchema
17
19
  * @contractShape billing.plan-type
@@ -2,6 +2,8 @@ import { z } from "zod/v4";
2
2
  /**
3
3
  * @openapiSchema BillingRecurringPrice
4
4
  * @endpoint GET /v1/billing/subscription
5
+ * @endpoint POST /v1/billing/plan-change-previews
6
+ * @usedBySchema BillingPlanChangePreviewSchema
5
7
  * @usedBySchema BillingSubscriptionSchema
6
8
  * @contractShape billing.recurring-price
7
9
  * @contractRole canonical
@@ -3,6 +3,8 @@ import { z } from "zod/v4";
3
3
  /**
4
4
  * @openapiSchema BillingRecurringPrice
5
5
  * @endpoint GET /v1/billing/subscription
6
+ * @endpoint POST /v1/billing/plan-change-previews
7
+ * @usedBySchema BillingPlanChangePreviewSchema
6
8
  * @usedBySchema BillingSubscriptionSchema
7
9
  * @contractShape billing.recurring-price
8
10
  * @contractRole canonical
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod/v4";
2
2
  /**
3
- * Distinguishes square icon vs standard/horizontal entity logo
3
+ * Entity logo slot: SQUARE is the square icon read back as `core.image.logoSquare`; STANDARD is the horizontal wordmark read back as `core.image.logo`.
4
4
  *
5
5
  * @openapiSchema EntityLogoType
6
6
  * @endpoint GET /v1/entities/{entityId}/media/{mediaType}
@@ -1,7 +1,7 @@
1
1
  // LLM AGENTS MAY NOT EDIT THIS FILE UNDER ANY CIRCUMSTANCES. DO NOT EDIT - generated from Kotlin data classes via OpenAPI. Edit the backend owner and run: make docs-openapi && make docs-zod
2
2
  import { z } from "zod/v4";
3
3
  /**
4
- * Distinguishes square icon vs standard/horizontal entity logo
4
+ * Entity logo slot: SQUARE is the square icon read back as `core.image.logoSquare`; STANDARD is the horizontal wordmark read back as `core.image.logo`.
5
5
  *
6
6
  * @openapiSchema EntityLogoType
7
7
  * @endpoint GET /v1/entities/{entityId}/media/{mediaType}
@@ -100,15 +100,27 @@ export const OPENAPI_COMPONENT_MANIFEST = Object.freeze({
100
100
  modulePath: "billing/checkout-mutation",
101
101
  schemaName: "BillingCheckoutMutationSchema",
102
102
  },
103
+ BillingCheckoutUiMode: {
104
+ modulePath: "billing/checkout-ui-mode",
105
+ schemaName: "BillingCheckoutUiModeSchema",
106
+ },
103
107
  BillingCreditPackType: {
104
108
  modulePath: "billing/credit-pack-type",
105
109
  schemaName: "BillingCreditPackTypeSchema",
106
110
  },
111
+ BillingPaymentMethod: {
112
+ modulePath: "billing/payment-method",
113
+ schemaName: "BillingPaymentMethodSchema",
114
+ },
107
115
  BillingPlanChange: { modulePath: "billing/plan-change", schemaName: "BillingPlanChangeSchema" },
108
116
  BillingPlanChangeMutation: {
109
117
  modulePath: "billing/plan-change-mutation",
110
118
  schemaName: "BillingPlanChangeMutationSchema",
111
119
  },
120
+ BillingPlanChangePreview: {
121
+ modulePath: "billing/plan-change-preview",
122
+ schemaName: "BillingPlanChangePreviewSchema",
123
+ },
112
124
  BillingPlanType: { modulePath: "billing/plan-type", schemaName: "BillingPlanTypeSchema" },
113
125
  BillingPortal: { modulePath: "billing/portal", schemaName: "BillingPortalSchema" },
114
126
  BillingRecurringPrice: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aventurevc/api-schemas",
3
- "version": "0.8.8",
3
+ "version": "0.8.10",
4
4
  "private": false,
5
5
  "description": "Zod v4 schemas and TypeScript types for the aVenture API.",
6
6
  "license": "Apache-2.0",