@openpeepshq/core 0.1.35 → 0.2.1

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 (92) hide show
  1. package/dist/accounts/mutations.js +9 -0
  2. package/dist/analytics/report.d.ts +1 -1
  3. package/dist/config/defaults/logs.d.ts +4 -0
  4. package/dist/config/defaults/logs.js +5 -0
  5. package/dist/config/index.d.ts +3 -328
  6. package/dist/db/explorer/index.d.ts +1 -1
  7. package/dist/db/explorer/index.js +1 -1
  8. package/dist/db/pg/filters/posts.js +1 -1
  9. package/dist/db/pg/map/registry.js +3 -2
  10. package/dist/groups/finders.d.ts +2 -2
  11. package/dist/groups/helpers.d.ts +6 -6
  12. package/dist/groups/mapping.d.ts +4 -4
  13. package/dist/jams/export.d.ts +2 -0
  14. package/dist/jams/export.js +5 -0
  15. package/dist/jams/finders.d.ts +1 -0
  16. package/dist/jams/finders.js +1 -0
  17. package/dist/jams/health.d.ts +23 -0
  18. package/dist/jams/health.js +79 -7
  19. package/dist/jams/helpers.d.ts +2 -2
  20. package/dist/jams/index.d.ts +1 -1
  21. package/dist/jams/index.js +10 -3
  22. package/dist/jams/livekit.d.ts +2 -2
  23. package/dist/jams/mapping.d.ts +10 -10
  24. package/dist/jams/mutations.d.ts +2 -2
  25. package/dist/jams/token.js +6 -2
  26. package/dist/jams/waitingRoom.js +3 -1
  27. package/dist/log/index.d.ts +1 -0
  28. package/dist/log/index.js +1 -0
  29. package/dist/log/retention.d.ts +9 -0
  30. package/dist/log/retention.js +83 -0
  31. package/dist/log/retentionJobs.d.ts +17 -0
  32. package/dist/log/retentionJobs.js +50 -0
  33. package/dist/media/garbageCollection.d.ts +109 -0
  34. package/dist/media/garbageCollection.js +603 -0
  35. package/dist/media/garbageCollectionJobs.d.ts +14 -0
  36. package/dist/media/garbageCollectionJobs.js +55 -0
  37. package/dist/media/index.d.ts +2 -0
  38. package/dist/media/index.js +91 -12
  39. package/dist/media/streaming.d.ts +2 -0
  40. package/dist/media/streaming.js +8 -0
  41. package/dist/mediaAttachments/mapping.d.ts +1 -1
  42. package/dist/notifications/defaultNotifications/index.js +2 -0
  43. package/dist/notifications/defaultNotifications/jamModerator/index.js +25 -16
  44. package/dist/notifications/defaultNotifications/jamModerator/recipients.d.ts +2 -0
  45. package/dist/notifications/defaultNotifications/jamModerator/recipients.js +5 -0
  46. package/dist/notifications/defaultNotifications/jamStarted/index.d.ts +1 -0
  47. package/dist/notifications/defaultNotifications/jamStarted/index.js +61 -13
  48. package/dist/notifications/defaultNotifications/newGroupPost/index.js +3 -3
  49. package/dist/notifications/defaultNotifications/newGroupPost/recipients.d.ts +5 -0
  50. package/dist/notifications/defaultNotifications/newGroupPost/recipients.js +23 -0
  51. package/dist/notifications/defaultNotifications/waitlistOffer/index.d.ts +24 -0
  52. package/dist/notifications/defaultNotifications/waitlistOffer/index.js +40 -0
  53. package/dist/notifications/eventIcsAttachment.d.ts +6 -0
  54. package/dist/notifications/eventIcsAttachment.js +32 -0
  55. package/dist/notifications/helpers.d.ts +11 -1
  56. package/dist/notifications/helpers.js +26 -0
  57. package/dist/notifications/index.d.ts +1 -1
  58. package/dist/notifications/index.js +1 -1
  59. package/dist/notifications/jobs.js +6 -0
  60. package/dist/notifications/mutations.js +9 -1
  61. package/dist/plugins/pluginAuth.js +1 -0
  62. package/dist/posts/activity.d.ts +1 -1
  63. package/dist/posts/activity.js +1 -1
  64. package/dist/posts/conversationQueries.d.ts +31 -0
  65. package/dist/posts/conversationQueries.js +150 -24
  66. package/dist/posts/eventAgenda.js +4 -2
  67. package/dist/posts/finders.d.ts +15 -6
  68. package/dist/posts/finders.js +23 -3
  69. package/dist/posts/helpers/index.d.ts +34 -26
  70. package/dist/posts/helpers/index.js +6 -0
  71. package/dist/posts/index.d.ts +3 -1
  72. package/dist/posts/index.js +3 -1
  73. package/dist/posts/mapping.d.ts +112 -98
  74. package/dist/posts/mutations.d.ts +24 -18
  75. package/dist/posts/mutations.js +222 -72
  76. package/dist/posts/rsvpExport.d.ts +47 -0
  77. package/dist/posts/rsvpExport.js +178 -0
  78. package/dist/posts/unseenCounts.d.ts +6 -0
  79. package/dist/posts/unseenCounts.js +51 -1
  80. package/dist/posts/waitlist.d.ts +13 -0
  81. package/dist/posts/waitlist.js +75 -0
  82. package/dist/posts/waitlistOfferJobs.d.ts +10 -0
  83. package/dist/posts/waitlistOfferJobs.js +91 -0
  84. package/dist/profileSettings/mapping.d.ts +1 -0
  85. package/dist/profiles/index.js +6 -1
  86. package/dist/profiles/mapping.d.ts +10 -10
  87. package/dist/reports/mapping.d.ts +1 -1
  88. package/dist/server/index.d.ts +1 -0
  89. package/dist/stats/mapping.d.ts +7 -6
  90. package/dist/stripe/connection.js +1 -1
  91. package/dist/stripe/helpers.js +7 -3
  92. package/package.json +11 -10
