@openpeepshq/core 0.1.33 → 0.1.35
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/accessTokens/finders.js +5 -6
- package/dist/accessTokens/mutations.js +1 -1
- package/dist/accessTokens/tokens.js +8 -11
- package/dist/accounts/helpers.js +6 -2
- package/dist/accounts/mutations.js +36 -33
- package/dist/analytics/cache.js +3 -3
- package/dist/analytics/clicks.js +14 -22
- package/dist/analytics/compile.js +17 -12
- package/dist/analytics/dateRange.js +3 -5
- package/dist/analytics/jobs.js +3 -4
- package/dist/analytics/pdfReport.js +45 -61
- package/dist/analytics/privacy.js +1 -1
- package/dist/analytics/read.js +164 -140
- package/dist/analytics/report.d.ts +22 -1
- package/dist/analytics/report.js +2 -3
- package/dist/analytics/settings.js +3 -4
- package/dist/backups/index.js +82 -25
- package/dist/backups/metadata.d.ts +2 -3
- package/dist/backups/metadata.js +6 -2
- package/dist/config/db.js +2 -4
- package/dist/config/defaults/capabilities.js +13 -2
- package/dist/config/defaults/community.js +8 -3
- package/dist/config/defaults/core.d.ts +1 -1
- package/dist/config/defaults/core.js +16 -8
- package/dist/config/index.d.ts +22 -0
- package/dist/config/index.js +15 -11
- package/dist/db/explorer/query.js +9 -8
- package/dist/db/explorer/sql.js +8 -8
- package/dist/db/helpers.d.ts +1 -0
- package/dist/db/helpers.js +25 -7
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.js +1 -0
- package/dist/db/init.js +2 -3
- package/dist/db/migration/importCollections.d.ts +14 -9
- package/dist/db/migration/importCollections.js +121 -174
- package/dist/db/migration/shared.d.ts +2 -33
- package/dist/db/migration/shared.js +17 -87
- package/dist/db/pg/client.js +4 -7
- package/dist/db/pg/collections.d.ts +2 -2
- package/dist/db/pg/collections.js +2 -2
- package/dist/db/pg/filters/index.js +1 -1
- package/dist/db/pg/filters/posts.d.ts +12 -0
- package/dist/db/pg/filters/posts.js +30 -4
- package/dist/db/pg/filters/profiles.d.ts +1 -0
- package/dist/db/pg/filters/profiles.js +2 -1
- package/dist/db/pg/helpers.js +2 -14
- package/dist/db/pg/map/filters.js +40 -10
- package/dist/db/pg/map/helpers.js +5 -1
- package/dist/db/pg/map/index.js +46 -51
- package/dist/db/pg/map/mutations.js +65 -25
- package/dist/db/pg/map/registry.d.ts +5 -0
- package/dist/db/pg/map/registry.js +133 -56
- package/dist/db/pg/map/relations.js +76 -68
- package/dist/db/pg/map/search.js +15 -37
- package/dist/db/pg/mappers.js +13 -7
- package/dist/db/pg/migrate.d.ts +1 -2
- package/dist/db/pg/migrate.js +8 -9
- package/dist/db/pg/queries/activity.js +5 -5
- package/dist/db/pg/queries/derived.js +8 -12
- package/dist/db/pg/queries/sorts.d.ts +1 -0
- package/dist/db/pg/queries/sorts.js +4 -0
- package/dist/db/pg/schema/documents.d.ts +279 -41
- package/dist/db/pg/schema/documents.js +136 -22
- package/dist/db/pg/schema/edges.d.ts +116 -7
- package/dist/db/pg/schema/edges.js +9 -2
- package/dist/db/pg/schema/index.d.ts +362 -15
- package/dist/db/pg/schema/index.js +5 -1
- package/dist/db/pg/sql/0010_user_group_membership_roles.sql +16 -0
- package/dist/db/pg/sql/0011_drop_data_migrations.sql +1 -0
- package/dist/db/pg/sql/0012_posts_last_activity_at.sql +5 -0
- package/dist/db/pg/sql/0013_add_blocks_edge.sql +12 -0
- package/dist/db/pg/sql/0014_federation_datamodel.sql +59 -0
- package/dist/db/pg/sql/0015_profile_hashtags.sql +12 -0
- package/dist/db/pg/sql/0016_posts_search_vector_title_tags_path.sql +54 -0
- package/dist/db/pg/sql/meta/{0009_snapshot.json → 0015_snapshot.json} +291 -36
- package/dist/db/pg/sql/meta/_journal.json +49 -0
- package/dist/db/replaceOrigin.js +1 -1
- package/dist/email/queueStats.js +8 -11
- package/dist/email/render.js +14 -3
- package/dist/email/send.js +19 -17
- package/dist/email/smtpTest.js +10 -6
- package/dist/errors/index.js +1 -1
- package/dist/events/index.d.ts +4 -0
- package/dist/events/index.js +1 -0
- package/dist/events/once.js +2 -4
- package/dist/federation/activities.d.ts +17 -0
- package/dist/federation/activities.js +25 -0
- package/dist/federation/identity.d.ts +16 -0
- package/dist/federation/identity.js +52 -0
- package/dist/federation/index.d.ts +4 -0
- package/dist/federation/index.js +3 -0
- package/dist/federation/profiles.d.ts +3 -0
- package/dist/federation/profiles.js +14 -0
- package/dist/groups/finders.d.ts +2 -1
- package/dist/groups/helpers.d.ts +18 -0
- package/dist/groups/helpers.js +1 -2
- package/dist/groups/mapping.d.ts +4 -2
- package/dist/groups/mutations.js +1 -1
- package/dist/hashtags/finders.d.ts +6 -3
- package/dist/hashtags/finders.js +2 -0
- package/dist/hashtags/helpers.d.ts +8 -0
- package/dist/hashtags/helpers.js +4 -0
- package/dist/hashtags/index.d.ts +2 -0
- package/dist/hashtags/index.js +2 -0
- package/dist/hashtags/mutations.d.ts +3 -0
- package/dist/hashtags/mutations.js +13 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +3 -1
- package/dist/i18n/pluginLocales.d.ts +6 -0
- package/dist/i18n/pluginLocales.js +15 -0
- package/dist/inviteLinks/mutations.js +2 -3
- package/dist/jams/export.d.ts +19 -0
- package/dist/jams/export.js +58 -0
- package/dist/jams/finders.js +4 -1
- package/dist/jams/health.d.ts +10 -0
- package/dist/jams/health.js +50 -0
- package/dist/jams/helpers.d.ts +2 -2
- package/dist/jams/helpers.js +6 -2
- package/dist/jams/index.d.ts +2 -0
- package/dist/jams/index.js +25 -18
- package/dist/jams/jobs.js +2 -3
- package/dist/jams/livekit.d.ts +49 -4
- package/dist/jams/livekit.js +62 -45
- package/dist/jams/mapping.d.ts +3 -3
- package/dist/jams/mutations.d.ts +1 -1
- package/dist/jams/recording.d.ts +10 -0
- package/dist/jams/recording.js +33 -1
- package/dist/jams/token.d.ts +13 -1
- package/dist/jams/token.js +25 -18
- package/dist/jams/waitingRoom.js +1 -1
- package/dist/jobs/index.d.ts +1 -0
- package/dist/jobs/index.js +9 -3
- package/dist/jobs/jobDetail.js +6 -12
- package/dist/jobs/jobLog.js +2 -3
- package/dist/lib/streams.js +4 -39
- package/dist/lib/zodDeepPartial.d.ts +1 -1
- package/dist/lib/zodDeepPartial.js +1 -1
- package/dist/log/index.js +13 -29
- package/dist/media/index.d.ts +1 -1
- package/dist/media/index.js +73 -12
- package/dist/media/jobs.js +1 -2
- package/dist/media/openpeeps/index.js +11 -46
- package/dist/media/processing.js +25 -11
- package/dist/media/streaming.js +5 -5
- package/dist/media/streamingCleanupJobs.js +1 -2
- package/dist/media/streamingJobs.js +3 -4
- package/dist/media/streamingPrewarm.js +7 -11
- package/dist/mediaAttachments/index.js +6 -2
- package/dist/notifications/defaultNotifications/announcement/index.js +15 -18
- package/dist/notifications/defaultNotifications/directMessage/index.js +9 -8
- package/dist/notifications/defaultNotifications/follow/index.js +15 -18
- package/dist/notifications/defaultNotifications/groupAdded/index.js +14 -17
- package/dist/notifications/defaultNotifications/groupMemberJoined/index.js +15 -18
- package/dist/notifications/defaultNotifications/groupMemberLeft/index.js +15 -18
- package/dist/notifications/defaultNotifications/index.js +4 -0
- package/dist/notifications/defaultNotifications/jamModerator/index.js +3 -5
- package/dist/notifications/defaultNotifications/jamSpeaker/index.js +14 -18
- package/dist/notifications/defaultNotifications/jamStarted/index.js +18 -22
- package/dist/notifications/defaultNotifications/mention/index.js +20 -24
- package/dist/notifications/defaultNotifications/newGroupPost/index.js +11 -6
- package/dist/notifications/defaultNotifications/newProfile/index.js +14 -17
- package/dist/notifications/defaultNotifications/pollEnded/index.d.ts +19 -0
- package/dist/notifications/defaultNotifications/pollEnded/index.js +39 -0
- package/dist/notifications/defaultNotifications/pollEnded/recipients.d.ts +3 -0
- package/dist/notifications/defaultNotifications/pollEnded/recipients.js +17 -0
- package/dist/notifications/defaultNotifications/pollVote/index.js +14 -17
- package/dist/notifications/defaultNotifications/reaction/index.js +18 -21
- package/dist/notifications/defaultNotifications/reply/index.js +21 -22
- package/dist/notifications/defaultNotifications/repost/index.js +16 -20
- package/dist/notifications/defaultNotifications/rsvp/index.d.ts +6 -1
- package/dist/notifications/defaultNotifications/rsvp/index.js +31 -18
- package/dist/notifications/defaultNotifications/rsvpCanceled/index.d.ts +24 -0
- package/dist/notifications/defaultNotifications/rsvpCanceled/index.js +82 -0
- package/dist/notifications/defaultNotifications/rsvpCanceled/recipients.d.ts +4 -0
- package/dist/notifications/defaultNotifications/rsvpCanceled/recipients.js +11 -0
- package/dist/notifications/fcmCredential.js +1 -1
- package/dist/notifications/finders.js +1 -1
- package/dist/notifications/helpers.js +13 -10
- package/dist/notifications/jobs.js +10 -5
- package/dist/notifications/mutations.js +8 -1
- package/dist/notifications/push.js +11 -16
- package/dist/performance/index.js +3 -3
- package/dist/plugins/helpers.js +3 -6
- package/dist/plugins/index.js +39 -4
- package/dist/plugins/install.d.ts +28 -9
- package/dist/plugins/install.js +302 -56
- package/dist/plugins/pluginAuth.d.ts +1 -1
- package/dist/plugins/pluginAuth.js +13 -10
- package/dist/plugins/state.js +2 -3
- package/dist/posts/activity.d.ts +9 -0
- package/dist/posts/activity.js +34 -0
- package/dist/posts/contextClosure.d.ts +1 -9
- package/dist/posts/contextClosure.js +14 -44
- package/dist/posts/conversationQueries.d.ts +7 -0
- package/dist/posts/conversationQueries.js +76 -4
- package/dist/posts/eventAgenda.d.ts +1 -0
- package/dist/posts/eventAgenda.js +17 -8
- package/dist/posts/eventOccurrenceJobs.js +7 -2
- package/dist/posts/eventOccurrences.d.ts +6 -0
- package/dist/posts/eventOccurrences.js +22 -1
- package/dist/posts/finders.d.ts +56 -9
- package/dist/posts/finders.js +84 -23
- package/dist/posts/helpers/filters.js +13 -9
- package/dist/posts/helpers/index.d.ts +179 -14
- package/dist/posts/helpers/index.js +70 -34
- package/dist/posts/index.d.ts +5 -2
- package/dist/posts/index.js +5 -2
- package/dist/posts/mapping.d.ts +765 -30
- package/dist/posts/mapping.js +74 -31
- package/dist/posts/mutations.d.ts +516 -3
- package/dist/posts/mutations.js +179 -41
- package/dist/posts/pollEnd.d.ts +3 -0
- package/dist/posts/pollEnd.js +4 -0
- package/dist/posts/pollEndJobs.d.ts +8 -0
- package/dist/posts/pollEndJobs.js +49 -0
- package/dist/posts/replyClosure.d.ts +10 -0
- package/dist/posts/replyClosure.js +43 -0
- package/dist/posts/rsvpConfirmationEmail.js +23 -15
- package/dist/posts/threadPreview.d.ts +8 -0
- package/dist/posts/threadPreview.js +44 -0
- package/dist/posts/unseenCounts.js +4 -1
- package/dist/processingStats/queries.js +6 -7
- package/dist/profileSettings/cache.js +21 -5
- package/dist/profileSettings/mapping.d.ts +2 -0
- package/dist/profiles/activityQueries.d.ts +5 -0
- package/dist/profiles/activityQueries.js +85 -0
- package/dist/profiles/activitySummary.d.ts +3 -0
- package/dist/profiles/activitySummary.js +82 -0
- package/dist/profiles/blocks.d.ts +12 -0
- package/dist/profiles/blocks.js +73 -0
- package/dist/profiles/cache.d.ts +1 -0
- package/dist/profiles/cache.js +30 -10
- package/dist/profiles/export.js +30 -39
- package/dist/profiles/finders.d.ts +2 -1
- package/dist/profiles/finders.js +15 -8
- package/dist/profiles/helpers.d.ts +2 -0
- package/dist/profiles/index.d.ts +2 -0
- package/dist/profiles/index.js +2 -0
- package/dist/profiles/mapping.d.ts +10 -5
- package/dist/profiles/mapping.js +13 -1
- package/dist/profiles/mutations.d.ts +8 -4
- package/dist/profiles/mutations.js +31 -4
- package/dist/redis/connection.d.ts +2 -0
- package/dist/redis/connection.js +25 -6
- package/dist/reports/helpers.js +7 -3
- package/dist/roles/index.d.ts +1 -1
- package/dist/roles/index.js +1 -1
- package/dist/roles/mapping.d.ts +1 -0
- package/dist/roles/mutations.js +85 -3
- package/dist/search/finders.js +15 -3
- package/dist/search/helpers.js +1 -1
- package/dist/search/mapping.d.ts +1 -1
- package/dist/search/mapping.js +6 -2
- package/dist/sentry/index.js +9 -11
- package/dist/seo/index.d.ts +50 -0
- package/dist/seo/index.js +145 -0
- package/dist/seo/route.d.ts +18 -0
- package/dist/seo/route.js +19 -0
- package/dist/server/index.d.ts +19 -0
- package/dist/server/index.js +31 -14
- package/dist/server/stablePublicServerInfo.d.ts +17 -0
- package/dist/server/stablePublicServerInfo.js +37 -0
- package/dist/server/status.d.ts +25 -0
- package/dist/server/status.js +97 -0
- package/dist/session/index.js +2 -2
- package/dist/stats/finders.d.ts +1 -17681
- package/dist/stats/finders.js +22 -9
- package/dist/stats/helpers.js +4 -1
- package/dist/stats/mapping.d.ts +39 -2
- package/dist/stats/mapping.js +8 -4
- package/dist/stripe/cache.js +5 -6
- package/dist/stripe/connection.js +3 -4
- package/dist/stripe/helpers.js +15 -20
- package/package.json +5 -7
- package/dist/db/migration/detect.d.ts +0 -3
- package/dist/db/migration/detect.js +0 -33
- package/dist/db/migration/importPostgres.d.ts +0 -3
- package/dist/db/migration/importPostgres.js +0 -18
- package/dist/db/migration/transform.d.ts +0 -20
- package/dist/db/migration/transform.js +0 -232
- package/dist/db/migration/validate.d.ts +0 -18
- package/dist/db/migration/validate.js +0 -69
- package/dist/db/pg/sql/meta/0000_snapshot.json +0 -3380
- package/dist/db/pg/sql/meta/0004_snapshot.json +0 -4114
- package/dist/db/pg/sql/meta/0005_snapshot.json +0 -4179
- package/dist/db/pg/sql/meta/0006_snapshot.json +0 -4200
- package/dist/db/pg/sql/meta/0007_snapshot.json +0 -4179
- package/dist/mastodon/index.d.ts +0 -4
- package/dist/mastodon/index.js +0 -51
- package/dist/mastodon/types.d.ts +0 -7579
- package/dist/mastodon/types.js +0 -523
- package/dist/mastodon/typescript.d.ts +0 -1578
- package/dist/mastodon/typescript.js +0 -1
- package/dist/migration/index.d.ts +0 -4
- package/dist/migration/index.js +0 -4
- package/dist/roles/defaults.d.ts +0 -2
- package/dist/roles/defaults.js +0 -95
|
@@ -12,16 +12,14 @@ const maxIso = (values) => {
|
|
|
12
12
|
};
|
|
13
13
|
export const profileDerived = {
|
|
14
14
|
postsCount: async (db, doc) => {
|
|
15
|
-
var _a, _b;
|
|
16
15
|
const postsTable = asTable(posts);
|
|
17
16
|
const rows = await db
|
|
18
17
|
.select({ count: sql `count(*)::int` })
|
|
19
18
|
.from(posts)
|
|
20
19
|
.where(and(eq(postsTable.creatorId, doc.id), sql `${postsTable.deletedAt} IS NULL`));
|
|
21
|
-
return
|
|
20
|
+
return rows[0]?.count ?? 0;
|
|
22
21
|
},
|
|
23
22
|
lastSeen: async (db, doc) => {
|
|
24
|
-
var _a, _b;
|
|
25
23
|
const profileId = doc.id;
|
|
26
24
|
const entriesTable = asTable(entries);
|
|
27
25
|
const postSeenTable = asTable(postSeen);
|
|
@@ -36,8 +34,8 @@ export const profileDerived = {
|
|
|
36
34
|
.where(eq(postSeenTable.fromId, profileId)),
|
|
37
35
|
]);
|
|
38
36
|
return maxIso([
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
entryRows[0]?.max,
|
|
38
|
+
seenRows[0]?.max,
|
|
41
39
|
]);
|
|
42
40
|
},
|
|
43
41
|
profileStats: (_db, doc) => ({
|
|
@@ -46,7 +44,6 @@ export const profileDerived = {
|
|
|
46
44
|
}),
|
|
47
45
|
/** Counts without loading follower/following trees. */
|
|
48
46
|
profileStatsCounts: async (db, doc) => {
|
|
49
|
-
var _a, _b, _c, _d;
|
|
50
47
|
const edgeTableRef = getEdgeTable('follows');
|
|
51
48
|
const edgeTable = asTable(edgeTableRef);
|
|
52
49
|
const profileId = doc.id;
|
|
@@ -61,8 +58,8 @@ export const profileDerived = {
|
|
|
61
58
|
.where(eq(edgeTable.fromId, profileId)),
|
|
62
59
|
]);
|
|
63
60
|
return {
|
|
64
|
-
followersCount:
|
|
65
|
-
followingCount:
|
|
61
|
+
followersCount: followersRows[0]?.count ?? 0,
|
|
62
|
+
followingCount: followingRows[0]?.count ?? 0,
|
|
66
63
|
};
|
|
67
64
|
},
|
|
68
65
|
};
|
|
@@ -103,19 +100,18 @@ export const postDerived = {
|
|
|
103
100
|
return values;
|
|
104
101
|
},
|
|
105
102
|
}),
|
|
106
|
-
inReplyToId: (_db, doc) =>
|
|
107
|
-
groupId: (_db, doc) =>
|
|
103
|
+
inReplyToId: (_db, doc) => doc.replyTo?.id,
|
|
104
|
+
groupId: (_db, doc) => doc.group?.id,
|
|
108
105
|
};
|
|
109
106
|
export const groupDerived = {
|
|
110
107
|
lastPostAt: async (db, doc) => {
|
|
111
|
-
var _a;
|
|
112
108
|
const edgeTableRef = getEdgeTable('postGroups');
|
|
113
109
|
const edgeTable = asTable(edgeTableRef);
|
|
114
110
|
const rows = await db
|
|
115
111
|
.select({ max: sql `max(${edgeTable.createdAt})` })
|
|
116
112
|
.from(edgeTableRef)
|
|
117
113
|
.where(eq(edgeTable.toId, doc.id));
|
|
118
|
-
const value =
|
|
114
|
+
const value = rows[0]?.max;
|
|
119
115
|
return value ? normalizeIsoDatetime(value) : null;
|
|
120
116
|
},
|
|
121
117
|
};
|
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
export declare const dataMigrations: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
2
|
-
name: "data_migrations";
|
|
3
|
-
schema: undefined;
|
|
4
|
-
columns: {
|
|
5
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
6
|
-
name: "id";
|
|
7
|
-
tableName: "data_migrations";
|
|
8
|
-
dataType: "string";
|
|
9
|
-
columnType: "PgText";
|
|
10
|
-
data: string;
|
|
11
|
-
driverParam: string;
|
|
12
|
-
notNull: true;
|
|
13
|
-
hasDefault: false;
|
|
14
|
-
isPrimaryKey: true;
|
|
15
|
-
isAutoincrement: false;
|
|
16
|
-
hasRuntimeDefault: false;
|
|
17
|
-
enumValues: [string, ...string[]];
|
|
18
|
-
baseColumn: never;
|
|
19
|
-
identity: undefined;
|
|
20
|
-
generated: undefined;
|
|
21
|
-
}, {}, {}>;
|
|
22
|
-
appliedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
23
|
-
name: "applied_at";
|
|
24
|
-
tableName: "data_migrations";
|
|
25
|
-
dataType: "string";
|
|
26
|
-
columnType: "PgTimestampString";
|
|
27
|
-
data: string;
|
|
28
|
-
driverParam: string;
|
|
29
|
-
notNull: true;
|
|
30
|
-
hasDefault: true;
|
|
31
|
-
isPrimaryKey: false;
|
|
32
|
-
isAutoincrement: false;
|
|
33
|
-
hasRuntimeDefault: false;
|
|
34
|
-
enumValues: undefined;
|
|
35
|
-
baseColumn: never;
|
|
36
|
-
identity: undefined;
|
|
37
|
-
generated: undefined;
|
|
38
|
-
}, {}, {}>;
|
|
39
|
-
};
|
|
40
|
-
dialect: "pg";
|
|
41
|
-
}>;
|
|
42
1
|
export declare const configs: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
43
2
|
name: "configs";
|
|
44
3
|
schema: undefined;
|
|
@@ -523,6 +482,125 @@ export declare const profiles: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
523
482
|
identity: undefined;
|
|
524
483
|
generated: undefined;
|
|
525
484
|
}, {}, {}>;
|
|
485
|
+
uri: import("drizzle-orm/pg-core").PgColumn<{
|
|
486
|
+
name: "uri";
|
|
487
|
+
tableName: "profiles";
|
|
488
|
+
dataType: "string";
|
|
489
|
+
columnType: "PgText";
|
|
490
|
+
data: string;
|
|
491
|
+
driverParam: string;
|
|
492
|
+
notNull: false;
|
|
493
|
+
hasDefault: false;
|
|
494
|
+
isPrimaryKey: false;
|
|
495
|
+
isAutoincrement: false;
|
|
496
|
+
hasRuntimeDefault: false;
|
|
497
|
+
enumValues: [string, ...string[]];
|
|
498
|
+
baseColumn: never;
|
|
499
|
+
identity: undefined;
|
|
500
|
+
generated: undefined;
|
|
501
|
+
}, {}, {}>;
|
|
502
|
+
inboxUrl: import("drizzle-orm/pg-core").PgColumn<{
|
|
503
|
+
name: "inbox_url";
|
|
504
|
+
tableName: "profiles";
|
|
505
|
+
dataType: "string";
|
|
506
|
+
columnType: "PgText";
|
|
507
|
+
data: string;
|
|
508
|
+
driverParam: string;
|
|
509
|
+
notNull: false;
|
|
510
|
+
hasDefault: false;
|
|
511
|
+
isPrimaryKey: false;
|
|
512
|
+
isAutoincrement: false;
|
|
513
|
+
hasRuntimeDefault: false;
|
|
514
|
+
enumValues: [string, ...string[]];
|
|
515
|
+
baseColumn: never;
|
|
516
|
+
identity: undefined;
|
|
517
|
+
generated: undefined;
|
|
518
|
+
}, {}, {}>;
|
|
519
|
+
sharedInboxUrl: import("drizzle-orm/pg-core").PgColumn<{
|
|
520
|
+
name: "shared_inbox_url";
|
|
521
|
+
tableName: "profiles";
|
|
522
|
+
dataType: "string";
|
|
523
|
+
columnType: "PgText";
|
|
524
|
+
data: string;
|
|
525
|
+
driverParam: string;
|
|
526
|
+
notNull: false;
|
|
527
|
+
hasDefault: false;
|
|
528
|
+
isPrimaryKey: false;
|
|
529
|
+
isAutoincrement: false;
|
|
530
|
+
hasRuntimeDefault: false;
|
|
531
|
+
enumValues: [string, ...string[]];
|
|
532
|
+
baseColumn: never;
|
|
533
|
+
identity: undefined;
|
|
534
|
+
generated: undefined;
|
|
535
|
+
}, {}, {}>;
|
|
536
|
+
publicKeyPem: import("drizzle-orm/pg-core").PgColumn<{
|
|
537
|
+
name: "public_key_pem";
|
|
538
|
+
tableName: "profiles";
|
|
539
|
+
dataType: "string";
|
|
540
|
+
columnType: "PgText";
|
|
541
|
+
data: string;
|
|
542
|
+
driverParam: string;
|
|
543
|
+
notNull: false;
|
|
544
|
+
hasDefault: false;
|
|
545
|
+
isPrimaryKey: false;
|
|
546
|
+
isAutoincrement: false;
|
|
547
|
+
hasRuntimeDefault: false;
|
|
548
|
+
enumValues: [string, ...string[]];
|
|
549
|
+
baseColumn: never;
|
|
550
|
+
identity: undefined;
|
|
551
|
+
generated: undefined;
|
|
552
|
+
}, {}, {}>;
|
|
553
|
+
privateKeyPem: import("drizzle-orm/pg-core").PgColumn<{
|
|
554
|
+
name: "private_key_pem";
|
|
555
|
+
tableName: "profiles";
|
|
556
|
+
dataType: "string";
|
|
557
|
+
columnType: "PgText";
|
|
558
|
+
data: string;
|
|
559
|
+
driverParam: string;
|
|
560
|
+
notNull: false;
|
|
561
|
+
hasDefault: false;
|
|
562
|
+
isPrimaryKey: false;
|
|
563
|
+
isAutoincrement: false;
|
|
564
|
+
hasRuntimeDefault: false;
|
|
565
|
+
enumValues: [string, ...string[]];
|
|
566
|
+
baseColumn: never;
|
|
567
|
+
identity: undefined;
|
|
568
|
+
generated: undefined;
|
|
569
|
+
}, {}, {}>;
|
|
570
|
+
keyId: import("drizzle-orm/pg-core").PgColumn<{
|
|
571
|
+
name: "key_id";
|
|
572
|
+
tableName: "profiles";
|
|
573
|
+
dataType: "string";
|
|
574
|
+
columnType: "PgText";
|
|
575
|
+
data: string;
|
|
576
|
+
driverParam: string;
|
|
577
|
+
notNull: false;
|
|
578
|
+
hasDefault: false;
|
|
579
|
+
isPrimaryKey: false;
|
|
580
|
+
isAutoincrement: false;
|
|
581
|
+
hasRuntimeDefault: false;
|
|
582
|
+
enumValues: [string, ...string[]];
|
|
583
|
+
baseColumn: never;
|
|
584
|
+
identity: undefined;
|
|
585
|
+
generated: undefined;
|
|
586
|
+
}, {}, {}>;
|
|
587
|
+
fetchedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
588
|
+
name: "fetched_at";
|
|
589
|
+
tableName: "profiles";
|
|
590
|
+
dataType: "string";
|
|
591
|
+
columnType: "PgTimestampString";
|
|
592
|
+
data: string;
|
|
593
|
+
driverParam: string;
|
|
594
|
+
notNull: false;
|
|
595
|
+
hasDefault: false;
|
|
596
|
+
isPrimaryKey: false;
|
|
597
|
+
isAutoincrement: false;
|
|
598
|
+
hasRuntimeDefault: false;
|
|
599
|
+
enumValues: undefined;
|
|
600
|
+
baseColumn: never;
|
|
601
|
+
identity: undefined;
|
|
602
|
+
generated: undefined;
|
|
603
|
+
}, {}, {}>;
|
|
526
604
|
body: import("drizzle-orm/pg-core").PgColumn<{
|
|
527
605
|
name: "body";
|
|
528
606
|
tableName: "profiles";
|
|
@@ -1031,6 +1109,40 @@ export declare const posts: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1031
1109
|
identity: undefined;
|
|
1032
1110
|
generated: undefined;
|
|
1033
1111
|
}, {}, {}>;
|
|
1112
|
+
uri: import("drizzle-orm/pg-core").PgColumn<{
|
|
1113
|
+
name: "uri";
|
|
1114
|
+
tableName: "posts";
|
|
1115
|
+
dataType: "string";
|
|
1116
|
+
columnType: "PgText";
|
|
1117
|
+
data: string;
|
|
1118
|
+
driverParam: string;
|
|
1119
|
+
notNull: false;
|
|
1120
|
+
hasDefault: false;
|
|
1121
|
+
isPrimaryKey: false;
|
|
1122
|
+
isAutoincrement: false;
|
|
1123
|
+
hasRuntimeDefault: false;
|
|
1124
|
+
enumValues: [string, ...string[]];
|
|
1125
|
+
baseColumn: never;
|
|
1126
|
+
identity: undefined;
|
|
1127
|
+
generated: undefined;
|
|
1128
|
+
}, {}, {}>;
|
|
1129
|
+
inReplyToUri: import("drizzle-orm/pg-core").PgColumn<{
|
|
1130
|
+
name: "in_reply_to_uri";
|
|
1131
|
+
tableName: "posts";
|
|
1132
|
+
dataType: "string";
|
|
1133
|
+
columnType: "PgText";
|
|
1134
|
+
data: string;
|
|
1135
|
+
driverParam: string;
|
|
1136
|
+
notNull: false;
|
|
1137
|
+
hasDefault: false;
|
|
1138
|
+
isPrimaryKey: false;
|
|
1139
|
+
isAutoincrement: false;
|
|
1140
|
+
hasRuntimeDefault: false;
|
|
1141
|
+
enumValues: [string, ...string[]];
|
|
1142
|
+
baseColumn: never;
|
|
1143
|
+
identity: undefined;
|
|
1144
|
+
generated: undefined;
|
|
1145
|
+
}, {}, {}>;
|
|
1034
1146
|
body: import("drizzle-orm/pg-core").PgColumn<{
|
|
1035
1147
|
name: "body";
|
|
1036
1148
|
tableName: "posts";
|
|
@@ -1067,6 +1179,23 @@ export declare const posts: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1067
1179
|
}, {}, {
|
|
1068
1180
|
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
1069
1181
|
}>;
|
|
1182
|
+
lastActivityAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
1183
|
+
name: "last_activity_at";
|
|
1184
|
+
tableName: "posts";
|
|
1185
|
+
dataType: "string";
|
|
1186
|
+
columnType: "PgTimestampString";
|
|
1187
|
+
data: string;
|
|
1188
|
+
driverParam: string;
|
|
1189
|
+
notNull: true;
|
|
1190
|
+
hasDefault: true;
|
|
1191
|
+
isPrimaryKey: false;
|
|
1192
|
+
isAutoincrement: false;
|
|
1193
|
+
hasRuntimeDefault: false;
|
|
1194
|
+
enumValues: undefined;
|
|
1195
|
+
baseColumn: never;
|
|
1196
|
+
identity: undefined;
|
|
1197
|
+
generated: undefined;
|
|
1198
|
+
}, {}, {}>;
|
|
1070
1199
|
};
|
|
1071
1200
|
dialect: "pg";
|
|
1072
1201
|
}>;
|
|
@@ -2143,3 +2272,112 @@ export declare const eventOccurrences: import("drizzle-orm/pg-core").PgTableWith
|
|
|
2143
2272
|
};
|
|
2144
2273
|
dialect: "pg";
|
|
2145
2274
|
}>;
|
|
2275
|
+
export declare const apActivities: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
2276
|
+
name: "ap_activities";
|
|
2277
|
+
schema: undefined;
|
|
2278
|
+
columns: {
|
|
2279
|
+
uri: import("drizzle-orm/pg-core").PgColumn<{
|
|
2280
|
+
name: "uri";
|
|
2281
|
+
tableName: "ap_activities";
|
|
2282
|
+
dataType: "string";
|
|
2283
|
+
columnType: "PgText";
|
|
2284
|
+
data: string;
|
|
2285
|
+
driverParam: string;
|
|
2286
|
+
notNull: true;
|
|
2287
|
+
hasDefault: false;
|
|
2288
|
+
isPrimaryKey: true;
|
|
2289
|
+
isAutoincrement: false;
|
|
2290
|
+
hasRuntimeDefault: false;
|
|
2291
|
+
enumValues: [string, ...string[]];
|
|
2292
|
+
baseColumn: never;
|
|
2293
|
+
identity: undefined;
|
|
2294
|
+
generated: undefined;
|
|
2295
|
+
}, {}, {}>;
|
|
2296
|
+
type: import("drizzle-orm/pg-core").PgColumn<{
|
|
2297
|
+
name: "type";
|
|
2298
|
+
tableName: "ap_activities";
|
|
2299
|
+
dataType: "string";
|
|
2300
|
+
columnType: "PgText";
|
|
2301
|
+
data: string;
|
|
2302
|
+
driverParam: string;
|
|
2303
|
+
notNull: true;
|
|
2304
|
+
hasDefault: false;
|
|
2305
|
+
isPrimaryKey: false;
|
|
2306
|
+
isAutoincrement: false;
|
|
2307
|
+
hasRuntimeDefault: false;
|
|
2308
|
+
enumValues: [string, ...string[]];
|
|
2309
|
+
baseColumn: never;
|
|
2310
|
+
identity: undefined;
|
|
2311
|
+
generated: undefined;
|
|
2312
|
+
}, {}, {}>;
|
|
2313
|
+
actorUri: import("drizzle-orm/pg-core").PgColumn<{
|
|
2314
|
+
name: "actor_uri";
|
|
2315
|
+
tableName: "ap_activities";
|
|
2316
|
+
dataType: "string";
|
|
2317
|
+
columnType: "PgText";
|
|
2318
|
+
data: string;
|
|
2319
|
+
driverParam: string;
|
|
2320
|
+
notNull: true;
|
|
2321
|
+
hasDefault: false;
|
|
2322
|
+
isPrimaryKey: false;
|
|
2323
|
+
isAutoincrement: false;
|
|
2324
|
+
hasRuntimeDefault: false;
|
|
2325
|
+
enumValues: [string, ...string[]];
|
|
2326
|
+
baseColumn: never;
|
|
2327
|
+
identity: undefined;
|
|
2328
|
+
generated: undefined;
|
|
2329
|
+
}, {}, {}>;
|
|
2330
|
+
objectUri: import("drizzle-orm/pg-core").PgColumn<{
|
|
2331
|
+
name: "object_uri";
|
|
2332
|
+
tableName: "ap_activities";
|
|
2333
|
+
dataType: "string";
|
|
2334
|
+
columnType: "PgText";
|
|
2335
|
+
data: string;
|
|
2336
|
+
driverParam: string;
|
|
2337
|
+
notNull: false;
|
|
2338
|
+
hasDefault: false;
|
|
2339
|
+
isPrimaryKey: false;
|
|
2340
|
+
isAutoincrement: false;
|
|
2341
|
+
hasRuntimeDefault: false;
|
|
2342
|
+
enumValues: [string, ...string[]];
|
|
2343
|
+
baseColumn: never;
|
|
2344
|
+
identity: undefined;
|
|
2345
|
+
generated: undefined;
|
|
2346
|
+
}, {}, {}>;
|
|
2347
|
+
direction: import("drizzle-orm/pg-core").PgColumn<{
|
|
2348
|
+
name: "direction";
|
|
2349
|
+
tableName: "ap_activities";
|
|
2350
|
+
dataType: "string";
|
|
2351
|
+
columnType: "PgText";
|
|
2352
|
+
data: string;
|
|
2353
|
+
driverParam: string;
|
|
2354
|
+
notNull: true;
|
|
2355
|
+
hasDefault: false;
|
|
2356
|
+
isPrimaryKey: false;
|
|
2357
|
+
isAutoincrement: false;
|
|
2358
|
+
hasRuntimeDefault: false;
|
|
2359
|
+
enumValues: [string, ...string[]];
|
|
2360
|
+
baseColumn: never;
|
|
2361
|
+
identity: undefined;
|
|
2362
|
+
generated: undefined;
|
|
2363
|
+
}, {}, {}>;
|
|
2364
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
2365
|
+
name: "created_at";
|
|
2366
|
+
tableName: "ap_activities";
|
|
2367
|
+
dataType: "string";
|
|
2368
|
+
columnType: "PgTimestampString";
|
|
2369
|
+
data: string;
|
|
2370
|
+
driverParam: string;
|
|
2371
|
+
notNull: true;
|
|
2372
|
+
hasDefault: true;
|
|
2373
|
+
isPrimaryKey: false;
|
|
2374
|
+
isAutoincrement: false;
|
|
2375
|
+
hasRuntimeDefault: false;
|
|
2376
|
+
enumValues: undefined;
|
|
2377
|
+
baseColumn: never;
|
|
2378
|
+
identity: undefined;
|
|
2379
|
+
generated: undefined;
|
|
2380
|
+
}, {}, {}>;
|
|
2381
|
+
};
|
|
2382
|
+
dialect: "pg";
|
|
2383
|
+
}>;
|
|
@@ -1,43 +1,147 @@
|
|
|
1
1
|
import { boolean, index, jsonb, pgTable, text, timestamp, uniqueIndex, uuid, } from 'drizzle-orm/pg-core';
|
|
2
2
|
import { sql } from 'drizzle-orm';
|
|
3
3
|
import { idColumn, modelTimestamps, tsvector } from './base.js';
|
|
4
|
-
export const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
.default(sql `now()`),
|
|
4
|
+
export const configs = pgTable('configs', {
|
|
5
|
+
key: text('key').primaryKey(),
|
|
6
|
+
body: jsonb('body').notNull(),
|
|
7
|
+
...modelTimestamps,
|
|
9
8
|
});
|
|
10
|
-
export const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
export const i18nEntries = pgTable('i18n', {
|
|
10
|
+
id: idColumn(),
|
|
11
|
+
locale: text('locale').notNull(),
|
|
12
|
+
namespace: text('namespace').notNull(),
|
|
13
|
+
body: jsonb('body').notNull(),
|
|
14
|
+
...modelTimestamps,
|
|
15
|
+
}, (t) => [uniqueIndex('i18n_locale_namespace').on(t.locale, t.namespace)]);
|
|
16
|
+
export const accounts = pgTable('accounts', {
|
|
17
|
+
id: idColumn(),
|
|
18
|
+
email: text('email').notNull(),
|
|
19
|
+
passwordHash: text('password_hash').notNull(),
|
|
20
|
+
emailValidated: boolean('email_validated').notNull().default(false),
|
|
21
|
+
guest: boolean('guest'),
|
|
22
|
+
...modelTimestamps,
|
|
23
|
+
}, (t) => [uniqueIndex('accounts_email_unique').on(t.email)]);
|
|
24
|
+
export const profiles = pgTable('profiles', {
|
|
25
|
+
id: idColumn(),
|
|
26
|
+
handle: text('handle').notNull(),
|
|
27
|
+
activityPubDomain: text('activity_pub_domain'),
|
|
28
|
+
type: text('type').notNull(),
|
|
29
|
+
uri: text('uri'),
|
|
30
|
+
inboxUrl: text('inbox_url'),
|
|
31
|
+
sharedInboxUrl: text('shared_inbox_url'),
|
|
32
|
+
publicKeyPem: text('public_key_pem'),
|
|
33
|
+
privateKeyPem: text('private_key_pem'),
|
|
34
|
+
keyId: text('key_id'),
|
|
35
|
+
fetchedAt: timestamp('fetched_at', { withTimezone: true, mode: 'string' }),
|
|
36
|
+
body: jsonb('body').notNull().default({}),
|
|
37
|
+
searchVector: tsvector('search_vector'),
|
|
38
|
+
...modelTimestamps,
|
|
39
|
+
}, (t) => [
|
|
14
40
|
uniqueIndex('profiles_handle_domain_unique').on(t.handle, t.activityPubDomain),
|
|
41
|
+
uniqueIndex('profiles_uri_unique').on(t.uri),
|
|
15
42
|
index('profiles_search_vector_idx').using('gin', t.searchVector),
|
|
16
43
|
]);
|
|
17
|
-
export const roles = pgTable('roles',
|
|
18
|
-
|
|
19
|
-
|
|
44
|
+
export const roles = pgTable('roles', {
|
|
45
|
+
id: idColumn(),
|
|
46
|
+
key: text('key').notNull(),
|
|
47
|
+
isDefault: boolean('is_default').notNull().default(false),
|
|
48
|
+
body: jsonb('body').notNull().default({}),
|
|
49
|
+
...modelTimestamps,
|
|
50
|
+
}, (t) => [uniqueIndex('roles_key_unique').on(t.key)]);
|
|
51
|
+
export const hashtags = pgTable('hashtags', {
|
|
52
|
+
id: idColumn(),
|
|
53
|
+
name: text('name').notNull(),
|
|
54
|
+
...modelTimestamps,
|
|
55
|
+
}, (t) => [uniqueIndex('hashtags_name_unique').on(t.name)]);
|
|
56
|
+
export const groups = pgTable('groups', {
|
|
57
|
+
id: idColumn(),
|
|
58
|
+
handle: text('handle').notNull(),
|
|
59
|
+
body: jsonb('body').notNull().default({}),
|
|
60
|
+
searchVector: tsvector('search_vector'),
|
|
61
|
+
...modelTimestamps,
|
|
62
|
+
}, (t) => [
|
|
20
63
|
uniqueIndex('groups_handle_unique').on(t.handle),
|
|
21
64
|
index('groups_search_vector_idx').using('gin', t.searchVector),
|
|
22
65
|
]);
|
|
23
|
-
export const posts = pgTable('posts',
|
|
66
|
+
export const posts = pgTable('posts', {
|
|
67
|
+
id: idColumn(),
|
|
68
|
+
type: text('type').notNull(),
|
|
69
|
+
visibility: text('visibility').notNull(),
|
|
70
|
+
creatorId: text('creator_id').notNull(),
|
|
71
|
+
uri: text('uri'),
|
|
72
|
+
inReplyToUri: text('in_reply_to_uri'),
|
|
73
|
+
body: jsonb('body').notNull().default({}),
|
|
74
|
+
searchVector: tsvector('search_vector'),
|
|
75
|
+
lastActivityAt: timestamp('last_activity_at', {
|
|
76
|
+
withTimezone: true,
|
|
77
|
+
mode: 'string',
|
|
78
|
+
})
|
|
79
|
+
.notNull()
|
|
80
|
+
.default(sql `now()`),
|
|
81
|
+
...modelTimestamps,
|
|
82
|
+
}, (t) => [
|
|
24
83
|
index('posts_type_idx').on(t.type),
|
|
25
84
|
index('posts_visibility_idx').on(t.visibility),
|
|
26
85
|
index('posts_creator_idx').on(t.creatorId),
|
|
86
|
+
uniqueIndex('posts_uri_unique').on(t.uri),
|
|
87
|
+
index('posts_in_reply_to_uri_idx').on(t.inReplyToUri),
|
|
27
88
|
index('posts_search_vector_idx').using('gin', t.searchVector),
|
|
89
|
+
index('posts_last_activity_id_idx').on(t.lastActivityAt, t.id),
|
|
28
90
|
]);
|
|
29
|
-
export const notifications = pgTable('notifications',
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export const
|
|
36
|
-
|
|
91
|
+
export const notifications = pgTable('notifications', {
|
|
92
|
+
id: idColumn(),
|
|
93
|
+
profileId: text('profile_id').notNull(),
|
|
94
|
+
body: jsonb('body').notNull().default({}),
|
|
95
|
+
...modelTimestamps,
|
|
96
|
+
}, (t) => [index('notifications_profile_idx').on(t.profileId)]);
|
|
97
|
+
export const reports = pgTable('reports', {
|
|
98
|
+
id: idColumn(),
|
|
99
|
+
body: jsonb('body').notNull().default({}),
|
|
100
|
+
...modelTimestamps,
|
|
101
|
+
});
|
|
102
|
+
export const accessTokens = pgTable('access_tokens', {
|
|
103
|
+
id: idColumn(),
|
|
104
|
+
body: jsonb('body').notNull().default({}),
|
|
105
|
+
...modelTimestamps,
|
|
106
|
+
});
|
|
107
|
+
export const pushSubscriptions = pgTable('push_subscriptions', {
|
|
108
|
+
id: idColumn(),
|
|
109
|
+
body: jsonb('body').notNull().default({}),
|
|
110
|
+
...modelTimestamps,
|
|
111
|
+
});
|
|
112
|
+
export const inviteLinks = pgTable('invite_links', {
|
|
113
|
+
id: idColumn(),
|
|
114
|
+
slug: text('slug').notNull(),
|
|
115
|
+
body: jsonb('body').notNull().default({}),
|
|
116
|
+
...modelTimestamps,
|
|
117
|
+
}, (t) => [uniqueIndex('invite_links_slug_unique').on(t.slug)]);
|
|
118
|
+
export const jamEvents = pgTable('jam_events', {
|
|
119
|
+
id: idColumn(),
|
|
120
|
+
postId: text('post_id').notNull(),
|
|
121
|
+
body: jsonb('body').notNull().default({}),
|
|
122
|
+
...modelTimestamps,
|
|
123
|
+
}, (t) => [index('jam_events_post_idx').on(t.postId)]);
|
|
124
|
+
export const mediaAttachments = pgTable('media_attachments', {
|
|
125
|
+
id: idColumn(),
|
|
126
|
+
body: jsonb('body').notNull().default({}),
|
|
127
|
+
...modelTimestamps,
|
|
128
|
+
});
|
|
129
|
+
export const processingStats = pgTable('processing_stats', {
|
|
130
|
+
id: idColumn(),
|
|
131
|
+
filetype: text('filetype').notNull(),
|
|
132
|
+
filesize: text('filesize').notNull(),
|
|
133
|
+
body: jsonb('body').notNull().default({}),
|
|
134
|
+
...modelTimestamps,
|
|
135
|
+
}, (t) => [
|
|
37
136
|
index('processing_stats_filetype_idx').on(t.filetype),
|
|
38
137
|
index('processing_stats_filetype_size_idx').on(t.filetype, t.filesize),
|
|
39
138
|
]);
|
|
40
|
-
export const profileSettings = pgTable('profile_settings',
|
|
139
|
+
export const profileSettings = pgTable('profile_settings', {
|
|
140
|
+
id: idColumn(),
|
|
141
|
+
profileId: text('profile_id').notNull(),
|
|
142
|
+
body: jsonb('body').notNull().default({}),
|
|
143
|
+
...modelTimestamps,
|
|
144
|
+
}, (t) => [uniqueIndex('profile_settings_profile_unique').on(t.profileId)]);
|
|
41
145
|
export const eventOccurrences = pgTable('event_occurrences', {
|
|
42
146
|
id: idColumn(),
|
|
43
147
|
postId: uuid('post_id').notNull(),
|
|
@@ -59,3 +163,13 @@ export const eventOccurrences = pgTable('event_occurrences', {
|
|
|
59
163
|
index('event_occurrences_start_idx').on(t.start),
|
|
60
164
|
index('event_occurrences_post_idx').on(t.postId),
|
|
61
165
|
]);
|
|
166
|
+
export const apActivities = pgTable('ap_activities', {
|
|
167
|
+
uri: text('uri').primaryKey(),
|
|
168
|
+
type: text('type').notNull(),
|
|
169
|
+
actorUri: text('actor_uri').notNull(),
|
|
170
|
+
objectUri: text('object_uri'),
|
|
171
|
+
direction: text('direction').notNull(),
|
|
172
|
+
createdAt: timestamp('created_at', { withTimezone: true, mode: 'string' })
|
|
173
|
+
.notNull()
|
|
174
|
+
.default(sql `now()`),
|
|
175
|
+
});
|