jansathi-community-schema 0.18.0 → 0.21.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 CHANGED
@@ -2,13 +2,14 @@
2
2
  * Comment wire shapes (with one-level reply nesting).
3
3
  *
4
4
  * Comments attach to any feed item via `(contentKind, contentId)` — the
5
- * same polymorphic key used by reactions and upvotes. One level of
5
+ * same polymorphic key used by reactions and votes. One level of
6
6
  * nesting only: a reply to a comment is allowed; a reply to a reply
7
7
  * is rejected at the server.
8
8
  *
9
- * The shape mirrors the post's `viewer` pattern so the client can
10
- * render an edit button on own comments and a reaction picker on
11
- * every comment.
9
+ * The shape mirrors the post's `viewer` pattern (minus `bookmarked`
10
+ * comments aren't bookmarkable, the parent post is the right scope)
11
+ * so the client can render an edit button on own comments and a
12
+ * reaction picker on every comment.
12
13
  *
13
14
  * @module community-schema/comment
14
15
  */
@@ -58,14 +59,17 @@ export declare const communityCommentWireSchema: z.ZodObject<{
58
59
  identityVerified: z.ZodOptional<z.ZodBoolean>;
59
60
  }, z.core.$strip>;
60
61
  text: z.ZodString;
61
- upvoteCount: z.ZodNumber;
62
+ score: z.ZodNumber;
62
63
  replyCount: z.ZodNumber;
63
64
  reactionCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
64
65
  createdAt: z.ZodString;
65
66
  editedAt: z.ZodNullable<z.ZodString>;
66
67
  deletedAt: z.ZodNullable<z.ZodString>;
67
68
  viewer: z.ZodOptional<z.ZodObject<{
68
- upvoted: z.ZodBoolean;
69
+ vote: z.ZodNullable<z.ZodEnum<{
70
+ up: "up";
71
+ down: "down";
72
+ }>>;
69
73
  reaction: z.ZodNullable<z.ZodString>;
70
74
  isAuthor: z.ZodBoolean;
71
75
  }, z.core.$strip>>;