@@ -35,7 +35,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
35
35
  };
36
36
  description?: string | undefined;
37
37
  blurhash?: string | undefined;
38
- status?: "failed" | "processing" | "ready" | undefined;
38
+ status?: "failed" | "ready" | "processing" | undefined;
39
39
  error?: string | undefined;
40
40
  }[] | undefined;
41
41
  customEmojis?: {
@@ -72,7 +72,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
72
72
  };
73
73
  description?: string | undefined;
74
74
  blurhash?: string | undefined;
75
- status?: "failed" | "processing" | "ready" | undefined;
75
+ status?: "failed" | "ready" | "processing" | undefined;
76
76
  error?: string | undefined;
77
77
  }[] | undefined;
78
78
  customEmojis?: {
@@ -110,7 +110,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
110
110
  };
111
111
  description?: string | undefined;
112
112
  blurhash?: string | undefined;
113
- status?: "failed" | "processing" | "ready" | undefined;
113
+ status?: "failed" | "ready" | "processing" | undefined;
114
114
  error?: string | undefined;
115
115
  }[] | undefined;
116
116
  customEmojis?: {
@@ -126,6 +126,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
126
126
  image?: string | undefined;
127
127
  end?: string | undefined;
128
128
  maxAttendees?: number | undefined;
129
+ waitlistOfferMinutes?: number | undefined;
129
130
  attendeeListPublic?: boolean | undefined;
130
131
  moderators?: string[] | undefined;
131
132
  jam?: {
@@ -192,7 +193,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
192
193
  };
193
194
  description?: string | undefined;
194
195
  blurhash?: string | undefined;
195
- status?: "failed" | "processing" | "ready" | undefined;
196
+ status?: "failed" | "ready" | "processing" | undefined;
196
197
  error?: string | undefined;
197
198
  }[] | undefined;
198
199
  customEmojis?: {
@@ -208,7 +209,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
208
209
  } | {
209
210
  type: "resource";
210
211
  title: string;
211
- resourceKind: "link" | "file" | "video" | "gallery" | "audio";
212
+ resourceKind: "file" | "link" | "video" | "gallery" | "audio";
212
213
  content?: string | undefined;
213
214
  sensitive?: boolean | undefined;
214
215
  spoilerText?: string | undefined;
@@ -229,7 +230,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
229
230
  };
230
231
  description?: string | undefined;
231
232
  blurhash?: string | undefined;
232
- status?: "failed" | "processing" | "ready" | undefined;
233
+ status?: "failed" | "ready" | "processing" | undefined;
233
234
  error?: string | undefined;
234
235
  }[] | undefined;
