@aventurevc/api-schemas 0.8.476 → 0.8.477

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.
@@ -2,6 +2,7 @@ import { z } from "zod/v4";
2
2
  declare const BillingNextChargeSchemaDefinition: z.ZodObject<{
3
3
  amountDue: z.ZodNumber;
4
4
  chargeAt: z.ZodISODateTime;
5
+ complimentaryUntil: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
5
6
  currency: z.ZodString;
6
7
  discount: z.ZodArray<z.ZodType<{
7
8
  amountOff?: number | null | undefined;
@@ -16,13 +17,14 @@ declare const BillingNextChargeSchemaDefinition: z.ZodObject<{
16
17
  name?: string | null | undefined;
17
18
  percentOff?: number | null | undefined;
18
19
  }, import("./discount.ts").BillingDiscountSchemaInput>>>;
20
+ paidChargeAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
19
21
  totalExcludingTax: z.ZodNumber;
20
22
  }, z.core.$strip>;
21
23
  type BillingNextChargeDefinition = z.infer<typeof BillingNextChargeSchemaDefinition>;
22
24
  export interface BillingNextChargeSchemaInput extends z.input<typeof BillingNextChargeSchemaDefinition> {
23
25
  }
24
26
  /**
25
- * Next invoice of the caller's renewing Stripe subscription as Stripe previews it, after discounts and credits.
27
+ * Next invoice of the caller's renewing Stripe subscription as Stripe previews it, after discounts and credits, and when the account next pays.
26
28
  *
27
29
  * @openapiSchema BillingNextCharge
28
30
  * @endpoint GET /v1/billing/subscription/next-charge
@@ -4,17 +4,21 @@ import { BillingDiscountSchema } from "./discount.js";
4
4
  const BillingNextChargeSchemaDefinition = z.object({
5
5
  /** Amount the next invoice will charge in the currency's minor unit, after discounts, credits, and usage so far; 0 when a discount covers it */
6
6
  amountDue: z.number().int(),
7
- /** When the next invoice is raised and charged */
7
+ /** When the next invoice is raised and charged. When the subscription ends before raising another invoice, this is that end and both amounts are 0. */
8
8
  chargeAt: z.iso.datetime({ offset: true }),
9
+ /** When the free stretch ends: the end of a complimentary plan granted for a term, or the first renewal that coupons no longer make free; the plan charge is 0 until then. Absent when coupons do not make the next invoice's plan charge free, or when it stays free with no end */
10
+ complimentaryUntil: z.iso.datetime({ offset: true }).nullish(),
9
11
  /** ISO 4217 currency code. */
10
12
  currency: z.string(),
11
13
  /** Discounts applied to the next invoice; empty when none apply */
12
14
  discount: z.array(BillingDiscountSchema),
15
+ /** When money is next collected after coupons, complimentary terms, and account credit: chargeAt when amountDue is above 0, otherwise the first later renewal they no longer cover. Absent when nothing is charged before the subscription ends, or ever. Renewals after the next invoice are estimated from the plan price and exclude usage */
16
+ paidChargeAt: z.iso.datetime({ offset: true }).nullish(),
13
17
  /** Next invoice total in the currency's minor unit after discounts, before tax and account credit; compare it, not amountDue, with the plan's price */
14
18
  totalExcludingTax: z.number().int(),
15
19
  });
16
20
  /**
17
- * Next invoice of the caller's renewing Stripe subscription as Stripe previews it, after discounts and credits.
21
+ * Next invoice of the caller's renewing Stripe subscription as Stripe previews it, after discounts and credits, and when the account next pays.
18
22
  *
19
23
  * @openapiSchema BillingNextCharge
20
24
  * @endpoint GET /v1/billing/subscription/next-charge
@@ -11,7 +11,7 @@ const BillingSubscriptionSchemaDefinition = z.object({
11
11
  allowance: ResearchAllowanceUsageSchema,
12
12
  /** True when an entitled eligible paid plan may buy App Store consumable research credit, independent of who bills its plan. Absent on older servers; clients must require true before offering a purchase. */
13
13
  appStoreCreditPurchasable: z.boolean().nullish(),
14
- /** True when the plan is cancelled and ends at periodEnd */
14
+ /** True when the plan is cancelled and ends at periodEnd; a complimentary term's end is not a cancellation; next-charge complimentaryUntil reports it */
15
15
  cancelAtPeriodEnd: z.boolean(),
16
16
  /** True when POST /v1/billing/credit-purchases sells this account a prepaid credit pack without requiring a subscription. False while an App Store plan is continuing or a continuing plan cannot fund new charges (including INCOMPLETE, PAST_DUE, UNPAID, PAUSED, or expired). Buying credit never changes the tier. */
17
17
  creditPurchasable: z.boolean(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aventurevc/api-schemas",
3
- "version": "0.8.476",
3
+ "version": "0.8.477",
4
4
  "private": false,
5
5
  "description": "Zod v4 schemas and TypeScript types for the aVenture API.",
6
6
  "license": "Apache-2.0",