jansathi-community-schema 0.31.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -19,13 +19,13 @@ export { type CommunityCommentWire, type CreateCommentBody, communityCommentWire
19
19
  export { type AddOfficialModeratorBody, AREA_PICKER_LEVEL_VALUES, type AreaPickerItem, type AreaPickerLevel, type AreaPickerQuery, type AreaPickerResponse, addOfficialModeratorBodySchema, areaPickerItemSchema, areaPickerLevelSchema, areaPickerQuerySchema, areaPickerResponseSchema, COMMUNITY_CATEGORY_VALUES, COMMUNITY_DESIGNATION_PRESETS, COMMUNITY_DISCOVER_SORT_VALUES, COMMUNITY_KIND_VALUES, COMMUNITY_MEMBERSHIP_STATUS_VALUES, COMMUNITY_REACH_VALUES, COMMUNITY_ROLE_VALUES, COMMUNITY_TAG_VALUES, COMMUNITY_TYPE_VALUES, COMMUNITY_VERIFIED_SCOPE_VALUES, type CommunityCategory, type CommunityCenterCoords, type CommunityDesignation, type CommunityDesignationPreset, type CommunityDiscoverSort, type CommunityKind, type CommunityListQuery, type CommunityListResponse, type CommunityMembershipStatus, type CommunityMembersListResponse, type CommunityMemberWire, type CommunityReach, type CommunityRole, type CommunityTag, type CommunityType, type CommunityVerifiedScope, type CommunityWire, type CreateCommunityBody, type CreateOfficialCommunityBody, communityCategorySchema, communityCenterCoordsSchema, communityDesignationPresetSchema, communityDesignationSchema, communityDiscoverSortSchema, communityKindSchema, communityListQuerySchema, communityListResponseSchema, communityMembershipStatusSchema, communityMembersListResponseSchema, communityMemberWireSchema, communityReachSchema, communityRoleSchema, communityTagSchema, communityTypeSchema, communityVerifiedScopeSchema, communityWireSchema, createCommunityBodySchema, createOfficialCommunityBodySchema, type HidePostBody, hidePostBodySchema, type JoinCommunityResponse, joinCommunityResponseSchema, OFFICIAL_COMMUNITY_AREA_KIND_VALUES, type OfficialCommunityAreaKind, officialCommunityAreaKindSchema, type SetMemberDesignationBody, type SetOfficialRepresentativeBody, setMemberDesignationBodySchema, setOfficialRepresentativeBodySchema, type UpdateCommunityBody, type UpdateMemberRoleBody, updateCommunityBodySchema, updateMemberRoleBodySchema, type VerifyCommunityBody, verifyCommunityBodySchema, } from './community.js';
20
20
  export { COMMENT_MAX_BODY_CHARS, COMMENTS_PAGE_SIZE, COMMUNITIES_PAGE_SIZE, COMMUNITY_DESCRIPTION_MAX_CHARS, COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS, COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS, COMMUNITY_DESIGNATION_CUSTOM_PATTERN, COMMUNITY_HYPERLOCAL_RADIUS_KM, COMMUNITY_MAX_TAGS, COMMUNITY_MEMBERS_PAGE_SIZE, COMMUNITY_NAME_MAX_CHARS, COMMUNITY_NAME_MIN_CHARS, COMMUNITY_SLUG_MAX_CHARS, COMMUNITY_SLUG_MIN_CHARS, COMMUNITY_SLUG_PATTERN, CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS, CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS, CROWDFUNDING_DEFERRED_FEE_RATE, CROWDFUNDING_DESCRIPTION_MAX_CHARS, CROWDFUNDING_DESCRIPTION_MIN_CHARS, CROWDFUNDING_MAX_DONATION_INR, CROWDFUNDING_MAX_DURATION_DAYS, CROWDFUNDING_MAX_GOAL_INR, CROWDFUNDING_MAX_IMAGES, CROWDFUNDING_MAX_SUPPORTING_DOCS, CROWDFUNDING_MIN_DURATION_DAYS, CROWDFUNDING_MIN_GOAL_INR, CROWDFUNDING_PAGE_SIZE, CROWDFUNDING_REJECTION_REASON_MAX_CHARS, CROWDFUNDING_REJECTION_REASON_MIN_CHARS, CROWDFUNDING_TIER_ENHANCED_INR, CROWDFUNDING_TIER_MAXIMUM_INR, CROWDFUNDING_TIER_STANDARD_INR, CROWDFUNDING_TITLE_MAX_CHARS, CROWDFUNDING_TITLE_MIN_CHARS, CROWDFUNDING_UPFRONT_FEE_INR_BY_SCOPE, computeCrowdfundingDeferredFee, EDIT_GRACE_WINDOW_MS, FEED_PAGE_SIZE, GROUP_MAX_MEMBERS, GROUP_NAME_MAX_CHARS, GROUP_NAME_MIN_CHARS, getCrowdfundingDeferredEstimate, getCrowdfundingUpfrontFee, PEOPLE_PAGE_SIZE, POLL_DURATION_PRESETS_MS, POLL_MAX_DURATION_MS, POLL_MAX_OPTIONS, POLL_MIN_DURATION_MS, POLL_MIN_OPTIONS, POLL_OPTION_MAX_CHARS, POLL_OPTION_MIN_CHARS, POLL_QUESTION_MAX_CHARS, POLL_QUESTION_MIN_CHARS, POLLS_PAGE_SIZE, POST_MAX_BODY_CHARS, POST_MAX_IMAGE_BYTES, POST_MAX_IMAGES, POST_MAX_VIDEO_BYTES, POST_MAX_VIDEO_SECONDS, POST_MAX_VIDEOS, PROFILE_MAX_BIO_CHARS, REPLIES_PRELOAD_COUNT, } from './constants.js';
21
21
  export { type ApproveCrowdfundingBody, type AttestCrowdfundingDonationBody, approveCrowdfundingBodySchema, attestCrowdfundingDonationBodySchema, type CommunityCrowdfundingWire, CROWDFUNDING_AUDIENCE_VALUES, CROWDFUNDING_CATEGORY_VALUES, CROWDFUNDING_DONATION_STATE_VALUES, CROWDFUNDING_FEE_BILLING_MODE_VALUES, CROWDFUNDING_FEE_PAYMENT_STATUS_VALUES, CROWDFUNDING_ORG_KIND_VALUES, CROWDFUNDING_SCOPE_VALUES, CROWDFUNDING_STATUS_VALUES, type CreateCrowdfundingBody, type CrowdfundingAudience, type CrowdfundingCategory, type CrowdfundingDonationState, type CrowdfundingDonationWire, type CrowdfundingFeeBillingMode, type CrowdfundingFeedItem, type CrowdfundingFeePaymentStatus, type CrowdfundingOrgKind, type CrowdfundingPayment, type CrowdfundingScope, type CrowdfundingStatus, type CrowdfundingVerification, communityCrowdfundingWireSchema, createCrowdfundingBodySchema, crowdfundingAudienceSchema, crowdfundingCategorySchema, crowdfundingDonationStateSchema, crowdfundingDonationWireSchema, crowdfundingFeeBillingModeSchema, crowdfundingFeedItemSchema, crowdfundingFeePaymentStatusSchema, crowdfundingOrgKindSchema, crowdfundingPaymentSchema, crowdfundingScopeSchema, crowdfundingStatusSchema, crowdfundingVerificationSchema, type ListCrowdfundingDonationsQuery, type ListMyCrowdfundingDonationsQuery, listCrowdfundingDonationsQuerySchema, listMyCrowdfundingDonationsQuerySchema, type RejectCrowdfundingBody, rejectCrowdfundingBodySchema, type UpdateCrowdfundingBody, type UploadCrowdfundingReceiptBody, updateCrowdfundingBodySchema, uploadCrowdfundingReceiptBodySchema, } from './crowdfunding.js';
22
- export { listNotificationsQuerySchema, type ListNotificationsQuery, listNotificationsResponseSchema, type ListNotificationsResponse, markAllNotificationsReadBodySchema, type MarkAllNotificationsReadBody, NOTIFICATION_CATEGORY_VALUES, NOTIFICATION_CHANNEL_VALUES, NOTIFICATION_PRIORITY_VALUES, NOTIFICATION_SOURCE_REF_KIND_VALUES, notificationActorSchema, type NotificationActor, notificationCategorySchema, type NotificationCategory, notificationChannelSchema, type NotificationChannel, notificationPrioritySchema, type NotificationPriority, notificationReadAllEventSchema, type NotificationReadAllEvent, notificationReadEventSchema, type NotificationReadEvent, notificationSourceRefKindSchema, type NotificationSourceRefKind, notificationSourceRefSchema, type NotificationSourceRef, notificationUnreadCountSchema, type NotificationUnreadCount, notificationWireSchema, type NotificationWire, REFORM_NOTIFICATION_SOCKET_EVENTS, type ReformNotificationSocketEvent, } from './notification.js';
23
22
  export { type SetReactionBody, type SetReactionResponse, type SetVoteBody, type SetVoteResponse, setReactionBodySchema, setReactionResponseSchema, setVoteBodySchema, setVoteResponseSchema, type ToggleBookmarkResponse, toggleBookmarkResponseSchema, VOTE_VALUES, type VoteValue, voteValueSchema, } from './engagement.js';
24
23
  export { CONTENT_KIND_VALUES, type ContentKind, contentKindSchema, FEED_SORT_VALUES, type FeedSort, feedSortSchema, PROFILE_PRIVACY_VALUES, type ProfilePrivacy, profilePrivacySchema, REACTION_TYPE_VALUES, REPORT_REASON_VALUES, REPORT_STATUS_VALUES, type ReactionType, type ReportReason, type ReportStatus, reactionTypeSchema, reportReasonSchema, reportStatusSchema, VISIBILITY_LEVEL_RANK, VISIBILITY_LEVEL_VALUES, type VisibilityLevel, visibilityLevelSchema, } from './enums.js';
25
24
  export { DONATE_ITEM_CONDITION_VALUES, DONATE_ITEM_STATUS_VALUES, type DonateItemCondition, type DonateItemFeedItem, type DonateItemStatus, donateAuditAtSchema, donateAuditByAtSchema, donateDonatedToSchema, donateItemConditionSchema, donateItemFeedItemSchema, donateItemStatusSchema, type FeedItem, type FeedQueryParams, type FeedResponse, feedItemSchema, feedQueryParamsSchema, feedResponseSchema, LOST_FOUND_CATEGORY_VALUES, LOST_FOUND_STATUS_VALUES, type LostFoundCategory, type LostFoundFeedItem, type LostFoundStatus, lostFoundCategorySchema, lostFoundFeedItemSchema, lostFoundStatusSchema, VOICE_BOX_PRIORITY_VALUES, VOICE_BOX_STATUS_VALUES, type VoiceBoxFeedItem, type VoiceBoxPriority, type VoiceBoxStatus, voiceBoxAudioSchema, voiceBoxFeedItemSchema, voiceBoxLocationSchema, voiceBoxOfficerResponseSchema, voiceBoxPrioritySchema, voiceBoxStatusSchema, voiceBoxVideoSchema, } from './feed.js';
26
25
  export { type AddGroupMembersBody, addGroupMembersBodySchema, type CommunityGroupWire, type CommunityGroupWithMembers, type CreateGroupBody, communityGroupWireSchema, communityGroupWithMembersSchema, createGroupBodySchema, type GroupMembersListResponse, type GroupMemberWire, type GroupRole, type GroupsListResponse, groupMembersListResponseSchema, groupMemberWireSchema, groupRoleSchema, groupsListResponseSchema, type UpdateGroupBody, updateGroupBodySchema, } from './group.js';
27
26
  export { LINK_PREVIEW_KIND_VALUES, type LinkPreview, type LinkPreviewKind, linkPreviewKindSchema, linkPreviewSchema, } from './link-preview.js';
28
27
  export { type PostImage, type PostVideo, postImageSchema, postVideoSchema, } from './media.js';
28
+ export { type ListNotificationsQuery, type ListNotificationsResponse, listNotificationsQuerySchema, listNotificationsResponseSchema, type MarkAllNotificationsReadBody, markAllNotificationsReadBodySchema, NOTIFICATION_CATEGORY_VALUES, NOTIFICATION_CHANNEL_VALUES, NOTIFICATION_PRIORITY_VALUES, NOTIFICATION_SOURCE_REF_KIND_VALUES, type NotificationActor, type NotificationCategory, type NotificationChannel, type NotificationPriority, type NotificationReadAllEvent, type NotificationReadEvent, type NotificationSourceRef, type NotificationSourceRefKind, type NotificationUnreadCount, type NotificationWire, notificationActorSchema, notificationCategorySchema, notificationChannelSchema, notificationPrioritySchema, notificationReadAllEventSchema, notificationReadEventSchema, notificationSourceRefKindSchema, notificationSourceRefSchema, notificationUnreadCountSchema, notificationWireSchema, REFORM_NOTIFICATION_SOCKET_EVENTS, type ReformNotificationSocketEvent, } from './notification.js';
29
29
  export { type CastVoteBody, type CommunityPollFeedItem, type CommunityPollWire, type CreatePollBody, castVoteBodySchema, communityPollFeedItemSchema, communityPollWireSchema, createPollBodySchema, POLL_RESULTS_VISIBILITY_VALUES, type PollOptionInput, type PollOptionWire, type PollResultsVisibility, pollOptionInputSchema, pollOptionWireSchema, pollResultsVisibilitySchema, type VoteResponse, voteResponseSchema, } from './poll.js';
30
30
  export { type CommunityPostWire, type CreatePostBody, communityPostWireSchema, createPostBodySchema, type PostAuthorSnapshot, postAuthorSnapshotSchema, type RepostedSource, repostedSourceSchema, type UpdatePostBody, updatePostBodySchema, } from './post.js';
31
31
  export { PEOPLE_LIST_FILTER_DEFAULT, PEOPLE_LIST_FILTER_VALUES, type PeopleListFilter, type PeopleListItem, type PeopleListResponse, type PeopleQueryParams, type ProfileMutuals, type PublicProfileWire, peopleListFilterSchema, peopleListItemSchema, peopleListResponseSchema, peopleQueryParamsSchema, profileMutualsSchema, publicProfileWireSchema, } from './profile.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EACL,KAAK,mBAAmB,EACxB,yBAAyB,GAC1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C3B,KAAK,2BAA2B,EAChC,iCAAiC,GAClC,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,oBAAoB,EACzB,0BAA0B,EAC1B,KAAK,iBAAiB,EACtB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,KAAK,oBAAoB,EACzB,0BAA0B,EAC1B,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,4BAA4B,EAC5B,KAAK,QAAQ,EACb,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,cAAc,EACd,+BAA+B,GAChC,MAAM,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -24,8 +24,6 @@ export { AREA_PICKER_LEVEL_VALUES, addOfficialModeratorBodySchema, areaPickerIte
24
24
  export { COMMENT_MAX_BODY_CHARS, COMMENTS_PAGE_SIZE, COMMUNITIES_PAGE_SIZE, COMMUNITY_DESCRIPTION_MAX_CHARS, COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS, COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS, COMMUNITY_DESIGNATION_CUSTOM_PATTERN, COMMUNITY_HYPERLOCAL_RADIUS_KM, COMMUNITY_MAX_TAGS, COMMUNITY_MEMBERS_PAGE_SIZE, COMMUNITY_NAME_MAX_CHARS, COMMUNITY_NAME_MIN_CHARS, COMMUNITY_SLUG_MAX_CHARS, COMMUNITY_SLUG_MIN_CHARS, COMMUNITY_SLUG_PATTERN, CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS, CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS, CROWDFUNDING_DEFERRED_FEE_RATE, CROWDFUNDING_DESCRIPTION_MAX_CHARS, CROWDFUNDING_DESCRIPTION_MIN_CHARS, CROWDFUNDING_MAX_DONATION_INR, CROWDFUNDING_MAX_DURATION_DAYS, CROWDFUNDING_MAX_GOAL_INR, CROWDFUNDING_MAX_IMAGES, CROWDFUNDING_MAX_SUPPORTING_DOCS, CROWDFUNDING_MIN_DURATION_DAYS, CROWDFUNDING_MIN_GOAL_INR, CROWDFUNDING_PAGE_SIZE, CROWDFUNDING_REJECTION_REASON_MAX_CHARS, CROWDFUNDING_REJECTION_REASON_MIN_CHARS, CROWDFUNDING_TIER_ENHANCED_INR, CROWDFUNDING_TIER_MAXIMUM_INR, CROWDFUNDING_TIER_STANDARD_INR, CROWDFUNDING_TITLE_MAX_CHARS, CROWDFUNDING_TITLE_MIN_CHARS, CROWDFUNDING_UPFRONT_FEE_INR_BY_SCOPE, computeCrowdfundingDeferredFee, EDIT_GRACE_WINDOW_MS, FEED_PAGE_SIZE, GROUP_MAX_MEMBERS, GROUP_NAME_MAX_CHARS, GROUP_NAME_MIN_CHARS, getCrowdfundingDeferredEstimate, getCrowdfundingUpfrontFee, PEOPLE_PAGE_SIZE, POLL_DURATION_PRESETS_MS, POLL_MAX_DURATION_MS, POLL_MAX_OPTIONS, POLL_MIN_DURATION_MS, POLL_MIN_OPTIONS, POLL_OPTION_MAX_CHARS, POLL_OPTION_MIN_CHARS, POLL_QUESTION_MAX_CHARS, POLL_QUESTION_MIN_CHARS, POLLS_PAGE_SIZE, POST_MAX_BODY_CHARS, POST_MAX_IMAGE_BYTES, POST_MAX_IMAGES, POST_MAX_VIDEO_BYTES, POST_MAX_VIDEO_SECONDS, POST_MAX_VIDEOS, PROFILE_MAX_BIO_CHARS, REPLIES_PRELOAD_COUNT, } from './constants.js';
25
25
  // ─── Crowdfunding ──────────────────────────────────────────────────────────
26
26
  export { approveCrowdfundingBodySchema, attestCrowdfundingDonationBodySchema, CROWDFUNDING_AUDIENCE_VALUES, CROWDFUNDING_CATEGORY_VALUES, CROWDFUNDING_DONATION_STATE_VALUES, CROWDFUNDING_FEE_BILLING_MODE_VALUES, CROWDFUNDING_FEE_PAYMENT_STATUS_VALUES, CROWDFUNDING_ORG_KIND_VALUES, CROWDFUNDING_SCOPE_VALUES, CROWDFUNDING_STATUS_VALUES, communityCrowdfundingWireSchema, createCrowdfundingBodySchema, crowdfundingAudienceSchema, crowdfundingCategorySchema, crowdfundingDonationStateSchema, crowdfundingDonationWireSchema, crowdfundingFeeBillingModeSchema, crowdfundingFeedItemSchema, crowdfundingFeePaymentStatusSchema, crowdfundingOrgKindSchema, crowdfundingPaymentSchema, crowdfundingScopeSchema, crowdfundingStatusSchema, crowdfundingVerificationSchema, listCrowdfundingDonationsQuerySchema, listMyCrowdfundingDonationsQuerySchema, rejectCrowdfundingBodySchema, updateCrowdfundingBodySchema, uploadCrowdfundingReceiptBodySchema, } from './crowdfunding.js';
27
- // ─── Notifications ─────────────────────────────────────────────────────────
28
- export { listNotificationsQuerySchema, listNotificationsResponseSchema, markAllNotificationsReadBodySchema, NOTIFICATION_CATEGORY_VALUES, NOTIFICATION_CHANNEL_VALUES, NOTIFICATION_PRIORITY_VALUES, NOTIFICATION_SOURCE_REF_KIND_VALUES, notificationActorSchema, notificationCategorySchema, notificationChannelSchema, notificationPrioritySchema, notificationReadAllEventSchema, notificationReadEventSchema, notificationSourceRefKindSchema, notificationSourceRefSchema, notificationUnreadCountSchema, notificationWireSchema, REFORM_NOTIFICATION_SOCKET_EVENTS, } from './notification.js';
29
27
  // ─── Engagement (vote + reactions + bookmark) ─────────────────────────────
30
28
  export { setReactionBodySchema, setReactionResponseSchema, setVoteBodySchema, setVoteResponseSchema, toggleBookmarkResponseSchema, VOTE_VALUES, voteValueSchema, } from './engagement.js';
31
29
  // ─── Enums ─────────────────────────────────────────────────────────────────
@@ -38,6 +36,8 @@ export { addGroupMembersBodySchema, communityGroupWireSchema, communityGroupWith
38
36
  export { LINK_PREVIEW_KIND_VALUES, linkPreviewKindSchema, linkPreviewSchema, } from './link-preview.js';
39
37
  // ─── Media ─────────────────────────────────────────────────────────────────
40
38
  export { postImageSchema, postVideoSchema, } from './media.js';
39
+ // ─── Notifications ─────────────────────────────────────────────────────────
40
+ export { listNotificationsQuerySchema, listNotificationsResponseSchema, markAllNotificationsReadBodySchema, NOTIFICATION_CATEGORY_VALUES, NOTIFICATION_CHANNEL_VALUES, NOTIFICATION_PRIORITY_VALUES, NOTIFICATION_SOURCE_REF_KIND_VALUES, notificationActorSchema, notificationCategorySchema, notificationChannelSchema, notificationPrioritySchema, notificationReadAllEventSchema, notificationReadEventSchema, notificationSourceRefKindSchema, notificationSourceRefSchema, notificationUnreadCountSchema, notificationWireSchema, REFORM_NOTIFICATION_SOCKET_EVENTS, } from './notification.js';
41
41
  // ─── Poll ──────────────────────────────────────────────────────────────────
42
42
  export { castVoteBodySchema, communityPollFeedItemSchema, communityPollWireSchema, createPollBodySchema, POLL_RESULTS_VISIBILITY_VALUES, pollOptionInputSchema, pollOptionWireSchema, pollResultsVisibilitySchema, voteResponseSchema, } from './poll.js';
43
43
  // ─── Post ──────────────────────────────────────────────────────────────────
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,8EAA8E;AAC9E,OAAO,EAEL,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AAEnB,8EAA8E;AAC9E,OAAO,EAGL,0BAA0B,EAC1B,uBAAuB,EAEvB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,8EAA8E;AAC9E,OAAO,EAEL,wBAAwB,EAKxB,8BAA8B,EAC9B,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,8BAA8B,EAC9B,qBAAqB,EACrB,kCAAkC,EAClC,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,+BA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,EAExB,oBAAoB,EAEpB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,8EAA8E;AAC9E,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EAOzB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AACtB,8EAA8E;AAC9E,OAAO,EAML,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,8BAA8B,EAC9B,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,8EAA8E;AAC9E,OAAO,EAGL,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AACrB,8EAA8E;AAC9E,OAAO,EAGL,8BAA8B,EAC9B,qBAAqB,EACrB,2BAA2B,EAE3B,2BAA2B,EAE3B,iCAAiC,GAClC,MAAM,eAAe,CAAC;AACvB,8EAA8E;AAC9E,OAAO,EAEL,0BAA0B,EAE1B,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,6EAA6E;AAC7E,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAGlB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,6EAA6E;AAC7E,OAAO,EAEL,0BAA0B,EAG1B,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,4BAA4B,EAI5B,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,cAAc,EACd,+BAA+B,GAChC,MAAM,eAAe,CAAC","sourcesContent":["/**\n * community-schema — Shared Zod schemas + TypeScript types for the\n * Jansathi hyperlocal community feature (feed, posts, engagement,\n * social graph, groups, settings).\n *\n * Single source of truth consumed by reform-backend and every product\n * frontend. The schemas mirror MongoDB / Mongoose document shapes\n * 1:1 so the same Zod validation runs at the controller boundary on\n * the backend and in the form handlers on the client.\n *\n * Cascade-upward visibility semantics: a viewer whose feed level is L\n * sees posts at L and every BROADER level matching their area lineage.\n * See `./enums.ts#VISIBILITY_LEVEL_VALUES` for the level rank table.\n *\n * @module community-schema\n */\n\n// ─── Area lineage snapshot ─────────────────────────────────────────────────\nexport {\n type AreaLineageSnapshot,\n areaLineageSnapshotSchema,\n} from './area.js';\n\n// ─── Comment ───────────────────────────────────────────────────────────────\nexport {\n type CommunityCommentWire,\n type CreateCommentBody,\n communityCommentWireSchema,\n createCommentBodySchema,\n type UpdateCommentBody,\n updateCommentBodySchema,\n} from './comment.js';\n\n// ─── Communities ───────────────────────────────────────────────────────────\nexport {\n type AddOfficialModeratorBody,\n AREA_PICKER_LEVEL_VALUES,\n type AreaPickerItem,\n type AreaPickerLevel,\n type AreaPickerQuery,\n type AreaPickerResponse,\n addOfficialModeratorBodySchema,\n areaPickerItemSchema,\n areaPickerLevelSchema,\n areaPickerQuerySchema,\n areaPickerResponseSchema,\n COMMUNITY_CATEGORY_VALUES,\n COMMUNITY_DESIGNATION_PRESETS,\n COMMUNITY_DISCOVER_SORT_VALUES,\n COMMUNITY_KIND_VALUES,\n COMMUNITY_MEMBERSHIP_STATUS_VALUES,\n COMMUNITY_REACH_VALUES,\n COMMUNITY_ROLE_VALUES,\n COMMUNITY_TAG_VALUES,\n COMMUNITY_TYPE_VALUES,\n COMMUNITY_VERIFIED_SCOPE_VALUES,\n type CommunityCategory,\n type CommunityCenterCoords,\n type CommunityDesignation,\n type CommunityDesignationPreset,\n type CommunityDiscoverSort,\n type CommunityKind,\n type CommunityListQuery,\n type CommunityListResponse,\n type CommunityMembershipStatus,\n type CommunityMembersListResponse,\n type CommunityMemberWire,\n type CommunityReach,\n type CommunityRole,\n type CommunityTag,\n type CommunityType,\n type CommunityVerifiedScope,\n type CommunityWire,\n type CreateCommunityBody,\n type CreateOfficialCommunityBody,\n communityCategorySchema,\n communityCenterCoordsSchema,\n communityDesignationPresetSchema,\n communityDesignationSchema,\n communityDiscoverSortSchema,\n communityKindSchema,\n communityListQuerySchema,\n communityListResponseSchema,\n communityMembershipStatusSchema,\n communityMembersListResponseSchema,\n communityMemberWireSchema,\n communityReachSchema,\n communityRoleSchema,\n communityTagSchema,\n communityTypeSchema,\n communityVerifiedScopeSchema,\n communityWireSchema,\n createCommunityBodySchema,\n createOfficialCommunityBodySchema,\n type HidePostBody,\n hidePostBodySchema,\n type JoinCommunityResponse,\n joinCommunityResponseSchema,\n OFFICIAL_COMMUNITY_AREA_KIND_VALUES,\n type OfficialCommunityAreaKind,\n officialCommunityAreaKindSchema,\n type SetMemberDesignationBody,\n type SetOfficialRepresentativeBody,\n setMemberDesignationBodySchema,\n setOfficialRepresentativeBodySchema,\n type UpdateCommunityBody,\n type UpdateMemberRoleBody,\n updateCommunityBodySchema,\n updateMemberRoleBodySchema,\n type VerifyCommunityBody,\n verifyCommunityBodySchema,\n} from './community.js';\n\n// ─── Constants ─────────────────────────────────────────────────────────────\nexport {\n COMMENT_MAX_BODY_CHARS,\n COMMENTS_PAGE_SIZE,\n COMMUNITIES_PAGE_SIZE,\n COMMUNITY_DESCRIPTION_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_PATTERN,\n COMMUNITY_HYPERLOCAL_RADIUS_KM,\n COMMUNITY_MAX_TAGS,\n COMMUNITY_MEMBERS_PAGE_SIZE,\n COMMUNITY_NAME_MAX_CHARS,\n COMMUNITY_NAME_MIN_CHARS,\n COMMUNITY_SLUG_MAX_CHARS,\n COMMUNITY_SLUG_MIN_CHARS,\n COMMUNITY_SLUG_PATTERN,\n CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS,\n CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS,\n CROWDFUNDING_DEFERRED_FEE_RATE,\n CROWDFUNDING_DESCRIPTION_MAX_CHARS,\n CROWDFUNDING_DESCRIPTION_MIN_CHARS,\n CROWDFUNDING_MAX_DONATION_INR,\n CROWDFUNDING_MAX_DURATION_DAYS,\n CROWDFUNDING_MAX_GOAL_INR,\n CROWDFUNDING_MAX_IMAGES,\n CROWDFUNDING_MAX_SUPPORTING_DOCS,\n CROWDFUNDING_MIN_DURATION_DAYS,\n CROWDFUNDING_MIN_GOAL_INR,\n CROWDFUNDING_PAGE_SIZE,\n CROWDFUNDING_REJECTION_REASON_MAX_CHARS,\n CROWDFUNDING_REJECTION_REASON_MIN_CHARS,\n CROWDFUNDING_TIER_ENHANCED_INR,\n CROWDFUNDING_TIER_MAXIMUM_INR,\n CROWDFUNDING_TIER_STANDARD_INR,\n CROWDFUNDING_TITLE_MAX_CHARS,\n CROWDFUNDING_TITLE_MIN_CHARS,\n CROWDFUNDING_UPFRONT_FEE_INR_BY_SCOPE,\n computeCrowdfundingDeferredFee,\n EDIT_GRACE_WINDOW_MS,\n FEED_PAGE_SIZE,\n GROUP_MAX_MEMBERS,\n GROUP_NAME_MAX_CHARS,\n GROUP_NAME_MIN_CHARS,\n getCrowdfundingDeferredEstimate,\n getCrowdfundingUpfrontFee,\n PEOPLE_PAGE_SIZE,\n POLL_DURATION_PRESETS_MS,\n POLL_MAX_DURATION_MS,\n POLL_MAX_OPTIONS,\n POLL_MIN_DURATION_MS,\n POLL_MIN_OPTIONS,\n POLL_OPTION_MAX_CHARS,\n POLL_OPTION_MIN_CHARS,\n POLL_QUESTION_MAX_CHARS,\n POLL_QUESTION_MIN_CHARS,\n POLLS_PAGE_SIZE,\n POST_MAX_BODY_CHARS,\n POST_MAX_IMAGE_BYTES,\n POST_MAX_IMAGES,\n POST_MAX_VIDEO_BYTES,\n POST_MAX_VIDEO_SECONDS,\n POST_MAX_VIDEOS,\n PROFILE_MAX_BIO_CHARS,\n REPLIES_PRELOAD_COUNT,\n} from './constants.js';\n\n// ─── Crowdfunding ──────────────────────────────────────────────────────────\nexport {\n type ApproveCrowdfundingBody,\n type AttestCrowdfundingDonationBody,\n approveCrowdfundingBodySchema,\n attestCrowdfundingDonationBodySchema,\n type CommunityCrowdfundingWire,\n CROWDFUNDING_AUDIENCE_VALUES,\n CROWDFUNDING_CATEGORY_VALUES,\n CROWDFUNDING_DONATION_STATE_VALUES,\n CROWDFUNDING_FEE_BILLING_MODE_VALUES,\n CROWDFUNDING_FEE_PAYMENT_STATUS_VALUES,\n CROWDFUNDING_ORG_KIND_VALUES,\n CROWDFUNDING_SCOPE_VALUES,\n CROWDFUNDING_STATUS_VALUES,\n type CreateCrowdfundingBody,\n type CrowdfundingAudience,\n type CrowdfundingCategory,\n type CrowdfundingDonationState,\n type CrowdfundingDonationWire,\n type CrowdfundingFeeBillingMode,\n type CrowdfundingFeedItem,\n type CrowdfundingFeePaymentStatus,\n type CrowdfundingOrgKind,\n type CrowdfundingPayment,\n type CrowdfundingScope,\n type CrowdfundingStatus,\n type CrowdfundingVerification,\n communityCrowdfundingWireSchema,\n createCrowdfundingBodySchema,\n crowdfundingAudienceSchema,\n crowdfundingCategorySchema,\n crowdfundingDonationStateSchema,\n crowdfundingDonationWireSchema,\n crowdfundingFeeBillingModeSchema,\n crowdfundingFeedItemSchema,\n crowdfundingFeePaymentStatusSchema,\n crowdfundingOrgKindSchema,\n crowdfundingPaymentSchema,\n crowdfundingScopeSchema,\n crowdfundingStatusSchema,\n crowdfundingVerificationSchema,\n type ListCrowdfundingDonationsQuery,\n type ListMyCrowdfundingDonationsQuery,\n listCrowdfundingDonationsQuerySchema,\n listMyCrowdfundingDonationsQuerySchema,\n type RejectCrowdfundingBody,\n rejectCrowdfundingBodySchema,\n type UpdateCrowdfundingBody,\n type UploadCrowdfundingReceiptBody,\n updateCrowdfundingBodySchema,\n uploadCrowdfundingReceiptBodySchema,\n} from './crowdfunding.js';\n// ─── Notifications ─────────────────────────────────────────────────────────\nexport {\n listNotificationsQuerySchema,\n type ListNotificationsQuery,\n listNotificationsResponseSchema,\n type ListNotificationsResponse,\n markAllNotificationsReadBodySchema,\n type MarkAllNotificationsReadBody,\n NOTIFICATION_CATEGORY_VALUES,\n NOTIFICATION_CHANNEL_VALUES,\n NOTIFICATION_PRIORITY_VALUES,\n NOTIFICATION_SOURCE_REF_KIND_VALUES,\n notificationActorSchema,\n type NotificationActor,\n notificationCategorySchema,\n type NotificationCategory,\n notificationChannelSchema,\n type NotificationChannel,\n notificationPrioritySchema,\n type NotificationPriority,\n notificationReadAllEventSchema,\n type NotificationReadAllEvent,\n notificationReadEventSchema,\n type NotificationReadEvent,\n notificationSourceRefKindSchema,\n type NotificationSourceRefKind,\n notificationSourceRefSchema,\n type NotificationSourceRef,\n notificationUnreadCountSchema,\n type NotificationUnreadCount,\n notificationWireSchema,\n type NotificationWire,\n REFORM_NOTIFICATION_SOCKET_EVENTS,\n type ReformNotificationSocketEvent,\n} from './notification.js';\n\n// ─── Engagement (vote + reactions + bookmark) ─────────────────────────────\nexport {\n type SetReactionBody,\n type SetReactionResponse,\n type SetVoteBody,\n type SetVoteResponse,\n setReactionBodySchema,\n setReactionResponseSchema,\n setVoteBodySchema,\n setVoteResponseSchema,\n type ToggleBookmarkResponse,\n toggleBookmarkResponseSchema,\n VOTE_VALUES,\n type VoteValue,\n voteValueSchema,\n} from './engagement.js';\n// ─── Enums ─────────────────────────────────────────────────────────────────\nexport {\n CONTENT_KIND_VALUES,\n type ContentKind,\n contentKindSchema,\n FEED_SORT_VALUES,\n type FeedSort,\n feedSortSchema,\n PROFILE_PRIVACY_VALUES,\n type ProfilePrivacy,\n profilePrivacySchema,\n REACTION_TYPE_VALUES,\n REPORT_REASON_VALUES,\n REPORT_STATUS_VALUES,\n type ReactionType,\n type ReportReason,\n type ReportStatus,\n reactionTypeSchema,\n reportReasonSchema,\n reportStatusSchema,\n VISIBILITY_LEVEL_RANK,\n VISIBILITY_LEVEL_VALUES,\n type VisibilityLevel,\n visibilityLevelSchema,\n} from './enums.js';\n// ─── Feed (polymorphic union) ──────────────────────────────────────────────\nexport {\n DONATE_ITEM_CONDITION_VALUES,\n DONATE_ITEM_STATUS_VALUES,\n type DonateItemCondition,\n type DonateItemFeedItem,\n type DonateItemStatus,\n donateAuditAtSchema,\n donateAuditByAtSchema,\n donateDonatedToSchema,\n donateItemConditionSchema,\n donateItemFeedItemSchema,\n donateItemStatusSchema,\n type FeedItem,\n type FeedQueryParams,\n type FeedResponse,\n feedItemSchema,\n feedQueryParamsSchema,\n feedResponseSchema,\n LOST_FOUND_CATEGORY_VALUES,\n LOST_FOUND_STATUS_VALUES,\n type LostFoundCategory,\n type LostFoundFeedItem,\n type LostFoundStatus,\n lostFoundCategorySchema,\n lostFoundFeedItemSchema,\n lostFoundStatusSchema,\n VOICE_BOX_PRIORITY_VALUES,\n VOICE_BOX_STATUS_VALUES,\n type VoiceBoxFeedItem,\n type VoiceBoxPriority,\n type VoiceBoxStatus,\n voiceBoxAudioSchema,\n voiceBoxFeedItemSchema,\n voiceBoxLocationSchema,\n voiceBoxOfficerResponseSchema,\n voiceBoxPrioritySchema,\n voiceBoxStatusSchema,\n voiceBoxVideoSchema,\n} from './feed.js';\n// ─── Groups ────────────────────────────────────────────────────────────────\nexport {\n type AddGroupMembersBody,\n addGroupMembersBodySchema,\n type CommunityGroupWire,\n type CommunityGroupWithMembers,\n type CreateGroupBody,\n communityGroupWireSchema,\n communityGroupWithMembersSchema,\n createGroupBodySchema,\n type GroupMembersListResponse,\n type GroupMemberWire,\n type GroupRole,\n type GroupsListResponse,\n groupMembersListResponseSchema,\n groupMemberWireSchema,\n groupRoleSchema,\n groupsListResponseSchema,\n type UpdateGroupBody,\n updateGroupBodySchema,\n} from './group.js';\n// ─── Link preview (auto-extracted URL embed) ──────────────────────────────\nexport {\n LINK_PREVIEW_KIND_VALUES,\n type LinkPreview,\n type LinkPreviewKind,\n linkPreviewKindSchema,\n linkPreviewSchema,\n} from './link-preview.js';\n// ─── Media ─────────────────────────────────────────────────────────────────\nexport {\n type PostImage,\n type PostVideo,\n postImageSchema,\n postVideoSchema,\n} from './media.js';\n// ─── Poll ──────────────────────────────────────────────────────────────────\nexport {\n type CastVoteBody,\n type CommunityPollFeedItem,\n type CommunityPollWire,\n type CreatePollBody,\n castVoteBodySchema,\n communityPollFeedItemSchema,\n communityPollWireSchema,\n createPollBodySchema,\n POLL_RESULTS_VISIBILITY_VALUES,\n type PollOptionInput,\n type PollOptionWire,\n type PollResultsVisibility,\n pollOptionInputSchema,\n pollOptionWireSchema,\n pollResultsVisibilitySchema,\n type VoteResponse,\n voteResponseSchema,\n} from './poll.js';\n// ─── Post ──────────────────────────────────────────────────────────────────\nexport {\n type CommunityPostWire,\n type CreatePostBody,\n communityPostWireSchema,\n createPostBodySchema,\n type PostAuthorSnapshot,\n postAuthorSnapshotSchema,\n type RepostedSource,\n repostedSourceSchema,\n type UpdatePostBody,\n updatePostBodySchema,\n} from './post.js';\n// ─── Profile + People list ─────────────────────────────────────────────────\nexport {\n PEOPLE_LIST_FILTER_DEFAULT,\n PEOPLE_LIST_FILTER_VALUES,\n type PeopleListFilter,\n type PeopleListItem,\n type PeopleListResponse,\n type PeopleQueryParams,\n type ProfileMutuals,\n type PublicProfileWire,\n peopleListFilterSchema,\n peopleListItemSchema,\n peopleListResponseSchema,\n peopleQueryParamsSchema,\n profileMutualsSchema,\n publicProfileWireSchema,\n} from './profile.js';\n// ─── Reports (moderation) ──────────────────────────────────────────────────\nexport {\n type ReportContentBody,\n type ReportContentKind,\n type ReportRecordWire,\n type ReportSubmissionResponse,\n type ReportUserBody,\n reportContentBodySchema,\n reportContentKindSchema,\n reportRecordWireSchema,\n reportSubmissionResponseSchema,\n reportUserBodySchema,\n} from './report.js';\n// ─── Repost (quote / amplify) ──────────────────────────────────────────────\nexport {\n type CreateRepostBody,\n type CreateRepostResponse,\n createRepostBodySchema,\n createRepostResponseSchema,\n} from './repost.js';\n// ─── Settings ──────────────────────────────────────────────────────────────\nexport {\n type BlockedUsersListResponse,\n type BlockedUserWire,\n blockedUsersListResponseSchema,\n blockedUserWireSchema,\n COMMUNITY_SETTINGS_DEFAULTS,\n type CommunitySettingsWire,\n communitySettingsWireSchema,\n type UpdateCommunitySettingsBody,\n updateCommunitySettingsBodySchema,\n} from './settings.js';\n// ─── Social (follow) ───────────────────────────────────────────────────────\nexport {\n type ToggleFollowResponse,\n toggleFollowResponseSchema,\n type ViewerSocialState,\n viewerSocialStateSchema,\n} from './social.js';\n// ─── Social score (shared tier table) ─────────────────────────────────────\nexport {\n SOCIAL_SCORE_TIER_NAMES,\n SOCIAL_SCORE_TIERS,\n type SocialScoreTier,\n type SocialScoreTierName,\n tierFromSocialScore,\n} from './social-score.js';\n\n// ─── Username (URL handle + change / availability) ────────────────────────\nexport {\n type CurrentUsernameState,\n currentUsernameStateSchema,\n type UpdateUsernameBody,\n type UpdateUsernameResponse,\n USERNAME_MAX_LENGTH,\n USERNAME_MIN_LENGTH,\n USERNAME_PATTERN,\n USERNAME_UNAVAILABLE_REASONS,\n type Username,\n type UsernameAvailabilityResponse,\n type UsernameUnavailableReason,\n updateUsernameBodySchema,\n updateUsernameResponseSchema,\n usernameAvailabilityResponseSchema,\n usernameSchema,\n usernameUnavailableReasonSchema,\n} from './username.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,8EAA8E;AAC9E,OAAO,EAEL,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AAEnB,8EAA8E;AAC9E,OAAO,EAGL,0BAA0B,EAC1B,uBAAuB,EAEvB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,8EAA8E;AAC9E,OAAO,EAEL,wBAAwB,EAKxB,8BAA8B,EAC9B,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,8BAA8B,EAC9B,qBAAqB,EACrB,kCAAkC,EAClC,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,+BAA+B,EAoB/B,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB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EAOzB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AACtB,8EAA8E;AAC9E,OAAO,EAML,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,8BAA8B,EAC9B,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,8EAA8E;AAC9E,OAAO,EAGL,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AACrB,8EAA8E;AAC9E,OAAO,EAGL,8BAA8B,EAC9B,qBAAqB,EACrB,2BAA2B,EAE3B,2BAA2B,EAE3B,iCAAiC,GAClC,MAAM,eAAe,CAAC;AACvB,8EAA8E;AAC9E,OAAO,EAEL,0BAA0B,EAE1B,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,6EAA6E;AAC7E,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAGlB,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,6EAA6E;AAC7E,OAAO,EAEL,0BAA0B,EAG1B,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,4BAA4B,EAI5B,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,cAAc,EACd,+BAA+B,GAChC,MAAM,eAAe,CAAC","sourcesContent":["/**\n * community-schema — Shared Zod schemas + TypeScript types for the\n * Jansathi hyperlocal community feature (feed, posts, engagement,\n * social graph, groups, settings).\n *\n * Single source of truth consumed by reform-backend and every product\n * frontend. The schemas mirror MongoDB / Mongoose document shapes\n * 1:1 so the same Zod validation runs at the controller boundary on\n * the backend and in the form handlers on the client.\n *\n * Cascade-upward visibility semantics: a viewer whose feed level is L\n * sees posts at L and every BROADER level matching their area lineage.\n * See `./enums.ts#VISIBILITY_LEVEL_VALUES` for the level rank table.\n *\n * @module community-schema\n */\n\n// ─── Area lineage snapshot ─────────────────────────────────────────────────\nexport {\n type AreaLineageSnapshot,\n areaLineageSnapshotSchema,\n} from './area.js';\n\n// ─── Comment ───────────────────────────────────────────────────────────────\nexport {\n type CommunityCommentWire,\n type CreateCommentBody,\n communityCommentWireSchema,\n createCommentBodySchema,\n type UpdateCommentBody,\n updateCommentBodySchema,\n} from './comment.js';\n\n// ─── Communities ───────────────────────────────────────────────────────────\nexport {\n type AddOfficialModeratorBody,\n AREA_PICKER_LEVEL_VALUES,\n type AreaPickerItem,\n type AreaPickerLevel,\n type AreaPickerQuery,\n type AreaPickerResponse,\n addOfficialModeratorBodySchema,\n areaPickerItemSchema,\n areaPickerLevelSchema,\n areaPickerQuerySchema,\n areaPickerResponseSchema,\n COMMUNITY_CATEGORY_VALUES,\n COMMUNITY_DESIGNATION_PRESETS,\n COMMUNITY_DISCOVER_SORT_VALUES,\n COMMUNITY_KIND_VALUES,\n COMMUNITY_MEMBERSHIP_STATUS_VALUES,\n COMMUNITY_REACH_VALUES,\n COMMUNITY_ROLE_VALUES,\n COMMUNITY_TAG_VALUES,\n COMMUNITY_TYPE_VALUES,\n COMMUNITY_VERIFIED_SCOPE_VALUES,\n type CommunityCategory,\n type CommunityCenterCoords,\n type CommunityDesignation,\n type CommunityDesignationPreset,\n type CommunityDiscoverSort,\n type CommunityKind,\n type CommunityListQuery,\n type CommunityListResponse,\n type CommunityMembershipStatus,\n type CommunityMembersListResponse,\n type CommunityMemberWire,\n type CommunityReach,\n type CommunityRole,\n type CommunityTag,\n type CommunityType,\n type CommunityVerifiedScope,\n type CommunityWire,\n type CreateCommunityBody,\n type CreateOfficialCommunityBody,\n communityCategorySchema,\n communityCenterCoordsSchema,\n communityDesignationPresetSchema,\n communityDesignationSchema,\n communityDiscoverSortSchema,\n communityKindSchema,\n communityListQuerySchema,\n communityListResponseSchema,\n communityMembershipStatusSchema,\n communityMembersListResponseSchema,\n communityMemberWireSchema,\n communityReachSchema,\n communityRoleSchema,\n communityTagSchema,\n communityTypeSchema,\n communityVerifiedScopeSchema,\n communityWireSchema,\n createCommunityBodySchema,\n createOfficialCommunityBodySchema,\n type HidePostBody,\n hidePostBodySchema,\n type JoinCommunityResponse,\n joinCommunityResponseSchema,\n OFFICIAL_COMMUNITY_AREA_KIND_VALUES,\n type OfficialCommunityAreaKind,\n officialCommunityAreaKindSchema,\n type SetMemberDesignationBody,\n type SetOfficialRepresentativeBody,\n setMemberDesignationBodySchema,\n setOfficialRepresentativeBodySchema,\n type UpdateCommunityBody,\n type UpdateMemberRoleBody,\n updateCommunityBodySchema,\n updateMemberRoleBodySchema,\n type VerifyCommunityBody,\n verifyCommunityBodySchema,\n} from './community.js';\n\n// ─── Constants ─────────────────────────────────────────────────────────────\nexport {\n COMMENT_MAX_BODY_CHARS,\n COMMENTS_PAGE_SIZE,\n COMMUNITIES_PAGE_SIZE,\n COMMUNITY_DESCRIPTION_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MAX_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_MIN_CHARS,\n COMMUNITY_DESIGNATION_CUSTOM_PATTERN,\n COMMUNITY_HYPERLOCAL_RADIUS_KM,\n COMMUNITY_MAX_TAGS,\n COMMUNITY_MEMBERS_PAGE_SIZE,\n COMMUNITY_NAME_MAX_CHARS,\n COMMUNITY_NAME_MIN_CHARS,\n COMMUNITY_SLUG_MAX_CHARS,\n COMMUNITY_SLUG_MIN_CHARS,\n COMMUNITY_SLUG_PATTERN,\n CROWDFUNDING_BENEFICIARY_NAME_MAX_CHARS,\n CROWDFUNDING_BENEFICIARY_RELATION_MAX_CHARS,\n CROWDFUNDING_DEFERRED_FEE_RATE,\n CROWDFUNDING_DESCRIPTION_MAX_CHARS,\n CROWDFUNDING_DESCRIPTION_MIN_CHARS,\n CROWDFUNDING_MAX_DONATION_INR,\n CROWDFUNDING_MAX_DURATION_DAYS,\n CROWDFUNDING_MAX_GOAL_INR,\n CROWDFUNDING_MAX_IMAGES,\n CROWDFUNDING_MAX_SUPPORTING_DOCS,\n CROWDFUNDING_MIN_DURATION_DAYS,\n CROWDFUNDING_MIN_GOAL_INR,\n CROWDFUNDING_PAGE_SIZE,\n CROWDFUNDING_REJECTION_REASON_MAX_CHARS,\n CROWDFUNDING_REJECTION_REASON_MIN_CHARS,\n CROWDFUNDING_TIER_ENHANCED_INR,\n CROWDFUNDING_TIER_MAXIMUM_INR,\n CROWDFUNDING_TIER_STANDARD_INR,\n CROWDFUNDING_TITLE_MAX_CHARS,\n CROWDFUNDING_TITLE_MIN_CHARS,\n CROWDFUNDING_UPFRONT_FEE_INR_BY_SCOPE,\n computeCrowdfundingDeferredFee,\n EDIT_GRACE_WINDOW_MS,\n FEED_PAGE_SIZE,\n GROUP_MAX_MEMBERS,\n GROUP_NAME_MAX_CHARS,\n GROUP_NAME_MIN_CHARS,\n getCrowdfundingDeferredEstimate,\n getCrowdfundingUpfrontFee,\n PEOPLE_PAGE_SIZE,\n POLL_DURATION_PRESETS_MS,\n POLL_MAX_DURATION_MS,\n POLL_MAX_OPTIONS,\n POLL_MIN_DURATION_MS,\n POLL_MIN_OPTIONS,\n POLL_OPTION_MAX_CHARS,\n POLL_OPTION_MIN_CHARS,\n POLL_QUESTION_MAX_CHARS,\n POLL_QUESTION_MIN_CHARS,\n POLLS_PAGE_SIZE,\n POST_MAX_BODY_CHARS,\n POST_MAX_IMAGE_BYTES,\n POST_MAX_IMAGES,\n POST_MAX_VIDEO_BYTES,\n POST_MAX_VIDEO_SECONDS,\n POST_MAX_VIDEOS,\n PROFILE_MAX_BIO_CHARS,\n REPLIES_PRELOAD_COUNT,\n} from './constants.js';\n\n// ─── Crowdfunding ──────────────────────────────────────────────────────────\nexport {\n type ApproveCrowdfundingBody,\n type AttestCrowdfundingDonationBody,\n approveCrowdfundingBodySchema,\n attestCrowdfundingDonationBodySchema,\n type CommunityCrowdfundingWire,\n CROWDFUNDING_AUDIENCE_VALUES,\n CROWDFUNDING_CATEGORY_VALUES,\n CROWDFUNDING_DONATION_STATE_VALUES,\n CROWDFUNDING_FEE_BILLING_MODE_VALUES,\n CROWDFUNDING_FEE_PAYMENT_STATUS_VALUES,\n CROWDFUNDING_ORG_KIND_VALUES,\n CROWDFUNDING_SCOPE_VALUES,\n CROWDFUNDING_STATUS_VALUES,\n type CreateCrowdfundingBody,\n type CrowdfundingAudience,\n type CrowdfundingCategory,\n type CrowdfundingDonationState,\n type CrowdfundingDonationWire,\n type CrowdfundingFeeBillingMode,\n type CrowdfundingFeedItem,\n type CrowdfundingFeePaymentStatus,\n type CrowdfundingOrgKind,\n type CrowdfundingPayment,\n type CrowdfundingScope,\n type CrowdfundingStatus,\n type CrowdfundingVerification,\n communityCrowdfundingWireSchema,\n createCrowdfundingBodySchema,\n crowdfundingAudienceSchema,\n crowdfundingCategorySchema,\n crowdfundingDonationStateSchema,\n crowdfundingDonationWireSchema,\n crowdfundingFeeBillingModeSchema,\n crowdfundingFeedItemSchema,\n crowdfundingFeePaymentStatusSchema,\n crowdfundingOrgKindSchema,\n crowdfundingPaymentSchema,\n crowdfundingScopeSchema,\n crowdfundingStatusSchema,\n crowdfundingVerificationSchema,\n type ListCrowdfundingDonationsQuery,\n type ListMyCrowdfundingDonationsQuery,\n listCrowdfundingDonationsQuerySchema,\n listMyCrowdfundingDonationsQuerySchema,\n type RejectCrowdfundingBody,\n rejectCrowdfundingBodySchema,\n type UpdateCrowdfundingBody,\n type UploadCrowdfundingReceiptBody,\n updateCrowdfundingBodySchema,\n uploadCrowdfundingReceiptBodySchema,\n} from './crowdfunding.js';\n// ─── Engagement (vote + reactions + bookmark) ─────────────────────────────\nexport {\n type SetReactionBody,\n type SetReactionResponse,\n type SetVoteBody,\n type SetVoteResponse,\n setReactionBodySchema,\n setReactionResponseSchema,\n setVoteBodySchema,\n setVoteResponseSchema,\n type ToggleBookmarkResponse,\n toggleBookmarkResponseSchema,\n VOTE_VALUES,\n type VoteValue,\n voteValueSchema,\n} from './engagement.js';\n// ─── Enums ─────────────────────────────────────────────────────────────────\nexport {\n CONTENT_KIND_VALUES,\n type ContentKind,\n contentKindSchema,\n FEED_SORT_VALUES,\n type FeedSort,\n feedSortSchema,\n PROFILE_PRIVACY_VALUES,\n type ProfilePrivacy,\n profilePrivacySchema,\n REACTION_TYPE_VALUES,\n REPORT_REASON_VALUES,\n REPORT_STATUS_VALUES,\n type ReactionType,\n type ReportReason,\n type ReportStatus,\n reactionTypeSchema,\n reportReasonSchema,\n reportStatusSchema,\n VISIBILITY_LEVEL_RANK,\n VISIBILITY_LEVEL_VALUES,\n type VisibilityLevel,\n visibilityLevelSchema,\n} from './enums.js';\n// ─── Feed (polymorphic union) ──────────────────────────────────────────────\nexport {\n DONATE_ITEM_CONDITION_VALUES,\n DONATE_ITEM_STATUS_VALUES,\n type DonateItemCondition,\n type DonateItemFeedItem,\n type DonateItemStatus,\n donateAuditAtSchema,\n donateAuditByAtSchema,\n donateDonatedToSchema,\n donateItemConditionSchema,\n donateItemFeedItemSchema,\n donateItemStatusSchema,\n type FeedItem,\n type FeedQueryParams,\n type FeedResponse,\n feedItemSchema,\n feedQueryParamsSchema,\n feedResponseSchema,\n LOST_FOUND_CATEGORY_VALUES,\n LOST_FOUND_STATUS_VALUES,\n type LostFoundCategory,\n type LostFoundFeedItem,\n type LostFoundStatus,\n lostFoundCategorySchema,\n lostFoundFeedItemSchema,\n lostFoundStatusSchema,\n VOICE_BOX_PRIORITY_VALUES,\n VOICE_BOX_STATUS_VALUES,\n type VoiceBoxFeedItem,\n type VoiceBoxPriority,\n type VoiceBoxStatus,\n voiceBoxAudioSchema,\n voiceBoxFeedItemSchema,\n voiceBoxLocationSchema,\n voiceBoxOfficerResponseSchema,\n voiceBoxPrioritySchema,\n voiceBoxStatusSchema,\n voiceBoxVideoSchema,\n} from './feed.js';\n// ─── Groups ────────────────────────────────────────────────────────────────\nexport {\n type AddGroupMembersBody,\n addGroupMembersBodySchema,\n type CommunityGroupWire,\n type CommunityGroupWithMembers,\n type CreateGroupBody,\n communityGroupWireSchema,\n communityGroupWithMembersSchema,\n createGroupBodySchema,\n type GroupMembersListResponse,\n type GroupMemberWire,\n type GroupRole,\n type GroupsListResponse,\n groupMembersListResponseSchema,\n groupMemberWireSchema,\n groupRoleSchema,\n groupsListResponseSchema,\n type UpdateGroupBody,\n updateGroupBodySchema,\n} from './group.js';\n// ─── Link preview (auto-extracted URL embed) ──────────────────────────────\nexport {\n LINK_PREVIEW_KIND_VALUES,\n type LinkPreview,\n type LinkPreviewKind,\n linkPreviewKindSchema,\n linkPreviewSchema,\n} from './link-preview.js';\n// ─── Media ─────────────────────────────────────────────────────────────────\nexport {\n type PostImage,\n type PostVideo,\n postImageSchema,\n postVideoSchema,\n} from './media.js';\n// ─── Notifications ─────────────────────────────────────────────────────────\nexport {\n type ListNotificationsQuery,\n type ListNotificationsResponse,\n listNotificationsQuerySchema,\n listNotificationsResponseSchema,\n type MarkAllNotificationsReadBody,\n markAllNotificationsReadBodySchema,\n NOTIFICATION_CATEGORY_VALUES,\n NOTIFICATION_CHANNEL_VALUES,\n NOTIFICATION_PRIORITY_VALUES,\n NOTIFICATION_SOURCE_REF_KIND_VALUES,\n type NotificationActor,\n type NotificationCategory,\n type NotificationChannel,\n type NotificationPriority,\n type NotificationReadAllEvent,\n type NotificationReadEvent,\n type NotificationSourceRef,\n type NotificationSourceRefKind,\n type NotificationUnreadCount,\n type NotificationWire,\n notificationActorSchema,\n notificationCategorySchema,\n notificationChannelSchema,\n notificationPrioritySchema,\n notificationReadAllEventSchema,\n notificationReadEventSchema,\n notificationSourceRefKindSchema,\n notificationSourceRefSchema,\n notificationUnreadCountSchema,\n notificationWireSchema,\n REFORM_NOTIFICATION_SOCKET_EVENTS,\n type ReformNotificationSocketEvent,\n} from './notification.js';\n// ─── Poll ──────────────────────────────────────────────────────────────────\nexport {\n type CastVoteBody,\n type CommunityPollFeedItem,\n type CommunityPollWire,\n type CreatePollBody,\n castVoteBodySchema,\n communityPollFeedItemSchema,\n communityPollWireSchema,\n createPollBodySchema,\n POLL_RESULTS_VISIBILITY_VALUES,\n type PollOptionInput,\n type PollOptionWire,\n type PollResultsVisibility,\n pollOptionInputSchema,\n pollOptionWireSchema,\n pollResultsVisibilitySchema,\n type VoteResponse,\n voteResponseSchema,\n} from './poll.js';\n// ─── Post ──────────────────────────────────────────────────────────────────\nexport {\n type CommunityPostWire,\n type CreatePostBody,\n communityPostWireSchema,\n createPostBodySchema,\n type PostAuthorSnapshot,\n postAuthorSnapshotSchema,\n type RepostedSource,\n repostedSourceSchema,\n type UpdatePostBody,\n updatePostBodySchema,\n} from './post.js';\n// ─── Profile + People list ─────────────────────────────────────────────────\nexport {\n PEOPLE_LIST_FILTER_DEFAULT,\n PEOPLE_LIST_FILTER_VALUES,\n type PeopleListFilter,\n type PeopleListItem,\n type PeopleListResponse,\n type PeopleQueryParams,\n type ProfileMutuals,\n type PublicProfileWire,\n peopleListFilterSchema,\n peopleListItemSchema,\n peopleListResponseSchema,\n peopleQueryParamsSchema,\n profileMutualsSchema,\n publicProfileWireSchema,\n} from './profile.js';\n// ─── Reports (moderation) ──────────────────────────────────────────────────\nexport {\n type ReportContentBody,\n type ReportContentKind,\n type ReportRecordWire,\n type ReportSubmissionResponse,\n type ReportUserBody,\n reportContentBodySchema,\n reportContentKindSchema,\n reportRecordWireSchema,\n reportSubmissionResponseSchema,\n reportUserBodySchema,\n} from './report.js';\n// ─── Repost (quote / amplify) ──────────────────────────────────────────────\nexport {\n type CreateRepostBody,\n type CreateRepostResponse,\n createRepostBodySchema,\n createRepostResponseSchema,\n} from './repost.js';\n// ─── Settings ──────────────────────────────────────────────────────────────\nexport {\n type BlockedUsersListResponse,\n type BlockedUserWire,\n blockedUsersListResponseSchema,\n blockedUserWireSchema,\n COMMUNITY_SETTINGS_DEFAULTS,\n type CommunitySettingsWire,\n communitySettingsWireSchema,\n type UpdateCommunitySettingsBody,\n updateCommunitySettingsBodySchema,\n} from './settings.js';\n// ─── Social (follow) ───────────────────────────────────────────────────────\nexport {\n type ToggleFollowResponse,\n toggleFollowResponseSchema,\n type ViewerSocialState,\n viewerSocialStateSchema,\n} from './social.js';\n// ─── Social score (shared tier table) ─────────────────────────────────────\nexport {\n SOCIAL_SCORE_TIER_NAMES,\n SOCIAL_SCORE_TIERS,\n type SocialScoreTier,\n type SocialScoreTierName,\n tierFromSocialScore,\n} from './social-score.js';\n\n// ─── Username (URL handle + change / availability) ────────────────────────\nexport {\n type CurrentUsernameState,\n currentUsernameStateSchema,\n type UpdateUsernameBody,\n type UpdateUsernameResponse,\n USERNAME_MAX_LENGTH,\n USERNAME_MIN_LENGTH,\n USERNAME_PATTERN,\n USERNAME_UNAVAILABLE_REASONS,\n type Username,\n type UsernameAvailabilityResponse,\n type UsernameUnavailableReason,\n updateUsernameBodySchema,\n updateUsernameResponseSchema,\n usernameAvailabilityResponseSchema,\n usernameSchema,\n usernameUnavailableReasonSchema,\n} from './username.js';\n"]}
@@ -40,7 +40,7 @@ import { z } from 'zod';
40
40
  * exist in production — kept here for backwards-compat with the
41
41
  * leader / admin "Create notification" surface.
42
42
  */
43
- export declare const NOTIFICATION_CATEGORY_VALUES: readonly ["general", "announcement", "task", "reminder", "alert", "post_reaction", "post_vote", "post_comment", "post_comment_reply", "post_comment_reaction", "post_repost", "post_mention", "comment_mention", "new_follower", "friend_posted", "community_join_request", "community_membership_approved", "community_membership_rejected", "community_role_promoted", "community_role_demoted", "community_designation_set", "community_verified", "community_kicked", "community_deleted", "identity_verification_request", "identity_verification_granted", "crowdfunding_approved", "crowdfunding_rejected", "verifier_queue_new_campaign", "crowdfunding_donation_received", "crowdfunding_donation_receipt_uploaded", "crowdfunding_closed_success", "crowdfunding_closed_timeout"];
43
+ export declare const NOTIFICATION_CATEGORY_VALUES: readonly ["general", "announcement", "task", "reminder", "alert", "post_reaction", "post_vote", "post_comment", "post_comment_reply", "post_comment_reaction", "post_repost", "post_mention", "comment_mention", "new_follower", "friend_posted", "community_join_request", "community_membership_approved", "community_membership_rejected", "community_role_promoted", "community_role_demoted", "community_designation_set", "community_verified", "community_kicked", "community_deleted", "identity_verification_request", "identity_verification_granted", "crowdfunding_approved", "crowdfunding_rejected", "verifier_queue_new_campaign", "crowdfunding_donation_received", "crowdfunding_donation_receipt_uploaded", "crowdfunding_closed_success", "crowdfunding_closed_timeout", "chat_message", "chat_group_message", "chat_mention", "call_missed", "group_participant_added", "group_participant_removed"];
44
44
  export declare const notificationCategorySchema: z.ZodEnum<{
45
45
  general: "general";
46
46
  announcement: "announcement";
@@ -75,6 +75,12 @@ export declare const notificationCategorySchema: z.ZodEnum<{
75
75
  crowdfunding_donation_receipt_uploaded: "crowdfunding_donation_receipt_uploaded";
76
76
  crowdfunding_closed_success: "crowdfunding_closed_success";
77
77
  crowdfunding_closed_timeout: "crowdfunding_closed_timeout";
78
+ chat_message: "chat_message";
79
+ chat_group_message: "chat_group_message";
80
+ chat_mention: "chat_mention";
81
+ call_missed: "call_missed";
82
+ group_participant_added: "group_participant_added";
83
+ group_participant_removed: "group_participant_removed";
78
84
  }>;
79
85
  export type NotificationCategory = z.infer<typeof notificationCategorySchema>;
80
86
  /**
@@ -192,6 +198,12 @@ export declare const notificationWireSchema: z.ZodObject<{
192
198
  crowdfunding_donation_receipt_uploaded: "crowdfunding_donation_receipt_uploaded";
193
199
  crowdfunding_closed_success: "crowdfunding_closed_success";
194
200
  crowdfunding_closed_timeout: "crowdfunding_closed_timeout";
201
+ chat_message: "chat_message";
202
+ chat_group_message: "chat_group_message";
203
+ chat_mention: "chat_mention";
204
+ call_missed: "call_missed";
205
+ group_participant_added: "group_participant_added";
206
+ group_participant_removed: "group_participant_removed";
195
207
  }>;
196
208
  priority: z.ZodEnum<{
197
209
  low: "low";
@@ -269,6 +281,12 @@ export declare const listNotificationsQuerySchema: z.ZodObject<{
269
281
  crowdfunding_donation_receipt_uploaded: "crowdfunding_donation_receipt_uploaded";
270
282
  crowdfunding_closed_success: "crowdfunding_closed_success";
271
283
  crowdfunding_closed_timeout: "crowdfunding_closed_timeout";
284
+ chat_message: "chat_message";
285
+ chat_group_message: "chat_group_message";
286
+ chat_mention: "chat_mention";
287
+ call_missed: "call_missed";
288
+ group_participant_added: "group_participant_added";
289
+ group_participant_removed: "group_participant_removed";
272
290
  }>>>;
273
291
  }, z.core.$strip>;
274
292
  export type ListNotificationsQuery = z.infer<typeof listNotificationsQuerySchema>;
@@ -309,6 +327,12 @@ export declare const listNotificationsResponseSchema: z.ZodObject<{
309
327
  crowdfunding_donation_receipt_uploaded: "crowdfunding_donation_receipt_uploaded";
310
328
  crowdfunding_closed_success: "crowdfunding_closed_success";
311
329
  crowdfunding_closed_timeout: "crowdfunding_closed_timeout";
330
+ chat_message: "chat_message";
331
+ chat_group_message: "chat_group_message";
332
+ chat_mention: "chat_mention";
333
+ call_missed: "call_missed";
334
+ group_participant_added: "group_participant_added";
335
+ group_participant_removed: "group_participant_removed";
312
336
  }>;
313
337
  priority: z.ZodEnum<{
314
338
  low: "low";
@@ -387,6 +411,12 @@ export declare const markAllNotificationsReadBodySchema: z.ZodObject<{
387
411
  crowdfunding_donation_receipt_uploaded: "crowdfunding_donation_receipt_uploaded";
388
412
  crowdfunding_closed_success: "crowdfunding_closed_success";
389
413
  crowdfunding_closed_timeout: "crowdfunding_closed_timeout";
414
+ chat_message: "chat_message";
415
+ chat_group_message: "chat_group_message";
416
+ chat_mention: "chat_mention";
417
+ call_missed: "call_missed";
418
+ group_participant_added: "group_participant_added";
419
+ group_participant_removed: "group_participant_removed";
390
420
  }>>>;
391
421
  }, z.core.$strip>;
392
422
  export type MarkAllNotificationsReadBody = z.infer<typeof markAllNotificationsReadBodySchema>;
@@ -447,6 +477,12 @@ export declare const notificationReadAllEventSchema: z.ZodObject<{
447
477
  crowdfunding_donation_receipt_uploaded: "crowdfunding_donation_receipt_uploaded";
448
478
  crowdfunding_closed_success: "crowdfunding_closed_success";
449
479
  crowdfunding_closed_timeout: "crowdfunding_closed_timeout";
480
+ chat_message: "chat_message";
481
+ chat_group_message: "chat_group_message";
482
+ chat_mention: "chat_mention";
483
+ call_missed: "call_missed";
484
+ group_participant_added: "group_participant_added";
485
+ group_participant_removed: "group_participant_removed";
450
486
  }>>>;
451
487
  }, z.core.$strip>;
452
488
  export type NotificationReadAllEvent = z.infer<typeof notificationReadAllEventSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../src/notification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,6vBAgD/B,CAAC;AAEX,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAuC,CAAC;AAC/E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAI9E;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,8CAA+C,CAAC;AACzF,eAAO,MAAM,0BAA0B;;;;;EAAuC,CAAC;AAC/E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,6BAA8B,CAAC;AACvE,eAAO,MAAM,yBAAyB;;;EAAsC,CAAC;AAC7E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAI5E;;;;;;;;;GASG;AACH,eAAO,MAAM,mCAAmC,+EAOtC,CAAC;AACX,eAAO,MAAM,+BAA+B;;;;;;;EAA8C,CAAC;AAC3F,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,2BAA2B;;;;;;;;;;iBAGtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;;GAKG;AACH,eAAO,MAAM,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,CAAC,CAAC;AAI9F;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC;IAC5C,gFAAgF;;IAEhF,kGAAkG;;IAElG,wGAAwG;;CAEhG,CAAC;AACX,MAAM,MAAM,6BAA6B,GACvC,CAAC,OAAO,iCAAiC,CAAC,CAAC,MAAM,OAAO,iCAAiC,CAAC,CAAC;AAE7F,eAAO,MAAM,2BAA2B;;iBAEtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
@@ -85,6 +85,20 @@ export const NOTIFICATION_CATEGORY_VALUES = [
85
85
  'crowdfunding_donation_receipt_uploaded',
86
86
  'crowdfunding_closed_success',
87
87
  'crowdfunding_closed_timeout',
88
+ // ─── Chat / calls (bridged from chat-server) ─────────────────────
89
+ /**
90
+ * Chat-server pushes these via the internal bridge endpoint after
91
+ * its own delivery logic has decided the recipient should ALSO get
92
+ * an inbox row (offline / not in the conversation / not muted).
93
+ * Chat-server still does its own Web Push for live ringers — the
94
+ * bridge is for the persistent inbox + bell badge only.
95
+ */
96
+ 'chat_message',
97
+ 'chat_group_message',
98
+ 'chat_mention',
99
+ 'call_missed',
100
+ 'group_participant_added',
101
+ 'group_participant_removed',
88
102
  ];
89
103
  export const notificationCategorySchema = z.enum(NOTIFICATION_CATEGORY_VALUES);
90
104
  // ─── 2. Priority + channel ─────────────────────────────────────────
@@ -1 +1 @@
1
- {"version":3,"file":"notification.js","sourceRoot":"","sources":["../src/notification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;A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D,CAAC,CAAC;AAGH,sEAAsE;AAEtE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,gFAAgF;IAChF,GAAG,EAAE,kBAAkB;IACvB,kGAAkG;IAClG,IAAI,EAAE,mBAAmB;IACzB,wGAAwG;IACxG,QAAQ,EAAE,uBAAuB;CACzB,CAAC;AAIX,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,QAAQ,EAAE;CAC3D,CAAC,CAAC","sourcesContent":["/**\n * Notification wire shapes — the contract the frontend's\n * `/notifications` page + bell badge consume from reform-backend.\n *\n * Architecture (community-notifications-implementation.md §1):\n * - Persistence lives in reform-backend (ReformNotification +\n * ReformNotificationReceipt collections).\n * - This package owns the cross-repo TYPES — the enum, the wire\n * row, the query shapes, the socket event names. One place to\n * edit when a new category lands.\n *\n * Module layout (kept inside this single file to match the\n * community-schema package's flat-per-domain convention):\n *\n * 1. Category enum\n * 2. Priority + Channel enums\n * 3. Source-ref + Actor sub-shapes\n * 4. Wire row shape\n * 5. List query (cursor pagination) + response\n * 6. Unread count response\n * 7. Mark-as-read body + mark-all body\n * 8. Realtime socket event names + payloads\n *\n * Scalability hooks:\n * - The category enum has explicit \"domain prefix\" groupings so\n * adding a new domain (e.g. marketplace) is `MARKETPLACE_*` —\n * no collision, no breaking change to consumers.\n * - The `sourceRef.kind` enum is open-ended for the same reason.\n * - `categories` query param accepts an array so filter chips on\n * the frontend can group multiple kinds under one chip.\n *\n * @module community-schema/notification\n */\n\nimport { z } from 'zod';\n\n// ─── 1. Category enum ──────────────────────────────────────────────\n\n/**\n * Every notification kind the frontend can render. Grouped by domain\n * with a stable prefix so adding new kinds in one domain doesn't\n * shuffle the others. The first five (`general`, `announcement`,\n * `task`, `reminder`, `alert`) are the legacy values that already\n * exist in production — kept here for backwards-compat with the\n * leader / admin \"Create notification\" surface.\n */\nexport const NOTIFICATION_CATEGORY_VALUES = [\n // ─── Legacy broadcast categories (predate this expansion) ────────\n 'general',\n 'announcement',\n 'task',\n 'reminder',\n 'alert',\n\n // ─── Engagement (post + comment + follow surface) ────────────────\n 'post_reaction',\n 'post_vote',\n 'post_comment',\n 'post_comment_reply',\n 'post_comment_reaction',\n 'post_repost',\n 'post_mention',\n 'comment_mention',\n 'new_follower',\n /**\n * Sent when someone the viewer follows publishes a new post.\n * OPT-IN per category (the frontend settings page exposes a\n * toggle — default off so this doesn't flood the inbox).\n */\n 'friend_posted',\n\n // ─── Community lifecycle ─────────────────────────────────────────\n 'community_join_request',\n 'community_membership_approved',\n 'community_membership_rejected',\n 'community_role_promoted',\n 'community_role_demoted',\n 'community_designation_set',\n 'community_verified',\n 'community_kicked',\n 'community_deleted',\n\n // ─── Leader actions ──────────────────────────────────────────────\n 'identity_verification_request',\n 'identity_verification_granted',\n 'crowdfunding_approved',\n 'crowdfunding_rejected',\n 'verifier_queue_new_campaign',\n\n // ─── Crowdfunding donation lifecycle ─────────────────────────────\n 'crowdfunding_donation_received',\n 'crowdfunding_donation_receipt_uploaded',\n 'crowdfunding_closed_success',\n 'crowdfunding_closed_timeout',\n] as const;\n\nexport const notificationCategorySchema = z.enum(NOTIFICATION_CATEGORY_VALUES);\nexport type NotificationCategory = z.infer<typeof notificationCategorySchema>;\n\n// ─── 2. Priority + channel ─────────────────────────────────────────\n\n/**\n * Priority drives sorting + the \"important\" highlight on the row.\n * `urgent` reserved for safety / security (account compromise,\n * identity-verification escalation); most application categories are\n * `normal`.\n */\nexport const NOTIFICATION_PRIORITY_VALUES = ['low', 'normal', 'high', 'urgent'] as const;\nexport const notificationPrioritySchema = z.enum(NOTIFICATION_PRIORITY_VALUES);\nexport type NotificationPriority = z.infer<typeof notificationPrioritySchema>;\n\n/**\n * Delivery channels. `in_app` writes a row + emits the live socket\n * event; `push` dispatches a Web Push (handled by async-service in\n * the future web-push phase). The model defaults to `['in_app']`\n * for now — push integration lands separately.\n */\nexport const NOTIFICATION_CHANNEL_VALUES = ['in_app', 'push'] as const;\nexport const notificationChannelSchema = z.enum(NOTIFICATION_CHANNEL_VALUES);\nexport type NotificationChannel = z.infer<typeof notificationChannelSchema>;\n\n// ─── 3. Source ref + actor ─────────────────────────────────────────\n\n/**\n * Where the notification \"came from\" semantically — the entity that\n * triggered it. Drives the frontend's deep-link AND its grouping\n * (e.g. collapse 12 reactions on one post into one row keyed by\n * `sourceRef: {kind:'post', id}` later if reaction storms become an\n * issue).\n *\n * Open-ended on purpose — adding a new entity kind (`event`,\n * `tournament`) is a one-line edit on next publish.\n */\nexport const NOTIFICATION_SOURCE_REF_KIND_VALUES = [\n 'post',\n 'comment',\n 'community',\n 'campaign',\n 'user',\n 'conversation',\n] as const;\nexport const notificationSourceRefKindSchema = z.enum(NOTIFICATION_SOURCE_REF_KIND_VALUES);\nexport type NotificationSourceRefKind = z.infer<typeof notificationSourceRefKindSchema>;\n\nexport const notificationSourceRefSchema = z.object({\n kind: notificationSourceRefKindSchema,\n id: z.string(),\n});\nexport type NotificationSourceRef = z.infer<typeof notificationSourceRefSchema>;\n\n/**\n * Denormalised \"who did this\" snapshot. Stored on the notification\n * row so the page can render the actor without an extra User\n * lookup. Display-name refresh on rename is acceptable lag — the\n * existing community-post author snapshot uses the same pattern.\n */\nexport const notificationActorSchema = z.object({\n userId: z.string(),\n displayName: z.string(),\n avatarUrl: z.string().url().optional(),\n});\nexport type NotificationActor = z.infer<typeof notificationActorSchema>;\n\n// ─── 4. Wire row ───────────────────────────────────────────────────\n\n/**\n * The shape rendered by `/notifications` and the bell dropdown\n * (when that lands). Everything the row needs to display itself\n * AND deep-link on tap, in one payload — no per-row follow-up\n * fetches.\n *\n * `isRead` + `readAt` are joined from `ReformNotificationReceipt`\n * server-side; the wire surface stays flat.\n */\nexport const notificationWireSchema = z.object({\n _id: z.string(),\n category: notificationCategorySchema,\n priority: notificationPrioritySchema,\n title: z.string(),\n body: z.string(),\n /**\n * Deep-link destination. Tap on the row navigates here AND marks\n * the row read. Optional because some categories (system maintenance\n * banner) don't have a useful target.\n */\n actionUrl: z.string().optional(),\n isRead: z.boolean(),\n readAt: z.string().datetime().nullable().optional(),\n createdAt: z.string().datetime(),\n sourceRef: notificationSourceRefSchema.optional(),\n actor: notificationActorSchema.optional(),\n});\nexport type NotificationWire = z.infer<typeof notificationWireSchema>;\n\n// ─── 5. List query (cursor pagination) ─────────────────────────────\n\n/**\n * Opaque base64 cursor encoding `{createdAt, _id}` of the last\n * fetched row — keyset pagination so deep scrolls stay fast even on\n * an inbox with thousands of rows.\n *\n * Empty / missing cursor = newest page. `nextCursor` in the\n * response is `null` when no more pages.\n */\nexport const listNotificationsQuerySchema = z.object({\n cursor: z.string().optional(),\n limit: z.coerce.number().int().positive().max(100).default(20),\n /**\n * When true, returns only rows where the viewer's receipt has\n * `readAt: null`. Drives the \"Unread\" filter chip.\n */\n unreadOnly: z\n .union([z.coerce.boolean(), z.literal('true'), z.literal('false')])\n .optional()\n .transform((v) => v === true || v === 'true'),\n /**\n * Filter by one or more categories. Accepts both a single string\n * (`?categories=post_reaction`) and a comma-list\n * (`?categories=post_reaction,post_comment`) — the express handler\n * splits before the Zod parse.\n */\n categories: z.array(notificationCategorySchema).optional(),\n});\nexport type ListNotificationsQuery = z.infer<typeof listNotificationsQuerySchema>;\n\nexport const listNotificationsResponseSchema = z.object({\n items: z.array(notificationWireSchema),\n nextCursor: z.string().nullable(),\n});\nexport type ListNotificationsResponse = z.infer<typeof listNotificationsResponseSchema>;\n\n// ─── 6. Unread count ───────────────────────────────────────────────\n\n/**\n * Cheap badge endpoint — `countDocuments({userId, readAt: null})`\n * on the receipt collection. Returned by `GET /unread-count`.\n * Polled by the bell every 60s as a fallback when the live socket\n * is disconnected.\n */\nexport const notificationUnreadCountSchema = z.object({\n count: z.number().int().nonnegative(),\n});\nexport type NotificationUnreadCount = z.infer<typeof notificationUnreadCountSchema>;\n\n// ─── 7. Mark read / mark all read ──────────────────────────────────\n\nexport const markAllNotificationsReadBodySchema = z.object({\n /**\n * Optional — when set, only matching categories are cleared\n * (lets a future \"Clear reactions\" inline action target one\n * category without nuking the whole inbox).\n */\n categories: z.array(notificationCategorySchema).optional(),\n});\nexport type MarkAllNotificationsReadBody = z.infer<typeof markAllNotificationsReadBodySchema>;\n\n// ─── 8. Realtime socket events ─────────────────────────────────────\n\n/**\n * Event names emitted by reform-backend's notification Socket.io\n * namespace and consumed by the frontend stream hook. Stored as a\n * const map so both producer and consumer reference the same\n * strings (no typos).\n *\n * Room convention: each client joins `user:<userId>` on connect;\n * events fan out to that room only.\n */\nexport const REFORM_NOTIFICATION_SOCKET_EVENTS = {\n /** A new notification was created for the viewer. Payload: NotificationWire. */\n NEW: 'reform-notif:new',\n /** A notification was marked read (possibly from another device). Payload: { notificationId }. */\n READ: 'reform-notif:read',\n /** All notifications (optionally filtered by categories) were marked read. Payload: { categories? }. */\n READ_ALL: 'reform-notif:read-all',\n} as const;\nexport type ReformNotificationSocketEvent =\n (typeof REFORM_NOTIFICATION_SOCKET_EVENTS)[keyof typeof REFORM_NOTIFICATION_SOCKET_EVENTS];\n\nexport const notificationReadEventSchema = z.object({\n notificationId: z.string(),\n});\nexport type NotificationReadEvent = z.infer<typeof notificationReadEventSchema>;\n\nexport const notificationReadAllEventSchema = z.object({\n categories: z.array(notificationCategorySchema).optional(),\n});\nexport type NotificationReadAllEvent = z.infer<typeof notificationReadAllEventSchema>;\n"]}
1
+ {"version":3,"file":"notification.js","sourceRoot":"","sources":["../src/notification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sEAAsE;AAEtE;;;;;;;GAOG;AACH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U,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,QAAQ,EAAE;CAC3D,CAAC,CAAC;AAGH,sEAAsE;AAEtE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,gFAAgF;IAChF,GAAG,EAAE,kBAAkB;IACvB,kGAAkG;IAClG,IAAI,EAAE,mBAAmB;IACzB,wGAAwG;IACxG,QAAQ,EAAE,uBAAuB;CACzB,CAAC;AAIX,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,QAAQ,EAAE;CAC3D,CAAC,CAAC","sourcesContent":["/**\n * Notification wire shapes — the contract the frontend's\n * `/notifications` page + bell badge consume from reform-backend.\n *\n * Architecture (community-notifications-implementation.md §1):\n * - Persistence lives in reform-backend (ReformNotification +\n * ReformNotificationReceipt collections).\n * - This package owns the cross-repo TYPES — the enum, the wire\n * row, the query shapes, the socket event names. One place to\n * edit when a new category lands.\n *\n * Module layout (kept inside this single file to match the\n * community-schema package's flat-per-domain convention):\n *\n * 1. Category enum\n * 2. Priority + Channel enums\n * 3. Source-ref + Actor sub-shapes\n * 4. Wire row shape\n * 5. List query (cursor pagination) + response\n * 6. Unread count response\n * 7. Mark-as-read body + mark-all body\n * 8. Realtime socket event names + payloads\n *\n * Scalability hooks:\n * - The category enum has explicit \"domain prefix\" groupings so\n * adding a new domain (e.g. marketplace) is `MARKETPLACE_*` —\n * no collision, no breaking change to consumers.\n * - The `sourceRef.kind` enum is open-ended for the same reason.\n * - `categories` query param accepts an array so filter chips on\n * the frontend can group multiple kinds under one chip.\n *\n * @module community-schema/notification\n */\n\nimport { z } from 'zod';\n\n// ─── 1. Category enum ──────────────────────────────────────────────\n\n/**\n * Every notification kind the frontend can render. Grouped by domain\n * with a stable prefix so adding new kinds in one domain doesn't\n * shuffle the others. The first five (`general`, `announcement`,\n * `task`, `reminder`, `alert`) are the legacy values that already\n * exist in production — kept here for backwards-compat with the\n * leader / admin \"Create notification\" surface.\n */\nexport const NOTIFICATION_CATEGORY_VALUES = [\n // ─── Legacy broadcast categories (predate this expansion) ────────\n 'general',\n 'announcement',\n 'task',\n 'reminder',\n 'alert',\n\n // ─── Engagement (post + comment + follow surface) ────────────────\n 'post_reaction',\n 'post_vote',\n 'post_comment',\n 'post_comment_reply',\n 'post_comment_reaction',\n 'post_repost',\n 'post_mention',\n 'comment_mention',\n 'new_follower',\n /**\n * Sent when someone the viewer follows publishes a new post.\n * OPT-IN per category (the frontend settings page exposes a\n * toggle — default off so this doesn't flood the inbox).\n */\n 'friend_posted',\n\n // ─── Community lifecycle ─────────────────────────────────────────\n 'community_join_request',\n 'community_membership_approved',\n 'community_membership_rejected',\n 'community_role_promoted',\n 'community_role_demoted',\n 'community_designation_set',\n 'community_verified',\n 'community_kicked',\n 'community_deleted',\n\n // ─── Leader actions ──────────────────────────────────────────────\n 'identity_verification_request',\n 'identity_verification_granted',\n 'crowdfunding_approved',\n 'crowdfunding_rejected',\n 'verifier_queue_new_campaign',\n\n // ─── Crowdfunding donation lifecycle ─────────────────────────────\n 'crowdfunding_donation_received',\n 'crowdfunding_donation_receipt_uploaded',\n 'crowdfunding_closed_success',\n 'crowdfunding_closed_timeout',\n\n // ─── Chat / calls (bridged from chat-server) ─────────────────────\n /**\n * Chat-server pushes these via the internal bridge endpoint after\n * its own delivery logic has decided the recipient should ALSO get\n * an inbox row (offline / not in the conversation / not muted).\n * Chat-server still does its own Web Push for live ringers — the\n * bridge is for the persistent inbox + bell badge only.\n */\n 'chat_message',\n 'chat_group_message',\n 'chat_mention',\n 'call_missed',\n 'group_participant_added',\n 'group_participant_removed',\n] as const;\n\nexport const notificationCategorySchema = z.enum(NOTIFICATION_CATEGORY_VALUES);\nexport type NotificationCategory = z.infer<typeof notificationCategorySchema>;\n\n// ─── 2. Priority + channel ─────────────────────────────────────────\n\n/**\n * Priority drives sorting + the \"important\" highlight on the row.\n * `urgent` reserved for safety / security (account compromise,\n * identity-verification escalation); most application categories are\n * `normal`.\n */\nexport const NOTIFICATION_PRIORITY_VALUES = ['low', 'normal', 'high', 'urgent'] as const;\nexport const notificationPrioritySchema = z.enum(NOTIFICATION_PRIORITY_VALUES);\nexport type NotificationPriority = z.infer<typeof notificationPrioritySchema>;\n\n/**\n * Delivery channels. `in_app` writes a row + emits the live socket\n * event; `push` dispatches a Web Push (handled by async-service in\n * the future web-push phase). The model defaults to `['in_app']`\n * for now — push integration lands separately.\n */\nexport const NOTIFICATION_CHANNEL_VALUES = ['in_app', 'push'] as const;\nexport const notificationChannelSchema = z.enum(NOTIFICATION_CHANNEL_VALUES);\nexport type NotificationChannel = z.infer<typeof notificationChannelSchema>;\n\n// ─── 3. Source ref + actor ─────────────────────────────────────────\n\n/**\n * Where the notification \"came from\" semantically — the entity that\n * triggered it. Drives the frontend's deep-link AND its grouping\n * (e.g. collapse 12 reactions on one post into one row keyed by\n * `sourceRef: {kind:'post', id}` later if reaction storms become an\n * issue).\n *\n * Open-ended on purpose — adding a new entity kind (`event`,\n * `tournament`) is a one-line edit on next publish.\n */\nexport const NOTIFICATION_SOURCE_REF_KIND_VALUES = [\n 'post',\n 'comment',\n 'community',\n 'campaign',\n 'user',\n 'conversation',\n] as const;\nexport const notificationSourceRefKindSchema = z.enum(NOTIFICATION_SOURCE_REF_KIND_VALUES);\nexport type NotificationSourceRefKind = z.infer<typeof notificationSourceRefKindSchema>;\n\nexport const notificationSourceRefSchema = z.object({\n kind: notificationSourceRefKindSchema,\n id: z.string(),\n});\nexport type NotificationSourceRef = z.infer<typeof notificationSourceRefSchema>;\n\n/**\n * Denormalised \"who did this\" snapshot. Stored on the notification\n * row so the page can render the actor without an extra User\n * lookup. Display-name refresh on rename is acceptable lag — the\n * existing community-post author snapshot uses the same pattern.\n */\nexport const notificationActorSchema = z.object({\n userId: z.string(),\n displayName: z.string(),\n avatarUrl: z.string().url().optional(),\n});\nexport type NotificationActor = z.infer<typeof notificationActorSchema>;\n\n// ─── 4. Wire row ───────────────────────────────────────────────────\n\n/**\n * The shape rendered by `/notifications` and the bell dropdown\n * (when that lands). Everything the row needs to display itself\n * AND deep-link on tap, in one payload — no per-row follow-up\n * fetches.\n *\n * `isRead` + `readAt` are joined from `ReformNotificationReceipt`\n * server-side; the wire surface stays flat.\n */\nexport const notificationWireSchema = z.object({\n _id: z.string(),\n category: notificationCategorySchema,\n priority: notificationPrioritySchema,\n title: z.string(),\n body: z.string(),\n /**\n * Deep-link destination. Tap on the row navigates here AND marks\n * the row read. Optional because some categories (system maintenance\n * banner) don't have a useful target.\n */\n actionUrl: z.string().optional(),\n isRead: z.boolean(),\n readAt: z.string().datetime().nullable().optional(),\n createdAt: z.string().datetime(),\n sourceRef: notificationSourceRefSchema.optional(),\n actor: notificationActorSchema.optional(),\n});\nexport type NotificationWire = z.infer<typeof notificationWireSchema>;\n\n// ─── 5. List query (cursor pagination) ─────────────────────────────\n\n/**\n * Opaque base64 cursor encoding `{createdAt, _id}` of the last\n * fetched row — keyset pagination so deep scrolls stay fast even on\n * an inbox with thousands of rows.\n *\n * Empty / missing cursor = newest page. `nextCursor` in the\n * response is `null` when no more pages.\n */\nexport const listNotificationsQuerySchema = z.object({\n cursor: z.string().optional(),\n limit: z.coerce.number().int().positive().max(100).default(20),\n /**\n * When true, returns only rows where the viewer's receipt has\n * `readAt: null`. Drives the \"Unread\" filter chip.\n */\n unreadOnly: z\n .union([z.coerce.boolean(), z.literal('true'), z.literal('false')])\n .optional()\n .transform((v) => v === true || v === 'true'),\n /**\n * Filter by one or more categories. Accepts both a single string\n * (`?categories=post_reaction`) and a comma-list\n * (`?categories=post_reaction,post_comment`) — the express handler\n * splits before the Zod parse.\n */\n categories: z.array(notificationCategorySchema).optional(),\n});\nexport type ListNotificationsQuery = z.infer<typeof listNotificationsQuerySchema>;\n\nexport const listNotificationsResponseSchema = z.object({\n items: z.array(notificationWireSchema),\n nextCursor: z.string().nullable(),\n});\nexport type ListNotificationsResponse = z.infer<typeof listNotificationsResponseSchema>;\n\n// ─── 6. Unread count ───────────────────────────────────────────────\n\n/**\n * Cheap badge endpoint — `countDocuments({userId, readAt: null})`\n * on the receipt collection. Returned by `GET /unread-count`.\n * Polled by the bell every 60s as a fallback when the live socket\n * is disconnected.\n */\nexport const notificationUnreadCountSchema = z.object({\n count: z.number().int().nonnegative(),\n});\nexport type NotificationUnreadCount = z.infer<typeof notificationUnreadCountSchema>;\n\n// ─── 7. Mark read / mark all read ──────────────────────────────────\n\nexport const markAllNotificationsReadBodySchema = z.object({\n /**\n * Optional — when set, only matching categories are cleared\n * (lets a future \"Clear reactions\" inline action target one\n * category without nuking the whole inbox).\n */\n categories: z.array(notificationCategorySchema).optional(),\n});\nexport type MarkAllNotificationsReadBody = z.infer<typeof markAllNotificationsReadBodySchema>;\n\n// ─── 8. Realtime socket events ─────────────────────────────────────\n\n/**\n * Event names emitted by reform-backend's notification Socket.io\n * namespace and consumed by the frontend stream hook. Stored as a\n * const map so both producer and consumer reference the same\n * strings (no typos).\n *\n * Room convention: each client joins `user:<userId>` on connect;\n * events fan out to that room only.\n */\nexport const REFORM_NOTIFICATION_SOCKET_EVENTS = {\n /** A new notification was created for the viewer. Payload: NotificationWire. */\n NEW: 'reform-notif:new',\n /** A notification was marked read (possibly from another device). Payload: { notificationId }. */\n READ: 'reform-notif:read',\n /** All notifications (optionally filtered by categories) were marked read. Payload: { categories? }. */\n READ_ALL: 'reform-notif:read-all',\n} as const;\nexport type ReformNotificationSocketEvent =\n (typeof REFORM_NOTIFICATION_SOCKET_EVENTS)[keyof typeof REFORM_NOTIFICATION_SOCKET_EVENTS];\n\nexport const notificationReadEventSchema = z.object({\n notificationId: z.string(),\n});\nexport type NotificationReadEvent = z.infer<typeof notificationReadEventSchema>;\n\nexport const notificationReadAllEventSchema = z.object({\n categories: z.array(notificationCategorySchema).optional(),\n});\nexport type NotificationReadAllEvent = z.infer<typeof notificationReadAllEventSchema>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jansathi-community-schema",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "description": "Shared Zod schemas + TypeScript types for the Jansathi hyperlocal community feature (feed, posts, engagement, social graph, groups, communities).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",