235
236
  customEmojis?: {
@@ -268,7 +269,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
268
269
  };
269
270
  description?: string | undefined;
270
271
  blurhash?: string | undefined;
271
- status?: "failed" | "processing" | "ready" | undefined;
272
+ status?: "failed" | "ready" | "processing" | undefined;
272
273
  error?: string | undefined;
273
274
  }[] | undefined;
274
275
  customEmojis?: {
@@ -305,7 +306,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
305
306
  };
306
307
  description?: string | undefined;
307
308
  blurhash?: string | undefined;
308
- status?: "failed" | "processing" | "ready" | undefined;
309
+ status?: "failed" | "ready" | "processing" | undefined;
309
310
  error?: string | undefined;
310
311
  }[] | undefined;
311
312
  customEmojis?: {
@@ -343,7 +344,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
343
344
  };
344
345
  description?: string | undefined;
345
346
  blurhash?: string | undefined;
346
- status?: "failed" | "processing" | "ready" | undefined;
347
+ status?: "failed" | "ready" | "processing" | undefined;
347
348
  error?: string | undefined;
348
349
  }[] | undefined;
349
350
  customEmojis?: {
@@ -359,6 +360,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
359
360
  image?: string | undefined;
360
361
  end?: string | undefined;
361
362
  maxAttendees?: number | undefined;
363
+ waitlistOfferMinutes?: number | undefined;
362
364
  attendeeListPublic?: boolean | undefined;
363
365
  moderators?: string[] | undefined;
364
366
  jam?: {
@@ -425,7 +427,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
425
427
  };
426
428
  description?: string | undefined;
427
429
  blurhash?: string | undefined;
428
- status?: "failed" | "processing" | "ready" | undefined;
430
+ status?: "failed" | "ready" | "processing" | undefined;
429
431
  error?: string | undefined;
430
432
  }[] | undefined;
431
433
  customEmojis?: {
@@ -441,7 +443,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
441
443
  } | {
442
444
  type: "resource";
443
445
  title: string;
444
- resourceKind: "link" | "file" | "video" | "gallery" | "audio";
446
+ resourceKind: "file" | "link" | "video" | "gallery" | "audio";
445
447
  content?: string | undefined;
446
448
  sensitive?: boolean | undefined;
447
449
  spoilerText?: string | undefined;
@@ -462,7 +464,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
462
464
  };
463
465
  description?: string | undefined;
464
466
  blurhash?: string | undefined;
465
- status?: "failed" | "processing" | "ready" | undefined;
467
+ status?: "failed" | "ready" | "processing" | undefined;
466
468
  error?: string | undefined;
467
469
  }[] | undefined;
468
470
  customEmojis?: {
@@ -488,8 +490,10 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
488
490
  } | {
489
491
  type: "rsvp";
490
492
  data: {
491
- response: "removed" | "no" | "yes" | "tentative";
493
+ response: "no" | "yes" | "tentative" | "removed" | "waitlist";
492
494
  recurrenceId?: string | undefined;
495
+ waitlistJoinedAt?: string | undefined;
496
+ offerExpiresAt?: string | undefined;
493
497
  };
494
498
  } | {
495
499
  type: "reaction";
@@ -529,7 +533,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
529
533
  };
530
534
  description?: string | undefined;
531
535
  blurhash?: string | undefined;
532
- status?: "failed" | "processing" | "ready" | undefined;
536
+ status?: "failed" | "ready" | "processing" | undefined;
533
537
  error?: string | undefined;
534
538
  }[] | undefined;
535
539
  customEmojis?: {
@@ -566,7 +570,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
566
570
  };
567
571
  description?: string | undefined;
568
572
  blurhash?: string | undefined;
569
- status?: "failed" | "processing" | "ready" | undefined;
573
+ status?: "failed" | "ready" | "processing" | undefined;
570
574
  error?: string | undefined;
571
575
  }[] | undefined;
572
576
  customEmojis?: {
@@ -604,7 +608,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
604
608
  };
605
609
  description?: string | undefined;
606
610
  blurhash?: string | undefined;
607
- status?: "failed" | "processing" | "ready" | undefined;
611
+ status?: "failed" | "ready" | "processing" | undefined;
608
612
  error?: string | undefined;
609
613
  }[] | undefined;
