jansathi-community-schema 0.21.0 → 0.23.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/comment.d.ts +1 -0
- package/dist/comment.d.ts.map +1 -1
- package/dist/constants.d.ts +48 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +49 -0
- package/dist/constants.js.map +1 -1
- package/dist/crowdfunding.d.ts +580 -0
- package/dist/crowdfunding.d.ts.map +1 -0
- package/dist/crowdfunding.js +402 -0
- package/dist/crowdfunding.js.map +1 -0
- package/dist/engagement.d.ts +3 -0
- package/dist/engagement.d.ts.map +1 -1
- package/dist/enums.d.ts +2 -1
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +1 -0
- package/dist/enums.js.map +1 -1
- package/dist/feed.d.ts +292 -4
- package/dist/feed.d.ts.map +1 -1
- package/dist/feed.js +2 -0
- package/dist/feed.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/link-preview.d.ts +57 -0
- package/dist/link-preview.d.ts.map +1 -0
- package/dist/link-preview.js +61 -0
- package/dist/link-preview.js.map +1 -0
- package/dist/poll.js +1 -1
- package/dist/poll.js.map +1 -1
- package/dist/post.d.ts +16 -0
- package/dist/post.d.ts.map +1 -1
- package/dist/post.js +6 -0
- package/dist/post.js.map +1 -1
- package/dist/report.d.ts +2 -0
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +1 -0
- package/dist/report.js.map +1 -1
- package/dist/repost.d.ts +16 -0
- package/dist/repost.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/comment.d.ts
CHANGED
package/dist/comment.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../src/comment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../src/comment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmCrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAI9E,eAAO,MAAM,uBAAuB;;;iBAMlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAIxE,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -105,4 +105,52 @@ export declare const POLL_DURATION_PRESETS_MS: {
|
|
|
105
105
|
/** Feed page size for polls when fetched as their own list (rare —
|
|
106
106
|
* polls usually surface via the unified feed). Keeps memory bounded. */
|
|
107
107
|
export declare const POLLS_PAGE_SIZE = 20;
|
|
108
|
+
/** Min goal in ₹. Filters spam while staying low enough for genuine
|
|
109
|
+
* community-level requests (small medical bills, school fees, etc.). */
|
|
110
|
+
export declare const CROWDFUNDING_MIN_GOAL_INR = 500;
|
|
111
|
+
/** Max goal in ₹. v1 ceiling — high enough for real medical/disaster
|
|
112
|
+
* cases, low enough to discourage professional-fundraising adoption
|
|
113
|
+
* before we have escrow infrastructure. */
|
|
114
|
+
export declare const CROWDFUNDING_MAX_GOAL_INR = 2500000;
|
|
115
|
+
/** Minimum campaign duration in days. Below this and there's not enough
|
|
116
|
+
* time for verification + visibility. */
|
|
117
|
+
export declare const CROWDFUNDING_MIN_DURATION_DAYS = 7;
|
|
118
|
+
/** Max campaign duration in days. Industry norm — active campaigns feel
|
|
119
|
+
* urgent; stagnant ones don't. Creator can always re-launch a follow-up. */
|
|
120
|
+
export declare const CROWDFUNDING_MAX_DURATION_DAYS = 60;
|
|
121
|
+
/** Title + body limits. Title is the card headline; body is the
|
|
122
|
+
* scrollable story below the goal block. */
|
|
123
|
+
export declare const CROWDFUNDING_TITLE_MAX_CHARS = 120;
|
|
124
|
+
export declare const CROWDFUNDING_TITLE_MIN_CHARS = 5;
|
|
125
|
+
export declare const CROWDFUNDING_DESCRIPTION_MAX_CHARS = 4000;
|
|
126
|
+
export declare const CROWDFUNDING_DESCRIPTION_MIN_CHARS = 50;
|
|
127
|
+
/** Max story images (different from supporting docs). */
|
|
128
|
+
export declare const CROWDFUNDING_MAX_IMAGES = 5;
|
|
129
|
+
/** Max supporting documents (medical invoice, school admission letter,
|
|
130
|
+
* etc.). Kept off the wire; only the verifier and the creator see
|
|
131
|
+
* these. */
|
|
132
|
+
export declare const CROWDFUNDING_MAX_SUPPORTING_DOCS = 5;
|
|
133
|
+
/** Beneficiary fields. */
|
|
134
|
+
export declare const CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS = 100;
|
|
135
|
+
export declare const CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS = 50;
|
|
136
|
+
/** Rejection reason length (verifier-supplied). */
|
|
137
|
+
export declare const CROWDFUNDING_REJECTION_REASON_MIN_CHARS = 10;
|
|
138
|
+
export declare const CROWDFUNDING_REJECTION_REASON_MAX_CHARS = 500;
|
|
139
|
+
/** Identity-tier thresholds keyed to Indian regulatory practice:
|
|
140
|
+
* ≤ 25k → Basic (UDP step 9 verified identity only)
|
|
141
|
+
* 25k–2L → Standard (+ PAN + bank-holder-name match)
|
|
142
|
+
* 2L–10L → Enhanced (+ Aadhaar last-4 + category supporting docs)
|
|
143
|
+
* > 10L → Maximum (+ video KYC or in-person verification by
|
|
144
|
+
* district leader)
|
|
145
|
+
* ₹25k = PAN-mandatory threshold for cash deposits.
|
|
146
|
+
* ₹2L = "substantial money" line for verification scrutiny.
|
|
147
|
+
* ₹10L = mandatory video/in-person KYC tier in Indian fintech. */
|
|
148
|
+
export declare const CROWDFUNDING_TIER_STANDARD_INR = 25000;
|
|
149
|
+
export declare const CROWDFUNDING_TIER_ENHANCED_INR = 200000;
|
|
150
|
+
export declare const CROWDFUNDING_TIER_MAXIMUM_INR = 1000000;
|
|
151
|
+
/** Max single self-attested donation amount. Capped at the campaign
|
|
152
|
+
* ceiling — a single donor can't claim more than the entire goal. */
|
|
153
|
+
export declare const CROWDFUNDING_MAX_DONATION_INR = 2500000;
|
|
154
|
+
/** Listing page size when crowdfunding is fetched as its own list. */
|
|
155
|
+
export declare const CROWDFUNDING_PAGE_SIZE = 20;
|
|
108
156
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,mCAAmC;AACnC,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC,qCAAqC;AACrC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,0CAA0C;AAC1C,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAIvC,2BAA2B;AAC3B,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,2BAA2B;AAC3B,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,QAAU,CAAC;AAE9C,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,QAAmB,CAAC;AAErD,mCAAmC;AACnC,eAAO,MAAM,oBAAoB,QAAoB,CAAC;AAItD;kCACkC;AAClC,eAAO,MAAM,mBAAmB,OAAO,CAAC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hD;6EAC6E;AAC7E,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD;6CAC6C;AAC7C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,kCAAkC,OAAO,CAAC;AACvD,eAAO,MAAM,kCAAkC,KAAK,CAAC;AAErD,yDAAyD;AACzD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC;;aAEa;AACb,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAElD,0BAA0B;AAC1B,eAAO,MAAM,uCAAuC,MAAM,CAAC;AAC3D,eAAO,MAAM,2CAA2C,KAAK,CAAC;AAE9D,mDAAmD;AACnD,eAAO,MAAM,uCAAuC,KAAK,CAAC;AAC1D,eAAO,MAAM,uCAAuC,MAAM,CAAC;AAE3D;;;;;;;;mEAQmE;AACnE,eAAO,MAAM,8BAA8B,QAAS,CAAC;AACrD,eAAO,MAAM,8BAA8B,SAAW,CAAC;AACvD,eAAO,MAAM,6BAA6B,UAAY,CAAC;AAEvD;sEACsE;AACtE,eAAO,MAAM,6BAA6B,UAA4B,CAAC;AAEvE,sEAAsE;AACtE,eAAO,MAAM,sBAAsB,KAAK,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -113,4 +113,53 @@ export const POLL_DURATION_PRESETS_MS = {
|
|
|
113
113
|
/** Feed page size for polls when fetched as their own list (rare —
|
|
114
114
|
* polls usually surface via the unified feed). Keeps memory bounded. */
|
|
115
115
|
export const POLLS_PAGE_SIZE = 20;
|
|
116
|
+
// ─── Crowdfunding ──────────────────────────────────────────────────────────
|
|
117
|
+
/** Min goal in ₹. Filters spam while staying low enough for genuine
|
|
118
|
+
* community-level requests (small medical bills, school fees, etc.). */
|
|
119
|
+
export const CROWDFUNDING_MIN_GOAL_INR = 500;
|
|
120
|
+
/** Max goal in ₹. v1 ceiling — high enough for real medical/disaster
|
|
121
|
+
* cases, low enough to discourage professional-fundraising adoption
|
|
122
|
+
* before we have escrow infrastructure. */
|
|
123
|
+
export const CROWDFUNDING_MAX_GOAL_INR = 25_00_000;
|
|
124
|
+
/** Minimum campaign duration in days. Below this and there's not enough
|
|
125
|
+
* time for verification + visibility. */
|
|
126
|
+
export const CROWDFUNDING_MIN_DURATION_DAYS = 7;
|
|
127
|
+
/** Max campaign duration in days. Industry norm — active campaigns feel
|
|
128
|
+
* urgent; stagnant ones don't. Creator can always re-launch a follow-up. */
|
|
129
|
+
export const CROWDFUNDING_MAX_DURATION_DAYS = 60;
|
|
130
|
+
/** Title + body limits. Title is the card headline; body is the
|
|
131
|
+
* scrollable story below the goal block. */
|
|
132
|
+
export const CROWDFUNDING_TITLE_MAX_CHARS = 120;
|
|
133
|
+
export const CROWDFUNDING_TITLE_MIN_CHARS = 5;
|
|
134
|
+
export const CROWDFUNDING_DESCRIPTION_MAX_CHARS = 4000;
|
|
135
|
+
export const CROWDFUNDING_DESCRIPTION_MIN_CHARS = 50;
|
|
136
|
+
/** Max story images (different from supporting docs). */
|
|
137
|
+
export const CROWDFUNDING_MAX_IMAGES = 5;
|
|
138
|
+
/** Max supporting documents (medical invoice, school admission letter,
|
|
139
|
+
* etc.). Kept off the wire; only the verifier and the creator see
|
|
140
|
+
* these. */
|
|
141
|
+
export const CROWDFUNDING_MAX_SUPPORTING_DOCS = 5;
|
|
142
|
+
/** Beneficiary fields. */
|
|
143
|
+
export const CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS = 100;
|
|
144
|
+
export const CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS = 50;
|
|
145
|
+
/** Rejection reason length (verifier-supplied). */
|
|
146
|
+
export const CROWDFUNDING_REJECTION_REASON_MIN_CHARS = 10;
|
|
147
|
+
export const CROWDFUNDING_REJECTION_REASON_MAX_CHARS = 500;
|
|
148
|
+
/** Identity-tier thresholds keyed to Indian regulatory practice:
|
|
149
|
+
* ≤ 25k → Basic (UDP step 9 verified identity only)
|
|
150
|
+
* 25k–2L → Standard (+ PAN + bank-holder-name match)
|
|
151
|
+
* 2L–10L → Enhanced (+ Aadhaar last-4 + category supporting docs)
|
|
152
|
+
* > 10L → Maximum (+ video KYC or in-person verification by
|
|
153
|
+
* district leader)
|
|
154
|
+
* ₹25k = PAN-mandatory threshold for cash deposits.
|
|
155
|
+
* ₹2L = "substantial money" line for verification scrutiny.
|
|
156
|
+
* ₹10L = mandatory video/in-person KYC tier in Indian fintech. */
|
|
157
|
+
export const CROWDFUNDING_TIER_STANDARD_INR = 25_000;
|
|
158
|
+
export const CROWDFUNDING_TIER_ENHANCED_INR = 2_00_000;
|
|
159
|
+
export const CROWDFUNDING_TIER_MAXIMUM_INR = 10_00_000;
|
|
160
|
+
/** Max single self-attested donation amount. Capped at the campaign
|
|
161
|
+
* ceiling — a single donor can't claim more than the entire goal. */
|
|
162
|
+
export const CROWDFUNDING_MAX_DONATION_INR = CROWDFUNDING_MAX_GOAL_INR;
|
|
163
|
+
/** Listing page size when crowdfunding is fetched as its own list. */
|
|
164
|
+
export const CROWDFUNDING_PAGE_SIZE = 20;
|
|
116
165
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,+EAA+E;AAE/E,mCAAmC;AACnC,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAEjC,qCAAqC;AACrC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC,0CAA0C;AAC1C,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAErC,yEAAyE;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEvC,8EAA8E;AAE9E,2BAA2B;AAC3B,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC,2BAA2B;AAC3B,MAAM,CAAC,MAAM,eAAe,GAAG,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AAI;IAClC,YAAY,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;CAC9B,CAAC;AAEX;yEACyE;AACzE,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC","sourcesContent":["/**\n * Tunable constants shared across the community feature.\n *\n * Live here (not inline in feature code) so backend and every frontend\n * agree byte-for-byte on the same limits, paginations, and timeouts.\n * Bump versions of this package when these change.\n *\n * @module community-schema/constants\n */\n\n// ─── Pagination ─────────────────────────────────────────────────────────────\n\n/** Feed list default page size. */\nexport const FEED_PAGE_SIZE = 20;\n\n/** People list default page size. */\nexport const PEOPLE_PAGE_SIZE = 30;\n\n/** Comments per page on a single post. */\nexport const COMMENTS_PAGE_SIZE = 20;\n\n/** Replies per top-level comment loaded with the first comments page. */\nexport const REPLIES_PRELOAD_COUNT = 3;\n\n// ─── Post media limits ─────────────────────────────────────────────────────\n\n/** Max images per post. */\nexport const POST_MAX_IMAGES = 10;\n\n/** Max videos per post. */\nexport const POST_MAX_VIDEOS = 5;\n\n/** Max duration of a single video in seconds (10 min). */\nexport const POST_MAX_VIDEO_SECONDS = 10 * 60;\n\n/** Per-image hard cap (15 MB). The file service compresses to fit. */\nexport const POST_MAX_IMAGE_BYTES = 15 * 1024 * 1024;\n\n/** Per-video hard cap (200 MB). */\nexport const POST_MAX_VIDEO_BYTES = 200 * 1024 * 1024;\n\n// ─── Text limits ────────────────────────────────────────────────────────────\n\n/** Post body character cap. Long enough for long-form, short enough to\n * keep feed rendering snappy. */\nexport const POST_MAX_BODY_CHARS = 5000;\n\n/** Comment + reply body character cap. */\nexport const COMMENT_MAX_BODY_CHARS = 2000;\n\n/** Free-text bio on a public profile. */\nexport const PROFILE_MAX_BIO_CHARS = 280;\n\n// ─── Engagement ─────────────────────────────────────────────────────────────\n\n/** Window during which an author can edit their own post / comment, in ms. */\nexport const EDIT_GRACE_WINDOW_MS = 5 * 60 * 1000;\n\n// ─── Groups ─────────────────────────────────────────────────────────────────\n\n/** Max members in a single user-created group chat. */\nexport const GROUP_MAX_MEMBERS = 256;\n\n/** Group name length. */\nexport const GROUP_NAME_MAX_CHARS = 60;\nexport const GROUP_NAME_MIN_CHARS = 2;\n\n// ─── Communities ───────────────────────────────────────────────────────────\n\n/** Community name length. Same range as a group, with room for a real\n * topic title. */\nexport const COMMUNITY_NAME_MAX_CHARS = 60;\nexport const COMMUNITY_NAME_MIN_CHARS = 2;\n\n/** Slug is auto-generated from name on create (lowercase, hyphenated)\n * but the user may also pick one explicitly on the create form. Match\n * Reddit's vibes: 3-21 chars, lower alphanumeric + underscore + hyphen. */\nexport const COMMUNITY_SLUG_MAX_CHARS = 21;\nexport const COMMUNITY_SLUG_MIN_CHARS = 3;\n/** Slug character class — kept in lockstep with the regex enforced by\n * the create-body Zod schema and the backend's slug normaliser. */\nexport const COMMUNITY_SLUG_PATTERN = /^[a-z0-9_-]+$/;\n\n/** Description shown on the community card + header. */\nexport const COMMUNITY_DESCRIPTION_MAX_CHARS = 500;\n\n/** Communities discover + members + posts page sizes. */\nexport const COMMUNITIES_PAGE_SIZE = 20;\nexport const COMMUNITY_MEMBERS_PAGE_SIZE = 50;\n\n// ─── Community v2 (taxonomy + reach + tags + verification + designation) ──\n\n/** Max tags a community can carry. Tags are picked from a curated\n * enum (`COMMUNITY_TAG_VALUES`), not free text — keeps the picker\n * + discovery filters meaningful. */\nexport const COMMUNITY_MAX_TAGS = 10;\n\n/** Hyperlocal discovery radius. Set generously because GPS accuracy\n * is noisy on phones — 5 km usually covers a viewer's neighborhood\n * plus a buffer of adjacent localities. Single source of truth so\n * backend filter + frontend copy agree. */\nexport const COMMUNITY_HYPERLOCAL_RADIUS_KM = 5;\n\n/** Custom (free-text) designation length bounds — used when the\n * owner / admin types a designation that isn't in the preset enum.\n * The preset path takes precedence; custom is the fallback. */\nexport const COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS = 2;\nexport const COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS = 30;\n/** Alphanumeric + space + ampersand — covers natural English labels\n * (\"Vice Chairman\", \"Press & Media\") without opening the door to\n * punctuation soup. */\nexport const COMMUNITY_DESIGNATION_CUSTOM_PATTERN = /^[A-Za-z0-9 &]+$/;\n\n// ─── Polls ─────────────────────────────────────────────────────────────────\n\n/** Poll question (the \"What's your favourite Diwali sweet?\" prompt).\n * Twitter caps at 280; we match for a snappy feed read. */\nexport const POLL_QUESTION_MAX_CHARS = 280;\nexport const POLL_QUESTION_MIN_CHARS = 1;\n\n/** Per-option label length. Long enough for a phrase, short enough that\n * options stack readably in a feed card on a phone. */\nexport const POLL_OPTION_MAX_CHARS = 80;\nexport const POLL_OPTION_MIN_CHARS = 1;\n\n/** A poll must offer at least two options (else it's not a choice) and\n * at most six (more than that fragments votes and tanks readability —\n * matches Twitter's 4 / WhatsApp's 12 / our pick is the middle). */\nexport const POLL_MIN_OPTIONS = 2;\nexport const POLL_MAX_OPTIONS = 6;\n\n/** Duration bounds. Polls MUST have an expiry — open-ended polls go\n * stale and clutter feeds (see PoLLs spec discussion). The floor stops\n * accidental \"1 second\" polls; the ceiling caps a single poll's\n * visibility window so authors think about timing. */\nexport const POLL_MIN_DURATION_MS = 5 * 60 * 1000; // 5 minutes\nexport const POLL_MAX_DURATION_MS = 30 * 24 * 60 * 60 * 1000; // 30 days\n\n/** Composer presets (the radio chips in the duration picker). Custom\n * date entry covers everything in between. Server still validates the\n * resolved `closesAt` against the bounds above. */\nexport const POLL_DURATION_PRESETS_MS = {\n oneDay: 24 * 60 * 60 * 1000,\n threeDays: 3 * 24 * 60 * 60 * 1000,\n sevenDays: 7 * 24 * 60 * 60 * 1000,\n fourteenDays: 14 * 24 * 60 * 60 * 1000,\n} as const;\n\n/** Feed page size for polls when fetched as their own list (rare —\n * polls usually surface via the unified feed). Keeps memory bounded. */\nexport const POLLS_PAGE_SIZE = 20;\n"]}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;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,CAAC,MAAM,uCAAuC,GAAG,GAAG,CAAC;AAC3D,MAAM,CAAC,MAAM,2CAA2C,GAAG,EAAE,CAAC;AAE9D,mDAAmD;AACnD,MAAM,CAAC,MAAM,uCAAuC,GAAG,EAAE,CAAC;AAC1D,MAAM,CAAC,MAAM,uCAAuC,GAAG,GAAG,CAAC;AAE3D;;;;;;;;mEAQmE;AACnE,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC;AACrD,MAAM,CAAC,MAAM,8BAA8B,GAAG,QAAQ,CAAC;AACvD,MAAM,CAAC,MAAM,6BAA6B,GAAG,SAAS,CAAC;AAEvD;sEACsE;AACtE,MAAM,CAAC,MAAM,6BAA6B,GAAG,yBAAyB,CAAC;AAEvE,sEAAsE;AACtE,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC","sourcesContent":["/**\n * Tunable constants shared across the community feature.\n *\n * Live here (not inline in feature code) so backend and every frontend\n * agree byte-for-byte on the same limits, paginations, and timeouts.\n * Bump versions of this package when these change.\n *\n * @module community-schema/constants\n */\n\n// ─── Pagination ─────────────────────────────────────────────────────────────\n\n/** Feed list default page size. */\nexport const FEED_PAGE_SIZE = 20;\n\n/** People list default page size. */\nexport const PEOPLE_PAGE_SIZE = 30;\n\n/** Comments per page on a single post. */\nexport const COMMENTS_PAGE_SIZE = 20;\n\n/** Replies per top-level comment loaded with the first comments page. */\nexport const REPLIES_PRELOAD_COUNT = 3;\n\n// ─── Post media limits ─────────────────────────────────────────────────────\n\n/** Max images per post. */\nexport const POST_MAX_IMAGES = 10;\n\n/** Max videos per post. */\nexport const POST_MAX_VIDEOS = 5;\n\n/** Max duration of a single video in seconds (10 min). */\nexport const POST_MAX_VIDEO_SECONDS = 10 * 60;\n\n/** Per-image hard cap (15 MB). The file service compresses to fit. */\nexport const POST_MAX_IMAGE_BYTES = 15 * 1024 * 1024;\n\n/** Per-video hard cap (200 MB). */\nexport const POST_MAX_VIDEO_BYTES = 200 * 1024 * 1024;\n\n// ─── Text limits ────────────────────────────────────────────────────────────\n\n/** Post body character cap. Long enough for long-form, short enough to\n * keep feed rendering snappy. */\nexport const POST_MAX_BODY_CHARS = 5000;\n\n/** Comment + reply body character cap. */\nexport const COMMENT_MAX_BODY_CHARS = 2000;\n\n/** Free-text bio on a public profile. */\nexport const PROFILE_MAX_BIO_CHARS = 280;\n\n// ─── Engagement ─────────────────────────────────────────────────────────────\n\n/** Window during which an author can edit their own post / comment, in ms. */\nexport const EDIT_GRACE_WINDOW_MS = 5 * 60 * 1000;\n\n// ─── Groups ─────────────────────────────────────────────────────────────────\n\n/** Max members in a single user-created group chat. */\nexport const GROUP_MAX_MEMBERS = 256;\n\n/** Group name length. */\nexport const GROUP_NAME_MAX_CHARS = 60;\nexport const GROUP_NAME_MIN_CHARS = 2;\n\n// ─── Communities ───────────────────────────────────────────────────────────\n\n/** Community name length. Same range as a group, with room for a real\n * topic title. */\nexport const COMMUNITY_NAME_MAX_CHARS = 60;\nexport const COMMUNITY_NAME_MIN_CHARS = 2;\n\n/** Slug is auto-generated from name on create (lowercase, hyphenated)\n * but the user may also pick one explicitly on the create form. Match\n * Reddit's vibes: 3-21 chars, lower alphanumeric + underscore + hyphen. */\nexport const COMMUNITY_SLUG_MAX_CHARS = 21;\nexport const COMMUNITY_SLUG_MIN_CHARS = 3;\n/** Slug character class — kept in lockstep with the regex enforced by\n * the create-body Zod schema and the backend's slug normaliser. */\nexport const COMMUNITY_SLUG_PATTERN = /^[a-z0-9_-]+$/;\n\n/** Description shown on the community card + header. */\nexport const COMMUNITY_DESCRIPTION_MAX_CHARS = 500;\n\n/** Communities discover + members + posts page sizes. */\nexport const COMMUNITIES_PAGE_SIZE = 20;\nexport const COMMUNITY_MEMBERS_PAGE_SIZE = 50;\n\n// ─── Community v2 (taxonomy + reach + tags + verification + designation) ──\n\n/** Max tags a community can carry. Tags are picked from a curated\n * enum (`COMMUNITY_TAG_VALUES`), not free text — keeps the picker\n * + discovery filters meaningful. */\nexport const COMMUNITY_MAX_TAGS = 10;\n\n/** Hyperlocal discovery radius. Set generously because GPS accuracy\n * is noisy on phones — 5 km usually covers a viewer's neighborhood\n * plus a buffer of adjacent localities. Single source of truth so\n * backend filter + frontend copy agree. */\nexport const COMMUNITY_HYPERLOCAL_RADIUS_KM = 5;\n\n/** Custom (free-text) designation length bounds — used when the\n * owner / admin types a designation that isn't in the preset enum.\n * The preset path takes precedence; custom is the fallback. */\nexport const COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS = 2;\nexport const COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS = 30;\n/** Alphanumeric + space + ampersand — covers natural English labels\n * (\"Vice Chairman\", \"Press & Media\") without opening the door to\n * punctuation soup. */\nexport const COMMUNITY_DESIGNATION_CUSTOM_PATTERN = /^[A-Za-z0-9 &]+$/;\n\n// ─── Polls ─────────────────────────────────────────────────────────────────\n\n/** Poll question (the \"What's your favourite Diwali sweet?\" prompt).\n * Twitter caps at 280; we match for a snappy feed read. */\nexport const POLL_QUESTION_MAX_CHARS = 280;\nexport const POLL_QUESTION_MIN_CHARS = 1;\n\n/** Per-option label length. Long enough for a phrase, short enough that\n * options stack readably in a feed card on a phone. */\nexport const POLL_OPTION_MAX_CHARS = 80;\nexport const POLL_OPTION_MIN_CHARS = 1;\n\n/** A poll must offer at least two options (else it's not a choice) and\n * at most six (more than that fragments votes and tanks readability —\n * matches Twitter's 4 / WhatsApp's 12 / our pick is the middle). */\nexport const POLL_MIN_OPTIONS = 2;\nexport const POLL_MAX_OPTIONS = 6;\n\n/** Duration bounds. Polls MUST have an expiry — open-ended polls go\n * stale and clutter feeds (see PoLLs spec discussion). The floor stops\n * accidental \"1 second\" polls; the ceiling caps a single poll's\n * visibility window so authors think about timing. */\nexport const POLL_MIN_DURATION_MS = 5 * 60 * 1000; // 5 minutes\nexport const POLL_MAX_DURATION_MS = 30 * 24 * 60 * 60 * 1000; // 30 days\n\n/** Composer presets (the radio chips in the duration picker). Custom\n * date entry covers everything in between. Server still validates the\n * resolved `closesAt` against the bounds above. */\nexport const POLL_DURATION_PRESETS_MS = {\n oneDay: 24 * 60 * 60 * 1000,\n threeDays: 3 * 24 * 60 * 60 * 1000,\n sevenDays: 7 * 24 * 60 * 60 * 1000,\n fourteenDays: 14 * 24 * 60 * 60 * 1000,\n} as const;\n\n/** Feed page size for polls when fetched as their own list (rare —\n * polls usually surface via the unified feed). Keeps memory bounded. */\nexport const POLLS_PAGE_SIZE = 20;\n\n// ─── Crowdfunding ──────────────────────────────────────────────────────────\n\n/** Min goal in ₹. Filters spam while staying low enough for genuine\n * community-level requests (small medical bills, school fees, etc.). */\nexport const CROWDFUNDING_MIN_GOAL_INR = 500;\n\n/** Max goal in ₹. v1 ceiling — high enough for real medical/disaster\n * cases, low enough to discourage professional-fundraising adoption\n * before we have escrow infrastructure. */\nexport const CROWDFUNDING_MAX_GOAL_INR = 25_00_000;\n\n/** Minimum campaign duration in days. Below this and there's not enough\n * time for verification + visibility. */\nexport const CROWDFUNDING_MIN_DURATION_DAYS = 7;\n\n/** Max campaign duration in days. Industry norm — active campaigns feel\n * urgent; stagnant ones don't. Creator can always re-launch a follow-up. */\nexport const CROWDFUNDING_MAX_DURATION_DAYS = 60;\n\n/** Title + body limits. Title is the card headline; body is the\n * scrollable story below the goal block. */\nexport const CROWDFUNDING_TITLE_MAX_CHARS = 120;\nexport const CROWDFUNDING_TITLE_MIN_CHARS = 5;\nexport const CROWDFUNDING_DESCRIPTION_MAX_CHARS = 4000;\nexport const CROWDFUNDING_DESCRIPTION_MIN_CHARS = 50;\n\n/** Max story images (different from supporting docs). */\nexport const CROWDFUNDING_MAX_IMAGES = 5;\n\n/** Max supporting documents (medical invoice, school admission letter,\n * etc.). Kept off the wire; only the verifier and the creator see\n * these. */\nexport const CROWDFUNDING_MAX_SUPPORTING_DOCS = 5;\n\n/** Beneficiary fields. */\nexport const CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS = 100;\nexport const CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS = 50;\n\n/** Rejection reason length (verifier-supplied). */\nexport const CROWDFUNDING_REJECTION_REASON_MIN_CHARS = 10;\nexport const CROWDFUNDING_REJECTION_REASON_MAX_CHARS = 500;\n\n/** Identity-tier thresholds keyed to Indian regulatory practice:\n * ≤ 25k → Basic (UDP step 9 verified identity only)\n * 25k–2L → Standard (+ PAN + bank-holder-name match)\n * 2L–10L → Enhanced (+ Aadhaar last-4 + category supporting docs)\n * > 10L → Maximum (+ video KYC or in-person verification by\n * district leader)\n * ₹25k = PAN-mandatory threshold for cash deposits.\n * ₹2L = \"substantial money\" line for verification scrutiny.\n * ₹10L = mandatory video/in-person KYC tier in Indian fintech. */\nexport const CROWDFUNDING_TIER_STANDARD_INR = 25_000;\nexport const CROWDFUNDING_TIER_ENHANCED_INR = 2_00_000;\nexport const CROWDFUNDING_TIER_MAXIMUM_INR = 10_00_000;\n\n/** Max single self-attested donation amount. Capped at the campaign\n * ceiling — a single donor can't claim more than the entire goal. */\nexport const CROWDFUNDING_MAX_DONATION_INR = CROWDFUNDING_MAX_GOAL_INR;\n\n/** Listing page size when crowdfunding is fetched as its own list. */\nexport const CROWDFUNDING_PAGE_SIZE = 20;\n"]}
|