@@ -1 +1 @@
1
- {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../src/comment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkCrC,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"}
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/comment.js CHANGED
@@ -2,18 +2,20 @@
2
2
  * Comment wire shapes (with one-level reply nesting).
3
3
  *
4
4
  * Comments attach to any feed item via `(contentKind, contentId)` — the
5
- * same polymorphic key used by reactions and upvotes. One level of
5
+ * same polymorphic key used by reactions and votes. One level of
6
6
  * nesting only: a reply to a comment is allowed; a reply to a reply
7
7
  * is rejected at the server.
8
8
  *
9
- * The shape mirrors the post's `viewer` pattern so the client can
10
- * render an edit button on own comments and a reaction picker on
11
- * every comment.
9
+ * The shape mirrors the post's `viewer` pattern (minus `bookmarked`
10
+ * comments aren't bookmarkable, the parent post is the right scope)
11
+ * so the client can render an edit button on own comments and a
12
+ * reaction picker on every comment.
12
13
  *
13
14
  * @module community-schema/comment
14
15
  */
15
16
  import { z } from 'zod';
16
17
  import { COMMENT_MAX_BODY_CHARS } from './constants.js';
18
+ import { voteValueSchema } from './engagement.js';
17
19
  import { contentKindSchema } from './enums.js';
18
20
  import { postAuthorSnapshotSchema } from './post.js';
19
21
  // ─── Wire shape ─────────────────────────────────────────────────────────────
@@ -30,7 +32,8 @@ export const communityCommentWireSchema = z.object({
30
32
  // Body
31
33
  text: z.string().max(COMMENT_MAX_BODY_CHARS),
32
34
  // Denormalised engagement
33
- upvoteCount: z.number().int().nonnegative(),
35
+ /** Net score = upvotes - downvotes. Signed. */
36
+ score: z.number().int(),
34
37
  /** Number of replies. Only meaningful on top-level comments; always
35
38
  * 0 on replies (the server enforces no-nesting). */
36
39
  replyCount: z.number().int().nonnegative(),
@@ -42,7 +45,7 @@ export const communityCommentWireSchema = z.object({
42
45
  // Per-viewer state
43
46
  viewer: z
44
47
  .object({
45
- upvoted: z.boolean(),
48
+ vote: voteValueSchema.nullable(),
46
49
  reaction: z.string().nullable(),
47
50
  isAuthor: z.boolean(),
48
51
  })
@@ -1 +1 @@
1
- {"version":3,"file":"comment.js","sourceRoot":"","sources":["../src/comment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,w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CAAC,CAAC;AAGH,+EAA+E;AAE/E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC;IACnD;;mCAE+B;IAC/B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAGH,+EAA+E;AAE/E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC;CACpD,CAAC,CAAC","sourcesContent":["/**\n * Comment wire shapes (with one-level reply nesting).\n *\n * Comments attach to any feed item via `(contentKind, contentId)` — the\n * same polymorphic key used by reactions and upvotes. One level of\n * nesting only: a reply to a comment is allowed; a reply to a reply\n * is rejected at the server.\n *\n * The shape mirrors the post's `viewer` pattern so the client can\n * render an edit button on own comments and a reaction picker on\n * every comment.\n *\n * @module community-schema/comment\n */\n\nimport { z } from 'zod';\nimport { COMMENT_MAX_BODY_CHARS } from './constants.js';\nimport { contentKindSchema } from './enums.js';\nimport { postAuthorSnapshotSchema } from './post.js';\n\n// ─── Wire shape ─────────────────────────────────────────────────────────────\n\nexport const communityCommentWireSchema = z.object({\n _id: z.string(),\n /** The feed item this comment belongs to. */\n contentKind: contentKindSchema,\n contentId: z.string(),\n /** The parent comment id, or null if this is a top-level comment.\n * A non-null value MAY only point at a top-level comment — the\n * server enforces this so the tree never grows to depth 3. */\n parentCommentId: z.string().nullable(),\n author: postAuthorSnapshotSchema,\n\n // Body\n text: z.string().max(COMMENT_MAX_BODY_CHARS),\n\n // Denormalised engagement\n upvoteCount: z.number().int().nonnegative(),\n /** Number of replies. Only meaningful on top-level comments; always\n * 0 on replies (the server enforces no-nesting). */\n replyCount: z.number().int().nonnegative(),\n reactionCounts: z.record(z.string(), z.number().int().nonnegative()),\n\n // Lifecycle\n createdAt: z.string().datetime(),\n editedAt: z.string().datetime().nullable(),\n deletedAt: z.string().datetime().nullable(),\n\n // Per-viewer state\n viewer: z\n .object({\n upvoted: z.boolean(),\n reaction: z.string().nullable(),\n isAuthor: z.boolean(),\n })\n .optional(),\n});\nexport type CommunityCommentWire = z.infer<typeof communityCommentWireSchema>;\n\n// ─── Create body ────────────────────────────────────────────────────────────\n\nexport const createCommentBodySchema = z.object({\n text: z.string().min(1).max(COMMENT_MAX_BODY_CHARS),\n /** Null = top-level comment on the content; a string id = reply to\n * a specific top-level comment. Server rejects ids pointing at a\n * reply (depth-3 attempt). */\n parentCommentId: z.string().nullable(),\n});\nexport type CreateCommentBody = z.infer<typeof createCommentBodySchema>;\n\n// ─── Update body ────────────────────────────────────────────────────────────\n\nexport const updateCommentBodySchema = z.object({\n text: z.string().min(1).max(COMMENT_MAX_BODY_CHARS),\n});\nexport type UpdateCommentBody = z.infer<typeof updateCommentBodySchema>;\n"]}
1
+ {"version":3,"file":"comment.js","sourceRoot":"","sources":["../src/comment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,+EAA+E;AAE/E,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,6CAA6C;IAC7C,WAAW,EAAE,iBAAiB;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB;;m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M,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAGH,+EAA+E;AAE/E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC;CACpD,CAAC,CAAC","sourcesContent":["/**\n * Comment wire shapes (with one-level reply nesting).\n *\n * Comments attach to any feed item via `(contentKind, contentId)` — the\n * same polymorphic key used by reactions and votes. One level of\n * nesting only: a reply to a comment is allowed; a reply to a reply\n * is rejected at the server.\n *\n * The shape mirrors the post's `viewer` pattern (minus `bookmarked` —\n * comments aren't bookmarkable, the parent post is the right scope)\n * so the client can render an edit button on own comments and a\n * reaction picker on every comment.\n *\n * @module community-schema/comment\n */\n\nimport { z } from 'zod';\nimport { COMMENT_MAX_BODY_CHARS } from './constants.js';\nimport { voteValueSchema } from './engagement.js';\nimport { contentKindSchema } from './enums.js';\nimport { postAuthorSnapshotSchema } from './post.js';\n\n// ─── Wire shape ─────────────────────────────────────────────────────────────\n\nexport const communityCommentWireSchema = z.object({\n _id: z.string(),\n /** The feed item this comment belongs to. */\n contentKind: contentKindSchema,\n contentId: z.string(),\n /** The parent comment id, or null if this is a top-level comment.\n * A non-null value MAY only point at a top-level comment — the\n * server enforces this so the tree never grows to depth 3. */\n parentCommentId: z.string().nullable(),\n author: postAuthorSnapshotSchema,\n\n // Body\n text: z.string().max(COMMENT_MAX_BODY_CHARS),\n\n // Denormalised engagement\n /** Net score = upvotes - downvotes. Signed. */\n score: z.number().int(),\n /** Number of replies. Only meaningful on top-level comments; always\n * 0 on replies (the server enforces no-nesting). */\n replyCount: z.number().int().nonnegative(),\n reactionCounts: z.record(z.string(), z.number().int().nonnegative()),\n\n // Lifecycle\n createdAt: z.string().datetime(),\n editedAt: z.string().datetime().nullable(),\n deletedAt: z.string().datetime().nullable(),\n\n // Per-viewer state\n viewer: z\n .object({\n vote: voteValueSchema.nullable(),\n reaction: z.string().nullable(),\n isAuthor: z.boolean(),\n })\n .optional(),\n});\nexport type CommunityCommentWire = z.infer<typeof communityCommentWireSchema>;\n\n// ─── Create body ────────────────────────────────────────────────────────────\n\nexport const createCommentBodySchema = z.object({\n text: z.string().min(1).max(COMMENT_MAX_BODY_CHARS),\n /** Null = top-level comment on the content; a string id = reply to\n * a specific top-level comment. Server rejects ids pointing at a\n * reply (depth-3 attempt). */\n parentCommentId: z.string().nullable(),\n});\nexport type CreateCommentBody = z.infer<typeof createCommentBodySchema>;\n\n// ─── Update body ────────────────────────────────────────────────────────────\n\nexport const updateCommentBodySchema = z.object({\n text: z.string().min(1).max(COMMENT_MAX_BODY_CHARS),\n});\nexport type UpdateCommentBody = z.infer<typeof updateCommentBodySchema>;\n"]}
@@ -27,6 +27,63 @@
27
27
  * @module community-schema/community
28
28
  */
29
29
  import { z } from 'zod';
30
+ /**
31
+ * Two fundamentally different community shapes share the same wire
32
+ * schema:
33
+ *
34
+ * user — topic-of-interest community a regular user creates and
35
+ * owns (Reddit subreddit / Facebook group analogue). Owner
36
+ * + admins manage; members join. The default kind.
37
+ * official — area-based civic community for a specific administrative
38
+ * area (village / block / district / urban body / ... up
39
+ * to state). Created by the elected area leader; has NO
40
+ * owner. Permission is computed at read time from the
41
+ * current area-leader binding:
42
+ * - admin role = whoever is the area's leader right now
43
+ * (falls back to platform superadmin when no leader is
44
+ * appointed)
45
+ * - representative role = the elected official the area
46
+ * leader names (Pradhan / Mayor / MLA / ...); replaced
47
+ * on each new political election
48
+ * - moderator role = community-scoped; can hide reported
49
+ * posts. Representative can override moderator
50
+ * decisions from settings.
51
+ * Always auto-verified (the leader's act of creating it IS
52
+ * the verification) and immune to delete from anyone
53
+ * except platform superadmin / manager.
54
+ */
55
+ export declare const COMMUNITY_KIND_VALUES: readonly ["user", "official"];
56
+ export type CommunityKind = (typeof COMMUNITY_KIND_VALUES)[number];
57
+ export declare const communityKindSchema: z.ZodEnum<{
58
+ user: "user";
59
+ official: "official";
60
+ }>;
61
+ /**
62
+ * Administrative area levels that can host an official community.
63
+ *
64
+ * Mirrors a subset of the reform-backend `JURISDICTION_LEVEL` enum —
65
+ * NATIONAL and GLOBAL are intentionally excluded because they are
66
+ * virtual tiers (no `Area` row) and don't fit the "community for THIS
67
+ * area" model. If we ever want national / global civic communities
68
+ * they should be a separate concept.
69
+ *
70
+ * The leader-jurisdiction → area-kind binding is 1:1:
71
+ * leader.jurisdictionLevel === community.officialAreaKind AND
72
+ * leader.jurisdictionAreaId === community.officialAreaId
73
+ * is the gate for who can create / admin the community.
74
+ */
75
+ export declare const OFFICIAL_COMMUNITY_AREA_KIND_VALUES: readonly ["STATE", "DISTRICT", "BLOCK", "GRAM_PANCHAYAT", "VILLAGE", "URBAN_BODY", "URBAN_WARD", "LOCALITY"];
76
+ export type OfficialCommunityAreaKind = (typeof OFFICIAL_COMMUNITY_AREA_KIND_VALUES)[number];
77
+ export declare const officialCommunityAreaKindSchema: z.ZodEnum<{
78
+ STATE: "STATE";
79
+ DISTRICT: "DISTRICT";
80
+ BLOCK: "BLOCK";
81
+ GRAM_PANCHAYAT: "GRAM_PANCHAYAT";
82
+ VILLAGE: "VILLAGE";
83
+ URBAN_BODY: "URBAN_BODY";
84
+ URBAN_WARD: "URBAN_WARD";
85
+ LOCALITY: "LOCALITY";
86
+ }>;
30
87
  /**
31
88
  * public — anyone can read + post.
32
89
  * restricted — anyone can read; only approved members can post. The
@@ -411,17 +468,37 @@ export declare const communityCenterCoordsSchema: z.ZodObject<{
411
468
  export type CommunityCenterCoords = z.infer<typeof communityCenterCoordsSchema>;
412
469
  /** Role hierarchy within a single community.
413
470
  *
414
- * owner — creator; cannot be demoted by anyone, can transfer
415
- * ownership (deferred for v1) and delete the community.
416
- * admin — granted by owner; can edit metadata, kick members,
417
- * soft-delete posts authored in the community.
418
- * member — joined; can post and comment, can leave at any time.
471
+ * The role set is shared across `user` and `official` communities, but
472
+ * not every role is valid for every kind:
473
+ *
474
+ * owner — `kind: 'user'` only. The creator; can edit
475
+ * metadata, transfer ownership (deferred), and
476
+ * delete the community.
477
+ * admin — `kind: 'user'`: granted by the owner; can edit
478
+ * metadata, kick members, soft-delete posts.
479
+ * `kind: 'official'`: computed from the current
480
+ * area-leader binding (never stored on a membership
481
+ * row); platform superadmin fills the slot when no
482
+ * leader is appointed.
483
+ * representative — `kind: 'official'` only. The elected official the
484
+ * area leader names (Pradhan / Mayor / ...).
485
+ * Replaced on every new political election. Can
486
+ * override moderator decisions from the community
487
+ * settings page.
488
+ * moderator — `kind: 'official'` only. Community-scoped; can
489
+ * hide reported posts. Multiple moderators allowed
490
+ * per community. The current admin (area leader)
491
+ * grants and revokes.
492
+ * member — joined; can post and comment, can leave at any
493
+ * time. Valid for both kinds.
419
494
  */
420
- export declare const COMMUNITY_ROLE_VALUES: readonly ["owner", "admin", "member"];
495
+ export declare const COMMUNITY_ROLE_VALUES: readonly ["owner", "admin", "representative", "moderator", "member"];
421
496
  export type CommunityRole = (typeof COMMUNITY_ROLE_VALUES)[number];
422
497
  export declare const communityRoleSchema: z.ZodEnum<{
423
498
  owner: "owner";
424
499
  admin: "admin";
500
+ representative: "representative";
501
+ moderator: "moderator";
425
502
  member: "member";
426
503
  }>;
427
504
  /** Membership lifecycle.
@@ -456,7 +533,12 @@ export declare const communityWireSchema: z.ZodObject<{
456
533
  restricted: "restricted";
457
534
  }>;
458
535
  coverImageUrl: z.ZodOptional<z.ZodString>;
459
- ownerUserId: z.ZodString;
536
+ kind: z.ZodEnum<{
537
+ user: "user";
538
+ official: "official";
539
+ }>;
540
+ ownerUserId: z.ZodNullable<z.ZodString>;
541
+ createdBy: z.ZodNullable<z.ZodString>;
460
542
  memberCount: z.ZodNumber;
461
543
  postCount: z.ZodNumber;
462
544
  groupId: z.ZodString;
@@ -703,10 +785,23 @@ export declare const communityWireSchema: z.ZodObject<{
703
785
  national: "national";
704
786
  global: "global";
705
787
  }>>;
788
+ officialAreaKind: z.ZodNullable<z.ZodEnum<{
789
+ STATE: "STATE";
790
+ DISTRICT: "DISTRICT";
791
+ BLOCK: "BLOCK";
792
+ GRAM_PANCHAYAT: "GRAM_PANCHAYAT";
793
+ VILLAGE: "VILLAGE";
794
+ URBAN_BODY: "URBAN_BODY";
795
+ URBAN_WARD: "URBAN_WARD";
796
+ LOCALITY: "LOCALITY";
797
+ }>>;
798
+ officialAreaId: z.ZodNullable<z.ZodString>;
706
799
  viewer: z.ZodOptional<z.ZodObject<{
707
800
  role: z.ZodNullable<z.ZodEnum<{
708
801
  owner: "owner";
709
802
  admin: "admin";
803
+ representative: "representative";
804
+ moderator: "moderator";
710
805
  member: "member";
711
806
  }>>;
712
807
  status: z.ZodNullable<z.ZodEnum<{
@@ -750,6 +845,8 @@ export declare const communityMemberWireSchema: z.ZodObject<{
750
845
  role: z.ZodEnum<{
751
846
  owner: "owner";
752
847
  admin: "admin";
848
+ representative: "representative";
849
+ moderator: "moderator";
753
850
  member: "member";
754
851
  }>;
755
852
  status: z.ZodEnum<{
@@ -1368,7 +1465,12 @@ export declare const communityListResponseSchema: z.ZodObject<{
1368
1465
  restricted: "restricted";
1369
1466
  }>;
1370
1467
  coverImageUrl: z.ZodOptional<z.ZodString>;
1371
- ownerUserId: z.ZodString;
1468
+ kind: z.ZodEnum<{
1469
+ user: "user";
1470
+ official: "official";
1471
+ }>;
1472
+ ownerUserId: z.ZodNullable<z.ZodString>;
1473
+ createdBy: z.ZodNullable<z.ZodString>;
1372
1474
  memberCount: z.ZodNumber;
1373
1475
  postCount: z.ZodNumber;
1374
1476
  groupId: z.ZodString;
@@ -1615,10 +1717,23 @@ export declare const communityListResponseSchema: z.ZodObject<{
1615
1717
  national: "national";
1616
1718
  global: "global";
1617
1719
  }>>;
1720
+ officialAreaKind: z.ZodNullable<z.ZodEnum<{
1721
+ STATE: "STATE";
1722
+ DISTRICT: "DISTRICT";
1723
+ BLOCK: "BLOCK";
1724
+ GRAM_PANCHAYAT: "GRAM_PANCHAYAT";
1725
+ VILLAGE: "VILLAGE";
1726
+ URBAN_BODY: "URBAN_BODY";
1727
+ URBAN_WARD: "URBAN_WARD";
1728
+ LOCALITY: "LOCALITY";
1729
+ }>>;
1730
+ officialAreaId: z.ZodNullable<z.ZodString>;
1618
1731
  viewer: z.ZodOptional<z.ZodObject<{
1619
1732
  role: z.ZodNullable<z.ZodEnum<{
1620
1733
  owner: "owner";
1621
1734
  admin: "admin";
1735
+ representative: "representative";
1736
+ moderator: "moderator";
1622
1737
  member: "member";
1623
1738
  }>>;
1624
1739
  status: z.ZodNullable<z.ZodEnum<{
@@ -1673,6 +1788,8 @@ export declare const joinCommunityResponseSchema: z.ZodObject<{
1673
1788
  role: z.ZodNullable<z.ZodEnum<{
1674
1789
  owner: "owner";
1675
1790
  admin: "admin";
1791
+ representative: "representative";
1792
+ moderator: "moderator";
1676
1793
  member: "member";
1677
1794
  }>>;
1678
1795
  joinedAt: z.ZodNullable<z.ZodString>;
@@ -1687,6 +1804,8 @@ export declare const communityMembersListResponseSchema: z.ZodObject<{
1687
1804
  role: z.ZodEnum<{
1688
1805
  owner: "owner";
1689
1806
  admin: "admin";
1807
+ representative: "representative";
1808
+ moderator: "moderator";
1690
1809
  member: "member";
1691
1810
  }>;
1692
1811
  status: z.ZodEnum<{
@@ -1836,4 +1955,96 @@ export declare const areaPickerResponseSchema: z.ZodObject<{
1836
1955
  }, z.core.$strip>>;
1837
1956
  }, z.core.$strip>;
1838
1957
  export type AreaPickerResponse = z.infer<typeof areaPickerResponseSchema>;
1958
+ /**
1959
+ * `POST /communities/official` body. Single-step flow.
1960
+ *
1961
+ * The area-leader binding gates the call: the caller's elevated
1962
+ * `serviceRoles['reform']` must include `leader` AND their
1963
+ * `jurisdictionLevel + jurisdictionAreaId` must exactly equal the
1964
+ * `areaKind + areaId` supplied here. Backend resolves the rest:
1965
+ *
1966
+ * • `name` and `slug` are derived server-side from the area name +
1967
+ * kind (e.g. "Pataudi Block Community" / `pataudi-block`). The
1968
+ * caller may override `description` and pick a cover image.
1969
+ * • `kind` is fixed to `'official'`; no need to send it.
1970
+ * • `reach`, `category`, `tags`, `mature`, `areaLineage`,
1971
+ * `centerCoords` are derived from the picked area.
1972
+ * • `verifiedAt`, `verifiedBy` are auto-set at create time (the
1973
+ * leader's act of creating it IS the verification).
1974
+ *
1975
+ * Re-creating after an area-level community has been soft-deleted by
1976
+ * superadmin is allowed because the partial unique index excludes
1977
+ * soft-deleted rows.
1978
+ */
1979
+ export declare const createOfficialCommunityBodySchema: z.ZodObject<{
1980
+ areaKind: z.ZodEnum<{
1981
+ STATE: "STATE";
1982
+ DISTRICT: "DISTRICT";
1983
+ BLOCK: "BLOCK";
1984
+ GRAM_PANCHAYAT: "GRAM_PANCHAYAT";
1985
+ VILLAGE: "VILLAGE";
1986
+ URBAN_BODY: "URBAN_BODY";
1987
+ URBAN_WARD: "URBAN_WARD";
1988
+ LOCALITY: "LOCALITY";
1989
+ }>;
1990
+ areaId: z.ZodString;
1991
+ description: z.ZodOptional<z.ZodString>;
1992
+ coverImageUrl: z.ZodOptional<z.ZodString>;
1993
+ }, z.core.$strip>;
1994
+ export type CreateOfficialCommunityBody = z.infer<typeof createOfficialCommunityBodySchema>;
1995
+ /**
1996
+ * Body for `POST /communities/:slug/moderators` — assign a moderator.
1997
+ * The target user must already be an active member of the community.
1998
+ *
1999
+ * Caller authority:
2000
+ * - `kind: 'official'` admin (the current area leader, or the
2001
+ * platform superadmin when no leader is appointed) can add or
2002
+ * remove a moderator. The representative cannot (representative
2003
+ * can override moderator decisions but does not manage the
2004
+ * moderator roster).
2005
+ *
2006
+ * To remove a moderator use `DELETE /communities/:slug/moderators/:userId`.
2007
+ */
2008
+ export declare const addOfficialModeratorBodySchema: z.ZodObject<{
2009
+ userId: z.ZodString;
2010
+ }, z.core.$strip>;
2011
+ export type AddOfficialModeratorBody = z.infer<typeof addOfficialModeratorBodySchema>;
2012
+ /**
2013
+ * Body for `PUT /communities/:slug/representative` — set or replace
2014
+ * the community's named elected representative (Pradhan / Mayor / ...).
2015
+ *
2016
+ * The representative slot is single-valued: writing a new user ID
2017
+ * replaces whoever held it before (matching the "new election → new
2018
+ * person" lifecycle). Use `DELETE /communities/:slug/representative`
2019
+ * to clear the slot between elections.
2020
+ *
2021
+ * The target user must already be an active member of the community;
2022
+ * the backend will auto-add them as a member if they're not.
2023
+ *
2024
+ * Caller authority: `kind: 'official'` admin only.
2025
+ */
2026
+ export declare const setOfficialRepresentativeBodySchema: z.ZodObject<{
2027
+ userId: z.ZodString;
2028
+ }, z.core.$strip>;
2029
+ export type SetOfficialRepresentativeBody = z.infer<typeof setOfficialRepresentativeBodySchema>;
2030
+ /**
2031
+ * Body for `POST /communities/:slug/posts/:postId/hide`.
2032
+ *
2033
+ * Hides a post from the community feed for everyone except the author
2034
+ * (who still sees their own post, marked as "hidden by moderator").
2035
+ *
2036
+ * Caller authority on `kind: 'official'`:
2037
+ * - moderator — can hide a post that has at least one open report.
2038
+ * - representative — can hide or unhide ANY post (including overriding
2039
+ * a moderator's hide). The override is what makes
2040
+ * the representative's "settings" page useful.
2041
+ * - admin — same authority as representative.
2042
+ *
2043
+ * On `kind: 'user'` the existing soft-delete by owner / admin path
2044
+ * continues to apply; this endpoint is `official`-only.
2045
+ */
2046
+ export declare const hidePostBodySchema: z.ZodObject<{
2047
+ reason: z.ZodOptional<z.ZodString>;
2048
+ }, z.core.$strip>;
2049
+ export type HidePostBody = z.infer<typeof hidePostBodySchema>;
1839
2050
  //# sourceMappingURL=community.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"community.d.ts","sourceRoot":"","sources":["../src/community.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,8CAA+C,CAAC;AAClF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,C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