610
614
  customEmojis?: {
@@ -620,6 +624,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
620
624
  image?: string | undefined;
621
625
  end?: string | undefined;
622
626
  maxAttendees?: number | undefined;
627
+ waitlistOfferMinutes?: number | undefined;
623
628
  attendeeListPublic?: boolean | undefined;
624
629
  moderators?: string[] | undefined;
625
630
  jam?: {
@@ -686,7 +691,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
686
691
  };
687
692
  description?: string | undefined;
688
693
  blurhash?: string | undefined;
689
- status?: "failed" | "processing" | "ready" | undefined;
694
+ status?: "failed" | "ready" | "processing" | undefined;
690
695
  error?: string | undefined;
691
696
  }[] | undefined;
692
697
  customEmojis?: {
@@ -702,7 +707,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
702
707
  } | {
703
708
  type: "resource";
704
709
  title: string;
705
- resourceKind: "link" | "file" | "video" | "gallery" | "audio";
710
+ resourceKind: "file" | "link" | "video" | "gallery" | "audio";
706
711
  content?: string | undefined;
707
712
  sensitive?: boolean | undefined;
708
713
  spoilerText?: string | undefined;
@@ -723,7 +728,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
723
728
  };
724
729
  description?: string | undefined;
725
730
  blurhash?: string | undefined;
726
- status?: "failed" | "processing" | "ready" | undefined;
731
+ status?: "failed" | "ready" | "processing" | undefined;
727
732
  error?: string | undefined;
728
733
  }[] | undefined;
729
734
  customEmojis?: {
@@ -762,7 +767,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
762
767
  };
763
768
  description?: string | undefined;
764
769
  blurhash?: string | undefined;
765
- status?: "failed" | "processing" | "ready" | undefined;
770
+ status?: "failed" | "ready" | "processing" | undefined;
766
771
  error?: string | undefined;
767
772
  }[] | undefined;
768
773
  customEmojis?: {
@@ -799,7 +804,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
799
804
  };
800
805
  description?: string | undefined;
801
806
  blurhash?: string | undefined;
802
- status?: "failed" | "processing" | "ready" | undefined;
807
+ status?: "failed" | "ready" | "processing" | undefined;
803
808
  error?: string | undefined;
804
809
  }[] | undefined;
805
810
  customEmojis?: {
@@ -837,7 +842,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
837
842
  };
838
843
  description?: string | undefined;
839
844
  blurhash?: string | undefined;
840
- status?: "failed" | "processing" | "ready" | undefined;
845
+ status?: "failed" | "ready" | "processing" | undefined;
841
846
  error?: string | undefined;
842
847
  }[] | undefined;
843
848
  customEmojis?: {
@@ -853,6 +858,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
853
858
  image?: string | undefined;
854
859
  end?: string | undefined;
855
860
  maxAttendees?: number | undefined;
861
+ waitlistOfferMinutes?: number | undefined;
856
862
  attendeeListPublic?: boolean | undefined;
857
863
  moderators?: string[] | undefined;
858
864
  jam?: {
@@ -919,7 +925,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
919
925
  };
920
926
  description?: string | undefined;
921
927
  blurhash?: string | undefined;
922
- status?: "failed" | "processing" | "ready" | undefined;
928
+ status?: "failed" | "ready" | "processing" | undefined;
923
929
  error?: string | undefined;
924
930
  }[] | undefined;
925
931
  customEmojis?: {
@@ -935,7 +941,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
935
941
  } | {
936
942
  type: "resource";
937
943
  title: string;
938
- resourceKind: "link" | "file" | "video" | "gallery" | "audio";
944
+ resourceKind: "file" | "link" | "video" | "gallery" | "audio";
939
945
  content?: string | undefined;
940
946
  sensitive?: boolean | undefined;
941
947
  spoilerText?: string | undefined;
@@ -956,7 +962,7 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
956
962
  };
957
963
  description?: string | undefined;
958
964
  blurhash?: string | undefined;
959
- status?: "failed" | "processing" | "ready" | undefined;
965
+ status?: "failed" | "ready" | "processing" | undefined;
960
966
  error?: string | undefined;
961
967
  }[] | undefined;
