@openpeepshq/core 0.1.33 → 0.1.34
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/accounts/mutations.js +33 -35
- package/dist/analytics/compile.js +16 -10
- package/dist/analytics/read.js +52 -9
- package/dist/analytics/report.d.ts +20 -0
- package/dist/backups/index.js +75 -15
- package/dist/backups/metadata.d.ts +2 -3
- package/dist/backups/metadata.js +6 -2
- package/dist/config/defaults/capabilities.js +13 -2
- package/dist/config/defaults/community.js +7 -3
- package/dist/config/defaults/core.d.ts +1 -1
- package/dist/config/defaults/core.js +3 -0
- package/dist/config/index.d.ts +21 -0
- package/dist/config/index.js +7 -1
- package/dist/db/helpers.d.ts +1 -0
- package/dist/db/helpers.js +11 -3
- 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 +114 -164
- package/dist/db/migration/shared.d.ts +2 -33
- package/dist/db/migration/shared.js +2 -52
- package/dist/db/pg/collections.d.ts +2 -2
- package/dist/db/pg/collections.js +2 -2
- package/dist/db/pg/filters/posts.d.ts +10 -0
- package/dist/db/pg/filters/posts.js +28 -4
- package/dist/db/pg/filters/profiles.d.ts +1 -0
- package/dist/db/pg/filters/profiles.js +2 -1
- package/dist/db/pg/map/filters.js +32 -2
- package/dist/db/pg/map/mutations.js +13 -8
- package/dist/db/pg/map/registry.d.ts +5 -0
- package/dist/db/pg/map/registry.js +64 -24
- package/dist/db/pg/map/relations.js +9 -5
- package/dist/db/pg/migrate.d.ts +1 -2
- package/dist/db/pg/migrate.js +6 -6
- package/dist/db/pg/queries/activity.js +3 -3
- 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 +21 -8
- package/dist/db/pg/schema/edges.d.ts +116 -7
- package/dist/db/pg/schema/edges.js +2 -1
- package/dist/db/pg/schema/index.d.ts +362 -15
- 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/meta/{0009_snapshot.json → 0015_snapshot.json} +291 -36
- package/dist/db/pg/sql/meta/_journal.json +43 -1
- package/dist/email/render.js +11 -3
- package/dist/events/index.d.ts +4 -0
- package/dist/events/index.js +1 -0
- package/dist/federation/activities.d.ts +17 -0
- package/dist/federation/activities.js +26 -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/mapping.d.ts +4 -2
- 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/jams/export.d.ts +19 -0
- package/dist/jams/export.js +60 -0
- package/dist/jams/health.d.ts +8 -0
- package/dist/jams/health.js +46 -0
- package/dist/jams/helpers.d.ts +2 -2
- package/dist/jams/index.d.ts +2 -0
- package/dist/jams/index.js +23 -16
- package/dist/jams/jobs.js +1 -1
- package/dist/jams/livekit.d.ts +49 -4
- package/dist/jams/livekit.js +56 -39
- 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 +32 -0
- package/dist/jams/token.d.ts +13 -1
- package/dist/jams/token.js +18 -7
- package/dist/jams/waitingRoom.js +1 -1
- package/dist/jobs/index.d.ts +1 -0
- package/dist/jobs/index.js +6 -1
- package/dist/jobs/jobDetail.js +1 -6
- package/dist/media/index.d.ts +1 -1
- package/dist/media/index.js +23 -8
- package/dist/media/processing.js +18 -7
- package/dist/notifications/defaultNotifications/follow/index.js +2 -2
- package/dist/notifications/defaultNotifications/index.js +4 -0
- package/dist/notifications/defaultNotifications/newGroupPost/index.js +12 -6
- 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 +18 -0
- package/dist/notifications/defaultNotifications/rsvp/index.d.ts +6 -1
- package/dist/notifications/defaultNotifications/rsvp/index.js +7 -0
- package/dist/notifications/defaultNotifications/rsvpCanceled/index.d.ts +24 -0
- package/dist/notifications/defaultNotifications/rsvpCanceled/index.js +75 -0
- package/dist/notifications/defaultNotifications/rsvpCanceled/recipients.d.ts +4 -0
- package/dist/notifications/defaultNotifications/rsvpCanceled/recipients.js +11 -0
- package/dist/notifications/jobs.js +3 -1
- package/dist/notifications/mutations.js +4 -0
- package/dist/plugins/index.js +37 -1
- package/dist/plugins/install.d.ts +28 -9
- package/dist/plugins/install.js +281 -49
- package/dist/plugins/pluginAuth.d.ts +1 -1
- package/dist/plugins/pluginAuth.js +10 -6
- package/dist/posts/activity.d.ts +9 -0
- package/dist/posts/activity.js +35 -0
- package/dist/posts/contextClosure.d.ts +1 -9
- package/dist/posts/contextClosure.js +15 -44
- package/dist/posts/conversationQueries.d.ts +7 -0
- package/dist/posts/conversationQueries.js +76 -2
- package/dist/posts/eventAgenda.d.ts +1 -0
- package/dist/posts/eventAgenda.js +10 -4
- package/dist/posts/eventOccurrenceJobs.js +7 -2
- package/dist/posts/eventOccurrences.d.ts +6 -0
- package/dist/posts/eventOccurrences.js +21 -0
- package/dist/posts/finders.d.ts +15 -8
- package/dist/posts/finders.js +67 -18
- package/dist/posts/helpers/filters.js +13 -8
- package/dist/posts/helpers/index.d.ts +27 -14
- package/dist/posts/helpers/index.js +34 -14
- package/dist/posts/index.d.ts +5 -2
- package/dist/posts/index.js +5 -2
- package/dist/posts/mapping.d.ts +216 -13
- package/dist/posts/mapping.js +14 -13
- package/dist/posts/mutations.d.ts +440 -3
- package/dist/posts/mutations.js +155 -32
- package/dist/posts/pollEnd.d.ts +3 -0
- package/dist/posts/pollEnd.js +7 -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 +14 -16
- package/dist/posts/threadPreview.d.ts +8 -0
- package/dist/posts/threadPreview.js +44 -0
- package/dist/posts/unseenCounts.js +4 -1
- package/dist/profileSettings/cache.js +22 -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 +87 -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 +19 -6
- package/dist/profiles/finders.d.ts +2 -1
- package/dist/profiles/finders.js +8 -3
- 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 -2
- package/dist/redis/connection.d.ts +2 -0
- package/dist/redis/connection.js +25 -6
- 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 +86 -3
- package/dist/search/mapping.d.ts +1 -1
- package/dist/search/mapping.js +6 -2
- package/dist/server/index.d.ts +18 -0
- package/dist/server/index.js +24 -12
- 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 +98 -0
- package/dist/stats/finders.d.ts +1 -17681
- package/dist/stats/finders.js +9 -5
- package/dist/stats/mapping.d.ts +0 -1
- package/dist/stats/mapping.js +0 -3
- package/package.json +4 -5
- 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
|
@@ -1177,7 +1177,7 @@ export declare const schema: {
|
|
|
1177
1177
|
};
|
|
1178
1178
|
dialect: "pg";
|
|
1179
1179
|
}>;
|
|
1180
|
-
|
|
1180
|
+
blocks: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1181
1181
|
name: string;
|
|
1182
1182
|
schema: undefined;
|
|
1183
1183
|
columns: {
|
|
@@ -1286,7 +1286,7 @@ export declare const schema: {
|
|
|
1286
1286
|
};
|
|
1287
1287
|
dialect: "pg";
|
|
1288
1288
|
}>;
|
|
1289
|
-
|
|
1289
|
+
requestsFollow: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1290
1290
|
name: string;
|
|
1291
1291
|
schema: undefined;
|
|
1292
1292
|
columns: {
|
|
@@ -1395,7 +1395,7 @@ export declare const schema: {
|
|
|
1395
1395
|
};
|
|
1396
1396
|
dialect: "pg";
|
|
1397
1397
|
}>;
|
|
1398
|
-
|
|
1398
|
+
controls: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1399
1399
|
name: string;
|
|
1400
1400
|
schema: undefined;
|
|
1401
1401
|
columns: {
|
|
@@ -1504,7 +1504,7 @@ export declare const schema: {
|
|
|
1504
1504
|
};
|
|
1505
1505
|
dialect: "pg";
|
|
1506
1506
|
}>;
|
|
1507
|
-
|
|
1507
|
+
mentions: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1508
1508
|
name: string;
|
|
1509
1509
|
schema: undefined;
|
|
1510
1510
|
columns: {
|
|
@@ -1613,7 +1613,7 @@ export declare const schema: {
|
|
|
1613
1613
|
};
|
|
1614
1614
|
dialect: "pg";
|
|
1615
1615
|
}>;
|
|
1616
|
-
|
|
1616
|
+
audience: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1617
1617
|
name: string;
|
|
1618
1618
|
schema: undefined;
|
|
1619
1619
|
columns: {
|
|
@@ -1722,7 +1722,7 @@ export declare const schema: {
|
|
|
1722
1722
|
};
|
|
1723
1723
|
dialect: "pg";
|
|
1724
1724
|
}>;
|
|
1725
|
-
|
|
1725
|
+
postHashtags: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1726
1726
|
name: string;
|
|
1727
1727
|
schema: undefined;
|
|
1728
1728
|
columns: {
|
|
@@ -1831,7 +1831,7 @@ export declare const schema: {
|
|
|
1831
1831
|
};
|
|
1832
1832
|
dialect: "pg";
|
|
1833
1833
|
}>;
|
|
1834
|
-
|
|
1834
|
+
entries: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1835
1835
|
name: string;
|
|
1836
1836
|
schema: undefined;
|
|
1837
1837
|
columns: {
|
|
@@ -3793,15 +3793,49 @@ export declare const schema: {
|
|
|
3793
3793
|
};
|
|
3794
3794
|
dialect: "pg";
|
|
3795
3795
|
}>;
|
|
3796
|
-
|
|
3797
|
-
name:
|
|
3796
|
+
profileHashtags: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
3797
|
+
name: string;
|
|
3798
3798
|
schema: undefined;
|
|
3799
3799
|
columns: {
|
|
3800
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
3801
|
+
name: "created_at";
|
|
3802
|
+
tableName: string;
|
|
3803
|
+
dataType: "string";
|
|
3804
|
+
columnType: "PgTimestampString";
|
|
3805
|
+
data: string;
|
|
3806
|
+
driverParam: string;
|
|
3807
|
+
notNull: true;
|
|
3808
|
+
hasDefault: true;
|
|
3809
|
+
isPrimaryKey: false;
|
|
3810
|
+
isAutoincrement: false;
|
|
3811
|
+
hasRuntimeDefault: false;
|
|
3812
|
+
enumValues: undefined;
|
|
3813
|
+
baseColumn: never;
|
|
3814
|
+
identity: undefined;
|
|
3815
|
+
generated: undefined;
|
|
3816
|
+
}, {}, {}>;
|
|
3817
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
3818
|
+
name: "updated_at";
|
|
3819
|
+
tableName: string;
|
|
3820
|
+
dataType: "string";
|
|
3821
|
+
columnType: "PgTimestampString";
|
|
3822
|
+
data: string;
|
|
3823
|
+
driverParam: string;
|
|
3824
|
+
notNull: true;
|
|
3825
|
+
hasDefault: true;
|
|
3826
|
+
isPrimaryKey: false;
|
|
3827
|
+
isAutoincrement: false;
|
|
3828
|
+
hasRuntimeDefault: false;
|
|
3829
|
+
enumValues: undefined;
|
|
3830
|
+
baseColumn: never;
|
|
3831
|
+
identity: undefined;
|
|
3832
|
+
generated: undefined;
|
|
3833
|
+
}, {}, {}>;
|
|
3800
3834
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
3801
3835
|
name: "id";
|
|
3802
|
-
tableName:
|
|
3836
|
+
tableName: string;
|
|
3803
3837
|
dataType: "string";
|
|
3804
|
-
columnType: "
|
|
3838
|
+
columnType: "PgUUID";
|
|
3805
3839
|
data: string;
|
|
3806
3840
|
driverParam: string;
|
|
3807
3841
|
notNull: true;
|
|
@@ -3809,19 +3843,53 @@ export declare const schema: {
|
|
|
3809
3843
|
isPrimaryKey: true;
|
|
3810
3844
|
isAutoincrement: false;
|
|
3811
3845
|
hasRuntimeDefault: false;
|
|
3846
|
+
enumValues: undefined;
|
|
3847
|
+
baseColumn: never;
|
|
3848
|
+
identity: undefined;
|
|
3849
|
+
generated: undefined;
|
|
3850
|
+
}, {}, {}>;
|
|
3851
|
+
fromId: import("drizzle-orm/pg-core").PgColumn<{
|
|
3852
|
+
name: "from_id";
|
|
3853
|
+
tableName: string;
|
|
3854
|
+
dataType: "string";
|
|
3855
|
+
columnType: "PgText";
|
|
3856
|
+
data: string;
|
|
3857
|
+
driverParam: string;
|
|
3858
|
+
notNull: true;
|
|
3859
|
+
hasDefault: false;
|
|
3860
|
+
isPrimaryKey: false;
|
|
3861
|
+
isAutoincrement: false;
|
|
3862
|
+
hasRuntimeDefault: false;
|
|
3812
3863
|
enumValues: [string, ...string[]];
|
|
3813
3864
|
baseColumn: never;
|
|
3814
3865
|
identity: undefined;
|
|
3815
3866
|
generated: undefined;
|
|
3816
3867
|
}, {}, {}>;
|
|
3817
|
-
|
|
3818
|
-
name: "
|
|
3819
|
-
tableName:
|
|
3868
|
+
toId: import("drizzle-orm/pg-core").PgColumn<{
|
|
3869
|
+
name: "to_id";
|
|
3870
|
+
tableName: string;
|
|
3820
3871
|
dataType: "string";
|
|
3821
|
-
columnType: "
|
|
3872
|
+
columnType: "PgText";
|
|
3822
3873
|
data: string;
|
|
3823
3874
|
driverParam: string;
|
|
3824
3875
|
notNull: true;
|
|
3876
|
+
hasDefault: false;
|
|
3877
|
+
isPrimaryKey: false;
|
|
3878
|
+
isAutoincrement: false;
|
|
3879
|
+
hasRuntimeDefault: false;
|
|
3880
|
+
enumValues: [string, ...string[]];
|
|
3881
|
+
baseColumn: never;
|
|
3882
|
+
identity: undefined;
|
|
3883
|
+
generated: undefined;
|
|
3884
|
+
}, {}, {}>;
|
|
3885
|
+
body: import("drizzle-orm/pg-core").PgColumn<{
|
|
3886
|
+
name: "body";
|
|
3887
|
+
tableName: string;
|
|
3888
|
+
dataType: "json";
|
|
3889
|
+
columnType: "PgJsonb";
|
|
3890
|
+
data: unknown;
|
|
3891
|
+
driverParam: unknown;
|
|
3892
|
+
notNull: false;
|
|
3825
3893
|
hasDefault: true;
|
|
3826
3894
|
isPrimaryKey: false;
|
|
3827
3895
|
isAutoincrement: false;
|
|
@@ -4318,6 +4386,125 @@ export declare const schema: {
|
|
|
4318
4386
|
identity: undefined;
|
|
4319
4387
|
generated: undefined;
|
|
4320
4388
|
}, {}, {}>;
|
|
4389
|
+
uri: import("drizzle-orm/pg-core").PgColumn<{
|
|
4390
|
+
name: "uri";
|
|
4391
|
+
tableName: "profiles";
|
|
4392
|
+
dataType: "string";
|
|
4393
|
+
columnType: "PgText";
|
|
4394
|
+
data: string;
|
|
4395
|
+
driverParam: string;
|
|
4396
|
+
notNull: false;
|
|
4397
|
+
hasDefault: false;
|
|
4398
|
+
isPrimaryKey: false;
|
|
4399
|
+
isAutoincrement: false;
|
|
4400
|
+
hasRuntimeDefault: false;
|
|
4401
|
+
enumValues: [string, ...string[]];
|
|
4402
|
+
baseColumn: never;
|
|
4403
|
+
identity: undefined;
|
|
4404
|
+
generated: undefined;
|
|
4405
|
+
}, {}, {}>;
|
|
4406
|
+
inboxUrl: import("drizzle-orm/pg-core").PgColumn<{
|
|
4407
|
+
name: "inbox_url";
|
|
4408
|
+
tableName: "profiles";
|
|
4409
|
+
dataType: "string";
|
|
4410
|
+
columnType: "PgText";
|
|
4411
|
+
data: string;
|
|
4412
|
+
driverParam: string;
|
|
4413
|
+
notNull: false;
|
|
4414
|
+
hasDefault: false;
|
|
4415
|
+
isPrimaryKey: false;
|
|
4416
|
+
isAutoincrement: false;
|
|
4417
|
+
hasRuntimeDefault: false;
|
|
4418
|
+
enumValues: [string, ...string[]];
|
|
4419
|
+
baseColumn: never;
|
|
4420
|
+
identity: undefined;
|
|
4421
|
+
generated: undefined;
|
|
4422
|
+
}, {}, {}>;
|
|
4423
|
+
sharedInboxUrl: import("drizzle-orm/pg-core").PgColumn<{
|
|
4424
|
+
name: "shared_inbox_url";
|
|
4425
|
+
tableName: "profiles";
|
|
4426
|
+
dataType: "string";
|
|
4427
|
+
columnType: "PgText";
|
|
4428
|
+
data: string;
|
|
4429
|
+
driverParam: string;
|
|
4430
|
+
notNull: false;
|
|
4431
|
+
hasDefault: false;
|
|
4432
|
+
isPrimaryKey: false;
|
|
4433
|
+
isAutoincrement: false;
|
|
4434
|
+
hasRuntimeDefault: false;
|
|
4435
|
+
enumValues: [string, ...string[]];
|
|
4436
|
+
baseColumn: never;
|
|
4437
|
+
identity: undefined;
|
|
4438
|
+
generated: undefined;
|
|
4439
|
+
}, {}, {}>;
|
|
4440
|
+
publicKeyPem: import("drizzle-orm/pg-core").PgColumn<{
|
|
4441
|
+
name: "public_key_pem";
|
|
4442
|
+
tableName: "profiles";
|
|
4443
|
+
dataType: "string";
|
|
4444
|
+
columnType: "PgText";
|
|
4445
|
+
data: string;
|
|
4446
|
+
driverParam: string;
|
|
4447
|
+
notNull: false;
|
|
4448
|
+
hasDefault: false;
|
|
4449
|
+
isPrimaryKey: false;
|
|
4450
|
+
isAutoincrement: false;
|
|
4451
|
+
hasRuntimeDefault: false;
|
|
4452
|
+
enumValues: [string, ...string[]];
|
|
4453
|
+
baseColumn: never;
|
|
4454
|
+
identity: undefined;
|
|
4455
|
+
generated: undefined;
|
|
4456
|
+
}, {}, {}>;
|
|
4457
|
+
privateKeyPem: import("drizzle-orm/pg-core").PgColumn<{
|
|
4458
|
+
name: "private_key_pem";
|
|
4459
|
+
tableName: "profiles";
|
|
4460
|
+
dataType: "string";
|
|
4461
|
+
columnType: "PgText";
|
|
4462
|
+
data: string;
|
|
4463
|
+
driverParam: string;
|
|
4464
|
+
notNull: false;
|
|
4465
|
+
hasDefault: false;
|
|
4466
|
+
isPrimaryKey: false;
|
|
4467
|
+
isAutoincrement: false;
|
|
4468
|
+
hasRuntimeDefault: false;
|
|
4469
|
+
enumValues: [string, ...string[]];
|
|
4470
|
+
baseColumn: never;
|
|
4471
|
+
identity: undefined;
|
|
4472
|
+
generated: undefined;
|
|
4473
|
+
}, {}, {}>;
|
|
4474
|
+
keyId: import("drizzle-orm/pg-core").PgColumn<{
|
|
4475
|
+
name: "key_id";
|
|
4476
|
+
tableName: "profiles";
|
|
4477
|
+
dataType: "string";
|
|
4478
|
+
columnType: "PgText";
|
|
4479
|
+
data: string;
|
|
4480
|
+
driverParam: string;
|
|
4481
|
+
notNull: false;
|
|
4482
|
+
hasDefault: false;
|
|
4483
|
+
isPrimaryKey: false;
|
|
4484
|
+
isAutoincrement: false;
|
|
4485
|
+
hasRuntimeDefault: false;
|
|
4486
|
+
enumValues: [string, ...string[]];
|
|
4487
|
+
baseColumn: never;
|
|
4488
|
+
identity: undefined;
|
|
4489
|
+
generated: undefined;
|
|
4490
|
+
}, {}, {}>;
|
|
4491
|
+
fetchedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
4492
|
+
name: "fetched_at";
|
|
4493
|
+
tableName: "profiles";
|
|
4494
|
+
dataType: "string";
|
|
4495
|
+
columnType: "PgTimestampString";
|
|
4496
|
+
data: string;
|
|
4497
|
+
driverParam: string;
|
|
4498
|
+
notNull: false;
|
|
4499
|
+
hasDefault: false;
|
|
4500
|
+
isPrimaryKey: false;
|
|
4501
|
+
isAutoincrement: false;
|
|
4502
|
+
hasRuntimeDefault: false;
|
|
4503
|
+
enumValues: undefined;
|
|
4504
|
+
baseColumn: never;
|
|
4505
|
+
identity: undefined;
|
|
4506
|
+
generated: undefined;
|
|
4507
|
+
}, {}, {}>;
|
|
4321
4508
|
body: import("drizzle-orm/pg-core").PgColumn<{
|
|
4322
4509
|
name: "body";
|
|
4323
4510
|
tableName: "profiles";
|
|
@@ -4826,6 +5013,40 @@ export declare const schema: {
|
|
|
4826
5013
|
identity: undefined;
|
|
4827
5014
|
generated: undefined;
|
|
4828
5015
|
}, {}, {}>;
|
|
5016
|
+
uri: import("drizzle-orm/pg-core").PgColumn<{
|
|
5017
|
+
name: "uri";
|
|
5018
|
+
tableName: "posts";
|
|
5019
|
+
dataType: "string";
|
|
5020
|
+
columnType: "PgText";
|
|
5021
|
+
data: string;
|
|
5022
|
+
driverParam: string;
|
|
5023
|
+
notNull: false;
|
|
5024
|
+
hasDefault: false;
|
|
5025
|
+
isPrimaryKey: false;
|
|
5026
|
+
isAutoincrement: false;
|
|
5027
|
+
hasRuntimeDefault: false;
|
|
5028
|
+
enumValues: [string, ...string[]];
|
|
5029
|
+
baseColumn: never;
|
|
5030
|
+
identity: undefined;
|
|
5031
|
+
generated: undefined;
|
|
5032
|
+
}, {}, {}>;
|
|
5033
|
+
inReplyToUri: import("drizzle-orm/pg-core").PgColumn<{
|
|
5034
|
+
name: "in_reply_to_uri";
|
|
5035
|
+
tableName: "posts";
|
|
5036
|
+
dataType: "string";
|
|
5037
|
+
columnType: "PgText";
|
|
5038
|
+
data: string;
|
|
5039
|
+
driverParam: string;
|
|
5040
|
+
notNull: false;
|
|
5041
|
+
hasDefault: false;
|
|
5042
|
+
isPrimaryKey: false;
|
|
5043
|
+
isAutoincrement: false;
|
|
5044
|
+
hasRuntimeDefault: false;
|
|
5045
|
+
enumValues: [string, ...string[]];
|
|
5046
|
+
baseColumn: never;
|
|
5047
|
+
identity: undefined;
|
|
5048
|
+
generated: undefined;
|
|
5049
|
+
}, {}, {}>;
|
|
4829
5050
|
body: import("drizzle-orm/pg-core").PgColumn<{
|
|
4830
5051
|
name: "body";
|
|
4831
5052
|
tableName: "posts";
|
|
@@ -4862,6 +5083,23 @@ export declare const schema: {
|
|
|
4862
5083
|
}, {}, {
|
|
4863
5084
|
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
4864
5085
|
}>;
|
|
5086
|
+
lastActivityAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
5087
|
+
name: "last_activity_at";
|
|
5088
|
+
tableName: "posts";
|
|
5089
|
+
dataType: "string";
|
|
5090
|
+
columnType: "PgTimestampString";
|
|
5091
|
+
data: string;
|
|
5092
|
+
driverParam: string;
|
|
5093
|
+
notNull: true;
|
|
5094
|
+
hasDefault: true;
|
|
5095
|
+
isPrimaryKey: false;
|
|
5096
|
+
isAutoincrement: false;
|
|
5097
|
+
hasRuntimeDefault: false;
|
|
5098
|
+
enumValues: undefined;
|
|
5099
|
+
baseColumn: never;
|
|
5100
|
+
identity: undefined;
|
|
5101
|
+
generated: undefined;
|
|
5102
|
+
}, {}, {}>;
|
|
4865
5103
|
};
|
|
4866
5104
|
dialect: "pg";
|
|
4867
5105
|
}>;
|
|
@@ -5938,5 +6176,114 @@ export declare const schema: {
|
|
|
5938
6176
|
};
|
|
5939
6177
|
dialect: "pg";
|
|
5940
6178
|
}>;
|
|
6179
|
+
apActivities: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
6180
|
+
name: "ap_activities";
|
|
6181
|
+
schema: undefined;
|
|
6182
|
+
columns: {
|
|
6183
|
+
uri: import("drizzle-orm/pg-core").PgColumn<{
|
|
6184
|
+
name: "uri";
|
|
6185
|
+
tableName: "ap_activities";
|
|
6186
|
+
dataType: "string";
|
|
6187
|
+
columnType: "PgText";
|
|
6188
|
+
data: string;
|
|
6189
|
+
driverParam: string;
|
|
6190
|
+
notNull: true;
|
|
6191
|
+
hasDefault: false;
|
|
6192
|
+
isPrimaryKey: true;
|
|
6193
|
+
isAutoincrement: false;
|
|
6194
|
+
hasRuntimeDefault: false;
|
|
6195
|
+
enumValues: [string, ...string[]];
|
|
6196
|
+
baseColumn: never;
|
|
6197
|
+
identity: undefined;
|
|
6198
|
+
generated: undefined;
|
|
6199
|
+
}, {}, {}>;
|
|
6200
|
+
type: import("drizzle-orm/pg-core").PgColumn<{
|
|
6201
|
+
name: "type";
|
|
6202
|
+
tableName: "ap_activities";
|
|
6203
|
+
dataType: "string";
|
|
6204
|
+
columnType: "PgText";
|
|
6205
|
+
data: string;
|
|
6206
|
+
driverParam: string;
|
|
6207
|
+
notNull: true;
|
|
6208
|
+
hasDefault: false;
|
|
6209
|
+
isPrimaryKey: false;
|
|
6210
|
+
isAutoincrement: false;
|
|
6211
|
+
hasRuntimeDefault: false;
|
|
6212
|
+
enumValues: [string, ...string[]];
|
|
6213
|
+
baseColumn: never;
|
|
6214
|
+
identity: undefined;
|
|
6215
|
+
generated: undefined;
|
|
6216
|
+
}, {}, {}>;
|
|
6217
|
+
actorUri: import("drizzle-orm/pg-core").PgColumn<{
|
|
6218
|
+
name: "actor_uri";
|
|
6219
|
+
tableName: "ap_activities";
|
|
6220
|
+
dataType: "string";
|
|
6221
|
+
columnType: "PgText";
|
|
6222
|
+
data: string;
|
|
6223
|
+
driverParam: string;
|
|
6224
|
+
notNull: true;
|
|
6225
|
+
hasDefault: false;
|
|
6226
|
+
isPrimaryKey: false;
|
|
6227
|
+
isAutoincrement: false;
|
|
6228
|
+
hasRuntimeDefault: false;
|
|
6229
|
+
enumValues: [string, ...string[]];
|
|
6230
|
+
baseColumn: never;
|
|
6231
|
+
identity: undefined;
|
|
6232
|
+
generated: undefined;
|
|
6233
|
+
}, {}, {}>;
|
|
6234
|
+
objectUri: import("drizzle-orm/pg-core").PgColumn<{
|
|
6235
|
+
name: "object_uri";
|
|
6236
|
+
tableName: "ap_activities";
|
|
6237
|
+
dataType: "string";
|
|
6238
|
+
columnType: "PgText";
|
|
6239
|
+
data: string;
|
|
6240
|
+
driverParam: string;
|
|
6241
|
+
notNull: false;
|
|
6242
|
+
hasDefault: false;
|
|
6243
|
+
isPrimaryKey: false;
|
|
6244
|
+
isAutoincrement: false;
|
|
6245
|
+
hasRuntimeDefault: false;
|
|
6246
|
+
enumValues: [string, ...string[]];
|
|
6247
|
+
baseColumn: never;
|
|
6248
|
+
identity: undefined;
|
|
6249
|
+
generated: undefined;
|
|
6250
|
+
}, {}, {}>;
|
|
6251
|
+
direction: import("drizzle-orm/pg-core").PgColumn<{
|
|
6252
|
+
name: "direction";
|
|
6253
|
+
tableName: "ap_activities";
|
|
6254
|
+
dataType: "string";
|
|
6255
|
+
columnType: "PgText";
|
|
6256
|
+
data: string;
|
|
6257
|
+
driverParam: string;
|
|
6258
|
+
notNull: true;
|
|
6259
|
+
hasDefault: false;
|
|
6260
|
+
isPrimaryKey: false;
|
|
6261
|
+
isAutoincrement: false;
|
|
6262
|
+
hasRuntimeDefault: false;
|
|
6263
|
+
enumValues: [string, ...string[]];
|
|
6264
|
+
baseColumn: never;
|
|
6265
|
+
identity: undefined;
|
|
6266
|
+
generated: undefined;
|
|
6267
|
+
}, {}, {}>;
|
|
6268
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
6269
|
+
name: "created_at";
|
|
6270
|
+
tableName: "ap_activities";
|
|
6271
|
+
dataType: "string";
|
|
6272
|
+
columnType: "PgTimestampString";
|
|
6273
|
+
data: string;
|
|
6274
|
+
driverParam: string;
|
|
6275
|
+
notNull: true;
|
|
6276
|
+
hasDefault: true;
|
|
6277
|
+
isPrimaryKey: false;
|
|
6278
|
+
isAutoincrement: false;
|
|
6279
|
+
hasRuntimeDefault: false;
|
|
6280
|
+
enumValues: undefined;
|
|
6281
|
+
baseColumn: never;
|
|
6282
|
+
identity: undefined;
|
|
6283
|
+
generated: undefined;
|
|
6284
|
+
}, {}, {}>;
|
|
6285
|
+
};
|
|
6286
|
+
dialect: "pg";
|
|
6287
|
+
}>;
|
|
5941
6288
|
};
|
|
5942
6289
|
export type Schema = typeof schema;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- Backfill user_groups.roles from pre-roles `capabilities` on membership edges.
|
|
2
|
+
-- Memberships without roles fail private-group canReadPost while unseen SQL
|
|
3
|
+
-- still counts them by edge existence.
|
|
4
|
+
UPDATE "user_groups"
|
|
5
|
+
SET "body" = jsonb_set(
|
|
6
|
+
COALESCE("body", '{}'::jsonb) - 'capabilities',
|
|
7
|
+
'{roles}',
|
|
8
|
+
CASE
|
|
9
|
+
WHEN COALESCE("body"->'capabilities', '[]'::jsonb) ? '*'
|
|
10
|
+
THEN '["owner"]'::jsonb
|
|
11
|
+
ELSE '["member"]'::jsonb
|
|
12
|
+
END
|
|
13
|
+
)
|
|
14
|
+
WHERE COALESCE("body"->'roles', '[]'::jsonb) = '[]'::jsonb
|
|
15
|
+
OR "body"->'roles' IS NULL
|
|
16
|
+
OR jsonb_typeof("body"->'roles') = 'null';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
DROP TABLE IF EXISTS "data_migrations";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
ALTER TABLE "posts" ADD COLUMN IF NOT EXISTS "last_activity_at" timestamp with time zone;--> statement-breakpoint
|
|
2
|
+
UPDATE "posts" SET "last_activity_at" = "created_at" WHERE "last_activity_at" IS NULL;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "posts" ALTER COLUMN "last_activity_at" SET DEFAULT now();--> statement-breakpoint
|
|
4
|
+
ALTER TABLE "posts" ALTER COLUMN "last_activity_at" SET NOT NULL;--> statement-breakpoint
|
|
5
|
+
CREATE INDEX IF NOT EXISTS "posts_last_activity_id_idx" ON "posts" USING btree ("last_activity_at","id");
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
CREATE TABLE "blocks" (
|
|
2
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
3
|
+
"from_id" text NOT NULL,
|
|
4
|
+
"to_id" text NOT NULL,
|
|
5
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
6
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
7
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
8
|
+
);
|
|
9
|
+
--> statement-breakpoint
|
|
10
|
+
CREATE INDEX "blocks_from_idx" ON "blocks" USING btree ("from_id");--> statement-breakpoint
|
|
11
|
+
CREATE INDEX "blocks_to_idx" ON "blocks" USING btree ("to_id");--> statement-breakpoint
|
|
12
|
+
CREATE UNIQUE INDEX "blocks_from_to_unique" ON "blocks" USING btree ("from_id","to_id");
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
ALTER TABLE "profiles" ADD COLUMN IF NOT EXISTS "uri" text;
|
|
2
|
+
--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "profiles" ADD COLUMN IF NOT EXISTS "inbox_url" text;
|
|
4
|
+
--> statement-breakpoint
|
|
5
|
+
ALTER TABLE "profiles" ADD COLUMN IF NOT EXISTS "shared_inbox_url" text;
|
|
6
|
+
--> statement-breakpoint
|
|
7
|
+
ALTER TABLE "profiles" ADD COLUMN IF NOT EXISTS "public_key_pem" text;
|
|
8
|
+
--> statement-breakpoint
|
|
9
|
+
ALTER TABLE "profiles" ADD COLUMN IF NOT EXISTS "private_key_pem" text;
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
ALTER TABLE "profiles" ADD COLUMN IF NOT EXISTS "key_id" text;
|
|
12
|
+
--> statement-breakpoint
|
|
13
|
+
ALTER TABLE "profiles" ADD COLUMN IF NOT EXISTS "fetched_at" timestamp with time zone;
|
|
14
|
+
--> statement-breakpoint
|
|
15
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "profiles_uri_unique" ON "profiles" USING btree ("uri");
|
|
16
|
+
--> statement-breakpoint
|
|
17
|
+
ALTER TABLE "posts" ADD COLUMN IF NOT EXISTS "uri" text;
|
|
18
|
+
--> statement-breakpoint
|
|
19
|
+
ALTER TABLE "posts" ADD COLUMN IF NOT EXISTS "in_reply_to_uri" text;
|
|
20
|
+
--> statement-breakpoint
|
|
21
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "posts_uri_unique" ON "posts" USING btree ("uri");
|
|
22
|
+
--> statement-breakpoint
|
|
23
|
+
CREATE INDEX IF NOT EXISTS "posts_in_reply_to_uri_idx" ON "posts" USING btree ("in_reply_to_uri");
|
|
24
|
+
--> statement-breakpoint
|
|
25
|
+
CREATE TABLE IF NOT EXISTS "ap_activities" (
|
|
26
|
+
"uri" text PRIMARY KEY NOT NULL,
|
|
27
|
+
"type" text NOT NULL,
|
|
28
|
+
"actor_uri" text NOT NULL,
|
|
29
|
+
"object_uri" text,
|
|
30
|
+
"direction" text NOT NULL,
|
|
31
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
32
|
+
);
|
|
33
|
+
--> statement-breakpoint
|
|
34
|
+
DO $$
|
|
35
|
+
BEGIN
|
|
36
|
+
IF to_regclass('public.reactions') IS NOT NULL THEN
|
|
37
|
+
INSERT INTO "entries" ("id", "from_id", "to_id", "body", "created_at", "updated_at")
|
|
38
|
+
SELECT
|
|
39
|
+
r."id",
|
|
40
|
+
r."from_id",
|
|
41
|
+
r."to_id",
|
|
42
|
+
jsonb_build_object(
|
|
43
|
+
'type', 'reaction',
|
|
44
|
+
'data', CASE
|
|
45
|
+
WHEN COALESCE(r."body", '{}'::jsonb) ? 'reaction'
|
|
46
|
+
THEN COALESCE(r."body", '{}'::jsonb)
|
|
47
|
+
ELSE jsonb_build_object('reaction', '👍')
|
|
48
|
+
END
|
|
49
|
+
),
|
|
50
|
+
r."created_at",
|
|
51
|
+
r."updated_at"
|
|
52
|
+
FROM "reactions" r
|
|
53
|
+
WHERE NOT EXISTS (
|
|
54
|
+
SELECT 1 FROM "entries" e WHERE e."id" = r."id"
|
|
55
|
+
);
|
|
56
|
+
END IF;
|
|
57
|
+
END $$;
|
|
58
|
+
--> statement-breakpoint
|
|
59
|
+
DROP TABLE IF EXISTS "reactions";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
CREATE TABLE "profile_hashtags" (
|
|
2
|
+
"id" uuid PRIMARY KEY NOT NULL,
|
|
3
|
+
"from_id" text NOT NULL,
|
|
4
|
+
"to_id" text NOT NULL,
|
|
5
|
+
"body" jsonb DEFAULT '{}'::jsonb,
|
|
6
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
7
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
8
|
+
);
|
|
9
|
+
--> statement-breakpoint
|
|
10
|
+
CREATE INDEX "profile_hashtags_from_idx" ON "profile_hashtags" USING btree ("from_id");--> statement-breakpoint
|
|
11
|
+
CREATE INDEX "profile_hashtags_to_idx" ON "profile_hashtags" USING btree ("to_id");--> statement-breakpoint
|
|
12
|
+
CREATE UNIQUE INDEX "profile_hashtags_from_to_unique" ON "profile_hashtags" USING btree ("from_id","to_id");
|