@aventurevc/api-schemas 0.8.459 → 0.8.461

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.
@@ -0,0 +1,17 @@
1
+ import { z } from "zod/v4";
2
+ /**
3
+ * KEEP_CAP preserves the current monthly usage cap, SET_CAP sets spendCapCents, and NO_CAP clears it. None limits credit purchases.
4
+ *
5
+ * @openapiSchema BillingCreditPurchaseCapDecision
6
+ * @endpoint POST /v1/billing/credit-purchases
7
+ * @usedBySchema BillingCreditPurchaseMutationSchema
8
+ * @contractShape billing.credit-purchase-cap-decision
9
+ * @contractRole canonical
10
+ */
11
+ export declare const BillingCreditPurchaseCapDecisionSchema: z.ZodEnum<{
12
+ KEEP_CAP: "KEEP_CAP";
13
+ NO_CAP: "NO_CAP";
14
+ SET_CAP: "SET_CAP";
15
+ }>;
16
+ export type BillingCreditPurchaseCapDecision = z.infer<typeof BillingCreditPurchaseCapDecisionSchema>;
17
+ //# sourceMappingURL=credit-purchase-cap-decision.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
+ * KEEP_CAP preserves the current monthly usage cap, SET_CAP sets spendCapCents, and NO_CAP clears it. None limits credit purchases.
5
+ *
6
+ * @openapiSchema BillingCreditPurchaseCapDecision
7
+ * @endpoint POST /v1/billing/credit-purchases
8
+ * @usedBySchema BillingCreditPurchaseMutationSchema
9
+ * @contractShape billing.credit-purchase-cap-decision
10
+ * @contractRole canonical
11
+ */
12
+ export const BillingCreditPurchaseCapDecisionSchema = z.enum(["KEEP_CAP", "SET_CAP", "NO_CAP"]);
13
+ //# sourceMappingURL=credit-purchase-cap-decision.js.map
@@ -3,6 +3,7 @@ declare const BillingCreditPurchaseConfirmationSchemaDefinition: z.ZodObject<{
3
3
  amountCents: z.ZodNumber;
4
4
  closedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
5
5
  currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
6
7
  grantedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
7
8
  id: z.ZodUUID;
8
9
  paymentClientSecret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -22,15 +23,17 @@ declare const BillingCreditPurchaseConfirmationSchemaDefinition: z.ZodObject<{
22
23
  PROCESSING: "PROCESSING";
23
24
  };
24
25
  }>>;
26
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
27
  }, z.core.$strip>;
26
28
  type BillingCreditPurchaseConfirmationDefinition = z.infer<typeof BillingCreditPurchaseConfirmationSchemaDefinition>;
27
29
  export interface BillingCreditPurchaseConfirmationSchemaInput extends z.input<typeof BillingCreditPurchaseConfirmationSchemaDefinition> {
28
30
  }
29
31
  /**
30
- * One account-owned purchase's confirmed credit grant or checkout closure.
32
+ * One account-owned purchase's payment state, confirmed credit-grant time, and any closure. Only grantedAt confirms that credit was fulfilled.
31
33
  *
32
34
  * @openapiSchema BillingCreditPurchaseConfirmation
33
35
  * @endpoint GET /v1/billing/credit-purchases/{purchaseId}
36
+ * @endpoint POST /v1/billing/credit-purchases
34
37
  * @contractShape billing.credit-purchase-confirmation
35
38
  * @contractRole canonical
36
39
  */
@@ -5,17 +5,22 @@ const BillingCreditPurchaseConfirmationSchemaDefinition = z.object({
5
5
  amountCents: z.number().int(),
6
6
  closedAt: z.iso.datetime({ offset: true }).nullish(),
7
7
  currency: z.string().nullish(),
8
+ /** Expiry of the open hosted Checkout, not of purchased credit. */
9
+ expiresAt: z.iso.datetime({ offset: true }).nullish(),
8
10
  grantedAt: z.iso.datetime({ offset: true }).nullish(),
9
11
  id: z.uuid(),
10
12
  paymentClientSecret: z.string().nullish(),
11
13
  publishableKey: z.string().nullish(),
12
14
  status: BillingCreditPurchaseStatusSchema.nullish(),
15
+ /** Hosted payment destination, only while its Checkout remains open. */
16
+ url: z.string().nullish(),
13
17
  });
