jansathi-community-schema 0.37.0 → 0.38.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.
- package/dist/crowdfunding.d.ts.map +1 -1
- package/dist/crowdfunding.js.map +1 -1
- package/dist/feed.d.ts +382 -3
- package/dist/feed.d.ts.map +1 -1
- package/dist/feed.js +85 -2
- package/dist/feed.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crowdfunding.d.ts","sourceRoot":"","sources":["../src/crowdfunding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,2PAwB/B,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,oEAM/B,CAAC;AACX,eAAO,MAAM,0BAA0B;;;;;;EAAuC,CAAC;AAC/E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,4DAM/B,CAAC;AACX,eAAO,MAAM,yBAAyB;;;;;;EAAuC,CAAC;AAC9E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;EAAuC,CAAC;AAC/E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B;;;iBASvC,CAAC;AACH,MAAM,MAAM,sBAA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,MAAM,oCAAoC;;;;;;;;iBAI/C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG;;;;;GAKG;AACH,eAAO,MAAM,sCAAsC;;;;;;;;iBAIjD,CAAC;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,sCAAsC,CAC9C,CAAC"}
|
package/dist/crowdfunding.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crowdfunding.js","sourceRoot":"","sources":["../src/crowdfunding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EACL,uCAAuC,EACvC,2CAA2C,EAC3C,kCAAkC,EAClC,kCAAkC,EAClC,6BAA6B,EAC7B,8BAA8B,EAC9B,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,yBAAyB,EACzB,uCAAuC,EACvC,uCAAuC,EACvC,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,SAAS;IACT,WAAW;IACX,aAAa;IACb,eAAe;IACf,WAAW;IACX,UAAU;IACV,UAAU;IACV,OAAO;IACP,OAAO;IACP,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,cAAc;IACd,kBAAkB;IAClB;;;;;OAKG;IACH,mBAAmB;IACnB,OAAO;CACC,CAAC;AAEX;;;;;;GAMG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AE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CAC7B,CAAC,CAAC;AAGH,8EAA8E;AAE9E,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACtD,KAAK,EAAE,+BAA+B,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACtD,KAAK,EAAE,+BAA+B,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC","sourcesContent":["/**\n * Community crowdfunding wire shapes.\n *\n * A crowdfunding campaign is a verified civic fundraiser surfaced in\n * the feed alongside posts / polls / lost-found / voice-box / donate-\n * item. The model is:\n *\n * 1. Creator drafts a campaign, fills bank + UPI QR + identity tier\n * based on the goal amount, picks an area scope.\n * 2. A leader at the matching scope (or any leader higher up the\n * hierarchy) reviews and approves OR rejects with reason.\n * Approved campaigns transition to ACTIVE and appear in the feed.\n * 3. Donors view the card, tap \"Donate\", pay externally via UPI\n * directly to the creator's bank — the platform never sees the\n * money. After paying, the donor self-attests amount + uploads a\n * receipt screenshot (optional). Without a screenshot the\n * donation enters PENDING state — the donor can upload the\n * receipt later (anytime, from settings → My Donations).\n * 4. The live progress bar shows ONLY verified amount (receipt\n * uploaded). Pending donations are counted separately and\n * surfaced as a secondary \"₹X pending receipt\" note. This is the\n * product decision: the visible progress reflects trust-grounded\n * money, not claims.\n *\n * Privacy: bank account number, IFSC, PAN, Aadhaar last-4, and\n * supporting documents are NEVER on the wire. Only `bankAccountLast4`,\n * `bankAccountHolderName`, and a UPI QR URL surface to donors.\n *\n * @module community-schema/crowdfunding\n */\n\nimport { z } from 'zod';\nimport { areaLineageSnapshotSchema } from './area.js';\nimport {\n CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS,\n CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS,\n CROWDFUNDING_DESCRIPTION_MAX_CHARS,\n CROWDFUNDING_DESCRIPTION_MIN_CHARS,\n CROWDFUNDING_MAX_DONATION_INR,\n CROWDFUNDING_MAX_DURATION_DAYS,\n CROWDFUNDING_MAX_GOAL_INR,\n CROWDFUNDING_MAX_IMAGES,\n CROWDFUNDING_MAX_PROOF_DOCS,\n CROWDFUNDING_MAX_SUPPORTING_DOCS,\n CROWDFUNDING_MIN_DURATION_DAYS,\n CROWDFUNDING_MIN_GOAL_INR,\n CROWDFUNDING_REJECTION_REASON_MAX_CHARS,\n CROWDFUNDING_REJECTION_REASON_MIN_CHARS,\n CROWDFUNDING_TITLE_MAX_CHARS,\n CROWDFUNDING_TITLE_MIN_CHARS,\n} from './constants.js';\nimport { voteValueSchema } from './engagement.js';\nimport { postAuthorSnapshotSchema } from './post.js';\n\n// ─── Enums ─────────────────────────────────────────────────────────────────\n\n/**\n * Top-level categories — drives the chip + icon on the card and the\n * verifier's per-category supporting-doc requirements (medical needs\n * hospital invoice; education needs admission letter; etc.).\n */\nexport const CROWDFUNDING_CATEGORY_VALUES = [\n 'medical',\n 'maternity',\n 'senior_care',\n 'special_needs',\n 'education',\n 'memorial',\n 'disaster',\n 'civic',\n 'faith',\n 'sports_talent',\n 'animal_welfare',\n 'environment',\n 'legal_aid',\n 'arts_culture',\n 'self_improvement',\n /**\n * Startup / prototype building — distinct from `self_improvement`\n * (which is now strictly skill / coursework). Covers MVP builds,\n * tooling, initial inventory, working capital, registration fees,\n * marketing for genuine first-stage entrepreneurs.\n */\n 'startup_prototype',\n 'other',\n] as const;\n\n/**\n * Who the campaign is for — drives the relation chip set and the\n * organization-specific identity asks on the composer. Captured so the\n * verifier can match the campaign narrative to the supporting docs\n * (e.g. an `organization` audience should produce 12A / 80G papers,\n * not a personal hospital bill).\n */\nexport const CROWDFUNDING_AUDIENCE_VALUES = [\n 'self',\n 'family',\n 'friend',\n 'community',\n 'organization',\n] as const;\nexport const crowdfundingAudienceSchema = z.enum(CROWDFUNDING_AUDIENCE_VALUES);\nexport type CrowdfundingAudience = z.infer<typeof crowdfundingAudienceSchema>;\n\n/**\n * Org-registration class — only meaningful when `audience ===\n * 'organization'`. Drives the verifier's expected document set\n * (12A/80G for trust, FCRA-style papers for NGO, etc.).\n */\nexport const CROWDFUNDING_ORG_KIND_VALUES = [\n 'ngo',\n 'trust',\n 'society',\n 'section_8',\n 'other',\n] as const;\nexport const crowdfundingOrgKindSchema = z.enum(CROWDFUNDING_ORG_KIND_VALUES);\nexport type CrowdfundingOrgKind = z.infer<typeof crowdfundingOrgKindSchema>;\nexport const crowdfundingCategorySchema = z.enum(CROWDFUNDING_CATEGORY_VALUES);\nexport type CrowdfundingCategory = z.infer<typeof crowdfundingCategorySchema>;\n\n/**\n * Visibility — where the campaign appears.\n *\n * v0.34 dropped the per-campaign area scope entirely. Instead the\n * creator picks one or more communities they're a member of, AND/OR\n * flips a \"show in global feed\" toggle. The campaign appears in those\n * surfaces and ONLY those surfaces (no geographic cascade).\n *\n * communityIds list of community ids the campaign is published into.\n * Empty array means \"no community-scoped publication\".\n * includesGlobal when true the campaign also appears in the global\n * feed (cross-community discovery surface).\n *\n * The Zod schema enforces at-least-one-publication at parse time so a\n * caller can't accidentally create an orphan campaign. The composer's\n * VisibilityPicker enforces the same on the UI side.\n *\n * HotScore (already present on the model) drives RANKING within these\n * feeds. The recompute job runs every few minutes and the higher-\n * scoring campaigns surface to the top of each feed surface they\n * appear in.\n */\n/**\n * v0.36: the global feed is ALWAYS selected. A campaign is implicitly\n * published to the global home feed, and the creator can optionally\n * additionally pick communities they're a member of to also publish\n * into. `includesGlobal` is kept on the wire shape for forward\n * compatibility but is forced to `true` at parse time — the creator\n * doesn't see a toggle in the composer.\n */\nexport const crowdfundingVisibilitySchema = z.object({\n communityIds: z.array(z.string()).default([]),\n includesGlobal: z\n .boolean()\n .default(true)\n // Force to true regardless of input. The field stays on the wire\n // so consumers can still pivot UI based on it (e.g. legacy rows\n // that explicitly opted out are still readable).\n .transform(() => true),\n});\nexport type CrowdfundingVisibility = z.infer<typeof crowdfundingVisibilitySchema>;\n\n/**\n * Lifecycle state.\n *\n * draft creator is filling the composer\n * submitted creator has accepted T&C and submitted; sits in\n * the area-leader verifier queue\n * awaiting_bank_link area leader has approved; creator must complete\n * Razorpay Linked Account KYC before the campaign\n * goes live. Inserted between `submitted` and\n * `active` so the post-approval payment-setup gate\n * is a first-class state, not a flag-on-active. A\n * `bankLinkDeadlineAt` countdown auto-reverts the\n * campaign to `rejected` if KYC isn't completed\n * in time.\n * rejected area leader rejected, OR bank-link deadline\n * passed, OR Razorpay KYC failed permanently.\n * Creator can edit + resubmit.\n * active publishable in the feed; donations open\n * closed_* terminal end-states with different reasons\n */\nexport const CROWDFUNDING_STATUS_VALUES = [\n 'draft',\n 'submitted',\n 'awaiting_bank_link',\n 'rejected',\n 'active',\n 'closed_success',\n 'closed_timeout',\n 'closed_by_creator',\n] as const;\nexport const crowdfundingStatusSchema = z.enum(CROWDFUNDING_STATUS_VALUES);\nexport type CrowdfundingStatus = z.infer<typeof crowdfundingStatusSchema>;\n\n/**\n * Proof document types — drives the doc-picker UI in the composer's\n * Proof Documents step (added in v0.33) AND the verifier's per-category\n * expected-doc checklist. The composer narrows the picker by category;\n * the verifier sees the full list with the user-supplied type label so\n * they can match the doc to the cause narrative.\n *\n * Per-category required-minimum mapping lives in the composer (frontend)\n * and is enforced at submit by the backend. The set here is the union of\n * what the renderer can offer across categories; some types (e.g.\n * 12a_certificate) are only useful when audience === organization, and\n * the renderer hides them otherwise.\n */\nexport const CROWDFUNDING_PROOF_DOC_TYPE_VALUES = [\n // Medical\n 'hospital_bill',\n 'diagnosis_report',\n 'doctor_letter',\n 'prescription',\n 'insurance_denial',\n // Education\n 'admission_letter',\n 'fee_schedule',\n 'scholarship_letter',\n // Community / civic / supporter-backed\n 'supporters_signed_letter',\n 'project_proposal',\n 'beneficiaries_list',\n // Disaster\n 'relief_org_letter',\n 'affected_area_photos',\n 'government_notification',\n // Organization (when audience === 'organization')\n 'org_registration_certificate',\n 'certificate_12a',\n 'certificate_80g',\n 'certificate_fcra',\n // Generic / cross-cutting\n 'identity_proof',\n 'address_proof',\n 'photo',\n 'video',\n 'other',\n] as const;\nexport const crowdfundingProofDocTypeSchema = z.enum(CROWDFUNDING_PROOF_DOC_TYPE_VALUES);\nexport type CrowdfundingProofDocType = z.infer<typeof crowdfundingProofDocTypeSchema>;\n\n/**\n * Razorpay Linked Account onboarding state, mirrored onto the campaign.\n *\n * not_started - default; creator hasn't started bank-linking yet\n * created - linked account created via Razorpay API; KYC URL\n * has been issued to the creator\n * under_review - creator has submitted KYC; Razorpay is reviewing\n * (typically 1-3 business days)\n * activated - KYC approved; campaign moves to `active`\n * rejected - KYC rejected; creator must update documents and\n * retry\n * suspended - account was activated but later suspended (fraud,\n * ToS violation, etc.); campaign halted pending review\n */\nexport const CROWDFUNDING_RAZORPAY_ACCOUNT_STATUS_VALUES = [\n 'not_started',\n 'created',\n 'under_review',\n 'activated',\n 'rejected',\n 'suspended',\n] as const;\nexport const crowdfundingRazorpayAccountStatusSchema = z.enum(\n CROWDFUNDING_RAZORPAY_ACCOUNT_STATUS_VALUES,\n);\nexport type CrowdfundingRazorpayAccountStatus = z.infer<\n typeof crowdfundingRazorpayAccountStatusSchema\n>;\n\n/**\n * Per-donation verification state. `pending` = attested but no\n * receipt. `verified` = receipt uploaded (creator confirmation\n * optional). `disputed` = creator marked \"I didn't receive this\".\n * Only `verified` rolls into the campaign's `verifiedAmountInr`\n * which drives the visible progress bar.\n */\nexport const CROWDFUNDING_DONATION_STATE_VALUES = ['pending', 'verified', 'disputed'] as const;\nexport const crowdfundingDonationStateSchema = z.enum(CROWDFUNDING_DONATION_STATE_VALUES);\nexport type CrowdfundingDonationState = z.infer<typeof crowdfundingDonationStateSchema>;\n\n// v0.34 dropped the fee-billing mode types entirely. The new flow uses\n// a flat 5 % commission via Razorpay Route at donation-disbursement\n// time — there is no creator-side billing choice to capture.\n\n// ─── Sub-shapes ────────────────────────────────────────────────────────────\n\n/**\n * One stage of the two-leader verification flow. v0.35 split the old\n * single-stage `verification` block into TWO stages: `district` (the\n * district leader for the creator's district vets authenticity) and\n * `state` (the state leader for the creator's state cosigns). Both\n * stages must be `approved` before the campaign can move on to bank\n * linking. Either stage going to `rejected` is terminal for the\n * submission — the creator edits + resubmits, which resets both\n * stages back to `pending`.\n */\nexport const crowdfundingVerificationStageSchema = z.object({\n status: z.enum(['pending', 'approved', 'rejected']),\n /** The leader who acted on this stage (display name — live-joined\n * from User at projection time). */\n verifiedByDisplayName: z.string().optional(),\n verifiedByUserId: z.string().optional(),\n /** When the leader acted. Approved + rejected both stamp this. */\n verifiedAt: z.string().datetime().optional(),\n /** Required when `status === 'rejected'`. Why the leader said no. */\n rejectionReason: z.string().optional(),\n});\nexport type CrowdfundingVerificationStage = z.infer<typeof crowdfundingVerificationStageSchema>;\n\n/**\n * Two-stage verification block. Sequential: state leader can only act\n * after district leader has approved (the queue UI hides un-vetted\n * campaigns from the state queue). Either rejection sends the whole\n * campaign to `rejected` at the campaign level.\n */\nexport const crowdfundingVerificationSchema = z.object({\n district: crowdfundingVerificationStageSchema,\n state: crowdfundingVerificationStageSchema,\n});\nexport type CrowdfundingVerification = z.infer<typeof crowdfundingVerificationSchema>;\n\n/**\n * Public-facing payment surface — what the donor sees in the Donate\n * dialog. The full account number, IFSC, PAN, Aadhaar, supporting\n * docs etc. are kept server-side; only what's needed for the donor\n * to send money + recognise the recipient is exposed.\n *\n * In v0.33 the platform shifted from \"direct UPI to creator\" to\n * \"Razorpay Linked Account split-payment\", so every field on this\n * shape is now OPTIONAL — a Linked-Account campaign carries an\n * activated `razorpayLinkedAccountId` (on the campaign root) and\n * surfaces a Razorpay-hosted checkout, not a UPI QR. Legacy campaigns\n * created before v0.33 still carry these fields; the donor card\n * renders the QR + bank info when present, the Razorpay flow when not.\n */\nexport const crowdfundingPaymentSchema = z.object({\n /** GCS URL of the UPI QR code image uploaded by the creator. The\n * Donate dialog renders this for the donor to scan. */\n upiQrUrl: z.string().url().optional(),\n /** Optional VPA — lets the donor tap a one-tap UPI deep link\n * instead of scanning the QR. e.g. \"ravi@okhdfcbank\". */\n upiId: z.string().optional(),\n /** Last 4 digits of the bank account — shown to the donor as\n * reassurance (\"ending in ••1234\"). Full number never surfaces. */\n bankAccountLast4: z.string().length(4).optional(),\n /** Account holder's name — must match the verified author display\n * name (penny-drop + UDP cross-check at submission time). */\n bankAccountHolderName: z.string().optional(),\n /** Optional bank short name surfaced on the dialog. */\n bankName: z.string().optional(),\n});\nexport type CrowdfundingPayment = z.infer<typeof crowdfundingPaymentSchema>;\n\n/**\n * A single proof document attached by the creator. Multiple instances\n * carried in `proofDocuments` on the campaign; each one has its own\n * type label + free-text description so the verifier sees \"Hospital\n * bill: AIIMS Delhi, June 2026 — ₹1.2L\" not just \"doc-1.pdf\".\n */\nexport const crowdfundingProofDocumentWireSchema = z.object({\n /** GCS signed URL of the uploaded document. */\n url: z.string().url(),\n /** What kind of proof this is. Drives the verifier's per-category\n * expected-doc checklist. */\n type: crowdfundingProofDocTypeSchema,\n /** Creator's own one-line description of the document. Surfaced\n * next to the type label on the verifier surface so they can match\n * the doc to the campaign narrative without opening every PDF. */\n description: z.string().trim().min(3).max(200),\n /** When the upload completed. Useful for the verifier to see the\n * sequence of uploads. */\n uploadedAt: z.string().datetime(),\n});\nexport type CrowdfundingProofDocumentWire = z.infer<typeof crowdfundingProofDocumentWireSchema>;\n\n/**\n * Razorpay Linked Account surface mirrored onto the campaign. Set by\n * the post-approval bank-linking flow; absent while the campaign is in\n * `draft` / `submitted` / `rejected`.\n *\n * Only the STATUS metadata surfaces on the wire — the linked-account\n * id itself stays server-side (used to route disbursements via\n * Razorpay Route, never needed by clients).\n */\nexport const crowdfundingRazorpayAccountWireSchema = z.object({\n /** Current state of the linked-account onboarding. */\n status: crowdfundingRazorpayAccountStatusSchema,\n /** ISO timestamp of when the account moved to `activated`. The\n * campaign flips to `active` at this point. */\n activatedAt: z.string().datetime().nullable().optional(),\n /** Reason Razorpay rejected the KYC submission. Surfaced to the\n * creator so they can fix and retry. */\n rejectionReason: z.string().nullable().optional(),\n /** Razorpay-hosted KYC onboarding URL. Set when status moves to\n * `created`; the creator opens this in a webview to complete KYC. */\n onboardingUrl: z.string().url().nullable().optional(),\n /** Deadline for the creator to finish bank linking. After this\n * date a scheduled job reverts the campaign to `rejected` with a\n * \"bank link deadline missed\" reason. */\n deadlineAt: z.string().datetime().nullable().optional(),\n});\nexport type CrowdfundingRazorpayAccountWire = z.infer<typeof crowdfundingRazorpayAccountWireSchema>;\n\n// ─── Wire shape — feed item ────────────────────────────────────────────────\n\n/**\n * The card-renderable wire shape. Mirrors the engagement + author +\n * area-lineage shape of other feed kinds so the existing\n * EngagementBar, AuthorByline, and feed-projection helpers slot in\n * 1:1 without per-kind branches.\n */\nexport const crowdfundingFeedItemSchema = z.object({\n _id: z.string(),\n contentKind: z.literal('crowdfunding'),\n author: postAuthorSnapshotSchema,\n\n // ─── Campaign content ────────────────────────────────────────────\n title: z.string(),\n description: z.string(),\n category: crowdfundingCategorySchema,\n beneficiaryName: z.string(),\n beneficiaryRelation: z.string().optional(),\n /** Who the campaign is for. Optional on the wire so historic\n * campaigns created before this field landed still validate. */\n audience: crowdfundingAudienceSchema.optional(),\n /** Optional explainer when `category === 'other'` — the writer's\n * short label for the custom cause (e.g. \"Wedding emergency\"). */\n categoryOther: z.string().optional(),\n /** Up to 3 sub-causes within the chosen category, e.g.\n * [\"Cancer treatment\", \"ICU / critical care\"] for `medical`. */\n subCauses: z.array(z.string()).max(3).optional(),\n /** When one of the picked sub-causes is \"Other\", this carries the\n * writer's clarification (e.g. \"Reconstructive surgery\"). */\n subCauseOther: z.string().optional(),\n /** Org-registration class. Only meaningful when\n * `audience === 'organization'`. */\n organizationKind: crowdfundingOrgKindSchema.optional(),\n /** When `organizationKind === 'other'`, the writer's clarification\n * (e.g. \"Religious body\", \"Cooperative\"). */\n organizationKindOther: z.string().optional(),\n /** Story images (separate from supporting documents, which are\n * verifier-only). Up to `CROWDFUNDING_MAX_IMAGES`. */\n images: z.array(z.string().url()).max(CROWDFUNDING_MAX_IMAGES).optional(),\n /** Optional YouTube URL surfaced as a preview/playback embed\n * alongside the story photos. Accepted forms: youtube.com/watch?v=,\n * youtu.be/, youtube.com/shorts/, youtube.com/embed/,\n * m.youtube.com/watch?v=. The wire stores whatever the creator\n * pasted; clients extract the video id themselves at render time. */\n youtubeUrl: z.string().url().optional(),\n\n // ─── Goal + progress ─────────────────────────────────────────────\n goalAmountInr: z.number().int().positive(),\n /** Sum of donations whose `verificationState === 'verified'`\n * (receipt uploaded or creator confirmed). THIS drives the visible\n * progress bar — the product decision is that only trust-grounded\n * money counts visually. */\n verifiedAmountInr: z.number().int().nonnegative(),\n /** Total attested amount — verified + pending + disputed\n * combined. Surfaced as secondary text (\"₹X pending receipt\")\n * so creator + donors can see the full attested pipeline without\n * it inflating the headline progress. */\n attestedAmountInr: z.number().int().nonnegative(),\n /** Distinct donors who attested any state. */\n donorCount: z.number().int().nonnegative(),\n /** Distinct donors whose latest donation is `verified`. The card\n * uses this for \"47 verified supporters\" copy. */\n verifiedDonorCount: z.number().int().nonnegative(),\n\n closesAt: z.string().datetime(),\n\n // ─── Visibility (v0.34+) ─────────────────────────────────────────\n /**\n * Where the campaign appears. v0.34 replaced the per-campaign area\n * scope with this explicit user choice — pick communities you're a\n * member of and/or flip the global-feed toggle. See\n * `crowdfundingVisibilitySchema` for the contract + the at-least-one-\n * publication constraint.\n */\n visibility: crowdfundingVisibilitySchema,\n\n // ─── Verification surface ────────────────────────────────────────\n verification: crowdfundingVerificationSchema,\n\n // ─── Payment surface (donor-facing) ──────────────────────────────\n payment: crowdfundingPaymentSchema,\n\n // ─── Razorpay Linked Account state (creator-facing post-approval) ─\n /**\n * Razorpay Linked Account onboarding state. Absent on `draft` /\n * `submitted` / `rejected` campaigns (nothing to link yet). Present\n * on `awaiting_bank_link` / `active` / closed campaigns. Only the\n * creator's own view of their campaign carries the full record;\n * other donors see at most a public \"verified payee\" badge derived\n * from `status === 'activated'`.\n */\n razorpayAccount: crowdfundingRazorpayAccountWireSchema.optional(),\n\n // ─── Proof documents (verifier + creator view only) ───────────────\n /**\n * Server-side attached proof documents. Surfaced to:\n * - the campaign creator (to remind them what they uploaded)\n * - the verifier on the review queue\n * - admin / moderators on the audit surface\n * Scrubbed for all other viewers (donors, feed readers).\n */\n proofDocuments: z.array(crowdfundingProofDocumentWireSchema).optional(),\n\n // ─── Lifecycle ───────────────────────────────────────────────────\n status: crowdfundingStatusSchema,\n closedAt: z.string().datetime().nullable().optional(),\n /**\n * When the creator accepted the campaign Terms & Conditions. Stamped\n * at submit time. Surfaced so the My Campaigns surface can show\n * \"Agreed to Terms v2 on …\" copy.\n */\n termsAcceptedAt: z.string().datetime().nullable().optional(),\n /**\n * Version string of the T&C the creator accepted. Lets us re-prompt\n * acceptance if the T&C are amended materially.\n */\n termsVersion: z.string().nullable().optional(),\n\n // ─── Standard engagement (same axis as other kinds) ──────────────\n score: z.number().int(),\n commentCount: z.number().int().nonnegative(),\n repostCount: z.number().int().nonnegative(),\n reactionCounts: z.record(z.string(), z.number().int().nonnegative()),\n\n /**\n * Denormalised creator location at the time the campaign was\n * created. Kept on the wire (despite v0.34 dropping the area-scope\n * concept) so the verifier surface and creator's \"My Campaigns\"\n * row can show \"from <village>, <district>\" context without a live\n * join. NOT used for visibility filtering — that lives entirely on\n * `visibility` now.\n */\n areaLineage: areaLineageSnapshotSchema,\n\n createdAt: z.string().datetime(),\n\n viewer: z\n .object({\n vote: voteValueSchema.nullable(),\n reaction: z.string().nullable(),\n bookmarked: z.boolean(),\n isAuthor: z.boolean(),\n reposted: z.boolean(),\n /** The viewer's own donation state on THIS campaign. `null`\n * means they haven't attested anything yet. Populated from\n * the latest CrowdfundingDonation row keyed by\n * (campaignId, viewerUserId). */\n donationState: crowdfundingDonationStateSchema.nullable(),\n /** Amount the viewer last attested, in ₹. Null when no\n * attestation. The card uses this to render the \"You gave\n * ₹500 — upload receipt\" prompt. */\n donationAmountInr: z.number().int().positive().nullable(),\n /** True when the viewer is eligible to verify this campaign\n * (matching-or-higher leader at the campaign's scope, viewing\n * a `submitted` campaign). Renders the in-card Verify CTA. */\n canVerify: z.boolean(),\n })\n .optional(),\n});\nexport type CrowdfundingFeedItem = z.infer<typeof crowdfundingFeedItemSchema>;\n\n// Same shape mirrored as the public \"wire\" alias for parity with the\n// other kinds whose feed envelope === detail envelope.\nexport const communityCrowdfundingWireSchema = crowdfundingFeedItemSchema;\nexport type CommunityCrowdfundingWire = z.infer<typeof communityCrowdfundingWireSchema>;\n\n// ─── Donation wire ─────────────────────────────────────────────────────────\n\n/**\n * Single donation row — surfaced on the campaign's public donor list\n * and on the donor's own \"My Donations\" surface. The full bank /\n * receipt URL stays server-side; the wire carries display info plus\n * the verification state.\n */\nexport const crowdfundingDonationWireSchema = z.object({\n _id: z.string(),\n campaignId: z.string(),\n /** Donor's userId — omitted when `isAnonymous`, so the wire is the\n * privacy boundary not the card. */\n donorUserId: z.string().optional(),\n donorDisplayName: z.string(),\n amountInr: z.number().int().positive(),\n isAnonymous: z.boolean(),\n attestedAt: z.string().datetime(),\n /** When the receipt was uploaded. Absent on pending donations. */\n receiptUploadedAt: z.string().datetime().nullable().optional(),\n /** Signed URL for the receipt screenshot. Visible only to:\n * - the donor (their own row)\n * - the campaign creator\n * - the verifier on review\n * - admin / moderators\n * The list endpoint scrubs this for all other viewers. */\n receiptUrl: z.string().url().nullable().optional(),\n verificationState: crowdfundingDonationStateSchema,\n /** Set when the creator confirmed receipt independently of a\n * receipt upload. e.g. \"I see ₹500 from Ravi in my account\". */\n creatorConfirmed: z.boolean().optional(),\n /** Set when the creator marked \"I didn't receive this\". Donor is\n * notified to upload the receipt; auto-reverts after 7 days. */\n disputeReason: z.string().optional(),\n});\nexport type CrowdfundingDonationWire = z.infer<typeof crowdfundingDonationWireSchema>;\n\n// ─── Create / update / lifecycle bodies ────────────────────────────────────\n\n/**\n * Composer payload. Identity + bank fields are tier-conditional —\n * the server cross-checks the chosen `goalAmountInr` against the\n * provided fields per the tier matrix in constants.ts.\n */\nexport const createCrowdfundingBodySchema = z.object({\n title: z.string().trim().min(CROWDFUNDING_TITLE_MIN_CHARS).max(CROWDFUNDING_TITLE_MAX_CHARS),\n description: z\n .string()\n .trim()\n .min(CROWDFUNDING_DESCRIPTION_MIN_CHARS)\n .max(CROWDFUNDING_DESCRIPTION_MAX_CHARS),\n category: crowdfundingCategorySchema,\n beneficiaryName: z.string().trim().min(2).max(CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS),\n beneficiaryRelation: z\n .string()\n .trim()\n .max(CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS)\n .optional(),\n /** Audience picker — drives the relation chip set + the\n * organization-specific identity sub-steps on the composer. */\n audience: crowdfundingAudienceSchema.optional(),\n /** When `category === 'other'`, the writer's short label for the\n * custom cause. Bounded to keep the database column sane. */\n categoryOther: z.string().trim().max(80).optional(),\n /** Up to 3 sub-causes within the chosen category. */\n subCauses: z.array(z.string().trim().max(60)).max(3).optional(),\n /** Writer's clarification when one of the picked sub-causes is\n * \"Other\". */\n subCauseOther: z.string().trim().max(80).optional(),\n /** Org-registration class. Only set when `audience === 'organization'`. */\n organizationKind: crowdfundingOrgKindSchema.optional(),\n /** Writer's clarification when `organizationKind === 'other'`. */\n organizationKindOther: z.string().trim().max(80).optional(),\n images: z.array(z.string().url()).max(CROWDFUNDING_MAX_IMAGES).optional(),\n /** Optional YouTube video URL. Validated as a URL here; the\n * client-side validator additionally checks the host/path matches\n * a recognised YouTube shape and extracts the video id for the\n * preview component. */\n youtubeUrl: z.string().url().optional(),\n\n goalAmountInr: z.number().int().min(CROWDFUNDING_MIN_GOAL_INR).max(CROWDFUNDING_MAX_GOAL_INR),\n /** Duration in days. The server resolves `closesAt = now +\n * durationDays * 86400 * 1000` so client clock skew can't push\n * the close-time into the past. */\n durationDays: z\n .number()\n .int()\n .min(CROWDFUNDING_MIN_DURATION_DAYS)\n .max(CROWDFUNDING_MAX_DURATION_DAYS),\n\n /**\n * Where the campaign should appear. Pick communities you're a\n * member of and/or flip the global-feed toggle. Server rejects an\n * empty/global-false combination at create time.\n */\n visibility: crowdfundingVisibilitySchema,\n\n // v0.37: dropped composer-side identity collection. Razorpay's\n // hosted onboarding (on the bank-link step) handles PAN, Aadhaar,\n // bank account verification, and address proof for every payee —\n // doing it ourselves was redundant and weakened the privacy story\n // (we held copies of regulatory-sensitive data we didn't need to).\n //\n // ─── Proof documents (v0.33+ — required at submit time) ──────────\n /**\n * Typed + described proof documents the verifier reviews. Optional\n * on the create/update body so an in-progress draft can be saved\n * without docs; the submit-for-review handler enforces a non-empty\n * list (the per-category minimum is enforced server-side via the\n * `CROWDFUNDING_REQUIRED_PROOF_TYPES_BY_CATEGORY` matrix).\n */\n proofDocuments: z\n .array(\n z.object({\n url: z.string().url(),\n type: crowdfundingProofDocTypeSchema,\n description: z.string().trim().min(3).max(200),\n /** Optional on the body; server stamps `now` if absent. */\n uploadedAt: z.string().datetime().optional(),\n }),\n )\n .max(CROWDFUNDING_MAX_PROOF_DOCS)\n .optional(),\n\n // ─── Terms & Conditions acceptance ───────────────────────────────\n /**\n * Version of the T&C the creator agreed to. Set by the composer's\n * T&C step; the submit-for-review handler rejects the campaign if\n * this isn't equal to the current `CROWDFUNDING_TERMS_VERSION`.\n */\n termsVersion: z.string().optional(),\n\n});\nexport type CreateCrowdfundingBody = z.infer<typeof createCrowdfundingBodySchema>;\n\n/**\n * Update body — only fields that are safe to change on a `draft` or\n * `rejected` campaign before resubmission. Verification + lifecycle\n * fields cannot be updated through this endpoint. Tier + identity\n * fields stay editable so a rejected campaign can fix what the\n * verifier flagged.\n */\nexport const updateCrowdfundingBodySchema = createCrowdfundingBodySchema.partial();\nexport type UpdateCrowdfundingBody = z.infer<typeof updateCrowdfundingBodySchema>;\n\n/**\n * What the verifier sends when approving. v0.35 introduced the two-\n * stage flow (district leader then state leader); the stage being\n * acted on is INFERRED from the leader's jurisdiction at the service\n * layer, not claimed in the body. The body stays an empty strict\n * object so transports that always POST a JSON body continue to work\n * and future fields can be added without a wire-shape change.\n */\nexport const approveCrowdfundingBodySchema = z.object({}).strict();\nexport type ApproveCrowdfundingBody = z.infer<typeof approveCrowdfundingBodySchema>;\n\n/**\n * Rejection body. Reason is required and surfaces back to the creator\n * so they can fix the gap and resubmit. Either the district or the\n * state stage can reject; the stage is inferred from the leader's\n * jurisdiction.\n */\nexport const rejectCrowdfundingBodySchema = z.object({\n reason: z\n .string()\n .trim()\n .min(CROWDFUNDING_REJECTION_REASON_MIN_CHARS)\n .max(CROWDFUNDING_REJECTION_REASON_MAX_CHARS),\n});\nexport type RejectCrowdfundingBody = z.infer<typeof rejectCrowdfundingBodySchema>;\n\n/**\n * Rerun a closed-timeout campaign. The creator opens an edit flow\n * with extended duration (+ optional goal/story tweaks) and re-\n * submits; the resubmit resets BOTH verification stages to pending,\n * and the campaign re-enters the district queue from scratch.\n *\n * Body carries only the new duration — the rest of the edits ride\n * the normal `updateCrowdfundingBodySchema` path that runs alongside\n * the rerun action. Duration is required; without it the rerun makes\n * no sense (the campaign would close immediately again).\n */\nexport const requestRerunCrowdfundingBodySchema = z.object({\n durationDays: z\n .number()\n .int()\n .min(CROWDFUNDING_MIN_DURATION_DAYS)\n .max(CROWDFUNDING_MAX_DURATION_DAYS),\n});\nexport type RequestRerunCrowdfundingBody = z.infer<typeof requestRerunCrowdfundingBodySchema>;\n\n// ─── Donation bodies ───────────────────────────────────────────────────────\n\n/**\n * Donor self-attests a donation. Receipt is OPTIONAL — the\n * attestation creates a `pending` row that the donor can attach a\n * receipt to later (anytime, from settings → My Donations) which\n * promotes it to `verified` and counts toward the progress bar.\n */\nexport const attestCrowdfundingDonationBodySchema = z.object({\n amountInr: z.number().int().min(1).max(CROWDFUNDING_MAX_DONATION_INR),\n isAnonymous: z.boolean().default(false),\n /** GCS URL of the receipt screenshot. When omitted the donation\n * enters `pending` state. */\n receiptUrl: z.string().url().optional(),\n});\nexport type AttestCrowdfundingDonationBody = z.infer<typeof attestCrowdfundingDonationBodySchema>;\n\n/**\n * Upload (or re-upload) a receipt for a previously-attested donation.\n * Promotes a `pending` row to `verified`; for an already-`verified`\n * row it replaces the receipt.\n */\nexport const uploadCrowdfundingReceiptBodySchema = z.object({\n receiptUrl: z.string().url(),\n});\nexport type UploadCrowdfundingReceiptBody = z.infer<typeof uploadCrowdfundingReceiptBodySchema>;\n\n// ─── Listing query ─────────────────────────────────────────────────────────\n\nexport const listCrowdfundingDonationsQuerySchema = z.object({\n page: z.number().int().positive().optional(),\n limit: z.number().int().positive().max(100).optional(),\n state: crowdfundingDonationStateSchema.optional(),\n});\nexport type ListCrowdfundingDonationsQuery = z.infer<typeof listCrowdfundingDonationsQuerySchema>;\n\n/**\n * Per-donor \"My Donations\" surface — different from the per-campaign\n * donor list. Returns every donation the viewer has attested, across\n * all campaigns, so the donor can spot any row that's still\n * `pending` and upload a receipt.\n */\nexport const listMyCrowdfundingDonationsQuerySchema = z.object({\n page: z.number().int().positive().optional(),\n limit: z.number().int().positive().max(100).optional(),\n state: crowdfundingDonationStateSchema.optional(),\n});\nexport type ListMyCrowdfundingDonationsQuery = z.infer<\n typeof listMyCrowdfundingDonationsQuerySchema\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"crowdfunding.js","sourceRoot":"","sources":["../src/crowdfunding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EACL,uCAAuC,EACvC,2CAA2C,EAC3C,kCAAkC,EAClC,kCAAkC,EAClC,6BAA6B,EAC7B,8BAA8B,EAC9B,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,yBAAyB,EACzB,uCAAuC,EACvC,uCAAuC,EACvC,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,SAAS;IACT,WAAW;IACX,aAAa;IACb,eAAe;IACf,WAAW;IACX,UAAU;IACV,UAAU;IACV,OAAO;IACP,OAAO;IACP,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,WAAW;IACX,cAAc;IACd,kBAAkB;IAClB;;;;;OAKG;IACH,mBAAmB;IACnB,OAAO;CACC,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,cAAc;CACN,CAAC;AACX,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,IAAI,CAAC,4B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EAAE,CAAC,GAAG,EAAE;CAC7B,CAAC,CAAC;AAGH,8EAA8E;AAE9E,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACtD,KAAK,EAAE,+BAA+B,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACtD,KAAK,EAAE,+BAA+B,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC","sourcesContent":["/**\n * Community crowdfunding wire shapes.\n *\n * A crowdfunding campaign is a verified civic fundraiser surfaced in\n * the feed alongside posts / polls / lost-found / voice-box / donate-\n * item. The model is:\n *\n * 1. Creator drafts a campaign, fills bank + UPI QR + identity tier\n * based on the goal amount, picks an area scope.\n * 2. A leader at the matching scope (or any leader higher up the\n * hierarchy) reviews and approves OR rejects with reason.\n * Approved campaigns transition to ACTIVE and appear in the feed.\n * 3. Donors view the card, tap \"Donate\", pay externally via UPI\n * directly to the creator's bank — the platform never sees the\n * money. After paying, the donor self-attests amount + uploads a\n * receipt screenshot (optional). Without a screenshot the\n * donation enters PENDING state — the donor can upload the\n * receipt later (anytime, from settings → My Donations).\n * 4. The live progress bar shows ONLY verified amount (receipt\n * uploaded). Pending donations are counted separately and\n * surfaced as a secondary \"₹X pending receipt\" note. This is the\n * product decision: the visible progress reflects trust-grounded\n * money, not claims.\n *\n * Privacy: bank account number, IFSC, PAN, Aadhaar last-4, and\n * supporting documents are NEVER on the wire. Only `bankAccountLast4`,\n * `bankAccountHolderName`, and a UPI QR URL surface to donors.\n *\n * @module community-schema/crowdfunding\n */\n\nimport { z } from 'zod';\nimport { areaLineageSnapshotSchema } from './area.js';\nimport {\n CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS,\n CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS,\n CROWDFUNDING_DESCRIPTION_MAX_CHARS,\n CROWDFUNDING_DESCRIPTION_MIN_CHARS,\n CROWDFUNDING_MAX_DONATION_INR,\n CROWDFUNDING_MAX_DURATION_DAYS,\n CROWDFUNDING_MAX_GOAL_INR,\n CROWDFUNDING_MAX_IMAGES,\n CROWDFUNDING_MAX_PROOF_DOCS,\n CROWDFUNDING_MAX_SUPPORTING_DOCS,\n CROWDFUNDING_MIN_DURATION_DAYS,\n CROWDFUNDING_MIN_GOAL_INR,\n CROWDFUNDING_REJECTION_REASON_MAX_CHARS,\n CROWDFUNDING_REJECTION_REASON_MIN_CHARS,\n CROWDFUNDING_TITLE_MAX_CHARS,\n CROWDFUNDING_TITLE_MIN_CHARS,\n} from './constants.js';\nimport { voteValueSchema } from './engagement.js';\nimport { postAuthorSnapshotSchema } from './post.js';\n\n// ─── Enums ─────────────────────────────────────────────────────────────────\n\n/**\n * Top-level categories — drives the chip + icon on the card and the\n * verifier's per-category supporting-doc requirements (medical needs\n * hospital invoice; education needs admission letter; etc.).\n */\nexport const CROWDFUNDING_CATEGORY_VALUES = [\n 'medical',\n 'maternity',\n 'senior_care',\n 'special_needs',\n 'education',\n 'memorial',\n 'disaster',\n 'civic',\n 'faith',\n 'sports_talent',\n 'animal_welfare',\n 'environment',\n 'legal_aid',\n 'arts_culture',\n 'self_improvement',\n /**\n * Startup / prototype building — distinct from `self_improvement`\n * (which is now strictly skill / coursework). Covers MVP builds,\n * tooling, initial inventory, working capital, registration fees,\n * marketing for genuine first-stage entrepreneurs.\n */\n 'startup_prototype',\n 'other',\n] as const;\n\n/**\n * Who the campaign is for — drives the relation chip set and the\n * organization-specific identity asks on the composer. Captured so the\n * verifier can match the campaign narrative to the supporting docs\n * (e.g. an `organization` audience should produce 12A / 80G papers,\n * not a personal hospital bill).\n */\nexport const CROWDFUNDING_AUDIENCE_VALUES = [\n 'self',\n 'family',\n 'friend',\n 'community',\n 'organization',\n] as const;\nexport const crowdfundingAudienceSchema = z.enum(CROWDFUNDING_AUDIENCE_VALUES);\nexport type CrowdfundingAudience = z.infer<typeof crowdfundingAudienceSchema>;\n\n/**\n * Org-registration class — only meaningful when `audience ===\n * 'organization'`. Drives the verifier's expected document set\n * (12A/80G for trust, FCRA-style papers for NGO, etc.).\n */\nexport const CROWDFUNDING_ORG_KIND_VALUES = [\n 'ngo',\n 'trust',\n 'society',\n 'section_8',\n 'other',\n] as const;\nexport const crowdfundingOrgKindSchema = z.enum(CROWDFUNDING_ORG_KIND_VALUES);\nexport type CrowdfundingOrgKind = z.infer<typeof crowdfundingOrgKindSchema>;\nexport const crowdfundingCategorySchema = z.enum(CROWDFUNDING_CATEGORY_VALUES);\nexport type CrowdfundingCategory = z.infer<typeof crowdfundingCategorySchema>;\n\n/**\n * Visibility — where the campaign appears.\n *\n * v0.34 dropped the per-campaign area scope entirely. Instead the\n * creator picks one or more communities they're a member of, AND/OR\n * flips a \"show in global feed\" toggle. The campaign appears in those\n * surfaces and ONLY those surfaces (no geographic cascade).\n *\n * communityIds list of community ids the campaign is published into.\n * Empty array means \"no community-scoped publication\".\n * includesGlobal when true the campaign also appears in the global\n * feed (cross-community discovery surface).\n *\n * The Zod schema enforces at-least-one-publication at parse time so a\n * caller can't accidentally create an orphan campaign. The composer's\n * VisibilityPicker enforces the same on the UI side.\n *\n * HotScore (already present on the model) drives RANKING within these\n * feeds. The recompute job runs every few minutes and the higher-\n * scoring campaigns surface to the top of each feed surface they\n * appear in.\n */\n/**\n * v0.36: the global feed is ALWAYS selected. A campaign is implicitly\n * published to the global home feed, and the creator can optionally\n * additionally pick communities they're a member of to also publish\n * into. `includesGlobal` is kept on the wire shape for forward\n * compatibility but is forced to `true` at parse time — the creator\n * doesn't see a toggle in the composer.\n */\nexport const crowdfundingVisibilitySchema = z.object({\n communityIds: z.array(z.string()).default([]),\n includesGlobal: z\n .boolean()\n .default(true)\n // Force to true regardless of input. The field stays on the wire\n // so consumers can still pivot UI based on it (e.g. legacy rows\n // that explicitly opted out are still readable).\n .transform(() => true),\n});\nexport type CrowdfundingVisibility = z.infer<typeof crowdfundingVisibilitySchema>;\n\n/**\n * Lifecycle state.\n *\n * draft creator is filling the composer\n * submitted creator has accepted T&C and submitted; sits in\n * the area-leader verifier queue\n * awaiting_bank_link area leader has approved; creator must complete\n * Razorpay Linked Account KYC before the campaign\n * goes live. Inserted between `submitted` and\n * `active` so the post-approval payment-setup gate\n * is a first-class state, not a flag-on-active. A\n * `bankLinkDeadlineAt` countdown auto-reverts the\n * campaign to `rejected` if KYC isn't completed\n * in time.\n * rejected area leader rejected, OR bank-link deadline\n * passed, OR Razorpay KYC failed permanently.\n * Creator can edit + resubmit.\n * active publishable in the feed; donations open\n * closed_* terminal end-states with different reasons\n */\nexport const CROWDFUNDING_STATUS_VALUES = [\n 'draft',\n 'submitted',\n 'awaiting_bank_link',\n 'rejected',\n 'active',\n 'closed_success',\n 'closed_timeout',\n 'closed_by_creator',\n] as const;\nexport const crowdfundingStatusSchema = z.enum(CROWDFUNDING_STATUS_VALUES);\nexport type CrowdfundingStatus = z.infer<typeof crowdfundingStatusSchema>;\n\n/**\n * Proof document types — drives the doc-picker UI in the composer's\n * Proof Documents step (added in v0.33) AND the verifier's per-category\n * expected-doc checklist. The composer narrows the picker by category;\n * the verifier sees the full list with the user-supplied type label so\n * they can match the doc to the cause narrative.\n *\n * Per-category required-minimum mapping lives in the composer (frontend)\n * and is enforced at submit by the backend. The set here is the union of\n * what the renderer can offer across categories; some types (e.g.\n * 12a_certificate) are only useful when audience === organization, and\n * the renderer hides them otherwise.\n */\nexport const CROWDFUNDING_PROOF_DOC_TYPE_VALUES = [\n // Medical\n 'hospital_bill',\n 'diagnosis_report',\n 'doctor_letter',\n 'prescription',\n 'insurance_denial',\n // Education\n 'admission_letter',\n 'fee_schedule',\n 'scholarship_letter',\n // Community / civic / supporter-backed\n 'supporters_signed_letter',\n 'project_proposal',\n 'beneficiaries_list',\n // Disaster\n 'relief_org_letter',\n 'affected_area_photos',\n 'government_notification',\n // Organization (when audience === 'organization')\n 'org_registration_certificate',\n 'certificate_12a',\n 'certificate_80g',\n 'certificate_fcra',\n // Generic / cross-cutting\n 'identity_proof',\n 'address_proof',\n 'photo',\n 'video',\n 'other',\n] as const;\nexport const crowdfundingProofDocTypeSchema = z.enum(CROWDFUNDING_PROOF_DOC_TYPE_VALUES);\nexport type CrowdfundingProofDocType = z.infer<typeof crowdfundingProofDocTypeSchema>;\n\n/**\n * Razorpay Linked Account onboarding state, mirrored onto the campaign.\n *\n * not_started - default; creator hasn't started bank-linking yet\n * created - linked account created via Razorpay API; KYC URL\n * has been issued to the creator\n * under_review - creator has submitted KYC; Razorpay is reviewing\n * (typically 1-3 business days)\n * activated - KYC approved; campaign moves to `active`\n * rejected - KYC rejected; creator must update documents and\n * retry\n * suspended - account was activated but later suspended (fraud,\n * ToS violation, etc.); campaign halted pending review\n */\nexport const CROWDFUNDING_RAZORPAY_ACCOUNT_STATUS_VALUES = [\n 'not_started',\n 'created',\n 'under_review',\n 'activated',\n 'rejected',\n 'suspended',\n] as const;\nexport const crowdfundingRazorpayAccountStatusSchema = z.enum(\n CROWDFUNDING_RAZORPAY_ACCOUNT_STATUS_VALUES,\n);\nexport type CrowdfundingRazorpayAccountStatus = z.infer<\n typeof crowdfundingRazorpayAccountStatusSchema\n>;\n\n/**\n * Per-donation verification state. `pending` = attested but no\n * receipt. `verified` = receipt uploaded (creator confirmation\n * optional). `disputed` = creator marked \"I didn't receive this\".\n * Only `verified` rolls into the campaign's `verifiedAmountInr`\n * which drives the visible progress bar.\n */\nexport const CROWDFUNDING_DONATION_STATE_VALUES = ['pending', 'verified', 'disputed'] as const;\nexport const crowdfundingDonationStateSchema = z.enum(CROWDFUNDING_DONATION_STATE_VALUES);\nexport type CrowdfundingDonationState = z.infer<typeof crowdfundingDonationStateSchema>;\n\n// v0.34 dropped the fee-billing mode types entirely. The new flow uses\n// a flat 5 % commission via Razorpay Route at donation-disbursement\n// time — there is no creator-side billing choice to capture.\n\n// ─── Sub-shapes ────────────────────────────────────────────────────────────\n\n/**\n * One stage of the two-leader verification flow. v0.35 split the old\n * single-stage `verification` block into TWO stages: `district` (the\n * district leader for the creator's district vets authenticity) and\n * `state` (the state leader for the creator's state cosigns). Both\n * stages must be `approved` before the campaign can move on to bank\n * linking. Either stage going to `rejected` is terminal for the\n * submission — the creator edits + resubmits, which resets both\n * stages back to `pending`.\n */\nexport const crowdfundingVerificationStageSchema = z.object({\n status: z.enum(['pending', 'approved', 'rejected']),\n /** The leader who acted on this stage (display name — live-joined\n * from User at projection time). */\n verifiedByDisplayName: z.string().optional(),\n verifiedByUserId: z.string().optional(),\n /** When the leader acted. Approved + rejected both stamp this. */\n verifiedAt: z.string().datetime().optional(),\n /** Required when `status === 'rejected'`. Why the leader said no. */\n rejectionReason: z.string().optional(),\n});\nexport type CrowdfundingVerificationStage = z.infer<typeof crowdfundingVerificationStageSchema>;\n\n/**\n * Two-stage verification block. Sequential: state leader can only act\n * after district leader has approved (the queue UI hides un-vetted\n * campaigns from the state queue). Either rejection sends the whole\n * campaign to `rejected` at the campaign level.\n */\nexport const crowdfundingVerificationSchema = z.object({\n district: crowdfundingVerificationStageSchema,\n state: crowdfundingVerificationStageSchema,\n});\nexport type CrowdfundingVerification = z.infer<typeof crowdfundingVerificationSchema>;\n\n/**\n * Public-facing payment surface — what the donor sees in the Donate\n * dialog. The full account number, IFSC, PAN, Aadhaar, supporting\n * docs etc. are kept server-side; only what's needed for the donor\n * to send money + recognise the recipient is exposed.\n *\n * In v0.33 the platform shifted from \"direct UPI to creator\" to\n * \"Razorpay Linked Account split-payment\", so every field on this\n * shape is now OPTIONAL — a Linked-Account campaign carries an\n * activated `razorpayLinkedAccountId` (on the campaign root) and\n * surfaces a Razorpay-hosted checkout, not a UPI QR. Legacy campaigns\n * created before v0.33 still carry these fields; the donor card\n * renders the QR + bank info when present, the Razorpay flow when not.\n */\nexport const crowdfundingPaymentSchema = z.object({\n /** GCS URL of the UPI QR code image uploaded by the creator. The\n * Donate dialog renders this for the donor to scan. */\n upiQrUrl: z.string().url().optional(),\n /** Optional VPA — lets the donor tap a one-tap UPI deep link\n * instead of scanning the QR. e.g. \"ravi@okhdfcbank\". */\n upiId: z.string().optional(),\n /** Last 4 digits of the bank account — shown to the donor as\n * reassurance (\"ending in ••1234\"). Full number never surfaces. */\n bankAccountLast4: z.string().length(4).optional(),\n /** Account holder's name — must match the verified author display\n * name (penny-drop + UDP cross-check at submission time). */\n bankAccountHolderName: z.string().optional(),\n /** Optional bank short name surfaced on the dialog. */\n bankName: z.string().optional(),\n});\nexport type CrowdfundingPayment = z.infer<typeof crowdfundingPaymentSchema>;\n\n/**\n * A single proof document attached by the creator. Multiple instances\n * carried in `proofDocuments` on the campaign; each one has its own\n * type label + free-text description so the verifier sees \"Hospital\n * bill: AIIMS Delhi, June 2026 — ₹1.2L\" not just \"doc-1.pdf\".\n */\nexport const crowdfundingProofDocumentWireSchema = z.object({\n /** GCS signed URL of the uploaded document. */\n url: z.string().url(),\n /** What kind of proof this is. Drives the verifier's per-category\n * expected-doc checklist. */\n type: crowdfundingProofDocTypeSchema,\n /** Creator's own one-line description of the document. Surfaced\n * next to the type label on the verifier surface so they can match\n * the doc to the campaign narrative without opening every PDF. */\n description: z.string().trim().min(3).max(200),\n /** When the upload completed. Useful for the verifier to see the\n * sequence of uploads. */\n uploadedAt: z.string().datetime(),\n});\nexport type CrowdfundingProofDocumentWire = z.infer<typeof crowdfundingProofDocumentWireSchema>;\n\n/**\n * Razorpay Linked Account surface mirrored onto the campaign. Set by\n * the post-approval bank-linking flow; absent while the campaign is in\n * `draft` / `submitted` / `rejected`.\n *\n * Only the STATUS metadata surfaces on the wire — the linked-account\n * id itself stays server-side (used to route disbursements via\n * Razorpay Route, never needed by clients).\n */\nexport const crowdfundingRazorpayAccountWireSchema = z.object({\n /** Current state of the linked-account onboarding. */\n status: crowdfundingRazorpayAccountStatusSchema,\n /** ISO timestamp of when the account moved to `activated`. The\n * campaign flips to `active` at this point. */\n activatedAt: z.string().datetime().nullable().optional(),\n /** Reason Razorpay rejected the KYC submission. Surfaced to the\n * creator so they can fix and retry. */\n rejectionReason: z.string().nullable().optional(),\n /** Razorpay-hosted KYC onboarding URL. Set when status moves to\n * `created`; the creator opens this in a webview to complete KYC. */\n onboardingUrl: z.string().url().nullable().optional(),\n /** Deadline for the creator to finish bank linking. After this\n * date a scheduled job reverts the campaign to `rejected` with a\n * \"bank link deadline missed\" reason. */\n deadlineAt: z.string().datetime().nullable().optional(),\n});\nexport type CrowdfundingRazorpayAccountWire = z.infer<typeof crowdfundingRazorpayAccountWireSchema>;\n\n// ─── Wire shape — feed item ────────────────────────────────────────────────\n\n/**\n * The card-renderable wire shape. Mirrors the engagement + author +\n * area-lineage shape of other feed kinds so the existing\n * EngagementBar, AuthorByline, and feed-projection helpers slot in\n * 1:1 without per-kind branches.\n */\nexport const crowdfundingFeedItemSchema = z.object({\n _id: z.string(),\n contentKind: z.literal('crowdfunding'),\n author: postAuthorSnapshotSchema,\n\n // ─── Campaign content ────────────────────────────────────────────\n title: z.string(),\n description: z.string(),\n category: crowdfundingCategorySchema,\n beneficiaryName: z.string(),\n beneficiaryRelation: z.string().optional(),\n /** Who the campaign is for. Optional on the wire so historic\n * campaigns created before this field landed still validate. */\n audience: crowdfundingAudienceSchema.optional(),\n /** Optional explainer when `category === 'other'` — the writer's\n * short label for the custom cause (e.g. \"Wedding emergency\"). */\n categoryOther: z.string().optional(),\n /** Up to 3 sub-causes within the chosen category, e.g.\n * [\"Cancer treatment\", \"ICU / critical care\"] for `medical`. */\n subCauses: z.array(z.string()).max(3).optional(),\n /** When one of the picked sub-causes is \"Other\", this carries the\n * writer's clarification (e.g. \"Reconstructive surgery\"). */\n subCauseOther: z.string().optional(),\n /** Org-registration class. Only meaningful when\n * `audience === 'organization'`. */\n organizationKind: crowdfundingOrgKindSchema.optional(),\n /** When `organizationKind === 'other'`, the writer's clarification\n * (e.g. \"Religious body\", \"Cooperative\"). */\n organizationKindOther: z.string().optional(),\n /** Story images (separate from supporting documents, which are\n * verifier-only). Up to `CROWDFUNDING_MAX_IMAGES`. */\n images: z.array(z.string().url()).max(CROWDFUNDING_MAX_IMAGES).optional(),\n /** Optional YouTube URL surfaced as a preview/playback embed\n * alongside the story photos. Accepted forms: youtube.com/watch?v=,\n * youtu.be/, youtube.com/shorts/, youtube.com/embed/,\n * m.youtube.com/watch?v=. The wire stores whatever the creator\n * pasted; clients extract the video id themselves at render time. */\n youtubeUrl: z.string().url().optional(),\n\n // ─── Goal + progress ─────────────────────────────────────────────\n goalAmountInr: z.number().int().positive(),\n /** Sum of donations whose `verificationState === 'verified'`\n * (receipt uploaded or creator confirmed). THIS drives the visible\n * progress bar — the product decision is that only trust-grounded\n * money counts visually. */\n verifiedAmountInr: z.number().int().nonnegative(),\n /** Total attested amount — verified + pending + disputed\n * combined. Surfaced as secondary text (\"₹X pending receipt\")\n * so creator + donors can see the full attested pipeline without\n * it inflating the headline progress. */\n attestedAmountInr: z.number().int().nonnegative(),\n /** Distinct donors who attested any state. */\n donorCount: z.number().int().nonnegative(),\n /** Distinct donors whose latest donation is `verified`. The card\n * uses this for \"47 verified supporters\" copy. */\n verifiedDonorCount: z.number().int().nonnegative(),\n\n closesAt: z.string().datetime(),\n\n // ─── Visibility (v0.34+) ─────────────────────────────────────────\n /**\n * Where the campaign appears. v0.34 replaced the per-campaign area\n * scope with this explicit user choice — pick communities you're a\n * member of and/or flip the global-feed toggle. See\n * `crowdfundingVisibilitySchema` for the contract + the at-least-one-\n * publication constraint.\n */\n visibility: crowdfundingVisibilitySchema,\n\n // ─── Verification surface ────────────────────────────────────────\n verification: crowdfundingVerificationSchema,\n\n // ─── Payment surface (donor-facing) ──────────────────────────────\n payment: crowdfundingPaymentSchema,\n\n // ─── Razorpay Linked Account state (creator-facing post-approval) ─\n /**\n * Razorpay Linked Account onboarding state. Absent on `draft` /\n * `submitted` / `rejected` campaigns (nothing to link yet). Present\n * on `awaiting_bank_link` / `active` / closed campaigns. Only the\n * creator's own view of their campaign carries the full record;\n * other donors see at most a public \"verified payee\" badge derived\n * from `status === 'activated'`.\n */\n razorpayAccount: crowdfundingRazorpayAccountWireSchema.optional(),\n\n // ─── Proof documents (verifier + creator view only) ───────────────\n /**\n * Server-side attached proof documents. Surfaced to:\n * - the campaign creator (to remind them what they uploaded)\n * - the verifier on the review queue\n * - admin / moderators on the audit surface\n * Scrubbed for all other viewers (donors, feed readers).\n */\n proofDocuments: z.array(crowdfundingProofDocumentWireSchema).optional(),\n\n // ─── Lifecycle ───────────────────────────────────────────────────\n status: crowdfundingStatusSchema,\n closedAt: z.string().datetime().nullable().optional(),\n /**\n * When the creator accepted the campaign Terms & Conditions. Stamped\n * at submit time. Surfaced so the My Campaigns surface can show\n * \"Agreed to Terms v2 on …\" copy.\n */\n termsAcceptedAt: z.string().datetime().nullable().optional(),\n /**\n * Version string of the T&C the creator accepted. Lets us re-prompt\n * acceptance if the T&C are amended materially.\n */\n termsVersion: z.string().nullable().optional(),\n\n // ─── Standard engagement (same axis as other kinds) ──────────────\n score: z.number().int(),\n commentCount: z.number().int().nonnegative(),\n repostCount: z.number().int().nonnegative(),\n reactionCounts: z.record(z.string(), z.number().int().nonnegative()),\n\n /**\n * Denormalised creator location at the time the campaign was\n * created. Kept on the wire (despite v0.34 dropping the area-scope\n * concept) so the verifier surface and creator's \"My Campaigns\"\n * row can show \"from <village>, <district>\" context without a live\n * join. NOT used for visibility filtering — that lives entirely on\n * `visibility` now.\n */\n areaLineage: areaLineageSnapshotSchema,\n\n createdAt: z.string().datetime(),\n\n viewer: z\n .object({\n vote: voteValueSchema.nullable(),\n reaction: z.string().nullable(),\n bookmarked: z.boolean(),\n isAuthor: z.boolean(),\n reposted: z.boolean(),\n /** The viewer's own donation state on THIS campaign. `null`\n * means they haven't attested anything yet. Populated from\n * the latest CrowdfundingDonation row keyed by\n * (campaignId, viewerUserId). */\n donationState: crowdfundingDonationStateSchema.nullable(),\n /** Amount the viewer last attested, in ₹. Null when no\n * attestation. The card uses this to render the \"You gave\n * ₹500 — upload receipt\" prompt. */\n donationAmountInr: z.number().int().positive().nullable(),\n /** True when the viewer is eligible to verify this campaign\n * (matching-or-higher leader at the campaign's scope, viewing\n * a `submitted` campaign). Renders the in-card Verify CTA. */\n canVerify: z.boolean(),\n })\n .optional(),\n});\nexport type CrowdfundingFeedItem = z.infer<typeof crowdfundingFeedItemSchema>;\n\n// Same shape mirrored as the public \"wire\" alias for parity with the\n// other kinds whose feed envelope === detail envelope.\nexport const communityCrowdfundingWireSchema = crowdfundingFeedItemSchema;\nexport type CommunityCrowdfundingWire = z.infer<typeof communityCrowdfundingWireSchema>;\n\n// ─── Donation wire ─────────────────────────────────────────────────────────\n\n/**\n * Single donation row — surfaced on the campaign's public donor list\n * and on the donor's own \"My Donations\" surface. The full bank /\n * receipt URL stays server-side; the wire carries display info plus\n * the verification state.\n */\nexport const crowdfundingDonationWireSchema = z.object({\n _id: z.string(),\n campaignId: z.string(),\n /** Donor's userId — omitted when `isAnonymous`, so the wire is the\n * privacy boundary not the card. */\n donorUserId: z.string().optional(),\n donorDisplayName: z.string(),\n amountInr: z.number().int().positive(),\n isAnonymous: z.boolean(),\n attestedAt: z.string().datetime(),\n /** When the receipt was uploaded. Absent on pending donations. */\n receiptUploadedAt: z.string().datetime().nullable().optional(),\n /** Signed URL for the receipt screenshot. Visible only to:\n * - the donor (their own row)\n * - the campaign creator\n * - the verifier on review\n * - admin / moderators\n * The list endpoint scrubs this for all other viewers. */\n receiptUrl: z.string().url().nullable().optional(),\n verificationState: crowdfundingDonationStateSchema,\n /** Set when the creator confirmed receipt independently of a\n * receipt upload. e.g. \"I see ₹500 from Ravi in my account\". */\n creatorConfirmed: z.boolean().optional(),\n /** Set when the creator marked \"I didn't receive this\". Donor is\n * notified to upload the receipt; auto-reverts after 7 days. */\n disputeReason: z.string().optional(),\n});\nexport type CrowdfundingDonationWire = z.infer<typeof crowdfundingDonationWireSchema>;\n\n// ─── Create / update / lifecycle bodies ────────────────────────────────────\n\n/**\n * Composer payload. Identity + bank fields are tier-conditional —\n * the server cross-checks the chosen `goalAmountInr` against the\n * provided fields per the tier matrix in constants.ts.\n */\nexport const createCrowdfundingBodySchema = z.object({\n title: z.string().trim().min(CROWDFUNDING_TITLE_MIN_CHARS).max(CROWDFUNDING_TITLE_MAX_CHARS),\n description: z\n .string()\n .trim()\n .min(CROWDFUNDING_DESCRIPTION_MIN_CHARS)\n .max(CROWDFUNDING_DESCRIPTION_MAX_CHARS),\n category: crowdfundingCategorySchema,\n beneficiaryName: z.string().trim().min(2).max(CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS),\n beneficiaryRelation: z\n .string()\n .trim()\n .max(CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS)\n .optional(),\n /** Audience picker — drives the relation chip set + the\n * organization-specific identity sub-steps on the composer. */\n audience: crowdfundingAudienceSchema.optional(),\n /** When `category === 'other'`, the writer's short label for the\n * custom cause. Bounded to keep the database column sane. */\n categoryOther: z.string().trim().max(80).optional(),\n /** Up to 3 sub-causes within the chosen category. */\n subCauses: z.array(z.string().trim().max(60)).max(3).optional(),\n /** Writer's clarification when one of the picked sub-causes is\n * \"Other\". */\n subCauseOther: z.string().trim().max(80).optional(),\n /** Org-registration class. Only set when `audience === 'organization'`. */\n organizationKind: crowdfundingOrgKindSchema.optional(),\n /** Writer's clarification when `organizationKind === 'other'`. */\n organizationKindOther: z.string().trim().max(80).optional(),\n images: z.array(z.string().url()).max(CROWDFUNDING_MAX_IMAGES).optional(),\n /** Optional YouTube video URL. Validated as a URL here; the\n * client-side validator additionally checks the host/path matches\n * a recognised YouTube shape and extracts the video id for the\n * preview component. */\n youtubeUrl: z.string().url().optional(),\n\n goalAmountInr: z.number().int().min(CROWDFUNDING_MIN_GOAL_INR).max(CROWDFUNDING_MAX_GOAL_INR),\n /** Duration in days. The server resolves `closesAt = now +\n * durationDays * 86400 * 1000` so client clock skew can't push\n * the close-time into the past. */\n durationDays: z\n .number()\n .int()\n .min(CROWDFUNDING_MIN_DURATION_DAYS)\n .max(CROWDFUNDING_MAX_DURATION_DAYS),\n\n /**\n * Where the campaign should appear. Pick communities you're a\n * member of and/or flip the global-feed toggle. Server rejects an\n * empty/global-false combination at create time.\n */\n visibility: crowdfundingVisibilitySchema,\n\n // v0.37: dropped composer-side identity collection. Razorpay's\n // hosted onboarding (on the bank-link step) handles PAN, Aadhaar,\n // bank account verification, and address proof for every payee —\n // doing it ourselves was redundant and weakened the privacy story\n // (we held copies of regulatory-sensitive data we didn't need to).\n //\n // ─── Proof documents (v0.33+ — required at submit time) ──────────\n /**\n * Typed + described proof documents the verifier reviews. Optional\n * on the create/update body so an in-progress draft can be saved\n * without docs; the submit-for-review handler enforces a non-empty\n * list (the per-category minimum is enforced server-side via the\n * `CROWDFUNDING_REQUIRED_PROOF_TYPES_BY_CATEGORY` matrix).\n */\n proofDocuments: z\n .array(\n z.object({\n url: z.string().url(),\n type: crowdfundingProofDocTypeSchema,\n description: z.string().trim().min(3).max(200),\n /** Optional on the body; server stamps `now` if absent. */\n uploadedAt: z.string().datetime().optional(),\n }),\n )\n .max(CROWDFUNDING_MAX_PROOF_DOCS)\n .optional(),\n\n // ─── Terms & Conditions acceptance ───────────────────────────────\n /**\n * Version of the T&C the creator agreed to. Set by the composer's\n * T&C step; the submit-for-review handler rejects the campaign if\n * this isn't equal to the current `CROWDFUNDING_TERMS_VERSION`.\n */\n termsVersion: z.string().optional(),\n});\nexport type CreateCrowdfundingBody = z.infer<typeof createCrowdfundingBodySchema>;\n\n/**\n * Update body — only fields that are safe to change on a `draft` or\n * `rejected` campaign before resubmission. Verification + lifecycle\n * fields cannot be updated through this endpoint. Tier + identity\n * fields stay editable so a rejected campaign can fix what the\n * verifier flagged.\n */\nexport const updateCrowdfundingBodySchema = createCrowdfundingBodySchema.partial();\nexport type UpdateCrowdfundingBody = z.infer<typeof updateCrowdfundingBodySchema>;\n\n/**\n * What the verifier sends when approving. v0.35 introduced the two-\n * stage flow (district leader then state leader); the stage being\n * acted on is INFERRED from the leader's jurisdiction at the service\n * layer, not claimed in the body. The body stays an empty strict\n * object so transports that always POST a JSON body continue to work\n * and future fields can be added without a wire-shape change.\n */\nexport const approveCrowdfundingBodySchema = z.object({}).strict();\nexport type ApproveCrowdfundingBody = z.infer<typeof approveCrowdfundingBodySchema>;\n\n/**\n * Rejection body. Reason is required and surfaces back to the creator\n * so they can fix the gap and resubmit. Either the district or the\n * state stage can reject; the stage is inferred from the leader's\n * jurisdiction.\n */\nexport const rejectCrowdfundingBodySchema = z.object({\n reason: z\n .string()\n .trim()\n .min(CROWDFUNDING_REJECTION_REASON_MIN_CHARS)\n .max(CROWDFUNDING_REJECTION_REASON_MAX_CHARS),\n});\nexport type RejectCrowdfundingBody = z.infer<typeof rejectCrowdfundingBodySchema>;\n\n/**\n * Rerun a closed-timeout campaign. The creator opens an edit flow\n * with extended duration (+ optional goal/story tweaks) and re-\n * submits; the resubmit resets BOTH verification stages to pending,\n * and the campaign re-enters the district queue from scratch.\n *\n * Body carries only the new duration — the rest of the edits ride\n * the normal `updateCrowdfundingBodySchema` path that runs alongside\n * the rerun action. Duration is required; without it the rerun makes\n * no sense (the campaign would close immediately again).\n */\nexport const requestRerunCrowdfundingBodySchema = z.object({\n durationDays: z\n .number()\n .int()\n .min(CROWDFUNDING_MIN_DURATION_DAYS)\n .max(CROWDFUNDING_MAX_DURATION_DAYS),\n});\nexport type RequestRerunCrowdfundingBody = z.infer<typeof requestRerunCrowdfundingBodySchema>;\n\n// ─── Donation bodies ───────────────────────────────────────────────────────\n\n/**\n * Donor self-attests a donation. Receipt is OPTIONAL — the\n * attestation creates a `pending` row that the donor can attach a\n * receipt to later (anytime, from settings → My Donations) which\n * promotes it to `verified` and counts toward the progress bar.\n */\nexport const attestCrowdfundingDonationBodySchema = z.object({\n amountInr: z.number().int().min(1).max(CROWDFUNDING_MAX_DONATION_INR),\n isAnonymous: z.boolean().default(false),\n /** GCS URL of the receipt screenshot. When omitted the donation\n * enters `pending` state. */\n receiptUrl: z.string().url().optional(),\n});\nexport type AttestCrowdfundingDonationBody = z.infer<typeof attestCrowdfundingDonationBodySchema>;\n\n/**\n * Upload (or re-upload) a receipt for a previously-attested donation.\n * Promotes a `pending` row to `verified`; for an already-`verified`\n * row it replaces the receipt.\n */\nexport const uploadCrowdfundingReceiptBodySchema = z.object({\n receiptUrl: z.string().url(),\n});\nexport type UploadCrowdfundingReceiptBody = z.infer<typeof uploadCrowdfundingReceiptBodySchema>;\n\n// ─── Listing query ─────────────────────────────────────────────────────────\n\nexport const listCrowdfundingDonationsQuerySchema = z.object({\n page: z.number().int().positive().optional(),\n limit: z.number().int().positive().max(100).optional(),\n state: crowdfundingDonationStateSchema.optional(),\n});\nexport type ListCrowdfundingDonationsQuery = z.infer<typeof listCrowdfundingDonationsQuerySchema>;\n\n/**\n * Per-donor \"My Donations\" surface — different from the per-campaign\n * donor list. Returns every donation the viewer has attested, across\n * all campaigns, so the donor can spot any row that's still\n * `pending` and upload a receipt.\n */\nexport const listMyCrowdfundingDonationsQuerySchema = z.object({\n page: z.number().int().positive().optional(),\n limit: z.number().int().positive().max(100).optional(),\n state: crowdfundingDonationStateSchema.optional(),\n});\nexport type ListMyCrowdfundingDonationsQuery = z.infer<\n typeof listMyCrowdfundingDonationsQuerySchema\n>;\n"]}
|
package/dist/feed.d.ts
CHANGED
|
@@ -54,6 +54,115 @@ export declare const lostFoundStatusSchema: z.ZodEnum<{
|
|
|
54
54
|
expired: "expired";
|
|
55
55
|
}>;
|
|
56
56
|
export type LostFoundStatus = z.infer<typeof lostFoundStatusSchema>;
|
|
57
|
+
/**
|
|
58
|
+
* Structured location for a lost-found report. Mirrors the donations
|
|
59
|
+
* pickup address with deliberate omissions: lost-found reports
|
|
60
|
+
* describe an INCIDENT spot, not a delivery address, so
|
|
61
|
+
* - `housePlotDetails` and `pincode` are dropped (no postal logistics);
|
|
62
|
+
* - `coords` are dropped (no GPS capture — the reporter usually isn't
|
|
63
|
+
* standing at the spot when they file the report);
|
|
64
|
+
* - `landmark` + `directions` are kept (the user's free-text
|
|
65
|
+
* description of where).
|
|
66
|
+
*
|
|
67
|
+
* Every field is optional so a sparse report ("I lost it somewhere in
|
|
68
|
+
* Mumbai") is still valid.
|
|
69
|
+
*/
|
|
70
|
+
export declare const lostFoundLocationSchema: z.ZodObject<{
|
|
71
|
+
country: z.ZodOptional<z.ZodString>;
|
|
72
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
73
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
type: z.ZodOptional<z.ZodString>;
|
|
76
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
division: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
type: z.ZodOptional<z.ZodString>;
|
|
82
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
district: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
type: z.ZodOptional<z.ZodString>;
|
|
88
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
subDistrict: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
92
|
+
name: z.ZodString;
|
|
93
|
+
type: z.ZodOptional<z.ZodString>;
|
|
94
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
areaType: z.ZodOptional<z.ZodEnum<{
|
|
97
|
+
RURAL: "RURAL";
|
|
98
|
+
URBAN: "URBAN";
|
|
99
|
+
}>>;
|
|
100
|
+
block: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
type: z.ZodOptional<z.ZodString>;
|
|
104
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
gramPanchayat: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
108
|
+
name: z.ZodString;
|
|
109
|
+
type: z.ZodOptional<z.ZodString>;
|
|
110
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
village: z.ZodOptional<z.ZodObject<{
|
|
113
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
114
|
+
name: z.ZodString;
|
|
115
|
+
type: z.ZodOptional<z.ZodString>;
|
|
116
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, z.core.$strip>>;
|
|
118
|
+
hamlet: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
120
|
+
name: z.ZodString;
|
|
121
|
+
type: z.ZodOptional<z.ZodString>;
|
|
122
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
123
|
+
}, z.core.$strip>>;
|
|
124
|
+
ruralWard: z.ZodOptional<z.ZodObject<{
|
|
125
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
126
|
+
name: z.ZodString;
|
|
127
|
+
type: z.ZodOptional<z.ZodString>;
|
|
128
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
urbanBody: z.ZodOptional<z.ZodObject<{
|
|
131
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
132
|
+
name: z.ZodString;
|
|
133
|
+
type: z.ZodOptional<z.ZodString>;
|
|
134
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
135
|
+
}, z.core.$strip>>;
|
|
136
|
+
urbanWard: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
138
|
+
name: z.ZodString;
|
|
139
|
+
type: z.ZodOptional<z.ZodString>;
|
|
140
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, z.core.$strip>>;
|
|
142
|
+
locality: z.ZodOptional<z.ZodObject<{
|
|
143
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
144
|
+
name: z.ZodString;
|
|
145
|
+
type: z.ZodOptional<z.ZodString>;
|
|
146
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
policeStation: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
150
|
+
name: z.ZodString;
|
|
151
|
+
type: z.ZodOptional<z.ZodString>;
|
|
152
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
landmark: z.ZodOptional<z.ZodString>;
|
|
155
|
+
directions: z.ZodOptional<z.ZodString>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export type LostFoundLocation = z.infer<typeof lostFoundLocationSchema>;
|
|
158
|
+
/** HH:MM-format time window on the report's date. Either endpoint may
|
|
159
|
+
* be omitted, so the user can record "after 2pm", "before 4pm", or
|
|
160
|
+
* "between 2 and 4pm" with the same shape. */
|
|
161
|
+
export declare const lostFoundTimeRangeSchema: z.ZodObject<{
|
|
162
|
+
startTime: z.ZodOptional<z.ZodString>;
|
|
163
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export type LostFoundTimeRange = z.infer<typeof lostFoundTimeRangeSchema>;
|
|
57
166
|
/**
|
|
58
167
|
* Lost-and-found item projected into the feed.
|
|
59
168
|
*
|
|
@@ -118,8 +227,98 @@ export declare const lostFoundFeedItemSchema: z.ZodObject<{
|
|
|
118
227
|
id_cards: "id_cards";
|
|
119
228
|
}>>;
|
|
120
229
|
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
121
|
-
location: z.ZodOptional<z.
|
|
230
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
231
|
+
country: z.ZodOptional<z.ZodString>;
|
|
232
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
233
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
234
|
+
name: z.ZodString;
|
|
235
|
+
type: z.ZodOptional<z.ZodString>;
|
|
236
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
237
|
+
}, z.core.$strip>>;
|
|
238
|
+
division: z.ZodOptional<z.ZodObject<{
|
|
239
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
240
|
+
name: z.ZodString;
|
|
241
|
+
type: z.ZodOptional<z.ZodString>;
|
|
242
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
243
|
+
}, z.core.$strip>>;
|
|
244
|
+
district: z.ZodOptional<z.ZodObject<{
|
|
245
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
246
|
+
name: z.ZodString;
|
|
247
|
+
type: z.ZodOptional<z.ZodString>;
|
|
248
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
subDistrict: z.ZodOptional<z.ZodObject<{
|
|
251
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
252
|
+
name: z.ZodString;
|
|
253
|
+
type: z.ZodOptional<z.ZodString>;
|
|
254
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
255
|
+
}, z.core.$strip>>;
|
|
256
|
+
areaType: z.ZodOptional<z.ZodEnum<{
|
|
257
|
+
RURAL: "RURAL";
|
|
258
|
+
URBAN: "URBAN";
|
|
259
|
+
}>>;
|
|
260
|
+
block: z.ZodOptional<z.ZodObject<{
|
|
261
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
262
|
+
name: z.ZodString;
|
|
263
|
+
type: z.ZodOptional<z.ZodString>;
|
|
264
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
265
|
+
}, z.core.$strip>>;
|
|
266
|
+
gramPanchayat: z.ZodOptional<z.ZodObject<{
|
|
267
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
268
|
+
name: z.ZodString;
|
|
269
|
+
type: z.ZodOptional<z.ZodString>;
|
|
270
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
271
|
+
}, z.core.$strip>>;
|
|
272
|
+
village: z.ZodOptional<z.ZodObject<{
|
|
273
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
274
|
+
name: z.ZodString;
|
|
275
|
+
type: z.ZodOptional<z.ZodString>;
|
|
276
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
277
|
+
}, z.core.$strip>>;
|
|
278
|
+
hamlet: z.ZodOptional<z.ZodObject<{
|
|
279
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
280
|
+
name: z.ZodString;
|
|
281
|
+
type: z.ZodOptional<z.ZodString>;
|
|
282
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
283
|
+
}, z.core.$strip>>;
|
|
284
|
+
ruralWard: z.ZodOptional<z.ZodObject<{
|
|
285
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
286
|
+
name: z.ZodString;
|
|
287
|
+
type: z.ZodOptional<z.ZodString>;
|
|
288
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
289
|
+
}, z.core.$strip>>;
|
|
290
|
+
urbanBody: z.ZodOptional<z.ZodObject<{
|
|
291
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
292
|
+
name: z.ZodString;
|
|
293
|
+
type: z.ZodOptional<z.ZodString>;
|
|
294
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
295
|
+
}, z.core.$strip>>;
|
|
296
|
+
urbanWard: z.ZodOptional<z.ZodObject<{
|
|
297
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
298
|
+
name: z.ZodString;
|
|
299
|
+
type: z.ZodOptional<z.ZodString>;
|
|
300
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
301
|
+
}, z.core.$strip>>;
|
|
302
|
+
locality: z.ZodOptional<z.ZodObject<{
|
|
303
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
304
|
+
name: z.ZodString;
|
|
305
|
+
type: z.ZodOptional<z.ZodString>;
|
|
306
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
307
|
+
}, z.core.$strip>>;
|
|
308
|
+
policeStation: z.ZodOptional<z.ZodObject<{
|
|
309
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
310
|
+
name: z.ZodString;
|
|
311
|
+
type: z.ZodOptional<z.ZodString>;
|
|
312
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
313
|
+
}, z.core.$strip>>;
|
|
314
|
+
landmark: z.ZodOptional<z.ZodString>;
|
|
315
|
+
directions: z.ZodOptional<z.ZodString>;
|
|
316
|
+
}, z.core.$strip>>;
|
|
122
317
|
date: z.ZodOptional<z.ZodString>;
|
|
318
|
+
timeRange: z.ZodOptional<z.ZodObject<{
|
|
319
|
+
startTime: z.ZodOptional<z.ZodString>;
|
|
320
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
321
|
+
}, z.core.$strip>>;
|
|
123
322
|
collectionPoint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
124
323
|
contactPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
324
|
status: z.ZodOptional<z.ZodEnum<{
|
|
@@ -649,8 +848,98 @@ export declare const feedItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
649
848
|
id_cards: "id_cards";
|
|
650
849
|
}>>;
|
|
651
850
|
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
652
|
-
location: z.ZodOptional<z.
|
|
851
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
852
|
+
country: z.ZodOptional<z.ZodString>;
|
|
853
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
854
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
855
|
+
name: z.ZodString;
|
|
856
|
+
type: z.ZodOptional<z.ZodString>;
|
|
857
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
858
|
+
}, z.core.$strip>>;
|
|
859
|
+
division: z.ZodOptional<z.ZodObject<{
|
|
860
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
861
|
+
name: z.ZodString;
|
|
862
|
+
type: z.ZodOptional<z.ZodString>;
|
|
863
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
864
|
+
}, z.core.$strip>>;
|
|
865
|
+
district: z.ZodOptional<z.ZodObject<{
|
|
866
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
867
|
+
name: z.ZodString;
|
|
868
|
+
type: z.ZodOptional<z.ZodString>;
|
|
869
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
870
|
+
}, z.core.$strip>>;
|
|
871
|
+
subDistrict: z.ZodOptional<z.ZodObject<{
|
|
872
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
873
|
+
name: z.ZodString;
|
|
874
|
+
type: z.ZodOptional<z.ZodString>;
|
|
875
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
876
|
+
}, z.core.$strip>>;
|
|
877
|
+
areaType: z.ZodOptional<z.ZodEnum<{
|
|
878
|
+
RURAL: "RURAL";
|
|
879
|
+
URBAN: "URBAN";
|
|
880
|
+
}>>;
|
|
881
|
+
block: z.ZodOptional<z.ZodObject<{
|
|
882
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
883
|
+
name: z.ZodString;
|
|
884
|
+
type: z.ZodOptional<z.ZodString>;
|
|
885
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
886
|
+
}, z.core.$strip>>;
|
|
887
|
+
gramPanchayat: z.ZodOptional<z.ZodObject<{
|
|
888
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
889
|
+
name: z.ZodString;
|
|
890
|
+
type: z.ZodOptional<z.ZodString>;
|
|
891
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
892
|
+
}, z.core.$strip>>;
|
|
893
|
+
village: z.ZodOptional<z.ZodObject<{
|
|
894
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
895
|
+
name: z.ZodString;
|
|
896
|
+
type: z.ZodOptional<z.ZodString>;
|
|
897
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
898
|
+
}, z.core.$strip>>;
|
|
899
|
+
hamlet: z.ZodOptional<z.ZodObject<{
|
|
900
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
901
|
+
name: z.ZodString;
|
|
902
|
+
type: z.ZodOptional<z.ZodString>;
|
|
903
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
904
|
+
}, z.core.$strip>>;
|
|
905
|
+
ruralWard: z.ZodOptional<z.ZodObject<{
|
|
906
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
907
|
+
name: z.ZodString;
|
|
908
|
+
type: z.ZodOptional<z.ZodString>;
|
|
909
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
910
|
+
}, z.core.$strip>>;
|
|
911
|
+
urbanBody: z.ZodOptional<z.ZodObject<{
|
|
912
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
913
|
+
name: z.ZodString;
|
|
914
|
+
type: z.ZodOptional<z.ZodString>;
|
|
915
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
916
|
+
}, z.core.$strip>>;
|
|
917
|
+
urbanWard: z.ZodOptional<z.ZodObject<{
|
|
918
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
919
|
+
name: z.ZodString;
|
|
920
|
+
type: z.ZodOptional<z.ZodString>;
|
|
921
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
922
|
+
}, z.core.$strip>>;
|
|
923
|
+
locality: z.ZodOptional<z.ZodObject<{
|
|
924
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
925
|
+
name: z.ZodString;
|
|
926
|
+
type: z.ZodOptional<z.ZodString>;
|
|
927
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
928
|
+
}, z.core.$strip>>;
|
|
929
|
+
policeStation: z.ZodOptional<z.ZodObject<{
|
|
930
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
931
|
+
name: z.ZodString;
|
|
932
|
+
type: z.ZodOptional<z.ZodString>;
|
|
933
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
934
|
+
}, z.core.$strip>>;
|
|
935
|
+
landmark: z.ZodOptional<z.ZodString>;
|
|
936
|
+
directions: z.ZodOptional<z.ZodString>;
|
|
937
|
+
}, z.core.$strip>>;
|
|
653
938
|
date: z.ZodOptional<z.ZodString>;
|
|
939
|
+
timeRange: z.ZodOptional<z.ZodObject<{
|
|
940
|
+
startTime: z.ZodOptional<z.ZodString>;
|
|
941
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
942
|
+
}, z.core.$strip>>;
|
|
654
943
|
collectionPoint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
655
944
|
contactPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
656
945
|
status: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1355,8 +1644,98 @@ export declare const feedResponseSchema: z.ZodObject<{
|
|
|
1355
1644
|
id_cards: "id_cards";
|
|
1356
1645
|
}>>;
|
|
1357
1646
|
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1358
|
-
location: z.ZodOptional<z.
|
|
1647
|
+
location: z.ZodOptional<z.ZodObject<{
|
|
1648
|
+
country: z.ZodOptional<z.ZodString>;
|
|
1649
|
+
state: z.ZodOptional<z.ZodObject<{
|
|
1650
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1651
|
+
name: z.ZodString;
|
|
1652
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1653
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1654
|
+
}, z.core.$strip>>;
|
|
1655
|
+
division: z.ZodOptional<z.ZodObject<{
|
|
1656
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1657
|
+
name: z.ZodString;
|
|
1658
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1659
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1660
|
+
}, z.core.$strip>>;
|
|
1661
|
+
district: z.ZodOptional<z.ZodObject<{
|
|
1662
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1663
|
+
name: z.ZodString;
|
|
1664
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1665
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1666
|
+
}, z.core.$strip>>;
|
|
1667
|
+
subDistrict: z.ZodOptional<z.ZodObject<{
|
|
1668
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1669
|
+
name: z.ZodString;
|
|
1670
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1671
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1672
|
+
}, z.core.$strip>>;
|
|
1673
|
+
areaType: z.ZodOptional<z.ZodEnum<{
|
|
1674
|
+
RURAL: "RURAL";
|
|
1675
|
+
URBAN: "URBAN";
|
|
1676
|
+
}>>;
|
|
1677
|
+
block: z.ZodOptional<z.ZodObject<{
|
|
1678
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1679
|
+
name: z.ZodString;
|
|
1680
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1681
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1682
|
+
}, z.core.$strip>>;
|
|
1683
|
+
gramPanchayat: z.ZodOptional<z.ZodObject<{
|
|
1684
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1685
|
+
name: z.ZodString;
|
|
1686
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1687
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1688
|
+
}, z.core.$strip>>;
|
|
1689
|
+
village: z.ZodOptional<z.ZodObject<{
|
|
1690
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1691
|
+
name: z.ZodString;
|
|
1692
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1693
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1694
|
+
}, z.core.$strip>>;
|
|
1695
|
+
hamlet: z.ZodOptional<z.ZodObject<{
|
|
1696
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1697
|
+
name: z.ZodString;
|
|
1698
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1699
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1700
|
+
}, z.core.$strip>>;
|
|
1701
|
+
ruralWard: z.ZodOptional<z.ZodObject<{
|
|
1702
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1703
|
+
name: z.ZodString;
|
|
1704
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1705
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1706
|
+
}, z.core.$strip>>;
|
|
1707
|
+
urbanBody: z.ZodOptional<z.ZodObject<{
|
|
1708
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1709
|
+
name: z.ZodString;
|
|
1710
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1711
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1712
|
+
}, z.core.$strip>>;
|
|
1713
|
+
urbanWard: z.ZodOptional<z.ZodObject<{
|
|
1714
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1715
|
+
name: z.ZodString;
|
|
1716
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1717
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1718
|
+
}, z.core.$strip>>;
|
|
1719
|
+
locality: z.ZodOptional<z.ZodObject<{
|
|
1720
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1721
|
+
name: z.ZodString;
|
|
1722
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1723
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1724
|
+
}, z.core.$strip>>;
|
|
1725
|
+
policeStation: z.ZodOptional<z.ZodObject<{
|
|
1726
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
1727
|
+
name: z.ZodString;
|
|
1728
|
+
type: z.ZodOptional<z.ZodString>;
|
|
1729
|
+
urbanBodyType: z.ZodOptional<z.ZodString>;
|
|
1730
|
+
}, z.core.$strip>>;
|
|
1731
|
+
landmark: z.ZodOptional<z.ZodString>;
|
|
1732
|
+
directions: z.ZodOptional<z.ZodString>;
|
|
1733
|
+
}, z.core.$strip>>;
|
|
1359
1734
|
date: z.ZodOptional<z.ZodString>;
|
|
1735
|
+
timeRange: z.ZodOptional<z.ZodObject<{
|
|
1736
|
+
startTime: z.ZodOptional<z.ZodString>;
|
|
1737
|
+
endTime: z.ZodOptional<z.ZodString>;
|
|
1738
|
+
}, z.core.$strip>>;
|
|
1360
1739
|
collectionPoint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1361
1740
|
contactPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1362
1741
|
status: z.ZodOptional<z.ZodEnum<{
|
package/dist/feed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../src/feed.ts"],"names":[],"mappings":"AAAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAG9D,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/feed.js
CHANGED
|
@@ -54,6 +54,73 @@ export const lostFoundCategorySchema = z.enum(LOST_FOUND_CATEGORY_VALUES);
|
|
|
54
54
|
*/
|
|
55
55
|
export const LOST_FOUND_STATUS_VALUES = ['active', 'resolved', 'expired'];
|
|
56
56
|
export const lostFoundStatusSchema = z.enum(LOST_FOUND_STATUS_VALUES);
|
|
57
|
+
/**
|
|
58
|
+
* Slim area reference snapshot — mirrors the donations PickupAddress
|
|
59
|
+
* AreaRefSnapshot. Stored on lost-found reports so the location pill
|
|
60
|
+
* can show "Locality, District, State" without an Area lookup.
|
|
61
|
+
*/
|
|
62
|
+
const lostFoundAreaRefSchema = z.object({
|
|
63
|
+
_id: z.string().optional(),
|
|
64
|
+
name: z.string(),
|
|
65
|
+
type: z.string().optional(),
|
|
66
|
+
urbanBodyType: z.string().optional(),
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* Structured location for a lost-found report. Mirrors the donations
|
|
70
|
+
* pickup address with deliberate omissions: lost-found reports
|
|
71
|
+
* describe an INCIDENT spot, not a delivery address, so
|
|
72
|
+
* - `housePlotDetails` and `pincode` are dropped (no postal logistics);
|
|
73
|
+
* - `coords` are dropped (no GPS capture — the reporter usually isn't
|
|
74
|
+
* standing at the spot when they file the report);
|
|
75
|
+
* - `landmark` + `directions` are kept (the user's free-text
|
|
76
|
+
* description of where).
|
|
77
|
+
*
|
|
78
|
+
* Every field is optional so a sparse report ("I lost it somewhere in
|
|
79
|
+
* Mumbai") is still valid.
|
|
80
|
+
*/
|
|
81
|
+
export const lostFoundLocationSchema = z.object({
|
|
82
|
+
country: z.string().optional(),
|
|
83
|
+
state: lostFoundAreaRefSchema.optional(),
|
|
84
|
+
division: lostFoundAreaRefSchema.optional(),
|
|
85
|
+
district: lostFoundAreaRefSchema.optional(),
|
|
86
|
+
subDistrict: lostFoundAreaRefSchema.optional(),
|
|
87
|
+
areaType: z.enum(['RURAL', 'URBAN']).optional(),
|
|
88
|
+
block: lostFoundAreaRefSchema.optional(),
|
|
89
|
+
gramPanchayat: lostFoundAreaRefSchema.optional(),
|
|
90
|
+
village: lostFoundAreaRefSchema.optional(),
|
|
91
|
+
hamlet: lostFoundAreaRefSchema.optional(),
|
|
92
|
+
ruralWard: lostFoundAreaRefSchema.optional(),
|
|
93
|
+
urbanBody: lostFoundAreaRefSchema.optional(),
|
|
94
|
+
urbanWard: lostFoundAreaRefSchema.optional(),
|
|
95
|
+
locality: lostFoundAreaRefSchema.optional(),
|
|
96
|
+
policeStation: lostFoundAreaRefSchema.optional(),
|
|
97
|
+
/** Free-text landmark, e.g. "near the bus stop". */
|
|
98
|
+
landmark: z.string().max(200).optional(),
|
|
99
|
+
/** Free-text additional context, e.g. "south-west corner near the
|
|
100
|
+
* parking lot". Stored as `directions` on the model to match the
|
|
101
|
+
* donations naming so the shared address normaliser works without
|
|
102
|
+
* a per-feature aliasing layer. */
|
|
103
|
+
directions: z.string().max(500).optional(),
|
|
104
|
+
});
|
|
105
|
+
/** HH:MM-format time window on the report's date. Either endpoint may
|
|
106
|
+
* be omitted, so the user can record "after 2pm", "before 4pm", or
|
|
107
|
+
* "between 2 and 4pm" with the same shape. */
|
|
108
|
+
export const lostFoundTimeRangeSchema = z
|
|
109
|
+
.object({
|
|
110
|
+
startTime: z
|
|
111
|
+
.string()
|
|
112
|
+
.regex(/^([01]\d|2[0-3]):[0-5]\d$/, 'startTime must be HH:MM (24-hour)')
|
|
113
|
+
.optional(),
|
|
114
|
+
endTime: z
|
|
115
|
+
.string()
|
|
116
|
+
.regex(/^([01]\d|2[0-3]):[0-5]\d$/, 'endTime must be HH:MM (24-hour)')
|
|
117
|
+
.optional(),
|
|
118
|
+
})
|
|
119
|
+
// At least one endpoint must be set — an empty `{}` adds no
|
|
120
|
+
// information and is omitted by the form before submit.
|
|
121
|
+
.refine((tr) => Boolean(tr.startTime || tr.endTime), {
|
|
122
|
+
message: 'timeRange must include at least startTime or endTime',
|
|
123
|
+
});
|
|
57
124
|
/**
|
|
58
125
|
* Lost-and-found item projected into the feed.
|
|
59
126
|
*
|
|
@@ -82,11 +149,27 @@ export const lostFoundFeedItemSchema = z.object({
|
|
|
82
149
|
* swipeable carousel; the legacy `imageUrl` field below is kept
|
|
83
150
|
* as a deprecated alias for `images[0]`. */
|
|
84
151
|
images: z.array(z.string().url()).max(5).optional(),
|
|
85
|
-
/**
|
|
86
|
-
|
|
152
|
+
/** Where the item was lost / found.
|
|
153
|
+
*
|
|
154
|
+
* Structured shape: the area-hierarchy snapshot the user picked in
|
|
155
|
+
* the LostFoundLocationDrawer plus optional `landmark` /
|
|
156
|
+
* `directions` free-text. The card composes a single human-readable
|
|
157
|
+
* string from these for the location pill.
|
|
158
|
+
*
|
|
159
|
+
* Backward compat: rows created before this migration carry a plain
|
|
160
|
+
* string. The projector converts those legacy values to
|
|
161
|
+
* `{ landmark: <string> }` on the way out so the wire always speaks
|
|
162
|
+
* the new shape and the card stays simple. */
|
|
163
|
+
location: lostFoundLocationSchema.optional(),
|
|
87
164
|
/** Event date — when the item was lost / found. Distinct from
|
|
88
165
|
* `createdAt`. */
|
|
89
166
|
date: z.string().datetime().optional(),
|
|
167
|
+
/** Optional time window on the report's `date` when the user
|
|
168
|
+
* believes the item was lost or found. Both endpoints are HH:MM
|
|
169
|
+
* strings (24-hour) and both are optional so the user can supply
|
|
170
|
+
* just a start, just an end, or both. Omitted entirely when the
|
|
171
|
+
* user couldn't narrow it down to a time. */
|
|
172
|
+
timeRange: lostFoundTimeRangeSchema.optional(),
|
|
90
173
|
/** For `kind === 'found'`: instructions on where to collect the
|
|
91
174
|
* item. Null on `lost` reports. */
|
|
92
175
|
collectionPoint: z.string().nullable().optional(),
|
package/dist/feed.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feed.js","sourceRoot":"","sources":["../src/feed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAE9E,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,aAAa;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;IACtE,KAAK,EAAE,qBAAqB;IAC5B,kEAAkE;IAClE,IAAI,EAAE,cAAc,CAAC,QAAQ,EAAE;IAC/B,8DAA8D;IAC9D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,2DAA2D;IAC3D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;IAC9B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC;AAGH,iEAAiE;AACjE,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["/**\n * Feed wire shapes — polymorphic union of community posts, lost-and-\n * found reports, and voice-box (complaints + suggestions).\n *\n * The feed is a SINGLE list typed as `FeedItem = Post | LostFound | VoiceBox`.\n * The client discriminates on `contentKind` and renders the matching\n * card component.\n *\n * Strategy notes (server-side):\n * - Read-time fanout. The server runs ONE parallel query per kind\n * filtered by the same area-lineage match and the same cascade-\n * upward visibility rule, then merges and sorts by `hot` score.\n * - Cursor-based pagination. The cursor is opaque (base64 of\n * `<sortKey>|<_id>`) so we can swap sort algorithms without a\n * breaking change.\n * - LostFound / VoiceBox shapes are pruned to the fields the feed\n * card needs — they keep their richer detail-page shape in their\n * own schemas (lost-found-schema, voice-box-schema if/when those\n * get factored out).\n *\n * @module community-schema/feed\n */\n\nimport { z } from 'zod';\nimport { FEED_PAGE_SIZE } from './constants.js';\nimport { crowdfundingFeedItemSchema } from './crowdfunding.js';\nimport { voteValueSchema } from './engagement.js';\nimport { feedSortSchema, visibilityLevelSchema } from './enums.js';\nimport { communityPollFeedItemSchema } from './poll.js';\nimport { communityPostWireSchema, postAuthorSnapshotSchema } from './post.js';\n\n// ─── Per-kind feed envelopes ───────────────────────────────────────────────\n\n/**\n * Lost-and-found category enum — mirrors the reform-backend\n * `LOST_FOUND_CATEGORY` map. Stable English snake_case slugs; the\n * card maps each to an icon + localised label.\n */\nexport const LOST_FOUND_CATEGORY_VALUES = [\n 'electronics',\n 'jewelry',\n 'documents',\n 'clothing',\n 'pets',\n 'bags_luggage',\n 'keys',\n 'wallet_purse',\n 'phone',\n 'id_cards',\n 'other',\n] as const;\nexport const lostFoundCategorySchema = z.enum(LOST_FOUND_CATEGORY_VALUES);\nexport type LostFoundCategory = z.infer<typeof lostFoundCategorySchema>;\n\n/**\n * Lost-and-found status — `active` is the in-feed state, `resolved`\n * means a claim closed the report, `expired` means the auto-archive\n * window passed.\n */\nexport const LOST_FOUND_STATUS_VALUES = ['active', 'resolved', 'expired'] as const;\nexport const lostFoundStatusSchema = z.enum(LOST_FOUND_STATUS_VALUES);\nexport type LostFoundStatus = z.infer<typeof lostFoundStatusSchema>;\n\n/**\n * Lost-and-found item projected into the feed.\n *\n * v3 wire — extended to carry every field the production card renders\n * inline, so a single feed read serves the whole row. The detail page\n * (which loads `IReformLostFoundReport` directly) carries the long\n * tail of fields like `creatorName`, `resolvedWith`, audit logs.\n */\nexport const lostFoundFeedItemSchema = z.object({\n _id: z.string(),\n contentKind: z.literal('lost_found'),\n author: postAuthorSnapshotSchema,\n\n /** `'lost'` or `'found'` — drives the ribbon banner colour. */\n kind: z.enum(['lost', 'found']),\n title: z.string(),\n description: z.string(),\n\n // ─── v3 additions (all optional for backward compat) ─────────────\n // Live consumers reading the v1 wire keep working because every\n // new field is optional. The v3 projector populates them; the v3\n // card reads them. As consumers migrate to v3, the optionality can\n // tighten in a future minor bump.\n /** Curated category — drives the category icon + label chip.\n * Optional only until the v3 projector ships. */\n category: lostFoundCategorySchema.optional(),\n /** All images attached to the report (up to 5). The card renders a\n * swipeable carousel; the legacy `imageUrl` field below is kept\n * as a deprecated alias for `images[0]`. */\n images: z.array(z.string().url()).max(5).optional(),\n /** Free-text location where the item was lost / found. */\n location: z.string().optional(),\n /** Event date — when the item was lost / found. Distinct from\n * `createdAt`. */\n date: z.string().datetime().optional(),\n /** For `kind === 'found'`: instructions on where to collect the\n * item. Null on `lost` reports. */\n collectionPoint: z.string().nullable().optional(),\n /** Public dial-back number captured on the report. */\n contactPhone: z.string().nullable().optional(),\n /** Lifecycle status. */\n status: lostFoundStatusSchema.optional(),\n /** Distinct-claimant count — drives the \"3 claims\" social-proof\n * chip. Maintained by the LostFoundClaim service. */\n claimCount: z.number().int().nonnegative().optional(),\n /** Free-text reward note (\"₹2,500\", \"Will treat to dinner\"). */\n rewardOffered: z.string().max(40).nullable().optional(),\n\n /** Deprecated single primary image. New consumers should read\n * `images[0]`; kept on the wire for the v1 card path. */\n imageUrl: z.string().url().optional(),\n\n /** Inherited engagement axis — same shape as posts. Score is the\n * signed net (upvotes - downvotes), can be negative. */\n score: z.number().int(),\n commentCount: z.number().int().nonnegative(),\n repostCount: z.number().int().nonnegative(),\n reactionCounts: z.record(z.string(), z.number().int().nonnegative()),\n\n createdAt: z.string().datetime(),\n\n viewer: z\n .object({\n vote: voteValueSchema.nullable(),\n reaction: z.string().nullable(),\n bookmarked: z.boolean(),\n isAuthor: z.boolean(),\n reposted: z.boolean(),\n })\n .optional(),\n});\nexport type LostFoundFeedItem = z.infer<typeof lostFoundFeedItemSchema>;\n\n/**\n * Donate-item status — mirrors the reform-backend\n * `ITEM_DONATION_STATUS` enum. `CANCELLED` is a terminal out-of-band\n * state (donor or admin withdrew the listing).\n */\nexport const DONATE_ITEM_STATUS_VALUES = [\n 'PENDING',\n 'VERIFIED',\n 'AT_CENTER',\n 'CANCELLED',\n 'DONATED',\n] as const;\nexport const donateItemStatusSchema = z.enum(DONATE_ITEM_STATUS_VALUES);\nexport type DonateItemStatus = z.infer<typeof donateItemStatusSchema>;\n\n/**\n * Item-condition labels surfaced on the chip. Mirrors the reform-\n * backend `ITEM_CONDITION` enum.\n */\nexport const DONATE_ITEM_CONDITION_VALUES = [\n 'NEW',\n 'LIKE_NEW',\n 'GOOD',\n 'FAIR',\n 'OLD_FUNCTIONAL',\n 'NEEDS_MINOR_REPAIR',\n 'NEEDS_MAJOR_REPAIR',\n 'FOR_PARTS',\n] as const;\nexport const donateItemConditionSchema = z.enum(DONATE_ITEM_CONDITION_VALUES);\nexport type DonateItemCondition = z.infer<typeof donateItemConditionSchema>;\n\n/** Audit summary shapes — short, denormalised projections of the\n * underlying pipeline blocks. The detail page carries the full\n * notes; the feed card just needs the \"who + when\". */\nexport const donateAuditByAtSchema = z.object({\n /** Display name of the person who performed the step. */\n byName: z.string(),\n /** When the step happened. */\n at: z.string().datetime(),\n});\nexport const donateAuditAtSchema = z.object({ at: z.string().datetime() });\nexport const donateDonatedToSchema = z.object({\n /** Name of the recipient (person or institution). */\n name: z.string(),\n at: z.string().datetime(),\n});\n\n/**\n * Donated-item listing projected into the feed.\n *\n * v3 wire — extended to carry every field the production card renders\n * inline. The full pickup-address sub-doc, verification notes, and\n * pipeline notes stay on the detail page.\n */\nexport const donateItemFeedItemSchema = z.object({\n _id: z.string(),\n contentKind: z.literal('donate_item'),\n /** Author of the donation. When `isAnonymous` is true, the wire\n * still ships a placeholder author (initials + neutral gradient,\n * no real `username` / `displayName`) — the server scrubs PII so\n * the wire is the privacy boundary, not the card. */\n author: postAuthorSnapshotSchema,\n\n /** Display name of the item. */\n itemName: z.string(),\n /** Optional free-text description. */\n description: z.string().optional(),\n /** Free-text category for now (the backend enum is widening; keeping\n * this open avoids a schema break each time a category is added). */\n category: z.string(),\n /** Item condition. Optional only because legacy rows pre-date the\n * field; new writes always populate it. */\n condition: donateItemConditionSchema.optional(),\n\n /** Lifecycle status — `string` for backward compat with v1\n * consumers that received an open string; v3 consumers should\n * refine against `donateItemStatusSchema`. */\n status: z.string(),\n\n // ─── v3 additions (all optional for backward compat) ─────────────\n /** Estimated worth in INR (₹). Null when the donor declined. */\n estimatedWorthInr: z.number().int().nullable().optional(),\n /** All photos attached to the donation (up to 3). */\n photos: z.array(z.string().url()).max(3).optional(),\n /** Donor opted to hide identity on the public feed. */\n isAnonymous: z.boolean().optional(),\n /** Distance from the viewer's `currentLocation` in km. */\n distanceKm: z.number().nonnegative().nullable().optional(),\n /** Date after which the donor is no longer available. */\n availableUntil: z.string().datetime().nullable().optional(),\n /** Pipeline audit summaries — each null when the step hasn't\n * happened yet. The card progressively reveals the blocks as the\n * donation moves through the pipeline. */\n verification: donateAuditByAtSchema.nullable().optional(),\n pickup: donateAuditByAtSchema.nullable().optional(),\n centerSubmission: donateAuditAtSchema.nullable().optional(),\n donatedTo: donateDonatedToSchema.nullable().optional(),\n\n /** Deprecated single primary image. New consumers should read\n * `photos[0]`; kept on the wire for the v1 card path. */\n imageUrl: z.string().url().optional(),\n\n score: z.number().int(),\n commentCount: z.number().int().nonnegative(),\n repostCount: z.number().int().nonnegative(),\n reactionCounts: z.record(z.string(), z.number().int().nonnegative()),\n\n createdAt: z.string().datetime(),\n\n viewer: z\n .object({\n vote: voteValueSchema.nullable(),\n reaction: z.string().nullable(),\n bookmarked: z.boolean(),\n isAuthor: z.boolean(),\n reposted: z.boolean(),\n })\n .optional(),\n});\nexport type DonateItemFeedItem = z.infer<typeof donateItemFeedItemSchema>;\n\n/**\n * Voice-box priority — mirrors `IReformIssueReport.priority`.\n * Drives the side-stripe colour on the complaint card.\n */\nexport const VOICE_BOX_PRIORITY_VALUES = ['low', 'medium', 'high', 'critical'] as const;\nexport const voiceBoxPrioritySchema = z.enum(VOICE_BOX_PRIORITY_VALUES);\nexport type VoiceBoxPriority = z.infer<typeof voiceBoxPrioritySchema>;\n\n/**\n * Voice-box lifecycle status. Five states matching the model — the\n * card surfaces `pending`/`under_review`/`in_progress` as in-flight\n * pills, `resolved` as a green resolution footer, `rejected` as\n * neutral with an explanation.\n */\nexport const VOICE_BOX_STATUS_VALUES = [\n 'pending',\n 'under_review',\n 'in_progress',\n 'resolved',\n 'rejected',\n] as const;\nexport const voiceBoxStatusSchema = z.enum(VOICE_BOX_STATUS_VALUES);\nexport type VoiceBoxStatus = z.infer<typeof voiceBoxStatusSchema>;\n\n/** Inline-playable audio attachment (voice complaint). The model\n * stores `IssueAudio` with `url + gcpPath + uploadedAt + duration`;\n * the wire is trimmed to what the card needs to render the WhatsApp-\n * style voice note bar. */\nexport const voiceBoxAudioSchema = z.object({\n url: z.string().url(),\n /** Duration in seconds. Drives the bar's duration chip. */\n durationSec: z.number().positive(),\n});\n\n/** Inline-playable video attachment (single native upload). */\nexport const voiceBoxVideoSchema = z.object({\n url: z.string().url(),\n thumbnailUrl: z.string().url(),\n durationSec: z.number().positive(),\n});\n\n/** Officer-response summary projected onto the feed wire so the card\n * can render the sky-blue \"Official response\" block without a\n * second round trip. Full text + reply audit log live on the\n * detail page. */\nexport const voiceBoxOfficerResponseSchema = z.object({\n /** Display name of the assigned officer. */\n officerName: z.string(),\n /** Officer's designation (Pradhan / Mayor / Junior Engineer / ...).\n * Null when the assigned user has no civic designation. */\n designation: z.string().nullable(),\n /** Truncated response text — max 280 chars. The full note lives on\n * the detail page. */\n text: z.string().max(280),\n respondedAt: z.string().datetime(),\n});\n\n/** Location block — denormalised at write time, surfaced inline on\n * the card. Lat/lng are intentionally NOT on the wire to keep\n * reporter privacy intact; the detail page can fetch them under a\n * separate authenticated read if a map view is added. */\nexport const voiceBoxLocationSchema = z.object({\n address: z.string(),\n district: z.string(),\n pinCode: z.string(),\n});\n\n/**\n * Voice-box (complaint or suggestion) item projected into the feed.\n *\n * v3 wire — extended from the v1 stub to carry every field the\n * civic-grade card renders. Privacy: `reporterPhone` is replaced by a\n * `hasReporterPhone` boolean so the public feed can show a Call CTA\n * without exposing the raw number; the detail page issues the\n * authenticated read that returns the actual tel: target.\n */\nexport const voiceBoxFeedItemSchema = z.object({\n _id: z.string(),\n contentKind: z.literal('voice_box'),\n author: postAuthorSnapshotSchema,\n\n /** `'complaint'` or `'suggestion'` — drives the card chrome (priority\n * stripe vs. Reddit-vote rail). */\n kind: z.enum(['complaint', 'suggestion']),\n title: z.string(),\n description: z.string(),\n\n // ─── v3 additions (all optional for backward compat) ─────────────\n // The v1 wire shipped only `kind / title / description`. The v3\n // card needs the full set; until the projector is upgraded the\n // fields here remain optional so production reads still validate.\n /** Free-text civic category (Water Supply / Electricity / ...). */\n category: z.string().optional(),\n /** Severity — drives the priority side stripe. */\n priority: voiceBoxPrioritySchema.optional(),\n /** Lifecycle status. */\n status: voiceBoxStatusSchema.optional(),\n\n /** Photo evidence (up to 10 per the model). */\n images: z.array(z.string().url()).max(10).optional(),\n /** Voice-note attachment. */\n audio: voiceBoxAudioSchema.nullable().optional(),\n /** Single native video upload. */\n video: voiceBoxVideoSchema.nullable().optional(),\n /** External video links (YouTube / Vimeo). */\n videoLinks: z.array(z.string().url()).max(5).optional(),\n\n /** Address breakdown the card renders. */\n location: voiceBoxLocationSchema.optional(),\n\n /** Whether the report has a public-contact phone. The Call pill\n * links to a separate authenticated read that resolves the\n * number — keeping the raw phone out of the cached feed\n * response. */\n hasReporterPhone: z.boolean().optional(),\n\n /** Assigned-officer response summary. */\n officerResponse: voiceBoxOfficerResponseSchema.nullable().optional(),\n /** Resolution timestamp — surfaces the green resolution footer. */\n resolvedAt: z.string().datetime().nullable().optional(),\n\n score: z.number().int(),\n commentCount: z.number().int().nonnegative(),\n repostCount: z.number().int().nonnegative(),\n reactionCounts: z.record(z.string(), z.number().int().nonnegative()),\n\n createdAt: z.string().datetime(),\n\n viewer: z\n .object({\n vote: voteValueSchema.nullable(),\n reaction: z.string().nullable(),\n bookmarked: z.boolean(),\n isAuthor: z.boolean(),\n reposted: z.boolean(),\n })\n .optional(),\n});\nexport type VoiceBoxFeedItem = z.infer<typeof voiceBoxFeedItemSchema>;\n\n// ─── Polymorphic union ─────────────────────────────────────────────────────\n\nexport const feedItemSchema = z.discriminatedUnion('contentKind', [\n communityPostWireSchema,\n lostFoundFeedItemSchema,\n voiceBoxFeedItemSchema,\n donateItemFeedItemSchema,\n communityPollFeedItemSchema,\n crowdfundingFeedItemSchema,\n]);\nexport type FeedItem = z.infer<typeof feedItemSchema>;\n\n// ─── Query + response ──────────────────────────────────────────────────────\n\nexport const feedQueryParamsSchema = z.object({\n /** The viewer's chosen feed level. Cascade-upward semantics apply. */\n level: visibilityLevelSchema,\n /** Sort algorithm. Defaults to `hot` server-side when omitted. */\n sort: feedSortSchema.optional(),\n /** Opaque pagination cursor returned by the previous page. */\n cursor: z.string().optional(),\n /** Page size; defaults to `FEED_PAGE_SIZE` server-side. */\n pageSize: z.number().int().positive().max(50).optional(),\n});\nexport type FeedQueryParams = z.infer<typeof feedQueryParamsSchema>;\n\nexport const feedResponseSchema = z.object({\n items: z.array(feedItemSchema),\n nextCursor: z.string().nullable(),\n});\nexport type FeedResponse = z.infer<typeof feedResponseSchema>;\n\n// Re-export so consumers don't have to also import constants.ts.\nexport { FEED_PAGE_SIZE };\n"]}
|
|
1
|
+
{"version":3,"file":"feed.js","sourceRoot":"","sources":["../src/feed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAE9E,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,aAAa;IACb,SAAS;IACT,WAAW;IACX,UAAU;IACV,MAAM;IACN,cAAc;IACd,MAAM;IACN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cesContent":["/**\n * Feed wire shapes — polymorphic union of community posts, lost-and-\n * found reports, and voice-box (complaints + suggestions).\n *\n * The feed is a SINGLE list typed as `FeedItem = Post | LostFound | VoiceBox`.\n * The client discriminates on `contentKind` and renders the matching\n * card component.\n *\n * Strategy notes (server-side):\n * - Read-time fanout. The server runs ONE parallel query per kind\n * filtered by the same area-lineage match and the same cascade-\n * upward visibility rule, then merges and sorts by `hot` score.\n * - Cursor-based pagination. The cursor is opaque (base64 of\n * `<sortKey>|<_id>`) so we can swap sort algorithms without a\n * breaking change.\n * - LostFound / VoiceBox shapes are pruned to the fields the feed\n * card needs — they keep their richer detail-page shape in their\n * own schemas (lost-found-schema, voice-box-schema if/when those\n * get factored out).\n *\n * @module community-schema/feed\n */\n\nimport { z } from 'zod';\nimport { FEED_PAGE_SIZE } from './constants.js';\nimport { crowdfundingFeedItemSchema } from './crowdfunding.js';\nimport { voteValueSchema } from './engagement.js';\nimport { feedSortSchema, visibilityLevelSchema } from './enums.js';\nimport { communityPollFeedItemSchema } from './poll.js';\nimport { communityPostWireSchema, postAuthorSnapshotSchema } from './post.js';\n\n// ─── Per-kind feed envelopes ───────────────────────────────────────────────\n\n/**\n * Lost-and-found category enum — mirrors the reform-backend\n * `LOST_FOUND_CATEGORY` map. Stable English snake_case slugs; the\n * card maps each to an icon + localised label.\n */\nexport const LOST_FOUND_CATEGORY_VALUES = [\n 'electronics',\n 'jewelry',\n 'documents',\n 'clothing',\n 'pets',\n 'bags_luggage',\n 'keys',\n 'wallet_purse',\n 'phone',\n 'id_cards',\n 'other',\n] as const;\nexport const lostFoundCategorySchema = z.enum(LOST_FOUND_CATEGORY_VALUES);\nexport type LostFoundCategory = z.infer<typeof lostFoundCategorySchema>;\n\n/**\n * Lost-and-found status — `active` is the in-feed state, `resolved`\n * means a claim closed the report, `expired` means the auto-archive\n * window passed.\n */\nexport const LOST_FOUND_STATUS_VALUES = ['active', 'resolved', 'expired'] as const;\nexport const lostFoundStatusSchema = z.enum(LOST_FOUND_STATUS_VALUES);\nexport type LostFoundStatus = z.infer<typeof lostFoundStatusSchema>;\n\n/**\n * Slim area reference snapshot — mirrors the donations PickupAddress\n * AreaRefSnapshot. Stored on lost-found reports so the location pill\n * can show \"Locality, District, State\" without an Area lookup.\n */\nconst lostFoundAreaRefSchema = z.object({\n _id: z.string().optional(),\n name: z.string(),\n type: z.string().optional(),\n urbanBodyType: z.string().optional(),\n});\n\n/**\n * Structured location for a lost-found report. Mirrors the donations\n * pickup address with deliberate omissions: lost-found reports\n * describe an INCIDENT spot, not a delivery address, so\n * - `housePlotDetails` and `pincode` are dropped (no postal logistics);\n * - `coords` are dropped (no GPS capture — the reporter usually isn't\n * standing at the spot when they file the report);\n * - `landmark` + `directions` are kept (the user's free-text\n * description of where).\n *\n * Every field is optional so a sparse report (\"I lost it somewhere in\n * Mumbai\") is still valid.\n */\nexport const lostFoundLocationSchema = z.object({\n country: z.string().optional(),\n state: lostFoundAreaRefSchema.optional(),\n division: lostFoundAreaRefSchema.optional(),\n district: lostFoundAreaRefSchema.optional(),\n subDistrict: lostFoundAreaRefSchema.optional(),\n areaType: z.enum(['RURAL', 'URBAN']).optional(),\n block: lostFoundAreaRefSchema.optional(),\n gramPanchayat: lostFoundAreaRefSchema.optional(),\n village: lostFoundAreaRefSchema.optional(),\n hamlet: lostFoundAreaRefSchema.optional(),\n ruralWard: lostFoundAreaRefSchema.optional(),\n urbanBody: lostFoundAreaRefSchema.optional(),\n urbanWard: lostFoundAreaRefSchema.optional(),\n locality: lostFoundAreaRefSchema.optional(),\n policeStation: lostFoundAreaRefSchema.optional(),\n /** Free-text landmark, e.g. \"near the bus stop\". */\n landmark: z.string().max(200).optional(),\n /** Free-text additional context, e.g. \"south-west corner near the\n * parking lot\". Stored as `directions` on the model to match the\n * donations naming so the shared address normaliser works without\n * a per-feature aliasing layer. */\n directions: z.string().max(500).optional(),\n});\nexport type LostFoundLocation = z.infer<typeof lostFoundLocationSchema>;\n\n/** HH:MM-format time window on the report's date. Either endpoint may\n * be omitted, so the user can record \"after 2pm\", \"before 4pm\", or\n * \"between 2 and 4pm\" with the same shape. */\nexport const lostFoundTimeRangeSchema = z\n .object({\n startTime: z\n .string()\n .regex(/^([01]\\d|2[0-3]):[0-5]\\d$/, 'startTime must be HH:MM (24-hour)')\n .optional(),\n endTime: z\n .string()\n .regex(/^([01]\\d|2[0-3]):[0-5]\\d$/, 'endTime must be HH:MM (24-hour)')\n .optional(),\n })\n // At least one endpoint must be set — an empty `{}` adds no\n // information and is omitted by the form before submit.\n .refine((tr) => Boolean(tr.startTime || tr.endTime), {\n message: 'timeRange must include at least startTime or endTime',\n });\nexport type LostFoundTimeRange = z.infer<typeof lostFoundTimeRangeSchema>;\n\n/**\n * Lost-and-found item projected into the feed.\n *\n * v3 wire — extended to carry every field the production card renders\n * inline, so a single feed read serves the whole row. The detail page\n * (which loads `IReformLostFoundReport` directly) carries the long\n * tail of fields like `creatorName`, `resolvedWith`, audit logs.\n */\nexport const lostFoundFeedItemSchema = z.object({\n _id: z.string(),\n contentKind: z.literal('lost_found'),\n author: postAuthorSnapshotSchema,\n\n /** `'lost'` or `'found'` — drives the ribbon banner colour. */\n kind: z.enum(['lost', 'found']),\n title: z.string(),\n description: z.string(),\n\n // ─── v3 additions (all optional for backward compat) ─────────────\n // Live consumers reading the v1 wire keep working because every\n // new field is optional. The v3 projector populates them; the v3\n // card reads them. As consumers migrate to v3, the optionality can\n // tighten in a future minor bump.\n /** Curated category — drives the category icon + label chip.\n * Optional only until the v3 projector ships. */\n category: lostFoundCategorySchema.optional(),\n /** All images attached to the report (up to 5). The card renders a\n * swipeable carousel; the legacy `imageUrl` field below is kept\n * as a deprecated alias for `images[0]`. */\n images: z.array(z.string().url()).max(5).optional(),\n /** Where the item was lost / found.\n *\n * Structured shape: the area-hierarchy snapshot the user picked in\n * the LostFoundLocationDrawer plus optional `landmark` /\n * `directions` free-text. The card composes a single human-readable\n * string from these for the location pill.\n *\n * Backward compat: rows created before this migration carry a plain\n * string. The projector converts those legacy values to\n * `{ landmark: <string> }` on the way out so the wire always speaks\n * the new shape and the card stays simple. */\n location: lostFoundLocationSchema.optional(),\n /** Event date — when the item was lost / found. Distinct from\n * `createdAt`. */\n date: z.string().datetime().optional(),\n /** Optional time window on the report's `date` when the user\n * believes the item was lost or found. Both endpoints are HH:MM\n * strings (24-hour) and both are optional so the user can supply\n * just a start, just an end, or both. Omitted entirely when the\n * user couldn't narrow it down to a time. */\n timeRange: lostFoundTimeRangeSchema.optional(),\n /** For `kind === 'found'`: instructions on where to collect the\n * item. Null on `lost` reports. */\n collectionPoint: z.string().nullable().optional(),\n /** Public dial-back number captured on the report. */\n contactPhone: z.string().nullable().optional(),\n /** Lifecycle status. */\n status: lostFoundStatusSchema.optional(),\n /** Distinct-claimant count — drives the \"3 claims\" social-proof\n * chip. Maintained by the LostFoundClaim service. */\n claimCount: z.number().int().nonnegative().optional(),\n /** Free-text reward note (\"₹2,500\", \"Will treat to dinner\"). */\n rewardOffered: z.string().max(40).nullable().optional(),\n\n /** Deprecated single primary image. New consumers should read\n * `images[0]`; kept on the wire for the v1 card path. */\n imageUrl: z.string().url().optional(),\n\n /** Inherited engagement axis — same shape as posts. Score is the\n * signed net (upvotes - downvotes), can be negative. */\n score: z.number().int(),\n commentCount: z.number().int().nonnegative(),\n repostCount: z.number().int().nonnegative(),\n reactionCounts: z.record(z.string(), z.number().int().nonnegative()),\n\n createdAt: z.string().datetime(),\n\n viewer: z\n .object({\n vote: voteValueSchema.nullable(),\n reaction: z.string().nullable(),\n bookmarked: z.boolean(),\n isAuthor: z.boolean(),\n reposted: z.boolean(),\n })\n .optional(),\n});\nexport type LostFoundFeedItem = z.infer<typeof lostFoundFeedItemSchema>;\n\n/**\n * Donate-item status — mirrors the reform-backend\n * `ITEM_DONATION_STATUS` enum. `CANCELLED` is a terminal out-of-band\n * state (donor or admin withdrew the listing).\n */\nexport const DONATE_ITEM_STATUS_VALUES = [\n 'PENDING',\n 'VERIFIED',\n 'AT_CENTER',\n 'CANCELLED',\n 'DONATED',\n] as const;\nexport const donateItemStatusSchema = z.enum(DONATE_ITEM_STATUS_VALUES);\nexport type DonateItemStatus = z.infer<typeof donateItemStatusSchema>;\n\n/**\n * Item-condition labels surfaced on the chip. Mirrors the reform-\n * backend `ITEM_CONDITION` enum.\n */\nexport const DONATE_ITEM_CONDITION_VALUES = [\n 'NEW',\n 'LIKE_NEW',\n 'GOOD',\n 'FAIR',\n 'OLD_FUNCTIONAL',\n 'NEEDS_MINOR_REPAIR',\n 'NEEDS_MAJOR_REPAIR',\n 'FOR_PARTS',\n] as const;\nexport const donateItemConditionSchema = z.enum(DONATE_ITEM_CONDITION_VALUES);\nexport type DonateItemCondition = z.infer<typeof donateItemConditionSchema>;\n\n/** Audit summary shapes — short, denormalised projections of the\n * underlying pipeline blocks. The detail page carries the full\n * notes; the feed card just needs the \"who + when\". */\nexport const donateAuditByAtSchema = z.object({\n /** Display name of the person who performed the step. */\n byName: z.string(),\n /** When the step happened. */\n at: z.string().datetime(),\n});\nexport const donateAuditAtSchema = z.object({ at: z.string().datetime() });\nexport const donateDonatedToSchema = z.object({\n /** Name of the recipient (person or institution). */\n name: z.string(),\n at: z.string().datetime(),\n});\n\n/**\n * Donated-item listing projected into the feed.\n *\n * v3 wire — extended to carry every field the production card renders\n * inline. The full pickup-address sub-doc, verification notes, and\n * pipeline notes stay on the detail page.\n */\nexport const donateItemFeedItemSchema = z.object({\n _id: z.string(),\n contentKind: z.literal('donate_item'),\n /** Author of the donation. When `isAnonymous` is true, the wire\n * still ships a placeholder author (initials + neutral gradient,\n * no real `username` / `displayName`) — the server scrubs PII so\n * the wire is the privacy boundary, not the card. */\n author: postAuthorSnapshotSchema,\n\n /** Display name of the item. */\n itemName: z.string(),\n /** Optional free-text description. */\n description: z.string().optional(),\n /** Free-text category for now (the backend enum is widening; keeping\n * this open avoids a schema break each time a category is added). */\n category: z.string(),\n /** Item condition. Optional only because legacy rows pre-date the\n * field; new writes always populate it. */\n condition: donateItemConditionSchema.optional(),\n\n /** Lifecycle status — `string` for backward compat with v1\n * consumers that received an open string; v3 consumers should\n * refine against `donateItemStatusSchema`. */\n status: z.string(),\n\n // ─── v3 additions (all optional for backward compat) ─────────────\n /** Estimated worth in INR (₹). Null when the donor declined. */\n estimatedWorthInr: z.number().int().nullable().optional(),\n /** All photos attached to the donation (up to 3). */\n photos: z.array(z.string().url()).max(3).optional(),\n /** Donor opted to hide identity on the public feed. */\n isAnonymous: z.boolean().optional(),\n /** Distance from the viewer's `currentLocation` in km. */\n distanceKm: z.number().nonnegative().nullable().optional(),\n /** Date after which the donor is no longer available. */\n availableUntil: z.string().datetime().nullable().optional(),\n /** Pipeline audit summaries — each null when the step hasn't\n * happened yet. The card progressively reveals the blocks as the\n * donation moves through the pipeline. */\n verification: donateAuditByAtSchema.nullable().optional(),\n pickup: donateAuditByAtSchema.nullable().optional(),\n centerSubmission: donateAuditAtSchema.nullable().optional(),\n donatedTo: donateDonatedToSchema.nullable().optional(),\n\n /** Deprecated single primary image. New consumers should read\n * `photos[0]`; kept on the wire for the v1 card path. */\n imageUrl: z.string().url().optional(),\n\n score: z.number().int(),\n commentCount: z.number().int().nonnegative(),\n repostCount: z.number().int().nonnegative(),\n reactionCounts: z.record(z.string(), z.number().int().nonnegative()),\n\n createdAt: z.string().datetime(),\n\n viewer: z\n .object({\n vote: voteValueSchema.nullable(),\n reaction: z.string().nullable(),\n bookmarked: z.boolean(),\n isAuthor: z.boolean(),\n reposted: z.boolean(),\n })\n .optional(),\n});\nexport type DonateItemFeedItem = z.infer<typeof donateItemFeedItemSchema>;\n\n/**\n * Voice-box priority — mirrors `IReformIssueReport.priority`.\n * Drives the side-stripe colour on the complaint card.\n */\nexport const VOICE_BOX_PRIORITY_VALUES = ['low', 'medium', 'high', 'critical'] as const;\nexport const voiceBoxPrioritySchema = z.enum(VOICE_BOX_PRIORITY_VALUES);\nexport type VoiceBoxPriority = z.infer<typeof voiceBoxPrioritySchema>;\n\n/**\n * Voice-box lifecycle status. Five states matching the model — the\n * card surfaces `pending`/`under_review`/`in_progress` as in-flight\n * pills, `resolved` as a green resolution footer, `rejected` as\n * neutral with an explanation.\n */\nexport const VOICE_BOX_STATUS_VALUES = [\n 'pending',\n 'under_review',\n 'in_progress',\n 'resolved',\n 'rejected',\n] as const;\nexport const voiceBoxStatusSchema = z.enum(VOICE_BOX_STATUS_VALUES);\nexport type VoiceBoxStatus = z.infer<typeof voiceBoxStatusSchema>;\n\n/** Inline-playable audio attachment (voice complaint). The model\n * stores `IssueAudio` with `url + gcpPath + uploadedAt + duration`;\n * the wire is trimmed to what the card needs to render the WhatsApp-\n * style voice note bar. */\nexport const voiceBoxAudioSchema = z.object({\n url: z.string().url(),\n /** Duration in seconds. Drives the bar's duration chip. */\n durationSec: z.number().positive(),\n});\n\n/** Inline-playable video attachment (single native upload). */\nexport const voiceBoxVideoSchema = z.object({\n url: z.string().url(),\n thumbnailUrl: z.string().url(),\n durationSec: z.number().positive(),\n});\n\n/** Officer-response summary projected onto the feed wire so the card\n * can render the sky-blue \"Official response\" block without a\n * second round trip. Full text + reply audit log live on the\n * detail page. */\nexport const voiceBoxOfficerResponseSchema = z.object({\n /** Display name of the assigned officer. */\n officerName: z.string(),\n /** Officer's designation (Pradhan / Mayor / Junior Engineer / ...).\n * Null when the assigned user has no civic designation. */\n designation: z.string().nullable(),\n /** Truncated response text — max 280 chars. The full note lives on\n * the detail page. */\n text: z.string().max(280),\n respondedAt: z.string().datetime(),\n});\n\n/** Location block — denormalised at write time, surfaced inline on\n * the card. Lat/lng are intentionally NOT on the wire to keep\n * reporter privacy intact; the detail page can fetch them under a\n * separate authenticated read if a map view is added. */\nexport const voiceBoxLocationSchema = z.object({\n address: z.string(),\n district: z.string(),\n pinCode: z.string(),\n});\n\n/**\n * Voice-box (complaint or suggestion) item projected into the feed.\n *\n * v3 wire — extended from the v1 stub to carry every field the\n * civic-grade card renders. Privacy: `reporterPhone` is replaced by a\n * `hasReporterPhone` boolean so the public feed can show a Call CTA\n * without exposing the raw number; the detail page issues the\n * authenticated read that returns the actual tel: target.\n */\nexport const voiceBoxFeedItemSchema = z.object({\n _id: z.string(),\n contentKind: z.literal('voice_box'),\n author: postAuthorSnapshotSchema,\n\n /** `'complaint'` or `'suggestion'` — drives the card chrome (priority\n * stripe vs. Reddit-vote rail). */\n kind: z.enum(['complaint', 'suggestion']),\n title: z.string(),\n description: z.string(),\n\n // ─── v3 additions (all optional for backward compat) ─────────────\n // The v1 wire shipped only `kind / title / description`. The v3\n // card needs the full set; until the projector is upgraded the\n // fields here remain optional so production reads still validate.\n /** Free-text civic category (Water Supply / Electricity / ...). */\n category: z.string().optional(),\n /** Severity — drives the priority side stripe. */\n priority: voiceBoxPrioritySchema.optional(),\n /** Lifecycle status. */\n status: voiceBoxStatusSchema.optional(),\n\n /** Photo evidence (up to 10 per the model). */\n images: z.array(z.string().url()).max(10).optional(),\n /** Voice-note attachment. */\n audio: voiceBoxAudioSchema.nullable().optional(),\n /** Single native video upload. */\n video: voiceBoxVideoSchema.nullable().optional(),\n /** External video links (YouTube / Vimeo). */\n videoLinks: z.array(z.string().url()).max(5).optional(),\n\n /** Address breakdown the card renders. */\n location: voiceBoxLocationSchema.optional(),\n\n /** Whether the report has a public-contact phone. The Call pill\n * links to a separate authenticated read that resolves the\n * number — keeping the raw phone out of the cached feed\n * response. */\n hasReporterPhone: z.boolean().optional(),\n\n /** Assigned-officer response summary. */\n officerResponse: voiceBoxOfficerResponseSchema.nullable().optional(),\n /** Resolution timestamp — surfaces the green resolution footer. */\n resolvedAt: z.string().datetime().nullable().optional(),\n\n score: z.number().int(),\n commentCount: z.number().int().nonnegative(),\n repostCount: z.number().int().nonnegative(),\n reactionCounts: z.record(z.string(), z.number().int().nonnegative()),\n\n createdAt: z.string().datetime(),\n\n viewer: z\n .object({\n vote: voteValueSchema.nullable(),\n reaction: z.string().nullable(),\n bookmarked: z.boolean(),\n isAuthor: z.boolean(),\n reposted: z.boolean(),\n })\n .optional(),\n});\nexport type VoiceBoxFeedItem = z.infer<typeof voiceBoxFeedItemSchema>;\n\n// ─── Polymorphic union ─────────────────────────────────────────────────────\n\nexport const feedItemSchema = z.discriminatedUnion('contentKind', [\n communityPostWireSchema,\n lostFoundFeedItemSchema,\n voiceBoxFeedItemSchema,\n donateItemFeedItemSchema,\n communityPollFeedItemSchema,\n crowdfundingFeedItemSchema,\n]);\nexport type FeedItem = z.infer<typeof feedItemSchema>;\n\n// ─── Query + response ──────────────────────────────────────────────────────\n\nexport const feedQueryParamsSchema = z.object({\n /** The viewer's chosen feed level. Cascade-upward semantics apply. */\n level: visibilityLevelSchema,\n /** Sort algorithm. Defaults to `hot` server-side when omitted. */\n sort: feedSortSchema.optional(),\n /** Opaque pagination cursor returned by the previous page. */\n cursor: z.string().optional(),\n /** Page size; defaults to `FEED_PAGE_SIZE` server-side. */\n pageSize: z.number().int().positive().max(50).optional(),\n});\nexport type FeedQueryParams = z.infer<typeof feedQueryParamsSchema>;\n\nexport const feedResponseSchema = z.object({\n items: z.array(feedItemSchema),\n nextCursor: z.string().nullable(),\n});\nexport type FeedResponse = z.infer<typeof feedResponseSchema>;\n\n// Re-export so consumers don't have to also import constants.ts.\nexport { FEED_PAGE_SIZE };\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export { type AreaLineageSnapshot, areaLineageSnapshotSchema, } from './area.js'
|
|
|
18
18
|
export { type CommunityCommentWire, type CreateCommentBody, communityCommentWireSchema, createCommentBodySchema, type UpdateCommentBody, updateCommentBodySchema, } from './comment.js';
|
|
19
19
|
export { type AddOfficialModeratorBody, AREA_PICKER_LEVEL_VALUES, type AreaPickerItem, type AreaPickerLevel, type AreaPickerQuery, type AreaPickerResponse, addOfficialModeratorBodySchema, areaPickerItemSchema, areaPickerLevelSchema, areaPickerQuerySchema, areaPickerResponseSchema, COMMUNITY_CATEGORY_VALUES, COMMUNITY_DESIGNATION_PRESETS, COMMUNITY_DISCOVER_SORT_VALUES, COMMUNITY_KIND_VALUES, COMMUNITY_MEMBERSHIP_STATUS_VALUES, COMMUNITY_REACH_VALUES, COMMUNITY_ROLE_VALUES, COMMUNITY_TAG_VALUES, COMMUNITY_TYPE_VALUES, COMMUNITY_VERIFIED_SCOPE_VALUES, type CommunityCategory, type CommunityCenterCoords, type CommunityDesignation, type CommunityDesignationPreset, type CommunityDiscoverSort, type CommunityKind, type CommunityListQuery, type CommunityListResponse, type CommunityMembershipStatus, type CommunityMembersListResponse, type CommunityMemberWire, type CommunityReach, type CommunityRole, type CommunityTag, type CommunityType, type CommunityVerifiedScope, type CommunityWire, type CreateCommunityBody, type CreateOfficialCommunityBody, communityCategorySchema, communityCenterCoordsSchema, communityDesignationPresetSchema, communityDesignationSchema, communityDiscoverSortSchema, communityKindSchema, communityListQuerySchema, communityListResponseSchema, communityMembershipStatusSchema, communityMembersListResponseSchema, communityMemberWireSchema, communityReachSchema, communityRoleSchema, communityTagSchema, communityTypeSchema, communityVerifiedScopeSchema, communityWireSchema, createCommunityBodySchema, createOfficialCommunityBodySchema, type HidePostBody, hidePostBodySchema, type JoinCommunityResponse, joinCommunityResponseSchema, OFFICIAL_COMMUNITY_AREA_KIND_VALUES, type OfficialCommunityAreaKind, officialCommunityAreaKindSchema, type SetMemberDesignationBody, type SetOfficialRepresentativeBody, setMemberDesignationBodySchema, setOfficialRepresentativeBodySchema, type UpdateCommunityBody, type UpdateMemberRoleBody, updateCommunityBodySchema, updateMemberRoleBodySchema, type VerifyCommunityBody, verifyCommunityBodySchema, } from './community.js';
|
|
20
20
|
export { COMMENT_MAX_BODY_CHARS, COMMENTS_PAGE_SIZE, COMMUNITIES_PAGE_SIZE, COMMUNITY_DESCRIPTION_MAX_CHARS, COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS, COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS, COMMUNITY_DESIGNATION_CUSTOM_PATTERN, COMMUNITY_HYPERLOCAL_RADIUS_KM, COMMUNITY_MAX_TAGS, COMMUNITY_MEMBERS_PAGE_SIZE, COMMUNITY_NAME_MAX_CHARS, COMMUNITY_NAME_MIN_CHARS, COMMUNITY_SLUG_MAX_CHARS, COMMUNITY_SLUG_MIN_CHARS, COMMUNITY_SLUG_PATTERN, CROWDFUNDING_BANK_LINK_DEADLINE_DAYS, CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS, CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS, CROWDFUNDING_DESCRIPTION_MAX_CHARS, CROWDFUNDING_DESCRIPTION_MIN_CHARS, CROWDFUNDING_MAX_DONATION_INR, CROWDFUNDING_MAX_DURATION_DAYS, CROWDFUNDING_MAX_GOAL_INR, CROWDFUNDING_MAX_IMAGES, CROWDFUNDING_MAX_PROOF_DOCS, CROWDFUNDING_MAX_SUPPORTING_DOCS, CROWDFUNDING_MIN_DURATION_DAYS, CROWDFUNDING_MIN_GOAL_INR, CROWDFUNDING_MIN_PROOF_DOCS, CROWDFUNDING_PAGE_SIZE, CROWDFUNDING_PROOF_DOC_DESCRIPTION_MAX_CHARS, CROWDFUNDING_PROOF_DOC_DESCRIPTION_MIN_CHARS, CROWDFUNDING_REJECTION_REASON_MAX_CHARS, CROWDFUNDING_REJECTION_REASON_MIN_CHARS, CROWDFUNDING_TERMS_VERSION, CROWDFUNDING_TITLE_MAX_CHARS, CROWDFUNDING_TITLE_MIN_CHARS, EDIT_GRACE_WINDOW_MS, FEED_PAGE_SIZE, GROUP_MAX_MEMBERS, GROUP_NAME_MAX_CHARS, GROUP_NAME_MIN_CHARS, PEOPLE_PAGE_SIZE, POLL_DURATION_PRESETS_MS, POLL_MAX_DURATION_MS, POLL_MAX_OPTIONS, POLL_MIN_DURATION_MS, POLL_MIN_OPTIONS, POLL_OPTION_MAX_CHARS, POLL_OPTION_MIN_CHARS, POLL_QUESTION_MAX_CHARS, POLL_QUESTION_MIN_CHARS, POLLS_PAGE_SIZE, POST_MAX_BODY_CHARS, POST_MAX_IMAGE_BYTES, POST_MAX_IMAGES, POST_MAX_VIDEO_BYTES, POST_MAX_VIDEO_SECONDS, POST_MAX_VIDEOS, PROFILE_MAX_BIO_CHARS, REPLIES_PRELOAD_COUNT, } from './constants.js';
|
|
21
|
-
export { type ApproveCrowdfundingBody, type AttestCrowdfundingDonationBody, approveCrowdfundingBodySchema, attestCrowdfundingDonationBodySchema, type CommunityCrowdfundingWire, CROWDFUNDING_AUDIENCE_VALUES, CROWDFUNDING_CATEGORY_VALUES, CROWDFUNDING_DONATION_STATE_VALUES, CROWDFUNDING_ORG_KIND_VALUES, CROWDFUNDING_PROOF_DOC_TYPE_VALUES, CROWDFUNDING_RAZORPAY_ACCOUNT_STATUS_VALUES, CROWDFUNDING_STATUS_VALUES, type CreateCrowdfundingBody, type CrowdfundingAudience, type CrowdfundingCategory, type CrowdfundingDonationState, type CrowdfundingDonationWire, type CrowdfundingFeedItem, type CrowdfundingOrgKind, type CrowdfundingPayment, type CrowdfundingProofDocType, type CrowdfundingProofDocumentWire, type CrowdfundingRazorpayAccountStatus, type CrowdfundingRazorpayAccountWire, type CrowdfundingStatus, type CrowdfundingVerification, type CrowdfundingVerificationStage, type CrowdfundingVisibility, communityCrowdfundingWireSchema, createCrowdfundingBodySchema, crowdfundingAudienceSchema, crowdfundingCategorySchema, crowdfundingDonationStateSchema, crowdfundingDonationWireSchema, crowdfundingFeedItemSchema, crowdfundingOrgKindSchema, crowdfundingPaymentSchema, crowdfundingProofDocTypeSchema, crowdfundingProofDocumentWireSchema, crowdfundingRazorpayAccountStatusSchema, crowdfundingRazorpayAccountWireSchema, crowdfundingStatusSchema, crowdfundingVerificationSchema, crowdfundingVerificationStageSchema, crowdfundingVisibilitySchema, type ListCrowdfundingDonationsQuery, type ListMyCrowdfundingDonationsQuery, listCrowdfundingDonationsQuerySchema, listMyCrowdfundingDonationsQuerySchema, type RejectCrowdfundingBody,
|
|
21
|
+
export { type ApproveCrowdfundingBody, type AttestCrowdfundingDonationBody, approveCrowdfundingBodySchema, attestCrowdfundingDonationBodySchema, type CommunityCrowdfundingWire, CROWDFUNDING_AUDIENCE_VALUES, CROWDFUNDING_CATEGORY_VALUES, CROWDFUNDING_DONATION_STATE_VALUES, CROWDFUNDING_ORG_KIND_VALUES, CROWDFUNDING_PROOF_DOC_TYPE_VALUES, CROWDFUNDING_RAZORPAY_ACCOUNT_STATUS_VALUES, CROWDFUNDING_STATUS_VALUES, type CreateCrowdfundingBody, type CrowdfundingAudience, type CrowdfundingCategory, type CrowdfundingDonationState, type CrowdfundingDonationWire, type CrowdfundingFeedItem, type CrowdfundingOrgKind, type CrowdfundingPayment, type CrowdfundingProofDocType, type CrowdfundingProofDocumentWire, type CrowdfundingRazorpayAccountStatus, type CrowdfundingRazorpayAccountWire, type CrowdfundingStatus, type CrowdfundingVerification, type CrowdfundingVerificationStage, type CrowdfundingVisibility, communityCrowdfundingWireSchema, createCrowdfundingBodySchema, crowdfundingAudienceSchema, crowdfundingCategorySchema, crowdfundingDonationStateSchema, crowdfundingDonationWireSchema, crowdfundingFeedItemSchema, crowdfundingOrgKindSchema, crowdfundingPaymentSchema, crowdfundingProofDocTypeSchema, crowdfundingProofDocumentWireSchema, crowdfundingRazorpayAccountStatusSchema, crowdfundingRazorpayAccountWireSchema, crowdfundingStatusSchema, crowdfundingVerificationSchema, crowdfundingVerificationStageSchema, crowdfundingVisibilitySchema, type ListCrowdfundingDonationsQuery, type ListMyCrowdfundingDonationsQuery, listCrowdfundingDonationsQuerySchema, listMyCrowdfundingDonationsQuerySchema, type RejectCrowdfundingBody, type RequestRerunCrowdfundingBody, rejectCrowdfundingBodySchema, requestRerunCrowdfundingBodySchema, type UpdateCrowdfundingBody, type UploadCrowdfundingReceiptBody, updateCrowdfundingBodySchema, uploadCrowdfundingReceiptBodySchema, } from './crowdfunding.js';
|
|
22
22
|
export { type SetReactionBody, type SetReactionResponse, type SetVoteBody, type SetVoteResponse, setReactionBodySchema, setReactionResponseSchema, setVoteBodySchema, setVoteResponseSchema, type ToggleBookmarkResponse, toggleBookmarkResponseSchema, VOTE_VALUES, type VoteValue, voteValueSchema, } from './engagement.js';
|
|
23
23
|
export { CONTENT_KIND_VALUES, type ContentKind, contentKindSchema, FEED_SORT_VALUES, type FeedSort, feedSortSchema, PROFILE_PRIVACY_VALUES, type ProfilePrivacy, profilePrivacySchema, REACTION_TYPE_VALUES, REPORT_REASON_VALUES, REPORT_STATUS_VALUES, type ReactionType, type ReportReason, type ReportStatus, reactionTypeSchema, reportReasonSchema, reportStatusSchema, VISIBILITY_LEVEL_RANK, VISIBILITY_LEVEL_VALUES, type VisibilityLevel, visibilityLevelSchema, } from './enums.js';
|
|
24
24
|
export { DONATE_ITEM_CONDITION_VALUES, DONATE_ITEM_STATUS_VALUES, type DonateItemCondition, type DonateItemFeedItem, type DonateItemStatus, donateAuditAtSchema, donateAuditByAtSchema, donateDonatedToSchema, donateItemConditionSchema, donateItemFeedItemSchema, donateItemStatusSchema, type FeedItem, type FeedQueryParams, type FeedResponse, feedItemSchema, feedQueryParamsSchema, feedResponseSchema, LOST_FOUND_CATEGORY_VALUES, LOST_FOUND_STATUS_VALUES, type LostFoundCategory, type LostFoundFeedItem, type LostFoundStatus, lostFoundCategorySchema, lostFoundFeedItemSchema, lostFoundStatusSchema, VOICE_BOX_PRIORITY_VALUES, VOICE_BOX_STATUS_VALUES, type VoiceBoxFeedItem, type VoiceBoxPriority, type VoiceBoxStatus, voiceBoxAudioSchema, voiceBoxFeedItemSchema, voiceBoxLocationSchema, voiceBoxOfficerResponseSchema, voiceBoxPrioritySchema, voiceBoxStatusSchema, voiceBoxVideoSchema, } from './feed.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EACL,KAAK,mBAAmB,EACxB,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,KAAK,oBAAoB,EACzB,KAA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d,+BAA+B,GAChC,MAAM,eAAe,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,8EAA8E;AAC9E,OAAO,EAEL,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AAEnB,8EAA8E;AAC9E,OAAO,EAGL,0BAA0B,EAC1B,uBAAuB,EAEvB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,8EAA8E;AAC9E,OAAO,EAEL,wBAAwB,EAKxB,8BAA8B,EAC9B,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,8BAA8B,EAC9B,qBAAqB,EACrB,kCAAkC,EAClC,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,+BAA+B,EAoB/B,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC3B,+BAA+B,EAC/B,kCAAkC,EAClC,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,4BAA4B,EAC5B,mBAAmB,EACnB,yBAAyB,EACzB,iCAAiC,EAEjC,kBAAkB,EAElB,2BAA2B,EAC3B,mCAAmC,EAEnC,+BAA+B,EAG/B,8BAA8B,EAC9B,mCAAmC,EAGnC,yBAAyB,EACzB,0BAA0B,EAE1B,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AAExB,8EAA8E;AAC9E,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,+BAA+B,EAC/B,sCAAsC,EACtC,sCAAsC,EACtC,oCAAoC,EACpC,8BAA8B,EAC9B,kBAAkB,EAClB,2BAA2B,E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uB,GACxB,MAAM,aAAa,CAAC;AACrB,6EAA6E;AAC7E,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAGlB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,6EAA6E;AAC7E,OAAO,EAEL,0BAA0B,EAG1B,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,4BAA4B,EAI5B,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,cAAc,EACd,+BAA+B,GAChC,MAAM,eAAe,CAAC","sourcesContent":["/**\n * community-schema — Shared Zod schemas + TypeScript types for the\n * Jansathi hyperlocal community feature (feed, posts, engagement,\n * social graph, groups, settings).\n *\n * Single source of truth consumed by reform-backend and every product\n * frontend. The schemas mirror MongoDB / Mongoose document shapes\n * 1:1 so the same Zod validation runs at the controller boundary on\n * the backend and in the form handlers on the client.\n *\n * Cascade-upward visibility semantics: a viewer whose feed level is L\n * sees posts at L and every BROADER level matching their area lineage.\n * See `./enums.ts#VISIBILITY_LEVEL_VALUES` for the level rank table.\n *\n * @module community-schema\n */\n\n// ─── Area lineage snapshot ─────────────────────────────────────────────────\nexport {\n type AreaLineageSnapshot,\n areaLineageSnapshotSchema,\n} from './area.js';\n\n// ─── Comment ───────────────────────────────────────────────────────────────\nexport {\n type CommunityCommentWire,\n type CreateCommentBody,\n communityCommentWireSchema,\n createCommentBodySchema,\n type UpdateCommentBody,\n updateCommentBodySchema,\n} from './comment.js';\n\n// ─── Communities ───────────────────────────────────────────────────────────\nexport {\n type AddOfficialModeratorBody,\n AREA_PICKER_LEVEL_VALUES,\n type AreaPickerItem,\n type AreaPickerLevel,\n type AreaPickerQuery,\n type AreaPickerResponse,\n addOfficialModeratorBodySchema,\n areaPickerItemSchema,\n areaPickerLevelSchema,\n areaPickerQuerySchema,\n areaPickerResponseSchema,\n COMMUNITY_CATEGORY_VALUES,\n COMMUNITY_DESIGNATION_PRESETS,\n COMMUNITY_DISCOVER_SORT_VALUES,\n COMMUNITY_KIND_VALUES,\n COMMUNITY_MEMBERSHIP_STATUS_VALUES,\n COMMUNITY_REACH_VALUES,\n COMMUNITY_ROLE_VALUES,\n COMMUNITY_TAG_VALUES,\n COMMUNITY_TYPE_VALUES,\n COMMUNITY_VERIFIED_SCOPE_VALUES,\n type CommunityCategory,\n type CommunityCenterCoords,\n type CommunityDesignation,\n type CommunityDesignationPreset,\n type CommunityDiscoverSort,\n type CommunityKind,\n type CommunityListQuery,\n type CommunityListResponse,\n type CommunityMembershipStatus,\n type CommunityMembersListResponse,\n type CommunityMemberWire,\n type CommunityReach,\n type CommunityRole,\n type CommunityTag,\n type CommunityType,\n type CommunityVerifiedScope,\n type CommunityWire,\n type CreateCommunityBody,\n type CreateOfficialCommunityBody,\n communityCategorySchema,\n communityCenterCoordsSchema,\n communityDesignationPresetSchema,\n communityDesignationSchema,\n communityDiscoverSortSchema,\n communityKindSchema,\n communityListQuerySchema,\n communityListResponseSchema,\n communityMembershipStatusSchema,\n communityMembersListResponseSchema,\n communityMemberWireSchema,\n communityReachSchema,\n communityRoleSchema,\n communityTagSchema,\n communityTypeSchema,\n communityVerifiedScopeSchema,\n communityWireSchema,\n createCommunityBodySchema,\n createOfficialCommunityBodySchema,\n type HidePostBody,\n hidePostBodySchema,\n type JoinCommunityResponse,\n joinCommunityResponseSchema,\n OFFICIAL_COMMUNITY_AREA_KIND_VALUES,\n type OfficialCommunityAreaKind,\n officialCommunityAreaKindSchema,\n type SetMemberDesignationBody,\n type SetOfficialRepresentativeBody,\n setMemberDesignationBodySchema,\n setOfficialRepresentativeBodySchema,\n type UpdateCommunityBody,\n type UpdateMemberRoleBody,\n updateCommunityBodySchema,\n updateMemberRoleBodySchema,\n type VerifyCommunityBody,\n verifyCommunityBodySchema,\n} from './community.js';\n\n// ─── Constants ─────────────────────────────────────────────────────────────\nexport {\n COMMENT_MAX_BODY_CHARS,\n COMMENTS_PAGE_SIZE,\n COMMUNITIES_PAGE_SIZE,\n COMMUNITY_DESCRIPTION_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_PATTERN,\n COMMUNITY_HYPERLOCAL_RADIUS_KM,\n COMMUNITY_MAX_TAGS,\n COMMUNITY_MEMBERS_PAGE_SIZE,\n COMMUNITY_NAME_MAX_CHARS,\n COMMUNITY_NAME_MIN_CHARS,\n COMMUNITY_SLUG_MAX_CHARS,\n COMMUNITY_SLUG_MIN_CHARS,\n COMMUNITY_SLUG_PATTERN,\n CROWDFUNDING_BANK_LINK_DEADLINE_DAYS,\n CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS,\n CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS,\n CROWDFUNDING_DESCRIPTION_MAX_CHARS,\n CROWDFUNDING_DESCRIPTION_MIN_CHARS,\n CROWDFUNDING_MAX_DONATION_INR,\n CROWDFUNDING_MAX_DURATION_DAYS,\n CROWDFUNDING_MAX_GOAL_INR,\n CROWDFUNDING_MAX_IMAGES,\n CROWDFUNDING_MAX_PROOF_DOCS,\n CROWDFUNDING_MAX_SUPPORTING_DOCS,\n CROWDFUNDING_MIN_DURATION_DAYS,\n CROWDFUNDING_MIN_GOAL_INR,\n CROWDFUNDING_MIN_PROOF_DOCS,\n CROWDFUNDING_PAGE_SIZE,\n CROWDFUNDING_PROOF_DOC_DESCRIPTION_MAX_CHARS,\n CROWDFUNDING_PROOF_DOC_DESCRIPTION_MIN_CHARS,\n CROWDFUNDING_REJECTION_REASON_MAX_CHARS,\n CROWDFUNDING_REJECTION_REASON_MIN_CHARS,\n CROWDFUNDING_TERMS_VERSION,\n CROWDFUNDING_TITLE_MAX_CHARS,\n CROWDFUNDING_TITLE_MIN_CHARS,\n EDIT_GRACE_WINDOW_MS,\n FEED_PAGE_SIZE,\n GROUP_MAX_MEMBERS,\n GROUP_NAME_MAX_CHARS,\n GROUP_NAME_MIN_CHARS,\n PEOPLE_PAGE_SIZE,\n POLL_DURATION_PRESETS_MS,\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_OPTION_MIN_CHARS,\n POLL_QUESTION_MAX_CHARS,\n POLL_QUESTION_MIN_CHARS,\n POLLS_PAGE_SIZE,\n POST_MAX_BODY_CHARS,\n POST_MAX_IMAGE_BYTES,\n POST_MAX_IMAGES,\n POST_MAX_VIDEO_BYTES,\n POST_MAX_VIDEO_SECONDS,\n POST_MAX_VIDEOS,\n PROFILE_MAX_BIO_CHARS,\n REPLIES_PRELOAD_COUNT,\n} from './constants.js';\n\n// ─── Crowdfunding ──────────────────────────────────────────────────────────\nexport {\n type ApproveCrowdfundingBody,\n type AttestCrowdfundingDonationBody,\n approveCrowdfundingBodySchema,\n attestCrowdfundingDonationBodySchema,\n type CommunityCrowdfundingWire,\n CROWDFUNDING_AUDIENCE_VALUES,\n CROWDFUNDING_CATEGORY_VALUES,\n CROWDFUNDING_DONATION_STATE_VALUES,\n CROWDFUNDING_ORG_KIND_VALUES,\n CROWDFUNDING_PROOF_DOC_TYPE_VALUES,\n CROWDFUNDING_RAZORPAY_ACCOUNT_STATUS_VALUES,\n CROWDFUNDING_STATUS_VALUES,\n type CreateCrowdfundingBody,\n type CrowdfundingAudience,\n type CrowdfundingCategory,\n type CrowdfundingDonationState,\n type CrowdfundingDonationWire,\n type CrowdfundingFeedItem,\n type CrowdfundingOrgKind,\n type CrowdfundingPayment,\n type CrowdfundingProofDocType,\n type CrowdfundingProofDocumentWire,\n type CrowdfundingRazorpayAccountStatus,\n type CrowdfundingRazorpayAccountWire,\n type CrowdfundingStatus,\n type CrowdfundingVerification,\n type CrowdfundingVerificationStage,\n type CrowdfundingVisibility,\n communityCrowdfundingWireSchema,\n createCrowdfundingBodySchema,\n crowdfundingAudienceSchema,\n crowdfundingCategorySchema,\n crowdfundingDonationStateSchema,\n crowdfundingDonationWireSchema,\n crowdfundingFeedItemSchema,\n crowdfundingOrgKindSchema,\n crowdfundingPaymentSchema,\n crowdfundingProofDocTypeSchema,\n crowdfundingProofDocumentWireSchema,\n crowdfundingRazorpayAccountStatusSchema,\n crowdfundingRazorpayAccountWireSchema,\n crowdfundingStatusSchema,\n crowdfundingVerificationSchema,\n crowdfundingVerificationStageSchema,\n crowdfundingVisibilitySchema,\n type ListCrowdfundingDonationsQuery,\n type ListMyCrowdfundingDonationsQuery,\n listCrowdfundingDonationsQuerySchema,\n listMyCrowdfundingDonationsQuerySchema,\n type RejectCrowdfundingBody,\n rejectCrowdfundingBodySchema,\n type RequestRerunCrowdfundingBody,\n requestRerunCrowdfundingBodySchema,\n type UpdateCrowdfundingBody,\n type UploadCrowdfundingReceiptBody,\n updateCrowdfundingBodySchema,\n uploadCrowdfundingReceiptBodySchema,\n} from './crowdfunding.js';\n// ─── Engagement (vote + reactions + bookmark) ─────────────────────────────\nexport {\n type SetReactionBody,\n type SetReactionResponse,\n type SetVoteBody,\n type SetVoteResponse,\n setReactionBodySchema,\n setReactionResponseSchema,\n setVoteBodySchema,\n setVoteResponseSchema,\n type ToggleBookmarkResponse,\n toggleBookmarkResponseSchema,\n VOTE_VALUES,\n type VoteValue,\n voteValueSchema,\n} from './engagement.js';\n// ─── Enums ─────────────────────────────────────────────────────────────────\nexport {\n CONTENT_KIND_VALUES,\n type ContentKind,\n contentKindSchema,\n FEED_SORT_VALUES,\n type FeedSort,\n feedSortSchema,\n PROFILE_PRIVACY_VALUES,\n type ProfilePrivacy,\n profilePrivacySchema,\n REACTION_TYPE_VALUES,\n REPORT_REASON_VALUES,\n REPORT_STATUS_VALUES,\n type ReactionType,\n type ReportReason,\n type ReportStatus,\n reactionTypeSchema,\n reportReasonSchema,\n reportStatusSchema,\n VISIBILITY_LEVEL_RANK,\n VISIBILITY_LEVEL_VALUES,\n type VisibilityLevel,\n visibilityLevelSchema,\n} from './enums.js';\n// ─── Feed (polymorphic union) ──────────────────────────────────────────────\nexport {\n DONATE_ITEM_CONDITION_VALUES,\n DONATE_ITEM_STATUS_VALUES,\n type DonateItemCondition,\n type DonateItemFeedItem,\n type DonateItemStatus,\n donateAuditAtSchema,\n donateAuditByAtSchema,\n donateDonatedToSchema,\n donateItemConditionSchema,\n donateItemFeedItemSchema,\n donateItemStatusSchema,\n type FeedItem,\n type FeedQueryParams,\n type FeedResponse,\n feedItemSchema,\n feedQueryParamsSchema,\n feedResponseSchema,\n LOST_FOUND_CATEGORY_VALUES,\n LOST_FOUND_STATUS_VALUES,\n type LostFoundCategory,\n type LostFoundFeedItem,\n type LostFoundStatus,\n lostFoundCategorySchema,\n lostFoundFeedItemSchema,\n lostFoundStatusSchema,\n VOICE_BOX_PRIORITY_VALUES,\n VOICE_BOX_STATUS_VALUES,\n type VoiceBoxFeedItem,\n type VoiceBoxPriority,\n type VoiceBoxStatus,\n voiceBoxAudioSchema,\n voiceBoxFeedItemSchema,\n voiceBoxLocationSchema,\n voiceBoxOfficerResponseSchema,\n voiceBoxPrioritySchema,\n voiceBoxStatusSchema,\n voiceBoxVideoSchema,\n} from './feed.js';\n// ─── Groups ────────────────────────────────────────────────────────────────\nexport {\n type AddGroupMembersBody,\n addGroupMembersBodySchema,\n type CommunityGroupWire,\n type CommunityGroupWithMembers,\n type CreateGroupBody,\n communityGroupWireSchema,\n communityGroupWithMembersSchema,\n createGroupBodySchema,\n type GroupMembersListResponse,\n type GroupMemberWire,\n type GroupRole,\n type GroupsListResponse,\n groupMembersListResponseSchema,\n groupMemberWireSchema,\n groupRoleSchema,\n groupsListResponseSchema,\n type UpdateGroupBody,\n updateGroupBodySchema,\n} from './group.js';\n// ─── Link preview (auto-extracted URL embed) ──────────────────────────────\nexport {\n LINK_PREVIEW_KIND_VALUES,\n type LinkPreview,\n type LinkPreviewKind,\n linkPreviewKindSchema,\n linkPreviewSchema,\n} from './link-preview.js';\n// ─── Media ─────────────────────────────────────────────────────────────────\nexport {\n type PostImage,\n type PostVideo,\n postImageSchema,\n postVideoSchema,\n} from './media.js';\n// ─── Notifications ─────────────────────────────────────────────────────────\nexport {\n type ListNotificationsQuery,\n type ListNotificationsResponse,\n listNotificationsQuerySchema,\n listNotificationsResponseSchema,\n type MarkAllNotificationsReadBody,\n markAllNotificationsReadBodySchema,\n NOTIFICATION_CATEGORY_VALUES,\n NOTIFICATION_CHANNEL_VALUES,\n NOTIFICATION_PRIORITY_VALUES,\n NOTIFICATION_SOURCE_REF_KIND_VALUES,\n type NotificationActor,\n type NotificationCategory,\n type NotificationChannel,\n type NotificationPriority,\n type NotificationReadAllEvent,\n type NotificationReadEvent,\n type NotificationSourceRef,\n type NotificationSourceRefKind,\n type NotificationUnreadCount,\n type NotificationWire,\n notificationActorSchema,\n notificationCategorySchema,\n notificationChannelSchema,\n notificationPrioritySchema,\n notificationReadAllEventSchema,\n notificationReadEventSchema,\n notificationSourceRefKindSchema,\n notificationSourceRefSchema,\n notificationUnreadCountSchema,\n notificationWireSchema,\n REFORM_NOTIFICATION_SOCKET_EVENTS,\n type ReformNotificationSocketEvent,\n} from './notification.js';\n// ─── Poll ──────────────────────────────────────────────────────────────────\nexport {\n type CastVoteBody,\n type CommunityPollFeedItem,\n type CommunityPollWire,\n type CreatePollBody,\n castVoteBodySchema,\n communityPollFeedItemSchema,\n communityPollWireSchema,\n createPollBodySchema,\n POLL_RESULTS_VISIBILITY_VALUES,\n type PollOptionInput,\n type PollOptionWire,\n type PollResultsVisibility,\n pollOptionInputSchema,\n pollOptionWireSchema,\n pollResultsVisibilitySchema,\n type VoteResponse,\n voteResponseSchema,\n} from './poll.js';\n// ─── Post ──────────────────────────────────────────────────────────────────\nexport {\n type CommunityPostWire,\n type CreatePostBody,\n communityPostWireSchema,\n createPostBodySchema,\n type PostAuthorSnapshot,\n postAuthorSnapshotSchema,\n type RepostedSource,\n repostedSourceSchema,\n type UpdatePostBody,\n updatePostBodySchema,\n} from './post.js';\n// ─── Profile + People list ─────────────────────────────────────────────────\nexport {\n PEOPLE_LIST_FILTER_DEFAULT,\n PEOPLE_LIST_FILTER_VALUES,\n type PeopleListFilter,\n type PeopleListItem,\n type PeopleListResponse,\n type PeopleQueryParams,\n type ProfileMutuals,\n type PublicProfileWire,\n peopleListFilterSchema,\n peopleListItemSchema,\n peopleListResponseSchema,\n peopleQueryParamsSchema,\n profileMutualsSchema,\n publicProfileWireSchema,\n} from './profile.js';\n// ─── Reports (moderation) ──────────────────────────────────────────────────\nexport {\n type ReportContentBody,\n type ReportContentKind,\n type ReportRecordWire,\n type ReportSubmissionResponse,\n type ReportUserBody,\n reportContentBodySchema,\n reportContentKindSchema,\n reportRecordWireSchema,\n reportSubmissionResponseSchema,\n reportUserBodySchema,\n} from './report.js';\n// ─── Repost (quote / amplify) ──────────────────────────────────────────────\nexport {\n type CreateRepostBody,\n type CreateRepostResponse,\n createRepostBodySchema,\n createRepostResponseSchema,\n} from './repost.js';\n// ─── Settings ──────────────────────────────────────────────────────────────\nexport {\n type BlockedUsersListResponse,\n type BlockedUserWire,\n blockedUsersListResponseSchema,\n blockedUserWireSchema,\n COMMUNITY_SETTINGS_DEFAULTS,\n type CommunitySettingsWire,\n communitySettingsWireSchema,\n type UpdateCommunitySettingsBody,\n updateCommunitySettingsBodySchema,\n} from './settings.js';\n// ─── Social (follow) ───────────────────────────────────────────────────────\nexport {\n type ToggleFollowResponse,\n toggleFollowResponseSchema,\n type ViewerSocialState,\n viewerSocialStateSchema,\n} from './social.js';\n// ─── Social score (shared tier table) ─────────────────────────────────────\nexport {\n SOCIAL_SCORE_TIER_NAMES,\n SOCIAL_SCORE_TIERS,\n type SocialScoreTier,\n type SocialScoreTierName,\n tierFromSocialScore,\n} from './social-score.js';\n\n// ─── Username (URL handle + change / availability) ────────────────────────\nexport {\n type CurrentUsernameState,\n currentUsernameStateSchema,\n type UpdateUsernameBody,\n type UpdateUsernameResponse,\n USERNAME_MAX_LENGTH,\n USERNAME_MIN_LENGTH,\n USERNAME_PATTERN,\n USERNAME_UNAVAILABLE_REASONS,\n type Username,\n type UsernameAvailabilityResponse,\n type UsernameUnavailableReason,\n updateUsernameBodySchema,\n updateUsernameResponseSchema,\n usernameAvailabilityResponseSchema,\n usernameSchema,\n usernameUnavailableReasonSchema,\n} from './username.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,8EAA8E;AAC9E,OAAO,EAEL,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AAEnB,8EAA8E;AAC9E,OAAO,EAGL,0BAA0B,EAC1B,uBAAuB,EAEvB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,8EAA8E;AAC9E,OAAO,EAEL,wBAAwB,EAKxB,8BAA8B,EAC9B,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,8BAA8B,EAC9B,qBAAqB,EACrB,kCAAkC,EAClC,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,+BAA+B,EAoB/B,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC3B,+BAA+B,EAC/B,kCAAkC,EAClC,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,4BAA4B,EAC5B,mBAAmB,EACnB,yBAAyB,EACzB,iCAAiC,EAEjC,kBAAkB,EAElB,2BAA2B,EAC3B,mCAAmC,EAEnC,+BAA+B,EAG/B,8BAA8B,EAC9B,mCAAmC,EAGnC,yBAAyB,EACzB,0BAA0B,EAE1B,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AAExB,8EAA8E;AAC9E,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,+BAA+B,EAC/B,sCAAsC,EACt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AAM,eAAe,CAAC;AACvB,8EAA8E;AAC9E,OAAO,EAEL,0BAA0B,EAE1B,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,6EAA6E;AAC7E,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAGlB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,6EAA6E;AAC7E,OAAO,EAEL,0BAA0B,EAG1B,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,4BAA4B,EAI5B,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,cAAc,EACd,+BAA+B,GAChC,MAAM,eAAe,CAAC","sourcesContent":["/**\n * community-schema — Shared Zod schemas + TypeScript types for the\n * Jansathi hyperlocal community feature (feed, posts, engagement,\n * social graph, groups, settings).\n *\n * Single source of truth consumed by reform-backend and every product\n * frontend. The schemas mirror MongoDB / Mongoose document shapes\n * 1:1 so the same Zod validation runs at the controller boundary on\n * the backend and in the form handlers on the client.\n *\n * Cascade-upward visibility semantics: a viewer whose feed level is L\n * sees posts at L and every BROADER level matching their area lineage.\n * See `./enums.ts#VISIBILITY_LEVEL_VALUES` for the level rank table.\n *\n * @module community-schema\n */\n\n// ─── Area lineage snapshot ─────────────────────────────────────────────────\nexport {\n type AreaLineageSnapshot,\n areaLineageSnapshotSchema,\n} from './area.js';\n\n// ─── Comment ───────────────────────────────────────────────────────────────\nexport {\n type CommunityCommentWire,\n type CreateCommentBody,\n communityCommentWireSchema,\n createCommentBodySchema,\n type UpdateCommentBody,\n updateCommentBodySchema,\n} from './comment.js';\n\n// ─── Communities ───────────────────────────────────────────────────────────\nexport {\n type AddOfficialModeratorBody,\n AREA_PICKER_LEVEL_VALUES,\n type AreaPickerItem,\n type AreaPickerLevel,\n type AreaPickerQuery,\n type AreaPickerResponse,\n addOfficialModeratorBodySchema,\n areaPickerItemSchema,\n areaPickerLevelSchema,\n areaPickerQuerySchema,\n areaPickerResponseSchema,\n COMMUNITY_CATEGORY_VALUES,\n COMMUNITY_DESIGNATION_PRESETS,\n COMMUNITY_DISCOVER_SORT_VALUES,\n COMMUNITY_KIND_VALUES,\n COMMUNITY_MEMBERSHIP_STATUS_VALUES,\n COMMUNITY_REACH_VALUES,\n COMMUNITY_ROLE_VALUES,\n COMMUNITY_TAG_VALUES,\n COMMUNITY_TYPE_VALUES,\n COMMUNITY_VERIFIED_SCOPE_VALUES,\n type CommunityCategory,\n type CommunityCenterCoords,\n type CommunityDesignation,\n type CommunityDesignationPreset,\n type CommunityDiscoverSort,\n type CommunityKind,\n type CommunityListQuery,\n type CommunityListResponse,\n type CommunityMembershipStatus,\n type CommunityMembersListResponse,\n type CommunityMemberWire,\n type CommunityReach,\n type CommunityRole,\n type CommunityTag,\n type CommunityType,\n type CommunityVerifiedScope,\n type CommunityWire,\n type CreateCommunityBody,\n type CreateOfficialCommunityBody,\n communityCategorySchema,\n communityCenterCoordsSchema,\n communityDesignationPresetSchema,\n communityDesignationSchema,\n communityDiscoverSortSchema,\n communityKindSchema,\n communityListQuerySchema,\n communityListResponseSchema,\n communityMembershipStatusSchema,\n communityMembersListResponseSchema,\n communityMemberWireSchema,\n communityReachSchema,\n communityRoleSchema,\n communityTagSchema,\n communityTypeSchema,\n communityVerifiedScopeSchema,\n communityWireSchema,\n createCommunityBodySchema,\n createOfficialCommunityBodySchema,\n type HidePostBody,\n hidePostBodySchema,\n type JoinCommunityResponse,\n joinCommunityResponseSchema,\n OFFICIAL_COMMUNITY_AREA_KIND_VALUES,\n type OfficialCommunityAreaKind,\n officialCommunityAreaKindSchema,\n type SetMemberDesignationBody,\n type SetOfficialRepresentativeBody,\n setMemberDesignationBodySchema,\n setOfficialRepresentativeBodySchema,\n type UpdateCommunityBody,\n type UpdateMemberRoleBody,\n updateCommunityBodySchema,\n updateMemberRoleBodySchema,\n type VerifyCommunityBody,\n verifyCommunityBodySchema,\n} from './community.js';\n\n// ─── Constants ─────────────────────────────────────────────────────────────\nexport {\n COMMENT_MAX_BODY_CHARS,\n COMMENTS_PAGE_SIZE,\n COMMUNITIES_PAGE_SIZE,\n COMMUNITY_DESCRIPTION_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_PATTERN,\n COMMUNITY_HYPERLOCAL_RADIUS_KM,\n COMMUNITY_MAX_TAGS,\n COMMUNITY_MEMBERS_PAGE_SIZE,\n COMMUNITY_NAME_MAX_CHARS,\n COMMUNITY_NAME_MIN_CHARS,\n COMMUNITY_SLUG_MAX_CHARS,\n COMMUNITY_SLUG_MIN_CHARS,\n COMMUNITY_SLUG_PATTERN,\n CROWDFUNDING_BANK_LINK_DEADLINE_DAYS,\n CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS,\n CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS,\n CROWDFUNDING_DESCRIPTION_MAX_CHARS,\n CROWDFUNDING_DESCRIPTION_MIN_CHARS,\n CROWDFUNDING_MAX_DONATION_INR,\n CROWDFUNDING_MAX_DURATION_DAYS,\n CROWDFUNDING_MAX_GOAL_INR,\n CROWDFUNDING_MAX_IMAGES,\n CROWDFUNDING_MAX_PROOF_DOCS,\n CROWDFUNDING_MAX_SUPPORTING_DOCS,\n CROWDFUNDING_MIN_DURATION_DAYS,\n CROWDFUNDING_MIN_GOAL_INR,\n CROWDFUNDING_MIN_PROOF_DOCS,\n CROWDFUNDING_PAGE_SIZE,\n CROWDFUNDING_PROOF_DOC_DESCRIPTION_MAX_CHARS,\n CROWDFUNDING_PROOF_DOC_DESCRIPTION_MIN_CHARS,\n CROWDFUNDING_REJECTION_REASON_MAX_CHARS,\n CROWDFUNDING_REJECTION_REASON_MIN_CHARS,\n CROWDFUNDING_TERMS_VERSION,\n CROWDFUNDING_TITLE_MAX_CHARS,\n CROWDFUNDING_TITLE_MIN_CHARS,\n EDIT_GRACE_WINDOW_MS,\n FEED_PAGE_SIZE,\n GROUP_MAX_MEMBERS,\n GROUP_NAME_MAX_CHARS,\n GROUP_NAME_MIN_CHARS,\n PEOPLE_PAGE_SIZE,\n POLL_DURATION_PRESETS_MS,\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_OPTION_MIN_CHARS,\n POLL_QUESTION_MAX_CHARS,\n POLL_QUESTION_MIN_CHARS,\n POLLS_PAGE_SIZE,\n POST_MAX_BODY_CHARS,\n POST_MAX_IMAGE_BYTES,\n POST_MAX_IMAGES,\n POST_MAX_VIDEO_BYTES,\n POST_MAX_VIDEO_SECONDS,\n POST_MAX_VIDEOS,\n PROFILE_MAX_BIO_CHARS,\n REPLIES_PRELOAD_COUNT,\n} from './constants.js';\n\n// ─── Crowdfunding ──────────────────────────────────────────────────────────\nexport {\n type ApproveCrowdfundingBody,\n type AttestCrowdfundingDonationBody,\n approveCrowdfundingBodySchema,\n attestCrowdfundingDonationBodySchema,\n type CommunityCrowdfundingWire,\n CROWDFUNDING_AUDIENCE_VALUES,\n CROWDFUNDING_CATEGORY_VALUES,\n CROWDFUNDING_DONATION_STATE_VALUES,\n CROWDFUNDING_ORG_KIND_VALUES,\n CROWDFUNDING_PROOF_DOC_TYPE_VALUES,\n CROWDFUNDING_RAZORPAY_ACCOUNT_STATUS_VALUES,\n CROWDFUNDING_STATUS_VALUES,\n type CreateCrowdfundingBody,\n type CrowdfundingAudience,\n type CrowdfundingCategory,\n type CrowdfundingDonationState,\n type CrowdfundingDonationWire,\n type CrowdfundingFeedItem,\n type CrowdfundingOrgKind,\n type CrowdfundingPayment,\n type CrowdfundingProofDocType,\n type CrowdfundingProofDocumentWire,\n type CrowdfundingRazorpayAccountStatus,\n type CrowdfundingRazorpayAccountWire,\n type CrowdfundingStatus,\n type CrowdfundingVerification,\n type CrowdfundingVerificationStage,\n type CrowdfundingVisibility,\n communityCrowdfundingWireSchema,\n createCrowdfundingBodySchema,\n crowdfundingAudienceSchema,\n crowdfundingCategorySchema,\n crowdfundingDonationStateSchema,\n crowdfundingDonationWireSchema,\n crowdfundingFeedItemSchema,\n crowdfundingOrgKindSchema,\n crowdfundingPaymentSchema,\n crowdfundingProofDocTypeSchema,\n crowdfundingProofDocumentWireSchema,\n crowdfundingRazorpayAccountStatusSchema,\n crowdfundingRazorpayAccountWireSchema,\n crowdfundingStatusSchema,\n crowdfundingVerificationSchema,\n crowdfundingVerificationStageSchema,\n crowdfundingVisibilitySchema,\n type ListCrowdfundingDonationsQuery,\n type ListMyCrowdfundingDonationsQuery,\n listCrowdfundingDonationsQuerySchema,\n listMyCrowdfundingDonationsQuerySchema,\n type RejectCrowdfundingBody,\n type RequestRerunCrowdfundingBody,\n rejectCrowdfundingBodySchema,\n requestRerunCrowdfundingBodySchema,\n type UpdateCrowdfundingBody,\n type UploadCrowdfundingReceiptBody,\n updateCrowdfundingBodySchema,\n uploadCrowdfundingReceiptBodySchema,\n} from './crowdfunding.js';\n// ─── Engagement (vote + reactions + bookmark) ─────────────────────────────\nexport {\n type SetReactionBody,\n type SetReactionResponse,\n type SetVoteBody,\n type SetVoteResponse,\n setReactionBodySchema,\n setReactionResponseSchema,\n setVoteBodySchema,\n setVoteResponseSchema,\n type ToggleBookmarkResponse,\n toggleBookmarkResponseSchema,\n VOTE_VALUES,\n type VoteValue,\n voteValueSchema,\n} from './engagement.js';\n// ─── Enums ─────────────────────────────────────────────────────────────────\nexport {\n CONTENT_KIND_VALUES,\n type ContentKind,\n contentKindSchema,\n FEED_SORT_VALUES,\n type FeedSort,\n feedSortSchema,\n PROFILE_PRIVACY_VALUES,\n type ProfilePrivacy,\n profilePrivacySchema,\n REACTION_TYPE_VALUES,\n REPORT_REASON_VALUES,\n REPORT_STATUS_VALUES,\n type ReactionType,\n type ReportReason,\n type ReportStatus,\n reactionTypeSchema,\n reportReasonSchema,\n reportStatusSchema,\n VISIBILITY_LEVEL_RANK,\n VISIBILITY_LEVEL_VALUES,\n type VisibilityLevel,\n visibilityLevelSchema,\n} from './enums.js';\n// ─── Feed (polymorphic union) ──────────────────────────────────────────────\nexport {\n DONATE_ITEM_CONDITION_VALUES,\n DONATE_ITEM_STATUS_VALUES,\n type DonateItemCondition,\n type DonateItemFeedItem,\n type DonateItemStatus,\n donateAuditAtSchema,\n donateAuditByAtSchema,\n donateDonatedToSchema,\n donateItemConditionSchema,\n donateItemFeedItemSchema,\n donateItemStatusSchema,\n type FeedItem,\n type FeedQueryParams,\n type FeedResponse,\n feedItemSchema,\n feedQueryParamsSchema,\n feedResponseSchema,\n LOST_FOUND_CATEGORY_VALUES,\n LOST_FOUND_STATUS_VALUES,\n type LostFoundCategory,\n type LostFoundFeedItem,\n type LostFoundStatus,\n lostFoundCategorySchema,\n lostFoundFeedItemSchema,\n lostFoundStatusSchema,\n VOICE_BOX_PRIORITY_VALUES,\n VOICE_BOX_STATUS_VALUES,\n type VoiceBoxFeedItem,\n type VoiceBoxPriority,\n type VoiceBoxStatus,\n voiceBoxAudioSchema,\n voiceBoxFeedItemSchema,\n voiceBoxLocationSchema,\n voiceBoxOfficerResponseSchema,\n voiceBoxPrioritySchema,\n voiceBoxStatusSchema,\n voiceBoxVideoSchema,\n} from './feed.js';\n// ─── Groups ────────────────────────────────────────────────────────────────\nexport {\n type AddGroupMembersBody,\n addGroupMembersBodySchema,\n type CommunityGroupWire,\n type CommunityGroupWithMembers,\n type CreateGroupBody,\n communityGroupWireSchema,\n communityGroupWithMembersSchema,\n createGroupBodySchema,\n type GroupMembersListResponse,\n type GroupMemberWire,\n type GroupRole,\n type GroupsListResponse,\n groupMembersListResponseSchema,\n groupMemberWireSchema,\n groupRoleSchema,\n groupsListResponseSchema,\n type UpdateGroupBody,\n updateGroupBodySchema,\n} from './group.js';\n// ─── Link preview (auto-extracted URL embed) ──────────────────────────────\nexport {\n LINK_PREVIEW_KIND_VALUES,\n type LinkPreview,\n type LinkPreviewKind,\n linkPreviewKindSchema,\n linkPreviewSchema,\n} from './link-preview.js';\n// ─── Media ─────────────────────────────────────────────────────────────────\nexport {\n type PostImage,\n type PostVideo,\n postImageSchema,\n postVideoSchema,\n} from './media.js';\n// ─── Notifications ─────────────────────────────────────────────────────────\nexport {\n type ListNotificationsQuery,\n type ListNotificationsResponse,\n listNotificationsQuerySchema,\n listNotificationsResponseSchema,\n type MarkAllNotificationsReadBody,\n markAllNotificationsReadBodySchema,\n NOTIFICATION_CATEGORY_VALUES,\n NOTIFICATION_CHANNEL_VALUES,\n NOTIFICATION_PRIORITY_VALUES,\n NOTIFICATION_SOURCE_REF_KIND_VALUES,\n type NotificationActor,\n type NotificationCategory,\n type NotificationChannel,\n type NotificationPriority,\n type NotificationReadAllEvent,\n type NotificationReadEvent,\n type NotificationSourceRef,\n type NotificationSourceRefKind,\n type NotificationUnreadCount,\n type NotificationWire,\n notificationActorSchema,\n notificationCategorySchema,\n notificationChannelSchema,\n notificationPrioritySchema,\n notificationReadAllEventSchema,\n notificationReadEventSchema,\n notificationSourceRefKindSchema,\n notificationSourceRefSchema,\n notificationUnreadCountSchema,\n notificationWireSchema,\n REFORM_NOTIFICATION_SOCKET_EVENTS,\n type ReformNotificationSocketEvent,\n} from './notification.js';\n// ─── Poll ──────────────────────────────────────────────────────────────────\nexport {\n type CastVoteBody,\n type CommunityPollFeedItem,\n type CommunityPollWire,\n type CreatePollBody,\n castVoteBodySchema,\n communityPollFeedItemSchema,\n communityPollWireSchema,\n createPollBodySchema,\n POLL_RESULTS_VISIBILITY_VALUES,\n type PollOptionInput,\n type PollOptionWire,\n type PollResultsVisibility,\n pollOptionInputSchema,\n pollOptionWireSchema,\n pollResultsVisibilitySchema,\n type VoteResponse,\n voteResponseSchema,\n} from './poll.js';\n// ─── Post ──────────────────────────────────────────────────────────────────\nexport {\n type CommunityPostWire,\n type CreatePostBody,\n communityPostWireSchema,\n createPostBodySchema,\n type PostAuthorSnapshot,\n postAuthorSnapshotSchema,\n type RepostedSource,\n repostedSourceSchema,\n type UpdatePostBody,\n updatePostBodySchema,\n} from './post.js';\n// ─── Profile + People list ─────────────────────────────────────────────────\nexport {\n PEOPLE_LIST_FILTER_DEFAULT,\n PEOPLE_LIST_FILTER_VALUES,\n type PeopleListFilter,\n type PeopleListItem,\n type PeopleListResponse,\n type PeopleQueryParams,\n type ProfileMutuals,\n type PublicProfileWire,\n peopleListFilterSchema,\n peopleListItemSchema,\n peopleListResponseSchema,\n peopleQueryParamsSchema,\n profileMutualsSchema,\n publicProfileWireSchema,\n} from './profile.js';\n// ─── Reports (moderation) ──────────────────────────────────────────────────\nexport {\n type ReportContentBody,\n type ReportContentKind,\n type ReportRecordWire,\n type ReportSubmissionResponse,\n type ReportUserBody,\n reportContentBodySchema,\n reportContentKindSchema,\n reportRecordWireSchema,\n reportSubmissionResponseSchema,\n reportUserBodySchema,\n} from './report.js';\n// ─── Repost (quote / amplify) ──────────────────────────────────────────────\nexport {\n type CreateRepostBody,\n type CreateRepostResponse,\n createRepostBodySchema,\n createRepostResponseSchema,\n} from './repost.js';\n// ─── Settings ──────────────────────────────────────────────────────────────\nexport {\n type BlockedUsersListResponse,\n type BlockedUserWire,\n blockedUsersListResponseSchema,\n blockedUserWireSchema,\n COMMUNITY_SETTINGS_DEFAULTS,\n type CommunitySettingsWire,\n communitySettingsWireSchema,\n type UpdateCommunitySettingsBody,\n updateCommunitySettingsBodySchema,\n} from './settings.js';\n// ─── Social (follow) ───────────────────────────────────────────────────────\nexport {\n type ToggleFollowResponse,\n toggleFollowResponseSchema,\n type ViewerSocialState,\n viewerSocialStateSchema,\n} from './social.js';\n// ─── Social score (shared tier table) ─────────────────────────────────────\nexport {\n SOCIAL_SCORE_TIER_NAMES,\n SOCIAL_SCORE_TIERS,\n type SocialScoreTier,\n type SocialScoreTierName,\n tierFromSocialScore,\n} from './social-score.js';\n\n// ─── Username (URL handle + change / availability) ────────────────────────\nexport {\n type CurrentUsernameState,\n currentUsernameStateSchema,\n type UpdateUsernameBody,\n type UpdateUsernameResponse,\n USERNAME_MAX_LENGTH,\n USERNAME_MIN_LENGTH,\n USERNAME_PATTERN,\n USERNAME_UNAVAILABLE_REASONS,\n type Username,\n type UsernameAvailabilityResponse,\n type UsernameUnavailableReason,\n updateUsernameBodySchema,\n updateUsernameResponseSchema,\n usernameAvailabilityResponseSchema,\n usernameSchema,\n usernameUnavailableReasonSchema,\n} from './username.js';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jansathi-community-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Shared Zod schemas + TypeScript types for the Jansathi hyperlocal community feature (feed, posts, engagement, social graph, groups, communities).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|