founder-schema 0.34.0 → 0.35.0

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.
@@ -42,7 +42,7 @@
42
42
  * @module founder-schema/domains/billing
43
43
  */
44
44
  import { z } from 'zod';
45
- export { type BillingDetails, billingDetailsSchema, GST_RATE_PERCENT, GST_STATE_CODE_VALUES, GST_STATES, type GstStateCode, gstinChecksumValid, gstinSchema, gstStateCodeSchema, gstStateName, } from './gst.js';
45
+ export { type BillingDetails, billingDetailsSchema, GST_RATE_PERCENT, GST_STATE_CODE_VALUES, GST_STATES, type GstStateCode, gstinChecksumValid, gstinSchema, gstStateCodeOf, gstStateCodeSchema, gstStateName, } from './gst.js';
46
46
  /** ⚠ Stored on every order: append only. */
47
47
  export declare const PURCHASE_KIND_VALUES: readonly ["membership", "plan", "upgrade"];
48
48
  export type PurchaseKind = (typeof PURCHASE_KIND_VALUES)[number];
@@ -1 +1 @@
1
- {"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../src/domains/billing/billing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiCxB,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACV,KAAK,YAAY,EACjB,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,YAAY,GACb,MAAM,UAAU,CAAC;AAIlB,4CAA4C;AAC5C,eAAO,MAAM,oBAAoB,4CAA6C,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;2BAI7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,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iBAavB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,kDAAkD;AAClD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;iBAA6C,CAAC;AAC3E,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,kBAAkB;;iBAAyC,CAAC;AACzE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAK9D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;iBAS4D,CAAC;AAChG,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;iBAQ4D,CAAC;AAChG,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -50,7 +50,7 @@ import { autoRenewalStatusSchema, paiseSchema, planPeriodSchema, planTierSchema,
50
50
  import { personSchema } from '../people/person.js';
51
51
  import { billingDetailsSchema, gstStateCodeSchema } from './gst.js';
52
52
  import { paymentMethodSnapshotSchema } from './payment-method.js';
53
- export { billingDetailsSchema, GST_RATE_PERCENT, GST_STATE_CODE_VALUES, GST_STATES, gstinChecksumValid, gstinSchema, gstStateCodeSchema, gstStateName, } from './gst.js';
53
+ export { billingDetailsSchema, GST_RATE_PERCENT, GST_STATE_CODE_VALUES, GST_STATES, gstinChecksumValid, gstinSchema, gstStateCodeOf, gstStateCodeSchema, gstStateName, } from './gst.js';
54
54
  // ─── What can be bought ──────────────────────────────────────────────────────
55
55
  /** ⚠ Stored on every order: append only. */
56
56
  export const PURCHASE_KIND_VALUES = ['membership', 'plan', 'upgrade'];
@@ -1 +1 @@
1
- {"version":3,"file":"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AAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3E,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACjD,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACnD,CAAC;KACD,MAAM,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,mBAAmB,EAAE,CAAC,CAAC","sourcesContent":["/**\n * founder-schema: buying, paying, invoices, refunds and coupons (0.12.0)\n *\n * POST /api/v1/billing/quote quoteBodySchema -> quoteSchema\n * POST /api/v1/billing/orders createOrderBodySchema -> createOrderResponseSchema\n * GET /api/v1/billing/orders/:orderId orderStateSchema (polled while \"processing\")\n * POST /api/v1/billing/orders/:orderId/confirm confirmOrderBodySchema -> orderStateSchema\n * GET /api/v1/billing/payments paymentPageSchema (mine)\n * GET /api/v1/billing/payments/:orderId paymentDetailSchema (mine, with the invoice)\n *\n * Staff (by the ability: support reads; managers refund and run coupons):\n * GET /api/v1/staff/payments staffPaymentsQuerySchema -> staffPaymentPageSchema\n * GET /api/v1/staff/payments/:orderId staffPaymentDetailSchema\n * POST /api/v1/staff/payments/:orderId/refund refundPaymentBodySchema -> staffPaymentDetailSchema\n * GET /api/v1/staff/coupons couponListSchema\n * POST /api/v1/staff/coupons createCouponBodySchema -> couponSchema\n * PATCH /api/v1/staff/coupons/:couponId updateCouponBodySchema -> couponSchema\n * PUT /api/v1/members/:memberId/membership setMembershipBodySchema -> memberDetailSchema\n *\n * Auto-renewal (0.31.0, payments v2; founder-circle-backend docs/payments-v2-plan.md 3a):\n * POST /api/v1/billing/auto-renewals startAutoRenewalBodySchema -> createOrderResponseSchema ('subscription')\n * GET /api/v1/billing/auto-renewals/:autoRenewalId autoRenewalStateSchema (polled after authorising)\n * POST /api/v1/billing/auto-renewals/:autoRenewalId/confirm confirmAutoRenewalBodySchema -> autoRenewalStateSchema\n * POST /api/v1/billing/auto-renewals/:autoRenewalId/cancel -> autoRenewalStateSchema (off at the period's end)\n * POST /api/v1/billing/auto-renewals/:autoRenewalId/payment-method -> paymentMethodUpdateSchema\n * (a plan bought with `autoRenew: true` on POST /billing/orders answers 'subscription' too)\n *\n * THE ONE RULE: THE SERVER PRICES, THE CLIENT CHOOSES. A request names what it\n * wants (an item) and maybe a coupon CODE; it never names an amount. Every\n * amount here is the server's, in integer paise, GST included.\n *\n * TWO PATHS IN, ONE GRANT. A payment reaches the server from the browser the\n * moment checkout returns (`confirm`) and from the gateway's webhook. Either\n * grants; the second is a no-op. So a member who closes the tab is still\n * granted, and `confirm` failing never means \"not paid\": the web says\n * \"processing\" and polls the order.\n *\n * GST: the company is registered, every captured payment gets a tax invoice,\n * every refund a credit note. Where the buyer is decides the tax: in the\n * supplier's state CGST + SGST, elsewhere IGST. So checkout asks for the state.\n *\n * @module founder-schema/domains/billing\n */\n\nimport { z } from 'zod';\nimport {\n eachOnce,\n emptyStringToUndefined,\n objectIdSchema,\n paginationQuerySchema,\n} from '../../core/common.js';\nimport {\n BILLING_REASON_MAX,\n BILLING_REASON_MIN,\n COUPON_CODE_MAX,\n COUPON_CODE_MIN,\n COUPON_LABEL_MAX,\n COUPON_LABEL_MIN,\n COUPON_PERCENT_MAX,\n COUPON_PERCENT_MIN,\n COUPON_USES_MAX,\n INVOICE_NUMBER_MAX,\n RAZORPAY_ID_MAX,\n RAZORPAY_SIGNATURE_MAX,\n} from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport {\n autoRenewalStatusSchema,\n paiseSchema,\n planPeriodSchema,\n planTierSchema,\n} from '../membership/membership.js';\nimport { personSchema } from '../people/person.js';\nimport { billingDetailsSchema, gstStateCodeSchema } from './gst.js';\nimport { paymentMethodSnapshotSchema } from './payment-method.js';\n\nexport {\n type BillingDetails,\n billingDetailsSchema,\n GST_RATE_PERCENT,\n GST_STATE_CODE_VALUES,\n GST_STATES,\n type GstStateCode,\n gstinChecksumValid,\n gstinSchema,\n gstStateCodeSchema,\n gstStateName,\n} from './gst.js';\n\n// ─── What can be bought ──────────────────────────────────────────────────────\n\n/** ⚠ Stored on every order: append only. */\nexport const PURCHASE_KIND_VALUES = ['membership', 'plan', 'upgrade'] as const;\nexport type PurchaseKind = (typeof PURCHASE_KIND_VALUES)[number];\n\n/**\n * The thing asked for.\n *\n * membership Rs 99, once\n * plan a month or a year of Premium or Business, appended\n * upgrade the Premium time left, turned into Business, for the difference\n */\nexport const purchaseItemSchema = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('membership') }),\n z.object({ kind: z.literal('plan'), tier: planTierSchema, period: planPeriodSchema }),\n z.object({ kind: z.literal('upgrade') }),\n]);\nexport type PurchaseItem = z.infer<typeof purchaseItemSchema>;\n\n/** A coupon code as typed: letters, digits, hyphens; compared upper-case. */\nexport const couponCodeSchema = z\n .string()\n .trim()\n .min(COUPON_CODE_MIN)\n .max(COUPON_CODE_MAX)\n .regex(/^[A-Za-z0-9-]+$/, VALIDATION_MESSAGE.couponCodeInvalid)\n .transform((v) => v.toUpperCase());\n\n// ─── Quote ───────────────────────────────────────────────────────────────────\n\n/**\n * The tax inside a total. `taxable + cgst + sgst + igst = total`; either\n * CGST + SGST (buyer in the supplier's state) or IGST, never both.\n */\nexport const taxSplitSchema = z.object({\n ratePercent: z.number().int().positive(),\n taxable: paiseSchema,\n cgst: paiseSchema,\n sgst: paiseSchema,\n igst: paiseSchema,\n total: paiseSchema,\n});\nexport type TaxSplit = z.infer<typeof taxSplitSchema>;\n\n/**\n * `POST /billing/quote`. The state is optional: without it, no tax split.\n * `autoRenew` (0.31.0): price it as an auto-renewing plan, so the quote carries\n * the terms the member must see before authorising (`quote.autoRenew`).\n */\nexport const quoteBodySchema = z.object({\n item: purchaseItemSchema,\n couponCode: couponCodeSchema.optional(),\n stateCode: gstStateCodeSchema.optional(),\n autoRenew: z.boolean().optional(),\n});\nexport type QuoteBody = z.infer<typeof quoteBodySchema>;\n\n/** What a plan or an upgrade would do to the plan, priced now. */\nexport const planEffectSchema = z.object({\n tier: planTierSchema,\n /** When this purchase's time starts (later than now when it waits its turn). */\n startsAt: z.iso.datetime(),\n endsAt: z.iso.datetime(),\n /** For an upgrade: the days of Premium turned into Business. */\n upgradedDays: z.number().int().positive().nullable(),\n});\nexport type PlanEffect = z.infer<typeof planEffectSchema>;\n\n/** A coupon as a purchase carries it: its code and staff's name for it. */\nexport const appliedCouponSchema = z.object({ code: z.string(), label: z.string() });\nexport type AppliedCoupon = z.infer<typeof appliedCouponSchema>;\n\n/**\n * Why a captured payment was NOT applied (`grantFailed`), and so refunded\n * (0.18.0: the one list; the backend wrote two of these as loose strings and\n * the contract said `string`). Stored on the order: append only.\n *\n * AMOUNT_MISMATCH the gateway captured another amount than the price\n * ACCOUNT_DELETED paid after the account was deleted\n * COUPON_ALREADY_USED the code went to another of their orders, paid first\n * MEMBERSHIP_REQUIRED a plan, but the membership is gone (refunded, withdrawn)\n * ALREADY_MEMBER a membership, but they are a member already\n * PLAN_CHANGED an upgrade priced on a plan that has since changed\n * PLAN_NOTHING_TO_UPGRADE an upgrade with no Premium time left\n * PLAN_TERM_LIMIT past `PLAN_AHEAD_MAX_YEARS` of plan time\n * PLAN_UPGRADE_INSTEAD Business bought while on Premium (that is an upgrade)\n * AUTO_RENEW_STOPPED an auto-renewal's charge that landed after the\n * auto-renewal was stopped at once (a refund, the\n * membership ended, the account deleted) and the\n * gateway's cancel had not taken yet (0.31.0)\n * GRANT_REFUSED any other refusal of the grant: still recorded and\n * refunded, never left captured for nothing (the\n * server logs which one, to add it here)\n */\nexport const GRANT_FAILURE_VALUES = [\n 'AMOUNT_MISMATCH',\n 'ACCOUNT_DELETED',\n 'COUPON_ALREADY_USED',\n 'MEMBERSHIP_REQUIRED',\n 'ALREADY_MEMBER',\n 'PLAN_CHANGED',\n 'PLAN_NOTHING_TO_UPGRADE',\n 'PLAN_TERM_LIMIT',\n 'PLAN_UPGRADE_INSTEAD',\n 'GRANT_REFUSED',\n 'AUTO_RENEW_STOPPED',\n] as const;\nexport const grantFailureSchema = z.enum(GRANT_FAILURE_VALUES);\nexport type GrantFailure = z.infer<typeof grantFailureSchema>;\n\n/**\n * What an auto-renewing plan will charge (0.31.0), for the disclosure next to\n * Pay. India's 2023 dark-pattern guidelines: the member is told, before\n * authorising, that it renews, how much, how often and from when, and that it\n * can be turned off.\n *\n * chargesNow true: `amount` is taken now and buys the first period.\n * false: time of this tier is already held, so nothing is\n * taken now; the mandate is authorised and the first charge is\n * on `firstChargeAt`, when that time ends.\n * firstChargeAt now (chargesNow) or the end of the time held\n * nextChargeAt the charge after the first: one `period` later, India's calendar\n */\nexport const autoRenewTermsSchema = z.object({\n amount: paiseSchema,\n period: planPeriodSchema,\n chargesNow: z.boolean(),\n firstChargeAt: z.iso.datetime(),\n nextChargeAt: z.iso.datetime(),\n});\nexport type AutoRenewTerms = z.infer<typeof autoRenewTermsSchema>;\n\nexport const quoteSchema = z.object({\n item: purchaseItemSchema,\n /** \"Membership\", \"Premium, 1 month\", \"Upgrade to Business\": the server's words. */\n title: z.string(),\n listPrice: paiseSchema,\n discount: paiseSchema,\n /** What would be charged. Zero for a free-membership coupon: no checkout at all. */\n total: paiseSchema,\n coupon: appliedCouponSchema.nullable(),\n /** Null for a membership. */\n plan: planEffectSchema.nullable(),\n /** Null without a state. */\n tax: taxSplitSchema.nullable(),\n refundWindowDays: z.number().int().positive(),\n /**\n * The auto-renewing terms, when asked with `autoRenew: true` (0.31.0):\n *\n * a plan its own terms\n * an upgrade the BUSINESS terms it would continue as, only while a\n * Premium auto-renewal runs (not being turned off): its\n * period, first charge at the Business end (corrected\n * 2026-11-28; this said \"null for an upgrade\", and the web's\n * \"Keep auto-renew on, as Business\" needs these terms)\n *\n * Null otherwise: a coupon, the membership, auto-renew off on this server,\n * an upgrade with no Premium auto-renewal running. A PREVIEW: it ignores\n * whether another auto-renewal holds the slot, so \"Switch to Premium at\n * renewal\" can show its terms while Business still renews; only\n * `POST /billing/auto-renewals` (or the order) refuses on the slot.\n */\n autoRenew: autoRenewTermsSchema.nullable().default(null),\n});\nexport type Quote = z.infer<typeof quoteSchema>;\n\n// ─── Orders ──────────────────────────────────────────────────────────────────\n\n/**\n * Where an order stands. ⚠ Stored: append only.\n *\n * created checkout open, nothing paid yet\n * paid captured and granted; has an invoice\n * granted_free a free coupon: granted with no payment and no invoice\n * expired not paid within `ORDER_TTL_MINUTES`\n * refund_pending staff refunded it; the gateway is returning the money\n * refunded the money is back; has a credit note\n * refund_failed the gateway could not return it; staff act from its dashboard\n */\nexport const ORDER_STATUS_VALUES = [\n 'created',\n 'paid',\n 'granted_free',\n 'expired',\n 'refund_pending',\n 'refunded',\n 'refund_failed',\n] as const;\nexport const orderStatusSchema = z.enum(ORDER_STATUS_VALUES);\nexport type OrderStatus = z.infer<typeof orderStatusSchema>;\n\n/**\n * `POST /billing/orders`. Billing details are required for anything paid (the\n * invoice needs a place of supply): the server refuses a paid order without\n * them (`billing.stateCode`, VALIDATION_ERROR). A free coupon issues no\n * invoice, so it needs none (0.12.0).\n */\nexport const createOrderBodySchema = z.object({\n item: purchaseItemSchema,\n couponCode: couponCodeSchema.optional(),\n billing: billingDetailsSchema.optional(),\n /**\n * Buy the plan as an AUTO-RENEWAL (0.31.0): consent, said explicitly on the\n * wire (the web's switch is on by default, the user's ruling; the request\n * still says it). Only for `item.kind: 'plan'`, without a coupon, while the\n * catalog's `autoRenewEnabled`: otherwise `AUTO_RENEW_NOT_OFFERED`. The\n * answer is then `status: 'subscription'`.\n */\n autoRenew: z.boolean().optional(),\n});\nexport type CreateOrderBody = z.infer<typeof createOrderBodySchema>;\n\n/**\n * Either done (a free coupon granted at once) or a checkout to open. The\n * checkout fields are Razorpay Checkout's own options; identity (name, email,\n * phone) is the server's, never typed by the caller.\n */\nexport const createOrderResponseSchema = z.discriminatedUnion('status', [\n z.object({ status: z.literal('granted'), orderId: objectIdSchema }),\n z.object({\n status: z.literal('checkout'),\n orderId: objectIdSchema,\n expiresAt: z.iso.datetime(),\n checkout: z.object({\n keyId: z.string().min(1),\n razorpayOrderId: z.string().min(1),\n amount: paiseSchema,\n currency: z.literal('INR'),\n /** The merchant name on the dialog. */\n name: z.string(),\n /** What is being bought, under the name. */\n description: z.string(),\n prefill: z.object({\n name: z.string(),\n email: z.string(),\n contact: z.string().optional(),\n }),\n }),\n }),\n /**\n * An auto-renewal to authorise at Checkout (0.31.0): Razorpay Checkout is\n * opened with `subscription_id`, never `order_id` or an amount. `orderId` is\n * the first charge's order when one is taken now (`terms.chargesNow`): poll\n * it as any order. With nothing taken now it is null: poll the\n * auto-renewal instead. Its handler's answer goes to\n * `POST /billing/auto-renewals/:autoRenewalId/confirm`.\n */\n z.object({\n status: z.literal('subscription'),\n autoRenewalId: objectIdSchema,\n orderId: objectIdSchema.nullable(),\n /** Authorise before this, or it lapses (`expired`). */\n expiresAt: z.iso.datetime(),\n terms: autoRenewTermsSchema,\n checkout: z.object({\n keyId: z.string().min(1),\n razorpaySubscriptionId: z.string().min(1),\n name: z.string(),\n description: z.string(),\n prefill: z.object({\n name: z.string(),\n email: z.string(),\n contact: z.string().optional(),\n }),\n }),\n }),\n]);\nexport type CreateOrderResponse = z.infer<typeof createOrderResponseSchema>;\n\nexport const orderParamsSchema = z.object({ orderId: objectIdSchema });\nexport type OrderParams = z.infer<typeof orderParamsSchema>;\n\n/** What Razorpay Checkout's `handler` hands back, as it names it. */\nexport const confirmOrderBodySchema = z.object({\n razorpayOrderId: z.string().min(1).max(RAZORPAY_ID_MAX),\n razorpayPaymentId: z.string().min(1).max(RAZORPAY_ID_MAX),\n razorpaySignature: z.string().min(1).max(RAZORPAY_SIGNATURE_MAX),\n});\nexport type ConfirmOrderBody = z.infer<typeof confirmOrderBodySchema>;\n\n// ─── Auto-renewals (0.31.0) ──────────────────────────────────────────────────\n\nexport const autoRenewalParamsSchema = z.object({ autoRenewalId: objectIdSchema });\nexport type AutoRenewalParams = z.infer<typeof autoRenewalParamsSchema>;\n\n/**\n * `POST /billing/auto-renewals`: turn auto-renew ON for the plan time already\n * held (Me > Plans, after turning it off, after an upgrade). Nothing is taken\n * now; the first charge is when the time it follows ends (`terms.chargesNow`\n * false):\n *\n * the tier's own time held it starts when that tier's time ends\n * Premium while only Business is held (a DOWNGRADE, \"switch to Premium at\n * renewal\") it starts when the Business time ends\n *\n * Refused (`AUTO_RENEW_NOT_OFFERED`) with no plan time held (buy the plan with\n * `autoRenew` instead), for Business while only Premium is held (that is an\n * upgrade), while another auto-renewal holds the slot (one whose stop is\n * already requested does not), or while auto-renew is off on this server.\n *\n * `billing`: the place of supply every renewal's invoice needs. Without it the\n * member's saved details are used; with neither, `VALIDATION_ERROR` on\n * `billing.stateCode`, as for an order.\n */\nexport const startAutoRenewalBodySchema = z.object({\n tier: planTierSchema,\n period: planPeriodSchema,\n billing: billingDetailsSchema.optional(),\n});\nexport type StartAutoRenewalBody = z.infer<typeof startAutoRenewalBodySchema>;\n\n/**\n * What Razorpay Checkout's `handler` hands back for a subscription, as it\n * names it. The server checks the signature over its OWN stored subscription\n * id, never the one sent here: HMAC_SHA256(razorpay_payment_id + \"|\" +\n * subscription_id, key secret).\n */\nexport const confirmAutoRenewalBodySchema = z.object({\n razorpaySubscriptionId: z.string().min(1).max(RAZORPAY_ID_MAX),\n razorpayPaymentId: z.string().min(1).max(RAZORPAY_ID_MAX),\n razorpaySignature: z.string().min(1).max(RAZORPAY_SIGNATURE_MAX),\n});\nexport type ConfirmAutoRenewalBody = z.infer<typeof confirmAutoRenewalBodySchema>;\n\n/** An auto-renewal as its member polls or changes it. */\nexport const autoRenewalStateSchema = z.object({\n autoRenewalId: objectIdSchema,\n status: autoRenewalStatusSchema,\n tier: planTierSchema,\n period: planPeriodSchema,\n /** The first charge's order, when one was taken at authorisation: poll it for the grant. */\n orderId: objectIdSchema.nullable(),\n nextChargeAt: z.iso.datetime().nullable(),\n cancelAtCycleEnd: z.boolean(),\n});\nexport type AutoRenewalState = z.infer<typeof autoRenewalStateSchema>;\n\n/**\n * `POST /billing/auto-renewals/:id/payment-method`: how the member updates the\n * method a failed charge used. A card mandate opens Checkout to change the\n * card (`subscription_card_change`); any other opens Razorpay's own page,\n * where a UPI or eMandate can move to a card only (Razorpay's rule).\n */\nexport const paymentMethodUpdateSchema = z.discriminatedUnion('kind', [\n z.object({\n kind: z.literal('checkout'),\n keyId: z.string().min(1),\n razorpaySubscriptionId: z.string().min(1),\n name: z.string(),\n prefill: z.object({\n name: z.string(),\n email: z.string(),\n contact: z.string().optional(),\n }),\n }),\n z.object({ kind: z.literal('link'), url: z.url() }),\n]);\nexport type PaymentMethodUpdate = z.infer<typeof paymentMethodUpdateSchema>;\n\n/**\n * Where an order came from (0.31.0). ⚠ Stored: append only.\n *\n * checkout the member bought it (or a free code granted it)\n * renewal an auto-renewal's charge\n */\nexport const ORDER_SOURCE_VALUES = ['checkout', 'renewal'] as const;\nexport const orderSourceSchema = z.enum(ORDER_SOURCE_VALUES);\nexport type OrderSource = z.infer<typeof orderSourceSchema>;\n\n/** An order as its buyer polls it. */\nexport const orderStateSchema = z.object({\n orderId: objectIdSchema,\n item: purchaseItemSchema,\n status: orderStatusSchema,\n /**\n * The money was taken but what it bought could not be applied (bought\n * twice in two tabs, the plan changed while paying): it is refunded in\n * full, by itself. The client says so instead of \"done\".\n */\n notApplied: z.boolean(),\n});\nexport type OrderState = z.infer<typeof orderStateSchema>;\n\n// ─── Payments, invoices, credit notes ────────────────────────────────────────\n\n/** A party on an invoice. The supplier always has a GSTIN on a real invoice; a buyer, only on B2B. */\nexport const invoicePartySchema = z.object({\n name: z.string(),\n address: z.string().nullable(),\n gstin: z.string().nullable(),\n stateCode: gstStateCodeSchema,\n stateName: z.string(),\n});\nexport type InvoiceParty = z.infer<typeof invoicePartySchema>;\n\n/** B2B with the buyer's GSTIN, B2C without (0.18.0: the values, for the backend's model). */\nexport const INVOICE_KIND_VALUES = ['b2b', 'b2c'] as const;\nexport const invoiceKindSchema = z.enum(INVOICE_KIND_VALUES);\nexport type InvoiceKind = z.infer<typeof invoiceKindSchema>;\n\n/** A tax invoice, frozen when the payment was captured. */\nexport const invoiceSchema = z.object({\n /** e.g. `FC/26-27/000123`: sequential within a financial year, at most `INVOICE_NUMBER_MAX`. */\n number: z.string().max(INVOICE_NUMBER_MAX),\n issuedAt: z.iso.datetime(),\n /**\n * Issued where the supplier's GSTIN is not configured (dev, Razorpay test\n * mode): marked \"TEST: not a tax invoice\". Never true in production.\n */\n test: z.boolean(),\n supplier: invoicePartySchema,\n buyer: invoicePartySchema,\n kind: invoiceKindSchema,\n /** The service's accounting code (SAC). */\n sac: z.string(),\n description: z.string(),\n tax: taxSplitSchema,\n /** Always false: these services are never under reverse charge. */\n reverseCharge: z.literal(false),\n razorpayPaymentId: z.string(),\n});\nexport type Invoice = z.infer<typeof invoiceSchema>;\n\n/** A refund's credit note, against its invoice. */\nexport const creditNoteSchema = z.object({\n /** e.g. `FCCN/26-27/00012`: the invoice series + `CN`, sequential within a financial year. */\n number: z.string().max(INVOICE_NUMBER_MAX),\n issuedAt: z.iso.datetime(),\n invoiceNumber: z.string().max(INVOICE_NUMBER_MAX),\n tax: taxSplitSchema,\n});\nexport type CreditNote = z.infer<typeof creditNoteSchema>;\n\n/** One purchase in a member's history. Only settled orders are listed, never an abandoned checkout. */\nexport const paymentSummarySchema = z.object({\n id: objectIdSchema,\n item: purchaseItemSchema,\n title: z.string(),\n total: paiseSchema,\n status: orderStatusSchema,\n /** When it was captured, or granted for a free coupon. */\n paidAt: z.iso.datetime(),\n invoiceNumber: z.string().nullable(),\n /** Until when a refund may be asked for; null once refunded or for a free coupon. */\n refundableUntil: z.iso.datetime().nullable(),\n /** A purchase or an auto-renewal's charge (0.31.0): the history says \"Renewal\". */\n source: orderSourceSchema.default('checkout'),\n /** How it was paid (0.31.0); null for a free coupon and for payments from before 0.31.0. */\n method: paymentMethodSnapshotSchema.nullable().default(null),\n});\nexport type PaymentSummary = z.infer<typeof paymentSummarySchema>;\n\nexport const paymentPageSchema = paginatedSchema(paymentSummarySchema);\nexport type PaymentPage = z.infer<typeof paymentPageSchema>;\n\nexport const paymentDetailSchema = paymentSummarySchema.extend({\n listPrice: paiseSchema,\n discount: paiseSchema,\n coupon: appliedCouponSchema.nullable(),\n invoice: invoiceSchema.nullable(),\n creditNote: creditNoteSchema.nullable(),\n refundedAt: z.iso.datetime().nullable(),\n});\nexport type PaymentDetail = z.infer<typeof paymentDetailSchema>;\n\n// ─── Staff: payments and refunds ─────────────────────────────────────────────\n\n/** Who paid, as they are now, so staff can find them. Email only for a role that may read it. */\nexport const payerSchema = personSchema.extend({\n email: z.string().nullable(),\n});\nexport type Payer = z.infer<typeof payerSchema>;\n\nexport const staffPaymentsQuerySchema = paginationQuerySchema.extend({\n status: orderStatusSchema.optional(),\n memberId: objectIdSchema.optional(),\n /** Only the ones a person must act on (`needsAction` below). */\n needsAction: z.preprocess(emptyStringToUndefined, z.stringbool().default(false)),\n});\nexport type StaffPaymentsQuery = z.infer<typeof staffPaymentsQuerySchema>;\nexport type StaffPaymentsQueryInput = z.input<typeof staffPaymentsQuerySchema>;\n\nexport const staffPaymentSummarySchema = paymentSummarySchema.extend({\n payer: payerSchema,\n /**\n * A person must act (0.12.0): taken but not applied and not yet refunded\n * (the automatic refund did not go through), a refund that failed at the\n * gateway, or an open chargeback.\n */\n needsAction: z.boolean(),\n});\nexport type StaffPaymentSummary = z.infer<typeof staffPaymentSummarySchema>;\nexport const staffPaymentPageSchema = paginatedSchema(staffPaymentSummarySchema);\nexport type StaffPaymentPage = z.infer<typeof staffPaymentPageSchema>;\n\nexport const staffPaymentDetailSchema = paymentDetailSchema.extend({\n payer: payerSchema,\n razorpay: z.object({\n orderId: z.string().nullable(),\n paymentId: z.string().nullable(),\n refundId: z.string().nullable(),\n /** The auto-renewal's subscription, for a renewal charge (0.31.0). */\n subscriptionId: z.string().nullable().default(null),\n }),\n /** Why staff refunded it, on record. */\n refundReason: z.string().nullable(),\n /**\n * The money was taken but what it bought could not be applied when it was\n * captured (they were a member already, the Premium time to upgrade had\n * run out, past the 3-year cap): refund it. Null when it applied. One of\n * `GRANT_FAILURE_VALUES` (0.18.0; a plain string before).\n */\n grantFailed: grantFailureSchema.nullable(),\n /** A chargeback was opened on it (cleared when it is won or closed). */\n disputedAt: z.iso.datetime().nullable(),\n /**\n * What refunds made outside Founder Circle (the Razorpay dashboard) have\n * already given back of this payment. A Refund here gives back the rest:\n * `total` less this. 0 when there were none.\n */\n refundedOutside: paiseSchema,\n /**\n * Payments captured on this order other than the one that settled it (a\n * late authorisation, a second Checkout attempt): each is refunded by\n * itself; `refunded: false` means that refund has not gone through yet and\n * the payment needs a person.\n */\n strayPayments: z.array(\n z.object({\n paymentId: z.string(),\n amount: paiseSchema,\n refunded: z.boolean(),\n at: z.iso.datetime(),\n }),\n ),\n /**\n * When the payer asked for a refund (0.13.0): their first \"Payments and\n * refunds\" ticket opened inside the refund window. An ask in time keeps the\n * payment refundable after the window ends. Null when they did not ask in\n * time, or it is not a paid payment.\n */\n refundAskedAt: z.iso.datetime().nullable(),\n viewer: z.object({\n /**\n * Paid, within the window (or asked for within it), not their own, and\n * the asker may refund.\n */\n canRefund: z.boolean(),\n }),\n});\nexport type StaffPaymentDetail = z.infer<typeof staffPaymentDetailSchema>;\n\nconst reasonSchema = z.string().trim().min(BILLING_REASON_MIN).max(BILLING_REASON_MAX);\n\n/** `POST /staff/payments/:orderId/refund`. The reason is on the audit record. */\nexport const refundPaymentBodySchema = z.object({ reason: reasonSchema });\nexport type RefundPaymentBody = z.infer<typeof refundPaymentBodySchema>;\n\n/**\n * `PUT /members/:memberId/membership`: grant (a partner, a press account) or\n * revoke (a fake or duplicate account holding a founding place). A paid one\n * is never revoked: refund its payment.\n */\nexport const setMembershipBodySchema = z.object({\n granted: z.boolean(),\n reason: reasonSchema,\n});\nexport type SetMembershipBody = z.infer<typeof setMembershipBodySchema>;\n\n// ─── Staff: coupons ──────────────────────────────────────────────────────────\n\n/** What a coupon is good for. A percent coupon names what it applies to. */\nexport const COUPON_TARGET_VALUES = ['membership', 'premium', 'business'] as const;\nexport const couponTargetSchema = z.enum(COUPON_TARGET_VALUES);\nexport type CouponTarget = z.infer<typeof couponTargetSchema>;\n\n/**\n * ⚠ Stored: append only.\n *\n * free_membership the membership at Rs 0; `founding` numbers its holders\n * (\"Founding member #N\"). ⚠ A NEW founding coupon is refused\n * (0.14.0, COUPON_FOUNDING_RETIRED): founding places come\n * from the launch waitlist alone. The field stays, because\n * stored coupons carry it.\n * percent_off a share off the listed price of what it applies to\n */\nexport const COUPON_KIND_VALUES = ['free_membership', 'percent_off'] as const;\nexport type CouponKind = (typeof COUPON_KIND_VALUES)[number];\n\nexport const couponBenefitSchema = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('free_membership'), founding: z.boolean() }),\n z.object({\n kind: z.literal('percent_off'),\n percent: z.number().int().min(COUPON_PERCENT_MIN).max(COUPON_PERCENT_MAX),\n appliesTo: z\n .array(couponTargetSchema)\n .min(1)\n .max(COUPON_TARGET_VALUES.length)\n .refine(eachOnce, {\n error: VALIDATION_MESSAGE.couponTargetsDuplicate,\n }),\n }),\n]);\nexport type CouponBenefit = z.infer<typeof couponBenefitSchema>;\n\nexport const couponSchema = z.object({\n id: objectIdSchema,\n code: z.string(),\n label: z.string(),\n benefit: couponBenefitSchema,\n /** Redemptions allowed in all; null is no cap. */\n max: z.number().int().positive().nullable(),\n /** Redemptions in force (a revoked founding place frees one). */\n used: z.number().int().nonnegative(),\n active: z.boolean(),\n validFrom: z.iso.datetime().nullable(),\n validUntil: z.iso.datetime().nullable(),\n createdAt: z.iso.datetime(),\n});\nexport type Coupon = z.infer<typeof couponSchema>;\n\n/** Never paged: coupons are few. Newest first. */\nexport const couponListSchema = z.object({ items: z.array(couponSchema) });\nexport type CouponList = z.infer<typeof couponListSchema>;\n\nexport const couponParamsSchema = z.object({ couponId: objectIdSchema });\nexport type CouponParams = z.infer<typeof couponParamsSchema>;\n\nconst windowValid = (body: { validFrom?: string | null; validUntil?: string | null }) =>\n !body.validFrom || !body.validUntil || Date.parse(body.validFrom) < Date.parse(body.validUntil);\n\nexport const createCouponBodySchema = z\n .object({\n code: couponCodeSchema,\n label: z.string().trim().min(COUPON_LABEL_MIN).max(COUPON_LABEL_MAX),\n benefit: couponBenefitSchema,\n max: z.number().int().positive().max(COUPON_USES_MAX).nullable(),\n validFrom: z.iso.datetime().nullable().optional(),\n validUntil: z.iso.datetime().nullable().optional(),\n })\n .refine(windowValid, { path: ['validUntil'], error: VALIDATION_MESSAGE.couponWindowInvalid });\nexport type CreateCouponBody = z.infer<typeof createCouponBodySchema>;\n\n/**\n * What may change on a live coupon. The code and the benefit never change: a\n * redemption is a record of what a code gave when it was used.\n */\nexport const updateCouponBodySchema = z\n .object({\n label: z.string().trim().min(COUPON_LABEL_MIN).max(COUPON_LABEL_MAX).optional(),\n active: z.boolean().optional(),\n max: z.number().int().positive().max(COUPON_USES_MAX).nullable().optional(),\n validFrom: z.iso.datetime().nullable().optional(),\n validUntil: z.iso.datetime().nullable().optional(),\n })\n .refine(windowValid, { path: ['validUntil'], error: VALIDATION_MESSAGE.couponWindowInvalid });\nexport type UpdateCouponBody = z.infer<typeof updateCouponBodySchema>;\n"]}
1
+ {"version":3,"file":"billing.js","sourceRoot":"","sources":["../../../src/domains/billing/billing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,sBAAsB,EACtB,cAAc,EACd,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,kBAAkB,EAClB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Q,EAAE,CAAC,QAAQ,EAAE;CACnD,CAAC;KACD,MAAM,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,mBAAmB,EAAE,CAAC,CAAC","sourcesContent":["/**\n * founder-schema: buying, paying, invoices, refunds and coupons (0.12.0)\n *\n * POST /api/v1/billing/quote quoteBodySchema -> quoteSchema\n * POST /api/v1/billing/orders createOrderBodySchema -> createOrderResponseSchema\n * GET /api/v1/billing/orders/:orderId orderStateSchema (polled while \"processing\")\n * POST /api/v1/billing/orders/:orderId/confirm confirmOrderBodySchema -> orderStateSchema\n * GET /api/v1/billing/payments paymentPageSchema (mine)\n * GET /api/v1/billing/payments/:orderId paymentDetailSchema (mine, with the invoice)\n *\n * Staff (by the ability: support reads; managers refund and run coupons):\n * GET /api/v1/staff/payments staffPaymentsQuerySchema -> staffPaymentPageSchema\n * GET /api/v1/staff/payments/:orderId staffPaymentDetailSchema\n * POST /api/v1/staff/payments/:orderId/refund refundPaymentBodySchema -> staffPaymentDetailSchema\n * GET /api/v1/staff/coupons couponListSchema\n * POST /api/v1/staff/coupons createCouponBodySchema -> couponSchema\n * PATCH /api/v1/staff/coupons/:couponId updateCouponBodySchema -> couponSchema\n * PUT /api/v1/members/:memberId/membership setMembershipBodySchema -> memberDetailSchema\n *\n * Auto-renewal (0.31.0, payments v2; founder-circle-backend docs/payments-v2-plan.md 3a):\n * POST /api/v1/billing/auto-renewals startAutoRenewalBodySchema -> createOrderResponseSchema ('subscription')\n * GET /api/v1/billing/auto-renewals/:autoRenewalId autoRenewalStateSchema (polled after authorising)\n * POST /api/v1/billing/auto-renewals/:autoRenewalId/confirm confirmAutoRenewalBodySchema -> autoRenewalStateSchema\n * POST /api/v1/billing/auto-renewals/:autoRenewalId/cancel -> autoRenewalStateSchema (off at the period's end)\n * POST /api/v1/billing/auto-renewals/:autoRenewalId/payment-method -> paymentMethodUpdateSchema\n * (a plan bought with `autoRenew: true` on POST /billing/orders answers 'subscription' too)\n *\n * THE ONE RULE: THE SERVER PRICES, THE CLIENT CHOOSES. A request names what it\n * wants (an item) and maybe a coupon CODE; it never names an amount. Every\n * amount here is the server's, in integer paise, GST included.\n *\n * TWO PATHS IN, ONE GRANT. A payment reaches the server from the browser the\n * moment checkout returns (`confirm`) and from the gateway's webhook. Either\n * grants; the second is a no-op. So a member who closes the tab is still\n * granted, and `confirm` failing never means \"not paid\": the web says\n * \"processing\" and polls the order.\n *\n * GST: the company is registered, every captured payment gets a tax invoice,\n * every refund a credit note. Where the buyer is decides the tax: in the\n * supplier's state CGST + SGST, elsewhere IGST. So checkout asks for the state.\n *\n * @module founder-schema/domains/billing\n */\n\nimport { z } from 'zod';\nimport {\n eachOnce,\n emptyStringToUndefined,\n objectIdSchema,\n paginationQuerySchema,\n} from '../../core/common.js';\nimport {\n BILLING_REASON_MAX,\n BILLING_REASON_MIN,\n COUPON_CODE_MAX,\n COUPON_CODE_MIN,\n COUPON_LABEL_MAX,\n COUPON_LABEL_MIN,\n COUPON_PERCENT_MAX,\n COUPON_PERCENT_MIN,\n COUPON_USES_MAX,\n INVOICE_NUMBER_MAX,\n RAZORPAY_ID_MAX,\n RAZORPAY_SIGNATURE_MAX,\n} from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport {\n autoRenewalStatusSchema,\n paiseSchema,\n planPeriodSchema,\n planTierSchema,\n} from '../membership/membership.js';\nimport { personSchema } from '../people/person.js';\nimport { billingDetailsSchema, gstStateCodeSchema } from './gst.js';\nimport { paymentMethodSnapshotSchema } from './payment-method.js';\n\nexport {\n type BillingDetails,\n billingDetailsSchema,\n GST_RATE_PERCENT,\n GST_STATE_CODE_VALUES,\n GST_STATES,\n type GstStateCode,\n gstinChecksumValid,\n gstinSchema,\n gstStateCodeOf,\n gstStateCodeSchema,\n gstStateName,\n} from './gst.js';\n\n// ─── What can be bought ──────────────────────────────────────────────────────\n\n/** ⚠ Stored on every order: append only. */\nexport const PURCHASE_KIND_VALUES = ['membership', 'plan', 'upgrade'] as const;\nexport type PurchaseKind = (typeof PURCHASE_KIND_VALUES)[number];\n\n/**\n * The thing asked for.\n *\n * membership Rs 99, once\n * plan a month or a year of Premium or Business, appended\n * upgrade the Premium time left, turned into Business, for the difference\n */\nexport const purchaseItemSchema = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('membership') }),\n z.object({ kind: z.literal('plan'), tier: planTierSchema, period: planPeriodSchema }),\n z.object({ kind: z.literal('upgrade') }),\n]);\nexport type PurchaseItem = z.infer<typeof purchaseItemSchema>;\n\n/** A coupon code as typed: letters, digits, hyphens; compared upper-case. */\nexport const couponCodeSchema = z\n .string()\n .trim()\n .min(COUPON_CODE_MIN)\n .max(COUPON_CODE_MAX)\n .regex(/^[A-Za-z0-9-]+$/, VALIDATION_MESSAGE.couponCodeInvalid)\n .transform((v) => v.toUpperCase());\n\n// ─── Quote ───────────────────────────────────────────────────────────────────\n\n/**\n * The tax inside a total. `taxable + cgst + sgst + igst = total`; either\n * CGST + SGST (buyer in the supplier's state) or IGST, never both.\n */\nexport const taxSplitSchema = z.object({\n ratePercent: z.number().int().positive(),\n taxable: paiseSchema,\n cgst: paiseSchema,\n sgst: paiseSchema,\n igst: paiseSchema,\n total: paiseSchema,\n});\nexport type TaxSplit = z.infer<typeof taxSplitSchema>;\n\n/**\n * `POST /billing/quote`. The state is optional: without it, no tax split.\n * `autoRenew` (0.31.0): price it as an auto-renewing plan, so the quote carries\n * the terms the member must see before authorising (`quote.autoRenew`).\n */\nexport const quoteBodySchema = z.object({\n item: purchaseItemSchema,\n couponCode: couponCodeSchema.optional(),\n stateCode: gstStateCodeSchema.optional(),\n autoRenew: z.boolean().optional(),\n});\nexport type QuoteBody = z.infer<typeof quoteBodySchema>;\n\n/** What a plan or an upgrade would do to the plan, priced now. */\nexport const planEffectSchema = z.object({\n tier: planTierSchema,\n /** When this purchase's time starts (later than now when it waits its turn). */\n startsAt: z.iso.datetime(),\n endsAt: z.iso.datetime(),\n /** For an upgrade: the days of Premium turned into Business. */\n upgradedDays: z.number().int().positive().nullable(),\n});\nexport type PlanEffect = z.infer<typeof planEffectSchema>;\n\n/** A coupon as a purchase carries it: its code and staff's name for it. */\nexport const appliedCouponSchema = z.object({ code: z.string(), label: z.string() });\nexport type AppliedCoupon = z.infer<typeof appliedCouponSchema>;\n\n/**\n * Why a captured payment was NOT applied (`grantFailed`), and so refunded\n * (0.18.0: the one list; the backend wrote two of these as loose strings and\n * the contract said `string`). Stored on the order: append only.\n *\n * AMOUNT_MISMATCH the gateway captured another amount than the price\n * ACCOUNT_DELETED paid after the account was deleted\n * COUPON_ALREADY_USED the code went to another of their orders, paid first\n * MEMBERSHIP_REQUIRED a plan, but the membership is gone (refunded, withdrawn)\n * ALREADY_MEMBER a membership, but they are a member already\n * PLAN_CHANGED an upgrade priced on a plan that has since changed\n * PLAN_NOTHING_TO_UPGRADE an upgrade with no Premium time left\n * PLAN_TERM_LIMIT past `PLAN_AHEAD_MAX_YEARS` of plan time\n * PLAN_UPGRADE_INSTEAD Business bought while on Premium (that is an upgrade)\n * AUTO_RENEW_STOPPED an auto-renewal's charge that landed after the\n * auto-renewal was stopped at once (a refund, the\n * membership ended, the account deleted) and the\n * gateway's cancel had not taken yet (0.31.0)\n * GRANT_REFUSED any other refusal of the grant: still recorded and\n * refunded, never left captured for nothing (the\n * server logs which one, to add it here)\n */\nexport const GRANT_FAILURE_VALUES = [\n 'AMOUNT_MISMATCH',\n 'ACCOUNT_DELETED',\n 'COUPON_ALREADY_USED',\n 'MEMBERSHIP_REQUIRED',\n 'ALREADY_MEMBER',\n 'PLAN_CHANGED',\n 'PLAN_NOTHING_TO_UPGRADE',\n 'PLAN_TERM_LIMIT',\n 'PLAN_UPGRADE_INSTEAD',\n 'GRANT_REFUSED',\n 'AUTO_RENEW_STOPPED',\n] as const;\nexport const grantFailureSchema = z.enum(GRANT_FAILURE_VALUES);\nexport type GrantFailure = z.infer<typeof grantFailureSchema>;\n\n/**\n * What an auto-renewing plan will charge (0.31.0), for the disclosure next to\n * Pay. India's 2023 dark-pattern guidelines: the member is told, before\n * authorising, that it renews, how much, how often and from when, and that it\n * can be turned off.\n *\n * chargesNow true: `amount` is taken now and buys the first period.\n * false: time of this tier is already held, so nothing is\n * taken now; the mandate is authorised and the first charge is\n * on `firstChargeAt`, when that time ends.\n * firstChargeAt now (chargesNow) or the end of the time held\n * nextChargeAt the charge after the first: one `period` later, India's calendar\n */\nexport const autoRenewTermsSchema = z.object({\n amount: paiseSchema,\n period: planPeriodSchema,\n chargesNow: z.boolean(),\n firstChargeAt: z.iso.datetime(),\n nextChargeAt: z.iso.datetime(),\n});\nexport type AutoRenewTerms = z.infer<typeof autoRenewTermsSchema>;\n\nexport const quoteSchema = z.object({\n item: purchaseItemSchema,\n /** \"Membership\", \"Premium, 1 month\", \"Upgrade to Business\": the server's words. */\n title: z.string(),\n listPrice: paiseSchema,\n discount: paiseSchema,\n /** What would be charged. Zero for a free-membership coupon: no checkout at all. */\n total: paiseSchema,\n coupon: appliedCouponSchema.nullable(),\n /** Null for a membership. */\n plan: planEffectSchema.nullable(),\n /** Null without a state. */\n tax: taxSplitSchema.nullable(),\n refundWindowDays: z.number().int().positive(),\n /**\n * The auto-renewing terms, when asked with `autoRenew: true` (0.31.0):\n *\n * a plan its own terms\n * an upgrade the BUSINESS terms it would continue as, only while a\n * Premium auto-renewal runs (not being turned off): its\n * period, first charge at the Business end (corrected\n * 2026-11-28; this said \"null for an upgrade\", and the web's\n * \"Keep auto-renew on, as Business\" needs these terms)\n *\n * Null otherwise: a coupon, the membership, auto-renew off on this server,\n * an upgrade with no Premium auto-renewal running. A PREVIEW: it ignores\n * whether another auto-renewal holds the slot, so \"Switch to Premium at\n * renewal\" can show its terms while Business still renews; only\n * `POST /billing/auto-renewals` (or the order) refuses on the slot.\n */\n autoRenew: autoRenewTermsSchema.nullable().default(null),\n});\nexport type Quote = z.infer<typeof quoteSchema>;\n\n// ─── Orders ──────────────────────────────────────────────────────────────────\n\n/**\n * Where an order stands. ⚠ Stored: append only.\n *\n * created checkout open, nothing paid yet\n * paid captured and granted; has an invoice\n * granted_free a free coupon: granted with no payment and no invoice\n * expired not paid within `ORDER_TTL_MINUTES`\n * refund_pending staff refunded it; the gateway is returning the money\n * refunded the money is back; has a credit note\n * refund_failed the gateway could not return it; staff act from its dashboard\n */\nexport const ORDER_STATUS_VALUES = [\n 'created',\n 'paid',\n 'granted_free',\n 'expired',\n 'refund_pending',\n 'refunded',\n 'refund_failed',\n] as const;\nexport const orderStatusSchema = z.enum(ORDER_STATUS_VALUES);\nexport type OrderStatus = z.infer<typeof orderStatusSchema>;\n\n/**\n * `POST /billing/orders`. Billing details are required for anything paid (the\n * invoice needs a place of supply): the server refuses a paid order without\n * them (`billing.stateCode`, VALIDATION_ERROR). A free coupon issues no\n * invoice, so it needs none (0.12.0).\n */\nexport const createOrderBodySchema = z.object({\n item: purchaseItemSchema,\n couponCode: couponCodeSchema.optional(),\n billing: billingDetailsSchema.optional(),\n /**\n * Buy the plan as an AUTO-RENEWAL (0.31.0): consent, said explicitly on the\n * wire (the web's switch is on by default, the user's ruling; the request\n * still says it). Only for `item.kind: 'plan'`, without a coupon, while the\n * catalog's `autoRenewEnabled`: otherwise `AUTO_RENEW_NOT_OFFERED`. The\n * answer is then `status: 'subscription'`.\n */\n autoRenew: z.boolean().optional(),\n});\nexport type CreateOrderBody = z.infer<typeof createOrderBodySchema>;\n\n/**\n * Either done (a free coupon granted at once) or a checkout to open. The\n * checkout fields are Razorpay Checkout's own options; identity (name, email,\n * phone) is the server's, never typed by the caller.\n */\nexport const createOrderResponseSchema = z.discriminatedUnion('status', [\n z.object({ status: z.literal('granted'), orderId: objectIdSchema }),\n z.object({\n status: z.literal('checkout'),\n orderId: objectIdSchema,\n expiresAt: z.iso.datetime(),\n checkout: z.object({\n keyId: z.string().min(1),\n razorpayOrderId: z.string().min(1),\n amount: paiseSchema,\n currency: z.literal('INR'),\n /** The merchant name on the dialog. */\n name: z.string(),\n /** What is being bought, under the name. */\n description: z.string(),\n prefill: z.object({\n name: z.string(),\n email: z.string(),\n contact: z.string().optional(),\n }),\n }),\n }),\n /**\n * An auto-renewal to authorise at Checkout (0.31.0): Razorpay Checkout is\n * opened with `subscription_id`, never `order_id` or an amount. `orderId` is\n * the first charge's order when one is taken now (`terms.chargesNow`): poll\n * it as any order. With nothing taken now it is null: poll the\n * auto-renewal instead. Its handler's answer goes to\n * `POST /billing/auto-renewals/:autoRenewalId/confirm`.\n */\n z.object({\n status: z.literal('subscription'),\n autoRenewalId: objectIdSchema,\n orderId: objectIdSchema.nullable(),\n /** Authorise before this, or it lapses (`expired`). */\n expiresAt: z.iso.datetime(),\n terms: autoRenewTermsSchema,\n checkout: z.object({\n keyId: z.string().min(1),\n razorpaySubscriptionId: z.string().min(1),\n name: z.string(),\n description: z.string(),\n prefill: z.object({\n name: z.string(),\n email: z.string(),\n contact: z.string().optional(),\n }),\n }),\n }),\n]);\nexport type CreateOrderResponse = z.infer<typeof createOrderResponseSchema>;\n\nexport const orderParamsSchema = z.object({ orderId: objectIdSchema });\nexport type OrderParams = z.infer<typeof orderParamsSchema>;\n\n/** What Razorpay Checkout's `handler` hands back, as it names it. */\nexport const confirmOrderBodySchema = z.object({\n razorpayOrderId: z.string().min(1).max(RAZORPAY_ID_MAX),\n razorpayPaymentId: z.string().min(1).max(RAZORPAY_ID_MAX),\n razorpaySignature: z.string().min(1).max(RAZORPAY_SIGNATURE_MAX),\n});\nexport type ConfirmOrderBody = z.infer<typeof confirmOrderBodySchema>;\n\n// ─── Auto-renewals (0.31.0) ──────────────────────────────────────────────────\n\nexport const autoRenewalParamsSchema = z.object({ autoRenewalId: objectIdSchema });\nexport type AutoRenewalParams = z.infer<typeof autoRenewalParamsSchema>;\n\n/**\n * `POST /billing/auto-renewals`: turn auto-renew ON for the plan time already\n * held (Me > Plans, after turning it off, after an upgrade). Nothing is taken\n * now; the first charge is when the time it follows ends (`terms.chargesNow`\n * false):\n *\n * the tier's own time held it starts when that tier's time ends\n * Premium while only Business is held (a DOWNGRADE, \"switch to Premium at\n * renewal\") it starts when the Business time ends\n *\n * Refused (`AUTO_RENEW_NOT_OFFERED`) with no plan time held (buy the plan with\n * `autoRenew` instead), for Business while only Premium is held (that is an\n * upgrade), while another auto-renewal holds the slot (one whose stop is\n * already requested does not), or while auto-renew is off on this server.\n *\n * `billing`: the place of supply every renewal's invoice needs. Without it the\n * member's saved details are used; with neither, `VALIDATION_ERROR` on\n * `billing.stateCode`, as for an order.\n */\nexport const startAutoRenewalBodySchema = z.object({\n tier: planTierSchema,\n period: planPeriodSchema,\n billing: billingDetailsSchema.optional(),\n});\nexport type StartAutoRenewalBody = z.infer<typeof startAutoRenewalBodySchema>;\n\n/**\n * What Razorpay Checkout's `handler` hands back for a subscription, as it\n * names it. The server checks the signature over its OWN stored subscription\n * id, never the one sent here: HMAC_SHA256(razorpay_payment_id + \"|\" +\n * subscription_id, key secret).\n */\nexport const confirmAutoRenewalBodySchema = z.object({\n razorpaySubscriptionId: z.string().min(1).max(RAZORPAY_ID_MAX),\n razorpayPaymentId: z.string().min(1).max(RAZORPAY_ID_MAX),\n razorpaySignature: z.string().min(1).max(RAZORPAY_SIGNATURE_MAX),\n});\nexport type ConfirmAutoRenewalBody = z.infer<typeof confirmAutoRenewalBodySchema>;\n\n/** An auto-renewal as its member polls or changes it. */\nexport const autoRenewalStateSchema = z.object({\n autoRenewalId: objectIdSchema,\n status: autoRenewalStatusSchema,\n tier: planTierSchema,\n period: planPeriodSchema,\n /** The first charge's order, when one was taken at authorisation: poll it for the grant. */\n orderId: objectIdSchema.nullable(),\n nextChargeAt: z.iso.datetime().nullable(),\n cancelAtCycleEnd: z.boolean(),\n});\nexport type AutoRenewalState = z.infer<typeof autoRenewalStateSchema>;\n\n/**\n * `POST /billing/auto-renewals/:id/payment-method`: how the member updates the\n * method a failed charge used. A card mandate opens Checkout to change the\n * card (`subscription_card_change`); any other opens Razorpay's own page,\n * where a UPI or eMandate can move to a card only (Razorpay's rule).\n */\nexport const paymentMethodUpdateSchema = z.discriminatedUnion('kind', [\n z.object({\n kind: z.literal('checkout'),\n keyId: z.string().min(1),\n razorpaySubscriptionId: z.string().min(1),\n name: z.string(),\n prefill: z.object({\n name: z.string(),\n email: z.string(),\n contact: z.string().optional(),\n }),\n }),\n z.object({ kind: z.literal('link'), url: z.url() }),\n]);\nexport type PaymentMethodUpdate = z.infer<typeof paymentMethodUpdateSchema>;\n\n/**\n * Where an order came from (0.31.0). ⚠ Stored: append only.\n *\n * checkout the member bought it (or a free code granted it)\n * renewal an auto-renewal's charge\n */\nexport const ORDER_SOURCE_VALUES = ['checkout', 'renewal'] as const;\nexport const orderSourceSchema = z.enum(ORDER_SOURCE_VALUES);\nexport type OrderSource = z.infer<typeof orderSourceSchema>;\n\n/** An order as its buyer polls it. */\nexport const orderStateSchema = z.object({\n orderId: objectIdSchema,\n item: purchaseItemSchema,\n status: orderStatusSchema,\n /**\n * The money was taken but what it bought could not be applied (bought\n * twice in two tabs, the plan changed while paying): it is refunded in\n * full, by itself. The client says so instead of \"done\".\n */\n notApplied: z.boolean(),\n});\nexport type OrderState = z.infer<typeof orderStateSchema>;\n\n// ─── Payments, invoices, credit notes ────────────────────────────────────────\n\n/** A party on an invoice. The supplier always has a GSTIN on a real invoice; a buyer, only on B2B. */\nexport const invoicePartySchema = z.object({\n name: z.string(),\n address: z.string().nullable(),\n gstin: z.string().nullable(),\n stateCode: gstStateCodeSchema,\n stateName: z.string(),\n});\nexport type InvoiceParty = z.infer<typeof invoicePartySchema>;\n\n/** B2B with the buyer's GSTIN, B2C without (0.18.0: the values, for the backend's model). */\nexport const INVOICE_KIND_VALUES = ['b2b', 'b2c'] as const;\nexport const invoiceKindSchema = z.enum(INVOICE_KIND_VALUES);\nexport type InvoiceKind = z.infer<typeof invoiceKindSchema>;\n\n/** A tax invoice, frozen when the payment was captured. */\nexport const invoiceSchema = z.object({\n /** e.g. `FC/26-27/000123`: sequential within a financial year, at most `INVOICE_NUMBER_MAX`. */\n number: z.string().max(INVOICE_NUMBER_MAX),\n issuedAt: z.iso.datetime(),\n /**\n * Issued where the supplier's GSTIN is not configured (dev, Razorpay test\n * mode): marked \"TEST: not a tax invoice\". Never true in production.\n */\n test: z.boolean(),\n supplier: invoicePartySchema,\n buyer: invoicePartySchema,\n kind: invoiceKindSchema,\n /** The service's accounting code (SAC). */\n sac: z.string(),\n description: z.string(),\n tax: taxSplitSchema,\n /** Always false: these services are never under reverse charge. */\n reverseCharge: z.literal(false),\n razorpayPaymentId: z.string(),\n});\nexport type Invoice = z.infer<typeof invoiceSchema>;\n\n/** A refund's credit note, against its invoice. */\nexport const creditNoteSchema = z.object({\n /** e.g. `FCCN/26-27/00012`: the invoice series + `CN`, sequential within a financial year. */\n number: z.string().max(INVOICE_NUMBER_MAX),\n issuedAt: z.iso.datetime(),\n invoiceNumber: z.string().max(INVOICE_NUMBER_MAX),\n tax: taxSplitSchema,\n});\nexport type CreditNote = z.infer<typeof creditNoteSchema>;\n\n/** One purchase in a member's history. Only settled orders are listed, never an abandoned checkout. */\nexport const paymentSummarySchema = z.object({\n id: objectIdSchema,\n item: purchaseItemSchema,\n title: z.string(),\n total: paiseSchema,\n status: orderStatusSchema,\n /** When it was captured, or granted for a free coupon. */\n paidAt: z.iso.datetime(),\n invoiceNumber: z.string().nullable(),\n /** Until when a refund may be asked for; null once refunded or for a free coupon. */\n refundableUntil: z.iso.datetime().nullable(),\n /** A purchase or an auto-renewal's charge (0.31.0): the history says \"Renewal\". */\n source: orderSourceSchema.default('checkout'),\n /** How it was paid (0.31.0); null for a free coupon and for payments from before 0.31.0. */\n method: paymentMethodSnapshotSchema.nullable().default(null),\n});\nexport type PaymentSummary = z.infer<typeof paymentSummarySchema>;\n\nexport const paymentPageSchema = paginatedSchema(paymentSummarySchema);\nexport type PaymentPage = z.infer<typeof paymentPageSchema>;\n\nexport const paymentDetailSchema = paymentSummarySchema.extend({\n listPrice: paiseSchema,\n discount: paiseSchema,\n coupon: appliedCouponSchema.nullable(),\n invoice: invoiceSchema.nullable(),\n creditNote: creditNoteSchema.nullable(),\n refundedAt: z.iso.datetime().nullable(),\n});\nexport type PaymentDetail = z.infer<typeof paymentDetailSchema>;\n\n// ─── Staff: payments and refunds ─────────────────────────────────────────────\n\n/** Who paid, as they are now, so staff can find them. Email only for a role that may read it. */\nexport const payerSchema = personSchema.extend({\n email: z.string().nullable(),\n});\nexport type Payer = z.infer<typeof payerSchema>;\n\nexport const staffPaymentsQuerySchema = paginationQuerySchema.extend({\n status: orderStatusSchema.optional(),\n memberId: objectIdSchema.optional(),\n /** Only the ones a person must act on (`needsAction` below). */\n needsAction: z.preprocess(emptyStringToUndefined, z.stringbool().default(false)),\n});\nexport type StaffPaymentsQuery = z.infer<typeof staffPaymentsQuerySchema>;\nexport type StaffPaymentsQueryInput = z.input<typeof staffPaymentsQuerySchema>;\n\nexport const staffPaymentSummarySchema = paymentSummarySchema.extend({\n payer: payerSchema,\n /**\n * A person must act (0.12.0): taken but not applied and not yet refunded\n * (the automatic refund did not go through), a refund that failed at the\n * gateway, or an open chargeback.\n */\n needsAction: z.boolean(),\n});\nexport type StaffPaymentSummary = z.infer<typeof staffPaymentSummarySchema>;\nexport const staffPaymentPageSchema = paginatedSchema(staffPaymentSummarySchema);\nexport type StaffPaymentPage = z.infer<typeof staffPaymentPageSchema>;\n\nexport const staffPaymentDetailSchema = paymentDetailSchema.extend({\n payer: payerSchema,\n razorpay: z.object({\n orderId: z.string().nullable(),\n paymentId: z.string().nullable(),\n refundId: z.string().nullable(),\n /** The auto-renewal's subscription, for a renewal charge (0.31.0). */\n subscriptionId: z.string().nullable().default(null),\n }),\n /** Why staff refunded it, on record. */\n refundReason: z.string().nullable(),\n /**\n * The money was taken but what it bought could not be applied when it was\n * captured (they were a member already, the Premium time to upgrade had\n * run out, past the 3-year cap): refund it. Null when it applied. One of\n * `GRANT_FAILURE_VALUES` (0.18.0; a plain string before).\n */\n grantFailed: grantFailureSchema.nullable(),\n /** A chargeback was opened on it (cleared when it is won or closed). */\n disputedAt: z.iso.datetime().nullable(),\n /**\n * What refunds made outside Founder Circle (the Razorpay dashboard) have\n * already given back of this payment. A Refund here gives back the rest:\n * `total` less this. 0 when there were none.\n */\n refundedOutside: paiseSchema,\n /**\n * Payments captured on this order other than the one that settled it (a\n * late authorisation, a second Checkout attempt): each is refunded by\n * itself; `refunded: false` means that refund has not gone through yet and\n * the payment needs a person.\n */\n strayPayments: z.array(\n z.object({\n paymentId: z.string(),\n amount: paiseSchema,\n refunded: z.boolean(),\n at: z.iso.datetime(),\n }),\n ),\n /**\n * When the payer asked for a refund (0.13.0): their first \"Payments and\n * refunds\" ticket opened inside the refund window. An ask in time keeps the\n * payment refundable after the window ends. Null when they did not ask in\n * time, or it is not a paid payment.\n */\n refundAskedAt: z.iso.datetime().nullable(),\n viewer: z.object({\n /**\n * Paid, within the window (or asked for within it), not their own, and\n * the asker may refund.\n */\n canRefund: z.boolean(),\n }),\n});\nexport type StaffPaymentDetail = z.infer<typeof staffPaymentDetailSchema>;\n\nconst reasonSchema = z.string().trim().min(BILLING_REASON_MIN).max(BILLING_REASON_MAX);\n\n/** `POST /staff/payments/:orderId/refund`. The reason is on the audit record. */\nexport const refundPaymentBodySchema = z.object({ reason: reasonSchema });\nexport type RefundPaymentBody = z.infer<typeof refundPaymentBodySchema>;\n\n/**\n * `PUT /members/:memberId/membership`: grant (a partner, a press account) or\n * revoke (a fake or duplicate account holding a founding place). A paid one\n * is never revoked: refund its payment.\n */\nexport const setMembershipBodySchema = z.object({\n granted: z.boolean(),\n reason: reasonSchema,\n});\nexport type SetMembershipBody = z.infer<typeof setMembershipBodySchema>;\n\n// ─── Staff: coupons ──────────────────────────────────────────────────────────\n\n/** What a coupon is good for. A percent coupon names what it applies to. */\nexport const COUPON_TARGET_VALUES = ['membership', 'premium', 'business'] as const;\nexport const couponTargetSchema = z.enum(COUPON_TARGET_VALUES);\nexport type CouponTarget = z.infer<typeof couponTargetSchema>;\n\n/**\n * ⚠ Stored: append only.\n *\n * free_membership the membership at Rs 0; `founding` numbers its holders\n * (\"Founding member #N\"). ⚠ A NEW founding coupon is refused\n * (0.14.0, COUPON_FOUNDING_RETIRED): founding places come\n * from the launch waitlist alone. The field stays, because\n * stored coupons carry it.\n * percent_off a share off the listed price of what it applies to\n */\nexport const COUPON_KIND_VALUES = ['free_membership', 'percent_off'] as const;\nexport type CouponKind = (typeof COUPON_KIND_VALUES)[number];\n\nexport const couponBenefitSchema = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('free_membership'), founding: z.boolean() }),\n z.object({\n kind: z.literal('percent_off'),\n percent: z.number().int().min(COUPON_PERCENT_MIN).max(COUPON_PERCENT_MAX),\n appliesTo: z\n .array(couponTargetSchema)\n .min(1)\n .max(COUPON_TARGET_VALUES.length)\n .refine(eachOnce, {\n error: VALIDATION_MESSAGE.couponTargetsDuplicate,\n }),\n }),\n]);\nexport type CouponBenefit = z.infer<typeof couponBenefitSchema>;\n\nexport const couponSchema = z.object({\n id: objectIdSchema,\n code: z.string(),\n label: z.string(),\n benefit: couponBenefitSchema,\n /** Redemptions allowed in all; null is no cap. */\n max: z.number().int().positive().nullable(),\n /** Redemptions in force (a revoked founding place frees one). */\n used: z.number().int().nonnegative(),\n active: z.boolean(),\n validFrom: z.iso.datetime().nullable(),\n validUntil: z.iso.datetime().nullable(),\n createdAt: z.iso.datetime(),\n});\nexport type Coupon = z.infer<typeof couponSchema>;\n\n/** Never paged: coupons are few. Newest first. */\nexport const couponListSchema = z.object({ items: z.array(couponSchema) });\nexport type CouponList = z.infer<typeof couponListSchema>;\n\nexport const couponParamsSchema = z.object({ couponId: objectIdSchema });\nexport type CouponParams = z.infer<typeof couponParamsSchema>;\n\nconst windowValid = (body: { validFrom?: string | null; validUntil?: string | null }) =>\n !body.validFrom || !body.validUntil || Date.parse(body.validFrom) < Date.parse(body.validUntil);\n\nexport const createCouponBodySchema = z\n .object({\n code: couponCodeSchema,\n label: z.string().trim().min(COUPON_LABEL_MIN).max(COUPON_LABEL_MAX),\n benefit: couponBenefitSchema,\n max: z.number().int().positive().max(COUPON_USES_MAX).nullable(),\n validFrom: z.iso.datetime().nullable().optional(),\n validUntil: z.iso.datetime().nullable().optional(),\n })\n .refine(windowValid, { path: ['validUntil'], error: VALIDATION_MESSAGE.couponWindowInvalid });\nexport type CreateCouponBody = z.infer<typeof createCouponBodySchema>;\n\n/**\n * What may change on a live coupon. The code and the benefit never change: a\n * redemption is a record of what a code gave when it was used.\n */\nexport const updateCouponBodySchema = z\n .object({\n label: z.string().trim().min(COUPON_LABEL_MIN).max(COUPON_LABEL_MAX).optional(),\n active: z.boolean().optional(),\n max: z.number().int().positive().max(COUPON_USES_MAX).nullable().optional(),\n validFrom: z.iso.datetime().nullable().optional(),\n validUntil: z.iso.datetime().nullable().optional(),\n })\n .refine(windowValid, { path: ['validUntil'], error: VALIDATION_MESSAGE.couponWindowInvalid });\nexport type UpdateCouponBody = z.infer<typeof updateCouponBodySchema>;\n"]}
@@ -124,6 +124,11 @@ export declare const GST_STATES: readonly [{
124
124
  readonly name: "Ladakh";
125
125
  }];
126
126
  export type GstStateCode = (typeof GST_STATES)[number]['code'];
127
+ /**
128
+ * The GST code of a state by its NAME (the one the state picker writes,
129
+ * `findIndiaState`), or null: a foreign or misspelt one has none.
130
+ */
131
+ export declare function gstStateCodeOf(name: string | null | undefined): GstStateCode | null;
127
132
  export declare const GST_STATE_CODE_VALUES: [GstStateCode, ...GstStateCode[]];
128
133
  export declare const gstStateCodeSchema: z.ZodEnum<{
129
134
  "01": "01";
@@ -1 +1 @@
1
- {"version":3,"file":"gst.d.ts","sourceRoot":"","sources":["../../../src/domains/billing/gst.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB;;;;;GAKG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;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M,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/D;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,GAAG,IAAI,CAEnF;AAED,eAAO,MAAM,qBAAqB,EAAoC,CACpE,YAAY,EACZ,GAAG,YAAY,EAAE,CAClB,CAAC;AACF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgC,CAAC;AAEhE,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAEvD;AAED,wDAAwD;AACxD,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAKnC;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAUzD;AAED,yDAAyD;AACzD,eAAO,MAAM,WAAW,wDAKiD,CAAC;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkB7B,CAAC;AACL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -55,6 +55,13 @@ export const GST_STATES = [
55
55
  { code: '37', name: 'Andhra Pradesh' },
56
56
  { code: '38', name: 'Ladakh' },
57
57
  ];
58
+ /**
59
+ * The GST code of a state by its NAME (the one the state picker writes,
60
+ * `findIndiaState`), or null: a foreign or misspelt one has none.
61
+ */
62
+ export function gstStateCodeOf(name) {
63
+ return GST_STATES.find((s) => s.name === name)?.code ?? null;
64
+ }
58
65
  export const GST_STATE_CODE_VALUES = GST_STATES.map((s) => s.code);
59
66
  export const gstStateCodeSchema = z.enum(GST_STATE_CODE_VALUES);
60
67
  /** The state's name for its code, as an invoice prints it. */
@@ -1 +1 @@
1
- {"version":3,"file":"gst.js","sourceRoot":"","sources":["../../../src/domains/billing/gst.ts"],"names":[],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AAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;IAC7D,IAAI,EAAE,CAAC,WAAW,CAAC;IACnB,KAAK,EAAE,kBAAkB,CAAC,wBAAwB;CACnD,CAAC;KACD,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE;IAC3D,IAAI,EAAE,CAAC,SAAS,CAAC;IACjB,KAAK,EAAE,kBAAkB,CAAC,wBAAwB;CACnD,CAAC,CAAC","sourcesContent":["/**\n * founder-schema: GST, the states and the GSTIN (0.12.0)\n *\n * Its own module so both the billing contract and a member's membership\n * (the billing details they last used, to prefill a checkout) can use it\n * without importing each other.\n *\n * @module founder-schema/domains/billing/gst\n */\n\nimport { z } from 'zod';\nimport {\n BILLING_ADDRESS_MAX,\n BILLING_ADDRESS_MIN,\n BILLING_NAME_MAX,\n BILLING_NAME_MIN,\n GSTIN_LENGTH,\n} from '../../core/limits.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\n\n// ─── GST: states and the GSTIN ───────────────────────────────────────────────\n\n/**\n * India's states and union territories by their GST state code, the first\n * two digits of every GSTIN registered there. The current codes only: 25\n * (Daman and Diu) merged into 26 in 2020, and 28 (undivided Andhra Pradesh)\n * gave way to 37.\n */\nexport const GST_STATES = [\n { code: '01', name: 'Jammu and Kashmir' },\n { code: '02', name: 'Himachal Pradesh' },\n { code: '03', name: 'Punjab' },\n { code: '04', name: 'Chandigarh' },\n { code: '05', name: 'Uttarakhand' },\n { code: '06', name: 'Haryana' },\n { code: '07', name: 'Delhi' },\n { code: '08', name: 'Rajasthan' },\n { code: '09', name: 'Uttar Pradesh' },\n { code: '10', name: 'Bihar' },\n { code: '11', name: 'Sikkim' },\n { code: '12', name: 'Arunachal Pradesh' },\n { code: '13', name: 'Nagaland' },\n { code: '14', name: 'Manipur' },\n { code: '15', name: 'Mizoram' },\n { code: '16', name: 'Tripura' },\n { code: '17', name: 'Meghalaya' },\n { code: '18', name: 'Assam' },\n { code: '19', name: 'West Bengal' },\n { code: '20', name: 'Jharkhand' },\n { code: '21', name: 'Odisha' },\n { code: '22', name: 'Chhattisgarh' },\n { code: '23', name: 'Madhya Pradesh' },\n { code: '24', name: 'Gujarat' },\n { code: '26', name: 'Dadra and Nagar Haveli and Daman and Diu' },\n { code: '27', name: 'Maharashtra' },\n { code: '29', name: 'Karnataka' },\n { code: '30', name: 'Goa' },\n { code: '31', name: 'Lakshadweep' },\n { code: '32', name: 'Kerala' },\n { code: '33', name: 'Tamil Nadu' },\n { code: '34', name: 'Puducherry' },\n { code: '35', name: 'Andaman and Nicobar Islands' },\n { code: '36', name: 'Telangana' },\n { code: '37', name: 'Andhra Pradesh' },\n { code: '38', name: 'Ladakh' },\n] as const;\nexport type GstStateCode = (typeof GST_STATES)[number]['code'];\nexport const GST_STATE_CODE_VALUES = GST_STATES.map((s) => s.code) as [\n GstStateCode,\n ...GstStateCode[],\n];\nexport const gstStateCodeSchema = z.enum(GST_STATE_CODE_VALUES);\n\n/** The state's name for its code, as an invoice prints it. */\nexport function gstStateName(code: GstStateCode): string {\n return GST_STATES.find((s) => s.code === code)?.name ?? code;\n}\n\n/** GST is 18% on these services, inside every price. */\nexport const GST_RATE_PERCENT = 18;\n\nconst GSTIN_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nconst GSTIN_PATTERN = /^\\d{2}[A-Z]{5}\\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/;\n\n/**\n * Whether a GSTIN's 15th character is the check character of the first 14\n * (the GSTN's base-36 Luhn variant). Catches a mistyped digit, which the\n * pattern alone does not: a B2B invoice with a wrong GSTIN costs the buyer\n * their input credit.\n */\nexport function gstinChecksumValid(gstin: string): boolean {\n if (!GSTIN_PATTERN.test(gstin)) return false;\n let sum = 0;\n for (let i = 0; i < 14; i++) {\n const value = GSTIN_CHARS.indexOf(gstin.charAt(i));\n const product = value * (i % 2 === 0 ? 1 : 2);\n sum += Math.floor(product / 36) + (product % 36);\n }\n const check = (36 - (sum % 36)) % 36;\n return gstin.charAt(14) === GSTIN_CHARS.charAt(check);\n}\n\n/** A GSTIN, upper-cased, pattern AND check character. */\nexport const gstinSchema = z\n .string()\n .trim()\n .max(GSTIN_LENGTH, VALIDATION_MESSAGE.gstinInvalid)\n .transform((v) => v.toUpperCase())\n .refine(gstinChecksumValid, { error: VALIDATION_MESSAGE.gstinInvalid });\n\n/**\n * Who is buying, for the invoice. The state is the place of supply and\n * decides the tax. With a GSTIN (a business claiming input credit) the\n * invoice is B2B: it must carry the buyer's legal name and address, and the\n * state is the GSTIN's own.\n */\nexport const billingDetailsSchema = z\n .object({\n stateCode: gstStateCodeSchema,\n gstin: gstinSchema.optional(),\n legalName: z.string().trim().min(BILLING_NAME_MIN).max(BILLING_NAME_MAX).optional(),\n address: z.string().trim().min(BILLING_ADDRESS_MIN).max(BILLING_ADDRESS_MAX).optional(),\n })\n .refine((body) => !body.gstin || body.gstin.slice(0, 2) === body.stateCode, {\n path: ['stateCode'],\n error: VALIDATION_MESSAGE.gstinStateMismatch,\n })\n .refine((body) => !body.gstin || body.legalName !== undefined, {\n path: ['legalName'],\n error: VALIDATION_MESSAGE.gstinNeedsNameAndAddress,\n })\n .refine((body) => !body.gstin || body.address !== undefined, {\n path: ['address'],\n error: VALIDATION_MESSAGE.gstinNeedsNameAndAddress,\n });\nexport type BillingDetails = z.infer<typeof billingDetailsSchema>;\n"]}
1
+ {"version":3,"file":"gst.js","sourceRoot":"","sources":["../../../src/domains/billing/gst.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EA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AC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;IAC7D,IAAI,EAAE,CAAC,WAAW,CAAC;IACnB,KAAK,EAAE,kBAAkB,CAAC,wBAAwB;CACnD,CAAC;KACD,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE;IAC3D,IAAI,EAAE,CAAC,SAAS,CAAC;IACjB,KAAK,EAAE,kBAAkB,CAAC,wBAAwB;CACnD,CAAC,CAAC","sourcesContent":["/**\n * founder-schema: GST, the states and the GSTIN (0.12.0)\n *\n * Its own module so both the billing contract and a member's membership\n * (the billing details they last used, to prefill a checkout) can use it\n * without importing each other.\n *\n * @module founder-schema/domains/billing/gst\n */\n\nimport { z } from 'zod';\nimport {\n BILLING_ADDRESS_MAX,\n BILLING_ADDRESS_MIN,\n BILLING_NAME_MAX,\n BILLING_NAME_MIN,\n GSTIN_LENGTH,\n} from '../../core/limits.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\n\n// ─── GST: states and the GSTIN ───────────────────────────────────────────────\n\n/**\n * India's states and union territories by their GST state code, the first\n * two digits of every GSTIN registered there. The current codes only: 25\n * (Daman and Diu) merged into 26 in 2020, and 28 (undivided Andhra Pradesh)\n * gave way to 37.\n */\nexport const GST_STATES = [\n { code: '01', name: 'Jammu and Kashmir' },\n { code: '02', name: 'Himachal Pradesh' },\n { code: '03', name: 'Punjab' },\n { code: '04', name: 'Chandigarh' },\n { code: '05', name: 'Uttarakhand' },\n { code: '06', name: 'Haryana' },\n { code: '07', name: 'Delhi' },\n { code: '08', name: 'Rajasthan' },\n { code: '09', name: 'Uttar Pradesh' },\n { code: '10', name: 'Bihar' },\n { code: '11', name: 'Sikkim' },\n { code: '12', name: 'Arunachal Pradesh' },\n { code: '13', name: 'Nagaland' },\n { code: '14', name: 'Manipur' },\n { code: '15', name: 'Mizoram' },\n { code: '16', name: 'Tripura' },\n { code: '17', name: 'Meghalaya' },\n { code: '18', name: 'Assam' },\n { code: '19', name: 'West Bengal' },\n { code: '20', name: 'Jharkhand' },\n { code: '21', name: 'Odisha' },\n { code: '22', name: 'Chhattisgarh' },\n { code: '23', name: 'Madhya Pradesh' },\n { code: '24', name: 'Gujarat' },\n { code: '26', name: 'Dadra and Nagar Haveli and Daman and Diu' },\n { code: '27', name: 'Maharashtra' },\n { code: '29', name: 'Karnataka' },\n { code: '30', name: 'Goa' },\n { code: '31', name: 'Lakshadweep' },\n { code: '32', name: 'Kerala' },\n { code: '33', name: 'Tamil Nadu' },\n { code: '34', name: 'Puducherry' },\n { code: '35', name: 'Andaman and Nicobar Islands' },\n { code: '36', name: 'Telangana' },\n { code: '37', name: 'Andhra Pradesh' },\n { code: '38', name: 'Ladakh' },\n] as const;\nexport type GstStateCode = (typeof GST_STATES)[number]['code'];\n/**\n * The GST code of a state by its NAME (the one the state picker writes,\n * `findIndiaState`), or null: a foreign or misspelt one has none.\n */\nexport function gstStateCodeOf(name: string | null | undefined): GstStateCode | null {\n return GST_STATES.find((s) => s.name === name)?.code ?? null;\n}\n\nexport const GST_STATE_CODE_VALUES = GST_STATES.map((s) => s.code) as [\n GstStateCode,\n ...GstStateCode[],\n];\nexport const gstStateCodeSchema = z.enum(GST_STATE_CODE_VALUES);\n\n/** The state's name for its code, as an invoice prints it. */\nexport function gstStateName(code: GstStateCode): string {\n return GST_STATES.find((s) => s.code === code)?.name ?? code;\n}\n\n/** GST is 18% on these services, inside every price. */\nexport const GST_RATE_PERCENT = 18;\n\nconst GSTIN_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nconst GSTIN_PATTERN = /^\\d{2}[A-Z]{5}\\d{4}[A-Z][1-9A-Z]Z[0-9A-Z]$/;\n\n/**\n * Whether a GSTIN's 15th character is the check character of the first 14\n * (the GSTN's base-36 Luhn variant). Catches a mistyped digit, which the\n * pattern alone does not: a B2B invoice with a wrong GSTIN costs the buyer\n * their input credit.\n */\nexport function gstinChecksumValid(gstin: string): boolean {\n if (!GSTIN_PATTERN.test(gstin)) return false;\n let sum = 0;\n for (let i = 0; i < 14; i++) {\n const value = GSTIN_CHARS.indexOf(gstin.charAt(i));\n const product = value * (i % 2 === 0 ? 1 : 2);\n sum += Math.floor(product / 36) + (product % 36);\n }\n const check = (36 - (sum % 36)) % 36;\n return gstin.charAt(14) === GSTIN_CHARS.charAt(check);\n}\n\n/** A GSTIN, upper-cased, pattern AND check character. */\nexport const gstinSchema = z\n .string()\n .trim()\n .max(GSTIN_LENGTH, VALIDATION_MESSAGE.gstinInvalid)\n .transform((v) => v.toUpperCase())\n .refine(gstinChecksumValid, { error: VALIDATION_MESSAGE.gstinInvalid });\n\n/**\n * Who is buying, for the invoice. The state is the place of supply and\n * decides the tax. With a GSTIN (a business claiming input credit) the\n * invoice is B2B: it must carry the buyer's legal name and address, and the\n * state is the GSTIN's own.\n */\nexport const billingDetailsSchema = z\n .object({\n stateCode: gstStateCodeSchema,\n gstin: gstinSchema.optional(),\n legalName: z.string().trim().min(BILLING_NAME_MIN).max(BILLING_NAME_MAX).optional(),\n address: z.string().trim().min(BILLING_ADDRESS_MIN).max(BILLING_ADDRESS_MAX).optional(),\n })\n .refine((body) => !body.gstin || body.gstin.slice(0, 2) === body.stateCode, {\n path: ['stateCode'],\n error: VALIDATION_MESSAGE.gstinStateMismatch,\n })\n .refine((body) => !body.gstin || body.legalName !== undefined, {\n path: ['legalName'],\n error: VALIDATION_MESSAGE.gstinNeedsNameAndAddress,\n })\n .refine((body) => !body.gstin || body.address !== undefined, {\n path: ['address'],\n error: VALIDATION_MESSAGE.gstinNeedsNameAndAddress,\n });\nexport type BillingDetails = z.infer<typeof billingDetailsSchema>;\n"]}
@@ -503,6 +503,44 @@ export declare const meMembershipSchema: z.ZodObject<{
503
503
  legalName: z.ZodOptional<z.ZodString>;
504
504
  address: z.ZodOptional<z.ZodString>;
505
505
  }, z.core.$strip>>;
506
+ billingStateHint: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
507
+ "01": "01";
508
+ "02": "02";
509
+ "03": "03";
510
+ "04": "04";
511
+ "05": "05";
512
+ "06": "06";
513
+ "07": "07";
514
+ "08": "08";
515
+ "09": "09";
516
+ 10: "10";
517
+ 11: "11";
518
+ 12: "12";
519
+ 13: "13";
520
+ 14: "14";
521
+ 15: "15";
522
+ 16: "16";
523
+ 17: "17";
524
+ 18: "18";
525
+ 19: "19";
526
+ 20: "20";
527
+ 21: "21";
528
+ 22: "22";
529
+ 23: "23";
530
+ 24: "24";
531
+ 26: "26";
532
+ 27: "27";
533
+ 29: "29";
534
+ 30: "30";
535
+ 31: "31";
536
+ 32: "32";
537
+ 33: "33";
538
+ 34: "34";
539
+ 35: "35";
540
+ 36: "36";
541
+ 37: "37";
542
+ 38: "38";
543
+ }>>>;
506
544
  autoRenewal: z.ZodDefault<z.ZodNullable<z.ZodObject<{
507
545
  id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
508
546
  status: z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"membership.d.ts","sourceRoot":"","sources":["../../../src/domains/membership/membership.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,kEAMzB,CAAC;AACX,eAAO,MAAM,oBAAoB;;;;;;EAAiC,CAAC;AACnE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,8BAA+B,CAAC;AACrE,eAAO,MAAM,sBAAsB;;;EAAmC,CAAC;AACvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE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chema } from '../../access/standing.js';
25
25
  import { objectIdSchema } from '../../core/common.js';
26
26
  import { DAY_MS, INDIA_UTC_OFFSET_MS } from '../../core/limits.js';
27
- import { billingDetailsSchema } from '../billing/gst.js';
27
+ import { billingDetailsSchema, gstStateCodeSchema } from '../billing/gst.js';
28
28
  import { paymentMethodSnapshotSchema } from '../billing/payment-method.js';
29
29
  /**
30
30
  * How someone came to hold a membership. ⚠ Stored: append only.
@@ -422,6 +422,14 @@ export const meMembershipSchema = z.object({
422
422
  }),
423
423
  /** The billing details they last used, to prefill the next checkout; null before the first. */
424
424
  billing: billingDetailsSchema.nullable(),
425
+ /**
426
+ * A first checkout's state, SUGGESTED (2026-11-30): the state of the member's own
427
+ * profile location, only while they have no `billing` to prefill from. The
428
+ * invoice of every online sale names the buyer's state (GST), so it is asked
429
+ * once; this fills it in, and the member can change it before they pay. Never
430
+ * stored by being suggested. Null when there is none; absent from an older server.
431
+ */
432
+ billingStateHint: gstStateCodeSchema.nullable().optional(),
425
433
  /**
426
434
  * The auto-renewal that runs (0.31.0): authorised, charging, or retrying a
427
435
  * failed charge. Null when none does. Defaults to null when an older server
@@ -1 +1 @@
1
- {"version":3,"file":"membership.js","sourceRoot":"","sources":["../../../src/domains/membership/membership.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,UAAU;IAC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ans planCatalogSchema (anyone: prices and what each includes)\n * GET /api/v1/me/membership meMembershipSchema (signed in: what I hold, what I have used)\n *\n * THE USER'S RULING (2026-10-11): looking is free; taking part needs a\n * MEMBERSHIP, Rs 99 once, for life (the first 100 free with a coupon). On top,\n * two PLANS: Premium (5 live products, 15 new people a month to message) and\n * Business (unlimited products, 50 new people). Prices and plan contents come\n * from the server, so a change needs no client release.\n *\n * A PLAN IS TIME, PREPAID, IN TWO BLOCKS: Business time first, then Premium\n * time. Buying more APPENDS; buying Premium while on Business waits its turn;\n * buying Business while on Premium is an upgrade that turns the Premium time\n * left into Business for the difference (`domains/billing`). `blocks` says it\n * as it stands, from now on.\n *\n * Money is integer PAISE everywhere in this package: never a float of rupees.\n *\n * @module founder-schema/domains/membership\n */\n\nimport { z } from 'zod';\nimport { standingSchema } from '../../access/standing.js';\nimport { objectIdSchema } from '../../core/common.js';\nimport { DAY_MS, INDIA_UTC_OFFSET_MS } from '../../core/limits.js';\nimport { billingDetailsSchema } from '../billing/gst.js';\nimport { paymentMethodSnapshotSchema } from '../billing/payment-method.js';\n\n/**\n * How someone came to hold a membership. ⚠ Stored: append only.\n *\n * founding free for life, numbered \"Founding member #N\": one of the first\n * `FOUNDING_PLACES` people to join the launch WAITLIST (0.14.0,\n * the user's rule of 2026-10-16). Before that, the founding\n * coupon (`FIRST100`), which no longer exists on main.\n * coupon another free-membership coupon\n * paid Rs 99, captured\n * granted staff gave it (a partner, a press account), with a reason on record\n * early_bird free for life, because the account was created before\n * `EARLY_BIRD_UNTIL` (0.21.0, the user's launch offer of 2026-11-14:\n * everyone who joins before Tue 17 Nov 2026, 12:00 IST), or while\n * payments were not live yet: before the catalog's `paymentsLiveAt`,\n * or with none set (the user, 2026-11-19: whoever joins while\n * payments are \"coming soon\" keeps the membership free for life)\n */\nexport const MEMBERSHIP_KIND_VALUES = [\n 'founding',\n 'coupon',\n 'paid',\n 'granted',\n 'early_bird',\n] as const;\nexport const membershipKindSchema = z.enum(MEMBERSHIP_KIND_VALUES);\nexport type MembershipKind = z.infer<typeof membershipKindSchema>;\n\n/**\n * A stored membership's state (0.20.0: memberships are their own rows, so\n * none is ever erased). `active` is held now, at most one per member; `ended`\n * is history: a refunded payment, a staff revoke, or the account's deletion,\n * said by `MEMBERSHIP_END_REASON_VALUES`.\n */\nexport const MEMBERSHIP_STATUS_VALUES = ['active', 'ended'] as const;\nexport const membershipStatusSchema = z.enum(MEMBERSHIP_STATUS_VALUES);\nexport type MembershipStatus = z.infer<typeof membershipStatusSchema>;\n\nexport const MEMBERSHIP_END_REASON_VALUES = ['refunded', 'revoked', 'account_deleted'] as const;\nexport const membershipEndReasonSchema = z.enum(MEMBERSHIP_END_REASON_VALUES);\nexport type MembershipEndReason = z.infer<typeof membershipEndReasonSchema>;\n\n/** ⚠ Stored: append only. Highest last is NOT implied: compare with `PLAN_TIER_RANK`. */\nexport const PLAN_TIER_VALUES = ['premium', 'business'] as const;\nexport const planTierSchema = z.enum(PLAN_TIER_VALUES);\nexport type PlanTier = z.infer<typeof planTierSchema>;\n\n/** Which tier outranks which: Business above Premium. */\nexport const PLAN_TIER_RANK: Readonly<Record<PlanTier, number>> = { premium: 1, business: 2 };\n\n/** One payment buys a calendar month or a calendar year. ⚠ Stored: append only. */\nexport const PLAN_PERIOD_VALUES = ['month', 'year'] as const;\nexport const planPeriodSchema = z.enum(PLAN_PERIOD_VALUES);\nexport type PlanPeriod = z.infer<typeof planPeriodSchema>;\n\n/** Integer paise, never negative. Rs 399 is 39900. */\nexport const paiseSchema = z.number().int().nonnegative();\nexport type Paise = z.infer<typeof paiseSchema>;\n\n/**\n * What a standing or a plan allows that is COUNTED (the ability says whether;\n * these say how many).\n *\n * productsLive products live at once; null is unlimited (the server\n * still holds a safety ceiling, `PRODUCTS_LIVE_SAFETY_MAX`)\n * newPeoplePerMonth conversations a month with people you do not know\n */\nexport const planLimitsSchema = z.object({\n productsLive: z.number().int().nonnegative().nullable(),\n newPeoplePerMonth: z.number().int().nonnegative(),\n});\nexport type PlanLimits = z.infer<typeof planLimitsSchema>;\n\n/**\n * What a standing or a plan UNLOCKS beyond the counted limits (0.32.0, plans v1;\n * founder-circle-backend docs/plans-v1-features.md, the user 2026-11-28).\n *\n * badge a \"Premium\" / \"Business\" badge on the member's person\n * insightsDays how far back a product's insights go: 0 = the totals only\n * (what a card already shows), else that many days of series\n * insightsSources where a product's visitors came from (Discover, feed...)\n * profileViewersDays who viewed your profile: 0 = the count only, else the\n * names for that many days\n * featured Discover's \"Featured\" row:\n * none not offered\n * monthly_run one run of `runDays` days a calendar\n * month (India time), one product\n * always one product at a time, with no end of its own\n */\nexport const FEATURED_KIND_VALUES = ['none', 'monthly_run', 'always'] as const;\nexport const featuredKindSchema = z.enum(FEATURED_KIND_VALUES);\nexport type FeaturedKind = z.infer<typeof featuredKindSchema>;\n\nexport const planFeaturesSchema = z.object({\n badge: z.boolean(),\n insightsDays: z.number().int().nonnegative(),\n insightsSources: z.boolean(),\n profileViewersDays: z.number().int().nonnegative(),\n featured: z.object({\n kind: featuredKindSchema,\n /** For `monthly_run`: the run's length in days; 0 otherwise. */\n runDays: z.number().int().nonnegative(),\n }),\n});\nexport type PlanFeatures = z.infer<typeof planFeaturesSchema>;\n\n// ─── The price list ──────────────────────────────────────────────────────────\n//\n// THE ONE PLACE a price or a plan's limit is written (0.12.0). The backend\n// prices and counts from these (`modules/plans/catalog.ts`), `GET /plans`\n// serves them, and the web's Terms of Service are written FROM them, so the\n// Terms can never state a price the server does not charge. A change here is\n// a schema release, then the backend, then the web. Integer PAISE, GST\n// included. hary's India-first prices (the user: \"you decide, India first\").\n\n/** The membership: once, for life. */\nexport const MEMBERSHIP_PRICE_PAISE = 9_900;\n\n/** What a member with no plan may: 1 live product, no conversations with people they do not know. */\nexport const MEMBER_LIMIT_VALUES: PlanLimits = { productsLive: 1, newPeoplePerMonth: 0 };\n\n/**\n * What a member with no plan has unlocked (0.32.0): no badge, a product's totals\n * only, the COUNT of who viewed them (last 30 days), nothing featured.\n */\nexport const MEMBER_FEATURE_VALUES: PlanFeatures = {\n badge: false,\n insightsDays: 0,\n insightsSources: false,\n profileViewersDays: 0,\n featured: { kind: 'none', runDays: 0 },\n};\n\n/** Each plan's name, prices, limits and features. Exhaustive by type. */\nexport const PLAN_SPECS: Readonly<\n Record<\n PlanTier,\n {\n name: string;\n prices: Readonly<Record<PlanPeriod, number>>;\n limits: PlanLimits;\n features: PlanFeatures;\n }\n >\n> = {\n premium: {\n name: 'Premium',\n prices: { month: 39_900, year: 399_900 },\n limits: { productsLive: 5, newPeoplePerMonth: 15 },\n features: {\n badge: true,\n insightsDays: 30,\n insightsSources: false,\n profileViewersDays: 30,\n featured: { kind: 'monthly_run', runDays: 7 },\n },\n },\n business: {\n name: 'Business',\n prices: { month: 99_900, year: 999_900 },\n limits: { productsLive: null, newPeoplePerMonth: 50 },\n features: {\n badge: true,\n insightsDays: 90,\n insightsSources: true,\n profileViewersDays: 90,\n featured: { kind: 'always', runDays: 0 },\n },\n },\n};\n\n/** The number of days a member (no plan) is told \"N people viewed your profile\" over. */\nexport const MEMBER_PROFILE_VIEW_COUNT_DAYS = 30;\n\n// ─── Plan time on India's calendar, and an upgrade's price (0.18.0) ──────────\n//\n// Moved here from the backend's plan timeline so the price a member is charged\n// and the rule the Terms of Service state are ONE function: the Terms said\n// \"Rs 20 a day for the rest\" for a week after the server stopped charging it\n// (2026-10-13).\n\n/**\n * A calendar month or year later on India's calendar (`count` of them), the\n * day clamped to the month's last: 31 January plus a month is 28 or 29\n * February. India has one offset all year, so its calendar is UTC's, shifted.\n */\nexport function addPlanPeriod(from: Date, period: PlanPeriod, count = 1): Date {\n const months = period === 'year' ? 12 * count : count;\n const local = new Date(from.getTime() + INDIA_UTC_OFFSET_MS);\n const m = local.getUTCMonth() + months;\n const targetYear = local.getUTCFullYear() + Math.floor(m / 12);\n const targetMonth = ((m % 12) + 12) % 12;\n const lastDay = new Date(Date.UTC(targetYear, targetMonth + 1, 0)).getUTCDate();\n const shifted = Date.UTC(\n targetYear,\n targetMonth,\n Math.min(local.getUTCDate(), lastDay),\n local.getUTCHours(),\n local.getUTCMinutes(),\n local.getUTCSeconds(),\n local.getUTCMilliseconds(),\n );\n return new Date(shifted - INDIA_UTC_OFFSET_MS);\n}\n\n/** What an upgrade costs for each whole calendar year of Premium left: the yearly difference. */\nexport const UPGRADE_PER_YEAR = PLAN_SPECS.business.prices.year - PLAN_SPECS.premium.prices.year;\n/** ...for each whole calendar month after the years: the monthly difference (a 31-day month and February alike). */\nexport const UPGRADE_PER_MONTH = PLAN_SPECS.business.prices.month - PLAN_SPECS.premium.prices.month;\n/** The days left over are charged as this many to a month. */\nexport const UPGRADE_DAYS_PER_MONTH = 30;\n/** ...so each day left over costs this, never more than `UPGRADE_PER_MONTH` for them all. */\nexport const UPGRADE_PER_DAY = UPGRADE_PER_MONTH / UPGRADE_DAYS_PER_MONTH;\n\n/**\n * What an upgrade of `convertedMs` of Premium, from `now`, costs in paise (the\n * user: \"ask for the rest of the money, the difference\"). Each whole calendar\n * year left costs `UPGRADE_PER_YEAR`; each whole calendar month after that,\n * `UPGRADE_PER_MONTH`; the days left over `UPGRADE_PER_DAY` each, but never\n * more than one month's. The part below a year never costs more than a year's.\n * A part day counts as a day; rounded up to the rupee.\n */\nexport function upgradePrice(convertedMs: number, now: Date): number {\n const end = now.getTime() + Math.max(convertedMs, 1);\n let years = 0;\n while (addPlanPeriod(now, 'year', years + 1).getTime() <= end) years += 1;\n const afterYears = addPlanPeriod(now, 'year', years);\n let months = 0;\n while (addPlanPeriod(afterYears, 'month', months + 1).getTime() <= end) months += 1;\n const restDays = Math.ceil((end - addPlanPeriod(afterYears, 'month', months).getTime()) / DAY_MS);\n const belowAYear =\n months * UPGRADE_PER_MONTH + Math.min(restDays * UPGRADE_PER_DAY, UPGRADE_PER_MONTH);\n const paise = years * UPGRADE_PER_YEAR + Math.min(belowAYear, UPGRADE_PER_YEAR);\n return Math.ceil(paise / 100) * 100;\n}\n\n/**\n * Free founding memberships (0.14.0): the first 100 people to join the launch\n * waitlist get their membership free, numbered #1 to #100 by their place\n * (the user, 2026-10-16). Everyone else pays `MEMBERSHIP_PRICE_PAISE` once.\n * No code gives a founding place any more.\n */\nexport const FOUNDING_PLACES = 100;\n\n/**\n * THE EARLY-BIRD OFFER (0.21.0; the user, 2026-11-14): everyone whose Founder\n * Circle account was CREATED before this instant gets the membership free, for\n * life, with no code and no limit on how many. After it, the membership costs\n * `MEMBERSHIP_PRICE_PAISE` as before.\n *\n * Tue 17 Nov 2026, 12:00 IST. The ONE place it is written: the server grants\n * from it (`isEarlyBird`), and the web's landing, pricing, membership screen,\n * Terms and llms.txt word the offer from it and stop offering it at this\n * instant. Moving it is a schema release, like a price.\n *\n * The server grants the same free membership to an account created while\n * payments are not live (before the catalog's `paymentsLiveAt`, or with none\n * set; the user, 2026-11-19). That rule is the server's: `isEarlyBird` here\n * answers for this instant alone.\n */\nexport const EARLY_BIRD_UNTIL = '2026-11-17T06:30:00.000Z';\n\nconst EARLY_BIRD_UNTIL_MS = Date.parse(EARLY_BIRD_UNTIL);\n\n/** Whether an account created at `createdAt` gets the early-bird membership. */\nexport function isEarlyBird(createdAt: Date | string | number): boolean {\n const at = createdAt instanceof Date ? createdAt.getTime() : new Date(createdAt).getTime();\n return Number.isFinite(at) && at < EARLY_BIRD_UNTIL_MS;\n}\n\n/** Whether the offer is still open at `now`: what the pages show. */\nexport function earlyBirdOpen(now: Date | number = Date.now()): boolean {\n return (now instanceof Date ? now.getTime() : now) < EARLY_BIRD_UNTIL_MS;\n}\n\n// ─── GET /plans ──────────────────────────────────────────────────────────────\n\nexport const planOfferSchema = z.object({\n tier: planTierSchema,\n /** \"Premium\", \"Business\": the server's word, so a rename needs no client release. */\n name: z.string(),\n /** GST included. */\n prices: z.object({ month: paiseSchema, year: paiseSchema }),\n limits: planLimitsSchema,\n /** What it unlocks (0.32.0). Defaults to the member's when an older server leaves it out. */\n features: planFeaturesSchema.default(MEMBER_FEATURE_VALUES),\n});\nexport type PlanOffer = z.infer<typeof planOfferSchema>;\n\nexport const planCatalogSchema = z.object({\n currency: z.literal('INR'),\n membership: z.object({\n /** Once, for life, GST included. */\n price: paiseSchema,\n limits: planLimitsSchema,\n /** What a member with no plan has unlocked (0.32.0). */\n features: planFeaturesSchema.default(MEMBER_FEATURE_VALUES),\n }),\n /** Lowest first. */\n plans: z.array(planOfferSchema),\n /** Every purchase is refunded in full within this many days of paying. */\n refundWindowDays: z.number().int().positive(),\n /**\n * Whether payments are LIVE here now: the server's `PAYMENTS_LIVE_AT` is set\n * and has passed, and its gateway is configured. While false, plans and\n * payments are \"coming soon\": a client shows no price, plan, pay button or\n * code box, and every quote and order (a free code's too) answers\n * `PAYMENTS_UNAVAILABLE` (the user, 2026-11-19).\n */\n paymentsEnabled: z.boolean(),\n /**\n * The instant payments go (or went) live, or null while none is set. Every\n * account CREATED before it, or while it is null, holds the membership free\n * for life (kind `early_bird`), so the Terms state it as a date. Defaults to\n * null when an older server leaves it out, so a client can ship first.\n */\n paymentsLiveAt: z.iso.datetime().nullable().default(null),\n /**\n * Whether a plan may renew AUTOMATICALLY here (0.31.0, payments v2). The\n * server's two keys: its `SUBSCRIPTIONS_ENABLED` is set AND its gateway plans\n * resolve, and payments are live. While false a client offers no\n * \"Renew automatically\" switch: every plan is prepaid. Defaults to false\n * when an older server leaves it out.\n */\n autoRenewEnabled: z.boolean().default(false),\n});\nexport type PlanCatalog = z.infer<typeof planCatalogSchema>;\n\n// ─── Auto-renewal (0.31.0, payments v2) ──────────────────────────────────────\n//\n// The user, 2026-11-25: plans RENEW AUTOMATICALLY BY DEFAULT, and the member can\n// turn it off (founder-circle-backend docs/payments-v2-plan.md, section 3a). An\n// auto-renewal is a Razorpay subscription for one tier and period: each charge\n// it makes is an ORDER that buys one period, appended to the blocks exactly as\n// a manual purchase is (same invoice, same 7-day refund). It adds time only\n// when a charge lands, so a failed charge takes nothing away: the plan ends\n// when its time runs out, as a prepaid one does.\n\n/**\n * Where an auto-renewal stands: Razorpay's subscription states, as it names\n * them. ⚠ Stored: append only.\n *\n * created made, waiting for the member to authorise it at Checkout\n * authenticated authorised; its first charge is on a later date (it starts\n * when the time already held ends)\n * active charging each period\n * pending a charge failed; Razorpay is retrying (T+1 to T+3 days)\n * halted every retry failed: no more charges (auto-renew is off)\n * cancelled turned off (at the end of the period, or at once after a\n * refund), or replaced\n * completed its cycles ran out\n * expired never authorised in time\n * paused paused at the gateway (Founder Circle never pauses one)\n */\nexport const AUTO_RENEWAL_STATUS_VALUES = [\n 'created',\n 'authenticated',\n 'active',\n 'pending',\n 'halted',\n 'cancelled',\n 'completed',\n 'expired',\n 'paused',\n] as const;\nexport const autoRenewalStatusSchema = z.enum(AUTO_RENEWAL_STATUS_VALUES);\nexport type AutoRenewalStatus = z.infer<typeof autoRenewalStatusSchema>;\n\n/** The statuses in which an auto-renewal will still charge (or is about to). */\nexport const AUTO_RENEWAL_RUNNING_VALUES = [\n 'authenticated',\n 'active',\n 'pending',\n] as const satisfies readonly AutoRenewalStatus[];\n\n/**\n * A member's auto-renewal, as `GET /me/membership` shows it: at most one, the\n * running one (null when none runs).\n */\nexport const autoRenewalSchema = z.object({\n id: objectIdSchema,\n status: autoRenewalStatusSchema,\n tier: planTierSchema,\n period: planPeriodSchema,\n /** What each charge takes, GST included: the price it was started at, kept. */\n amount: paiseSchema,\n /** When the next charge is due; null when none will come (turned off, halted). */\n nextChargeAt: z.iso.datetime().nullable(),\n /** Turned off: no more charges; the time already paid stays until it ends. */\n cancelAtCycleEnd: z.boolean(),\n /** How it pays, as last charged or authorised; null before the gateway says. */\n method: paymentMethodSnapshotSchema.nullable(),\n /** A failed charge (`pending`) can be fixed by updating the method. */\n canUpdateMethod: z.boolean(),\n /**\n * In the renewal grace (`RENEWAL_GRACE_DAYS`): the time held has ended and\n * the charge is awaited, so the tier stays in force until this instant.\n * Null outside it. A client says \"your renewal is being processed; your\n * plan stays active until <date>\" (or, with `status: 'pending'`, that the\n * charge failed and is being retried).\n */\n graceUntil: z.iso.datetime().nullable().default(null),\n});\nexport type AutoRenewal = z.infer<typeof autoRenewalSchema>;\n\n// ─── GET /me/membership ──────────────────────────────────────────────────────\n\nexport const membershipSchema = z.object({\n kind: membershipKindSchema,\n since: z.iso.datetime(),\n /** \"Founding member #N\": set only for `founding`. */\n foundingNumber: z.number().int().positive().nullable(),\n});\nexport type Membership = z.infer<typeof membershipSchema>;\n\n/** A stretch of one tier. Blocks never overlap and follow each other with no gap. */\nexport const planBlockSchema = z.object({\n tier: planTierSchema,\n startsAt: z.iso.datetime(),\n endsAt: z.iso.datetime(),\n});\nexport type PlanBlock = z.infer<typeof planBlockSchema>;\n\n/** Why someone takes part: their membership, or a staff role (staff are members). */\nexport const TAKES_PART_THROUGH_VALUES = ['membership', 'staff'] as const;\nexport type TakesPartThrough = (typeof TAKES_PART_THROUGH_VALUES)[number];\n\nexport const meMembershipSchema = z.object({\n standing: standingSchema,\n /** Null for a viewer, and for staff who hold none (they take part through their role). */\n membership: membershipSchema.nullable(),\n /** Why they take part: their membership, or a staff role (staff are members). Null for a viewer. */\n through: z.enum(TAKES_PART_THROUGH_VALUES).nullable(),\n plan: z.object({\n /** The tier in force now; null with no plan. */\n tier: planTierSchema.nullable(),\n /** From now on, Business first, then Premium. Empty with no plan. */\n blocks: z.array(planBlockSchema),\n }),\n limits: planLimitsSchema,\n /**\n * What the plan in force unlocks (0.32.0), with the renewal grace, and the\n * top plan's while payments are off, as `limits`. Defaults to the member's\n * when an older server leaves it out.\n */\n features: planFeaturesSchema.default(MEMBER_FEATURE_VALUES),\n products: z.object({\n /** Products they own that are live now. */\n live: z.number().int().nonnegative(),\n /** Products they own, paused ones included. */\n owned: z.number().int().nonnegative(),\n /**\n * What adding another counts against (0.13.0): live ones and the ones\n * they paused themselves, not those a plan's end paused. \"Add a product\"\n * stops when this reaches `limits.productsLive`: pausing never makes room.\n */\n counted: z.number().int().nonnegative(),\n }),\n messages: z.object({\n /** New people they started a conversation with this month (India time). */\n used: z.number().int().nonnegative(),\n /** When this month's count starts again. */\n resetsAt: z.iso.datetime(),\n }),\n /** The billing details they last used, to prefill the next checkout; null before the first. */\n billing: billingDetailsSchema.nullable(),\n /**\n * The auto-renewal that runs (0.31.0): authorised, charging, or retrying a\n * failed charge. Null when none does. Defaults to null when an older server\n * leaves it out.\n */\n autoRenewal: autoRenewalSchema.nullable().default(null),\n});\nexport type MeMembership = z.infer<typeof meMembershipSchema>;\n"]}
1
+ {"version":3,"file":"membership.js","sourceRoot":"","sources":["../../../src/domains/membership/membership.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,UAAU;IACV,QAAQ;IACR,MAAM;IACN,SAAS;IACT,YAAY;CACJ,CAAC;AACX,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAGnE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU,CAAC;AACrE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;AAGvE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,iBAAiB,CAAU,CAAC;AAChG,MAAM,CAAC,MAAM,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,qBAAqB,CAAC;IAC3D,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;QACjB,2CAA2C;QAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACpC,+CAA+C;QAC/C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACrC;;;;WAIG;QACH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;KACxC,CAAC;IACF,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;QACjB,2EAA2E;QAC3E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACpC,4CAA4C;QAC5C,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;KAC3B,CAAC;IACF,+FAA+F;IAC/F,OAAO,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACxC;;;;;;OAMG;IACH,gBAAgB,EAAE,kBAAkB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC1D;;;;OAIG;IACH,WAAW,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACxD,CAAC,CAAC","sourcesContent":["/**\n * founder-schema: membership and plans, as a member holds them (0.12.0)\n *\n * GET /api/v1/plans planCatalogSchema (anyone: prices and what each includes)\n * GET /api/v1/me/membership meMembershipSchema (signed in: what I hold, what I have used)\n *\n * THE USER'S RULING (2026-10-11): looking is free; taking part needs a\n * MEMBERSHIP, Rs 99 once, for life (the first 100 free with a coupon). On top,\n * two PLANS: Premium (5 live products, 15 new people a month to message) and\n * Business (unlimited products, 50 new people). Prices and plan contents come\n * from the server, so a change needs no client release.\n *\n * A PLAN IS TIME, PREPAID, IN TWO BLOCKS: Business time first, then Premium\n * time. Buying more APPENDS; buying Premium while on Business waits its turn;\n * buying Business while on Premium is an upgrade that turns the Premium time\n * left into Business for the difference (`domains/billing`). `blocks` says it\n * as it stands, from now on.\n *\n * Money is integer PAISE everywhere in this package: never a float of rupees.\n *\n * @module founder-schema/domains/membership\n */\n\nimport { z } from 'zod';\nimport { standingSchema } from '../../access/standing.js';\nimport { objectIdSchema } from '../../core/common.js';\nimport { DAY_MS, INDIA_UTC_OFFSET_MS } from '../../core/limits.js';\nimport { billingDetailsSchema, gstStateCodeSchema } from '../billing/gst.js';\nimport { paymentMethodSnapshotSchema } from '../billing/payment-method.js';\n\n/**\n * How someone came to hold a membership. ⚠ Stored: append only.\n *\n * founding free for life, numbered \"Founding member #N\": one of the first\n * `FOUNDING_PLACES` people to join the launch WAITLIST (0.14.0,\n * the user's rule of 2026-10-16). Before that, the founding\n * coupon (`FIRST100`), which no longer exists on main.\n * coupon another free-membership coupon\n * paid Rs 99, captured\n * granted staff gave it (a partner, a press account), with a reason on record\n * early_bird free for life, because the account was created before\n * `EARLY_BIRD_UNTIL` (0.21.0, the user's launch offer of 2026-11-14:\n * everyone who joins before Tue 17 Nov 2026, 12:00 IST), or while\n * payments were not live yet: before the catalog's `paymentsLiveAt`,\n * or with none set (the user, 2026-11-19: whoever joins while\n * payments are \"coming soon\" keeps the membership free for life)\n */\nexport const MEMBERSHIP_KIND_VALUES = [\n 'founding',\n 'coupon',\n 'paid',\n 'granted',\n 'early_bird',\n] as const;\nexport const membershipKindSchema = z.enum(MEMBERSHIP_KIND_VALUES);\nexport type MembershipKind = z.infer<typeof membershipKindSchema>;\n\n/**\n * A stored membership's state (0.20.0: memberships are their own rows, so\n * none is ever erased). `active` is held now, at most one per member; `ended`\n * is history: a refunded payment, a staff revoke, or the account's deletion,\n * said by `MEMBERSHIP_END_REASON_VALUES`.\n */\nexport const MEMBERSHIP_STATUS_VALUES = ['active', 'ended'] as const;\nexport const membershipStatusSchema = z.enum(MEMBERSHIP_STATUS_VALUES);\nexport type MembershipStatus = z.infer<typeof membershipStatusSchema>;\n\nexport const MEMBERSHIP_END_REASON_VALUES = ['refunded', 'revoked', 'account_deleted'] as const;\nexport const membershipEndReasonSchema = z.enum(MEMBERSHIP_END_REASON_VALUES);\nexport type MembershipEndReason = z.infer<typeof membershipEndReasonSchema>;\n\n/** ⚠ Stored: append only. Highest last is NOT implied: compare with `PLAN_TIER_RANK`. */\nexport const PLAN_TIER_VALUES = ['premium', 'business'] as const;\nexport const planTierSchema = z.enum(PLAN_TIER_VALUES);\nexport type PlanTier = z.infer<typeof planTierSchema>;\n\n/** Which tier outranks which: Business above Premium. */\nexport const PLAN_TIER_RANK: Readonly<Record<PlanTier, number>> = { premium: 1, business: 2 };\n\n/** One payment buys a calendar month or a calendar year. ⚠ Stored: append only. */\nexport const PLAN_PERIOD_VALUES = ['month', 'year'] as const;\nexport const planPeriodSchema = z.enum(PLAN_PERIOD_VALUES);\nexport type PlanPeriod = z.infer<typeof planPeriodSchema>;\n\n/** Integer paise, never negative. Rs 399 is 39900. */\nexport const paiseSchema = z.number().int().nonnegative();\nexport type Paise = z.infer<typeof paiseSchema>;\n\n/**\n * What a standing or a plan allows that is COUNTED (the ability says whether;\n * these say how many).\n *\n * productsLive products live at once; null is unlimited (the server\n * still holds a safety ceiling, `PRODUCTS_LIVE_SAFETY_MAX`)\n * newPeoplePerMonth conversations a month with people you do not know\n */\nexport const planLimitsSchema = z.object({\n productsLive: z.number().int().nonnegative().nullable(),\n newPeoplePerMonth: z.number().int().nonnegative(),\n});\nexport type PlanLimits = z.infer<typeof planLimitsSchema>;\n\n/**\n * What a standing or a plan UNLOCKS beyond the counted limits (0.32.0, plans v1;\n * founder-circle-backend docs/plans-v1-features.md, the user 2026-11-28).\n *\n * badge a \"Premium\" / \"Business\" badge on the member's person\n * insightsDays how far back a product's insights go: 0 = the totals only\n * (what a card already shows), else that many days of series\n * insightsSources where a product's visitors came from (Discover, feed...)\n * profileViewersDays who viewed your profile: 0 = the count only, else the\n * names for that many days\n * featured Discover's \"Featured\" row:\n * none not offered\n * monthly_run one run of `runDays` days a calendar\n * month (India time), one product\n * always one product at a time, with no end of its own\n */\nexport const FEATURED_KIND_VALUES = ['none', 'monthly_run', 'always'] as const;\nexport const featuredKindSchema = z.enum(FEATURED_KIND_VALUES);\nexport type FeaturedKind = z.infer<typeof featuredKindSchema>;\n\nexport const planFeaturesSchema = z.object({\n badge: z.boolean(),\n insightsDays: z.number().int().nonnegative(),\n insightsSources: z.boolean(),\n profileViewersDays: z.number().int().nonnegative(),\n featured: z.object({\n kind: featuredKindSchema,\n /** For `monthly_run`: the run's length in days; 0 otherwise. */\n runDays: z.number().int().nonnegative(),\n }),\n});\nexport type PlanFeatures = z.infer<typeof planFeaturesSchema>;\n\n// ─── The price list ──────────────────────────────────────────────────────────\n//\n// THE ONE PLACE a price or a plan's limit is written (0.12.0). The backend\n// prices and counts from these (`modules/plans/catalog.ts`), `GET /plans`\n// serves them, and the web's Terms of Service are written FROM them, so the\n// Terms can never state a price the server does not charge. A change here is\n// a schema release, then the backend, then the web. Integer PAISE, GST\n// included. hary's India-first prices (the user: \"you decide, India first\").\n\n/** The membership: once, for life. */\nexport const MEMBERSHIP_PRICE_PAISE = 9_900;\n\n/** What a member with no plan may: 1 live product, no conversations with people they do not know. */\nexport const MEMBER_LIMIT_VALUES: PlanLimits = { productsLive: 1, newPeoplePerMonth: 0 };\n\n/**\n * What a member with no plan has unlocked (0.32.0): no badge, a product's totals\n * only, the COUNT of who viewed them (last 30 days), nothing featured.\n */\nexport const MEMBER_FEATURE_VALUES: PlanFeatures = {\n badge: false,\n insightsDays: 0,\n insightsSources: false,\n profileViewersDays: 0,\n featured: { kind: 'none', runDays: 0 },\n};\n\n/** Each plan's name, prices, limits and features. Exhaustive by type. */\nexport const PLAN_SPECS: Readonly<\n Record<\n PlanTier,\n {\n name: string;\n prices: Readonly<Record<PlanPeriod, number>>;\n limits: PlanLimits;\n features: PlanFeatures;\n }\n >\n> = {\n premium: {\n name: 'Premium',\n prices: { month: 39_900, year: 399_900 },\n limits: { productsLive: 5, newPeoplePerMonth: 15 },\n features: {\n badge: true,\n insightsDays: 30,\n insightsSources: false,\n profileViewersDays: 30,\n featured: { kind: 'monthly_run', runDays: 7 },\n },\n },\n business: {\n name: 'Business',\n prices: { month: 99_900, year: 999_900 },\n limits: { productsLive: null, newPeoplePerMonth: 50 },\n features: {\n badge: true,\n insightsDays: 90,\n insightsSources: true,\n profileViewersDays: 90,\n featured: { kind: 'always', runDays: 0 },\n },\n },\n};\n\n/** The number of days a member (no plan) is told \"N people viewed your profile\" over. */\nexport const MEMBER_PROFILE_VIEW_COUNT_DAYS = 30;\n\n// ─── Plan time on India's calendar, and an upgrade's price (0.18.0) ──────────\n//\n// Moved here from the backend's plan timeline so the price a member is charged\n// and the rule the Terms of Service state are ONE function: the Terms said\n// \"Rs 20 a day for the rest\" for a week after the server stopped charging it\n// (2026-10-13).\n\n/**\n * A calendar month or year later on India's calendar (`count` of them), the\n * day clamped to the month's last: 31 January plus a month is 28 or 29\n * February. India has one offset all year, so its calendar is UTC's, shifted.\n */\nexport function addPlanPeriod(from: Date, period: PlanPeriod, count = 1): Date {\n const months = period === 'year' ? 12 * count : count;\n const local = new Date(from.getTime() + INDIA_UTC_OFFSET_MS);\n const m = local.getUTCMonth() + months;\n const targetYear = local.getUTCFullYear() + Math.floor(m / 12);\n const targetMonth = ((m % 12) + 12) % 12;\n const lastDay = new Date(Date.UTC(targetYear, targetMonth + 1, 0)).getUTCDate();\n const shifted = Date.UTC(\n targetYear,\n targetMonth,\n Math.min(local.getUTCDate(), lastDay),\n local.getUTCHours(),\n local.getUTCMinutes(),\n local.getUTCSeconds(),\n local.getUTCMilliseconds(),\n );\n return new Date(shifted - INDIA_UTC_OFFSET_MS);\n}\n\n/** What an upgrade costs for each whole calendar year of Premium left: the yearly difference. */\nexport const UPGRADE_PER_YEAR = PLAN_SPECS.business.prices.year - PLAN_SPECS.premium.prices.year;\n/** ...for each whole calendar month after the years: the monthly difference (a 31-day month and February alike). */\nexport const UPGRADE_PER_MONTH = PLAN_SPECS.business.prices.month - PLAN_SPECS.premium.prices.month;\n/** The days left over are charged as this many to a month. */\nexport const UPGRADE_DAYS_PER_MONTH = 30;\n/** ...so each day left over costs this, never more than `UPGRADE_PER_MONTH` for them all. */\nexport const UPGRADE_PER_DAY = UPGRADE_PER_MONTH / UPGRADE_DAYS_PER_MONTH;\n\n/**\n * What an upgrade of `convertedMs` of Premium, from `now`, costs in paise (the\n * user: \"ask for the rest of the money, the difference\"). Each whole calendar\n * year left costs `UPGRADE_PER_YEAR`; each whole calendar month after that,\n * `UPGRADE_PER_MONTH`; the days left over `UPGRADE_PER_DAY` each, but never\n * more than one month's. The part below a year never costs more than a year's.\n * A part day counts as a day; rounded up to the rupee.\n */\nexport function upgradePrice(convertedMs: number, now: Date): number {\n const end = now.getTime() + Math.max(convertedMs, 1);\n let years = 0;\n while (addPlanPeriod(now, 'year', years + 1).getTime() <= end) years += 1;\n const afterYears = addPlanPeriod(now, 'year', years);\n let months = 0;\n while (addPlanPeriod(afterYears, 'month', months + 1).getTime() <= end) months += 1;\n const restDays = Math.ceil((end - addPlanPeriod(afterYears, 'month', months).getTime()) / DAY_MS);\n const belowAYear =\n months * UPGRADE_PER_MONTH + Math.min(restDays * UPGRADE_PER_DAY, UPGRADE_PER_MONTH);\n const paise = years * UPGRADE_PER_YEAR + Math.min(belowAYear, UPGRADE_PER_YEAR);\n return Math.ceil(paise / 100) * 100;\n}\n\n/**\n * Free founding memberships (0.14.0): the first 100 people to join the launch\n * waitlist get their membership free, numbered #1 to #100 by their place\n * (the user, 2026-10-16). Everyone else pays `MEMBERSHIP_PRICE_PAISE` once.\n * No code gives a founding place any more.\n */\nexport const FOUNDING_PLACES = 100;\n\n/**\n * THE EARLY-BIRD OFFER (0.21.0; the user, 2026-11-14): everyone whose Founder\n * Circle account was CREATED before this instant gets the membership free, for\n * life, with no code and no limit on how many. After it, the membership costs\n * `MEMBERSHIP_PRICE_PAISE` as before.\n *\n * Tue 17 Nov 2026, 12:00 IST. The ONE place it is written: the server grants\n * from it (`isEarlyBird`), and the web's landing, pricing, membership screen,\n * Terms and llms.txt word the offer from it and stop offering it at this\n * instant. Moving it is a schema release, like a price.\n *\n * The server grants the same free membership to an account created while\n * payments are not live (before the catalog's `paymentsLiveAt`, or with none\n * set; the user, 2026-11-19). That rule is the server's: `isEarlyBird` here\n * answers for this instant alone.\n */\nexport const EARLY_BIRD_UNTIL = '2026-11-17T06:30:00.000Z';\n\nconst EARLY_BIRD_UNTIL_MS = Date.parse(EARLY_BIRD_UNTIL);\n\n/** Whether an account created at `createdAt` gets the early-bird membership. */\nexport function isEarlyBird(createdAt: Date | string | number): boolean {\n const at = createdAt instanceof Date ? createdAt.getTime() : new Date(createdAt).getTime();\n return Number.isFinite(at) && at < EARLY_BIRD_UNTIL_MS;\n}\n\n/** Whether the offer is still open at `now`: what the pages show. */\nexport function earlyBirdOpen(now: Date | number = Date.now()): boolean {\n return (now instanceof Date ? now.getTime() : now) < EARLY_BIRD_UNTIL_MS;\n}\n\n// ─── GET /plans ──────────────────────────────────────────────────────────────\n\nexport const planOfferSchema = z.object({\n tier: planTierSchema,\n /** \"Premium\", \"Business\": the server's word, so a rename needs no client release. */\n name: z.string(),\n /** GST included. */\n prices: z.object({ month: paiseSchema, year: paiseSchema }),\n limits: planLimitsSchema,\n /** What it unlocks (0.32.0). Defaults to the member's when an older server leaves it out. */\n features: planFeaturesSchema.default(MEMBER_FEATURE_VALUES),\n});\nexport type PlanOffer = z.infer<typeof planOfferSchema>;\n\nexport const planCatalogSchema = z.object({\n currency: z.literal('INR'),\n membership: z.object({\n /** Once, for life, GST included. */\n price: paiseSchema,\n limits: planLimitsSchema,\n /** What a member with no plan has unlocked (0.32.0). */\n features: planFeaturesSchema.default(MEMBER_FEATURE_VALUES),\n }),\n /** Lowest first. */\n plans: z.array(planOfferSchema),\n /** Every purchase is refunded in full within this many days of paying. */\n refundWindowDays: z.number().int().positive(),\n /**\n * Whether payments are LIVE here now: the server's `PAYMENTS_LIVE_AT` is set\n * and has passed, and its gateway is configured. While false, plans and\n * payments are \"coming soon\": a client shows no price, plan, pay button or\n * code box, and every quote and order (a free code's too) answers\n * `PAYMENTS_UNAVAILABLE` (the user, 2026-11-19).\n */\n paymentsEnabled: z.boolean(),\n /**\n * The instant payments go (or went) live, or null while none is set. Every\n * account CREATED before it, or while it is null, holds the membership free\n * for life (kind `early_bird`), so the Terms state it as a date. Defaults to\n * null when an older server leaves it out, so a client can ship first.\n */\n paymentsLiveAt: z.iso.datetime().nullable().default(null),\n /**\n * Whether a plan may renew AUTOMATICALLY here (0.31.0, payments v2). The\n * server's two keys: its `SUBSCRIPTIONS_ENABLED` is set AND its gateway plans\n * resolve, and payments are live. While false a client offers no\n * \"Renew automatically\" switch: every plan is prepaid. Defaults to false\n * when an older server leaves it out.\n */\n autoRenewEnabled: z.boolean().default(false),\n});\nexport type PlanCatalog = z.infer<typeof planCatalogSchema>;\n\n// ─── Auto-renewal (0.31.0, payments v2) ──────────────────────────────────────\n//\n// The user, 2026-11-25: plans RENEW AUTOMATICALLY BY DEFAULT, and the member can\n// turn it off (founder-circle-backend docs/payments-v2-plan.md, section 3a). An\n// auto-renewal is a Razorpay subscription for one tier and period: each charge\n// it makes is an ORDER that buys one period, appended to the blocks exactly as\n// a manual purchase is (same invoice, same 7-day refund). It adds time only\n// when a charge lands, so a failed charge takes nothing away: the plan ends\n// when its time runs out, as a prepaid one does.\n\n/**\n * Where an auto-renewal stands: Razorpay's subscription states, as it names\n * them. ⚠ Stored: append only.\n *\n * created made, waiting for the member to authorise it at Checkout\n * authenticated authorised; its first charge is on a later date (it starts\n * when the time already held ends)\n * active charging each period\n * pending a charge failed; Razorpay is retrying (T+1 to T+3 days)\n * halted every retry failed: no more charges (auto-renew is off)\n * cancelled turned off (at the end of the period, or at once after a\n * refund), or replaced\n * completed its cycles ran out\n * expired never authorised in time\n * paused paused at the gateway (Founder Circle never pauses one)\n */\nexport const AUTO_RENEWAL_STATUS_VALUES = [\n 'created',\n 'authenticated',\n 'active',\n 'pending',\n 'halted',\n 'cancelled',\n 'completed',\n 'expired',\n 'paused',\n] as const;\nexport const autoRenewalStatusSchema = z.enum(AUTO_RENEWAL_STATUS_VALUES);\nexport type AutoRenewalStatus = z.infer<typeof autoRenewalStatusSchema>;\n\n/** The statuses in which an auto-renewal will still charge (or is about to). */\nexport const AUTO_RENEWAL_RUNNING_VALUES = [\n 'authenticated',\n 'active',\n 'pending',\n] as const satisfies readonly AutoRenewalStatus[];\n\n/**\n * A member's auto-renewal, as `GET /me/membership` shows it: at most one, the\n * running one (null when none runs).\n */\nexport const autoRenewalSchema = z.object({\n id: objectIdSchema,\n status: autoRenewalStatusSchema,\n tier: planTierSchema,\n period: planPeriodSchema,\n /** What each charge takes, GST included: the price it was started at, kept. */\n amount: paiseSchema,\n /** When the next charge is due; null when none will come (turned off, halted). */\n nextChargeAt: z.iso.datetime().nullable(),\n /** Turned off: no more charges; the time already paid stays until it ends. */\n cancelAtCycleEnd: z.boolean(),\n /** How it pays, as last charged or authorised; null before the gateway says. */\n method: paymentMethodSnapshotSchema.nullable(),\n /** A failed charge (`pending`) can be fixed by updating the method. */\n canUpdateMethod: z.boolean(),\n /**\n * In the renewal grace (`RENEWAL_GRACE_DAYS`): the time held has ended and\n * the charge is awaited, so the tier stays in force until this instant.\n * Null outside it. A client says \"your renewal is being processed; your\n * plan stays active until <date>\" (or, with `status: 'pending'`, that the\n * charge failed and is being retried).\n */\n graceUntil: z.iso.datetime().nullable().default(null),\n});\nexport type AutoRenewal = z.infer<typeof autoRenewalSchema>;\n\n// ─── GET /me/membership ──────────────────────────────────────────────────────\n\nexport const membershipSchema = z.object({\n kind: membershipKindSchema,\n since: z.iso.datetime(),\n /** \"Founding member #N\": set only for `founding`. */\n foundingNumber: z.number().int().positive().nullable(),\n});\nexport type Membership = z.infer<typeof membershipSchema>;\n\n/** A stretch of one tier. Blocks never overlap and follow each other with no gap. */\nexport const planBlockSchema = z.object({\n tier: planTierSchema,\n startsAt: z.iso.datetime(),\n endsAt: z.iso.datetime(),\n});\nexport type PlanBlock = z.infer<typeof planBlockSchema>;\n\n/** Why someone takes part: their membership, or a staff role (staff are members). */\nexport const TAKES_PART_THROUGH_VALUES = ['membership', 'staff'] as const;\nexport type TakesPartThrough = (typeof TAKES_PART_THROUGH_VALUES)[number];\n\nexport const meMembershipSchema = z.object({\n standing: standingSchema,\n /** Null for a viewer, and for staff who hold none (they take part through their role). */\n membership: membershipSchema.nullable(),\n /** Why they take part: their membership, or a staff role (staff are members). Null for a viewer. */\n through: z.enum(TAKES_PART_THROUGH_VALUES).nullable(),\n plan: z.object({\n /** The tier in force now; null with no plan. */\n tier: planTierSchema.nullable(),\n /** From now on, Business first, then Premium. Empty with no plan. */\n blocks: z.array(planBlockSchema),\n }),\n limits: planLimitsSchema,\n /**\n * What the plan in force unlocks (0.32.0), with the renewal grace, and the\n * top plan's while payments are off, as `limits`. Defaults to the member's\n * when an older server leaves it out.\n */\n features: planFeaturesSchema.default(MEMBER_FEATURE_VALUES),\n products: z.object({\n /** Products they own that are live now. */\n live: z.number().int().nonnegative(),\n /** Products they own, paused ones included. */\n owned: z.number().int().nonnegative(),\n /**\n * What adding another counts against (0.13.0): live ones and the ones\n * they paused themselves, not those a plan's end paused. \"Add a product\"\n * stops when this reaches `limits.productsLive`: pausing never makes room.\n */\n counted: z.number().int().nonnegative(),\n }),\n messages: z.object({\n /** New people they started a conversation with this month (India time). */\n used: z.number().int().nonnegative(),\n /** When this month's count starts again. */\n resetsAt: z.iso.datetime(),\n }),\n /** The billing details they last used, to prefill the next checkout; null before the first. */\n billing: billingDetailsSchema.nullable(),\n /**\n * A first checkout's state, SUGGESTED (2026-11-30): the state of the member's own\n * profile location, only while they have no `billing` to prefill from. The\n * invoice of every online sale names the buyer's state (GST), so it is asked\n * once; this fills it in, and the member can change it before they pay. Never\n * stored by being suggested. Null when there is none; absent from an older server.\n */\n billingStateHint: gstStateCodeSchema.nullable().optional(),\n /**\n * The auto-renewal that runs (0.31.0): authorised, charging, or retrying a\n * failed charge. Null when none does. Defaults to null when an older server\n * leaves it out.\n */\n autoRenewal: autoRenewalSchema.nullable().default(null),\n});\nexport type MeMembership = z.infer<typeof meMembershipSchema>;\n"]}
package/dist/index.d.ts CHANGED
@@ -22,7 +22,7 @@ export { type ApiError, type ApiErrorDetails, apiErrorDetailsSchema, apiErrorSch
22
22
  export { REQUEST_PART_VALUES, type RequestPart, requestPartSchema, toValidationIssues, VALIDATION_MESSAGE, type ValidationIssue, type ValidationMessageKey, validationIssueSchema, } from './core/validation.js';
23
23
  export { type DeleteAccountResponse, deleteAccountResponseSchema, } from './domains/account/account.js';
24
24
  export { AUDIT_ACTION_VALUES, type AuditAction, type AuditActor, type AuditEntry, type AuditPage, auditActionSchema, auditActorSchema, auditEntrySchema, auditPageSchema, } from './domains/audit/audit.js';
25
- export { type AppliedCoupon, type AutoRenewalParams, type AutoRenewalState, type AutoRenewTerms, appliedCouponSchema, autoRenewalParamsSchema, autoRenewalStateSchema, autoRenewTermsSchema, type BillingDetails, billingDetailsSchema, COUPON_KIND_VALUES, COUPON_TARGET_VALUES, type ConfirmAutoRenewalBody, type ConfirmOrderBody, type Coupon, type CouponBenefit, type CouponKind, type CouponList, type CouponParams, type CouponTarget, type CreateCouponBody, type CreateOrderBody, type CreateOrderResponse, type CreditNote, confirmAutoRenewalBodySchema, confirmOrderBodySchema, couponBenefitSchema, couponCodeSchema, couponListSchema, couponParamsSchema, couponSchema, couponTargetSchema, createCouponBodySchema, createOrderBodySchema, createOrderResponseSchema, creditNoteSchema, GRANT_FAILURE_VALUES, type GrantFailure, GST_RATE_PERCENT, GST_STATE_CODE_VALUES, GST_STATES, type GstStateCode, grantFailureSchema, gstinChecksumValid, gstinSchema, gstStateCodeSchema, gstStateName, INVOICE_KIND_VALUES, type Invoice, type InvoiceKind, type InvoiceParty, invoiceKindSchema, invoicePartySchema, invoiceSchema, ORDER_SOURCE_VALUES, ORDER_STATUS_VALUES, type OrderParams, type OrderSource, type OrderState, type OrderStatus, orderParamsSchema, orderSourceSchema, orderStateSchema, orderStatusSchema, type Payer, type PaymentDetail, type PaymentMethodUpdate, type PaymentPage, type PaymentSummary, type PlanEffect, PURCHASE_KIND_VALUES, type PurchaseItem, type PurchaseKind, payerSchema, paymentDetailSchema, paymentMethodUpdateSchema, paymentPageSchema, paymentSummarySchema, planEffectSchema, purchaseItemSchema, type Quote, type QuoteBody, quoteBodySchema, quoteSchema, type RefundPaymentBody, refundPaymentBodySchema, type SetMembershipBody, type StaffPaymentDetail, type StaffPaymentPage, type StaffPaymentSummary, type StaffPaymentsQuery, type StaffPaymentsQueryInput, type StartAutoRenewalBody, setMembershipBodySchema, staffPaymentDetailSchema, staffPaymentPageSchema, staffPaymentSummarySchema, staffPaymentsQuerySchema, startAutoRenewalBodySchema, type TaxSplit, taxSplitSchema, type UpdateCouponBody, updateCouponBodySchema, } from './domains/billing/billing.js';
25
+ export { type AppliedCoupon, type AutoRenewalParams, type AutoRenewalState, type AutoRenewTerms, appliedCouponSchema, autoRenewalParamsSchema, autoRenewalStateSchema, autoRenewTermsSchema, type BillingDetails, billingDetailsSchema, COUPON_KIND_VALUES, COUPON_TARGET_VALUES, type ConfirmAutoRenewalBody, type ConfirmOrderBody, type Coupon, type CouponBenefit, type CouponKind, type CouponList, type CouponParams, type CouponTarget, type CreateCouponBody, type CreateOrderBody, type CreateOrderResponse, type CreditNote, confirmAutoRenewalBodySchema, confirmOrderBodySchema, couponBenefitSchema, couponCodeSchema, couponListSchema, couponParamsSchema, couponSchema, couponTargetSchema, createCouponBodySchema, createOrderBodySchema, createOrderResponseSchema, creditNoteSchema, GRANT_FAILURE_VALUES, type GrantFailure, GST_RATE_PERCENT, GST_STATE_CODE_VALUES, GST_STATES, type GstStateCode, grantFailureSchema, gstinChecksumValid, gstinSchema, gstStateCodeOf, gstStateCodeSchema, gstStateName, INVOICE_KIND_VALUES, type Invoice, type InvoiceKind, type InvoiceParty, invoiceKindSchema, invoicePartySchema, invoiceSchema, ORDER_SOURCE_VALUES, ORDER_STATUS_VALUES, type OrderParams, type OrderSource, type OrderState, type OrderStatus, orderParamsSchema, orderSourceSchema, orderStateSchema, orderStatusSchema, type Payer, type PaymentDetail, type PaymentMethodUpdate, type PaymentPage, type PaymentSummary, type PlanEffect, PURCHASE_KIND_VALUES, type PurchaseItem, type PurchaseKind, payerSchema, paymentDetailSchema, paymentMethodUpdateSchema, paymentPageSchema, paymentSummarySchema, planEffectSchema, purchaseItemSchema, type Quote, type QuoteBody, quoteBodySchema, quoteSchema, type RefundPaymentBody, refundPaymentBodySchema, type SetMembershipBody, type StaffPaymentDetail, type StaffPaymentPage, type StaffPaymentSummary, type StaffPaymentsQuery, type StaffPaymentsQueryInput, type StartAutoRenewalBody, setMembershipBodySchema, staffPaymentDetailSchema, staffPaymentPageSchema, staffPaymentSummarySchema, staffPaymentsQuerySchema, startAutoRenewalBodySchema, type TaxSplit, taxSplitSchema, type UpdateCouponBody, updateCouponBodySchema, } from './domains/billing/billing.js';
26
26
  export { AUTO_RENEW_STOP_REASON_VALUES, type AutoRenewStopReason, autoRenewStopReasonSchema, FC_EMAIL_DATA_SCHEMAS, FC_EMAIL_TEMPLATE_VALUES, type FcEmailData, type FcEmailTemplate, fcAutoRenewStoppedEmailSchema, fcPaymentReceivedEmailSchema, fcPlanEndsSoonEmailSchema, fcPlanRenewsSoonEmailSchema, fcRefundProcessedEmailSchema, fcRenewalDoneEmailSchema, fcRenewalFailedEmailSchema, } from './domains/billing/emails.js';
27
27
  export { PAYMENT_METHOD_TEXT_MAX, PAYMENT_METHOD_VALUES, type PaymentMethod, type PaymentMethodSnapshot, paymentMethodSchema, paymentMethodSnapshotSchema, } from './domains/billing/payment-method.js';
28
28
  export { BLOCKS_MAX, type BlockAnswer, type BlockedMember, type BlockedPage, type BlockTargetParams, blockAnswerSchema, blockedMemberSchema, blockedPageSchema, blockTargetParamsSchema, } from './domains/blocks/blocks.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,UAAU,EACf,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,aAAa,EACb,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,KAAK,YAAY,EACjB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,KAAK,IAAI,EACT,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,oBAAoB,EACpB,KAAK,YAAY,EACjB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,KAAK,QAAQ,EACb,cAAc,GACf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,oBAAoB,EACpB,QAAQ,EACR,sBAAsB,EACtB,KAAK,eAAe,EACpB,cAAc,EACd,aAAa,EACb,KAAK,MAAM,EACX,WAAW,EACX,KAAK,IAAI,EACT,YAAY,EACZ,cAAc,EACd,UAAU,EACV,WAAW,EACX,KAAK,OAAO,EACZ,cAAc,EACd,aAAa,EACb,eAAe,EACf,KAAK,QAAQ,EACb,cAAc,EACd,kBAAkB,EAClB,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EACrB,oBAAoB,GACrB,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,UAAU,EACf,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,aAAa,EACb,KAAK,MAAM,EACX,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,KAAK,YAAY,EACjB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,KAAK,IAAI,EACT,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,oBAAoB,EACpB,KAAK,YAAY,EACjB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,KAAK,QAAQ,EACb,cAAc,GACf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,oBAAoB,EACpB,QAAQ,EACR,sBAAsB,EACtB,KAAK,eAAe,EACpB,cAAc,EACd,aAAa,EACb,KAAK,MAAM,EACX,WAAW,EACX,KAAK,IAAI,EACT,YAAY,EACZ,cAAc,EACd,UAAU,EACV,WAAW,EACX,KAAK,OAAO,EACZ,cAAc,EACd,aAAa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aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,gCAAgC,CAAC"}
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ export { REQUEST_PART_VALUES, requestPartSchema, toValidationIssues, VALIDATION_
32
32
  export { deleteAccountResponseSchema, } from './domains/account/account.js';
33
33
  export { AUDIT_ACTION_VALUES, auditActionSchema, auditActorSchema, auditEntrySchema, auditPageSchema, } from './domains/audit/audit.js';
34
34
  // ─── Billing: buying, paying, invoices, refunds, coupons (0.12.0) ───────────
35
- export { appliedCouponSchema, autoRenewalParamsSchema, autoRenewalStateSchema, autoRenewTermsSchema, billingDetailsSchema, COUPON_KIND_VALUES, COUPON_TARGET_VALUES, confirmAutoRenewalBodySchema, confirmOrderBodySchema, couponBenefitSchema, couponCodeSchema, couponListSchema, couponParamsSchema, couponSchema, couponTargetSchema, createCouponBodySchema, createOrderBodySchema, createOrderResponseSchema, creditNoteSchema, GRANT_FAILURE_VALUES, GST_RATE_PERCENT, GST_STATE_CODE_VALUES, GST_STATES, grantFailureSchema, gstinChecksumValid, gstinSchema, gstStateCodeSchema, gstStateName, INVOICE_KIND_VALUES, invoiceKindSchema, invoicePartySchema, invoiceSchema, ORDER_SOURCE_VALUES, ORDER_STATUS_VALUES, orderParamsSchema, orderSourceSchema, orderStateSchema, orderStatusSchema, PURCHASE_KIND_VALUES, payerSchema, paymentDetailSchema, paymentMethodUpdateSchema, paymentPageSchema, paymentSummarySchema, planEffectSchema, purchaseItemSchema, quoteBodySchema, quoteSchema, refundPaymentBodySchema, setMembershipBodySchema, staffPaymentDetailSchema, staffPaymentPageSchema, staffPaymentSummarySchema, staffPaymentsQuerySchema, startAutoRenewalBodySchema, taxSplitSchema, updateCouponBodySchema, } from './domains/billing/billing.js';
35
+ export { appliedCouponSchema, autoRenewalParamsSchema, autoRenewalStateSchema, autoRenewTermsSchema, billingDetailsSchema, COUPON_KIND_VALUES, COUPON_TARGET_VALUES, confirmAutoRenewalBodySchema, confirmOrderBodySchema, couponBenefitSchema, couponCodeSchema, couponListSchema, couponParamsSchema, couponSchema, couponTargetSchema, createCouponBodySchema, createOrderBodySchema, createOrderResponseSchema, creditNoteSchema, GRANT_FAILURE_VALUES, GST_RATE_PERCENT, GST_STATE_CODE_VALUES, GST_STATES, grantFailureSchema, gstinChecksumValid, gstinSchema, gstStateCodeOf, gstStateCodeSchema, gstStateName, INVOICE_KIND_VALUES, invoiceKindSchema, invoicePartySchema, invoiceSchema, ORDER_SOURCE_VALUES, ORDER_STATUS_VALUES, orderParamsSchema, orderSourceSchema, orderStateSchema, orderStatusSchema, PURCHASE_KIND_VALUES, payerSchema, paymentDetailSchema, paymentMethodUpdateSchema, paymentPageSchema, paymentSummarySchema, planEffectSchema, purchaseItemSchema, quoteBodySchema, quoteSchema, refundPaymentBodySchema, setMembershipBodySchema, staffPaymentDetailSchema, staffPaymentPageSchema, staffPaymentSummarySchema, staffPaymentsQuerySchema, startAutoRenewalBodySchema, taxSplitSchema, updateCouponBodySchema, } from './domains/billing/billing.js';
36
36
  export { AUTO_RENEW_STOP_REASON_VALUES, autoRenewStopReasonSchema, FC_EMAIL_DATA_SCHEMAS, FC_EMAIL_TEMPLATE_VALUES, fcAutoRenewStoppedEmailSchema, fcPaymentReceivedEmailSchema, fcPlanEndsSoonEmailSchema, fcPlanRenewsSoonEmailSchema, fcRefundProcessedEmailSchema, fcRenewalDoneEmailSchema, fcRenewalFailedEmailSchema, } from './domains/billing/emails.js';
37
37
  export { PAYMENT_METHOD_TEXT_MAX, PAYMENT_METHOD_VALUES, paymentMethodSchema, paymentMethodSnapshotSchema, } from './domains/billing/payment-method.js';
38
38
  // ─── Blocking a member (2026-11-23) ─────────────────────────────────────────
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,+EAA+E;AAC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kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAElB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,sBAAsB,EACtB,mBAAmB,EAEnB,qBAAqB,EAKrB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,6BAA6B,EAC7B,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EAcpB,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAKL,+BAA+B,EAC/B,mCAAmC,EACnC,wBAAwB,EACxB,4BAA4B,EAI5B,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,GACf,MAAM,wBAAwB,CAAC;AAChC,+EAA+E;AAC/E,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EAKtB,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,8BAA8B,CAAC;AACtC,+EAA+E;AAC/E,OAAO,EAEL,gBAAgB,EAChB,uBAAuB,EAIvB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,gCAAgC,CAAC","sourcesContent":["/**\n * founder-schema — Shared Zod schemas for Founder Circle\n *\n * The single source of truth consumed by founder-circle-backend, the web\n * client and the app client: every request, every response, every limit,\n * every error code. Publishing rule (TEAM.md 5a): the version only ever moves\n * on `dev`, never on a feat branch.\n *\n * @module founder-schema\n */\n\n// ─── Access: roles, permissions (CASL), the MPIN and the active role ────────\nexport {\n type ChangeMpinBody,\n changeMpinBodySchema,\n type MeAccessResponse,\n MPIN_LENGTH,\n MPIN_LOCK_MS,\n MPIN_MAX_ATTEMPTS,\n meAccessResponseSchema,\n mpinSchema,\n type SetMpinBody,\n type SwitchRoleBody,\n setMpinBodySchema,\n switchRoleBodySchema,\n} from './access/access.js';\nexport {\n CAPABILITY_GRANTED_BY,\n CAPABILITY_VALUES,\n type Capability,\n canGrantCapability,\n capabilitySchema,\n} from './access/capabilities.js';\nexport {\n ACTION_VALUES,\n type Action,\n type AppAbility,\n type AppRawRule,\n isAppRawRule,\n type PackedRules,\n packedRuleSchema,\n packedRulesSchema,\n SUBJECT_VALUES,\n type Subject,\n type SubjectFields,\n type SubjectInstance,\n subjectSchema,\n} from './access/permissions.js';\nexport {\n ACTIVE_ROLE_TTL_MS,\n canGrantRole,\n isPlatformRole,\n MEMBER_ROLE,\n PLATFORM_ROLE_VALUES,\n type PlatformRole,\n platformRoleSchema,\n ROLE_GRANTED_BY,\n ROLE_VALUES,\n type Role,\n roleSchema,\n} from './access/roles.js';\nexport {\n ACCESS_REASON_VALUES,\n type AccessReason,\n accessReasonOf,\n accessReasonSchema,\n STANDING_VALUES,\n type Standing,\n standingSchema,\n} from './access/standing.js';\n// ─── Common helpers and enums ────────────────────────────────────────────────\nexport {\n chosenUsernameSchema,\n eachOnce,\n emptyStringToUndefined,\n type FounderLocation,\n fullNameSchema,\n GENDER_VALUES,\n type Gender,\n GOAL_VALUES,\n type Goal,\n genderSchema,\n goalListSchema,\n goalSchema,\n graphemesOf,\n type HttpUrl,\n httpUrlOnHosts,\n httpUrlSchema,\n INDUSTRY_VALUES,\n type Industry,\n industrySchema,\n isReservedUsername,\n isUrlOnHost,\n joinFullName,\n locationSchema,\n multiValueQuery,\n nameFromSignIn,\n normalizeLinkUrl,\n normalizePhone,\n type ObjectIdString,\n objectIdSchema,\n optionalTrimmedString,\n type PaginationQuery,\n type PaginationQueryInput,\n PHONE_DIGITS,\n type Phone,\n paginationQuerySchema,\n phoneSchema,\n queryInt,\n RESERVED_USERNAMES,\n requiredGoalListSchema,\n type SafeUrl,\n SKILL_VALUES,\n type Skill,\n STARTUP_STAGE_VALUES,\n type StartupStage,\n safeUrlSchema,\n skillListSchema,\n skillSchema,\n splitFullName,\n startupStageSchema,\n tidyFullName,\n USERNAME_MAX,\n USERNAME_MIN,\n type Username,\n usernameSchema,\n YOUTUBE_HOSTS,\n youtubeVideoId,\n} from './core/common.js';\n// ─── Soft delete (0.20.0) ────────────────────────────────────────────────────\nexport { DELETED_REASON_VALUES, type DeletedReason, deletedReasonSchema } from './core/deletion.js';\n// ─── Error codes ─────────────────────────────────────────────────────────────\nexport {\n API_ERROR_CODE,\n API_ERROR_CODE_VALUES,\n type ApiErrorCode,\n apiErrorCodeSchema,\n} from './core/errors.js';\n// ─── Limits: every length, size and count, by name ──────────────────────────\nexport {\n ABOUT_MAX,\n AREA_NAME_MAX,\n AREA_SEARCH_MAX,\n AUTO_HIDE_REPORTS,\n AUTO_RENEW_REMINDER_DAYS,\n BILLING_ADDRESS_MAX,\n BILLING_ADDRESS_MIN,\n BILLING_NAME_MAX,\n BILLING_NAME_MIN,\n BILLING_REASON_MAX,\n BILLING_REASON_MIN,\n CHAT_PARTICIPANTS_MAX,\n CITY_MAX,\n COMMUNITY_BAN_REASON_MAX,\n COMMUNITY_DECLINE_REASON_MAX,\n COMMUNITY_DECLINE_REASON_MIN,\n COMMUNITY_DESCRIPTION_MAX,\n COMMUNITY_NAME_MAX,\n COMMUNITY_NAME_MIN,\n COMMUNITY_RULE_MAX,\n COMMUNITY_RULES_MAX,\n COMMUNITY_SUGGESTION_WHY_MAX,\n CONTRIBUTION_LEADERBOARD_SIZE,\n CONTRIBUTION_PAIR_POINTS_MAX,\n CONTRIBUTION_PAIR_WINDOW_DAYS,\n CONTRIBUTION_RECENT_DAYS,\n COUNTRY_MAX,\n COUPON_CODE_MAX,\n COUPON_CODE_MIN,\n COUPON_LABEL_MAX,\n COUPON_LABEL_MIN,\n COUPON_PERCENT_MAX,\n COUPON_PERCENT_MIN,\n COUPON_USES_MAX,\n CURSOR_MAX,\n DASHBOARD_RECENT_DAYS,\n DAY_MS,\n DISCOVER_FILTER_VALUES_MAX,\n DISCOVER_TEXT_MAX,\n DISPLAY_NAME_MAX,\n ERASURE_RETENTION_DAYS,\n FOUNDED_YEAR_MIN,\n GEO_ACCURACY_MAX_M,\n GEO_PRECISE_ACCURACY_M,\n GEO_SYNC_ACCURACY_MAX_M,\n GOALS_MIN,\n GSTIN_LENGTH,\n HEADLINE_MAX,\n INDIA_TIME_ZONE,\n INDIA_UTC_OFFSET_MS,\n INVOICE_NUMBER_MAX,\n LINK_URL_MAX,\n LOCALITY_PAGE_SIZE,\n LOCALITY_SKIP_MAX,\n LOCATION_HISTORY_MAX,\n LOCATION_HISTORY_MAX_DAYS,\n MEDIA_ALT_MAX,\n MEDIA_MAX_INPUT_PIXELS,\n MEDIA_PENDING_MAX,\n MEDIA_PLACEHOLDER_MAX,\n MEDIA_UNATTACHED_TTL_HOURS,\n MEMBER_SEARCH_MAX,\n MODERATION_EXCERPT_MAX,\n MODERATION_NOTE_MAX,\n NOTIFICATION_EXCERPT_MAX,\n NOTIFICATION_RETENTION_DAYS,\n ONBOARDING_DRAFT_RETENTION_DAYS,\n ORDER_TTL_MINUTES,\n PAGE_SIZE_DEFAULT,\n PAGE_SIZE_MAX,\n PLAN_AHEAD_MAX_YEARS,\n PLAN_REMINDER_DAYS,\n PRODUCT_ASK_OPEN_DAYS,\n PRODUCT_CAPTION_MAX,\n PRODUCT_DESCRIPTION_MAX,\n PRODUCT_NAME_MAX,\n PRODUCT_SCREENSHOTS_MAX,\n PRODUCT_TAGLINE_MAX,\n PRODUCT_TEAM_SHOWN,\n PRODUCTS_LIVE_SAFETY_MAX,\n RATING_MAX,\n RATING_MIN,\n RAZORPAY_EVENT_RETENTION_DAYS,\n RAZORPAY_ID_MAX,\n RAZORPAY_SIGNATURE_MAX,\n REFUND_WINDOW_DAYS,\n RENEWAL_GRACE_DAYS,\n REPORT_NOTE_MAX,\n REVIEW_AVERAGE_MIN_COUNT,\n REVIEW_HELPFUL_POINTS_MAX,\n REVIEW_REPLY_MAX,\n REVIEW_TEXT_MAX,\n REVIEW_TEXT_MIN,\n refundWindowEndsAt,\n SAVED_REPLIES_MAX,\n SAVED_REPLY_BODY_MAX,\n SAVED_REPLY_TITLE_MAX,\n SKILLS_MAX,\n STATE_MAX,\n SUSPENSION_REASON_MAX,\n SUSPENSION_REASON_MIN,\n TEAM_SIZE_MAX,\n TEAM_SIZE_MIN,\n TICKET_MESSAGE_MAX,\n TICKET_MESSAGES_MAX,\n TICKET_SUBJECT_MAX,\n TICKET_SUBJECT_MIN,\n UPLOAD_MAX_BYTES,\n VENTURE_NAME_MAX,\n VENTURE_TAGLINE_MAX,\n} from './core/limits.js';\n// ─── Money as people read it (0.18.0) ────────────────────────────────────────\nexport { keptPaise, refundLeftPaise, rupees } from './core/money.js';\n// ─── Response envelopes ──────────────────────────────────────────────────────\nexport {\n type ApiError,\n type ApiErrorDetails,\n apiErrorDetailsSchema,\n apiErrorSchema,\n type ErrorResponse,\n errorResponseSchema,\n type IdResponse,\n idResponseSchema,\n paginatedSchema,\n type QueryArgs,\n successResponseSchema,\n} from './core/responses.js';\n// ─── Validation: message keys and the wire shape of a failure ───────────────\nexport {\n REQUEST_PART_VALUES,\n type RequestPart,\n requestPartSchema,\n toValidationIssues,\n VALIDATION_MESSAGE,\n type ValidationIssue,\n type ValidationMessageKey,\n validationIssueSchema,\n} from './core/validation.js';\n// ─── Account ─────────────────────────────────────────────────────────────────\nexport {\n type DeleteAccountResponse,\n deleteAccountResponseSchema,\n} from './domains/account/account.js';\nexport {\n AUDIT_ACTION_VALUES,\n type AuditAction,\n type AuditActor,\n type AuditEntry,\n type AuditPage,\n auditActionSchema,\n auditActorSchema,\n auditEntrySchema,\n auditPageSchema,\n} from './domains/audit/audit.js';\n// ─── Billing: buying, paying, invoices, refunds, coupons (0.12.0) ───────────\nexport {\n type AppliedCoupon,\n // Auto-renewal (0.31.0, payments v2)\n type AutoRenewalParams,\n type AutoRenewalState,\n type AutoRenewTerms,\n appliedCouponSchema,\n autoRenewalParamsSchema,\n autoRenewalStateSchema,\n autoRenewTermsSchema,\n type BillingDetails,\n billingDetailsSchema,\n COUPON_KIND_VALUES,\n COUPON_TARGET_VALUES,\n type ConfirmAutoRenewalBody,\n type ConfirmOrderBody,\n type Coupon,\n type CouponBenefit,\n type CouponKind,\n type CouponList,\n type CouponParams,\n type CouponTarget,\n type CreateCouponBody,\n type CreateOrderBody,\n type CreateOrderResponse,\n type CreditNote,\n confirmAutoRenewalBodySchema,\n confirmOrderBodySchema,\n couponBenefitSchema,\n couponCodeSchema,\n couponListSchema,\n couponParamsSchema,\n couponSchema,\n couponTargetSchema,\n createCouponBodySchema,\n createOrderBodySchema,\n createOrderResponseSchema,\n creditNoteSchema,\n GRANT_FAILURE_VALUES,\n type GrantFailure,\n GST_RATE_PERCENT,\n GST_STATE_CODE_VALUES,\n GST_STATES,\n type GstStateCode,\n grantFailureSchema,\n gstinChecksumValid,\n gstinSchema,\n gstStateCodeSchema,\n gstStateName,\n INVOICE_KIND_VALUES,\n type Invoice,\n type InvoiceKind,\n type InvoiceParty,\n invoiceKindSchema,\n invoicePartySchema,\n invoiceSchema,\n ORDER_SOURCE_VALUES,\n ORDER_STATUS_VALUES,\n type OrderParams,\n type OrderSource,\n type OrderState,\n type OrderStatus,\n orderParamsSchema,\n orderSourceSchema,\n orderStateSchema,\n orderStatusSchema,\n type Payer,\n type PaymentDetail,\n type PaymentMethodUpdate,\n type PaymentPage,\n type PaymentSummary,\n type PlanEffect,\n PURCHASE_KIND_VALUES,\n type PurchaseItem,\n type PurchaseKind,\n payerSchema,\n paymentDetailSchema,\n paymentMethodUpdateSchema,\n paymentPageSchema,\n paymentSummarySchema,\n planEffectSchema,\n purchaseItemSchema,\n type Quote,\n type QuoteBody,\n quoteBodySchema,\n quoteSchema,\n type RefundPaymentBody,\n refundPaymentBodySchema,\n type SetMembershipBody,\n type StaffPaymentDetail,\n type StaffPaymentPage,\n type StaffPaymentSummary,\n type StaffPaymentsQuery,\n type StaffPaymentsQueryInput,\n type StartAutoRenewalBody,\n setMembershipBodySchema,\n staffPaymentDetailSchema,\n staffPaymentPageSchema,\n staffPaymentSummarySchema,\n staffPaymentsQuerySchema,\n startAutoRenewalBodySchema,\n type TaxSplit,\n taxSplitSchema,\n type UpdateCouponBody,\n updateCouponBodySchema,\n} from './domains/billing/billing.js';\nexport {\n AUTO_RENEW_STOP_REASON_VALUES,\n type AutoRenewStopReason,\n autoRenewStopReasonSchema,\n FC_EMAIL_DATA_SCHEMAS,\n FC_EMAIL_TEMPLATE_VALUES,\n type FcEmailData,\n type FcEmailTemplate,\n fcAutoRenewStoppedEmailSchema,\n fcPaymentReceivedEmailSchema,\n fcPlanEndsSoonEmailSchema,\n fcPlanRenewsSoonEmailSchema,\n fcRefundProcessedEmailSchema,\n fcRenewalDoneEmailSchema,\n fcRenewalFailedEmailSchema,\n} from './domains/billing/emails.js';\nexport {\n PAYMENT_METHOD_TEXT_MAX,\n PAYMENT_METHOD_VALUES,\n type PaymentMethod,\n type PaymentMethodSnapshot,\n paymentMethodSchema,\n paymentMethodSnapshotSchema,\n} from './domains/billing/payment-method.js';\n// ─── Blocking a member (2026-11-23) ─────────────────────────────────────────\nexport {\n BLOCKS_MAX,\n type BlockAnswer,\n type BlockedMember,\n type BlockedPage,\n type BlockTargetParams,\n blockAnswerSchema,\n blockedMemberSchema,\n blockedPageSchema,\n blockTargetParamsSchema,\n} from './domains/blocks/blocks.js';\n// ─── Chat ────────────────────────────────────────────────────────────────────\nexport {\n CHAT_OPENED_VIA_VALUES,\n CHAT_PRODUCT_ID,\n CHAT_REACH_VALUES,\n CHAT_SOCKET_REAUTH_SECONDS,\n CHAT_TOKEN_REFRESH_MARGIN_SECONDS,\n type ChatAuthToken,\n type ChatConfig,\n type ChatOpenedVia,\n type ChatParticipant,\n type ChatParticipantsBody,\n type ChatParticipantsResponse,\n type ChatProductId,\n type ChatReach,\n type ChatReachKind,\n type ChatReachParams,\n chatAuthTokenSchema,\n chatConfigSchema,\n chatOpenedViaSchema,\n chatParticipantSchema,\n chatParticipantsBodySchema,\n chatParticipantsResponseSchema,\n chatProductIdSchema,\n chatReachKindSchema,\n chatReachParamsSchema,\n chatReachSchema,\n DIRECT_CONTACT_STATUS_VALUES,\n type DirectContactStatus,\n directContactStatusSchema,\n MESSAGE_FROM_VALUES,\n type MessageFrom,\n type MessagingSettings,\n messageFromSchema,\n messagingSettingsSchema,\n type OpenChatBody,\n type OpenChatResponse,\n openChatBodySchema,\n openChatResponseSchema,\n} from './domains/chat/chat.js';\n// ─── Communities: official spaces, their members and suggestions (0.9.0) ────\nexport {\n type BanCommunityMemberBody,\n banCommunityMemberBodySchema,\n COMMUNITY_ANNOUNCE_INTERVAL_MS,\n COMMUNITY_MEMBER_STATUS_VALUES,\n COMMUNITY_PINS_MAX,\n COMMUNITY_ROLE_VALUES,\n COMMUNITY_STATUS_VALUES,\n COMMUNITY_SUGGESTION_DECISION_VALUES,\n COMMUNITY_SUGGESTION_STATUS_VALUES,\n COMMUNITY_SUGGESTIONS_OPEN_MAX,\n COMMUNITY_TOPICS_MAX,\n COMMUNITY_VISIBILITY_RANK,\n COMMUNITY_VISIBILITY_VALUES,\n type Community,\n type CommunityBan,\n type CommunityBanPage,\n type CommunityCard,\n type CommunityCardPage,\n type CommunityCardViewer,\n type CommunityChip,\n type CommunityCommentParams,\n type CommunityContentParams,\n type CommunityDiscoverQuery,\n type CommunityDiscoverQueryInput,\n type CommunityInvite,\n type CommunityInvites,\n type CommunityMember,\n type CommunityMemberPage,\n type CommunityMemberParams,\n type CommunityMemberStatus,\n type CommunityMembersQuery,\n type CommunityMembersQueryInput,\n type CommunityParams,\n type CommunityPendingInvite,\n type CommunityPendingInvitePage,\n type CommunityRequest,\n type CommunityRequestPage,\n type CommunityRole,\n type CommunityStatus,\n type CommunitySuggestion,\n type CommunitySuggestionDecision,\n type CommunitySuggestionPage,\n type CommunitySuggestionParams,\n type CommunitySuggestionStatus,\n type CommunitySuggestionsQuery,\n type CommunitySuggestionsQueryInput,\n type CommunityViewer,\n type CommunityVisibility,\n type CreateCommunityBody,\n type CreateCommunitySuggestionBody,\n communityBanPageSchema,\n communityBanSchema,\n communityCardPageSchema,\n communityCardSchema,\n communityCardViewerSchema,\n communityChangeExposes,\n communityChipSchema,\n communityCommentParamsSchema,\n communityContentParamsSchema,\n communityDiscoverQuerySchema,\n communityInviteSchema,\n communityInvitesSchema,\n communityMemberPageSchema,\n communityMemberParamsSchema,\n communityMemberSchema,\n communityMemberStatusSchema,\n communityMembersQuerySchema,\n communityParamsSchema,\n communityPendingInvitePageSchema,\n communityPendingInviteSchema,\n communityRequestPageSchema,\n communityRequestSchema,\n communityRoleSchema,\n communitySchema,\n communityStatusSchema,\n communitySuggestionDecisionSchema,\n communitySuggestionPageSchema,\n communitySuggestionParamsSchema,\n communitySuggestionSchema,\n communitySuggestionStatusSchema,\n communitySuggestionsQuerySchema,\n communityTypeChangeAllowed,\n communityViewerSchema,\n communityVisibilitySchema,\n createCommunityBodySchema,\n createCommunitySuggestionBodySchema,\n type DeclineCommunitySuggestionBody,\n declineCommunitySuggestionBodySchema,\n type InviteCommunityMemberBody,\n inviteCommunityMemberBodySchema,\n type PinCommunityContentBody,\n pinCommunityContentBodySchema,\n type SetCommunityIconBody,\n type SetCommunityMemberRoleBody,\n type SetCommunityStatusBody,\n type SetCommunityVisibilityBody,\n setCommunityIconBodySchema,\n setCommunityMemberRoleBodySchema,\n setCommunityStatusBodySchema,\n setCommunityVisibilityBodySchema,\n type UpdateCommunityBody,\n updateCommunityBodySchema,\n} from './domains/communities/communities.js';\n// ─── Contribution: the help a member gives, recognised ───────────────────────\nexport {\n COMMENT_UPVOTE_MILESTONE,\n CONTENT_UPVOTE_MILESTONE,\n CONTRIBUTION_AWARDED_KIND_VALUES,\n CONTRIBUTION_KIND_VALUES,\n CONTRIBUTION_PERIOD_VALUES,\n CONTRIBUTION_POINTS,\n CONTRIBUTION_SOURCE_VALUES,\n type ContributionEntry,\n type ContributionKind,\n type ContributionLeaderboard,\n type ContributionLeaderboardQuery,\n type ContributionLeaderEntry,\n type ContributionPage,\n type ContributionPeriod,\n type ContributionSource,\n type ContributionYou,\n contributionEntrySchema,\n contributionKindSchema,\n contributionLeaderboardQuerySchema,\n contributionLeaderboardSchema,\n contributionLeaderEntrySchema,\n contributionPageSchema,\n contributionPeriodSchema,\n contributionSourceSchema,\n contributionYouSchema,\n} from './domains/contributions/contributions.js';\n// ─── Staff: overview, members, moderation, support, the team, the audit log ─\nexport { type Dashboard, dashboardSchema } from './domains/dashboard/dashboard.js';\n// ─── Discover ────────────────────────────────────────────────────────────────\nexport {\n DISCOVER_SHOW_VALUES,\n type DiscoverFacets,\n type DiscoverPage,\n type DiscoverQuery,\n type DiscoverQueryInput,\n type DiscoverShow,\n discoverFacetsSchema,\n discoverPageSchema,\n discoverQuerySchema,\n discoverShowSchema,\n} from './domains/discover/discover.js';\n// ─── Feed: post, poll, comment, reaction ─────────────────────────────────────\n// Feed parity with Jansathi (2026-11-23): closing a poll early, results after\n// it closes, the comment thread's order.\nexport {\n type AttachedMedia,\n type AuthorParams,\n attachedMediaSchema,\n authorParamsSchema,\n type CastVoteBody,\n type CastVoteResponse,\n type ClosePollResponse,\n COMMENT_MAX_BODY_CHARS,\n COMMENT_SORT_VALUES,\n CONTENT_KIND_VALUES,\n CONTENT_MEDIA_KIND_VALUES,\n type CommentHelpfulResponse,\n type CommentPage,\n type CommentParams,\n type CommentSort,\n type CommentsQuery,\n type CommentsQueryInput,\n type CommunityFeedQuery,\n type ContentKind,\n type ContentMediaKind,\n type ContentParams,\n type ContentTargetParams,\n type ContentViewerState,\n type CreateCommentBody,\n type CreatePollBody,\n type CreatePostBody,\n type CreateReportBody,\n type CreateReportResponse,\n type CreateRepostBody,\n castVoteBodySchema,\n castVoteResponseSchema,\n closePollResponseSchema,\n commentHelpfulResponseSchema,\n commentPageSchema,\n commentParamsSchema,\n commentSortSchema,\n commentsQuerySchema,\n communityFeedQuerySchema,\n contentKindSchema,\n contentMediaKindSchema,\n contentParamsSchema,\n contentTargetParamsSchema,\n contentViewerStateSchema,\n createCommentBodySchema,\n createPollBodySchema,\n createPostBodySchema,\n createReportBodySchema,\n createReportResponseSchema,\n createRepostBodySchema,\n EDIT_WINDOW_MS,\n ENGAGEMENT_TARGET_KIND_VALUES,\n type EngagementTargetKind,\n type EngagementTargetParams,\n engagementTargetKindSchema,\n engagementTargetParamsSchema,\n FEED_SECTION_VALUES,\n FEED_SORT_VALUES,\n type FeedAuthor,\n type FeedComment,\n type FeedImage,\n type FeedItem,\n type FeedItemParams,\n type FeedMedia,\n type FeedPage,\n type FeedPoll,\n type FeedPost,\n type FeedQuery,\n type FeedQueryInput,\n type FeedSection,\n type FeedSort,\n feedAuthorSchema,\n feedCommentSchema,\n feedImageSchema,\n feedItemParamsSchema,\n feedItemSchema,\n feedMediaSchema,\n feedPageSchema,\n feedPollSchema,\n feedPostSchema,\n feedQuerySchema,\n feedSectionSchema,\n feedSortSchema,\n HOME_FEED_SORT_VALUES,\n HOT_WINDOW_DAYS,\n type HomeFeedSort,\n homeFeedSortSchema,\n MAX_TOPICS,\n type PickableReaction,\n type PinnedItems,\n POLL_MAX_DURATION_MS,\n POLL_MAX_OPTIONS,\n POLL_MIN_DURATION_MS,\n POLL_MIN_OPTIONS,\n POLL_OPTION_MAX_CHARS,\n POLL_QUESTION_MAX_CHARS,\n POLL_RESULTS_VISIBILITY_VALUES,\n POST_MAX_BODY_CHARS,\n POST_MAX_MEDIA,\n type PollOption,\n type PollParams,\n type PollResultsVisibility,\n type ProductFeedbackItem,\n type ProductFeedbackPage,\n pickableReactionSchema,\n pinnedItemsSchema,\n pollOptionSchema,\n pollParamsSchema,\n pollResultsVisibilitySchema,\n postHasContent,\n productFeedbackItemSchema,\n productFeedbackPageSchema,\n RANKED_FEED_WINDOW_DAYS,\n REACTION_PICKER_VALUES,\n REACTION_TYPE_VALUES,\n REPORT_REASON_VALUES,\n REPORT_STATUS_VALUES,\n REPORT_TARGET_KIND_VALUES,\n type ReactionCounts,\n type ReactionsQuery,\n type ReactionsQueryInput,\n type ReactionType,\n type Reactor,\n type ReactorPage,\n type ReportReason,\n type ReportStatus,\n type ReportTargetKind,\n type RepostedSource,\n reactionCountsSchema,\n reactionsQuerySchema,\n reactionTypeSchema,\n reactorPageSchema,\n reactorSchema,\n reportReasonSchema,\n reportTargetKindSchema,\n repostedSourceSchema,\n requiredTopicsSchema,\n SCORE_VOTE_VALUES,\n type ScoreVote,\n type SetReactionBody,\n type SetReactionResponse,\n type SetScoreVoteBody,\n type SetScoreVoteResponse,\n scoreVoteSchema,\n setReactionBodySchema,\n setReactionResponseSchema,\n setScoreVoteBodySchema,\n setScoreVoteResponseSchema,\n type ToggleBookmarkResponse,\n toggleBookmarkResponseSchema,\n type UpdateCommentBody,\n type UpdatePostBody,\n updateCommentBodySchema,\n updatePostBodySchema,\n type ViewerState,\n viewerStateSchema,\n} from './domains/feed/feed.js';\n// @mentions (2026-11-23).\nexport {\n extractMentions,\n findMentions,\n MENTION_MAX_PER_ITEM,\n MENTION_SUGGESTIONS_MAX,\n type Mention,\n type MentionSuggestions,\n type MentionSuggestionsQuery,\n type MentionToken,\n mentionSchema,\n mentionSuggestionsQuerySchema,\n mentionSuggestionsSchema,\n mentionsSchema,\n} from './domains/feed/mentions.js';\n// ─── Follows (2026-11-20) ────────────────────────────────────────────────────\nexport {\n type FollowAnswer,\n type FollowCounts,\n type FollowedBy,\n type FollowRelation,\n type FollowTargetParams,\n followAnswerSchema,\n followCountsSchema,\n followedBySchema,\n followRelationSchema,\n followTargetParamsSchema,\n MUTUALS_SAMPLE_SIZE,\n type Mutuals,\n mutualsSchema,\n type PersonCard,\n type PersonPage,\n personCardSchema,\n personPageSchema,\n} from './domains/follows/follows.js';\n// ─── Plans v1: insights, profile views, visibility, featured (0.32.0) ──────\nexport {\n INSIGHTS_RANGE_VALUES,\n type InsightDay,\n type InsightsQuery,\n type InsightsQueryInput,\n insightDaySchema,\n insightsQuerySchema,\n type ProductInsights,\n type ProfileViewer,\n type ProfileViews,\n type ProfileViewsQuery,\n type ProfileViewsQueryInput,\n productInsightsSchema,\n profileViewerSchema,\n profileViewsQuerySchema,\n profileViewsSchema,\n type RecordViewBody,\n recordViewBodySchema,\n VIEW_RETENTION_DAYS,\n VIEW_SOURCE_VALUES,\n VISIBILITY_SETTINGS_DEFAULT,\n type ViewSource,\n type VisibilitySettings,\n viewSourceSchema,\n visibilitySettingsSchema,\n} from './domains/insights/insights.js';\n// ─── Location: the area tree, the declared location, the GPS axis (0.19.0) ──\nexport {\n AREA_TYPE_VALUES,\n type AreaList,\n type AreaOption,\n type AreaPage,\n type AreaType,\n areaListSchema,\n areaOptionSchema,\n areaPageSchema,\n areaTypeSchema,\n areaWords,\n type ClearLocationHistoryResult,\n clearLocationHistoryResultSchema,\n type DistrictsQuery,\n districtsQuerySchema,\n type GeolocationFix,\n type GeolocationSyncResult,\n geolocationFixSchema,\n geolocationSyncResultSchema,\n LOCALITY_AREA_TYPES,\n LOCALITY_TYPE_LABEL,\n LOCATION_HISTORY_KIND_VALUES,\n type LocalitiesQuery,\n type LocalitiesQueryInput,\n type LocalityAreaType,\n type LocationHistoryKind,\n type LocationPick,\n type LocationSettings,\n localitiesQuerySchema,\n locationHistoryKindSchema,\n locationPickSchema,\n locationSettingsSchema,\n type Place,\n pickOfPlace,\n placeSchema,\n placeWords,\n type UpdateLocationSettingsBody,\n URBAN_BODY_TYPE_VALUES,\n updateLocationSettingsBodySchema,\n} from './domains/location/areas.js';\n// ─── Location: India's states and cities (0.17.0) ───────────────────────────\nexport {\n CITY_ALIASES,\n canonicalCityName,\n canonicalIndiaLocation,\n findIndiaState,\n INDIA,\n INDIA_DIALING_CODE,\n INDIA_STATE_NAMES,\n INDIA_STATES,\n type IndiaState,\n type IndiaStateName,\n listedCityName,\n publicCityOf,\n STATE_ALIASES,\n townName,\n} from './domains/location/india.js';\n// ─── Media: what an uploaded image becomes ──────────────────────────────────\nexport {\n MEDIA_ATTACHMENT_KIND_VALUES,\n MEDIA_PURPOSE_VALUES,\n MEDIA_SIZES,\n MEDIA_STATUS_VALUES,\n MEDIA_UPLOAD_CONTENT_TYPES,\n MEDIA_VARIANTS_MAX,\n type MediaAttachmentKind,\n type MediaImage,\n type MediaPurpose,\n type MediaStatus,\n type MediaUploadContentType,\n type MediaVariant,\n mediaAttachmentKindSchema,\n mediaImageSchema,\n mediaPurposeSchema,\n mediaStatusSchema,\n mediaUploadContentTypeSchema,\n mediaVariantSchema,\n type UploadedMedia,\n uploadedMediaSchema,\n} from './domains/media/media.js';\nexport {\n MEMBER_STATUS_VALUES,\n type MemberDetail,\n type MemberDirectoryPage,\n type MemberDirectoryQuery,\n type MemberDirectoryQueryInput,\n type MemberParams,\n type MemberStatus,\n type MemberSummary,\n memberDetailSchema,\n memberDirectoryPageSchema,\n memberDirectoryQuerySchema,\n memberParamsSchema,\n memberStatusSchema,\n memberSummarySchema,\n type SuspendMemberBody,\n type Suspension,\n suspendMemberBodySchema,\n suspensionSchema,\n} from './domains/members/members.js';\n// ─── Membership and plans, as a member holds them (0.12.0) ──────────────────\nexport {\n AUTO_RENEWAL_RUNNING_VALUES,\n AUTO_RENEWAL_STATUS_VALUES,\n type AutoRenewal,\n type AutoRenewalStatus,\n addPlanPeriod,\n autoRenewalSchema,\n autoRenewalStatusSchema,\n EARLY_BIRD_UNTIL,\n earlyBirdOpen,\n FEATURED_KIND_VALUES,\n type FeaturedKind,\n FOUNDING_PLACES,\n featuredKindSchema,\n isEarlyBird,\n MEMBER_FEATURE_VALUES,\n MEMBER_LIMIT_VALUES,\n MEMBER_PROFILE_VIEW_COUNT_DAYS,\n MEMBERSHIP_END_REASON_VALUES,\n MEMBERSHIP_KIND_VALUES,\n MEMBERSHIP_PRICE_PAISE,\n MEMBERSHIP_STATUS_VALUES,\n type MeMembership,\n type Membership,\n type MembershipEndReason,\n type MembershipKind,\n type MembershipStatus,\n meMembershipSchema,\n membershipEndReasonSchema,\n membershipKindSchema,\n membershipSchema,\n membershipStatusSchema,\n type Paise,\n PLAN_PERIOD_VALUES,\n PLAN_SPECS,\n PLAN_TIER_RANK,\n PLAN_TIER_VALUES,\n type PlanBlock,\n type PlanCatalog,\n type PlanFeatures,\n type PlanLimits,\n type PlanOffer,\n type PlanPeriod,\n type PlanTier,\n paiseSchema,\n planBlockSchema,\n planCatalogSchema,\n planFeaturesSchema,\n planLimitsSchema,\n planOfferSchema,\n planPeriodSchema,\n planTierSchema,\n TAKES_PART_THROUGH_VALUES,\n type TakesPartThrough,\n UPGRADE_DAYS_PER_MONTH,\n UPGRADE_PER_DAY,\n UPGRADE_PER_MONTH,\n UPGRADE_PER_YEAR,\n upgradePrice,\n} from './domains/membership/membership.js';\nexport {\n MODERATION_ACTION_VALUES,\n MODERATION_ACTIONS_BY_TARGET_KIND,\n MODERATION_CONTEXT_KIND_VALUES,\n MODERATION_STATE_VALUES,\n type ModerationAction,\n type ModerationContentQuery,\n type ModerationContentQueryInput,\n type ModerationContextKind,\n type ModerationDecisionBody,\n type ModerationItem,\n type ModerationPage,\n type ModerationState,\n type ModerationTargetParams,\n moderationActionSchema,\n moderationContentQuerySchema,\n moderationContextKindSchema,\n moderationDecisionBodySchema,\n moderationItemSchema,\n moderationPageSchema,\n moderationStateSchema,\n moderationTargetParamsSchema,\n} from './domains/moderation/moderation.js';\n// ─── Notifications: the bell ─────────────────────────────────────────────────\nexport {\n NOTIFICATION_FILTER_VALUES,\n NOTIFICATION_KIND_VALUES,\n NOTIFICATION_PREFERENCE_OF,\n NOTIFICATION_PREFERENCE_VALUES,\n type Notification,\n type NotificationFilter,\n type NotificationKeyParams,\n type NotificationKind,\n type NotificationListQuery,\n type NotificationListQueryInput,\n type NotificationPage,\n type NotificationParams,\n type NotificationPreference,\n type NotificationPreferences,\n type NotificationUnreadCount,\n notificationFilterSchema,\n notificationKeyParamsSchema,\n notificationKindSchema,\n notificationListQuerySchema,\n notificationPageSchema,\n notificationParamsSchema,\n notificationPreferencesSchema,\n notificationSchema,\n notificationUnreadCountSchema,\n type SetNotificationHiddenBody,\n setNotificationHiddenBodySchema,\n type UpdateNotificationPreferencesBody,\n updateNotificationPreferencesBodySchema,\n} from './domains/notifications/notifications.js';\nexport {\n PUSH_DEVICE_LABEL_MAX,\n type PushPublicKey,\n type PushStatus,\n type PushSubscribeBody,\n type PushSubscriptionResult,\n pushPublicKeySchema,\n pushStatusSchema,\n pushSubscribeBodySchema,\n pushSubscriptionResultSchema,\n} from './domains/notifications/push.js';\n// ─── Onboarding ──────────────────────────────────────────────────────────────\nexport {\n ageInYears,\n type CompleteOnboardingBody,\n type CompleteOnboardingBodyInput,\n type CompleteOnboardingResponse,\n type ContactLinks,\n completeOnboardingBodySchema,\n completeOnboardingResponseSchema,\n contactLinksSchema,\n DATE_INPUT_MAX,\n type DateOfBirth,\n dateOfBirthBounds,\n dateOfBirthSchema,\n dateToIsoDate,\n EMPTY_ONBOARDING_VENTURE,\n FOUNDER_ONBOARDING_STEPS,\n GOAL_CATEGORIES,\n GOAL_CATEGORY_KEYS,\n type GoalCategory,\n type GoalCategoryKey,\n GUIDELINES_VERSION,\n GUIDELINES_VERSION_MAX,\n guidelinesVersionSchema,\n INTERESTS_MAX,\n INTERESTS_MIN,\n type IsoDate,\n interestsSchema,\n isoDateSchema,\n isoDateToDate,\n isRealIsoDate,\n isUnderAgeDateOfBirth,\n LEGACY_ONBOARDING_TOTAL_STEPS,\n LEGAL_STRUCTURE_VALUES,\n type LegalStructure,\n legacyProfessionalAnswers,\n legalStructureSchema,\n MAX_AGE_YEARS,\n MIN_AGE_YEARS,\n ONBOARDING_DRAFT_KEYS,\n ONBOARDING_STEP_FIELDS,\n ONBOARDING_STEP_KEYS,\n ONBOARDING_STEP_SCHEMAS,\n ONBOARDING_TOTAL_STEPS,\n type OnboardingDraft,\n type OnboardingDraftKey,\n type OnboardingField,\n type OnboardingForm,\n type OnboardingProgressUpdate,\n type OnboardingStatus,\n type OnboardingStepBody,\n type OnboardingStepConfig,\n type OnboardingStepKey,\n onboardingDraftKeySchema,\n onboardingDraftSchema,\n onboardingFormSchema,\n onboardingProgressUpdateSchema,\n onboardingStatusSchema,\n PHONE_INPUT_MAX,\n readOnboardingDraft,\n TEAM_SIZE_DIGITS_MAX,\n TOPIC_CATEGORIES,\n TOPIC_CATEGORY_KEYS,\n TOPIC_VALUES,\n type Topic,\n type TopicCategory,\n type TopicCategoryKey,\n teamSizeDigits,\n todayInIndia,\n topicSchema,\n} from './domains/onboarding/onboarding.js';\nexport {\n type CompleteOnboardingBodyCandidate,\n completeOnboardingBodyFrom,\n emptyOnboardingForm,\n foundedYearDigits,\n locationStarted,\n onboardingDraftForStep,\n ventureBodyFrom,\n ventureStarted,\n} from './domains/onboarding/onboarding-answers.js';\n// ─── A person, on every surface (0.20.0) ────────────────────────────────────\nexport {\n formerPerson,\n initialsOf,\n type Person,\n PLAN_BADGE_VALUES,\n type PlanBadge,\n personSchema,\n planBadgeSchema,\n} from './domains/people/person.js';\nexport {\n type CreateProductCommentBody,\n createProductCommentBodySchema,\n type ProductComment,\n type ProductCommentPage,\n type ProductCommentsQuery,\n type ProductCommentsQueryInput,\n type ProductCommentVoteResponse,\n productCommentPageSchema,\n productCommentSchema,\n productCommentsQuerySchema,\n productCommentVoteResponseSchema,\n type UpdateProductCommentBody,\n updateProductCommentBodySchema,\n} from './domains/products/product-comments.js';\nexport {\n FEATURED_ROW_MAX,\n type FeaturedProducts,\n type FeatureState,\n featuredProductsSchema,\n featureStateSchema,\n type ProductFeature,\n productFeatureSchema,\n} from './domains/products/product-featured.js';\n// ─── Products: what founders build, and the help around it ───────────────────\nexport {\n type CreateProductBody,\n createProductBodySchema,\n type InviteProductMemberBody,\n inviteProductMemberBodySchema,\n type MyProducts,\n missingForListing,\n myProductsSchema,\n PRODUCT_ASK_VALUES,\n PRODUCT_INVITABLE_ROLE_VALUES,\n PRODUCT_LINK_KEYS,\n PRODUCT_LISTING_REQUIREMENT_VALUES,\n PRODUCT_MEMBER_STATUS_VALUES,\n PRODUCT_PAUSED_BY_VALUES,\n PRODUCT_PLATFORM_VALUES,\n PRODUCT_SORT_VALUES,\n PRODUCT_STAGE_VALUES,\n PRODUCT_STATUS_VALUES,\n PRODUCT_TEAM_ROLE_VALUES,\n PRODUCT_TOPICS_MAX,\n PRODUCT_VISIBILITY_VALUES,\n type Product,\n type ProductAsk,\n type ProductCard,\n type ProductCardPage,\n type ProductChip,\n type ProductDiscoverQuery,\n type ProductDiscoverQueryInput,\n type ProductFacets,\n type ProductFeedbackQuery,\n type ProductFeedbackQueryInput,\n type ProductInvitableRole,\n type ProductInvite,\n type ProductInvites,\n type ProductLinkKey,\n type ProductLinks,\n type ProductListingRequirement,\n type ProductMemberParams,\n type ProductMemberStatus,\n type ProductParams,\n type ProductPausedBy,\n type ProductPendingInvite,\n type ProductPendingInvitePage,\n type ProductPlatform,\n type ProductRating,\n type ProductScreenshot,\n type ProductScreenshotInput,\n type ProductSort,\n type ProductStage,\n type ProductStatus,\n type ProductsByMemberParams,\n type ProductTeamMember,\n type ProductTeamPage,\n type ProductTeamRole,\n type ProductTester,\n type ProductTesterPage,\n type ProductUpvoteResponse,\n type ProductViewer,\n type ProductVisibility,\n productAskSchema,\n productCardPageSchema,\n productCardSchema,\n productCardViewerSchema,\n productChipSchema,\n productDiscoverQuerySchema,\n productFacetsSchema,\n productFeedbackQuerySchema,\n productInvitableRoleSchema,\n productInviteSchema,\n productInvitesSchema,\n productIsOnDiscover,\n productLinksReadSchema,\n productLinksSchema,\n productListingRequirementSchema,\n productMemberParamsSchema,\n productMemberStatusSchema,\n productParamsSchema,\n productPausedBySchema,\n productPendingInvitePageSchema,\n productPendingInviteSchema,\n productPlatformSchema,\n productRatingSchema,\n productSchema,\n productScreenshotInputSchema,\n productScreenshotSchema,\n productSortSchema,\n productStageSchema,\n productStatusSchema,\n productsByMemberParamsSchema,\n productTeamMemberSchema,\n productTeamPageSchema,\n productTeamRoleSchema,\n productTesterPageSchema,\n productTesterSchema,\n productUpvoteResponseSchema,\n productVideoUrlSchema,\n productViewerSchema,\n productVisibilitySchema,\n type SetProductLiveBody,\n type SetProductLogoBody,\n type SetProductMemberRoleBody,\n type SetProductScreenshotsBody,\n type SetProductStatusBody,\n type SetProductVisibilityBody,\n setProductLiveBodySchema,\n setProductLogoBodySchema,\n setProductMemberRoleBodySchema,\n setProductScreenshotsBodySchema,\n setProductStatusBodySchema,\n setProductVisibilityBodySchema,\n type TransferProductBody,\n transferProductBodySchema,\n type UpdateProductBody,\n updateProductBodySchema,\n} from './domains/products/products.js';\n// ─── Founder profile ─────────────────────────────────────────────────────────\nexport {\n CONTACT_VISIBILITY_AUDIENCE,\n CONTACT_VISIBILITY_FIELDS,\n type ContactVisibility,\n type ContactVisibilityField,\n type ContributionSummary,\n changesDiscoverCard,\n contactVisibilitySchema,\n contributionSummarySchema,\n FOUNDER_CARD_EDIT_FIELDS,\n FOUNDER_CARD_FIELDS,\n FOUNDER_LINK_KEYS,\n type FounderCard,\n type FounderCardField,\n type FounderLinkKey,\n type FounderLinks,\n type FounderProfile,\n founderCardSchema,\n founderLinksSchema,\n founderProfileSchema,\n type MemberByline,\n type MemberHandleParams,\n type MemberProfile,\n type MyPersonalDetails,\n memberBylineSchema,\n memberHandleParamsSchema,\n memberProfileSchema,\n myPersonalDetailsSchema,\n PROFILE_AUDIENCE_VALUES,\n type ProfileAudience,\n type PublicBirthday,\n publicBirthdaySchema,\n type SetAvatarBody,\n setAvatarBodySchema,\n type UpdateFounderProfileBody,\n type UpdateMyPersonalDetailsBody,\n type UpdatePhotoSettingsBody,\n type UpdateUsernameBody,\n USERNAME_UNAVAILABLE_REASON_VALUES,\n type UsernameAvailability,\n type UsernameAvailabilityQuery,\n type UsernameUnavailableReason,\n updateFounderProfileBodySchema,\n updateMyPersonalDetailsBodySchema,\n updatePhotoSettingsBodySchema,\n updateUsernameBodySchema,\n usernameAvailabilityQuerySchema,\n usernameAvailabilitySchema,\n VENTURE_KEYS,\n VENTURE_OPTIONAL_KEYS,\n VENTURE_ROLE_VALUES,\n type Venture,\n type VentureKey,\n type VentureRole,\n ventureRoleSchema,\n ventureRolesSchema,\n ventureSchema,\n ventureWriteSchema,\n} from './domains/profile/founder-profile.js';\n// ─── The member's own private answers (0.16.0) ───────────────────────────────\nexport {\n type MyBusiness,\n type MyInterests,\n type MyVenture,\n myBusinessSchema,\n myInterestsSchema,\n myVentureSchema,\n myVentureWriteSchema,\n type PutMyBusinessBody,\n type PutMyInterestsBody,\n putMyBusinessBodySchema,\n putMyInterestsBodySchema,\n} from './domains/profile/my-profile.js';\n// ─── Reviews: stars and words on a product ───────────────────────────────────\nexport {\n type CreateReviewBody,\n createReviewBodySchema,\n type ProductReview,\n productReviewSchema,\n REVIEW_SORT_VALUES,\n type ReviewHelpfulResponse,\n type ReviewPage,\n type ReviewParams,\n type ReviewRating,\n type ReviewReply,\n type ReviewReplyBody,\n type ReviewSort,\n type ReviewsQuery,\n type ReviewsQueryInput,\n type ReviewViewer,\n reviewHelpfulResponseSchema,\n reviewPageSchema,\n reviewParamsSchema,\n reviewRatingSchema,\n reviewReplyBodySchema,\n reviewReplySchema,\n reviewSortSchema,\n reviewsQuerySchema,\n reviewViewerSchema,\n type UpdateReviewBody,\n updateReviewBodySchema,\n} from './domains/reviews/reviews.js';\nexport {\n type CreateTicketBody,\n createTicketBodySchema,\n REFUND_ASK_CATEGORY,\n type ReplyTicketBody,\n replyTicketBodySchema,\n type SavedReply,\n type SavedReplyBody,\n type SavedReplyList,\n type SavedReplyParams,\n savedReplyBodySchema,\n savedReplyListSchema,\n savedReplyParamsSchema,\n savedReplySchema,\n TICKET_ASSIGNEE_FILTER_VALUES,\n TICKET_CATEGORY_VALUES,\n TICKET_CHANGE_VALUES,\n TICKET_SCOPE_VALUES,\n TICKET_SIDE_VALUES,\n TICKET_STATUS_VALUES,\n type TicketAssigneeFilter,\n type TicketCategory,\n type TicketChange,\n type TicketDetail,\n type TicketListQuery,\n type TicketListQueryInput,\n type TicketMessage,\n type TicketPage,\n type TicketParams,\n type TicketScope,\n type TicketSide,\n type TicketStatus,\n type TicketSummary,\n ticketAssigneeFilterSchema,\n ticketCategorySchema,\n ticketDetailSchema,\n ticketListQuerySchema,\n ticketMessageSchema,\n ticketPageSchema,\n ticketParamsSchema,\n ticketScopeSchema,\n ticketSideSchema,\n ticketStatusSchema,\n ticketSummarySchema,\n} from './domains/support/support.js';\nexport {\n type SetMemberCapabilitiesBody,\n type SetMemberCapabilitiesResponse,\n type SetMemberRolesBody,\n type SetMemberRolesResponse,\n setMemberCapabilitiesBodySchema,\n setMemberCapabilitiesResponseSchema,\n setMemberRolesBodySchema,\n setMemberRolesResponseSchema,\n type TeamMember,\n type TeamMemberParams,\n type TeamPage,\n teamMemberParamsSchema,\n teamMemberSchema,\n teamPageSchema,\n} from './domains/team/team.js';\n// ─── Uploads: asking for a slot, completing it, discarding it ───────────────\nexport {\n UPLOAD_CONTENT_TYPES,\n UPLOAD_FILE_EXTENSIONS,\n type UploadFileExtension,\n type UploadParams,\n type UploadPresignBody,\n type UploadPresignResponse,\n uploadParamsSchema,\n uploadPresignBodySchema,\n uploadPresignResponseSchema,\n} from './domains/uploads/uploads.js';\n// ─── Waitlist: joining before the launch, and your place on it (0.15.0) ─────\nexport {\n type MyWaitlist,\n myWaitlistSchema,\n WAITLIST_REFUSAL_VALUES,\n type WaitlistPlace,\n type WaitlistRefusal,\n type WaitlistStatus,\n waitlistPlaceSchema,\n waitlistRefusalSchema,\n waitlistStatusSchema,\n} from './domains/waitlist/waitlist.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,+EAA+E;AAC/E,OAAO,EAEL,oBAAoB,EAEpB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,UAAU,EAGV,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,iBAAiB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AqB,EAKrB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,6BAA6B,EAC7B,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EAcpB,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAKL,+BAA+B,EAC/B,mCAAmC,EACnC,wBAAwB,EACxB,4BAA4B,EAI5B,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,GACf,MAAM,wBAAwB,CAAC;AAChC,+EAA+E;AAC/E,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EAKtB,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,8BAA8B,CAAC;AACtC,+EAA+E;AAC/E,OAAO,EAEL,gBAAgB,EAChB,uBAAuB,EAIvB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,gCAAgC,CAAC","sourcesContent":["/**\n * founder-schema — Shared Zod schemas for Founder Circle\n *\n * The single source of truth consumed by founder-circle-backend, the web\n * client and the app client: every request, every response, every limit,\n * every error code. Publishing rule (TEAM.md 5a): the version only ever moves\n * on `dev`, never on a feat branch.\n *\n * @module founder-schema\n */\n\n// ─── Access: roles, permissions (CASL), the MPIN and the active role ────────\nexport {\n type ChangeMpinBody,\n changeMpinBodySchema,\n type MeAccessResponse,\n MPIN_LENGTH,\n MPIN_LOCK_MS,\n MPIN_MAX_ATTEMPTS,\n meAccessResponseSchema,\n mpinSchema,\n type SetMpinBody,\n type SwitchRoleBody,\n setMpinBodySchema,\n switchRoleBodySchema,\n} from './access/access.js';\nexport {\n CAPABILITY_GRANTED_BY,\n CAPABILITY_VALUES,\n type Capability,\n canGrantCapability,\n capabilitySchema,\n} from './access/capabilities.js';\nexport {\n ACTION_VALUES,\n type Action,\n type AppAbility,\n type AppRawRule,\n isAppRawRule,\n type PackedRules,\n packedRuleSchema,\n packedRulesSchema,\n SUBJECT_VALUES,\n type Subject,\n type SubjectFields,\n type SubjectInstance,\n subjectSchema,\n} from './access/permissions.js';\nexport {\n ACTIVE_ROLE_TTL_MS,\n canGrantRole,\n isPlatformRole,\n MEMBER_ROLE,\n PLATFORM_ROLE_VALUES,\n type PlatformRole,\n platformRoleSchema,\n ROLE_GRANTED_BY,\n ROLE_VALUES,\n type Role,\n roleSchema,\n} from './access/roles.js';\nexport {\n ACCESS_REASON_VALUES,\n type AccessReason,\n accessReasonOf,\n accessReasonSchema,\n STANDING_VALUES,\n type Standing,\n standingSchema,\n} from './access/standing.js';\n// ─── Common helpers and enums ────────────────────────────────────────────────\nexport {\n chosenUsernameSchema,\n eachOnce,\n emptyStringToUndefined,\n type FounderLocation,\n fullNameSchema,\n GENDER_VALUES,\n type Gender,\n GOAL_VALUES,\n type Goal,\n genderSchema,\n goalListSchema,\n goalSchema,\n graphemesOf,\n type HttpUrl,\n httpUrlOnHosts,\n httpUrlSchema,\n INDUSTRY_VALUES,\n type Industry,\n industrySchema,\n isReservedUsername,\n isUrlOnHost,\n joinFullName,\n locationSchema,\n multiValueQuery,\n nameFromSignIn,\n normalizeLinkUrl,\n normalizePhone,\n type ObjectIdString,\n objectIdSchema,\n optionalTrimmedString,\n type PaginationQuery,\n type PaginationQueryInput,\n PHONE_DIGITS,\n type Phone,\n paginationQuerySchema,\n phoneSchema,\n queryInt,\n RESERVED_USERNAMES,\n requiredGoalListSchema,\n type SafeUrl,\n SKILL_VALUES,\n type Skill,\n STARTUP_STAGE_VALUES,\n type StartupStage,\n safeUrlSchema,\n skillListSchema,\n skillSchema,\n splitFullName,\n startupStageSchema,\n tidyFullName,\n USERNAME_MAX,\n USERNAME_MIN,\n type Username,\n usernameSchema,\n YOUTUBE_HOSTS,\n youtubeVideoId,\n} from './core/common.js';\n// ─── Soft delete (0.20.0) ────────────────────────────────────────────────────\nexport { DELETED_REASON_VALUES, type DeletedReason, deletedReasonSchema } from './core/deletion.js';\n// ─── Error codes ─────────────────────────────────────────────────────────────\nexport {\n API_ERROR_CODE,\n API_ERROR_CODE_VALUES,\n type ApiErrorCode,\n apiErrorCodeSchema,\n} from './core/errors.js';\n// ─── Limits: every length, size and count, by name ──────────────────────────\nexport {\n ABOUT_MAX,\n AREA_NAME_MAX,\n AREA_SEARCH_MAX,\n AUTO_HIDE_REPORTS,\n AUTO_RENEW_REMINDER_DAYS,\n BILLING_ADDRESS_MAX,\n BILLING_ADDRESS_MIN,\n BILLING_NAME_MAX,\n BILLING_NAME_MIN,\n BILLING_REASON_MAX,\n BILLING_REASON_MIN,\n CHAT_PARTICIPANTS_MAX,\n CITY_MAX,\n COMMUNITY_BAN_REASON_MAX,\n COMMUNITY_DECLINE_REASON_MAX,\n COMMUNITY_DECLINE_REASON_MIN,\n COMMUNITY_DESCRIPTION_MAX,\n COMMUNITY_NAME_MAX,\n COMMUNITY_NAME_MIN,\n COMMUNITY_RULE_MAX,\n COMMUNITY_RULES_MAX,\n COMMUNITY_SUGGESTION_WHY_MAX,\n CONTRIBUTION_LEADERBOARD_SIZE,\n CONTRIBUTION_PAIR_POINTS_MAX,\n CONTRIBUTION_PAIR_WINDOW_DAYS,\n CONTRIBUTION_RECENT_DAYS,\n COUNTRY_MAX,\n COUPON_CODE_MAX,\n COUPON_CODE_MIN,\n COUPON_LABEL_MAX,\n COUPON_LABEL_MIN,\n COUPON_PERCENT_MAX,\n COUPON_PERCENT_MIN,\n COUPON_USES_MAX,\n CURSOR_MAX,\n DASHBOARD_RECENT_DAYS,\n DAY_MS,\n DISCOVER_FILTER_VALUES_MAX,\n DISCOVER_TEXT_MAX,\n DISPLAY_NAME_MAX,\n ERASURE_RETENTION_DAYS,\n FOUNDED_YEAR_MIN,\n GEO_ACCURACY_MAX_M,\n GEO_PRECISE_ACCURACY_M,\n GEO_SYNC_ACCURACY_MAX_M,\n GOALS_MIN,\n GSTIN_LENGTH,\n HEADLINE_MAX,\n INDIA_TIME_ZONE,\n INDIA_UTC_OFFSET_MS,\n INVOICE_NUMBER_MAX,\n LINK_URL_MAX,\n LOCALITY_PAGE_SIZE,\n LOCALITY_SKIP_MAX,\n LOCATION_HISTORY_MAX,\n LOCATION_HISTORY_MAX_DAYS,\n MEDIA_ALT_MAX,\n MEDIA_MAX_INPUT_PIXELS,\n MEDIA_PENDING_MAX,\n MEDIA_PLACEHOLDER_MAX,\n MEDIA_UNATTACHED_TTL_HOURS,\n MEMBER_SEARCH_MAX,\n MODERATION_EXCERPT_MAX,\n MODERATION_NOTE_MAX,\n NOTIFICATION_EXCERPT_MAX,\n NOTIFICATION_RETENTION_DAYS,\n ONBOARDING_DRAFT_RETENTION_DAYS,\n ORDER_TTL_MINUTES,\n PAGE_SIZE_DEFAULT,\n PAGE_SIZE_MAX,\n PLAN_AHEAD_MAX_YEARS,\n PLAN_REMINDER_DAYS,\n PRODUCT_ASK_OPEN_DAYS,\n PRODUCT_CAPTION_MAX,\n PRODUCT_DESCRIPTION_MAX,\n PRODUCT_NAME_MAX,\n PRODUCT_SCREENSHOTS_MAX,\n PRODUCT_TAGLINE_MAX,\n PRODUCT_TEAM_SHOWN,\n PRODUCTS_LIVE_SAFETY_MAX,\n RATING_MAX,\n RATING_MIN,\n RAZORPAY_EVENT_RETENTION_DAYS,\n RAZORPAY_ID_MAX,\n RAZORPAY_SIGNATURE_MAX,\n REFUND_WINDOW_DAYS,\n RENEWAL_GRACE_DAYS,\n REPORT_NOTE_MAX,\n REVIEW_AVERAGE_MIN_COUNT,\n REVIEW_HELPFUL_POINTS_MAX,\n REVIEW_REPLY_MAX,\n REVIEW_TEXT_MAX,\n REVIEW_TEXT_MIN,\n refundWindowEndsAt,\n SAVED_REPLIES_MAX,\n SAVED_REPLY_BODY_MAX,\n SAVED_REPLY_TITLE_MAX,\n SKILLS_MAX,\n STATE_MAX,\n SUSPENSION_REASON_MAX,\n SUSPENSION_REASON_MIN,\n TEAM_SIZE_MAX,\n TEAM_SIZE_MIN,\n TICKET_MESSAGE_MAX,\n TICKET_MESSAGES_MAX,\n TICKET_SUBJECT_MAX,\n TICKET_SUBJECT_MIN,\n UPLOAD_MAX_BYTES,\n VENTURE_NAME_MAX,\n VENTURE_TAGLINE_MAX,\n} from './core/limits.js';\n// ─── Money as people read it (0.18.0) ────────────────────────────────────────\nexport { keptPaise, refundLeftPaise, rupees } from './core/money.js';\n// ─── Response envelopes ──────────────────────────────────────────────────────\nexport {\n type ApiError,\n type ApiErrorDetails,\n apiErrorDetailsSchema,\n apiErrorSchema,\n type ErrorResponse,\n errorResponseSchema,\n type IdResponse,\n idResponseSchema,\n paginatedSchema,\n type QueryArgs,\n successResponseSchema,\n} from './core/responses.js';\n// ─── Validation: message keys and the wire shape of a failure ───────────────\nexport {\n REQUEST_PART_VALUES,\n type RequestPart,\n requestPartSchema,\n toValidationIssues,\n VALIDATION_MESSAGE,\n type ValidationIssue,\n type ValidationMessageKey,\n validationIssueSchema,\n} from './core/validation.js';\n// ─── Account ─────────────────────────────────────────────────────────────────\nexport {\n type DeleteAccountResponse,\n deleteAccountResponseSchema,\n} from './domains/account/account.js';\nexport {\n AUDIT_ACTION_VALUES,\n type AuditAction,\n type AuditActor,\n type AuditEntry,\n type AuditPage,\n auditActionSchema,\n auditActorSchema,\n auditEntrySchema,\n auditPageSchema,\n} from './domains/audit/audit.js';\n// ─── Billing: buying, paying, invoices, refunds, coupons (0.12.0) ───────────\nexport {\n type AppliedCoupon,\n // Auto-renewal (0.31.0, payments v2)\n type AutoRenewalParams,\n type AutoRenewalState,\n type AutoRenewTerms,\n appliedCouponSchema,\n autoRenewalParamsSchema,\n autoRenewalStateSchema,\n autoRenewTermsSchema,\n type BillingDetails,\n billingDetailsSchema,\n COUPON_KIND_VALUES,\n COUPON_TARGET_VALUES,\n type ConfirmAutoRenewalBody,\n type ConfirmOrderBody,\n type Coupon,\n type CouponBenefit,\n type CouponKind,\n type CouponList,\n type CouponParams,\n type CouponTarget,\n type CreateCouponBody,\n type CreateOrderBody,\n type CreateOrderResponse,\n type CreditNote,\n confirmAutoRenewalBodySchema,\n confirmOrderBodySchema,\n couponBenefitSchema,\n couponCodeSchema,\n couponListSchema,\n couponParamsSchema,\n couponSchema,\n couponTargetSchema,\n createCouponBodySchema,\n createOrderBodySchema,\n createOrderResponseSchema,\n creditNoteSchema,\n GRANT_FAILURE_VALUES,\n type GrantFailure,\n GST_RATE_PERCENT,\n GST_STATE_CODE_VALUES,\n GST_STATES,\n type GstStateCode,\n grantFailureSchema,\n gstinChecksumValid,\n gstinSchema,\n gstStateCodeOf,\n gstStateCodeSchema,\n gstStateName,\n INVOICE_KIND_VALUES,\n type Invoice,\n type InvoiceKind,\n type InvoiceParty,\n invoiceKindSchema,\n invoicePartySchema,\n invoiceSchema,\n ORDER_SOURCE_VALUES,\n ORDER_STATUS_VALUES,\n type OrderParams,\n type OrderSource,\n type OrderState,\n type OrderStatus,\n orderParamsSchema,\n orderSourceSchema,\n orderStateSchema,\n orderStatusSchema,\n type Payer,\n type PaymentDetail,\n type PaymentMethodUpdate,\n type PaymentPage,\n type PaymentSummary,\n type PlanEffect,\n PURCHASE_KIND_VALUES,\n type PurchaseItem,\n type PurchaseKind,\n payerSchema,\n paymentDetailSchema,\n paymentMethodUpdateSchema,\n paymentPageSchema,\n paymentSummarySchema,\n planEffectSchema,\n purchaseItemSchema,\n type Quote,\n type QuoteBody,\n quoteBodySchema,\n quoteSchema,\n type RefundPaymentBody,\n refundPaymentBodySchema,\n type SetMembershipBody,\n type StaffPaymentDetail,\n type StaffPaymentPage,\n type StaffPaymentSummary,\n type StaffPaymentsQuery,\n type StaffPaymentsQueryInput,\n type StartAutoRenewalBody,\n setMembershipBodySchema,\n staffPaymentDetailSchema,\n staffPaymentPageSchema,\n staffPaymentSummarySchema,\n staffPaymentsQuerySchema,\n startAutoRenewalBodySchema,\n type TaxSplit,\n taxSplitSchema,\n type UpdateCouponBody,\n updateCouponBodySchema,\n} from './domains/billing/billing.js';\nexport {\n AUTO_RENEW_STOP_REASON_VALUES,\n type AutoRenewStopReason,\n autoRenewStopReasonSchema,\n FC_EMAIL_DATA_SCHEMAS,\n FC_EMAIL_TEMPLATE_VALUES,\n type FcEmailData,\n type FcEmailTemplate,\n fcAutoRenewStoppedEmailSchema,\n fcPaymentReceivedEmailSchema,\n fcPlanEndsSoonEmailSchema,\n fcPlanRenewsSoonEmailSchema,\n fcRefundProcessedEmailSchema,\n fcRenewalDoneEmailSchema,\n fcRenewalFailedEmailSchema,\n} from './domains/billing/emails.js';\nexport {\n PAYMENT_METHOD_TEXT_MAX,\n PAYMENT_METHOD_VALUES,\n type PaymentMethod,\n type PaymentMethodSnapshot,\n paymentMethodSchema,\n paymentMethodSnapshotSchema,\n} from './domains/billing/payment-method.js';\n// ─── Blocking a member (2026-11-23) ─────────────────────────────────────────\nexport {\n BLOCKS_MAX,\n type BlockAnswer,\n type BlockedMember,\n type BlockedPage,\n type BlockTargetParams,\n blockAnswerSchema,\n blockedMemberSchema,\n blockedPageSchema,\n blockTargetParamsSchema,\n} from './domains/blocks/blocks.js';\n// ─── Chat ────────────────────────────────────────────────────────────────────\nexport {\n CHAT_OPENED_VIA_VALUES,\n CHAT_PRODUCT_ID,\n CHAT_REACH_VALUES,\n CHAT_SOCKET_REAUTH_SECONDS,\n CHAT_TOKEN_REFRESH_MARGIN_SECONDS,\n type ChatAuthToken,\n type ChatConfig,\n type ChatOpenedVia,\n type ChatParticipant,\n type ChatParticipantsBody,\n type ChatParticipantsResponse,\n type ChatProductId,\n type ChatReach,\n type ChatReachKind,\n type ChatReachParams,\n chatAuthTokenSchema,\n chatConfigSchema,\n chatOpenedViaSchema,\n chatParticipantSchema,\n chatParticipantsBodySchema,\n chatParticipantsResponseSchema,\n chatProductIdSchema,\n chatReachKindSchema,\n chatReachParamsSchema,\n chatReachSchema,\n DIRECT_CONTACT_STATUS_VALUES,\n type DirectContactStatus,\n directContactStatusSchema,\n MESSAGE_FROM_VALUES,\n type MessageFrom,\n type MessagingSettings,\n messageFromSchema,\n messagingSettingsSchema,\n type OpenChatBody,\n type OpenChatResponse,\n openChatBodySchema,\n openChatResponseSchema,\n} from './domains/chat/chat.js';\n// ─── Communities: official spaces, their members and suggestions (0.9.0) ────\nexport {\n type BanCommunityMemberBody,\n banCommunityMemberBodySchema,\n COMMUNITY_ANNOUNCE_INTERVAL_MS,\n COMMUNITY_MEMBER_STATUS_VALUES,\n COMMUNITY_PINS_MAX,\n COMMUNITY_ROLE_VALUES,\n COMMUNITY_STATUS_VALUES,\n COMMUNITY_SUGGESTION_DECISION_VALUES,\n COMMUNITY_SUGGESTION_STATUS_VALUES,\n COMMUNITY_SUGGESTIONS_OPEN_MAX,\n COMMUNITY_TOPICS_MAX,\n COMMUNITY_VISIBILITY_RANK,\n COMMUNITY_VISIBILITY_VALUES,\n type Community,\n type CommunityBan,\n type CommunityBanPage,\n type CommunityCard,\n type CommunityCardPage,\n type CommunityCardViewer,\n type CommunityChip,\n type CommunityCommentParams,\n type CommunityContentParams,\n type CommunityDiscoverQuery,\n type CommunityDiscoverQueryInput,\n type CommunityInvite,\n type CommunityInvites,\n type CommunityMember,\n type CommunityMemberPage,\n type CommunityMemberParams,\n type CommunityMemberStatus,\n type CommunityMembersQuery,\n type CommunityMembersQueryInput,\n type CommunityParams,\n type CommunityPendingInvite,\n type CommunityPendingInvitePage,\n type CommunityRequest,\n type CommunityRequestPage,\n type CommunityRole,\n type CommunityStatus,\n type CommunitySuggestion,\n type CommunitySuggestionDecision,\n type CommunitySuggestionPage,\n type CommunitySuggestionParams,\n type CommunitySuggestionStatus,\n type CommunitySuggestionsQuery,\n type CommunitySuggestionsQueryInput,\n type CommunityViewer,\n type CommunityVisibility,\n type CreateCommunityBody,\n type CreateCommunitySuggestionBody,\n communityBanPageSchema,\n communityBanSchema,\n communityCardPageSchema,\n communityCardSchema,\n communityCardViewerSchema,\n communityChangeExposes,\n communityChipSchema,\n communityCommentParamsSchema,\n communityContentParamsSchema,\n communityDiscoverQuerySchema,\n communityInviteSchema,\n communityInvitesSchema,\n communityMemberPageSchema,\n communityMemberParamsSchema,\n communityMemberSchema,\n communityMemberStatusSchema,\n communityMembersQuerySchema,\n communityParamsSchema,\n communityPendingInvitePageSchema,\n communityPendingInviteSchema,\n communityRequestPageSchema,\n communityRequestSchema,\n communityRoleSchema,\n communitySchema,\n communityStatusSchema,\n communitySuggestionDecisionSchema,\n communitySuggestionPageSchema,\n communitySuggestionParamsSchema,\n communitySuggestionSchema,\n communitySuggestionStatusSchema,\n communitySuggestionsQuerySchema,\n communityTypeChangeAllowed,\n communityViewerSchema,\n communityVisibilitySchema,\n createCommunityBodySchema,\n createCommunitySuggestionBodySchema,\n type DeclineCommunitySuggestionBody,\n declineCommunitySuggestionBodySchema,\n type InviteCommunityMemberBody,\n inviteCommunityMemberBodySchema,\n type PinCommunityContentBody,\n pinCommunityContentBodySchema,\n type SetCommunityIconBody,\n type SetCommunityMemberRoleBody,\n type SetCommunityStatusBody,\n type SetCommunityVisibilityBody,\n setCommunityIconBodySchema,\n setCommunityMemberRoleBodySchema,\n setCommunityStatusBodySchema,\n setCommunityVisibilityBodySchema,\n type UpdateCommunityBody,\n updateCommunityBodySchema,\n} from './domains/communities/communities.js';\n// ─── Contribution: the help a member gives, recognised ───────────────────────\nexport {\n COMMENT_UPVOTE_MILESTONE,\n CONTENT_UPVOTE_MILESTONE,\n CONTRIBUTION_AWARDED_KIND_VALUES,\n CONTRIBUTION_KIND_VALUES,\n CONTRIBUTION_PERIOD_VALUES,\n CONTRIBUTION_POINTS,\n CONTRIBUTION_SOURCE_VALUES,\n type ContributionEntry,\n type ContributionKind,\n type ContributionLeaderboard,\n type ContributionLeaderboardQuery,\n type ContributionLeaderEntry,\n type ContributionPage,\n type ContributionPeriod,\n type ContributionSource,\n type ContributionYou,\n contributionEntrySchema,\n contributionKindSchema,\n contributionLeaderboardQuerySchema,\n contributionLeaderboardSchema,\n contributionLeaderEntrySchema,\n contributionPageSchema,\n contributionPeriodSchema,\n contributionSourceSchema,\n contributionYouSchema,\n} from './domains/contributions/contributions.js';\n// ─── Staff: overview, members, moderation, support, the team, the audit log ─\nexport { type Dashboard, dashboardSchema } from './domains/dashboard/dashboard.js';\n// ─── Discover ────────────────────────────────────────────────────────────────\nexport {\n DISCOVER_SHOW_VALUES,\n type DiscoverFacets,\n type DiscoverPage,\n type DiscoverQuery,\n type DiscoverQueryInput,\n type DiscoverShow,\n discoverFacetsSchema,\n discoverPageSchema,\n discoverQuerySchema,\n discoverShowSchema,\n} from './domains/discover/discover.js';\n// ─── Feed: post, poll, comment, reaction ─────────────────────────────────────\n// Feed parity with Jansathi (2026-11-23): closing a poll early, results after\n// it closes, the comment thread's order.\nexport {\n type AttachedMedia,\n type AuthorParams,\n attachedMediaSchema,\n authorParamsSchema,\n type CastVoteBody,\n type CastVoteResponse,\n type ClosePollResponse,\n COMMENT_MAX_BODY_CHARS,\n COMMENT_SORT_VALUES,\n CONTENT_KIND_VALUES,\n CONTENT_MEDIA_KIND_VALUES,\n type CommentHelpfulResponse,\n type CommentPage,\n type CommentParams,\n type CommentSort,\n type CommentsQuery,\n type CommentsQueryInput,\n type CommunityFeedQuery,\n type ContentKind,\n type ContentMediaKind,\n type ContentParams,\n type ContentTargetParams,\n type ContentViewerState,\n type CreateCommentBody,\n type CreatePollBody,\n type CreatePostBody,\n type CreateReportBody,\n type CreateReportResponse,\n type CreateRepostBody,\n castVoteBodySchema,\n castVoteResponseSchema,\n closePollResponseSchema,\n commentHelpfulResponseSchema,\n commentPageSchema,\n commentParamsSchema,\n commentSortSchema,\n commentsQuerySchema,\n communityFeedQuerySchema,\n contentKindSchema,\n contentMediaKindSchema,\n contentParamsSchema,\n contentTargetParamsSchema,\n contentViewerStateSchema,\n createCommentBodySchema,\n createPollBodySchema,\n createPostBodySchema,\n createReportBodySchema,\n createReportResponseSchema,\n createRepostBodySchema,\n EDIT_WINDOW_MS,\n ENGAGEMENT_TARGET_KIND_VALUES,\n type EngagementTargetKind,\n type EngagementTargetParams,\n engagementTargetKindSchema,\n engagementTargetParamsSchema,\n FEED_SECTION_VALUES,\n FEED_SORT_VALUES,\n type FeedAuthor,\n type FeedComment,\n type FeedImage,\n type FeedItem,\n type FeedItemParams,\n type FeedMedia,\n type FeedPage,\n type FeedPoll,\n type FeedPost,\n type FeedQuery,\n type FeedQueryInput,\n type FeedSection,\n type FeedSort,\n feedAuthorSchema,\n feedCommentSchema,\n feedImageSchema,\n feedItemParamsSchema,\n feedItemSchema,\n feedMediaSchema,\n feedPageSchema,\n feedPollSchema,\n feedPostSchema,\n feedQuerySchema,\n feedSectionSchema,\n feedSortSchema,\n HOME_FEED_SORT_VALUES,\n HOT_WINDOW_DAYS,\n type HomeFeedSort,\n homeFeedSortSchema,\n MAX_TOPICS,\n type PickableReaction,\n type PinnedItems,\n POLL_MAX_DURATION_MS,\n POLL_MAX_OPTIONS,\n POLL_MIN_DURATION_MS,\n POLL_MIN_OPTIONS,\n POLL_OPTION_MAX_CHARS,\n POLL_QUESTION_MAX_CHARS,\n POLL_RESULTS_VISIBILITY_VALUES,\n POST_MAX_BODY_CHARS,\n POST_MAX_MEDIA,\n type PollOption,\n type PollParams,\n type PollResultsVisibility,\n type ProductFeedbackItem,\n type ProductFeedbackPage,\n pickableReactionSchema,\n pinnedItemsSchema,\n pollOptionSchema,\n pollParamsSchema,\n pollResultsVisibilitySchema,\n postHasContent,\n productFeedbackItemSchema,\n productFeedbackPageSchema,\n RANKED_FEED_WINDOW_DAYS,\n REACTION_PICKER_VALUES,\n REACTION_TYPE_VALUES,\n REPORT_REASON_VALUES,\n REPORT_STATUS_VALUES,\n REPORT_TARGET_KIND_VALUES,\n type ReactionCounts,\n type ReactionsQuery,\n type ReactionsQueryInput,\n type ReactionType,\n type Reactor,\n type ReactorPage,\n type ReportReason,\n type ReportStatus,\n type ReportTargetKind,\n type RepostedSource,\n reactionCountsSchema,\n reactionsQuerySchema,\n reactionTypeSchema,\n reactorPageSchema,\n reactorSchema,\n reportReasonSchema,\n reportTargetKindSchema,\n repostedSourceSchema,\n requiredTopicsSchema,\n SCORE_VOTE_VALUES,\n type ScoreVote,\n type SetReactionBody,\n type SetReactionResponse,\n type SetScoreVoteBody,\n type SetScoreVoteResponse,\n scoreVoteSchema,\n setReactionBodySchema,\n setReactionResponseSchema,\n setScoreVoteBodySchema,\n setScoreVoteResponseSchema,\n type ToggleBookmarkResponse,\n toggleBookmarkResponseSchema,\n type UpdateCommentBody,\n type UpdatePostBody,\n updateCommentBodySchema,\n updatePostBodySchema,\n type ViewerState,\n viewerStateSchema,\n} from './domains/feed/feed.js';\n// @mentions (2026-11-23).\nexport {\n extractMentions,\n findMentions,\n MENTION_MAX_PER_ITEM,\n MENTION_SUGGESTIONS_MAX,\n type Mention,\n type MentionSuggestions,\n type MentionSuggestionsQuery,\n type MentionToken,\n mentionSchema,\n mentionSuggestionsQuerySchema,\n mentionSuggestionsSchema,\n mentionsSchema,\n} from './domains/feed/mentions.js';\n// ─── Follows (2026-11-20) ────────────────────────────────────────────────────\nexport {\n type FollowAnswer,\n type FollowCounts,\n type FollowedBy,\n type FollowRelation,\n type FollowTargetParams,\n followAnswerSchema,\n followCountsSchema,\n followedBySchema,\n followRelationSchema,\n followTargetParamsSchema,\n MUTUALS_SAMPLE_SIZE,\n type Mutuals,\n mutualsSchema,\n type PersonCard,\n type PersonPage,\n personCardSchema,\n personPageSchema,\n} from './domains/follows/follows.js';\n// ─── Plans v1: insights, profile views, visibility, featured (0.32.0) ──────\nexport {\n INSIGHTS_RANGE_VALUES,\n type InsightDay,\n type InsightsQuery,\n type InsightsQueryInput,\n insightDaySchema,\n insightsQuerySchema,\n type ProductInsights,\n type ProfileViewer,\n type ProfileViews,\n type ProfileViewsQuery,\n type ProfileViewsQueryInput,\n productInsightsSchema,\n profileViewerSchema,\n profileViewsQuerySchema,\n profileViewsSchema,\n type RecordViewBody,\n recordViewBodySchema,\n VIEW_RETENTION_DAYS,\n VIEW_SOURCE_VALUES,\n VISIBILITY_SETTINGS_DEFAULT,\n type ViewSource,\n type VisibilitySettings,\n viewSourceSchema,\n visibilitySettingsSchema,\n} from './domains/insights/insights.js';\n// ─── Location: the area tree, the declared location, the GPS axis (0.19.0) ──\nexport {\n AREA_TYPE_VALUES,\n type AreaList,\n type AreaOption,\n type AreaPage,\n type AreaType,\n areaListSchema,\n areaOptionSchema,\n areaPageSchema,\n areaTypeSchema,\n areaWords,\n type ClearLocationHistoryResult,\n clearLocationHistoryResultSchema,\n type DistrictsQuery,\n districtsQuerySchema,\n type GeolocationFix,\n type GeolocationSyncResult,\n geolocationFixSchema,\n geolocationSyncResultSchema,\n LOCALITY_AREA_TYPES,\n LOCALITY_TYPE_LABEL,\n LOCATION_HISTORY_KIND_VALUES,\n type LocalitiesQuery,\n type LocalitiesQueryInput,\n type LocalityAreaType,\n type LocationHistoryKind,\n type LocationPick,\n type LocationSettings,\n localitiesQuerySchema,\n locationHistoryKindSchema,\n locationPickSchema,\n locationSettingsSchema,\n type Place,\n pickOfPlace,\n placeSchema,\n placeWords,\n type UpdateLocationSettingsBody,\n URBAN_BODY_TYPE_VALUES,\n updateLocationSettingsBodySchema,\n} from './domains/location/areas.js';\n// ─── Location: India's states and cities (0.17.0) ───────────────────────────\nexport {\n CITY_ALIASES,\n canonicalCityName,\n canonicalIndiaLocation,\n findIndiaState,\n INDIA,\n INDIA_DIALING_CODE,\n INDIA_STATE_NAMES,\n INDIA_STATES,\n type IndiaState,\n type IndiaStateName,\n listedCityName,\n publicCityOf,\n STATE_ALIASES,\n townName,\n} from './domains/location/india.js';\n// ─── Media: what an uploaded image becomes ──────────────────────────────────\nexport {\n MEDIA_ATTACHMENT_KIND_VALUES,\n MEDIA_PURPOSE_VALUES,\n MEDIA_SIZES,\n MEDIA_STATUS_VALUES,\n MEDIA_UPLOAD_CONTENT_TYPES,\n MEDIA_VARIANTS_MAX,\n type MediaAttachmentKind,\n type MediaImage,\n type MediaPurpose,\n type MediaStatus,\n type MediaUploadContentType,\n type MediaVariant,\n mediaAttachmentKindSchema,\n mediaImageSchema,\n mediaPurposeSchema,\n mediaStatusSchema,\n mediaUploadContentTypeSchema,\n mediaVariantSchema,\n type UploadedMedia,\n uploadedMediaSchema,\n} from './domains/media/media.js';\nexport {\n MEMBER_STATUS_VALUES,\n type MemberDetail,\n type MemberDirectoryPage,\n type MemberDirectoryQuery,\n type MemberDirectoryQueryInput,\n type MemberParams,\n type MemberStatus,\n type MemberSummary,\n memberDetailSchema,\n memberDirectoryPageSchema,\n memberDirectoryQuerySchema,\n memberParamsSchema,\n memberStatusSchema,\n memberSummarySchema,\n type SuspendMemberBody,\n type Suspension,\n suspendMemberBodySchema,\n suspensionSchema,\n} from './domains/members/members.js';\n// ─── Membership and plans, as a member holds them (0.12.0) ──────────────────\nexport {\n AUTO_RENEWAL_RUNNING_VALUES,\n AUTO_RENEWAL_STATUS_VALUES,\n type AutoRenewal,\n type AutoRenewalStatus,\n addPlanPeriod,\n autoRenewalSchema,\n autoRenewalStatusSchema,\n EARLY_BIRD_UNTIL,\n earlyBirdOpen,\n FEATURED_KIND_VALUES,\n type FeaturedKind,\n FOUNDING_PLACES,\n featuredKindSchema,\n isEarlyBird,\n MEMBER_FEATURE_VALUES,\n MEMBER_LIMIT_VALUES,\n MEMBER_PROFILE_VIEW_COUNT_DAYS,\n MEMBERSHIP_END_REASON_VALUES,\n MEMBERSHIP_KIND_VALUES,\n MEMBERSHIP_PRICE_PAISE,\n MEMBERSHIP_STATUS_VALUES,\n type MeMembership,\n type Membership,\n type MembershipEndReason,\n type MembershipKind,\n type MembershipStatus,\n meMembershipSchema,\n membershipEndReasonSchema,\n membershipKindSchema,\n membershipSchema,\n membershipStatusSchema,\n type Paise,\n PLAN_PERIOD_VALUES,\n PLAN_SPECS,\n PLAN_TIER_RANK,\n PLAN_TIER_VALUES,\n type PlanBlock,\n type PlanCatalog,\n type PlanFeatures,\n type PlanLimits,\n type PlanOffer,\n type PlanPeriod,\n type PlanTier,\n paiseSchema,\n planBlockSchema,\n planCatalogSchema,\n planFeaturesSchema,\n planLimitsSchema,\n planOfferSchema,\n planPeriodSchema,\n planTierSchema,\n TAKES_PART_THROUGH_VALUES,\n type TakesPartThrough,\n UPGRADE_DAYS_PER_MONTH,\n UPGRADE_PER_DAY,\n UPGRADE_PER_MONTH,\n UPGRADE_PER_YEAR,\n upgradePrice,\n} from './domains/membership/membership.js';\nexport {\n MODERATION_ACTION_VALUES,\n MODERATION_ACTIONS_BY_TARGET_KIND,\n MODERATION_CONTEXT_KIND_VALUES,\n MODERATION_STATE_VALUES,\n type ModerationAction,\n type ModerationContentQuery,\n type ModerationContentQueryInput,\n type ModerationContextKind,\n type ModerationDecisionBody,\n type ModerationItem,\n type ModerationPage,\n type ModerationState,\n type ModerationTargetParams,\n moderationActionSchema,\n moderationContentQuerySchema,\n moderationContextKindSchema,\n moderationDecisionBodySchema,\n moderationItemSchema,\n moderationPageSchema,\n moderationStateSchema,\n moderationTargetParamsSchema,\n} from './domains/moderation/moderation.js';\n// ─── Notifications: the bell ─────────────────────────────────────────────────\nexport {\n NOTIFICATION_FILTER_VALUES,\n NOTIFICATION_KIND_VALUES,\n NOTIFICATION_PREFERENCE_OF,\n NOTIFICATION_PREFERENCE_VALUES,\n type Notification,\n type NotificationFilter,\n type NotificationKeyParams,\n type NotificationKind,\n type NotificationListQuery,\n type NotificationListQueryInput,\n type NotificationPage,\n type NotificationParams,\n type NotificationPreference,\n type NotificationPreferences,\n type NotificationUnreadCount,\n notificationFilterSchema,\n notificationKeyParamsSchema,\n notificationKindSchema,\n notificationListQuerySchema,\n notificationPageSchema,\n notificationParamsSchema,\n notificationPreferencesSchema,\n notificationSchema,\n notificationUnreadCountSchema,\n type SetNotificationHiddenBody,\n setNotificationHiddenBodySchema,\n type UpdateNotificationPreferencesBody,\n updateNotificationPreferencesBodySchema,\n} from './domains/notifications/notifications.js';\nexport {\n PUSH_DEVICE_LABEL_MAX,\n type PushPublicKey,\n type PushStatus,\n type PushSubscribeBody,\n type PushSubscriptionResult,\n pushPublicKeySchema,\n pushStatusSchema,\n pushSubscribeBodySchema,\n pushSubscriptionResultSchema,\n} from './domains/notifications/push.js';\n// ─── Onboarding ──────────────────────────────────────────────────────────────\nexport {\n ageInYears,\n type CompleteOnboardingBody,\n type CompleteOnboardingBodyInput,\n type CompleteOnboardingResponse,\n type ContactLinks,\n completeOnboardingBodySchema,\n completeOnboardingResponseSchema,\n contactLinksSchema,\n DATE_INPUT_MAX,\n type DateOfBirth,\n dateOfBirthBounds,\n dateOfBirthSchema,\n dateToIsoDate,\n EMPTY_ONBOARDING_VENTURE,\n FOUNDER_ONBOARDING_STEPS,\n GOAL_CATEGORIES,\n GOAL_CATEGORY_KEYS,\n type GoalCategory,\n type GoalCategoryKey,\n GUIDELINES_VERSION,\n GUIDELINES_VERSION_MAX,\n guidelinesVersionSchema,\n INTERESTS_MAX,\n INTERESTS_MIN,\n type IsoDate,\n interestsSchema,\n isoDateSchema,\n isoDateToDate,\n isRealIsoDate,\n isUnderAgeDateOfBirth,\n LEGACY_ONBOARDING_TOTAL_STEPS,\n LEGAL_STRUCTURE_VALUES,\n type LegalStructure,\n legacyProfessionalAnswers,\n legalStructureSchema,\n MAX_AGE_YEARS,\n MIN_AGE_YEARS,\n ONBOARDING_DRAFT_KEYS,\n ONBOARDING_STEP_FIELDS,\n ONBOARDING_STEP_KEYS,\n ONBOARDING_STEP_SCHEMAS,\n ONBOARDING_TOTAL_STEPS,\n type OnboardingDraft,\n type OnboardingDraftKey,\n type OnboardingField,\n type OnboardingForm,\n type OnboardingProgressUpdate,\n type OnboardingStatus,\n type OnboardingStepBody,\n type OnboardingStepConfig,\n type OnboardingStepKey,\n onboardingDraftKeySchema,\n onboardingDraftSchema,\n onboardingFormSchema,\n onboardingProgressUpdateSchema,\n onboardingStatusSchema,\n PHONE_INPUT_MAX,\n readOnboardingDraft,\n TEAM_SIZE_DIGITS_MAX,\n TOPIC_CATEGORIES,\n TOPIC_CATEGORY_KEYS,\n TOPIC_VALUES,\n type Topic,\n type TopicCategory,\n type TopicCategoryKey,\n teamSizeDigits,\n todayInIndia,\n topicSchema,\n} from './domains/onboarding/onboarding.js';\nexport {\n type CompleteOnboardingBodyCandidate,\n completeOnboardingBodyFrom,\n emptyOnboardingForm,\n foundedYearDigits,\n locationStarted,\n onboardingDraftForStep,\n ventureBodyFrom,\n ventureStarted,\n} from './domains/onboarding/onboarding-answers.js';\n// ─── A person, on every surface (0.20.0) ────────────────────────────────────\nexport {\n formerPerson,\n initialsOf,\n type Person,\n PLAN_BADGE_VALUES,\n type PlanBadge,\n personSchema,\n planBadgeSchema,\n} from './domains/people/person.js';\nexport {\n type CreateProductCommentBody,\n createProductCommentBodySchema,\n type ProductComment,\n type ProductCommentPage,\n type ProductCommentsQuery,\n type ProductCommentsQueryInput,\n type ProductCommentVoteResponse,\n productCommentPageSchema,\n productCommentSchema,\n productCommentsQuerySchema,\n productCommentVoteResponseSchema,\n type UpdateProductCommentBody,\n updateProductCommentBodySchema,\n} from './domains/products/product-comments.js';\nexport {\n FEATURED_ROW_MAX,\n type FeaturedProducts,\n type FeatureState,\n featuredProductsSchema,\n featureStateSchema,\n type ProductFeature,\n productFeatureSchema,\n} from './domains/products/product-featured.js';\n// ─── Products: what founders build, and the help around it ───────────────────\nexport {\n type CreateProductBody,\n createProductBodySchema,\n type InviteProductMemberBody,\n inviteProductMemberBodySchema,\n type MyProducts,\n missingForListing,\n myProductsSchema,\n PRODUCT_ASK_VALUES,\n PRODUCT_INVITABLE_ROLE_VALUES,\n PRODUCT_LINK_KEYS,\n PRODUCT_LISTING_REQUIREMENT_VALUES,\n PRODUCT_MEMBER_STATUS_VALUES,\n PRODUCT_PAUSED_BY_VALUES,\n PRODUCT_PLATFORM_VALUES,\n PRODUCT_SORT_VALUES,\n PRODUCT_STAGE_VALUES,\n PRODUCT_STATUS_VALUES,\n PRODUCT_TEAM_ROLE_VALUES,\n PRODUCT_TOPICS_MAX,\n PRODUCT_VISIBILITY_VALUES,\n type Product,\n type ProductAsk,\n type ProductCard,\n type ProductCardPage,\n type ProductChip,\n type ProductDiscoverQuery,\n type ProductDiscoverQueryInput,\n type ProductFacets,\n type ProductFeedbackQuery,\n type ProductFeedbackQueryInput,\n type ProductInvitableRole,\n type ProductInvite,\n type ProductInvites,\n type ProductLinkKey,\n type ProductLinks,\n type ProductListingRequirement,\n type ProductMemberParams,\n type ProductMemberStatus,\n type ProductParams,\n type ProductPausedBy,\n type ProductPendingInvite,\n type ProductPendingInvitePage,\n type ProductPlatform,\n type ProductRating,\n type ProductScreenshot,\n type ProductScreenshotInput,\n type ProductSort,\n type ProductStage,\n type ProductStatus,\n type ProductsByMemberParams,\n type ProductTeamMember,\n type ProductTeamPage,\n type ProductTeamRole,\n type ProductTester,\n type ProductTesterPage,\n type ProductUpvoteResponse,\n type ProductViewer,\n type ProductVisibility,\n productAskSchema,\n productCardPageSchema,\n productCardSchema,\n productCardViewerSchema,\n productChipSchema,\n productDiscoverQuerySchema,\n productFacetsSchema,\n productFeedbackQuerySchema,\n productInvitableRoleSchema,\n productInviteSchema,\n productInvitesSchema,\n productIsOnDiscover,\n productLinksReadSchema,\n productLinksSchema,\n productListingRequirementSchema,\n productMemberParamsSchema,\n productMemberStatusSchema,\n productParamsSchema,\n productPausedBySchema,\n productPendingInvitePageSchema,\n productPendingInviteSchema,\n productPlatformSchema,\n productRatingSchema,\n productSchema,\n productScreenshotInputSchema,\n productScreenshotSchema,\n productSortSchema,\n productStageSchema,\n productStatusSchema,\n productsByMemberParamsSchema,\n productTeamMemberSchema,\n productTeamPageSchema,\n productTeamRoleSchema,\n productTesterPageSchema,\n productTesterSchema,\n productUpvoteResponseSchema,\n productVideoUrlSchema,\n productViewerSchema,\n productVisibilitySchema,\n type SetProductLiveBody,\n type SetProductLogoBody,\n type SetProductMemberRoleBody,\n type SetProductScreenshotsBody,\n type SetProductStatusBody,\n type SetProductVisibilityBody,\n setProductLiveBodySchema,\n setProductLogoBodySchema,\n setProductMemberRoleBodySchema,\n setProductScreenshotsBodySchema,\n setProductStatusBodySchema,\n setProductVisibilityBodySchema,\n type TransferProductBody,\n transferProductBodySchema,\n type UpdateProductBody,\n updateProductBodySchema,\n} from './domains/products/products.js';\n// ─── Founder profile ─────────────────────────────────────────────────────────\nexport {\n CONTACT_VISIBILITY_AUDIENCE,\n CONTACT_VISIBILITY_FIELDS,\n type ContactVisibility,\n type ContactVisibilityField,\n type ContributionSummary,\n changesDiscoverCard,\n contactVisibilitySchema,\n contributionSummarySchema,\n FOUNDER_CARD_EDIT_FIELDS,\n FOUNDER_CARD_FIELDS,\n FOUNDER_LINK_KEYS,\n type FounderCard,\n type FounderCardField,\n type FounderLinkKey,\n type FounderLinks,\n type FounderProfile,\n founderCardSchema,\n founderLinksSchema,\n founderProfileSchema,\n type MemberByline,\n type MemberHandleParams,\n type MemberProfile,\n type MyPersonalDetails,\n memberBylineSchema,\n memberHandleParamsSchema,\n memberProfileSchema,\n myPersonalDetailsSchema,\n PROFILE_AUDIENCE_VALUES,\n type ProfileAudience,\n type PublicBirthday,\n publicBirthdaySchema,\n type SetAvatarBody,\n setAvatarBodySchema,\n type UpdateFounderProfileBody,\n type UpdateMyPersonalDetailsBody,\n type UpdatePhotoSettingsBody,\n type UpdateUsernameBody,\n USERNAME_UNAVAILABLE_REASON_VALUES,\n type UsernameAvailability,\n type UsernameAvailabilityQuery,\n type UsernameUnavailableReason,\n updateFounderProfileBodySchema,\n updateMyPersonalDetailsBodySchema,\n updatePhotoSettingsBodySchema,\n updateUsernameBodySchema,\n usernameAvailabilityQuerySchema,\n usernameAvailabilitySchema,\n VENTURE_KEYS,\n VENTURE_OPTIONAL_KEYS,\n VENTURE_ROLE_VALUES,\n type Venture,\n type VentureKey,\n type VentureRole,\n ventureRoleSchema,\n ventureRolesSchema,\n ventureSchema,\n ventureWriteSchema,\n} from './domains/profile/founder-profile.js';\n// ─── The member's own private answers (0.16.0) ───────────────────────────────\nexport {\n type MyBusiness,\n type MyInterests,\n type MyVenture,\n myBusinessSchema,\n myInterestsSchema,\n myVentureSchema,\n myVentureWriteSchema,\n type PutMyBusinessBody,\n type PutMyInterestsBody,\n putMyBusinessBodySchema,\n putMyInterestsBodySchema,\n} from './domains/profile/my-profile.js';\n// ─── Reviews: stars and words on a product ───────────────────────────────────\nexport {\n type CreateReviewBody,\n createReviewBodySchema,\n type ProductReview,\n productReviewSchema,\n REVIEW_SORT_VALUES,\n type ReviewHelpfulResponse,\n type ReviewPage,\n type ReviewParams,\n type ReviewRating,\n type ReviewReply,\n type ReviewReplyBody,\n type ReviewSort,\n type ReviewsQuery,\n type ReviewsQueryInput,\n type ReviewViewer,\n reviewHelpfulResponseSchema,\n reviewPageSchema,\n reviewParamsSchema,\n reviewRatingSchema,\n reviewReplyBodySchema,\n reviewReplySchema,\n reviewSortSchema,\n reviewsQuerySchema,\n reviewViewerSchema,\n type UpdateReviewBody,\n updateReviewBodySchema,\n} from './domains/reviews/reviews.js';\nexport {\n type CreateTicketBody,\n createTicketBodySchema,\n REFUND_ASK_CATEGORY,\n type ReplyTicketBody,\n replyTicketBodySchema,\n type SavedReply,\n type SavedReplyBody,\n type SavedReplyList,\n type SavedReplyParams,\n savedReplyBodySchema,\n savedReplyListSchema,\n savedReplyParamsSchema,\n savedReplySchema,\n TICKET_ASSIGNEE_FILTER_VALUES,\n TICKET_CATEGORY_VALUES,\n TICKET_CHANGE_VALUES,\n TICKET_SCOPE_VALUES,\n TICKET_SIDE_VALUES,\n TICKET_STATUS_VALUES,\n type TicketAssigneeFilter,\n type TicketCategory,\n type TicketChange,\n type TicketDetail,\n type TicketListQuery,\n type TicketListQueryInput,\n type TicketMessage,\n type TicketPage,\n type TicketParams,\n type TicketScope,\n type TicketSide,\n type TicketStatus,\n type TicketSummary,\n ticketAssigneeFilterSchema,\n ticketCategorySchema,\n ticketDetailSchema,\n ticketListQuerySchema,\n ticketMessageSchema,\n ticketPageSchema,\n ticketParamsSchema,\n ticketScopeSchema,\n ticketSideSchema,\n ticketStatusSchema,\n ticketSummarySchema,\n} from './domains/support/support.js';\nexport {\n type SetMemberCapabilitiesBody,\n type SetMemberCapabilitiesResponse,\n type SetMemberRolesBody,\n type SetMemberRolesResponse,\n setMemberCapabilitiesBodySchema,\n setMemberCapabilitiesResponseSchema,\n setMemberRolesBodySchema,\n setMemberRolesResponseSchema,\n type TeamMember,\n type TeamMemberParams,\n type TeamPage,\n teamMemberParamsSchema,\n teamMemberSchema,\n teamPageSchema,\n} from './domains/team/team.js';\n// ─── Uploads: asking for a slot, completing it, discarding it ───────────────\nexport {\n UPLOAD_CONTENT_TYPES,\n UPLOAD_FILE_EXTENSIONS,\n type UploadFileExtension,\n type UploadParams,\n type UploadPresignBody,\n type UploadPresignResponse,\n uploadParamsSchema,\n uploadPresignBodySchema,\n uploadPresignResponseSchema,\n} from './domains/uploads/uploads.js';\n// ─── Waitlist: joining before the launch, and your place on it (0.15.0) ─────\nexport {\n type MyWaitlist,\n myWaitlistSchema,\n WAITLIST_REFUSAL_VALUES,\n type WaitlistPlace,\n type WaitlistRefusal,\n type WaitlistStatus,\n waitlistPlaceSchema,\n waitlistRefusalSchema,\n waitlistStatusSchema,\n} from './domains/waitlist/waitlist.js';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "founder-schema",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "Shared Zod schemas for Founder Circle — single source of truth for API contracts, validation, and TypeScript types (backend + web client + app client).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",