14
18
  /**
15
- * One account-owned purchase's confirmed credit grant or checkout closure.
19
+ * One account-owned purchase's payment state, confirmed credit-grant time, and any closure. Only grantedAt confirms that credit was fulfilled.
16
20
  *
17
21
  * @openapiSchema BillingCreditPurchaseConfirmation
18
22
  * @endpoint GET /v1/billing/credit-purchases/{purchaseId}
23
+ * @endpoint POST /v1/billing/credit-purchases
19
24
  * @contractShape billing.credit-purchase-confirmation
20
25
  * @contractRole canonical
21
26
  */
@@ -0,0 +1,16 @@
1
+ import { z } from "zod/v4";
2
+ /**
3
+ * HOSTED_CHECKOUT requires payment on a hosted page; ATTACHED_CARD uses the account's selected default card.
4
+ *
5
+ * @openapiSchema BillingCreditPurchaseMode
6
+ * @endpoint POST /v1/billing/credit-purchases
7
+ * @usedBySchema BillingCreditPurchaseMutationSchema
8
+ * @contractShape billing.credit-purchase-mode
9
+ * @contractRole canonical
10
+ */
11
+ export declare const BillingCreditPurchaseModeSchema: z.ZodEnum<{
12
+ ATTACHED_CARD: "ATTACHED_CARD";
13
+ HOSTED_CHECKOUT: "HOSTED_CHECKOUT";
14
+ }>;
15
+ export type BillingCreditPurchaseMode = z.infer<typeof BillingCreditPurchaseModeSchema>;
16
+ //# sourceMappingURL=credit-purchase-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_CHECKOUT requires payment on a hosted page; ATTACHED_CARD uses the account's selected default card.
5
+ *
6
+ * @openapiSchema BillingCreditPurchaseMode
7
+ * @endpoint POST /v1/billing/credit-purchases
8
+ * @usedBySchema BillingCreditPurchaseMutationSchema
9
+ * @contractShape billing.credit-purchase-mode
10
+ * @contractRole canonical
11
+ */
12
+ export const BillingCreditPurchaseModeSchema = z.enum(["HOSTED_CHECKOUT", "ATTACHED_CARD"]);
13
+ //# sourceMappingURL=credit-purchase-mode.js.map
@@ -1,17 +1,30 @@
1
1
  import { z } from "zod/v4";
2
2
  declare const BillingCreditPurchaseMutationSchemaDefinition: z.ZodObject<{
3
- pack: z.ZodEnum<{
3
+ amountCents: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
4
+ authorizationQuote: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ capDecision: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
6
+ KEEP_CAP: "KEEP_CAP";
7
+ NO_CAP: "NO_CAP";
8
+ SET_CAP: "SET_CAP";
9
+ }>>>;
10
+ pack: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
4
11
  USD_100: "USD_100";
5
12
  USD_25: "USD_25";
6
13
  USD_250: "USD_250";
7
14
  USD_50: "USD_50";
8
- }>;
15
+ }>>>;
16
+ purchaseMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
17
+ ATTACHED_CARD: "ATTACHED_CARD";
18
+ HOSTED_CHECKOUT: "HOSTED_CHECKOUT";
19
+ }>>>;
20
+ savePaymentMethod: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
21
+ spendCapCents: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
9
22
  }, z.core.$strip>;
10
23
  type BillingCreditPurchaseMutationDefinition = z.infer<typeof BillingCreditPurchaseMutationSchemaDefinition>;
11
24
  export interface BillingCreditPurchaseMutationSchemaInput extends z.input<typeof BillingCreditPurchaseMutationSchemaDefinition> {
12
25
  }
13
26
  /**
14
- * Prepaid credit pack to buy through hosted Checkout.
27
+ * Buy USD prepaid credit with exactly one amount selector; no default amount is charged.
15
28
  *
16
29
  * @openapiSchema BillingCreditPurchaseMutation
17
30
  * @endpoint POST /v1/billing/credit-purchases
@@ -1,12 +1,26 @@
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
  import { BillingCreditPackTypeSchema } from "./credit-pack-type.js";
4
+ import { BillingCreditPurchaseCapDecisionSchema } from "./credit-purchase-cap-decision.js";
5
+ import { BillingCreditPurchaseModeSchema } from "./credit-purchase-mode.js";
4
6
  const BillingCreditPurchaseMutationSchemaDefinition = z.object({
7
+ /** USD integer cents, 500 through 100000; supply exactly one of pack or amountCents. */
8
+ amountCents: z.number().int().min(500).max(100000).nullish(),
9
+ /** Exact human authorization quotation; required for delegated API-key/OAuth purchases, preserved verbatim. */
10
+ authorizationQuote: z.string().max(4000).nullish(),
11
+ /** Explicit monthly usage cap decision; not a purchase budget. Required for delegated purchases. */
12
+ capDecision: BillingCreditPurchaseCapDecisionSchema.nullish(),
5
13
  /** Credit pack to buy; its amount becomes prepaid credit. */
