@openpeepshq/core 0.1.31
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/LICENSE +674 -0
- package/dist/accessTokens/finders.d.ts +11 -0
- package/dist/accessTokens/finders.js +43 -0
- package/dist/accessTokens/helpers.d.ts +13 -0
- package/dist/accessTokens/helpers.js +15 -0
- package/dist/accessTokens/index.d.ts +4 -0
- package/dist/accessTokens/index.js +4 -0
- package/dist/accessTokens/mapping.d.ts +10 -0
- package/dist/accessTokens/mapping.js +25 -0
- package/dist/accessTokens/mutations.d.ts +4 -0
- package/dist/accessTokens/mutations.js +24 -0
- package/dist/accessTokens/revokations.d.ts +2 -0
- package/dist/accessTokens/revokations.js +18 -0
- package/dist/accessTokens/tokens.d.ts +31 -0
- package/dist/accessTokens/tokens.js +174 -0
- package/dist/accounts/cache.d.ts +3 -0
- package/dist/accounts/cache.js +13 -0
- package/dist/accounts/finders.d.ts +6 -0
- package/dist/accounts/finders.js +17 -0
- package/dist/accounts/helpers.d.ts +7 -0
- package/dist/accounts/helpers.js +36 -0
- package/dist/accounts/index.d.ts +6 -0
- package/dist/accounts/index.js +6 -0
- package/dist/accounts/mapping.d.ts +10 -0
- package/dist/accounts/mapping.js +28 -0
- package/dist/accounts/mutations.d.ts +21 -0
- package/dist/accounts/mutations.js +204 -0
- package/dist/analytics/cache.d.ts +6 -0
- package/dist/analytics/cache.js +29 -0
- package/dist/analytics/compile.d.ts +4 -0
- package/dist/analytics/compile.js +296 -0
- package/dist/analytics/dateRange.d.ts +39 -0
- package/dist/analytics/dateRange.js +181 -0
- package/dist/analytics/index.d.ts +8 -0
- package/dist/analytics/index.js +8 -0
- package/dist/analytics/jobs.d.ts +20 -0
- package/dist/analytics/jobs.js +84 -0
- package/dist/analytics/metrics.d.ts +4 -0
- package/dist/analytics/metrics.js +13 -0
- package/dist/analytics/pdfReport.d.ts +8 -0
- package/dist/analytics/pdfReport.js +821 -0
- package/dist/analytics/read.d.ts +6 -0
- package/dist/analytics/read.js +696 -0
- package/dist/analytics/report.d.ts +293 -0
- package/dist/analytics/report.js +153 -0
- package/dist/analytics/settings.d.ts +3 -0
- package/dist/analytics/settings.js +37 -0
- package/dist/backups/index.d.ts +5 -0
- package/dist/backups/index.js +260 -0
- package/dist/backups/metadata.d.ts +9 -0
- package/dist/backups/metadata.js +2 -0
- package/dist/config/db.d.ts +7 -0
- package/dist/config/db.js +26 -0
- package/dist/config/defaults/capabilities.d.ts +2 -0
- package/dist/config/defaults/capabilities.js +47 -0
- package/dist/config/defaults/community.d.ts +2 -0
- package/dist/config/defaults/community.js +41 -0
- package/dist/config/defaults/core.d.ts +2 -0
- package/dist/config/defaults/core.js +113 -0
- package/dist/config/defaults/db.d.ts +6 -0
- package/dist/config/defaults/db.js +8 -0
- package/dist/config/defaults/logs.d.ts +6 -0
- package/dist/config/defaults/logs.js +7 -0
- package/dist/config/defaults/redis.d.ts +4 -0
- package/dist/config/defaults/redis.js +5 -0
- package/dist/config/helpers.d.ts +11 -0
- package/dist/config/helpers.js +31 -0
- package/dist/config/index.d.ts +392 -0
- package/dist/config/index.js +83 -0
- package/dist/config/pruneEmptyConfigStrings.d.ts +7 -0
- package/dist/config/pruneEmptyConfigStrings.js +29 -0
- package/dist/db/aql.d.ts +0 -0
- package/dist/db/aql.js +1 -0
- package/dist/db/arango.d.ts +2 -0
- package/dist/db/arango.js +110 -0
- package/dist/db/bootMigrate.d.ts +1 -0
- package/dist/db/bootMigrate.js +15 -0
- package/dist/db/examples.d.ts +1 -0
- package/dist/db/examples.js +13 -0
- package/dist/db/explorer/csv.d.ts +1 -0
- package/dist/db/explorer/csv.js +18 -0
- package/dist/db/explorer/index.d.ts +6 -0
- package/dist/db/explorer/index.js +5 -0
- package/dist/db/explorer/mutate.d.ts +6 -0
- package/dist/db/explorer/mutate.js +66 -0
- package/dist/db/explorer/query.d.ts +17 -0
- package/dist/db/explorer/query.js +48 -0
- package/dist/db/explorer/sql.d.ts +11 -0
- package/dist/db/explorer/sql.js +42 -0
- package/dist/db/explorer/tables.d.ts +9 -0
- package/dist/db/explorer/tables.js +65 -0
- package/dist/db/helpers.d.ts +64 -0
- package/dist/db/helpers.js +240 -0
- package/dist/db/index.d.ts +13 -0
- package/dist/db/index.js +15 -0
- package/dist/db/init.d.ts +2 -0
- package/dist/db/init.js +10 -0
- package/dist/db/migration/autoMigrate.d.ts +2 -0
- package/dist/db/migration/autoMigrate.js +111 -0
- package/dist/db/migration/cli.d.ts +1 -0
- package/dist/db/migration/cli.js +56 -0
- package/dist/db/migration/detect.d.ts +6 -0
- package/dist/db/migration/detect.js +87 -0
- package/dist/db/migration/exportArango.d.ts +4 -0
- package/dist/db/migration/exportArango.js +80 -0
- package/dist/db/migration/importCollections.d.ts +19 -0
- package/dist/db/migration/importCollections.js +280 -0
- package/dist/db/migration/importPostgres.d.ts +3 -0
- package/dist/db/migration/importPostgres.js +18 -0
- package/dist/db/migration/shared.d.ts +39 -0
- package/dist/db/migration/shared.js +158 -0
- package/dist/db/migration/transform.d.ts +18 -0
- package/dist/db/migration/transform.js +209 -0
- package/dist/db/migration/validate.d.ts +18 -0
- package/dist/db/migration/validate.js +69 -0
- package/dist/db/pg/client.d.ts +35 -0
- package/dist/db/pg/client.js +126 -0
- package/dist/db/pg/collections.d.ts +48 -0
- package/dist/db/pg/collections.js +53 -0
- package/dist/db/pg/filters/common.d.ts +21 -0
- package/dist/db/pg/filters/common.js +48 -0
- package/dist/db/pg/filters/edges.d.ts +9 -0
- package/dist/db/pg/filters/edges.js +10 -0
- package/dist/db/pg/filters/groups.d.ts +7 -0
- package/dist/db/pg/filters/groups.js +15 -0
- package/dist/db/pg/filters/index.d.ts +22 -0
- package/dist/db/pg/filters/index.js +35 -0
- package/dist/db/pg/filters/notifications.d.ts +6 -0
- package/dist/db/pg/filters/notifications.js +10 -0
- package/dist/db/pg/filters/posts.d.ts +18 -0
- package/dist/db/pg/filters/posts.js +25 -0
- package/dist/db/pg/filters/profiles.d.ts +6 -0
- package/dist/db/pg/filters/profiles.js +9 -0
- package/dist/db/pg/filters/types.d.ts +7 -0
- package/dist/db/pg/filters/types.js +5 -0
- package/dist/db/pg/helpers.d.ts +19 -0
- package/dist/db/pg/helpers.js +67 -0
- package/dist/db/pg/map/filters.d.ts +22 -0
- package/dist/db/pg/map/filters.js +566 -0
- package/dist/db/pg/map/helpers.d.ts +2 -0
- package/dist/db/pg/map/helpers.js +2 -0
- package/dist/db/pg/map/index.d.ts +46 -0
- package/dist/db/pg/map/index.js +93 -0
- package/dist/db/pg/map/mutations.d.ts +11 -0
- package/dist/db/pg/map/mutations.js +135 -0
- package/dist/db/pg/map/queryTypes.d.ts +115 -0
- package/dist/db/pg/map/queryTypes.js +1 -0
- package/dist/db/pg/map/registry.d.ts +29 -0
- package/dist/db/pg/map/registry.js +413 -0
- package/dist/db/pg/map/relations.d.ts +28 -0
- package/dist/db/pg/map/relations.js +399 -0
- package/dist/db/pg/map/search.d.ts +6 -0
- package/dist/db/pg/map/search.js +190 -0
- package/dist/db/pg/map/types.d.ts +11 -0
- package/dist/db/pg/map/types.js +1 -0
- package/dist/db/pg/mappers.d.ts +28 -0
- package/dist/db/pg/mappers.js +29 -0
- package/dist/db/pg/migrate.d.ts +14 -0
- package/dist/db/pg/migrate.js +134 -0
- package/dist/db/pg/queries/activity.d.ts +10 -0
- package/dist/db/pg/queries/activity.js +47 -0
- package/dist/db/pg/queries/computed.d.ts +7 -0
- package/dist/db/pg/queries/computed.js +19 -0
- package/dist/db/pg/queries/derived.d.ts +22 -0
- package/dist/db/pg/queries/derived.js +100 -0
- package/dist/db/pg/queries/index.d.ts +4 -0
- package/dist/db/pg/queries/index.js +4 -0
- package/dist/db/pg/queries/sorts.d.ts +10 -0
- package/dist/db/pg/queries/sorts.js +9 -0
- package/dist/db/pg/schema/analytics.d.ts +998 -0
- package/dist/db/pg/schema/analytics.js +110 -0
- package/dist/db/pg/schema/base.d.ts +36 -0
- package/dist/db/pg/schema/base.js +23 -0
- package/dist/db/pg/schema/documents.d.ts +2002 -0
- package/dist/db/pg/schema/documents.js +40 -0
- package/dist/db/pg/schema/edges.d.ts +2725 -0
- package/dist/db/pg/schema/edges.js +34 -0
- package/dist/db/pg/schema/index.d.ts +5724 -0
- package/dist/db/pg/schema/index.js +7 -0
- package/dist/db/pg/sql/0000_bizarre_chat.sql +456 -0
- package/dist/db/pg/sql/0001_search_vector.sql +122 -0
- package/dist/db/pg/sql/0002_data_migrations_id_text.sql +1 -0
- package/dist/db/pg/sql/0003_fix_group_post_visibility.sql +4 -0
- package/dist/db/pg/sql/0004_analytics.sql +90 -0
- package/dist/db/pg/sql/meta/0000_snapshot.json +3380 -0
- package/dist/db/pg/sql/meta/0004_snapshot.json +4114 -0
- package/dist/db/pg/sql/meta/_journal.json +41 -0
- package/dist/db/replaceHostname.d.ts +1 -0
- package/dist/db/replaceHostname.js +88 -0
- package/dist/db/types.d.ts +17 -0
- package/dist/db/types.js +1 -0
- package/dist/email/index.d.ts +9 -0
- package/dist/email/index.js +19 -0
- package/dist/email/jobs.d.ts +3 -0
- package/dist/email/jobs.js +13 -0
- package/dist/email/queueStats.d.ts +2 -0
- package/dist/email/queueStats.js +27 -0
- package/dist/email/registry.d.ts +3 -0
- package/dist/email/registry.js +4 -0
- package/dist/email/render.d.ts +8 -0
- package/dist/email/render.js +34 -0
- package/dist/email/send.d.ts +9 -0
- package/dist/email/send.js +97 -0
- package/dist/email/smtpTest.d.ts +2 -0
- package/dist/email/smtpTest.js +26 -0
- package/dist/errors/index.d.ts +8 -0
- package/dist/errors/index.js +13 -0
- package/dist/events/index.d.ts +31 -0
- package/dist/events/index.js +66 -0
- package/dist/events/once.d.ts +4 -0
- package/dist/events/once.js +23 -0
- package/dist/groups/finders.d.ts +125 -0
- package/dist/groups/finders.js +18 -0
- package/dist/groups/helpers.d.ts +227 -0
- package/dist/groups/helpers.js +17 -0
- package/dist/groups/index.d.ts +3 -0
- package/dist/groups/index.js +3 -0
- package/dist/groups/mapping.d.ts +188 -0
- package/dist/groups/mapping.js +47 -0
- package/dist/groups/mutations.d.ts +26 -0
- package/dist/groups/mutations.js +41 -0
- package/dist/hashtags/finders.d.ts +3 -0
- package/dist/hashtags/finders.js +22 -0
- package/dist/hashtags/index.d.ts +2 -0
- package/dist/hashtags/index.js +2 -0
- package/dist/hashtags/mapping.d.ts +4 -0
- package/dist/hashtags/mapping.js +5 -0
- package/dist/hashtags/mutations.d.ts +0 -0
- package/dist/hashtags/mutations.js +1 -0
- package/dist/i18n/index.d.ts +14 -0
- package/dist/i18n/index.js +53 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +1 -0
- package/dist/inviteLinks/finders.d.ts +3 -0
- package/dist/inviteLinks/finders.js +5 -0
- package/dist/inviteLinks/helpers.d.ts +20 -0
- package/dist/inviteLinks/helpers.js +4 -0
- package/dist/inviteLinks/index.d.ts +3 -0
- package/dist/inviteLinks/index.js +3 -0
- package/dist/inviteLinks/mapping.d.ts +10 -0
- package/dist/inviteLinks/mapping.js +35 -0
- package/dist/inviteLinks/mutations.d.ts +4 -0
- package/dist/inviteLinks/mutations.js +39 -0
- package/dist/jams/cache.d.ts +9 -0
- package/dist/jams/cache.js +13 -0
- package/dist/jams/finders.d.ts +23 -0
- package/dist/jams/finders.js +24 -0
- package/dist/jams/helpers.d.ts +70 -0
- package/dist/jams/helpers.js +29 -0
- package/dist/jams/index.d.ts +15 -0
- package/dist/jams/index.js +108 -0
- package/dist/jams/jobs.d.ts +9 -0
- package/dist/jams/jobs.js +42 -0
- package/dist/jams/livekit.d.ts +24 -0
- package/dist/jams/livekit.js +220 -0
- package/dist/jams/mapping.d.ts +137 -0
- package/dist/jams/mapping.js +35 -0
- package/dist/jams/mutations.d.ts +40 -0
- package/dist/jams/mutations.js +4 -0
- package/dist/jams/recording.d.ts +8 -0
- package/dist/jams/recording.js +67 -0
- package/dist/jams/recordingUploadAuth.d.ts +9 -0
- package/dist/jams/recordingUploadAuth.js +19 -0
- package/dist/jams/token.d.ts +4 -0
- package/dist/jams/token.js +129 -0
- package/dist/jams/waitingRoom.d.ts +5 -0
- package/dist/jams/waitingRoom.js +71 -0
- package/dist/jobs/index.d.ts +10 -0
- package/dist/jobs/index.js +60 -0
- package/dist/jobs/jobDetail.d.ts +2 -0
- package/dist/jobs/jobDetail.js +31 -0
- package/dist/jobs/jobLog.d.ts +18 -0
- package/dist/jobs/jobLog.js +61 -0
- package/dist/jwt/index.d.ts +10 -0
- package/dist/jwt/index.js +43 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +2 -0
- package/dist/lib/streams.d.ts +2 -0
- package/dist/lib/streams.js +56 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +17 -0
- package/dist/lib/zodDeepPartial.d.ts +3 -0
- package/dist/lib/zodDeepPartial.js +26 -0
- package/dist/location/index.d.ts +2 -0
- package/dist/location/index.js +28 -0
- package/dist/log/index.d.ts +3 -0
- package/dist/log/index.js +97 -0
- package/dist/mastodon/index.d.ts +4 -0
- package/dist/mastodon/index.js +51 -0
- package/dist/mastodon/types.d.ts +7579 -0
- package/dist/mastodon/types.js +523 -0
- package/dist/mastodon/typescript.d.ts +1578 -0
- package/dist/mastodon/typescript.js +1 -0
- package/dist/media/index.d.ts +40 -0
- package/dist/media/index.js +248 -0
- package/dist/media/ipfs/index.d.ts +0 -0
- package/dist/media/ipfs/index.js +39 -0
- package/dist/media/jobs.d.ts +19 -0
- package/dist/media/jobs.js +90 -0
- package/dist/media/openpeeps/index.d.ts +3 -0
- package/dist/media/openpeeps/index.js +131 -0
- package/dist/media/processing.d.ts +19 -0
- package/dist/media/processing.js +83 -0
- package/dist/media/streaming.d.ts +77 -0
- package/dist/media/streaming.js +257 -0
- package/dist/media/streamingCleanupJobs.d.ts +14 -0
- package/dist/media/streamingCleanupJobs.js +47 -0
- package/dist/media/streamingJobs.d.ts +5 -0
- package/dist/media/streamingJobs.js +329 -0
- package/dist/media/streamingPrewarm.d.ts +36 -0
- package/dist/media/streamingPrewarm.js +109 -0
- package/dist/mediaAttachments/finders.d.ts +1 -0
- package/dist/mediaAttachments/finders.js +3 -0
- package/dist/mediaAttachments/index.d.ts +5 -0
- package/dist/mediaAttachments/index.js +12 -0
- package/dist/mediaAttachments/mapping.d.ts +21 -0
- package/dist/mediaAttachments/mapping.js +4 -0
- package/dist/mediaAttachments/mutations.d.ts +3 -0
- package/dist/mediaAttachments/mutations.js +10 -0
- package/dist/notifications/defaultNotifications/announcement/index.d.ts +24 -0
- package/dist/notifications/defaultNotifications/announcement/index.js +42 -0
- package/dist/notifications/defaultNotifications/directMessage/index.d.ts +28 -0
- package/dist/notifications/defaultNotifications/directMessage/index.js +69 -0
- package/dist/notifications/defaultNotifications/follow/index.d.ts +24 -0
- package/dist/notifications/defaultNotifications/follow/index.js +31 -0
- package/dist/notifications/defaultNotifications/groupAdded/index.d.ts +18 -0
- package/dist/notifications/defaultNotifications/groupAdded/index.js +33 -0
- package/dist/notifications/defaultNotifications/groupMemberJoined/index.d.ts +18 -0
- package/dist/notifications/defaultNotifications/groupMemberJoined/index.js +36 -0
- package/dist/notifications/defaultNotifications/groupMemberLeft/index.d.ts +18 -0
- package/dist/notifications/defaultNotifications/groupMemberLeft/index.js +36 -0
- package/dist/notifications/defaultNotifications/index.d.ts +3 -0
- package/dist/notifications/defaultNotifications/index.js +43 -0
- package/dist/notifications/defaultNotifications/jamModerator/index.d.ts +23 -0
- package/dist/notifications/defaultNotifications/jamModerator/index.js +49 -0
- package/dist/notifications/defaultNotifications/jamSpeaker/index.d.ts +23 -0
- package/dist/notifications/defaultNotifications/jamSpeaker/index.js +47 -0
- package/dist/notifications/defaultNotifications/jamStarted/index.d.ts +18 -0
- package/dist/notifications/defaultNotifications/jamStarted/index.js +82 -0
- package/dist/notifications/defaultNotifications/mention/index.d.ts +24 -0
- package/dist/notifications/defaultNotifications/mention/index.js +89 -0
- package/dist/notifications/defaultNotifications/newGroupPost/index.d.ts +24 -0
- package/dist/notifications/defaultNotifications/newGroupPost/index.js +47 -0
- package/dist/notifications/defaultNotifications/newProfile/index.d.ts +24 -0
- package/dist/notifications/defaultNotifications/newProfile/index.js +40 -0
- package/dist/notifications/defaultNotifications/pollVote/index.d.ts +19 -0
- package/dist/notifications/defaultNotifications/pollVote/index.js +40 -0
- package/dist/notifications/defaultNotifications/reaction/index.d.ts +18 -0
- package/dist/notifications/defaultNotifications/reaction/index.js +43 -0
- package/dist/notifications/defaultNotifications/reply/index.d.ts +25 -0
- package/dist/notifications/defaultNotifications/reply/index.js +57 -0
- package/dist/notifications/defaultNotifications/repost/index.d.ts +18 -0
- package/dist/notifications/defaultNotifications/repost/index.js +42 -0
- package/dist/notifications/defaultNotifications/rsvp/index.d.ts +19 -0
- package/dist/notifications/defaultNotifications/rsvp/index.js +40 -0
- package/dist/notifications/fcmCredential.d.ts +14 -0
- package/dist/notifications/fcmCredential.js +68 -0
- package/dist/notifications/finders.d.ts +7 -0
- package/dist/notifications/finders.js +13 -0
- package/dist/notifications/firebase.d.ts +1 -0
- package/dist/notifications/firebase.js +33 -0
- package/dist/notifications/handlers.d.ts +3 -0
- package/dist/notifications/handlers.js +6 -0
- package/dist/notifications/helpers.d.ts +7 -0
- package/dist/notifications/helpers.js +31 -0
- package/dist/notifications/index.d.ts +9 -0
- package/dist/notifications/index.js +43 -0
- package/dist/notifications/jobs.d.ts +2 -0
- package/dist/notifications/jobs.js +75 -0
- package/dist/notifications/mapping.d.ts +25 -0
- package/dist/notifications/mapping.js +25 -0
- package/dist/notifications/mutations.d.ts +6 -0
- package/dist/notifications/mutations.js +40 -0
- package/dist/notifications/push.d.ts +9 -0
- package/dist/notifications/push.js +261 -0
- package/dist/notifications/pushInvalidation.d.ts +10 -0
- package/dist/notifications/pushInvalidation.js +10 -0
- package/dist/performance/index.d.ts +24 -0
- package/dist/performance/index.js +61 -0
- package/dist/plugins/helpers.d.ts +3 -0
- package/dist/plugins/helpers.js +72 -0
- package/dist/plugins/index.d.ts +10 -0
- package/dist/plugins/index.js +84 -0
- package/dist/plugins/pluginAuth.d.ts +30 -0
- package/dist/plugins/pluginAuth.js +44 -0
- package/dist/posts/contextClosure.d.ts +16 -0
- package/dist/posts/contextClosure.js +66 -0
- package/dist/posts/finders.d.ts +298 -0
- package/dist/posts/finders.js +259 -0
- package/dist/posts/helpers/filters.d.ts +14 -0
- package/dist/posts/helpers/filters.js +39 -0
- package/dist/posts/helpers/index.d.ts +837 -0
- package/dist/posts/helpers/index.js +117 -0
- package/dist/posts/index.d.ts +6 -0
- package/dist/posts/index.js +6 -0
- package/dist/posts/mapping.d.ts +2187 -0
- package/dist/posts/mapping.js +222 -0
- package/dist/posts/mutations.d.ts +19 -0
- package/dist/posts/mutations.js +202 -0
- package/dist/posts/rsvpConfirmationEmail.d.ts +2 -0
- package/dist/posts/rsvpConfirmationEmail.js +82 -0
- package/dist/processingStats/index.d.ts +3 -0
- package/dist/processingStats/index.js +3 -0
- package/dist/processingStats/mapping.d.ts +7 -0
- package/dist/processingStats/mapping.js +4 -0
- package/dist/processingStats/mutations.d.ts +2 -0
- package/dist/processingStats/mutations.js +6 -0
- package/dist/processingStats/queries.d.ts +4 -0
- package/dist/processingStats/queries.js +46 -0
- package/dist/profileSettings/cache.d.ts +2 -0
- package/dist/profileSettings/cache.js +24 -0
- package/dist/profileSettings/finders.d.ts +1 -0
- package/dist/profileSettings/finders.js +2 -0
- package/dist/profileSettings/index.d.ts +3 -0
- package/dist/profileSettings/index.js +3 -0
- package/dist/profileSettings/mapping.d.ts +38 -0
- package/dist/profileSettings/mapping.js +5 -0
- package/dist/profileSettings/mutations.d.ts +3 -0
- package/dist/profileSettings/mutations.js +24 -0
- package/dist/profiles/cache.d.ts +5 -0
- package/dist/profiles/cache.js +19 -0
- package/dist/profiles/capacity.d.ts +2 -0
- package/dist/profiles/capacity.js +20 -0
- package/dist/profiles/export.d.ts +3 -0
- package/dist/profiles/export.js +85 -0
- package/dist/profiles/finders.d.ts +11 -0
- package/dist/profiles/finders.js +39 -0
- package/dist/profiles/helpers.d.ts +35 -0
- package/dist/profiles/helpers.js +10 -0
- package/dist/profiles/index.d.ts +5 -0
- package/dist/profiles/index.js +18 -0
- package/dist/profiles/mapping.d.ts +157 -0
- package/dist/profiles/mapping.js +132 -0
- package/dist/profiles/mutations.d.ts +9 -0
- package/dist/profiles/mutations.js +75 -0
- package/dist/pushSubscriptions/finders.d.ts +187 -0
- package/dist/pushSubscriptions/finders.js +6 -0
- package/dist/pushSubscriptions/helpers.d.ts +99 -0
- package/dist/pushSubscriptions/helpers.js +3 -0
- package/dist/pushSubscriptions/index.d.ts +3 -0
- package/dist/pushSubscriptions/index.js +3 -0
- package/dist/pushSubscriptions/mapping.d.ts +261 -0
- package/dist/pushSubscriptions/mapping.js +6 -0
- package/dist/pushSubscriptions/mutations.d.ts +95 -0
- package/dist/pushSubscriptions/mutations.js +21 -0
- package/dist/redis/connection.d.ts +4 -0
- package/dist/redis/connection.js +17 -0
- package/dist/redis/index.d.ts +1 -0
- package/dist/redis/index.js +1 -0
- package/dist/reports/finders.d.ts +6 -0
- package/dist/reports/finders.js +44 -0
- package/dist/reports/helpers.d.ts +21 -0
- package/dist/reports/helpers.js +12 -0
- package/dist/reports/index.d.ts +3 -0
- package/dist/reports/index.js +3 -0
- package/dist/reports/mapping.d.ts +9 -0
- package/dist/reports/mapping.js +34 -0
- package/dist/reports/mutations.d.ts +5 -0
- package/dist/reports/mutations.js +16 -0
- package/dist/roles/defaults.d.ts +2 -0
- package/dist/roles/defaults.js +94 -0
- package/dist/roles/finders.d.ts +5 -0
- package/dist/roles/finders.js +9 -0
- package/dist/roles/index.d.ts +4 -0
- package/dist/roles/index.js +4 -0
- package/dist/roles/mapping.d.ts +11 -0
- package/dist/roles/mapping.js +5 -0
- package/dist/roles/mutations.d.ts +4 -0
- package/dist/roles/mutations.js +30 -0
- package/dist/search/finders.d.ts +47 -0
- package/dist/search/finders.js +59 -0
- package/dist/search/helpers.d.ts +3 -0
- package/dist/search/helpers.js +1 -0
- package/dist/search/index.d.ts +1 -0
- package/dist/search/index.js +1 -0
- package/dist/search/mapping.d.ts +40 -0
- package/dist/search/mapping.js +43 -0
- package/dist/sentry/index.d.ts +34 -0
- package/dist/sentry/index.js +113 -0
- package/dist/server/helpers.d.ts +0 -0
- package/dist/server/helpers.js +1 -0
- package/dist/server/index.d.ts +105 -0
- package/dist/server/index.js +64 -0
- package/dist/stats/finders.d.ts +16156 -0
- package/dist/stats/finders.js +167 -0
- package/dist/stats/helpers.d.ts +17 -0
- package/dist/stats/helpers.js +34 -0
- package/dist/stats/index.d.ts +1 -0
- package/dist/stats/index.js +1 -0
- package/dist/stats/mapping.d.ts +188 -0
- package/dist/stats/mapping.js +19 -0
- package/dist/stripe/cache.d.ts +30 -0
- package/dist/stripe/cache.js +37 -0
- package/dist/stripe/connection.d.ts +5 -0
- package/dist/stripe/connection.js +23 -0
- package/dist/stripe/helpers.d.ts +25 -0
- package/dist/stripe/helpers.js +211 -0
- package/dist/stripe/index.d.ts +3 -0
- package/dist/stripe/index.js +3 -0
- package/package.json +99 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './documents.js';
|
|
2
|
+
export * from './edges.js';
|
|
3
|
+
export * from './analytics.js';
|
|
4
|
+
import * as documents from './documents.js';
|
|
5
|
+
import * as edges from './edges.js';
|
|
6
|
+
import * as analytics from './analytics.js';
|
|
7
|
+
export const schema = Object.assign(Object.assign(Object.assign({}, documents), edges), analytics);
|
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
CREATE TABLE "access_tokens" (
|
|
2
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
3
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
4
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
5
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
6
|
+
"deleted_at" timestamp with time zone
|
|
7
|
+
);
|
|
8
|
+
--> statement-breakpoint
|
|
9
|
+
CREATE TABLE "accounts" (
|
|
10
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
11
|
+
"email" text NOT NULL,
|
|
12
|
+
"password_hash" text NOT NULL,
|
|
13
|
+
"email_validated" boolean DEFAULT false NOT NULL,
|
|
14
|
+
"guest" boolean,
|
|
15
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
16
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
17
|
+
"deleted_at" timestamp with time zone
|
|
18
|
+
);
|
|
19
|
+
--> statement-breakpoint
|
|
20
|
+
CREATE TABLE "configs" (
|
|
21
|
+
"key" text PRIMARY KEY NOT NULL,
|
|
22
|
+
"body" jsonb NOT NULL,
|
|
23
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
24
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
25
|
+
"deleted_at" timestamp with time zone
|
|
26
|
+
);
|
|
27
|
+
--> statement-breakpoint
|
|
28
|
+
CREATE TABLE "data_migrations" (
|
|
29
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
30
|
+
"applied_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
31
|
+
);
|
|
32
|
+
--> statement-breakpoint
|
|
33
|
+
CREATE TABLE "groups" (
|
|
34
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
35
|
+
"handle" text NOT NULL,
|
|
36
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
37
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
38
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
39
|
+
"deleted_at" timestamp with time zone
|
|
40
|
+
);
|
|
41
|
+
--> statement-breakpoint
|
|
42
|
+
CREATE TABLE "hashtags" (
|
|
43
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
44
|
+
"name" text NOT NULL,
|
|
45
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
46
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
47
|
+
"deleted_at" timestamp with time zone
|
|
48
|
+
);
|
|
49
|
+
--> statement-breakpoint
|
|
50
|
+
CREATE TABLE "i18n" (
|
|
51
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
52
|
+
"locale" text NOT NULL,
|
|
53
|
+
"namespace" text NOT NULL,
|
|
54
|
+
"body" jsonb NOT NULL,
|
|
55
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
56
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
57
|
+
"deleted_at" timestamp with time zone
|
|
58
|
+
);
|
|
59
|
+
--> statement-breakpoint
|
|
60
|
+
CREATE TABLE "invite_links" (
|
|
61
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
62
|
+
"slug" text NOT NULL,
|
|
63
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
64
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
65
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
66
|
+
"deleted_at" timestamp with time zone
|
|
67
|
+
);
|
|
68
|
+
--> statement-breakpoint
|
|
69
|
+
CREATE TABLE "jam_events" (
|
|
70
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
71
|
+
"post_id" text NOT NULL,
|
|
72
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
73
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
74
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
75
|
+
"deleted_at" timestamp with time zone
|
|
76
|
+
);
|
|
77
|
+
--> statement-breakpoint
|
|
78
|
+
CREATE TABLE "media_attachments" (
|
|
79
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
80
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
81
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
82
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
83
|
+
"deleted_at" timestamp with time zone
|
|
84
|
+
);
|
|
85
|
+
--> statement-breakpoint
|
|
86
|
+
CREATE TABLE "notifications" (
|
|
87
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
88
|
+
"profile_id" text NOT NULL,
|
|
89
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
90
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
91
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
92
|
+
"deleted_at" timestamp with time zone
|
|
93
|
+
);
|
|
94
|
+
--> statement-breakpoint
|
|
95
|
+
CREATE TABLE "posts" (
|
|
96
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
97
|
+
"type" text NOT NULL,
|
|
98
|
+
"visibility" text NOT NULL,
|
|
99
|
+
"creator_id" text NOT NULL,
|
|
100
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
101
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
102
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
103
|
+
"deleted_at" timestamp with time zone
|
|
104
|
+
);
|
|
105
|
+
--> statement-breakpoint
|
|
106
|
+
CREATE TABLE "processing_stats" (
|
|
107
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
108
|
+
"filetype" text NOT NULL,
|
|
109
|
+
"filesize" text NOT NULL,
|
|
110
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
111
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
112
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
113
|
+
"deleted_at" timestamp with time zone
|
|
114
|
+
);
|
|
115
|
+
--> statement-breakpoint
|
|
116
|
+
CREATE TABLE "profile_settings" (
|
|
117
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
118
|
+
"profile_id" text NOT NULL,
|
|
119
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
120
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
121
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
122
|
+
"deleted_at" timestamp with time zone
|
|
123
|
+
);
|
|
124
|
+
--> statement-breakpoint
|
|
125
|
+
CREATE TABLE "profiles" (
|
|
126
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
127
|
+
"handle" text NOT NULL,
|
|
128
|
+
"activity_pub_domain" text,
|
|
129
|
+
"type" text NOT NULL,
|
|
130
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
131
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
132
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
133
|
+
"deleted_at" timestamp with time zone
|
|
134
|
+
);
|
|
135
|
+
--> statement-breakpoint
|
|
136
|
+
CREATE TABLE "push_subscriptions" (
|
|
137
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
138
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
139
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
140
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
141
|
+
"deleted_at" timestamp with time zone
|
|
142
|
+
);
|
|
143
|
+
--> statement-breakpoint
|
|
144
|
+
CREATE TABLE "reports" (
|
|
145
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
146
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
147
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
148
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
149
|
+
"deleted_at" timestamp with time zone
|
|
150
|
+
);
|
|
151
|
+
--> statement-breakpoint
|
|
152
|
+
CREATE TABLE "roles" (
|
|
153
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
154
|
+
"key" text NOT NULL,
|
|
155
|
+
"is_default" boolean DEFAULT false NOT NULL,
|
|
156
|
+
"body" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
157
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
158
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
159
|
+
"deleted_at" timestamp with time zone
|
|
160
|
+
);
|
|
161
|
+
--> statement-breakpoint
|
|
162
|
+
CREATE TABLE "account_to_push_subscription" (
|
|
163
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
164
|
+
"from_id" text NOT NULL,
|
|
165
|
+
"to_id" text NOT NULL,
|
|
166
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
167
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
168
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
169
|
+
);
|
|
170
|
+
--> statement-breakpoint
|
|
171
|
+
CREATE TABLE "audience" (
|
|
172
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
173
|
+
"from_id" text NOT NULL,
|
|
174
|
+
"to_id" text NOT NULL,
|
|
175
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
176
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
177
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
178
|
+
);
|
|
179
|
+
--> statement-breakpoint
|
|
180
|
+
CREATE TABLE "bookmarks" (
|
|
181
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
182
|
+
"from_id" text NOT NULL,
|
|
183
|
+
"to_id" text NOT NULL,
|
|
184
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
185
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
186
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
187
|
+
);
|
|
188
|
+
--> statement-breakpoint
|
|
189
|
+
CREATE TABLE "controls" (
|
|
190
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
191
|
+
"from_id" text NOT NULL,
|
|
192
|
+
"to_id" text NOT NULL,
|
|
193
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
194
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
195
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
196
|
+
);
|
|
197
|
+
--> statement-breakpoint
|
|
198
|
+
CREATE TABLE "created_report" (
|
|
199
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
200
|
+
"from_id" text NOT NULL,
|
|
201
|
+
"to_id" text NOT NULL,
|
|
202
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
203
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
204
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
205
|
+
);
|
|
206
|
+
--> statement-breakpoint
|
|
207
|
+
CREATE TABLE "entries" (
|
|
208
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
209
|
+
"from_id" text NOT NULL,
|
|
210
|
+
"to_id" text NOT NULL,
|
|
211
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
212
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
213
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
214
|
+
);
|
|
215
|
+
--> statement-breakpoint
|
|
216
|
+
CREATE TABLE "follows" (
|
|
217
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
218
|
+
"from_id" text NOT NULL,
|
|
219
|
+
"to_id" text NOT NULL,
|
|
220
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
221
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
222
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
223
|
+
);
|
|
224
|
+
--> statement-breakpoint
|
|
225
|
+
CREATE TABLE "has_read" (
|
|
226
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
227
|
+
"from_id" text NOT NULL,
|
|
228
|
+
"to_id" text NOT NULL,
|
|
229
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
230
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
231
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
232
|
+
);
|
|
233
|
+
--> statement-breakpoint
|
|
234
|
+
CREATE TABLE "has_role" (
|
|
235
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
236
|
+
"from_id" text NOT NULL,
|
|
237
|
+
"to_id" text NOT NULL,
|
|
238
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
239
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
240
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
241
|
+
);
|
|
242
|
+
--> statement-breakpoint
|
|
243
|
+
CREATE TABLE "has_seen" (
|
|
244
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
245
|
+
"from_id" text NOT NULL,
|
|
246
|
+
"to_id" text NOT NULL,
|
|
247
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
248
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
249
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
250
|
+
);
|
|
251
|
+
--> statement-breakpoint
|
|
252
|
+
CREATE TABLE "invite_link_creators" (
|
|
253
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
254
|
+
"from_id" text NOT NULL,
|
|
255
|
+
"to_id" text NOT NULL,
|
|
256
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
257
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
258
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
259
|
+
);
|
|
260
|
+
--> statement-breakpoint
|
|
261
|
+
CREATE TABLE "invite_link_redeemers" (
|
|
262
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
263
|
+
"from_id" text NOT NULL,
|
|
264
|
+
"to_id" text NOT NULL,
|
|
265
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
266
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
267
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
268
|
+
);
|
|
269
|
+
--> statement-breakpoint
|
|
270
|
+
CREATE TABLE "is_reported_object" (
|
|
271
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
272
|
+
"from_id" text NOT NULL,
|
|
273
|
+
"to_id" text NOT NULL,
|
|
274
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
275
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
276
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
277
|
+
);
|
|
278
|
+
--> statement-breakpoint
|
|
279
|
+
CREATE TABLE "is_reported_profile" (
|
|
280
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
281
|
+
"from_id" text NOT NULL,
|
|
282
|
+
"to_id" text NOT NULL,
|
|
283
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
284
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
285
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
286
|
+
);
|
|
287
|
+
--> statement-breakpoint
|
|
288
|
+
CREATE TABLE "jam_recordings" (
|
|
289
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
290
|
+
"from_id" text NOT NULL,
|
|
291
|
+
"to_id" text NOT NULL,
|
|
292
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
293
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
294
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
295
|
+
);
|
|
296
|
+
--> statement-breakpoint
|
|
297
|
+
CREATE TABLE "mentions" (
|
|
298
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
299
|
+
"from_id" text NOT NULL,
|
|
300
|
+
"to_id" text NOT NULL,
|
|
301
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
302
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
303
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
304
|
+
);
|
|
305
|
+
--> statement-breakpoint
|
|
306
|
+
CREATE TABLE "post_groups" (
|
|
307
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
308
|
+
"from_id" text NOT NULL,
|
|
309
|
+
"to_id" text NOT NULL,
|
|
310
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
311
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
312
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
313
|
+
);
|
|
314
|
+
--> statement-breakpoint
|
|
315
|
+
CREATE TABLE "post_hashtags" (
|
|
316
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
317
|
+
"from_id" text NOT NULL,
|
|
318
|
+
"to_id" text NOT NULL,
|
|
319
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
320
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
321
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
322
|
+
);
|
|
323
|
+
--> statement-breakpoint
|
|
324
|
+
CREATE TABLE "post_seen" (
|
|
325
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
326
|
+
"from_id" text NOT NULL,
|
|
327
|
+
"to_id" text NOT NULL,
|
|
328
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
329
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
330
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
331
|
+
);
|
|
332
|
+
--> statement-breakpoint
|
|
333
|
+
CREATE TABLE "profile_access_tokens" (
|
|
334
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
335
|
+
"from_id" text NOT NULL,
|
|
336
|
+
"to_id" text NOT NULL,
|
|
337
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
338
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
339
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
340
|
+
);
|
|
341
|
+
--> statement-breakpoint
|
|
342
|
+
CREATE TABLE "reactions" (
|
|
343
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
344
|
+
"from_id" text NOT NULL,
|
|
345
|
+
"to_id" text NOT NULL,
|
|
346
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
347
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
348
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
349
|
+
);
|
|
350
|
+
--> statement-breakpoint
|
|
351
|
+
CREATE TABLE "reply_to" (
|
|
352
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
353
|
+
"from_id" text NOT NULL,
|
|
354
|
+
"to_id" text NOT NULL,
|
|
355
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
356
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
357
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
358
|
+
);
|
|
359
|
+
--> statement-breakpoint
|
|
360
|
+
CREATE TABLE "repost" (
|
|
361
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
362
|
+
"from_id" text NOT NULL,
|
|
363
|
+
"to_id" text NOT NULL,
|
|
364
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
365
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
366
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
367
|
+
);
|
|
368
|
+
--> statement-breakpoint
|
|
369
|
+
CREATE TABLE "requests_follow" (
|
|
370
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
371
|
+
"from_id" text NOT NULL,
|
|
372
|
+
"to_id" text NOT NULL,
|
|
373
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
374
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
375
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
376
|
+
);
|
|
377
|
+
--> statement-breakpoint
|
|
378
|
+
CREATE TABLE "user_groups" (
|
|
379
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
380
|
+
"from_id" text NOT NULL,
|
|
381
|
+
"to_id" text NOT NULL,
|
|
382
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
383
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
384
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
385
|
+
);
|
|
386
|
+
--> statement-breakpoint
|
|
387
|
+
CREATE UNIQUE INDEX "accounts_email_unique" ON "accounts" USING btree ("email");--> statement-breakpoint
|
|
388
|
+
CREATE UNIQUE INDEX "groups_handle_unique" ON "groups" USING btree ("handle");--> statement-breakpoint
|
|
389
|
+
CREATE UNIQUE INDEX "hashtags_name_unique" ON "hashtags" USING btree ("name");--> statement-breakpoint
|
|
390
|
+
CREATE UNIQUE INDEX "i18n_locale_namespace" ON "i18n" USING btree ("locale","namespace");--> statement-breakpoint
|
|
391
|
+
CREATE UNIQUE INDEX "invite_links_slug_unique" ON "invite_links" USING btree ("slug");--> statement-breakpoint
|
|
392
|
+
CREATE INDEX "jam_events_post_idx" ON "jam_events" USING btree ("post_id");--> statement-breakpoint
|
|
393
|
+
CREATE INDEX "notifications_profile_idx" ON "notifications" USING btree ("profile_id");--> statement-breakpoint
|
|
394
|
+
CREATE INDEX "posts_type_idx" ON "posts" USING btree ("type");--> statement-breakpoint
|
|
395
|
+
CREATE INDEX "posts_visibility_idx" ON "posts" USING btree ("visibility");--> statement-breakpoint
|
|
396
|
+
CREATE INDEX "posts_creator_idx" ON "posts" USING btree ("creator_id");--> statement-breakpoint
|
|
397
|
+
CREATE INDEX "processing_stats_filetype_idx" ON "processing_stats" USING btree ("filetype");--> statement-breakpoint
|
|
398
|
+
CREATE INDEX "processing_stats_filetype_size_idx" ON "processing_stats" USING btree ("filetype","filesize");--> statement-breakpoint
|
|
399
|
+
CREATE UNIQUE INDEX "profile_settings_profile_unique" ON "profile_settings" USING btree ("profile_id");--> statement-breakpoint
|
|
400
|
+
CREATE UNIQUE INDEX "profiles_handle_domain_unique" ON "profiles" USING btree ("handle","activity_pub_domain");--> statement-breakpoint
|
|
401
|
+
CREATE UNIQUE INDEX "roles_key_unique" ON "roles" USING btree ("key");--> statement-breakpoint
|
|
402
|
+
CREATE INDEX "account_to_push_subscription_from_idx" ON "account_to_push_subscription" USING btree ("from_id");--> statement-breakpoint
|
|
403
|
+
CREATE INDEX "account_to_push_subscription_to_idx" ON "account_to_push_subscription" USING btree ("to_id");--> statement-breakpoint
|
|
404
|
+
CREATE INDEX "audience_from_idx" ON "audience" USING btree ("from_id");--> statement-breakpoint
|
|
405
|
+
CREATE INDEX "audience_to_idx" ON "audience" USING btree ("to_id");--> statement-breakpoint
|
|
406
|
+
CREATE INDEX "bookmarks_from_idx" ON "bookmarks" USING btree ("from_id");--> statement-breakpoint
|
|
407
|
+
CREATE INDEX "bookmarks_to_idx" ON "bookmarks" USING btree ("to_id");--> statement-breakpoint
|
|
408
|
+
CREATE INDEX "controls_from_idx" ON "controls" USING btree ("from_id");--> statement-breakpoint
|
|
409
|
+
CREATE INDEX "controls_to_idx" ON "controls" USING btree ("to_id");--> statement-breakpoint
|
|
410
|
+
CREATE INDEX "created_report_from_idx" ON "created_report" USING btree ("from_id");--> statement-breakpoint
|
|
411
|
+
CREATE INDEX "created_report_to_idx" ON "created_report" USING btree ("to_id");--> statement-breakpoint
|
|
412
|
+
CREATE INDEX "entries_from_idx" ON "entries" USING btree ("from_id");--> statement-breakpoint
|
|
413
|
+
CREATE INDEX "entries_to_idx" ON "entries" USING btree ("to_id");--> statement-breakpoint
|
|
414
|
+
CREATE INDEX "follows_from_idx" ON "follows" USING btree ("from_id");--> statement-breakpoint
|
|
415
|
+
CREATE INDEX "follows_to_idx" ON "follows" USING btree ("to_id");--> statement-breakpoint
|
|
416
|
+
CREATE UNIQUE INDEX "follows_from_to_unique" ON "follows" USING btree ("from_id","to_id");--> statement-breakpoint
|
|
417
|
+
CREATE INDEX "has_read_from_idx" ON "has_read" USING btree ("from_id");--> statement-breakpoint
|
|
418
|
+
CREATE INDEX "has_read_to_idx" ON "has_read" USING btree ("to_id");--> statement-breakpoint
|
|
419
|
+
CREATE INDEX "has_role_from_idx" ON "has_role" USING btree ("from_id");--> statement-breakpoint
|
|
420
|
+
CREATE INDEX "has_role_to_idx" ON "has_role" USING btree ("to_id");--> statement-breakpoint
|
|
421
|
+
CREATE INDEX "has_seen_from_idx" ON "has_seen" USING btree ("from_id");--> statement-breakpoint
|
|
422
|
+
CREATE INDEX "has_seen_to_idx" ON "has_seen" USING btree ("to_id");--> statement-breakpoint
|
|
423
|
+
CREATE INDEX "invite_link_creators_from_idx" ON "invite_link_creators" USING btree ("from_id");--> statement-breakpoint
|
|
424
|
+
CREATE INDEX "invite_link_creators_to_idx" ON "invite_link_creators" USING btree ("to_id");--> statement-breakpoint
|
|
425
|
+
CREATE INDEX "invite_link_redeemers_from_idx" ON "invite_link_redeemers" USING btree ("from_id");--> statement-breakpoint
|
|
426
|
+
CREATE INDEX "invite_link_redeemers_to_idx" ON "invite_link_redeemers" USING btree ("to_id");--> statement-breakpoint
|
|
427
|
+
CREATE INDEX "is_reported_object_from_idx" ON "is_reported_object" USING btree ("from_id");--> statement-breakpoint
|
|
428
|
+
CREATE INDEX "is_reported_object_to_idx" ON "is_reported_object" USING btree ("to_id");--> statement-breakpoint
|
|
429
|
+
CREATE INDEX "is_reported_profile_from_idx" ON "is_reported_profile" USING btree ("from_id");--> statement-breakpoint
|
|
430
|
+
CREATE INDEX "is_reported_profile_to_idx" ON "is_reported_profile" USING btree ("to_id");--> statement-breakpoint
|
|
431
|
+
CREATE INDEX "jam_recordings_from_idx" ON "jam_recordings" USING btree ("from_id");--> statement-breakpoint
|
|
432
|
+
CREATE INDEX "jam_recordings_to_idx" ON "jam_recordings" USING btree ("to_id");--> statement-breakpoint
|
|
433
|
+
CREATE INDEX "mentions_from_idx" ON "mentions" USING btree ("from_id");--> statement-breakpoint
|
|
434
|
+
CREATE INDEX "mentions_to_idx" ON "mentions" USING btree ("to_id");--> statement-breakpoint
|
|
435
|
+
CREATE INDEX "post_groups_from_idx" ON "post_groups" USING btree ("from_id");--> statement-breakpoint
|
|
436
|
+
CREATE INDEX "post_groups_to_idx" ON "post_groups" USING btree ("to_id");--> statement-breakpoint
|
|
437
|
+
CREATE INDEX "post_hashtags_from_idx" ON "post_hashtags" USING btree ("from_id");--> statement-breakpoint
|
|
438
|
+
CREATE INDEX "post_hashtags_to_idx" ON "post_hashtags" USING btree ("to_id");--> statement-breakpoint
|
|
439
|
+
CREATE INDEX "post_seen_from_idx" ON "post_seen" USING btree ("from_id");--> statement-breakpoint
|
|
440
|
+
CREATE INDEX "post_seen_to_idx" ON "post_seen" USING btree ("to_id");--> statement-breakpoint
|
|
441
|
+
CREATE INDEX "profile_access_tokens_from_idx" ON "profile_access_tokens" USING btree ("from_id");--> statement-breakpoint
|
|
442
|
+
CREATE INDEX "profile_access_tokens_to_idx" ON "profile_access_tokens" USING btree ("to_id");--> statement-breakpoint
|
|
443
|
+
CREATE UNIQUE INDEX "profile_access_tokens_from_to_unique" ON "profile_access_tokens" USING btree ("from_id","to_id");--> statement-breakpoint
|
|
444
|
+
CREATE INDEX "reactions_from_idx" ON "reactions" USING btree ("from_id");--> statement-breakpoint
|
|
445
|
+
CREATE INDEX "reactions_to_idx" ON "reactions" USING btree ("to_id");--> statement-breakpoint
|
|
446
|
+
CREATE UNIQUE INDEX "reactions_from_to_unique" ON "reactions" USING btree ("from_id","to_id");--> statement-breakpoint
|
|
447
|
+
CREATE INDEX "reply_to_from_idx" ON "reply_to" USING btree ("from_id");--> statement-breakpoint
|
|
448
|
+
CREATE INDEX "reply_to_to_idx" ON "reply_to" USING btree ("to_id");--> statement-breakpoint
|
|
449
|
+
CREATE UNIQUE INDEX "reply_to_from_to_unique" ON "reply_to" USING btree ("from_id","to_id");--> statement-breakpoint
|
|
450
|
+
CREATE INDEX "repost_from_idx" ON "repost" USING btree ("from_id");--> statement-breakpoint
|
|
451
|
+
CREATE INDEX "repost_to_idx" ON "repost" USING btree ("to_id");--> statement-breakpoint
|
|
452
|
+
CREATE UNIQUE INDEX "repost_from_to_unique" ON "repost" USING btree ("from_id","to_id");--> statement-breakpoint
|
|
453
|
+
CREATE INDEX "requests_follow_from_idx" ON "requests_follow" USING btree ("from_id");--> statement-breakpoint
|
|
454
|
+
CREATE INDEX "requests_follow_to_idx" ON "requests_follow" USING btree ("to_id");--> statement-breakpoint
|
|
455
|
+
CREATE INDEX "user_groups_from_idx" ON "user_groups" USING btree ("from_id");--> statement-breakpoint
|
|
456
|
+
CREATE INDEX "user_groups_to_idx" ON "user_groups" USING btree ("to_id");
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
CREATE OR REPLACE FUNCTION openpeeps_profiles_search_vector(
|
|
2
|
+
p_handle text,
|
|
3
|
+
p_body jsonb
|
|
4
|
+
) RETURNS tsvector
|
|
5
|
+
LANGUAGE sql
|
|
6
|
+
STABLE
|
|
7
|
+
AS $$
|
|
8
|
+
SELECT to_tsvector('english', trim(
|
|
9
|
+
coalesce(p_handle, '') || ' ' ||
|
|
10
|
+
coalesce(p_body->>'displayName', '') || ' ' ||
|
|
11
|
+
coalesce(p_body->>'bio', '') || ' ' ||
|
|
12
|
+
coalesce(p_body->'location'->>'text', '') || ' ' ||
|
|
13
|
+
coalesce((
|
|
14
|
+
SELECT string_agg(f->>'value', ' ')
|
|
15
|
+
FROM jsonb_array_elements(
|
|
16
|
+
CASE
|
|
17
|
+
WHEN jsonb_typeof(p_body->'fields') = 'array' THEN p_body->'fields'
|
|
18
|
+
ELSE '[]'::jsonb
|
|
19
|
+
END
|
|
20
|
+
) AS f
|
|
21
|
+
), '')
|
|
22
|
+
));
|
|
23
|
+
$$;--> statement-breakpoint
|
|
24
|
+
CREATE OR REPLACE FUNCTION openpeeps_groups_search_vector(
|
|
25
|
+
p_handle text,
|
|
26
|
+
p_body jsonb
|
|
27
|
+
) RETURNS tsvector
|
|
28
|
+
LANGUAGE sql
|
|
29
|
+
STABLE
|
|
30
|
+
AS $$
|
|
31
|
+
SELECT to_tsvector('english', trim(
|
|
32
|
+
coalesce(p_handle, '') || ' ' ||
|
|
33
|
+
coalesce(p_body->>'displayName', '') || ' ' ||
|
|
34
|
+
coalesce(p_body->>'description', '') || ' ' ||
|
|
35
|
+
coalesce(p_body->>'rules', '')
|
|
36
|
+
));
|
|
37
|
+
$$;--> statement-breakpoint
|
|
38
|
+
CREATE OR REPLACE FUNCTION openpeeps_posts_search_vector(p_body jsonb) RETURNS tsvector
|
|
39
|
+
LANGUAGE sql
|
|
40
|
+
STABLE
|
|
41
|
+
AS $$
|
|
42
|
+
SELECT to_tsvector('english', trim(
|
|
43
|
+
coalesce(p_body->>'content', '') || ' ' ||
|
|
44
|
+
coalesce(p_body->>'name', '') || ' ' ||
|
|
45
|
+
coalesce(p_body->'physicalLocation'->>'text', '') || ' ' ||
|
|
46
|
+
coalesce(p_body->>'url', '') || ' ' ||
|
|
47
|
+
coalesce((
|
|
48
|
+
SELECT string_agg(o->>'content', ' ')
|
|
49
|
+
FROM jsonb_array_elements(
|
|
50
|
+
CASE
|
|
51
|
+
WHEN jsonb_typeof(p_body->'options') = 'array' THEN p_body->'options'
|
|
52
|
+
ELSE '[]'::jsonb
|
|
53
|
+
END
|
|
54
|
+
) AS o
|
|
55
|
+
), '') || ' ' ||
|
|
56
|
+
coalesce((
|
|
57
|
+
SELECT string_agg(
|
|
58
|
+
coalesce(a->>'description', '') || ' ' || coalesce(a->>'filename', ''),
|
|
59
|
+
' '
|
|
60
|
+
)
|
|
61
|
+
FROM jsonb_array_elements(
|
|
62
|
+
CASE
|
|
63
|
+
WHEN jsonb_typeof(p_body->'attachments') = 'array' THEN p_body->'attachments'
|
|
64
|
+
ELSE '[]'::jsonb
|
|
65
|
+
END
|
|
66
|
+
) AS a
|
|
67
|
+
), '')
|
|
68
|
+
));
|
|
69
|
+
$$;--> statement-breakpoint
|
|
70
|
+
ALTER TABLE "profiles" ADD COLUMN "search_vector" "tsvector";--> statement-breakpoint
|
|
71
|
+
ALTER TABLE "groups" ADD COLUMN "search_vector" "tsvector";--> statement-breakpoint
|
|
72
|
+
ALTER TABLE "posts" ADD COLUMN "search_vector" "tsvector";--> statement-breakpoint
|
|
73
|
+
UPDATE "profiles"
|
|
74
|
+
SET "search_vector" = openpeeps_profiles_search_vector("handle", "body");--> statement-breakpoint
|
|
75
|
+
UPDATE "groups"
|
|
76
|
+
SET "search_vector" = openpeeps_groups_search_vector("handle", "body");--> statement-breakpoint
|
|
77
|
+
UPDATE "posts" SET "search_vector" = openpeeps_posts_search_vector("body");--> statement-breakpoint
|
|
78
|
+
CREATE OR REPLACE FUNCTION openpeeps_profiles_search_vector_trigger()
|
|
79
|
+
RETURNS trigger
|
|
80
|
+
LANGUAGE plpgsql
|
|
81
|
+
AS $$
|
|
82
|
+
BEGIN
|
|
83
|
+
NEW.search_vector := openpeeps_profiles_search_vector(NEW.handle, NEW.body);
|
|
84
|
+
RETURN NEW;
|
|
85
|
+
END;
|
|
86
|
+
$$;--> statement-breakpoint
|
|
87
|
+
CREATE OR REPLACE FUNCTION openpeeps_groups_search_vector_trigger()
|
|
88
|
+
RETURNS trigger
|
|
89
|
+
LANGUAGE plpgsql
|
|
90
|
+
AS $$
|
|
91
|
+
BEGIN
|
|
92
|
+
NEW.search_vector := openpeeps_groups_search_vector(NEW.handle, NEW.body);
|
|
93
|
+
RETURN NEW;
|
|
94
|
+
END;
|
|
95
|
+
$$;--> statement-breakpoint
|
|
96
|
+
CREATE OR REPLACE FUNCTION openpeeps_posts_search_vector_trigger()
|
|
97
|
+
RETURNS trigger
|
|
98
|
+
LANGUAGE plpgsql
|
|
99
|
+
AS $$
|
|
100
|
+
BEGIN
|
|
101
|
+
NEW.search_vector := openpeeps_posts_search_vector(NEW.body);
|
|
102
|
+
RETURN NEW;
|
|
103
|
+
END;
|
|
104
|
+
$$;--> statement-breakpoint
|
|
105
|
+
CREATE TRIGGER "profiles_search_vector_update"
|
|
106
|
+
BEFORE INSERT OR UPDATE OF "handle", "body" ON "profiles"
|
|
107
|
+
FOR EACH ROW
|
|
108
|
+
EXECUTE FUNCTION openpeeps_profiles_search_vector_trigger();--> statement-breakpoint
|
|
109
|
+
CREATE TRIGGER "groups_search_vector_update"
|
|
110
|
+
BEFORE INSERT OR UPDATE OF "handle", "body" ON "groups"
|
|
111
|
+
FOR EACH ROW
|
|
112
|
+
EXECUTE FUNCTION openpeeps_groups_search_vector_trigger();--> statement-breakpoint
|
|
113
|
+
CREATE TRIGGER "posts_search_vector_update"
|
|
114
|
+
BEFORE INSERT OR UPDATE OF "body" ON "posts"
|
|
115
|
+
FOR EACH ROW
|
|
116
|
+
EXECUTE FUNCTION openpeeps_posts_search_vector_trigger();--> statement-breakpoint
|
|
117
|
+
ALTER TABLE "profiles" ALTER COLUMN "search_vector" SET NOT NULL;--> statement-breakpoint
|
|
118
|
+
ALTER TABLE "groups" ALTER COLUMN "search_vector" SET NOT NULL;--> statement-breakpoint
|
|
119
|
+
ALTER TABLE "posts" ALTER COLUMN "search_vector" SET NOT NULL;--> statement-breakpoint
|
|
120
|
+
CREATE INDEX "profiles_search_vector_idx" ON "profiles" USING gin ("search_vector");--> statement-breakpoint
|
|
121
|
+
CREATE INDEX "groups_search_vector_idx" ON "groups" USING gin ("search_vector");--> statement-breakpoint
|
|
122
|
+
CREATE INDEX "posts_search_vector_idx" ON "posts" USING gin ("search_vector");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "data_migrations" ALTER COLUMN "id" SET DATA TYPE text;
|