founder-schema 0.11.0 → 0.13.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.
Files changed (99) hide show
  1. package/README.md +85 -0
  2. package/dist/access/access.d.ts +10 -6
  3. package/dist/access/access.d.ts.map +1 -1
  4. package/dist/access/access.js +8 -1
  5. package/dist/access/access.js.map +1 -1
  6. package/dist/access/permissions.d.ts +60 -3
  7. package/dist/access/permissions.d.ts.map +1 -1
  8. package/dist/access/permissions.js +24 -0
  9. package/dist/access/permissions.js.map +1 -1
  10. package/dist/access/roles.d.ts +3 -3
  11. package/dist/access/standing.d.ts +59 -0
  12. package/dist/access/standing.d.ts.map +1 -0
  13. package/dist/access/standing.js +52 -0
  14. package/dist/access/standing.js.map +1 -0
  15. package/dist/core/errors.d.ts +51 -1
  16. package/dist/core/errors.d.ts.map +1 -1
  17. package/dist/core/errors.js +89 -1
  18. package/dist/core/errors.js.map +1 -1
  19. package/dist/core/limits.d.ts +29 -3
  20. package/dist/core/limits.d.ts.map +1 -1
  21. package/dist/core/limits.js +30 -3
  22. package/dist/core/limits.js.map +1 -1
  23. package/dist/core/responses.d.ts +59 -0
  24. package/dist/core/responses.d.ts.map +1 -1
  25. package/dist/core/responses.js +6 -0
  26. package/dist/core/responses.js.map +1 -1
  27. package/dist/core/validation.d.ts +14 -0
  28. package/dist/core/validation.d.ts.map +1 -1
  29. package/dist/core/validation.js +14 -0
  30. package/dist/core/validation.js.map +1 -1
  31. package/dist/domains/audit/audit.d.ts +28 -7
  32. package/dist/domains/audit/audit.d.ts.map +1 -1
  33. package/dist/domains/audit/audit.js +17 -0
  34. package/dist/domains/audit/audit.js.map +1 -1
  35. package/dist/domains/billing/billing.d.ts +1180 -0
  36. package/dist/domains/billing/billing.d.ts.map +1 -0
  37. package/dist/domains/billing/billing.js +403 -0
  38. package/dist/domains/billing/billing.js.map +1 -0
  39. package/dist/domains/billing/gst.d.ts +229 -0
  40. package/dist/domains/billing/gst.d.ts.map +1 -0
  41. package/dist/domains/billing/gst.js +117 -0
  42. package/dist/domains/billing/gst.js.map +1 -0
  43. package/dist/domains/chat/chat.d.ts +85 -0
  44. package/dist/domains/chat/chat.d.ts.map +1 -1
  45. package/dist/domains/chat/chat.js +62 -0
  46. package/dist/domains/chat/chat.js.map +1 -1
  47. package/dist/domains/communities/communities.d.ts +13 -11
  48. package/dist/domains/communities/communities.d.ts.map +1 -1
  49. package/dist/domains/communities/communities.js +7 -0
  50. package/dist/domains/communities/communities.js.map +1 -1
  51. package/dist/domains/contributions/contributions.d.ts +2 -2
  52. package/dist/domains/contributions/contributions.d.ts.map +1 -1
  53. package/dist/domains/contributions/contributions.js +3 -2
  54. package/dist/domains/contributions/contributions.js.map +1 -1
  55. package/dist/domains/dashboard/dashboard.d.ts +9 -1
  56. package/dist/domains/dashboard/dashboard.d.ts.map +1 -1
  57. package/dist/domains/dashboard/dashboard.js +15 -0
  58. package/dist/domains/dashboard/dashboard.js.map +1 -1
  59. package/dist/domains/feed/feed.d.ts.map +1 -1
  60. package/dist/domains/feed/feed.js +7 -1
  61. package/dist/domains/feed/feed.js.map +1 -1
  62. package/dist/domains/members/members.d.ts +30 -5
  63. package/dist/domains/members/members.d.ts.map +1 -1
  64. package/dist/domains/members/members.js +23 -0
  65. package/dist/domains/members/members.js.map +1 -1
  66. package/dist/domains/membership/membership.d.ts +240 -0
  67. package/dist/domains/membership/membership.d.ts.map +1 -0
  68. package/dist/domains/membership/membership.js +159 -0
  69. package/dist/domains/membership/membership.js.map +1 -0
  70. package/dist/domains/notifications/notifications.d.ts +43 -1
  71. package/dist/domains/notifications/notifications.d.ts.map +1 -1
  72. package/dist/domains/notifications/notifications.js +19 -0
  73. package/dist/domains/notifications/notifications.js.map +1 -1
  74. package/dist/domains/onboarding/onboarding.d.ts +0 -10
  75. package/dist/domains/onboarding/onboarding.d.ts.map +1 -1
  76. package/dist/domains/onboarding/onboarding.js +9 -3
  77. package/dist/domains/onboarding/onboarding.js.map +1 -1
  78. package/dist/domains/products/products.d.ts +44 -12
  79. package/dist/domains/products/products.d.ts.map +1 -1
  80. package/dist/domains/products/products.js +33 -3
  81. package/dist/domains/products/products.js.map +1 -1
  82. package/dist/domains/profile/founder-profile.d.ts +10 -4
  83. package/dist/domains/profile/founder-profile.d.ts.map +1 -1
  84. package/dist/domains/profile/founder-profile.js +6 -3
  85. package/dist/domains/profile/founder-profile.js.map +1 -1
  86. package/dist/domains/reviews/reviews.d.ts +3 -0
  87. package/dist/domains/reviews/reviews.d.ts.map +1 -1
  88. package/dist/domains/reviews/reviews.js +6 -1
  89. package/dist/domains/reviews/reviews.js.map +1 -1
  90. package/dist/domains/support/support.d.ts +16 -1
  91. package/dist/domains/support/support.d.ts.map +1 -1
  92. package/dist/domains/support/support.js +5 -0
  93. package/dist/domains/support/support.js.map +1 -1
  94. package/dist/domains/team/team.d.ts +4 -4
  95. package/dist/index.d.ts +7 -4
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.js +9 -4
  98. package/dist/index.js.map +1 -1
  99. package/package.json +1 -1