6
- pack: BillingCreditPackTypeSchema,
14
+ pack: BillingCreditPackTypeSchema.nullish(),
15
+ /** HOSTED_CHECKOUT opens an explicit-pay page; ATTACHED_CARD charges the existing default saved card. */
16
+ purchaseMode: BillingCreditPurchaseModeSchema.default("HOSTED_CHECKOUT").optional(),
17
+ /** Explicitly save this hosted payment's card for future payments you authorize. Choose the billing default separately in payment settings. Defaults to false; available only for hosted Checkout and never enables assistant purchasing. */
18
+ savePaymentMethod: z.boolean().default(false).optional(),
19
+ /** Positive monthly usage cap in USD cents; supply only with SET_CAP. This limits usage, not credit purchases. */
20
+ spendCapCents: z.number().int().nullish(),
7
21
  });
8
22
  /**
9
- * Prepaid credit pack to buy through hosted Checkout.
23
+ * Buy USD prepaid credit with exactly one amount selector; no default amount is charged.
10
24
  *
11
25
  * @openapiSchema BillingCreditPurchaseMutation
12
26
  * @endpoint POST /v1/billing/credit-purchases
@@ -33,7 +33,7 @@ type BillingCreditPurchaseDefinition = z.infer<typeof BillingCreditPurchaseSchem
33
33
  export interface BillingCreditPurchaseSchemaInput extends z.input<typeof BillingCreditPurchaseSchemaDefinition> {
34
34
  }
35
35
  /**
36
- * Hosted Checkout destination and expiry for a prepaid credit pack.
36
+ * One credit pack's hosted payment destination. Payment is not proof of a fulfilled credit grant.
37
37
  *
38
38
  * @openapiSchema BillingCreditPurchase
39
39
  * @endpoint POST /v1/billing/credit-purchases
@@ -15,7 +15,7 @@ const BillingCreditPurchaseSchemaDefinition = z.object({
15
15
  url: z.string(),
16
16
  });
17
17
  /**
18
- * Hosted Checkout destination and expiry for a prepaid credit pack.
18
+ * One credit pack's hosted payment destination. Payment is not proof of a fulfilled credit grant.
19
19
  *
20
20
  * @openapiSchema BillingCreditPurchase
21
21
  * @endpoint POST /v1/billing/credit-purchases
@@ -127,10 +127,18 @@ export const OPENAPI_COMPONENT_MANIFEST = Object.freeze({
127
127
  modulePath: "billing/credit-purchase",
128
128
  schemaName: "BillingCreditPurchaseSchema",
129
129
  },
130
+ BillingCreditPurchaseCapDecision: {
131
+ modulePath: "billing/credit-purchase-cap-decision",
132
+ schemaName: "BillingCreditPurchaseCapDecisionSchema",
133
+ },
130
134
  BillingCreditPurchaseConfirmation: {
131
135
  modulePath: "billing/credit-purchase-confirmation",
132
136
  schemaName: "BillingCreditPurchaseConfirmationSchema",
133
137
  },
138
+ BillingCreditPurchaseMode: {
139
+ modulePath: "billing/credit-purchase-mode",
140
+ schemaName: "BillingCreditPurchaseModeSchema",
141
+ },
134
142
  BillingCreditPurchaseMutation: {
135
143
  modulePath: "billing/credit-purchase-mutation",
136
144
  schemaName: "BillingCreditPurchaseMutationSchema",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aventurevc/api-schemas",
3
- "version": "0.8.459",
3
+ "version": "0.8.461",
4
4
  "private": false,
5
5
  "description": "Zod v4 schemas and TypeScript types for the aVenture API.",
6
6
  "license": "Apache-2.0",