962
968
  customEmojis?: {
@@ -982,8 +988,10 @@ export declare const entryConnector: (db: import("../../db").PgDb, from: Profile
982
988
  } | {
983
989
  type: "rsvp";
984
990
  data: {
985
- response: "removed" | "no" | "yes" | "tentative";
991
+ response: "no" | "yes" | "tentative" | "removed" | "waitlist";
986
992
  recurrenceId?: string | undefined;
993
+ waitlistJoinedAt?: string | undefined;
994
+ offerExpiresAt?: string | undefined;
987
995
  };
988
996
  } | {
989
997
  type: "reaction";
@@ -137,6 +137,12 @@ export const transformPost = async (post, currentProfile, options = {}) => {
137
137
  profile: entry.profile,
138
138
  response: entry.data.response,
139
139
  recurrenceId: entry.data.recurrenceId,
140
+ ...(entry.data.waitlistJoinedAt
141
+ ? { waitlistJoinedAt: entry.data.waitlistJoinedAt }
142
+ : {}),
143
+ ...(entry.data.offerExpiresAt
144
+ ? { offerExpiresAt: entry.data.offerExpiresAt }
145
+ : {}),
140
146
  createdAt: entry.createdAt,
141
147
  })),
142
148
  audience,
@@ -3,11 +3,13 @@ export * from './mutations';
3
3
  export * from './mapping';
4
4
  export { CONTEXT_NODE_CAP, collectReplyClosureIds, loadReplyContextPosts, } from './contextClosure';
5
5
  export { loadThreadPreviewReplies, THREAD_PREVIEW_LIMIT, } from './threadPreview';
6
- export { listConversationPreviews, getConversationThread, findLatestThreadPostId, listLeftConversations, } from './conversationQueries';
6
+ export { listConversationPreviews, getConversationThread, getOneToOneConversation, listOneToOneConversationPostIds, listOneToOneConversationRootLeaves, findLatestThreadPostId, listLeftConversations, } from './conversationQueries';
7
7
  export * from './helpers';
8
8
  export { bumpConversationActivity, findReplyRootId } from './activity';
9
9
  export { registerRsvpConfirmationEmail } from './rsvpConfirmationEmail';
10
+ export { exportEventRsvpsCsv } from './rsvpExport';
10
11
  export { rebuildEventOccurrences, clearEventOccurrences, backfillMissingEventOccurrences, rebuildRecurringEventOccurrences, } from './eventOccurrences';
11
12
  export { listEventAgenda } from './eventAgenda';
12
13
  export { eventOccurrenceQueue, eventOccurrenceWorker, ensureEventOccurrenceSchedule, } from './eventOccurrenceJobs';
13
14
  export { pollEndQueue, pollEndWorker, schedulePollEnd, cancelPollEnd, } from './pollEndJobs';
15
+ export { waitlistOfferQueue, waitlistOfferWorker } from './waitlistOfferJobs';
@@ -3,11 +3,13 @@ export * from './mutations.js';
3
3
  export * from './mapping.js';
4
4
  export { CONTEXT_NODE_CAP, collectReplyClosureIds, loadReplyContextPosts, } from './contextClosure.js';
5
5
  export { loadThreadPreviewReplies, THREAD_PREVIEW_LIMIT, } from './threadPreview.js';
6
- export { listConversationPreviews, getConversationThread, findLatestThreadPostId, listLeftConversations, } from './conversationQueries.js';
6
+ export { listConversationPreviews, getConversationThread, getOneToOneConversation, listOneToOneConversationPostIds, listOneToOneConversationRootLeaves, findLatestThreadPostId, listLeftConversations, } from './conversationQueries.js';
7
7
  export * from './helpers/index.js';
8
8
  export { bumpConversationActivity, findReplyRootId } from './activity.js';
9
9
  export { registerRsvpConfirmationEmail } from './rsvpConfirmationEmail.js';
10
+ export { exportEventRsvpsCsv } from './rsvpExport.js';
10
11
  export { rebuildEventOccurrences, clearEventOccurrences, backfillMissingEventOccurrences, rebuildRecurringEventOccurrences, } from './eventOccurrences.js';
11
12
  export { listEventAgenda } from './eventAgenda.js';
12
13
  export { eventOccurrenceQueue, eventOccurrenceWorker, ensureEventOccurrenceSchedule, } from './eventOccurrenceJobs.js';
13
14
  export { pollEndQueue, pollEndWorker, schedulePollEnd, cancelPollEnd, } from './pollEndJobs.js';
15
+ export { waitlistOfferQueue, waitlistOfferWorker } from './waitlistOfferJobs.js';