@@ -149,9 +149,9 @@ export declare function communityChangeExposes(from: CommunityVisibility, to: Co
149
149
  /** A member's role inside one community. */
150
150
  export declare const COMMUNITY_ROLE_VALUES: readonly ["admin", "moderator", "member"];
151
151
  export declare const communityRoleSchema: z.ZodEnum<{
152
+ admin: "admin";
152
153
  moderator: "moderator";
153
154
  member: "member";
154
- admin: "admin";
155
155
  }>;
156
156
  export type CommunityRole = z.infer<typeof communityRoleSchema>;
157
157
  /**
@@ -206,9 +206,9 @@ export declare const communityCardViewerSchema: z.ZodObject<{
206
206
  invited: "invited";
207
207
  }>>;
208
208
  role: z.ZodNullable<z.ZodEnum<{
209
+ admin: "admin";
209
210
  moderator: "moderator";
210
211
  member: "member";
211
- admin: "admin";
212
212
  }>>;
213
213
  }, z.core.$strip>;
214
214
  export type CommunityCardViewer = z.infer<typeof communityCardViewerSchema>;
@@ -320,9 +320,9 @@ export declare const communityCardSchema: z.ZodObject<{
320
320
  invited: "invited";
321
321
  }>>;
322
322
  role: z.ZodNullable<z.ZodEnum<{
323
+ admin: "admin";
323
324
  moderator: "moderator";
324
325
  member: "member";
325
- admin: "admin";
326
326
  }>>;
327
327
  }, z.core.$strip>>;
328
328
  }, z.core.$strip>;
@@ -339,9 +339,9 @@ export declare const communityViewerSchema: z.ZodObject<{
339
339
  invited: "invited";
340
340
  }>>;
341
341
  role: z.ZodNullable<z.ZodEnum<{
342
+ admin: "admin";
342
343
  moderator: "moderator";
343
344
  member: "member";
344
- admin: "admin";
345
345
  }>>;
346
346
  canRead: z.ZodBoolean;
347
347
  canSeeMembers: z.ZodBoolean;
@@ -351,6 +351,7 @@ export declare const communityViewerSchema: z.ZodObject<{
351
351
  canLeave: z.ZodBoolean;
352
352
  canModerate: z.ZodBoolean;
353
353
  canManage: z.ZodBoolean;
354
+ canAssign: z.ZodBoolean;
354
355
  canAnnounce: z.ZodBoolean;
355
356
  canArchive: z.ZodBoolean;
356
357
  }, z.core.$strip>;
@@ -369,9 +370,9 @@ export declare const communityMemberSchema: z.ZodObject<{
369
370
  avatarUrl: z.ZodOptional<z.ZodURL>;
370
371
  headline: z.ZodOptional<z.ZodString>;
371
372
  role: z.ZodEnum<{
373
+ admin: "admin";
372
374
  moderator: "moderator";
373
375
  member: "member";
374
- admin: "admin";
375
376
  }>;
376
377
  joinedAt: z.ZodISODateTime;
377
378
  viewer: z.ZodOptional<z.ZodObject<{
@@ -490,9 +491,9 @@ export declare const communitySchema: z.ZodObject<{
490
491
  avatarUrl: z.ZodOptional<z.ZodURL>;
491
492
  headline: z.ZodOptional<z.ZodString>;
492
493
  role: z.ZodEnum<{
494
+ admin: "admin";
493
495
  moderator: "moderator";
494
496
  member: "member";
495
- admin: "admin";
496
497
  }>;
497
498
  joinedAt: z.ZodISODateTime;
498
499
  viewer: z.ZodOptional<z.ZodObject<{
@@ -512,9 +513,9 @@ export declare const communitySchema: z.ZodObject<{
512
513
  invited: "invited";
513
514
  }>>;
514
515
  role: z.ZodNullable<z.ZodEnum<{
516
+ admin: "admin";
515
517
  moderator: "moderator";
516
518
  member: "member";
517
- admin: "admin";
518
519
  }>>;
519
520
  canRead: z.ZodBoolean;
520
521
  canSeeMembers: z.ZodBoolean;
@@ -524,6 +525,7 @@ export declare const communitySchema: z.ZodObject<{
524
525
  canLeave: z.ZodBoolean;
525
526
  canModerate: z.ZodBoolean;
526
527
  canManage: z.ZodBoolean;
528
+ canAssign: z.ZodBoolean;
527
529
  canAnnounce: z.ZodBoolean;
528
530
  canArchive: z.ZodBoolean;
529
531
  }, z.core.$strip>>;
@@ -859,9 +861,9 @@ export declare const communityCardPageSchema: z.ZodObject<{
859
861
  invited: "invited";
860
862
  }>>;
861
863
  role: z.ZodNullable<z.ZodEnum<{
864
+ admin: "admin";
862
865
  moderator: "moderator";
863
866
  member: "member";
864
- admin: "admin";
865
867
  }>>;
866
868
  }, z.core.$strip>>;
867
869
  }, z.core.$strip>>;
@@ -876,9 +878,9 @@ export declare const communityMemberPageSchema: z.ZodObject<{
876
878
  avatarUrl: z.ZodOptional<z.ZodURL>;
877
879
  headline: z.ZodOptional<z.ZodString>;
878
880
  role: z.ZodEnum<{
881
+ admin: "admin";
879
882
  moderator: "moderator";
880
883
  member: "member";
881
- admin: "admin";
882
884
  }>;
883
885
  joinedAt: z.ZodISODateTime;
884
886
  viewer: z.ZodOptional<z.ZodObject<{
@@ -1157,9 +1159,9 @@ export declare const communityMembersQuerySchema: z.ZodObject<{
1157
1159
  limit: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
1158
1160
  cursor: z.ZodOptional<z.ZodString>;
1159
1161
  role: z.ZodPreprocess<z.ZodOptional<z.ZodEnum<{
1162
+ admin: "admin";
1160
1163
  moderator: "moderator";
1161
1164
  member: "member";
1162
- admin: "admin";
1163
1165
  }>>, unknown>;
1164
1166
  }, z.core.$strip>;
1165
1167
  export type CommunityMembersQuery = z.infer<typeof communityMembersQuerySchema>;
@@ -1416,9 +1418,9 @@ export type InviteCommunityMemberBody = z.infer<typeof inviteCommunityMemberBody
1416
1418
  /** `PUT /communities/:id/members/:userId/role` (admins). Never the last admin's own step down. */
1417
1419
  export declare const setCommunityMemberRoleBodySchema: z.ZodObject<{
1418
1420
  role: z.ZodEnum<{
1421
+ admin: "admin";
1419
1422
  moderator: "moderator";
1420
1423
  member: "member";
1421
- admin: "admin";
1422
1424
  }>;
1423
1425
  }, z.core.$strip>;
1424
1426
  export type SetCommunityMemberRoleBody = z.infer<typeof setCommunityMemberRoleBodySchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"communities.d.ts","sourceRoot":"","sources":["../../../src/domains/communities/communities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoHG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2BxB,4DAA4D;AAC5D,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,kEAAkE;AAClE,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAChD;;;GAGG;AACH,eAAO,MAAM,8BAA8B,QAAsB,CAAC;AAKlE,mCAAmC;AACnC,eAAO,MAAM,2BAA2B,0CAA2C,CAAC;AACpF,eAAO,MAAM,yBAAyB;;;;EAAsC,CAAC;AAC7E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;CAIkB,CAAC;AAEzD,8EAA8E;AAC9E,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,mBAAmB,EACzB,EAAE,EAAE,mBAAmB,GACtB,OAAO,CAET;AAED,4CAA4C;AAC5C,eAAO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G;AAClG,eAAO,MAAM,gCAAgC;;;;;;iBAA0C,CAAC;AACxF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,yFAAyF;AACzF,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;iBAGxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;GAGG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM9C,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAEhG;;;GAGG;AACH,eAAO,MAAM,oCAAoC;;iBAE/C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC"}
@@ -232,6 +232,13 @@ export const communityViewerSchema = communityCardViewerSchema.extend({
232
232
  canModerate: z.boolean(),
233
233
  /** Admins (and managers, super admins): details, icon, type, roles, bans. */
234
234
  canManage: z.boolean(),
235
+ /**
236
+ * Change members' roles (hand it over) and lift bans (0.13.0): every admin,
237
+ * INCLUDING one whose membership ended and so cannot manage or moderate any
238
+ * more. They keep this so a sole admin is never trapped: Manage shows them
239
+ * Members (roles only) and Bans (unban only).
240
+ */
241
+ canAssign: z.boolean(),
235
242
  /** May notify every member with an announcement now (admins, at most once per `COMMUNITY_ANNOUNCE_INTERVAL_MS`). */
236
243
  canAnnounce: z.boolean(),
237
244
  /** Managers and super admins: archive, restore, delete. */
@@ -1 +1 @@
1
- {"version":3,"file":"communities.js","sourceRoot":"","sources":["../../../src/domains/communities/communities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoHG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,4BAA4B,EAC5B,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,4BAA4B,EAC5B,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,4DAA4D;AAC5D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AACtC,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AACpC,kEAAkE;AAClE,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAChD;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAElE,gFAAgF;AAChF,4EAA4E;AAE5E,mCAAmC;AACnC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,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FAAyF;AACzF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;CAC1E,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,SAAS,EAAE,cAAc;IACzB,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE;CAC3B,CAAC,CAAC;AAGH;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,iBAAiB;IAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,QAAQ,EAAE;IAC1E,UAAU,EAAE,yBAAyB;IACrC,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAGH;;;GAGG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,GAAG,CAAC,4BAA4B,CAAC;CAC9F,CAAC,CAAC","sourcesContent":["/**\n * founder-schema — Communities: official spaces inside Founder Circle (0.9.0)\n *\n * THE USER'S DECISIONS (2026-10-08), each asked on its own:\n *\n * - OFFICIAL: managers, super admins, and members given the\n * `create_communities` capability create them. Everyone else SUGGESTS one;\n * managers and super admins review the suggestions.\n * - THREE TYPES, three separate questions answered per type:\n *\n * public private hidden\n * listed in Discover yes yes no\n * header (name, about, signed-in signed-in members and\n * rules, admins, count) members members invitees (404 otherwise)\n * posts, polls, members signed-in members only members only\n * joining one tap request, then invite only,\n * approval then accept\n *\n * Taking part (post, poll, comment, react, vote, save, report) is for\n * members of every type. \"Members\" means ACTIVE members: someone who\n * requested, was invited or is banned is a non-member for every rule.\n * - PUBLIC MEANS PUBLIC INSIDE FOUNDER CIRCLE: a signed-out visitor sees no\n * community content of any type, even by a shared link.\n * - THE HOME FEED adds only the communities the member joined.\n * - NO CHAT IN 0.9.0 (feed-first). Announcements are pinned posts\n * (`COMMUNITY_PINS_MAX`), optionally notifying every member.\n *\n * A banned member sees the community as hidden (404 everywhere) until\n * unbanned. Platform staff acting as moderator, manager or super admin READ\n * every community, as they read every post, and moderate its content through\n * the staff moderation queue; to take part they join like anyone else.\n *\n * Refusals follow what the caller can SEE: 404 for something they may not\n * see (the same as for something that does not exist, so nothing is\n * probed), 403 `COMMUNITY_JOIN_REQUIRED` for something they see but must join\n * to read or to take part in.\n *\n * Content in a community carries no product and no ask, and cannot be\n * reposted (a repost is general content, readable signed out): two leak paths\n * closed by construction. Design: founder-circle-backend `docs/communities.md`.\n *\n * Inside a community:\n *\n * member moderator admin manager,\n * super admin\n * post, poll, comment, react, vote ✓ ✓ ✓ ✓ (a member)\n * approve requests, invite, pin, hide ✓ ✓ ✓\n * remove a member (not a moderator) ✓ ✓ ✓\n * remove a moderator ✓ ✓\n * remove or ban an admin ✓\n * notify all, ban, roles, edit, type ✓ ✓\n * archive, delete ✓\n *\n * An admin may unmake another admin (then act on them as on a member). Each\n * member row says what this viewer may do to it (`communityMemberSchema.viewer`):\n * a client never works it out from roles.\n *\n * A community always keeps an admin while anyone can be one\n * (`COMMUNITY_LAST_ADMIN`): an admin leaves, steps down, or deletes their\n * account only once someone else is admin (the user's rule, 2026-10-08). When\n * nobody else is active, or the account was deleted where it cannot be\n * refused (central sign-in), the community is ORPHANED: managers and super\n * admins run it (they can act on any community), it is flagged in the audit\n * log (`community.orphaned`), and the page says so to them (`orphaned`).\n *\n * Routes (all signed in):\n * GET /api/v1/communities communityDiscoverQuerySchema -> communityCardPageSchema\n * GET /api/v1/communities/mine paginationQuerySchema -> communityCardPageSchema\n * GET /api/v1/communities/invites communityInvitesSchema (mine, waiting)\n * GET /api/v1/communities/orphaned paginationQuerySchema -> communityCardPageSchema\n * (managers, super admins: communities left with no admin, newest first)\n * POST /api/v1/communities createCommunityBodySchema -> IdResponse\n * GET /api/v1/communities/:communityId communitySchema\n * PATCH /api/v1/communities/:communityId updateCommunityBodySchema -> communitySchema\n * PUT /api/v1/communities/:communityId/icon setCommunityIconBodySchema -> communitySchema\n * DELETE /api/v1/communities/:communityId/icon -> communitySchema\n * PUT /api/v1/communities/:communityId/visibility setCommunityVisibilityBodySchema -> communitySchema\n * PUT /api/v1/communities/:communityId/status setCommunityStatusBodySchema -> communitySchema (staff)\n * DELETE /api/v1/communities/:communityId -> IdResponse (staff)\n * GET /api/v1/communities/:communityId/feed paginationQuerySchema -> FeedPage (newest first;\n * pinned items are in it too, in their place)\n * GET /api/v1/communities/:communityId/pinned PinnedItems (feed)\n * POST /api/v1/communities/:communityId/pins pinCommunityContentBodySchema -> PinnedItems\n * DELETE /api/v1/communities/:communityId/pins/:contentId -> PinnedItems\n * POST /api/v1/communities/:communityId/join -> communitySchema (public: joined; private: requested)\n * DELETE /api/v1/communities/:communityId/join cancel a request -> communitySchema\n * POST /api/v1/communities/:communityId/leave -> IdResponse\n * GET /api/v1/communities/:communityId/members communityMembersQuerySchema -> communityMemberPageSchema\n * GET /api/v1/communities/:communityId/requests paginationQuerySchema -> communityRequestPageSchema\n * PUT /api/v1/communities/:communityId/requests/:userId approve -> IdResponse\n * DELETE /api/v1/communities/:communityId/requests/:userId decline -> IdResponse\n * GET /api/v1/communities/:communityId/invites paginationQuerySchema -> communityPendingInvitePageSchema\n * POST /api/v1/communities/:communityId/invites inviteCommunityMemberBodySchema -> communityPendingInviteSchema\n * DELETE /api/v1/communities/:communityId/invites/:userId cancel -> IdResponse\n * PUT /api/v1/communities/:communityId/invite accept (the invitee) -> communitySchema\n * DELETE /api/v1/communities/:communityId/invite decline (the invitee) -> IdResponse\n * PUT /api/v1/communities/:communityId/members/:userId/role setCommunityMemberRoleBodySchema -> IdResponse\n * DELETE /api/v1/communities/:communityId/members/:userId remove -> IdResponse\n * GET /api/v1/communities/:communityId/bans paginationQuerySchema -> communityBanPageSchema\n * POST /api/v1/communities/:communityId/bans banCommunityMemberBodySchema -> IdResponse\n * DELETE /api/v1/communities/:communityId/bans/:userId unban -> IdResponse\n * PUT /api/v1/communities/:communityId/content/:contentId/hidden hide in the community -> IdResponse\n * DELETE /api/v1/communities/:communityId/content/:contentId/hidden restore -> IdResponse\n * PUT /api/v1/communities/:communityId/comments/:commentId/hidden hide a comment in it -> IdResponse\n * DELETE /api/v1/communities/:communityId/comments/:commentId/hidden restore -> IdResponse\n * GET /api/v1/communities/:communityId/hidden paginationQuerySchema -> FeedPage (moderators:\n * what ITS moderators hid, newest first; a staff hide is staff's to undo and is not listed)\n * GET /api/v1/communities/:communityId/hidden/comments paginationQuerySchema -> commentPageSchema\n * POST /api/v1/community-suggestions createCommunitySuggestionBodySchema -> communitySuggestionSchema\n * GET /api/v1/community-suggestions/mine paginationQuerySchema -> communitySuggestionPageSchema\n * GET /api/v1/community-suggestions communitySuggestionsQuerySchema -> communitySuggestionPageSchema (staff)\n * POST /api/v1/community-suggestions/:suggestionId/approve createCommunityBodySchema -> IdResponse (the community)\n * POST /api/v1/community-suggestions/:suggestionId/decline declineCommunitySuggestionBodySchema -> communitySuggestionSchema\n * (posting into a community: `communityId` on the feed's create bodies)\n *\n * @module founder-schema/domains/communities\n */\n\nimport { z } from 'zod';\nimport {\n emptyStringToUndefined,\n multiValueQuery,\n objectIdSchema,\n optionalTrimmedString,\n paginationQuerySchema,\n} from '../../core/common.js';\nimport {\n COMMUNITY_BAN_REASON_MAX,\n COMMUNITY_DECLINE_REASON_MAX,\n COMMUNITY_DECLINE_REASON_MIN,\n COMMUNITY_DESCRIPTION_MAX,\n COMMUNITY_NAME_MAX,\n COMMUNITY_NAME_MIN,\n COMMUNITY_RULE_MAX,\n COMMUNITY_RULES_MAX,\n COMMUNITY_SUGGESTION_WHY_MAX,\n DISCOVER_FILTER_VALUES_MAX,\n DISCOVER_TEXT_MAX,\n} from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport { mediaImageSchema } from '../media/media.js';\nimport { topicSchema } from '../onboarding/onboarding.js';\nimport { memberBylineSchema } from '../profile/founder-profile.js';\n\n/** Topics a community carries: what Discover filters by. */\nexport const COMMUNITY_TOPICS_MAX = 3;\n/** Announcements pinned to the top of one community at once. */\nexport const COMMUNITY_PINS_MAX = 3;\n/** Suggestions one member may have waiting for review at once. */\nexport const COMMUNITY_SUGGESTIONS_OPEN_MAX = 3;\n/**\n * The shortest time between two notify-everyone announcements in one\n * community, so members are not spammed (`COMMUNITY_ANNOUNCE_TOO_SOON`).\n */\nexport const COMMUNITY_ANNOUNCE_INTERVAL_MS = 24 * 60 * 60 * 1000;\n\n// ─── Vocabulary ──────────────────────────────────────────────────────────────\n// ⚠ Every list below is STORED. Append only; removing a value orphans rows.\n\n/** See the module note's table. */\nexport const COMMUNITY_VISIBILITY_VALUES = ['public', 'private', 'hidden'] as const;\nexport const communityVisibilitySchema = z.enum(COMMUNITY_VISIBILITY_VALUES);\nexport type CommunityVisibility = z.infer<typeof communityVisibilitySchema>;\n\n/**\n * How private each type is, least first. A change to a LOWER rank exposes what\n * was already posted, so it needs `confirmExposure` (and is audited).\n */\nexport const COMMUNITY_VISIBILITY_RANK = {\n public: 0,\n private: 1,\n hidden: 2,\n} as const satisfies Record<CommunityVisibility, number>;\n\n/** Whether moving from one type to another exposes what was already there. */\nexport function communityChangeExposes(\n from: CommunityVisibility,\n to: CommunityVisibility,\n): boolean {\n return COMMUNITY_VISIBILITY_RANK[to] < COMMUNITY_VISIBILITY_RANK[from];\n}\n\n/** A member's role inside one community. */\nexport const COMMUNITY_ROLE_VALUES = ['admin', 'moderator', 'member'] as const;\nexport const communityRoleSchema = z.enum(COMMUNITY_ROLE_VALUES);\nexport type CommunityRole = z.infer<typeof communityRoleSchema>;\n\n/**\n * Where someone stands with one community. `requested` (private: waiting for\n * approval), `invited` (waiting for their answer), `banned` (the community is\n * hidden from them). Leaving or being removed deletes the row.\n */\nexport const COMMUNITY_MEMBER_STATUS_VALUES = ['active', 'requested', 'invited', 'banned'] as const;\nexport const communityMemberStatusSchema = z.enum(COMMUNITY_MEMBER_STATUS_VALUES);\nexport type CommunityMemberStatus = z.infer<typeof communityMemberStatusSchema>;\n\n/** `archived`: read-only and out of Discover; members still read it. Staff only. */\nexport const COMMUNITY_STATUS_VALUES = ['active', 'archived'] as const;\nexport const communityStatusSchema = z.enum(COMMUNITY_STATUS_VALUES);\nexport type CommunityStatus = z.infer<typeof communityStatusSchema>;\n\nexport const COMMUNITY_SUGGESTION_STATUS_VALUES = ['open', 'approved', 'declined'] as const;\nexport const communitySuggestionStatusSchema = z.enum(COMMUNITY_SUGGESTION_STATUS_VALUES);\nexport type CommunitySuggestionStatus = z.infer<typeof communitySuggestionStatusSchema>;\n\n// ─── Read shapes ─────────────────────────────────────────────────────────────\n\n/**\n * A community named on something else: \"in AI Builders\" on a post or poll, a\n * notification. `iconUrl` is the icon's smallest size.\n */\nexport const communityChipSchema = z.object({\n id: objectIdSchema,\n /** For a readable URL, `/communities/<id>/<slug>`. The id resolves; a renamed community keeps its links. */\n slug: z.string(),\n name: z.string(),\n iconUrl: z.url().optional(),\n visibility: communityVisibilitySchema,\n /** Present (true) once it is archived: read only, nobody takes part. */\n archived: z.boolean().optional(),\n});\nexport type CommunityChip = z.infer<typeof communityChipSchema>;\n\n/** Where THIS viewer stands with a community, on a card. Banned viewers never see it. */\nexport const communityCardViewerSchema = z.object({\n /** Null: not a member and nothing pending. Never `banned` (they get 404). */\n status: communityMemberStatusSchema.exclude(['banned']).nullable(),\n /** Their role while active, else null. */\n role: communityRoleSchema.nullable(),\n});\nexport type CommunityCardViewer = z.infer<typeof communityCardViewerSchema>;\n\n/** A community on Discover and in \"your communities\". */\nexport const communityCardSchema = z.object({\n id: objectIdSchema,\n slug: z.string(),\n name: z.string(),\n description: z.string(),\n icon: mediaImageSchema.optional(),\n visibility: communityVisibilitySchema,\n status: communityStatusSchema,\n topics: z.array(topicSchema).max(COMMUNITY_TOPICS_MAX),\n /** Active members. */\n memberCount: z.number().int().nonnegative(),\n /** Visible posts and polls in it. */\n postCount: z.number().int().nonnegative(),\n viewer: communityCardViewerSchema.optional(),\n});\nexport type CommunityCard = z.infer<typeof communityCardSchema>;\n\n/**\n * What THIS viewer may do on the community page, decided by the server and\n * sent as plain answers (the rule of `viewerStateSchema` on a post): a client\n * never derives a power from `role`.\n */\nexport const communityViewerSchema = communityCardViewerSchema.extend({\n /** Read its posts, polls and comments now. False on a private one before joining. */\n canRead: z.boolean(),\n /** Read its member list. */\n canSeeMembers: z.boolean(),\n /** Public, active, and the viewer has no row (nothing pending): offer Join. */\n canJoin: z.boolean(),\n /** Private, active, and the viewer has no row: offer Request to join. */\n canRequest: z.boolean(),\n /** Active member, community not archived: the composer. */\n canPost: z.boolean(),\n /** Active member who is not its last admin. */\n canLeave: z.boolean(),\n /**\n * Moderators and admins (and managers, super admins): requests, invites,\n * pins, hiding, removing members. On an ARCHIVED community approving,\n * inviting, accepting and pinning answer `COMMUNITY_ARCHIVED`; declining,\n * cancelling, removing, banning, roles and hiding still work.\n */\n canModerate: z.boolean(),\n /** Admins (and managers, super admins): details, icon, type, roles, bans. */\n canManage: z.boolean(),\n /** May notify every member with an announcement now (admins, at most once per `COMMUNITY_ANNOUNCE_INTERVAL_MS`). */\n canAnnounce: z.boolean(),\n /** Managers and super admins: archive, restore, delete. */\n canArchive: z.boolean(),\n});\nexport type CommunityViewer = z.infer<typeof communityViewerSchema>;\n\n/**\n * One person in a community, live-joined like every byline. In the member\n * list, admins first, then moderators, then members, each by when they joined.\n * `viewer` (0.9.0, on the member list only) is what THIS viewer may do to\n * them, the server's own rules (who outranks whom, never oneself, never the\n * last admin).\n */\nexport const communityMemberSchema = memberBylineSchema.extend({\n role: communityRoleSchema,\n joinedAt: z.iso.datetime(),\n viewer: z\n .object({\n canSetRole: z.boolean(),\n canRemove: z.boolean(),\n canBan: z.boolean(),\n })\n .optional(),\n});\nexport type CommunityMember = z.infer<typeof communityMemberSchema>;\n\n/** The community page. The header is what a non-member of a private one may see too. */\nexport const communitySchema = communityCardSchema.extend({\n rules: z.array(z.string()).max(COMMUNITY_RULES_MAX),\n /**\n * Its admins and moderators, admins first, by when they joined: who to ask.\n * EMPTY for a viewer who may not read it (a private community before\n * joining, a hidden one's invitee): who is in it is its members' to see.\n */\n team: z.array(communityMemberSchema),\n createdAt: z.iso.datetime(),\n updatedAt: z.iso.datetime(),\n archivedAt: z.iso.datetime().nullable(),\n /**\n * Only for managers and super admins: it has no admin left (its last one's\n * account was deleted where that cannot be refused), so staff run it until\n * they make a member admin, which clears it.\n */\n orphaned: z.boolean().optional(),\n viewer: communityViewerSchema.optional(),\n});\nexport type Community = z.infer<typeof communitySchema>;\n\n/** A request to join a private community, as its moderators see it. */\nexport const communityRequestSchema = z.object({\n member: memberBylineSchema,\n requestedAt: z.iso.datetime(),\n});\nexport type CommunityRequest = z.infer<typeof communityRequestSchema>;\n\n/** An invitation nobody has answered yet, as its moderators see it. */\nexport const communityPendingInviteSchema = z.object({\n member: memberBylineSchema,\n /** Null when whoever invited has since deleted their account. */\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type CommunityPendingInvite = z.infer<typeof communityPendingInviteSchema>;\n\n/** An invitation waiting for the viewer's answer. */\nexport const communityInviteSchema = z.object({\n community: communityChipSchema.extend({ description: z.string() }),\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type CommunityInvite = z.infer<typeof communityInviteSchema>;\n\n/** `GET /communities/invites`. Never paged: invitations are few, and each needs an answer. */\nexport const communityInvitesSchema = z.object({ items: z.array(communityInviteSchema) });\nexport type CommunityInvites = z.infer<typeof communityInvitesSchema>;\n\n/** Someone banned from a community, as its admins see it. */\nexport const communityBanSchema = z.object({\n member: memberBylineSchema,\n bannedBy: memberBylineSchema.nullable(),\n bannedAt: z.iso.datetime(),\n /** For the admins' own record; never shown to the banned member. */\n reason: z.string().max(COMMUNITY_BAN_REASON_MAX).optional(),\n});\nexport type CommunityBan = z.infer<typeof communityBanSchema>;\n\n/** A suggestion, as its author and the reviewers see it. */\nexport const communitySuggestionSchema = z.object({\n id: objectIdSchema,\n /** Null when its author has since deleted their account. */\n suggestedBy: memberBylineSchema.nullable(),\n name: z.string(),\n description: z.string(),\n why: z.string().optional(),\n visibility: communityVisibilitySchema,\n topics: z.array(topicSchema).max(COMMUNITY_TOPICS_MAX),\n status: communitySuggestionStatusSchema,\n decidedBy: memberBylineSchema.nullable(),\n decidedAt: z.iso.datetime().nullable(),\n /** Why it was declined, shown to its author. */\n declineReason: z.string().optional(),\n /**\n * The community it became, once approved. Absent if that community is since\n * deleted, or the viewer may no longer see it (banned from a hidden one).\n */\n community: communityChipSchema.optional(),\n createdAt: z.iso.datetime(),\n});\nexport type CommunitySuggestion = z.infer<typeof communitySuggestionSchema>;\n\nexport const communityCardPageSchema = paginatedSchema(communityCardSchema);\nexport type CommunityCardPage = z.infer<typeof communityCardPageSchema>;\nexport const communityMemberPageSchema = paginatedSchema(communityMemberSchema);\nexport type CommunityMemberPage = z.infer<typeof communityMemberPageSchema>;\nexport const communityRequestPageSchema = paginatedSchema(communityRequestSchema);\nexport type CommunityRequestPage = z.infer<typeof communityRequestPageSchema>;\nexport const communityPendingInvitePageSchema = paginatedSchema(communityPendingInviteSchema);\nexport type CommunityPendingInvitePage = z.infer<typeof communityPendingInvitePageSchema>;\nexport const communityBanPageSchema = paginatedSchema(communityBanSchema);\nexport type CommunityBanPage = z.infer<typeof communityBanPageSchema>;\nexport const communitySuggestionPageSchema = paginatedSchema(communitySuggestionSchema);\nexport type CommunitySuggestionPage = z.infer<typeof communitySuggestionPageSchema>;\n\n// ─── Queries and params ──────────────────────────────────────────────────────\n\n/**\n * `GET /communities`: public and private communities that are not archived\n * (hidden ones never), most members first. `q` matches the start of the\n * name; an emptied box (`?q=`) is no search, never a 400. `topic` means \"any of\".\n */\nexport const communityDiscoverQuerySchema = paginationQuerySchema.extend({\n q: optionalTrimmedString(DISCOVER_TEXT_MAX),\n topic: multiValueQuery(topicSchema, DISCOVER_FILTER_VALUES_MAX),\n});\nexport type CommunityDiscoverQuery = z.infer<typeof communityDiscoverQuerySchema>;\nexport type CommunityDiscoverQueryInput = z.input<typeof communityDiscoverQuerySchema>;\n\n/** `GET /communities/:id/members`: everyone, or one role (`?role=admin`). */\nexport const communityMembersQuerySchema = paginationQuerySchema.extend({\n role: z.preprocess(emptyStringToUndefined, communityRoleSchema.optional()),\n});\nexport type CommunityMembersQuery = z.infer<typeof communityMembersQuerySchema>;\nexport type CommunityMembersQueryInput = z.input<typeof communityMembersQuerySchema>;\n\n/** `GET /community-suggestions` (staff): waiting ones by default, oldest first. */\nexport const communitySuggestionsQuerySchema = paginationQuerySchema.extend({\n status: z.preprocess(emptyStringToUndefined, communitySuggestionStatusSchema.default('open')),\n});\nexport type CommunitySuggestionsQuery = z.infer<typeof communitySuggestionsQuerySchema>;\nexport type CommunitySuggestionsQueryInput = z.input<typeof communitySuggestionsQuerySchema>;\n\nexport const communityParamsSchema = z.object({ communityId: objectIdSchema });\nexport type CommunityParams = z.infer<typeof communityParamsSchema>;\n/** `/communities/:communityId/{members,requests,invites,bans}/:userId`. */\nexport const communityMemberParamsSchema = z.object({\n communityId: objectIdSchema,\n userId: objectIdSchema,\n});\nexport type CommunityMemberParams = z.infer<typeof communityMemberParamsSchema>;\n/** `/communities/:communityId/{pins,content}/:contentId`. */\nexport const communityContentParamsSchema = z.object({\n communityId: objectIdSchema,\n contentId: objectIdSchema,\n});\nexport type CommunityContentParams = z.infer<typeof communityContentParamsSchema>;\n/** `/communities/:communityId/comments/:commentId/hidden` (0.9.0). */\nexport const communityCommentParamsSchema = z.object({\n communityId: objectIdSchema,\n commentId: objectIdSchema,\n});\nexport type CommunityCommentParams = z.infer<typeof communityCommentParamsSchema>;\nexport const communitySuggestionParamsSchema = z.object({ suggestionId: objectIdSchema });\nexport type CommunitySuggestionParams = z.infer<typeof communitySuggestionParamsSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n// Each its own object with NO defaults (see `updateFounderProfileBodySchema`).\n\nconst nameSchema = z.string().trim().min(COMMUNITY_NAME_MIN).max(COMMUNITY_NAME_MAX);\nconst descriptionSchema = z.string().trim().min(1).max(COMMUNITY_DESCRIPTION_MAX);\nconst rulesSchema = z\n .array(z.string().trim().min(1).max(COMMUNITY_RULE_MAX))\n .max(COMMUNITY_RULES_MAX);\nconst topicsSchema = z\n .array(topicSchema)\n .max(COMMUNITY_TOPICS_MAX)\n .refine((topics) => new Set(topics).size === topics.length, {\n error: VALIDATION_MESSAGE.topicsDuplicate,\n });\n\n/**\n * `POST /communities` (managers, super admins and capability holders), and\n * the reviewer's edited version when approving a suggestion. The creator\n * becomes its first admin. A name a live PUBLIC or PRIVATE community has is\n * `COMMUNITY_NAME_TAKEN` (letter case ignored, runs of spaces read as one);\n * hidden communities' names are never compared, so no name probes for one.\n * Approving a private or hidden one invites its suggester. The icon is a\n * processed `community_icon` upload.\n */\nexport const createCommunityBodySchema = z.object({\n name: nameSchema,\n description: descriptionSchema,\n visibility: communityVisibilitySchema,\n rules: rulesSchema.optional(),\n topics: topicsSchema.optional(),\n iconMediaId: objectIdSchema.optional(),\n});\nexport type CreateCommunityBody = z.infer<typeof createCommunityBodySchema>;\n\n/** `PATCH /communities/:id` (admins): only the keys that changed. Type and icon have their own routes. */\nexport const updateCommunityBodySchema = z.object({\n name: nameSchema.optional(),\n description: descriptionSchema.optional(),\n /** Sent whole; empty clears them. */\n rules: rulesSchema.optional(),\n topics: topicsSchema.optional(),\n});\nexport type UpdateCommunityBody = z.infer<typeof updateCommunityBodySchema>;\n\n/** `PUT /communities/:id/icon`: a processed `community_icon` upload. The old icon's files are deleted. */\nexport const setCommunityIconBodySchema = z.object({ mediaId: objectIdSchema });\nexport type SetCommunityIconBody = z.infer<typeof setCommunityIconBodySchema>;\n\n/**\n * `PUT /communities/:id/visibility` (admins). A change that exposes what was\n * already posted (`communityChangeExposes`: toward public, or hidden to\n * private) needs `confirmExposure: true`, else `COMMUNITY_EXPOSURE_UNCONFIRMED`:\n * the web asks first, and a client cannot skip the question. Audited.\n */\nexport const setCommunityVisibilityBodySchema = z.object({\n visibility: communityVisibilitySchema,\n confirmExposure: z.boolean().optional(),\n});\nexport type SetCommunityVisibilityBody = z.infer<typeof setCommunityVisibilityBodySchema>;\n\n/** `PUT /communities/:id/status` (staff). Audited. */\nexport const setCommunityStatusBodySchema = z.object({ status: communityStatusSchema });\nexport type SetCommunityStatusBody = z.infer<typeof setCommunityStatusBodySchema>;\n\n/**\n * `POST /communities/:id/invites` (moderators, private and hidden only;\n * a public community needs none: `COMMUNITY_INVITE_NOT_NEEDED`). Someone who\n * cannot join (not onboarded, paused, suspended, deleted) is\n * `COMMUNITY_MEMBER_NOT_INVITABLE`; banned, `COMMUNITY_MEMBER_BANNED`; already\n * a member, requested or invited, `COMMUNITY_ALREADY_MEMBER`.\n */\nexport const inviteCommunityMemberBodySchema = z.object({ userId: objectIdSchema });\nexport type InviteCommunityMemberBody = z.infer<typeof inviteCommunityMemberBodySchema>;\n\n/** `PUT /communities/:id/members/:userId/role` (admins). Never the last admin's own step down. */\nexport const setCommunityMemberRoleBodySchema = z.object({ role: communityRoleSchema });\nexport type SetCommunityMemberRoleBody = z.infer<typeof setCommunityMemberRoleBodySchema>;\n\n/** `POST /communities/:id/bans` (admins): removes them if active, and keeps them out. */\nexport const banCommunityMemberBodySchema = z.object({\n userId: objectIdSchema,\n reason: z.string().trim().min(1).max(COMMUNITY_BAN_REASON_MAX).optional(),\n});\nexport type BanCommunityMemberBody = z.infer<typeof banCommunityMemberBodySchema>;\n\n/**\n * `POST /communities/:id/pins` (moderators): pin one of the community's posts\n * or polls as an announcement (`COMMUNITY_PINS_FULL` past `COMMUNITY_PINS_MAX`).\n * `notifyMembers` (admins only) rings every active member's bell, at most once\n * per `COMMUNITY_ANNOUNCE_INTERVAL_MS` (`COMMUNITY_ANNOUNCE_TOO_SOON`).\n */\nexport const pinCommunityContentBodySchema = z.object({\n contentId: objectIdSchema,\n notifyMembers: z.boolean(),\n});\nexport type PinCommunityContentBody = z.infer<typeof pinCommunityContentBodySchema>;\n\n/**\n * `POST /community-suggestions`: any onboarded member, at most\n * `COMMUNITY_SUGGESTIONS_OPEN_MAX` waiting at once (`COMMUNITY_SUGGESTIONS_FULL`).\n */\nexport const createCommunitySuggestionBodySchema = z.object({\n name: nameSchema,\n description: descriptionSchema,\n why: z.string().trim().min(1).max(COMMUNITY_SUGGESTION_WHY_MAX).optional(),\n visibility: communityVisibilitySchema,\n topics: topicsSchema.optional(),\n});\nexport type CreateCommunitySuggestionBody = z.infer<typeof createCommunitySuggestionBodySchema>;\n\n/**\n * `POST /community-suggestions/:id/decline` (staff): the reason is shown to the\n * suggester. A decided suggestion is `COMMUNITY_SUGGESTION_DECIDED`.\n */\nexport const declineCommunitySuggestionBodySchema = z.object({\n reason: z.string().trim().min(COMMUNITY_DECLINE_REASON_MIN).max(COMMUNITY_DECLINE_REASON_MAX),\n});\nexport type DeclineCommunitySuggestionBody = z.infer<typeof declineCommunitySuggestionBodySchema>;\n"]}
1
+ {"version":3,"file":"communities.js","sourceRoot":"","sources":["../../../src/domains/communities/communities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoHG;AAEH,OAAO,EAAE,CA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AAG,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;CAC1E,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,SAAS,EAAE,cAAc;IACzB,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE;CAC3B,CAAC,CAAC;AAGH;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,iBAAiB;IAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,QAAQ,EAAE;IAC1E,UAAU,EAAE,yBAAyB;IACrC,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAGH;;;GAGG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,GAAG,CAAC,4BAA4B,CAAC;CAC9F,CAAC,CAAC","sourcesContent":["/**\n * founder-schema — Communities: official spaces inside Founder Circle (0.9.0)\n *\n * THE USER'S DECISIONS (2026-10-08), each asked on its own:\n *\n * - OFFICIAL: managers, super admins, and members given the\n * `create_communities` capability create them. Everyone else SUGGESTS one;\n * managers and super admins review the suggestions.\n * - THREE TYPES, three separate questions answered per type:\n *\n * public private hidden\n * listed in Discover yes yes no\n * header (name, about, signed-in signed-in members and\n * rules, admins, count) members members invitees (404 otherwise)\n * posts, polls, members signed-in members only members only\n * joining one tap request, then invite only,\n * approval then accept\n *\n * Taking part (post, poll, comment, react, vote, save, report) is for\n * members of every type. \"Members\" means ACTIVE members: someone who\n * requested, was invited or is banned is a non-member for every rule.\n * - PUBLIC MEANS PUBLIC INSIDE FOUNDER CIRCLE: a signed-out visitor sees no\n * community content of any type, even by a shared link.\n * - THE HOME FEED adds only the communities the member joined.\n * - NO CHAT IN 0.9.0 (feed-first). Announcements are pinned posts\n * (`COMMUNITY_PINS_MAX`), optionally notifying every member.\n *\n * A banned member sees the community as hidden (404 everywhere) until\n * unbanned. Platform staff acting as moderator, manager or super admin READ\n * every community, as they read every post, and moderate its content through\n * the staff moderation queue; to take part they join like anyone else.\n *\n * Refusals follow what the caller can SEE: 404 for something they may not\n * see (the same as for something that does not exist, so nothing is\n * probed), 403 `COMMUNITY_JOIN_REQUIRED` for something they see but must join\n * to read or to take part in.\n *\n * Content in a community carries no product and no ask, and cannot be\n * reposted (a repost is general content, readable signed out): two leak paths\n * closed by construction. Design: founder-circle-backend `docs/communities.md`.\n *\n * Inside a community:\n *\n * member moderator admin manager,\n * super admin\n * post, poll, comment, react, vote ✓ ✓ ✓ ✓ (a member)\n * approve requests, invite, pin, hide ✓ ✓ ✓\n * remove a member (not a moderator) ✓ ✓ ✓\n * remove a moderator ✓ ✓\n * remove or ban an admin ✓\n * notify all, ban, roles, edit, type ✓ ✓\n * archive, delete ✓\n *\n * An admin may unmake another admin (then act on them as on a member). Each\n * member row says what this viewer may do to it (`communityMemberSchema.viewer`):\n * a client never works it out from roles.\n *\n * A community always keeps an admin while anyone can be one\n * (`COMMUNITY_LAST_ADMIN`): an admin leaves, steps down, or deletes their\n * account only once someone else is admin (the user's rule, 2026-10-08). When\n * nobody else is active, or the account was deleted where it cannot be\n * refused (central sign-in), the community is ORPHANED: managers and super\n * admins run it (they can act on any community), it is flagged in the audit\n * log (`community.orphaned`), and the page says so to them (`orphaned`).\n *\n * Routes (all signed in):\n * GET /api/v1/communities communityDiscoverQuerySchema -> communityCardPageSchema\n * GET /api/v1/communities/mine paginationQuerySchema -> communityCardPageSchema\n * GET /api/v1/communities/invites communityInvitesSchema (mine, waiting)\n * GET /api/v1/communities/orphaned paginationQuerySchema -> communityCardPageSchema\n * (managers, super admins: communities left with no admin, newest first)\n * POST /api/v1/communities createCommunityBodySchema -> IdResponse\n * GET /api/v1/communities/:communityId communitySchema\n * PATCH /api/v1/communities/:communityId updateCommunityBodySchema -> communitySchema\n * PUT /api/v1/communities/:communityId/icon setCommunityIconBodySchema -> communitySchema\n * DELETE /api/v1/communities/:communityId/icon -> communitySchema\n * PUT /api/v1/communities/:communityId/visibility setCommunityVisibilityBodySchema -> communitySchema\n * PUT /api/v1/communities/:communityId/status setCommunityStatusBodySchema -> communitySchema (staff)\n * DELETE /api/v1/communities/:communityId -> IdResponse (staff)\n * GET /api/v1/communities/:communityId/feed paginationQuerySchema -> FeedPage (newest first;\n * pinned items are in it too, in their place)\n * GET /api/v1/communities/:communityId/pinned PinnedItems (feed)\n * POST /api/v1/communities/:communityId/pins pinCommunityContentBodySchema -> PinnedItems\n * DELETE /api/v1/communities/:communityId/pins/:contentId -> PinnedItems\n * POST /api/v1/communities/:communityId/join -> communitySchema (public: joined; private: requested)\n * DELETE /api/v1/communities/:communityId/join cancel a request -> communitySchema\n * POST /api/v1/communities/:communityId/leave -> IdResponse\n * GET /api/v1/communities/:communityId/members communityMembersQuerySchema -> communityMemberPageSchema\n * GET /api/v1/communities/:communityId/requests paginationQuerySchema -> communityRequestPageSchema\n * PUT /api/v1/communities/:communityId/requests/:userId approve -> IdResponse\n * DELETE /api/v1/communities/:communityId/requests/:userId decline -> IdResponse\n * GET /api/v1/communities/:communityId/invites paginationQuerySchema -> communityPendingInvitePageSchema\n * POST /api/v1/communities/:communityId/invites inviteCommunityMemberBodySchema -> communityPendingInviteSchema\n * DELETE /api/v1/communities/:communityId/invites/:userId cancel -> IdResponse\n * PUT /api/v1/communities/:communityId/invite accept (the invitee) -> communitySchema\n * DELETE /api/v1/communities/:communityId/invite decline (the invitee) -> IdResponse\n * PUT /api/v1/communities/:communityId/members/:userId/role setCommunityMemberRoleBodySchema -> IdResponse\n * DELETE /api/v1/communities/:communityId/members/:userId remove -> IdResponse\n * GET /api/v1/communities/:communityId/bans paginationQuerySchema -> communityBanPageSchema\n * POST /api/v1/communities/:communityId/bans banCommunityMemberBodySchema -> IdResponse\n * DELETE /api/v1/communities/:communityId/bans/:userId unban -> IdResponse\n * PUT /api/v1/communities/:communityId/content/:contentId/hidden hide in the community -> IdResponse\n * DELETE /api/v1/communities/:communityId/content/:contentId/hidden restore -> IdResponse\n * PUT /api/v1/communities/:communityId/comments/:commentId/hidden hide a comment in it -> IdResponse\n * DELETE /api/v1/communities/:communityId/comments/:commentId/hidden restore -> IdResponse\n * GET /api/v1/communities/:communityId/hidden paginationQuerySchema -> FeedPage (moderators:\n * what ITS moderators hid, newest first; a staff hide is staff's to undo and is not listed)\n * GET /api/v1/communities/:communityId/hidden/comments paginationQuerySchema -> commentPageSchema\n * POST /api/v1/community-suggestions createCommunitySuggestionBodySchema -> communitySuggestionSchema\n * GET /api/v1/community-suggestions/mine paginationQuerySchema -> communitySuggestionPageSchema\n * GET /api/v1/community-suggestions communitySuggestionsQuerySchema -> communitySuggestionPageSchema (staff)\n * POST /api/v1/community-suggestions/:suggestionId/approve createCommunityBodySchema -> IdResponse (the community)\n * POST /api/v1/community-suggestions/:suggestionId/decline declineCommunitySuggestionBodySchema -> communitySuggestionSchema\n * (posting into a community: `communityId` on the feed's create bodies)\n *\n * @module founder-schema/domains/communities\n */\n\nimport { z } from 'zod';\nimport {\n emptyStringToUndefined,\n multiValueQuery,\n objectIdSchema,\n optionalTrimmedString,\n paginationQuerySchema,\n} from '../../core/common.js';\nimport {\n COMMUNITY_BAN_REASON_MAX,\n COMMUNITY_DECLINE_REASON_MAX,\n COMMUNITY_DECLINE_REASON_MIN,\n COMMUNITY_DESCRIPTION_MAX,\n COMMUNITY_NAME_MAX,\n COMMUNITY_NAME_MIN,\n COMMUNITY_RULE_MAX,\n COMMUNITY_RULES_MAX,\n COMMUNITY_SUGGESTION_WHY_MAX,\n DISCOVER_FILTER_VALUES_MAX,\n DISCOVER_TEXT_MAX,\n} from '../../core/limits.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { VALIDATION_MESSAGE } from '../../core/validation.js';\nimport { mediaImageSchema } from '../media/media.js';\nimport { topicSchema } from '../onboarding/onboarding.js';\nimport { memberBylineSchema } from '../profile/founder-profile.js';\n\n/** Topics a community carries: what Discover filters by. */\nexport const COMMUNITY_TOPICS_MAX = 3;\n/** Announcements pinned to the top of one community at once. */\nexport const COMMUNITY_PINS_MAX = 3;\n/** Suggestions one member may have waiting for review at once. */\nexport const COMMUNITY_SUGGESTIONS_OPEN_MAX = 3;\n/**\n * The shortest time between two notify-everyone announcements in one\n * community, so members are not spammed (`COMMUNITY_ANNOUNCE_TOO_SOON`).\n */\nexport const COMMUNITY_ANNOUNCE_INTERVAL_MS = 24 * 60 * 60 * 1000;\n\n// ─── Vocabulary ──────────────────────────────────────────────────────────────\n// ⚠ Every list below is STORED. Append only; removing a value orphans rows.\n\n/** See the module note's table. */\nexport const COMMUNITY_VISIBILITY_VALUES = ['public', 'private', 'hidden'] as const;\nexport const communityVisibilitySchema = z.enum(COMMUNITY_VISIBILITY_VALUES);\nexport type CommunityVisibility = z.infer<typeof communityVisibilitySchema>;\n\n/**\n * How private each type is, least first. A change to a LOWER rank exposes what\n * was already posted, so it needs `confirmExposure` (and is audited).\n */\nexport const COMMUNITY_VISIBILITY_RANK = {\n public: 0,\n private: 1,\n hidden: 2,\n} as const satisfies Record<CommunityVisibility, number>;\n\n/** Whether moving from one type to another exposes what was already there. */\nexport function communityChangeExposes(\n from: CommunityVisibility,\n to: CommunityVisibility,\n): boolean {\n return COMMUNITY_VISIBILITY_RANK[to] < COMMUNITY_VISIBILITY_RANK[from];\n}\n\n/** A member's role inside one community. */\nexport const COMMUNITY_ROLE_VALUES = ['admin', 'moderator', 'member'] as const;\nexport const communityRoleSchema = z.enum(COMMUNITY_ROLE_VALUES);\nexport type CommunityRole = z.infer<typeof communityRoleSchema>;\n\n/**\n * Where someone stands with one community. `requested` (private: waiting for\n * approval), `invited` (waiting for their answer), `banned` (the community is\n * hidden from them). Leaving or being removed deletes the row.\n */\nexport const COMMUNITY_MEMBER_STATUS_VALUES = ['active', 'requested', 'invited', 'banned'] as const;\nexport const communityMemberStatusSchema = z.enum(COMMUNITY_MEMBER_STATUS_VALUES);\nexport type CommunityMemberStatus = z.infer<typeof communityMemberStatusSchema>;\n\n/** `archived`: read-only and out of Discover; members still read it. Staff only. */\nexport const COMMUNITY_STATUS_VALUES = ['active', 'archived'] as const;\nexport const communityStatusSchema = z.enum(COMMUNITY_STATUS_VALUES);\nexport type CommunityStatus = z.infer<typeof communityStatusSchema>;\n\nexport const COMMUNITY_SUGGESTION_STATUS_VALUES = ['open', 'approved', 'declined'] as const;\nexport const communitySuggestionStatusSchema = z.enum(COMMUNITY_SUGGESTION_STATUS_VALUES);\nexport type CommunitySuggestionStatus = z.infer<typeof communitySuggestionStatusSchema>;\n\n// ─── Read shapes ─────────────────────────────────────────────────────────────\n\n/**\n * A community named on something else: \"in AI Builders\" on a post or poll, a\n * notification. `iconUrl` is the icon's smallest size.\n */\nexport const communityChipSchema = z.object({\n id: objectIdSchema,\n /** For a readable URL, `/communities/<id>/<slug>`. The id resolves; a renamed community keeps its links. */\n slug: z.string(),\n name: z.string(),\n iconUrl: z.url().optional(),\n visibility: communityVisibilitySchema,\n /** Present (true) once it is archived: read only, nobody takes part. */\n archived: z.boolean().optional(),\n});\nexport type CommunityChip = z.infer<typeof communityChipSchema>;\n\n/** Where THIS viewer stands with a community, on a card. Banned viewers never see it. */\nexport const communityCardViewerSchema = z.object({\n /** Null: not a member and nothing pending. Never `banned` (they get 404). */\n status: communityMemberStatusSchema.exclude(['banned']).nullable(),\n /** Their role while active, else null. */\n role: communityRoleSchema.nullable(),\n});\nexport type CommunityCardViewer = z.infer<typeof communityCardViewerSchema>;\n\n/** A community on Discover and in \"your communities\". */\nexport const communityCardSchema = z.object({\n id: objectIdSchema,\n slug: z.string(),\n name: z.string(),\n description: z.string(),\n icon: mediaImageSchema.optional(),\n visibility: communityVisibilitySchema,\n status: communityStatusSchema,\n topics: z.array(topicSchema).max(COMMUNITY_TOPICS_MAX),\n /** Active members. */\n memberCount: z.number().int().nonnegative(),\n /** Visible posts and polls in it. */\n postCount: z.number().int().nonnegative(),\n viewer: communityCardViewerSchema.optional(),\n});\nexport type CommunityCard = z.infer<typeof communityCardSchema>;\n\n/**\n * What THIS viewer may do on the community page, decided by the server and\n * sent as plain answers (the rule of `viewerStateSchema` on a post): a client\n * never derives a power from `role`.\n */\nexport const communityViewerSchema = communityCardViewerSchema.extend({\n /** Read its posts, polls and comments now. False on a private one before joining. */\n canRead: z.boolean(),\n /** Read its member list. */\n canSeeMembers: z.boolean(),\n /** Public, active, and the viewer has no row (nothing pending): offer Join. */\n canJoin: z.boolean(),\n /** Private, active, and the viewer has no row: offer Request to join. */\n canRequest: z.boolean(),\n /** Active member, community not archived: the composer. */\n canPost: z.boolean(),\n /** Active member who is not its last admin. */\n canLeave: z.boolean(),\n /**\n * Moderators and admins (and managers, super admins): requests, invites,\n * pins, hiding, removing members. On an ARCHIVED community approving,\n * inviting, accepting and pinning answer `COMMUNITY_ARCHIVED`; declining,\n * cancelling, removing, banning, roles and hiding still work.\n */\n canModerate: z.boolean(),\n /** Admins (and managers, super admins): details, icon, type, roles, bans. */\n canManage: z.boolean(),\n /**\n * Change members' roles (hand it over) and lift bans (0.13.0): every admin,\n * INCLUDING one whose membership ended and so cannot manage or moderate any\n * more. They keep this so a sole admin is never trapped: Manage shows them\n * Members (roles only) and Bans (unban only).\n */\n canAssign: z.boolean(),\n /** May notify every member with an announcement now (admins, at most once per `COMMUNITY_ANNOUNCE_INTERVAL_MS`). */\n canAnnounce: z.boolean(),\n /** Managers and super admins: archive, restore, delete. */\n canArchive: z.boolean(),\n});\nexport type CommunityViewer = z.infer<typeof communityViewerSchema>;\n\n/**\n * One person in a community, live-joined like every byline. In the member\n * list, admins first, then moderators, then members, each by when they joined.\n * `viewer` (0.9.0, on the member list only) is what THIS viewer may do to\n * them, the server's own rules (who outranks whom, never oneself, never the\n * last admin).\n */\nexport const communityMemberSchema = memberBylineSchema.extend({\n role: communityRoleSchema,\n joinedAt: z.iso.datetime(),\n viewer: z\n .object({\n canSetRole: z.boolean(),\n canRemove: z.boolean(),\n canBan: z.boolean(),\n })\n .optional(),\n});\nexport type CommunityMember = z.infer<typeof communityMemberSchema>;\n\n/** The community page. The header is what a non-member of a private one may see too. */\nexport const communitySchema = communityCardSchema.extend({\n rules: z.array(z.string()).max(COMMUNITY_RULES_MAX),\n /**\n * Its admins and moderators, admins first, by when they joined: who to ask.\n * EMPTY for a viewer who may not read it (a private community before\n * joining, a hidden one's invitee): who is in it is its members' to see.\n */\n team: z.array(communityMemberSchema),\n createdAt: z.iso.datetime(),\n updatedAt: z.iso.datetime(),\n archivedAt: z.iso.datetime().nullable(),\n /**\n * Only for managers and super admins: it has no admin left (its last one's\n * account was deleted where that cannot be refused), so staff run it until\n * they make a member admin, which clears it.\n */\n orphaned: z.boolean().optional(),\n viewer: communityViewerSchema.optional(),\n});\nexport type Community = z.infer<typeof communitySchema>;\n\n/** A request to join a private community, as its moderators see it. */\nexport const communityRequestSchema = z.object({\n member: memberBylineSchema,\n requestedAt: z.iso.datetime(),\n});\nexport type CommunityRequest = z.infer<typeof communityRequestSchema>;\n\n/** An invitation nobody has answered yet, as its moderators see it. */\nexport const communityPendingInviteSchema = z.object({\n member: memberBylineSchema,\n /** Null when whoever invited has since deleted their account. */\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type CommunityPendingInvite = z.infer<typeof communityPendingInviteSchema>;\n\n/** An invitation waiting for the viewer's answer. */\nexport const communityInviteSchema = z.object({\n community: communityChipSchema.extend({ description: z.string() }),\n invitedBy: memberBylineSchema.nullable(),\n invitedAt: z.iso.datetime(),\n});\nexport type CommunityInvite = z.infer<typeof communityInviteSchema>;\n\n/** `GET /communities/invites`. Never paged: invitations are few, and each needs an answer. */\nexport const communityInvitesSchema = z.object({ items: z.array(communityInviteSchema) });\nexport type CommunityInvites = z.infer<typeof communityInvitesSchema>;\n\n/** Someone banned from a community, as its admins see it. */\nexport const communityBanSchema = z.object({\n member: memberBylineSchema,\n bannedBy: memberBylineSchema.nullable(),\n bannedAt: z.iso.datetime(),\n /** For the admins' own record; never shown to the banned member. */\n reason: z.string().max(COMMUNITY_BAN_REASON_MAX).optional(),\n});\nexport type CommunityBan = z.infer<typeof communityBanSchema>;\n\n/** A suggestion, as its author and the reviewers see it. */\nexport const communitySuggestionSchema = z.object({\n id: objectIdSchema,\n /** Null when its author has since deleted their account. */\n suggestedBy: memberBylineSchema.nullable(),\n name: z.string(),\n description: z.string(),\n why: z.string().optional(),\n visibility: communityVisibilitySchema,\n topics: z.array(topicSchema).max(COMMUNITY_TOPICS_MAX),\n status: communitySuggestionStatusSchema,\n decidedBy: memberBylineSchema.nullable(),\n decidedAt: z.iso.datetime().nullable(),\n /** Why it was declined, shown to its author. */\n declineReason: z.string().optional(),\n /**\n * The community it became, once approved. Absent if that community is since\n * deleted, or the viewer may no longer see it (banned from a hidden one).\n */\n community: communityChipSchema.optional(),\n createdAt: z.iso.datetime(),\n});\nexport type CommunitySuggestion = z.infer<typeof communitySuggestionSchema>;\n\nexport const communityCardPageSchema = paginatedSchema(communityCardSchema);\nexport type CommunityCardPage = z.infer<typeof communityCardPageSchema>;\nexport const communityMemberPageSchema = paginatedSchema(communityMemberSchema);\nexport type CommunityMemberPage = z.infer<typeof communityMemberPageSchema>;\nexport const communityRequestPageSchema = paginatedSchema(communityRequestSchema);\nexport type CommunityRequestPage = z.infer<typeof communityRequestPageSchema>;\nexport const communityPendingInvitePageSchema = paginatedSchema(communityPendingInviteSchema);\nexport type CommunityPendingInvitePage = z.infer<typeof communityPendingInvitePageSchema>;\nexport const communityBanPageSchema = paginatedSchema(communityBanSchema);\nexport type CommunityBanPage = z.infer<typeof communityBanPageSchema>;\nexport const communitySuggestionPageSchema = paginatedSchema(communitySuggestionSchema);\nexport type CommunitySuggestionPage = z.infer<typeof communitySuggestionPageSchema>;\n\n// ─── Queries and params ──────────────────────────────────────────────────────\n\n/**\n * `GET /communities`: public and private communities that are not archived\n * (hidden ones never), most members first. `q` matches the start of the\n * name; an emptied box (`?q=`) is no search, never a 400. `topic` means \"any of\".\n */\nexport const communityDiscoverQuerySchema = paginationQuerySchema.extend({\n q: optionalTrimmedString(DISCOVER_TEXT_MAX),\n topic: multiValueQuery(topicSchema, DISCOVER_FILTER_VALUES_MAX),\n});\nexport type CommunityDiscoverQuery = z.infer<typeof communityDiscoverQuerySchema>;\nexport type CommunityDiscoverQueryInput = z.input<typeof communityDiscoverQuerySchema>;\n\n/** `GET /communities/:id/members`: everyone, or one role (`?role=admin`). */\nexport const communityMembersQuerySchema = paginationQuerySchema.extend({\n role: z.preprocess(emptyStringToUndefined, communityRoleSchema.optional()),\n});\nexport type CommunityMembersQuery = z.infer<typeof communityMembersQuerySchema>;\nexport type CommunityMembersQueryInput = z.input<typeof communityMembersQuerySchema>;\n\n/** `GET /community-suggestions` (staff): waiting ones by default, oldest first. */\nexport const communitySuggestionsQuerySchema = paginationQuerySchema.extend({\n status: z.preprocess(emptyStringToUndefined, communitySuggestionStatusSchema.default('open')),\n});\nexport type CommunitySuggestionsQuery = z.infer<typeof communitySuggestionsQuerySchema>;\nexport type CommunitySuggestionsQueryInput = z.input<typeof communitySuggestionsQuerySchema>;\n\nexport const communityParamsSchema = z.object({ communityId: objectIdSchema });\nexport type CommunityParams = z.infer<typeof communityParamsSchema>;\n/** `/communities/:communityId/{members,requests,invites,bans}/:userId`. */\nexport const communityMemberParamsSchema = z.object({\n communityId: objectIdSchema,\n userId: objectIdSchema,\n});\nexport type CommunityMemberParams = z.infer<typeof communityMemberParamsSchema>;\n/** `/communities/:communityId/{pins,content}/:contentId`. */\nexport const communityContentParamsSchema = z.object({\n communityId: objectIdSchema,\n contentId: objectIdSchema,\n});\nexport type CommunityContentParams = z.infer<typeof communityContentParamsSchema>;\n/** `/communities/:communityId/comments/:commentId/hidden` (0.9.0). */\nexport const communityCommentParamsSchema = z.object({\n communityId: objectIdSchema,\n commentId: objectIdSchema,\n});\nexport type CommunityCommentParams = z.infer<typeof communityCommentParamsSchema>;\nexport const communitySuggestionParamsSchema = z.object({ suggestionId: objectIdSchema });\nexport type CommunitySuggestionParams = z.infer<typeof communitySuggestionParamsSchema>;\n\n// ─── Write bodies ────────────────────────────────────────────────────────────\n// Each its own object with NO defaults (see `updateFounderProfileBodySchema`).\n\nconst nameSchema = z.string().trim().min(COMMUNITY_NAME_MIN).max(COMMUNITY_NAME_MAX);\nconst descriptionSchema = z.string().trim().min(1).max(COMMUNITY_DESCRIPTION_MAX);\nconst rulesSchema = z\n .array(z.string().trim().min(1).max(COMMUNITY_RULE_MAX))\n .max(COMMUNITY_RULES_MAX);\nconst topicsSchema = z\n .array(topicSchema)\n .max(COMMUNITY_TOPICS_MAX)\n .refine((topics) => new Set(topics).size === topics.length, {\n error: VALIDATION_MESSAGE.topicsDuplicate,\n });\n\n/**\n * `POST /communities` (managers, super admins and capability holders), and\n * the reviewer's edited version when approving a suggestion. The creator\n * becomes its first admin. A name a live PUBLIC or PRIVATE community has is\n * `COMMUNITY_NAME_TAKEN` (letter case ignored, runs of spaces read as one);\n * hidden communities' names are never compared, so no name probes for one.\n * Approving a private or hidden one invites its suggester. The icon is a\n * processed `community_icon` upload.\n */\nexport const createCommunityBodySchema = z.object({\n name: nameSchema,\n description: descriptionSchema,\n visibility: communityVisibilitySchema,\n rules: rulesSchema.optional(),\n topics: topicsSchema.optional(),\n iconMediaId: objectIdSchema.optional(),\n});\nexport type CreateCommunityBody = z.infer<typeof createCommunityBodySchema>;\n\n/** `PATCH /communities/:id` (admins): only the keys that changed. Type and icon have their own routes. */\nexport const updateCommunityBodySchema = z.object({\n name: nameSchema.optional(),\n description: descriptionSchema.optional(),\n /** Sent whole; empty clears them. */\n rules: rulesSchema.optional(),\n topics: topicsSchema.optional(),\n});\nexport type UpdateCommunityBody = z.infer<typeof updateCommunityBodySchema>;\n\n/** `PUT /communities/:id/icon`: a processed `community_icon` upload. The old icon's files are deleted. */\nexport const setCommunityIconBodySchema = z.object({ mediaId: objectIdSchema });\nexport type SetCommunityIconBody = z.infer<typeof setCommunityIconBodySchema>;\n\n/**\n * `PUT /communities/:id/visibility` (admins). A change that exposes what was\n * already posted (`communityChangeExposes`: toward public, or hidden to\n * private) needs `confirmExposure: true`, else `COMMUNITY_EXPOSURE_UNCONFIRMED`:\n * the web asks first, and a client cannot skip the question. Audited.\n */\nexport const setCommunityVisibilityBodySchema = z.object({\n visibility: communityVisibilitySchema,\n confirmExposure: z.boolean().optional(),\n});\nexport type SetCommunityVisibilityBody = z.infer<typeof setCommunityVisibilityBodySchema>;\n\n/** `PUT /communities/:id/status` (staff). Audited. */\nexport const setCommunityStatusBodySchema = z.object({ status: communityStatusSchema });\nexport type SetCommunityStatusBody = z.infer<typeof setCommunityStatusBodySchema>;\n\n/**\n * `POST /communities/:id/invites` (moderators, private and hidden only;\n * a public community needs none: `COMMUNITY_INVITE_NOT_NEEDED`). Someone who\n * cannot join (not onboarded, paused, suspended, deleted) is\n * `COMMUNITY_MEMBER_NOT_INVITABLE`; banned, `COMMUNITY_MEMBER_BANNED`; already\n * a member, requested or invited, `COMMUNITY_ALREADY_MEMBER`.\n */\nexport const inviteCommunityMemberBodySchema = z.object({ userId: objectIdSchema });\nexport type InviteCommunityMemberBody = z.infer<typeof inviteCommunityMemberBodySchema>;\n\n/** `PUT /communities/:id/members/:userId/role` (admins). Never the last admin's own step down. */\nexport const setCommunityMemberRoleBodySchema = z.object({ role: communityRoleSchema });\nexport type SetCommunityMemberRoleBody = z.infer<typeof setCommunityMemberRoleBodySchema>;\n\n/** `POST /communities/:id/bans` (admins): removes them if active, and keeps them out. */\nexport const banCommunityMemberBodySchema = z.object({\n userId: objectIdSchema,\n reason: z.string().trim().min(1).max(COMMUNITY_BAN_REASON_MAX).optional(),\n});\nexport type BanCommunityMemberBody = z.infer<typeof banCommunityMemberBodySchema>;\n\n/**\n * `POST /communities/:id/pins` (moderators): pin one of the community's posts\n * or polls as an announcement (`COMMUNITY_PINS_FULL` past `COMMUNITY_PINS_MAX`).\n * `notifyMembers` (admins only) rings every active member's bell, at most once\n * per `COMMUNITY_ANNOUNCE_INTERVAL_MS` (`COMMUNITY_ANNOUNCE_TOO_SOON`).\n */\nexport const pinCommunityContentBodySchema = z.object({\n contentId: objectIdSchema,\n notifyMembers: z.boolean(),\n});\nexport type PinCommunityContentBody = z.infer<typeof pinCommunityContentBodySchema>;\n\n/**\n * `POST /community-suggestions`: any onboarded member, at most\n * `COMMUNITY_SUGGESTIONS_OPEN_MAX` waiting at once (`COMMUNITY_SUGGESTIONS_FULL`).\n */\nexport const createCommunitySuggestionBodySchema = z.object({\n name: nameSchema,\n description: descriptionSchema,\n why: z.string().trim().min(1).max(COMMUNITY_SUGGESTION_WHY_MAX).optional(),\n visibility: communityVisibilitySchema,\n topics: topicsSchema.optional(),\n});\nexport type CreateCommunitySuggestionBody = z.infer<typeof createCommunitySuggestionBodySchema>;\n\n/**\n * `POST /community-suggestions/:id/decline` (staff): the reason is shown to the\n * suggester. A decided suggestion is `COMMUNITY_SUGGESTION_DECIDED`.\n */\nexport const declineCommunitySuggestionBodySchema = z.object({\n reason: z.string().trim().min(COMMUNITY_DECLINE_REASON_MIN).max(COMMUNITY_DECLINE_REASON_MAX),\n});\nexport type DeclineCommunitySuggestionBody = z.infer<typeof declineCommunitySuggestionBodySchema>;\n"]}
@@ -145,10 +145,10 @@ export declare const contributionPeriodSchema: z.ZodEnum<{
145
145
  export type ContributionPeriod = z.infer<typeof contributionPeriodSchema>;
146
146
  /** `GET /api/v1/contributions/leaderboard?period=` (0.10.0). A query string, so the default is the server's. */
147
147
  export declare const contributionLeaderboardQuerySchema: z.ZodObject<{
148
- period: z.ZodDefault<z.ZodEnum<{
148
+ period: z.ZodPreprocess<z.ZodDefault<z.ZodEnum<{
149
149
  all: "all";
150
150
  recent: "recent";
151
- }>>;
151
+ }>>, unknown>;
152
152
  }, z.core.$strip>;
153
153
  export type ContributionLeaderboardQuery = z.infer<typeof contributionLeaderboardQuerySchema>;
154
154
  /** One row of a board: its rank, who, and their points in the period. */
@@ -1 +1 @@
1
- {"version":3,"file":"contributions.d.ts","sourceRoot":"","sources":["../../../src/domains/contributions/contributions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,4CAA4C;AAC5C,eAAO,MAAM,wBAAwB,uFAK3B,CAAC;AACX,eAAO,MAAM,sBAAsB;;;;;EAAmC,CAAC;AACvE;;;GAGG;AACH,eAAO,MAAM,gCAAgC,gEAG5C,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;CAKqB,CAAC;AAEtD,4CAA4C;AAC5C,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoBlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA2C,CAAC;AAC/E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,4BAA6B,CAAC;AACrE,eAAO,MAAM,wBAAwB;;;EAAqC,CAAC;AAC3E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,gHAAgH;AAChH,eAAO,MAAM,kCAAkC;;;;;iBAE7C,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA2C,CAAC;AAC/E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,4BAA6B,CAAC;AACrE,eAAO,MAAM,wBAAwB;;;EAAqC,CAAC;AAC3E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,gHAAgH;AAChH,eAAO,MAAM,kCAAkC;;;;;iBAG7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,yEAAyE;AACzE,eAAO,MAAM,6BAA6B;;;;;;;;;;iBAKxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;iBAKxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -35,7 +35,7 @@
35
35
  * @module founder-schema/domains/contributions
36
36
  */
37
37
  import { z } from 'zod';
38
- import { objectIdSchema } from '../../core/common.js';
38
+ import { emptyStringToUndefined, objectIdSchema } from '../../core/common.js';
39
39
  import { paginatedSchema } from '../../core/responses.js';
40
40
  import { contentKindSchema } from '../feed/feed.js';
41
41
  import { productChipSchema } from '../products/products.js';
@@ -96,7 +96,8 @@ export const CONTRIBUTION_PERIOD_VALUES = ['recent', 'all'];
96
96
  export const contributionPeriodSchema = z.enum(CONTRIBUTION_PERIOD_VALUES);
97
97
  /** `GET /api/v1/contributions/leaderboard?period=` (0.10.0). A query string, so the default is the server's. */
98
98
  export const contributionLeaderboardQuerySchema = z.object({
99
- period: contributionPeriodSchema.default('recent'),
99
+ // `?period=` with nothing after it is no period, as on every other query.
100
+ period: z.preprocess(emptyStringToUndefined, contributionPeriodSchema.default('recent')),
100
101
  });
101
102
  /** One row of a board: its rank, who, and their points in the period. */
102
103
  export const contributionLeaderEntrySchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"contributions.js","sourceRoot":"","sources":["../../../src/domains/contributions/contributions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,4CAA4C;AAC5C,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,kBAAkB;IAClB,kBAAkB;IAClB,gBAAgB;IAChB,gBAAgB;CACR,CAAC;AACX,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;AACvE;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,wBAAwB,CAAC,MAAM,CAC7E,CAAC,CAAC,EAA6E,EAAE,CAC/E,CAAC,KAAK,gBAAgB,CACzB,CAAC;AAGF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,gBAAgB,EAAE,EAAE;IACpB,gBAAgB,EAAE,E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AAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACjC,MAAM,EAAE,kBAAkB;IAC1B,mCAAmC;IACnC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC;AAGH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CACvC,CAAC,CAAC;AAGH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,MAAM,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC;IAC7C,GAAG,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IACrC,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC","sourcesContent":["/**\n * founder-schema — Contribution: the help a member gives, recognised\n *\n * The score counts HELP GIVEN, and only what OTHER members recognise:\n *\n * feedback_helpful a product's team marks your comment \"this helped\" +10\n * tester_confirmed a product's team confirms you tested their product +15\n * review_helpful another member finds your review helpful +2\n * (at most `REVIEW_HELPFUL_POINTS_MAX` per review)\n *\n * `review_written` is still listed so older rows and clients parse, but it is\n * NEVER awarded (0.7.0): writing a review is your own act, and the score\n * counts only what others recognise. A review earns through Helpful votes.\n *\n * Nothing a member does for their OWN product counts, and nothing their own\n * product receives, so the score cannot be bought with a popular product.\n *\n * Against farming: one member can earn at most `CONTRIBUTION_PAIR_POINTS_MAX`\n * points from any ONE other member over 30 days, so two founders cannot trade\n * Helpful marks into a high score.\n *\n * EVERY POINT IS A ROW (the ledger), so a score can be explained (\"how did I\n * earn this?\"), checked and re-tuned. A point stands while what earned it\n * stands: unmarking, withdrawing a vote, deleting the review or comment, or\n * staff removing it takes the point back. An hourly job recounts every score\n * from the ledger, so a total can never drift for long.\n *\n * Routes (all signed in):\n * GET /api/v1/contributions/me paginationQuerySchema -> contributionPageSchema\n * GET /api/v1/contributions/leaderboard contributionLeaderboardQuerySchema\n * -> contributionLeaderboardSchema\n *\n * The score itself is on the profile and the card (`contributionSummarySchema`).\n *\n * @module founder-schema/domains/contributions\n */\n\nimport { z } from 'zod';\nimport { objectIdSchema } from '../../core/common.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { contentKindSchema } from '../feed/feed.js';\nimport { productChipSchema } from '../products/products.js';\nimport { memberBylineSchema } from '../profile/founder-profile.js';\n\n/** ⚠ Stored per ledger row: append only. */\nexport const CONTRIBUTION_KIND_VALUES = [\n 'feedback_helpful',\n 'tester_confirmed',\n 'review_helpful',\n 'review_written',\n] as const;\nexport const contributionKindSchema = z.enum(CONTRIBUTION_KIND_VALUES);\n/**\n * The kinds that are actually awarded (0.7.0): every kind but `review_written`,\n * which is never awarded any more. \"How points are earned\" lists these.\n */\nexport const CONTRIBUTION_AWARDED_KIND_VALUES = CONTRIBUTION_KIND_VALUES.filter(\n (k): k is Exclude<(typeof CONTRIBUTION_KIND_VALUES)[number], 'review_written'> =>\n k !== 'review_written',\n);\nexport type ContributionKind = z.infer<typeof contributionKindSchema>;\n\n/**\n * Points per kind. Exhaustive by type. Changing a number changes FUTURE rows;\n * the hourly recount sums what each row was actually awarded.\n */\nexport const CONTRIBUTION_POINTS = {\n feedback_helpful: 10,\n tester_confirmed: 15,\n review_helpful: 2,\n review_written: 3,\n} as const satisfies Record<ContributionKind, number>;\n\n/** One line of \"how I earned my points\". */\nexport const contributionEntrySchema = z.object({\n id: objectIdSchema,\n kind: contributionKindSchema,\n /** What it was actually awarded: below the kind's points when a cap applied. */\n points: z.number().int().positive(),\n /**\n * Who recognised it; null for a deleted account, and for `review_helpful`\n * (a Helpful vote is anonymous: the review shows only a count).\n */\n actor: memberBylineSchema.nullable(),\n /** The product it was about, while it exists. */\n product: productChipSchema.optional(),\n /**\n * What earned it, so the row opens it: the post or poll and the comment for\n * `feedback_helpful`, the review for `review_helpful`.\n */\n content: z.object({ kind: contentKindSchema, id: objectIdSchema }).optional(),\n commentId: objectIdSchema.optional(),\n reviewId: objectIdSchema.optional(),\n createdAt: z.iso.datetime(),\n});\nexport type ContributionEntry = z.infer<typeof contributionEntrySchema>;\n\nexport const contributionPageSchema = paginatedSchema(contributionEntrySchema);\nexport type ContributionPage = z.infer<typeof contributionPageSchema>;\n\n/**\n * Which points a board ranks by (0.10.0): `recent`, the last\n * `CONTRIBUTION_RECENT_DAYS` days (the default, so a newer member can still\n * climb), or `all`, every point ever earned. Every board is GLOBAL: one list\n * for the whole circle (the user's ruling, 2026-10-11).\n */\nexport const CONTRIBUTION_PERIOD_VALUES = ['recent', 'all'] as const;\nexport const contributionPeriodSchema = z.enum(CONTRIBUTION_PERIOD_VALUES);\nexport type ContributionPeriod = z.infer<typeof contributionPeriodSchema>;\n\n/** `GET /api/v1/contributions/leaderboard?period=` (0.10.0). A query string, so the default is the server's. */\nexport const contributionLeaderboardQuerySchema = z.object({\n period: contributionPeriodSchema.default('recent'),\n});\nexport type ContributionLeaderboardQuery = z.infer<typeof contributionLeaderboardQuerySchema>;\n\n/** One row of a board: its rank, who, and their points in the period. */\nexport const contributionLeaderEntrySchema = z.object({\n rank: z.number().int().positive(),\n member: memberBylineSchema,\n /** Points earned in the period. */\n points: z.number().int().positive(),\n});\nexport type ContributionLeaderEntry = z.infer<typeof contributionLeaderEntrySchema>;\n\n/**\n * The signed-in member's own place on the board (0.10.0), on its first page or\n * not. Ranked in the SAME order, among the SAME members, as the list, so their\n * rank is always their position. `rank` is null while they are not on the\n * board: no points in the period (a board ranks help given, and nobody is\n * 40th for nothing), or a profile no longer listed. `points` are theirs either\n * way.\n */\nexport const contributionYouSchema = z.object({\n rank: z.number().int().positive().nullable(),\n points: z.number().int().nonnegative(),\n});\nexport type ContributionYou = z.infer<typeof contributionYouSchema>;\n\n/**\n * Top helpers, best first, at most `CONTRIBUTION_LEADERBOARD_SIZE`. Read from\n * the live counters, which move the moment help is recognised; only points\n * leaving the `recent` window wait for the hourly recount. `computedAt` is the\n * latest recount among the rows shown (null before the first run, and for an\n * empty board).\n *\n * `period` and `you` (0.10.0) are OPTIONAL on read, so this client keeps\n * parsing a server from before them: without `you` the board simply shows no\n * row of the member's own.\n */\nexport const contributionLeaderboardSchema = z.object({\n period: contributionPeriodSchema.optional(),\n items: z.array(contributionLeaderEntrySchema),\n you: contributionYouSchema.optional(),\n computedAt: z.iso.datetime().nullable(),\n});\nexport type ContributionLeaderboard = z.infer<typeof contributionLeaderboardSchema>;\n"]}
1
+ {"version":3,"file":"contributions.js","sourceRoot":"","sources":["../../../src/domains/contributions/contributions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,4CAA4C;AAC5C,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,kBAAkB;IAClB,kBAAkB;IAClB,gBAAgB;IAChB,gBAAgB;CACR,CAAC;AACX,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;AACvE;;;GAGG;AACH,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AAG,CAAC,CAAC,MAAM,CAAC;IACzD,0EAA0E;IAC1E,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,sBAAsB,EAAE,wBAAwB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;CACzF,CAAC,CAAC;AAGH,yEAAyE;AACzE,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACjC,MAAM,EAAE,kBAAkB;IAC1B,mCAAmC;IACnC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC;AAGH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CACvC,CAAC,CAAC;AAGH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,MAAM,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC;IAC7C,GAAG,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IACrC,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC","sourcesContent":["/**\n * founder-schema — Contribution: the help a member gives, recognised\n *\n * The score counts HELP GIVEN, and only what OTHER members recognise:\n *\n * feedback_helpful a product's team marks your comment \"this helped\" +10\n * tester_confirmed a product's team confirms you tested their product +15\n * review_helpful another member finds your review helpful +2\n * (at most `REVIEW_HELPFUL_POINTS_MAX` per review)\n *\n * `review_written` is still listed so older rows and clients parse, but it is\n * NEVER awarded (0.7.0): writing a review is your own act, and the score\n * counts only what others recognise. A review earns through Helpful votes.\n *\n * Nothing a member does for their OWN product counts, and nothing their own\n * product receives, so the score cannot be bought with a popular product.\n *\n * Against farming: one member can earn at most `CONTRIBUTION_PAIR_POINTS_MAX`\n * points from any ONE other member over 30 days, so two founders cannot trade\n * Helpful marks into a high score.\n *\n * EVERY POINT IS A ROW (the ledger), so a score can be explained (\"how did I\n * earn this?\"), checked and re-tuned. A point stands while what earned it\n * stands: unmarking, withdrawing a vote, deleting the review or comment, or\n * staff removing it takes the point back. An hourly job recounts every score\n * from the ledger, so a total can never drift for long.\n *\n * Routes (all signed in):\n * GET /api/v1/contributions/me paginationQuerySchema -> contributionPageSchema\n * GET /api/v1/contributions/leaderboard contributionLeaderboardQuerySchema\n * -> contributionLeaderboardSchema\n *\n * The score itself is on the profile and the card (`contributionSummarySchema`).\n *\n * @module founder-schema/domains/contributions\n */\n\nimport { z } from 'zod';\nimport { emptyStringToUndefined, objectIdSchema } from '../../core/common.js';\nimport { paginatedSchema } from '../../core/responses.js';\nimport { contentKindSchema } from '../feed/feed.js';\nimport { productChipSchema } from '../products/products.js';\nimport { memberBylineSchema } from '../profile/founder-profile.js';\n\n/** ⚠ Stored per ledger row: append only. */\nexport const CONTRIBUTION_KIND_VALUES = [\n 'feedback_helpful',\n 'tester_confirmed',\n 'review_helpful',\n 'review_written',\n] as const;\nexport const contributionKindSchema = z.enum(CONTRIBUTION_KIND_VALUES);\n/**\n * The kinds that are actually awarded (0.7.0): every kind but `review_written`,\n * which is never awarded any more. \"How points are earned\" lists these.\n */\nexport const CONTRIBUTION_AWARDED_KIND_VALUES = CONTRIBUTION_KIND_VALUES.filter(\n (k): k is Exclude<(typeof CONTRIBUTION_KIND_VALUES)[number], 'review_written'> =>\n k !== 'review_written',\n);\nexport type ContributionKind = z.infer<typeof contributionKindSchema>;\n\n/**\n * Points per kind. Exhaustive by type. Changing a number changes FUTURE rows;\n * the hourly recount sums what each row was actually awarded.\n */\nexport const CONTRIBUTION_POINTS = {\n feedback_helpful: 10,\n tester_confirmed: 15,\n review_helpful: 2,\n review_written: 3,\n} as const satisfies Record<ContributionKind, number>;\n\n/** One line of \"how I earned my points\". */\nexport const contributionEntrySchema = z.object({\n id: objectIdSchema,\n kind: contributionKindSchema,\n /** What it was actually awarded: below the kind's points when a cap applied. */\n points: z.number().int().positive(),\n /**\n * Who recognised it; null for a deleted account, and for `review_helpful`\n * (a Helpful vote is anonymous: the review shows only a count).\n */\n actor: memberBylineSchema.nullable(),\n /** The product it was about, while it exists. */\n product: productChipSchema.optional(),\n /**\n * What earned it, so the row opens it: the post or poll and the comment for\n * `feedback_helpful`, the review for `review_helpful`.\n */\n content: z.object({ kind: contentKindSchema, id: objectIdSchema }).optional(),\n commentId: objectIdSchema.optional(),\n reviewId: objectIdSchema.optional(),\n createdAt: z.iso.datetime(),\n});\nexport type ContributionEntry = z.infer<typeof contributionEntrySchema>;\n\nexport const contributionPageSchema = paginatedSchema(contributionEntrySchema);\nexport type ContributionPage = z.infer<typeof contributionPageSchema>;\n\n/**\n * Which points a board ranks by (0.10.0): `recent`, the last\n * `CONTRIBUTION_RECENT_DAYS` days (the default, so a newer member can still\n * climb), or `all`, every point ever earned. Every board is GLOBAL: one list\n * for the whole circle (the user's ruling, 2026-10-11).\n */\nexport const CONTRIBUTION_PERIOD_VALUES = ['recent', 'all'] as const;\nexport const contributionPeriodSchema = z.enum(CONTRIBUTION_PERIOD_VALUES);\nexport type ContributionPeriod = z.infer<typeof contributionPeriodSchema>;\n\n/** `GET /api/v1/contributions/leaderboard?period=` (0.10.0). A query string, so the default is the server's. */\nexport const contributionLeaderboardQuerySchema = z.object({\n // `?period=` with nothing after it is no period, as on every other query.\n period: z.preprocess(emptyStringToUndefined, contributionPeriodSchema.default('recent')),\n});\nexport type ContributionLeaderboardQuery = z.infer<typeof contributionLeaderboardQuerySchema>;\n\n/** One row of a board: its rank, who, and their points in the period. */\nexport const contributionLeaderEntrySchema = z.object({\n rank: z.number().int().positive(),\n member: memberBylineSchema,\n /** Points earned in the period. */\n points: z.number().int().positive(),\n});\nexport type ContributionLeaderEntry = z.infer<typeof contributionLeaderEntrySchema>;\n\n/**\n * The signed-in member's own place on the board (0.10.0), on its first page or\n * not. Ranked in the SAME order, among the SAME members, as the list, so their\n * rank is always their position. `rank` is null while they are not on the\n * board: no points in the period (a board ranks help given, and nobody is\n * 40th for nothing), or a profile no longer listed. `points` are theirs either\n * way.\n */\nexport const contributionYouSchema = z.object({\n rank: z.number().int().positive().nullable(),\n points: z.number().int().nonnegative(),\n});\nexport type ContributionYou = z.infer<typeof contributionYouSchema>;\n\n/**\n * Top helpers, best first, at most `CONTRIBUTION_LEADERBOARD_SIZE`. Read from\n * the live counters, which move the moment help is recognised; only points\n * leaving the `recent` window wait for the hourly recount. `computedAt` is the\n * latest recount among the rows shown (null before the first run, and for an\n * empty board).\n *\n * `period` and `you` (0.10.0) are OPTIONAL on read, so this client keeps\n * parsing a server from before them: without `you` the board simply shows no\n * row of the member's own.\n */\nexport const contributionLeaderboardSchema = z.object({\n period: contributionPeriodSchema.optional(),\n items: z.array(contributionLeaderEntrySchema),\n you: contributionYouSchema.optional(),\n computedAt: z.iso.datetime().nullable(),\n});\nexport type ContributionLeaderboard = z.infer<typeof contributionLeaderboardSchema>;\n"]}
@@ -33,12 +33,20 @@ export declare const dashboardSchema: z.ZodObject<{
33
33
  openTickets: z.ZodNumber;
34
34
  unassignedTickets: z.ZodNumber;
35
35
  }, z.core.$strip>;
36
+ billing: z.ZodObject<{
37
+ memberships: z.ZodNumber;
38
+ founding: z.ZodNumber;
39
+ onPlan: z.ZodNumber;
40
+ paymentsLast7Days: z.ZodNumber;
41
+ revenueLast7Days: z.ZodNumber;
42
+ paymentsNeedingAction: z.ZodNumber;
43
+ }, z.core.$strip>;
36
44
  team: z.ZodObject<{
37
45
  staff: z.ZodNumber;
38
46
  byRole: z.ZodRecord<z.ZodEnum<{
47
+ moderator: "moderator";
39
48
  superadmin: "superadmin";
40
49
  manager: "manager";
41
- moderator: "moderator";
42
50
  support_agent: "support_agent";
43
51
  }>, z.ZodNumber>;
44
52
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../src/domains/dashboard/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwC1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../src/domains/dashboard/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuD1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -43,6 +43,21 @@ export const dashboardSchema = z.object({
43
43
  /** Of those, the ones no agent has picked up. */
44
44
  unassignedTickets: count,
45
45
  }),
46
+ /** Memberships, plans and money (0.12.0). */
47
+ billing: z.object({
48
+ /** Accounts holding a membership, of any kind. Staff take part without one and are not counted. */
49
+ memberships: count,
50
+ /** Of those, founding (the first-100 coupon). */
51
+ founding: count,
52
+ /** Accounts on Premium or Business now. */
53
+ onPlan: count,
54
+ /** Payments captured in the window, refunded ones included. */
55
+ paymentsLast7Days: count,
56
+ /** What they came to, in paise, GST included, minus what was refunded. */
57
+ revenueLast7Days: count,
58
+ /** Payments a person must act on, at any age (`staffPaymentSummarySchema.needsAction`). */
59
+ paymentsNeedingAction: count,
60
+ }),
46
61
  team: z.object({
47
62
  /** People holding at least one staff role. */
48
63
  staff: count,
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../src/domains/dashboard/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,8DAA8D;QAC9D,KAAK,EAAE,KAAK;QACZ,eAAe,EAAE,KAAK;QACtB,kEAAkE;QAClE,eAAe,EAAE,KAAK;QACtB,SAAS,EAAE,KAAK;KACjB,CAAC;IACF,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,cAAc,EAAE,KAAK;QACrB,cAAc,EAAE,KAAK;QACrB,yFAAyF;QACzF,iBAAiB,EAAE,KAAK;KACzB,CAAC;IACF,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;QACnB,yCAAyC;QACzC,WAAW,EAAE,KAAK;QAClB,8DAA8D;QAC9D,aAAa,EAAE,KAAK;QACpB,8EAA8E;QAC9E,WAAW,EAAE,KAAK;KACnB,CAAC;IACF,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,kEAAkE;QAClE,WAAW,EAAE,KAAK;QAClB,iDAAiD;QACjD,iBAAiB,EAAE,KAAK;KACzB,CAAC;IACF,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,8CAA8C;QAC9C,KAAK,EAAE,KAAK;QACZ;;;;WAIG;QACH,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAAE,KAAK,CAAC;KAC5C,CAAC;IACF,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC","sourcesContent":["/**\n * founder-schema: the staff Overview\n *\n * GET /api/v1/dashboard the numbers a superadmin or manager opens the day with\n *\n * Counts only, computed by the server when asked: no member's data, so the\n * screen can be glanced at over a shoulder. Each block answers one question:\n * is the community growing, is it talking, is anything waiting on staff.\n *\n * \"Last 7 days\" is the seven days up to `generatedAt`, by the server's clock.\n *\n * @module founder-schema/domains/dashboard\n */\n\nimport { z } from 'zod';\nimport { platformRoleSchema } from '../../access/roles.js';\n\nconst count = z.number().int().min(0);\n\nexport const dashboardSchema = z.object({\n members: z.object({\n /** Accounts that are not deleted, suspended ones included. */\n total: count,\n joinedLast7Days: count,\n /** Signed in and used the product at least once in the window. */\n activeLast7Days: count,\n suspended: count,\n }),\n content: z.object({\n postsLast7Days: count,\n pollsLast7Days: count,\n /** Comments still up (not deleted, not hidden), like the posts and polls beside them. */\n commentsLast7Days: count,\n }),\n moderation: z.object({\n /** Reports nobody has decided on yet. */\n openReports: count,\n /** Posts, polls and comments those open reports are about. */\n reportedItems: count,\n /** Posts, polls and comments hidden by staff, not yet restored or removed. */\n hiddenItems: count,\n }),\n support: z.object({\n /** Tickets not resolved, waiting on an agent or on the member. */\n openTickets: count,\n /** Of those, the ones no agent has picked up. */\n unassignedTickets: count,\n }),\n team: z.object({\n /** People holding at least one staff role. */\n staff: count,\n /**\n * People per role. Someone holding two roles counts once in each. Every\n * role is a key (a record over an enum is exhaustive), zero rather than\n * missing.\n */\n byRole: z.record(platformRoleSchema, count),\n }),\n generatedAt: z.iso.datetime(),\n});\nexport type Dashboard = z.infer<typeof dashboardSchema>;\n"]}
1
+ {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../src/domains/dashboard/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH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,CAAC;QACb,8CAA8C;QAC9C,KAAK,EAAE,KAAK;QACZ;;;;WAIG;QACH,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,kBAAkB,EAAE,KAAK,CAAC;KAC5C,CAAC;IACF,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC","sourcesContent":["/**\n * founder-schema: the staff Overview\n *\n * GET /api/v1/dashboard the numbers a superadmin or manager opens the day with\n *\n * Counts only, computed by the server when asked: no member's data, so the\n * screen can be glanced at over a shoulder. Each block answers one question:\n * is the community growing, is it talking, is anything waiting on staff.\n *\n * \"Last 7 days\" is the seven days up to `generatedAt`, by the server's clock.\n *\n * @module founder-schema/domains/dashboard\n */\n\nimport { z } from 'zod';\nimport { platformRoleSchema } from '../../access/roles.js';\n\nconst count = z.number().int().min(0);\n\nexport const dashboardSchema = z.object({\n members: z.object({\n /** Accounts that are not deleted, suspended ones included. */\n total: count,\n joinedLast7Days: count,\n /** Signed in and used the product at least once in the window. */\n activeLast7Days: count,\n suspended: count,\n }),\n content: z.object({\n postsLast7Days: count,\n pollsLast7Days: count,\n /** Comments still up (not deleted, not hidden), like the posts and polls beside them. */\n commentsLast7Days: count,\n }),\n moderation: z.object({\n /** Reports nobody has decided on yet. */\n openReports: count,\n /** Posts, polls and comments those open reports are about. */\n reportedItems: count,\n /** Posts, polls and comments hidden by staff, not yet restored or removed. */\n hiddenItems: count,\n }),\n support: z.object({\n /** Tickets not resolved, waiting on an agent or on the member. */\n openTickets: count,\n /** Of those, the ones no agent has picked up. */\n unassignedTickets: count,\n }),\n /** Memberships, plans and money (0.12.0). */\n billing: z.object({\n /** Accounts holding a membership, of any kind. Staff take part without one and are not counted. */\n memberships: count,\n /** Of those, founding (the first-100 coupon). */\n founding: count,\n /** Accounts on Premium or Business now. */\n onPlan: count,\n /** Payments captured in the window, refunded ones included. */\n paymentsLast7Days: count,\n /** What they came to, in paise, GST included, minus what was refunded. */\n revenueLast7Days: count,\n /** Payments a person must act on, at any age (`staffPaymentSummarySchema.needsAction`). */\n paymentsNeedingAction: count,\n }),\n team: z.object({\n /** People holding at least one staff role. */\n staff: count,\n /**\n * People per role. Someone holding two roles counts once in each. Every\n * role is a key (a record over an enum is exhaustive), zero rather than\n * missing.\n */\n byRole: z.record(platformRoleSchema, count),\n }),\n generatedAt: z.iso.datetime(),\n});\nexport type Dashboard = z.infer<typeof dashboardSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../../../src/domains/feed/feed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuBxB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAC;AACxC;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,iEAAiE;AACjE,eAAO,MAAM,oBAAoB,QAAgB,CAAC;AAClD,eAAe;AACf,eAAO,MAAM,oBAAoB,QAA2B,CAAC;AAE7D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,QAAiB,CAAC;AAI7C;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,2BAA4B,CAAC;AAC7D,eAAO,MAAM,iBAAiB;;;EAA8B,CAAC;AAC7D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,6BAA6B,sCAA+C,CAAC;AAC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