@pkcprotocol/pkc-js 0.0.131 → 0.0.133
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/README.md +17 -7
- package/dist/browser/clients/rpc-client/rpc-schema-util.d.ts +2 -0
- package/dist/browser/clients/rpc-client/schema.d.ts +24 -0
- package/dist/browser/community/schema.d.ts +193 -0
- package/dist/browser/community/schema.js +4 -0
- package/dist/browser/community/schema.js.map +1 -1
- package/dist/browser/errors.d.ts +9 -1
- package/dist/browser/errors.js +9 -1
- package/dist/browser/errors.js.map +1 -1
- package/dist/browser/generated-version.d.ts +1 -1
- package/dist/browser/generated-version.js +1 -1
- package/dist/browser/index-with-compile-cache.d.ts +32 -0
- package/dist/browser/index.d.ts +64 -0
- package/dist/browser/pages/schema.d.ts +44 -0
- package/dist/browser/pkc-error.d.ts +1 -1
- package/dist/browser/publications/comment/comment.d.ts +1 -0
- package/dist/browser/publications/comment/comment.js +2 -0
- package/dist/browser/publications/comment/comment.js.map +1 -1
- package/dist/browser/publications/comment/schema.d.ts +133 -1
- package/dist/browser/publications/comment/schema.js +21 -6
- package/dist/browser/publications/comment/schema.js.map +1 -1
- package/dist/browser/publications/comment/types.d.ts +2 -1
- package/dist/browser/publications/community-edit/schema.d.ts +8 -0
- package/dist/browser/pubsub-messages/schema.d.ts +37 -0
- package/dist/browser/rpc/src/lib/pkc-js/index.d.ts +32 -0
- package/dist/browser/rpc/src/schema.d.ts +192 -0
- package/dist/browser/runtime/node/community/db-handler.js +3 -2
- package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/editing.js +60 -7
- package/dist/browser/runtime/node/community/local-community/editing.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/publication-validation.js +41 -17
- package/dist/browser/runtime/node/community/local-community/publication-validation.js.map +1 -1
- package/dist/browser/runtime/node/polyfill.js +3 -1
- package/dist/browser/runtime/node/polyfill.js.map +1 -1
- package/dist/browser/schema/schema-util.d.ts +82 -0
- package/dist/browser/schema.d.ts +256 -0
- package/dist/browser/signer/signatures.js +18 -6
- package/dist/browser/signer/signatures.js.map +1 -1
- package/dist/browser/test/test-util.d.ts +40 -0
- package/dist/browser/version.js +1 -1
- package/dist/bundled/bundle-manifest.json +434 -211
- package/dist/bundled/challenges.js +1 -1
- package/dist/bundled/chunks/{helia-for-pkc-C7_eLx63.js → helia-for-pkc-B6cVl9Fj.js} +2 -2
- package/dist/bundled/chunks/{local-community-CtL1aSwt.js → local-community-CEsw9IC3.js} +1 -1
- package/dist/bundled/chunks/{local-community-RlYLG5QV.js → local-community-JxRohlLp.js} +114 -47
- package/dist/bundled/chunks/node-DsWFSaNV.js +36843 -0
- package/dist/bundled/chunks/{page-sort-scoring-CaoGFyhT.js → page-sort-scoring-iqMGLuRC.js} +1 -1
- package/dist/bundled/chunks/{rpc-local-community-BXt7eK9l.js → rpc-local-community-jndojGZl.js} +56870 -33780
- package/dist/bundled/chunks/{src-B07ldGHS.js → src-BggJ_InF.js} +435 -149
- package/dist/bundled/chunks/{src-629pKfxo.js → src-BsiPSkhv.js} +2 -2
- package/dist/bundled/chunks/{src-BOzgM7Fp.js → src-evzEHW9W.js} +26 -9
- package/dist/bundled/chunks/{util-CaL93qd4.js → util-Bna9pur0.js} +32 -9
- package/dist/bundled/chunks/{util-cD0RAlzC.js → util-CYgZRMVL.js} +1 -1
- package/dist/bundled/chunks/{validate-package-factories-DWI4TSli.js → validate-package-factories-FeyM9Tw1.js} +2 -2
- package/dist/bundled/index.js +1 -1
- package/dist/bundled/page-sorts.js +1 -1
- package/dist/bundled/rpc/src/index.js +4 -4
- package/dist/node/clients/rpc-client/rpc-schema-util.d.ts +2 -0
- package/dist/node/clients/rpc-client/schema.d.ts +24 -0
- package/dist/node/community/schema.d.ts +193 -0
- package/dist/node/community/schema.js +4 -0
- package/dist/node/community/schema.js.map +1 -1
- package/dist/node/errors.d.ts +9 -1
- package/dist/node/errors.js +9 -1
- package/dist/node/errors.js.map +1 -1
- package/dist/node/generated-version.d.ts +1 -1
- package/dist/node/generated-version.js +1 -1
- package/dist/node/index-with-compile-cache.d.ts +32 -0
- package/dist/node/index.d.ts +64 -0
- package/dist/node/pages/schema.d.ts +44 -0
- package/dist/node/pkc-error.d.ts +1 -1
- package/dist/node/publications/comment/comment.d.ts +1 -0
- package/dist/node/publications/comment/comment.js +2 -0
- package/dist/node/publications/comment/comment.js.map +1 -1
- package/dist/node/publications/comment/schema.d.ts +133 -1
- package/dist/node/publications/comment/schema.js +21 -6
- package/dist/node/publications/comment/schema.js.map +1 -1
- package/dist/node/publications/comment/types.d.ts +2 -1
- package/dist/node/publications/community-edit/schema.d.ts +8 -0
- package/dist/node/pubsub-messages/schema.d.ts +37 -0
- package/dist/node/rpc/src/lib/pkc-js/index.d.ts +32 -0
- package/dist/node/rpc/src/schema.d.ts +192 -0
- package/dist/node/runtime/node/community/db-handler.js +3 -2
- package/dist/node/runtime/node/community/db-handler.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/editing.js +60 -7
- package/dist/node/runtime/node/community/local-community/editing.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/publication-validation.js +41 -17
- package/dist/node/runtime/node/community/local-community/publication-validation.js.map +1 -1
- package/dist/node/runtime/node/polyfill.js +3 -1
- package/dist/node/runtime/node/polyfill.js.map +1 -1
- package/dist/node/schema/schema-util.d.ts +82 -0
- package/dist/node/schema.d.ts +256 -0
- package/dist/node/signer/signatures.js +18 -6
- package/dist/node/signer/signatures.js.map +1 -1
- package/dist/node/test/test-util.d.ts +40 -0
- package/dist/node/version.js +1 -1
- package/package.json +18 -18
- package/dist/bundled/chunks/node-DFp6m62Y.js +0 -9770
|
@@ -61,6 +61,17 @@ export declare const DecryptedChallengeRequestPublicationSchema: z.ZodObject<{
|
|
|
61
61
|
postCid: z.ZodOptional<z.ZodString>;
|
|
62
62
|
quotedCids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
63
|
crosspost: z.ZodOptional<z.ZodType<import("../publications/comment/schema.js").Crosspost, import("../publications/comment/schema.js").Crosspost, z.core.$ZodTypeInternals<import("../publications/comment/schema.js").Crosspost, import("../publications/comment/schema.js").Crosspost>>>;
|
|
64
|
+
gallery: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
65
|
+
url: z.ZodString;
|
|
66
|
+
htmlTagName: z.ZodEnum<{
|
|
67
|
+
img: "img";
|
|
68
|
+
video: "video";
|
|
69
|
+
audio: "audio";
|
|
70
|
+
}>;
|
|
71
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$loose>>>;
|
|
64
75
|
author: z.ZodOptional<z.ZodObject<{
|
|
65
76
|
name: z.ZodOptional<z.ZodString>;
|
|
66
77
|
previousCommentCid: z.ZodOptional<z.ZodString>;
|
|
@@ -342,6 +353,8 @@ export declare const DecryptedChallengeRequestPublicationSchema: z.ZodObject<{
|
|
|
342
353
|
requirePostLinkIsMedia: z.ZodOptional<z.ZodBoolean>;
|
|
343
354
|
requireReplyLink: z.ZodOptional<z.ZodBoolean>;
|
|
344
355
|
requireReplyLinkIsMedia: z.ZodOptional<z.ZodBoolean>;
|
|
356
|
+
maxPostGalleryItems: z.ZodOptional<z.ZodNumber>;
|
|
357
|
+
maxReplyGalleryItems: z.ZodOptional<z.ZodNumber>;
|
|
345
358
|
pseudonymityMode: z.ZodOptional<z.ZodEnum<{
|
|
346
359
|
"per-post": "per-post";
|
|
347
360
|
"per-reply": "per-reply";
|
|
@@ -461,6 +474,17 @@ export declare const DecryptedChallengeRequestSchema: z.ZodObject<{
|
|
|
461
474
|
postCid: z.ZodOptional<z.ZodString>;
|
|
462
475
|
quotedCids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
463
476
|
crosspost: z.ZodOptional<z.ZodType<import("../publications/comment/schema.js").Crosspost, import("../publications/comment/schema.js").Crosspost, z.core.$ZodTypeInternals<import("../publications/comment/schema.js").Crosspost, import("../publications/comment/schema.js").Crosspost>>>;
|
|
477
|
+
gallery: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
478
|
+
url: z.ZodString;
|
|
479
|
+
htmlTagName: z.ZodEnum<{
|
|
480
|
+
img: "img";
|
|
481
|
+
video: "video";
|
|
482
|
+
audio: "audio";
|
|
483
|
+
}>;
|
|
484
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
485
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
486
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
487
|
+
}, z.core.$loose>>>;
|
|
464
488
|
author: z.ZodOptional<z.ZodObject<{
|
|
465
489
|
name: z.ZodOptional<z.ZodString>;
|
|
466
490
|
previousCommentCid: z.ZodOptional<z.ZodString>;
|
|
@@ -742,6 +766,8 @@ export declare const DecryptedChallengeRequestSchema: z.ZodObject<{
|
|
|
742
766
|
requirePostLinkIsMedia: z.ZodOptional<z.ZodBoolean>;
|
|
743
767
|
requireReplyLink: z.ZodOptional<z.ZodBoolean>;
|
|
744
768
|
requireReplyLinkIsMedia: z.ZodOptional<z.ZodBoolean>;
|
|
769
|
+
maxPostGalleryItems: z.ZodOptional<z.ZodNumber>;
|
|
770
|
+
maxReplyGalleryItems: z.ZodOptional<z.ZodNumber>;
|
|
745
771
|
pseudonymityMode: z.ZodOptional<z.ZodEnum<{
|
|
746
772
|
"per-post": "per-post";
|
|
747
773
|
"per-reply": "per-reply";
|
|
@@ -941,6 +967,17 @@ export declare const DecryptedChallengeVerificationSchema: z.ZodObject<{
|
|
|
941
967
|
postCid: z.ZodOptional<z.ZodString>;
|
|
942
968
|
quotedCids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
943
969
|
crosspost: z.ZodOptional<z.ZodType<import("../publications/comment/schema.js").Crosspost, import("../publications/comment/schema.js").Crosspost, z.core.$ZodTypeInternals<import("../publications/comment/schema.js").Crosspost, import("../publications/comment/schema.js").Crosspost>>>;
|
|
970
|
+
gallery: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
971
|
+
url: z.ZodString;
|
|
972
|
+
htmlTagName: z.ZodEnum<{
|
|
973
|
+
img: "img";
|
|
974
|
+
video: "video";
|
|
975
|
+
audio: "audio";
|
|
976
|
+
}>;
|
|
977
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
978
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
979
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
980
|
+
}, z.core.$loose>>>;
|
|
944
981
|
author: z.ZodOptional<z.ZodObject<{
|
|
945
982
|
name: z.ZodOptional<z.ZodString>;
|
|
946
983
|
previousCommentCid: z.ZodOptional<z.ZodString>;
|
|
@@ -231,6 +231,14 @@ declare const PKCJs: {
|
|
|
231
231
|
postCid?: string | undefined;
|
|
232
232
|
quotedCids?: string[] | undefined;
|
|
233
233
|
crosspost?: import("../../../../publications/comment/schema.js").Crosspost | undefined;
|
|
234
|
+
gallery?: {
|
|
235
|
+
[x: string]: unknown;
|
|
236
|
+
url: string;
|
|
237
|
+
htmlTagName: "img" | "video" | "audio";
|
|
238
|
+
width?: number | undefined;
|
|
239
|
+
height?: number | undefined;
|
|
240
|
+
alt?: string | undefined;
|
|
241
|
+
}[] | undefined;
|
|
234
242
|
author?: {
|
|
235
243
|
[x: string]: unknown;
|
|
236
244
|
name?: string | undefined;
|
|
@@ -300,6 +308,14 @@ declare const PKCJs: {
|
|
|
300
308
|
postCid?: string | undefined;
|
|
301
309
|
quotedCids?: string[] | undefined;
|
|
302
310
|
crosspost?: import("../../../../publications/comment/schema.js").Crosspost | undefined;
|
|
311
|
+
gallery?: {
|
|
312
|
+
[x: string]: unknown;
|
|
313
|
+
url: string;
|
|
314
|
+
htmlTagName: "img" | "video" | "audio";
|
|
315
|
+
width?: number | undefined;
|
|
316
|
+
height?: number | undefined;
|
|
317
|
+
alt?: string | undefined;
|
|
318
|
+
}[] | undefined;
|
|
303
319
|
author?: {
|
|
304
320
|
[x: string]: unknown;
|
|
305
321
|
name?: string | undefined;
|
|
@@ -483,6 +499,14 @@ declare const PKCJs: {
|
|
|
483
499
|
postCid?: string | undefined;
|
|
484
500
|
quotedCids?: string[] | undefined;
|
|
485
501
|
crosspost?: import("../../../../publications/comment/schema.js").Crosspost | undefined;
|
|
502
|
+
gallery?: {
|
|
503
|
+
[x: string]: unknown;
|
|
504
|
+
url: string;
|
|
505
|
+
htmlTagName: "img" | "video" | "audio";
|
|
506
|
+
width?: number | undefined;
|
|
507
|
+
height?: number | undefined;
|
|
508
|
+
alt?: string | undefined;
|
|
509
|
+
}[] | undefined;
|
|
486
510
|
author?: {
|
|
487
511
|
[x: string]: unknown;
|
|
488
512
|
name?: string | undefined;
|
|
@@ -672,6 +696,14 @@ declare const PKCJs: {
|
|
|
672
696
|
postCid?: string | undefined;
|
|
673
697
|
quotedCids?: string[] | undefined;
|
|
674
698
|
crosspost?: import("../../../../publications/comment/schema.js").Crosspost | undefined;
|
|
699
|
+
gallery?: {
|
|
700
|
+
[x: string]: unknown;
|
|
701
|
+
url: string;
|
|
702
|
+
htmlTagName: "img" | "video" | "audio";
|
|
703
|
+
width?: number | undefined;
|
|
704
|
+
height?: number | undefined;
|
|
705
|
+
alt?: string | undefined;
|
|
706
|
+
}[] | undefined;
|
|
675
707
|
author?: {
|
|
676
708
|
[x: string]: unknown;
|
|
677
709
|
name?: string | undefined;
|
|
@@ -264,6 +264,14 @@ export declare const CreatePKCWsServerOptionsSchema: z.ZodObject<{
|
|
|
264
264
|
postCid?: string | undefined;
|
|
265
265
|
quotedCids?: string[] | undefined;
|
|
266
266
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
267
|
+
gallery?: {
|
|
268
|
+
[x: string]: unknown;
|
|
269
|
+
url: string;
|
|
270
|
+
htmlTagName: "img" | "video" | "audio";
|
|
271
|
+
width?: number | undefined;
|
|
272
|
+
height?: number | undefined;
|
|
273
|
+
alt?: string | undefined;
|
|
274
|
+
}[] | undefined;
|
|
267
275
|
author?: {
|
|
268
276
|
[x: string]: unknown;
|
|
269
277
|
name?: string | undefined;
|
|
@@ -333,6 +341,14 @@ export declare const CreatePKCWsServerOptionsSchema: z.ZodObject<{
|
|
|
333
341
|
postCid?: string | undefined;
|
|
334
342
|
quotedCids?: string[] | undefined;
|
|
335
343
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
344
|
+
gallery?: {
|
|
345
|
+
[x: string]: unknown;
|
|
346
|
+
url: string;
|
|
347
|
+
htmlTagName: "img" | "video" | "audio";
|
|
348
|
+
width?: number | undefined;
|
|
349
|
+
height?: number | undefined;
|
|
350
|
+
alt?: string | undefined;
|
|
351
|
+
}[] | undefined;
|
|
336
352
|
author?: {
|
|
337
353
|
[x: string]: unknown;
|
|
338
354
|
name?: string | undefined;
|
|
@@ -516,6 +532,14 @@ export declare const CreatePKCWsServerOptionsSchema: z.ZodObject<{
|
|
|
516
532
|
postCid?: string | undefined;
|
|
517
533
|
quotedCids?: string[] | undefined;
|
|
518
534
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
535
|
+
gallery?: {
|
|
536
|
+
[x: string]: unknown;
|
|
537
|
+
url: string;
|
|
538
|
+
htmlTagName: "img" | "video" | "audio";
|
|
539
|
+
width?: number | undefined;
|
|
540
|
+
height?: number | undefined;
|
|
541
|
+
alt?: string | undefined;
|
|
542
|
+
}[] | undefined;
|
|
519
543
|
author?: {
|
|
520
544
|
[x: string]: unknown;
|
|
521
545
|
name?: string | undefined;
|
|
@@ -705,6 +729,14 @@ export declare const CreatePKCWsServerOptionsSchema: z.ZodObject<{
|
|
|
705
729
|
postCid?: string | undefined;
|
|
706
730
|
quotedCids?: string[] | undefined;
|
|
707
731
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
732
|
+
gallery?: {
|
|
733
|
+
[x: string]: unknown;
|
|
734
|
+
url: string;
|
|
735
|
+
htmlTagName: "img" | "video" | "audio";
|
|
736
|
+
width?: number | undefined;
|
|
737
|
+
height?: number | undefined;
|
|
738
|
+
alt?: string | undefined;
|
|
739
|
+
}[] | undefined;
|
|
708
740
|
author?: {
|
|
709
741
|
[x: string]: unknown;
|
|
710
742
|
name?: string | undefined;
|
|
@@ -1035,6 +1067,14 @@ export declare const CreatePKCWsServerOptionsSchema: z.ZodObject<{
|
|
|
1035
1067
|
postCid?: string | undefined;
|
|
1036
1068
|
quotedCids?: string[] | undefined;
|
|
1037
1069
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
1070
|
+
gallery?: {
|
|
1071
|
+
[x: string]: unknown;
|
|
1072
|
+
url: string;
|
|
1073
|
+
htmlTagName: "img" | "video" | "audio";
|
|
1074
|
+
width?: number | undefined;
|
|
1075
|
+
height?: number | undefined;
|
|
1076
|
+
alt?: string | undefined;
|
|
1077
|
+
}[] | undefined;
|
|
1038
1078
|
author?: {
|
|
1039
1079
|
[x: string]: unknown;
|
|
1040
1080
|
name?: string | undefined;
|
|
@@ -1104,6 +1144,14 @@ export declare const CreatePKCWsServerOptionsSchema: z.ZodObject<{
|
|
|
1104
1144
|
postCid?: string | undefined;
|
|
1105
1145
|
quotedCids?: string[] | undefined;
|
|
1106
1146
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
1147
|
+
gallery?: {
|
|
1148
|
+
[x: string]: unknown;
|
|
1149
|
+
url: string;
|
|
1150
|
+
htmlTagName: "img" | "video" | "audio";
|
|
1151
|
+
width?: number | undefined;
|
|
1152
|
+
height?: number | undefined;
|
|
1153
|
+
alt?: string | undefined;
|
|
1154
|
+
}[] | undefined;
|
|
1107
1155
|
author?: {
|
|
1108
1156
|
[x: string]: unknown;
|
|
1109
1157
|
name?: string | undefined;
|
|
@@ -1287,6 +1335,14 @@ export declare const CreatePKCWsServerOptionsSchema: z.ZodObject<{
|
|
|
1287
1335
|
postCid?: string | undefined;
|
|
1288
1336
|
quotedCids?: string[] | undefined;
|
|
1289
1337
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
1338
|
+
gallery?: {
|
|
1339
|
+
[x: string]: unknown;
|
|
1340
|
+
url: string;
|
|
1341
|
+
htmlTagName: "img" | "video" | "audio";
|
|
1342
|
+
width?: number | undefined;
|
|
1343
|
+
height?: number | undefined;
|
|
1344
|
+
alt?: string | undefined;
|
|
1345
|
+
}[] | undefined;
|
|
1290
1346
|
author?: {
|
|
1291
1347
|
[x: string]: unknown;
|
|
1292
1348
|
name?: string | undefined;
|
|
@@ -1476,6 +1532,14 @@ export declare const CreatePKCWsServerOptionsSchema: z.ZodObject<{
|
|
|
1476
1532
|
postCid?: string | undefined;
|
|
1477
1533
|
quotedCids?: string[] | undefined;
|
|
1478
1534
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
1535
|
+
gallery?: {
|
|
1536
|
+
[x: string]: unknown;
|
|
1537
|
+
url: string;
|
|
1538
|
+
htmlTagName: "img" | "video" | "audio";
|
|
1539
|
+
width?: number | undefined;
|
|
1540
|
+
height?: number | undefined;
|
|
1541
|
+
alt?: string | undefined;
|
|
1542
|
+
}[] | undefined;
|
|
1479
1543
|
author?: {
|
|
1480
1544
|
[x: string]: unknown;
|
|
1481
1545
|
name?: string | undefined;
|
|
@@ -2012,6 +2076,14 @@ export declare const SetNewSettingsPKCWsServerSchema: z.ZodObject<{
|
|
|
2012
2076
|
postCid?: string | undefined;
|
|
2013
2077
|
quotedCids?: string[] | undefined;
|
|
2014
2078
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
2079
|
+
gallery?: {
|
|
2080
|
+
[x: string]: unknown;
|
|
2081
|
+
url: string;
|
|
2082
|
+
htmlTagName: "img" | "video" | "audio";
|
|
2083
|
+
width?: number | undefined;
|
|
2084
|
+
height?: number | undefined;
|
|
2085
|
+
alt?: string | undefined;
|
|
2086
|
+
}[] | undefined;
|
|
2015
2087
|
author?: {
|
|
2016
2088
|
[x: string]: unknown;
|
|
2017
2089
|
name?: string | undefined;
|
|
@@ -2081,6 +2153,14 @@ export declare const SetNewSettingsPKCWsServerSchema: z.ZodObject<{
|
|
|
2081
2153
|
postCid?: string | undefined;
|
|
2082
2154
|
quotedCids?: string[] | undefined;
|
|
2083
2155
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
2156
|
+
gallery?: {
|
|
2157
|
+
[x: string]: unknown;
|
|
2158
|
+
url: string;
|
|
2159
|
+
htmlTagName: "img" | "video" | "audio";
|
|
2160
|
+
width?: number | undefined;
|
|
2161
|
+
height?: number | undefined;
|
|
2162
|
+
alt?: string | undefined;
|
|
2163
|
+
}[] | undefined;
|
|
2084
2164
|
author?: {
|
|
2085
2165
|
[x: string]: unknown;
|
|
2086
2166
|
name?: string | undefined;
|
|
@@ -2264,6 +2344,14 @@ export declare const SetNewSettingsPKCWsServerSchema: z.ZodObject<{
|
|
|
2264
2344
|
postCid?: string | undefined;
|
|
2265
2345
|
quotedCids?: string[] | undefined;
|
|
2266
2346
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
2347
|
+
gallery?: {
|
|
2348
|
+
[x: string]: unknown;
|
|
2349
|
+
url: string;
|
|
2350
|
+
htmlTagName: "img" | "video" | "audio";
|
|
2351
|
+
width?: number | undefined;
|
|
2352
|
+
height?: number | undefined;
|
|
2353
|
+
alt?: string | undefined;
|
|
2354
|
+
}[] | undefined;
|
|
2267
2355
|
author?: {
|
|
2268
2356
|
[x: string]: unknown;
|
|
2269
2357
|
name?: string | undefined;
|
|
@@ -2453,6 +2541,14 @@ export declare const SetNewSettingsPKCWsServerSchema: z.ZodObject<{
|
|
|
2453
2541
|
postCid?: string | undefined;
|
|
2454
2542
|
quotedCids?: string[] | undefined;
|
|
2455
2543
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
2544
|
+
gallery?: {
|
|
2545
|
+
[x: string]: unknown;
|
|
2546
|
+
url: string;
|
|
2547
|
+
htmlTagName: "img" | "video" | "audio";
|
|
2548
|
+
width?: number | undefined;
|
|
2549
|
+
height?: number | undefined;
|
|
2550
|
+
alt?: string | undefined;
|
|
2551
|
+
}[] | undefined;
|
|
2456
2552
|
author?: {
|
|
2457
2553
|
[x: string]: unknown;
|
|
2458
2554
|
name?: string | undefined;
|
|
@@ -2570,6 +2666,14 @@ export declare const SetNewSettingsPKCWsServerSchema: z.ZodObject<{
|
|
|
2570
2666
|
postCid?: string | undefined;
|
|
2571
2667
|
quotedCids?: string[] | undefined;
|
|
2572
2668
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
2669
|
+
gallery?: {
|
|
2670
|
+
[x: string]: unknown;
|
|
2671
|
+
url: string;
|
|
2672
|
+
htmlTagName: "img" | "video" | "audio";
|
|
2673
|
+
width?: number | undefined;
|
|
2674
|
+
height?: number | undefined;
|
|
2675
|
+
alt?: string | undefined;
|
|
2676
|
+
}[] | undefined;
|
|
2573
2677
|
author?: {
|
|
2574
2678
|
[x: string]: unknown;
|
|
2575
2679
|
name?: string | undefined;
|
|
@@ -2639,6 +2743,14 @@ export declare const SetNewSettingsPKCWsServerSchema: z.ZodObject<{
|
|
|
2639
2743
|
postCid?: string | undefined;
|
|
2640
2744
|
quotedCids?: string[] | undefined;
|
|
2641
2745
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
2746
|
+
gallery?: {
|
|
2747
|
+
[x: string]: unknown;
|
|
2748
|
+
url: string;
|
|
2749
|
+
htmlTagName: "img" | "video" | "audio";
|
|
2750
|
+
width?: number | undefined;
|
|
2751
|
+
height?: number | undefined;
|
|
2752
|
+
alt?: string | undefined;
|
|
2753
|
+
}[] | undefined;
|
|
2642
2754
|
author?: {
|
|
2643
2755
|
[x: string]: unknown;
|
|
2644
2756
|
name?: string | undefined;
|
|
@@ -2822,6 +2934,14 @@ export declare const SetNewSettingsPKCWsServerSchema: z.ZodObject<{
|
|
|
2822
2934
|
postCid?: string | undefined;
|
|
2823
2935
|
quotedCids?: string[] | undefined;
|
|
2824
2936
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
2937
|
+
gallery?: {
|
|
2938
|
+
[x: string]: unknown;
|
|
2939
|
+
url: string;
|
|
2940
|
+
htmlTagName: "img" | "video" | "audio";
|
|
2941
|
+
width?: number | undefined;
|
|
2942
|
+
height?: number | undefined;
|
|
2943
|
+
alt?: string | undefined;
|
|
2944
|
+
}[] | undefined;
|
|
2825
2945
|
author?: {
|
|
2826
2946
|
[x: string]: unknown;
|
|
2827
2947
|
name?: string | undefined;
|
|
@@ -3011,6 +3131,14 @@ export declare const SetNewSettingsPKCWsServerSchema: z.ZodObject<{
|
|
|
3011
3131
|
postCid?: string | undefined;
|
|
3012
3132
|
quotedCids?: string[] | undefined;
|
|
3013
3133
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
3134
|
+
gallery?: {
|
|
3135
|
+
[x: string]: unknown;
|
|
3136
|
+
url: string;
|
|
3137
|
+
htmlTagName: "img" | "video" | "audio";
|
|
3138
|
+
width?: number | undefined;
|
|
3139
|
+
height?: number | undefined;
|
|
3140
|
+
alt?: string | undefined;
|
|
3141
|
+
}[] | undefined;
|
|
3014
3142
|
author?: {
|
|
3015
3143
|
[x: string]: unknown;
|
|
3016
3144
|
name?: string | undefined;
|
|
@@ -3533,6 +3661,14 @@ export declare const PKCWsServerSettingsSerializedSchema: z.ZodObject<{
|
|
|
3533
3661
|
postCid?: string | undefined;
|
|
3534
3662
|
quotedCids?: string[] | undefined;
|
|
3535
3663
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
3664
|
+
gallery?: {
|
|
3665
|
+
[x: string]: unknown;
|
|
3666
|
+
url: string;
|
|
3667
|
+
htmlTagName: "img" | "video" | "audio";
|
|
3668
|
+
width?: number | undefined;
|
|
3669
|
+
height?: number | undefined;
|
|
3670
|
+
alt?: string | undefined;
|
|
3671
|
+
}[] | undefined;
|
|
3536
3672
|
author?: {
|
|
3537
3673
|
[x: string]: unknown;
|
|
3538
3674
|
name?: string | undefined;
|
|
@@ -3602,6 +3738,14 @@ export declare const PKCWsServerSettingsSerializedSchema: z.ZodObject<{
|
|
|
3602
3738
|
postCid?: string | undefined;
|
|
3603
3739
|
quotedCids?: string[] | undefined;
|
|
3604
3740
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
3741
|
+
gallery?: {
|
|
3742
|
+
[x: string]: unknown;
|
|
3743
|
+
url: string;
|
|
3744
|
+
htmlTagName: "img" | "video" | "audio";
|
|
3745
|
+
width?: number | undefined;
|
|
3746
|
+
height?: number | undefined;
|
|
3747
|
+
alt?: string | undefined;
|
|
3748
|
+
}[] | undefined;
|
|
3605
3749
|
author?: {
|
|
3606
3750
|
[x: string]: unknown;
|
|
3607
3751
|
name?: string | undefined;
|
|
@@ -3785,6 +3929,14 @@ export declare const PKCWsServerSettingsSerializedSchema: z.ZodObject<{
|
|
|
3785
3929
|
postCid?: string | undefined;
|
|
3786
3930
|
quotedCids?: string[] | undefined;
|
|
3787
3931
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
3932
|
+
gallery?: {
|
|
3933
|
+
[x: string]: unknown;
|
|
3934
|
+
url: string;
|
|
3935
|
+
htmlTagName: "img" | "video" | "audio";
|
|
3936
|
+
width?: number | undefined;
|
|
3937
|
+
height?: number | undefined;
|
|
3938
|
+
alt?: string | undefined;
|
|
3939
|
+
}[] | undefined;
|
|
3788
3940
|
author?: {
|
|
3789
3941
|
[x: string]: unknown;
|
|
3790
3942
|
name?: string | undefined;
|
|
@@ -3974,6 +4126,14 @@ export declare const PKCWsServerSettingsSerializedSchema: z.ZodObject<{
|
|
|
3974
4126
|
postCid?: string | undefined;
|
|
3975
4127
|
quotedCids?: string[] | undefined;
|
|
3976
4128
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
4129
|
+
gallery?: {
|
|
4130
|
+
[x: string]: unknown;
|
|
4131
|
+
url: string;
|
|
4132
|
+
htmlTagName: "img" | "video" | "audio";
|
|
4133
|
+
width?: number | undefined;
|
|
4134
|
+
height?: number | undefined;
|
|
4135
|
+
alt?: string | undefined;
|
|
4136
|
+
}[] | undefined;
|
|
3977
4137
|
author?: {
|
|
3978
4138
|
[x: string]: unknown;
|
|
3979
4139
|
name?: string | undefined;
|
|
@@ -4091,6 +4251,14 @@ export declare const PKCWsServerSettingsSerializedSchema: z.ZodObject<{
|
|
|
4091
4251
|
postCid?: string | undefined;
|
|
4092
4252
|
quotedCids?: string[] | undefined;
|
|
4093
4253
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
4254
|
+
gallery?: {
|
|
4255
|
+
[x: string]: unknown;
|
|
4256
|
+
url: string;
|
|
4257
|
+
htmlTagName: "img" | "video" | "audio";
|
|
4258
|
+
width?: number | undefined;
|
|
4259
|
+
height?: number | undefined;
|
|
4260
|
+
alt?: string | undefined;
|
|
4261
|
+
}[] | undefined;
|
|
4094
4262
|
author?: {
|
|
4095
4263
|
[x: string]: unknown;
|
|
4096
4264
|
name?: string | undefined;
|
|
@@ -4160,6 +4328,14 @@ export declare const PKCWsServerSettingsSerializedSchema: z.ZodObject<{
|
|
|
4160
4328
|
postCid?: string | undefined;
|
|
4161
4329
|
quotedCids?: string[] | undefined;
|
|
4162
4330
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
4331
|
+
gallery?: {
|
|
4332
|
+
[x: string]: unknown;
|
|
4333
|
+
url: string;
|
|
4334
|
+
htmlTagName: "img" | "video" | "audio";
|
|
4335
|
+
width?: number | undefined;
|
|
4336
|
+
height?: number | undefined;
|
|
4337
|
+
alt?: string | undefined;
|
|
4338
|
+
}[] | undefined;
|
|
4163
4339
|
author?: {
|
|
4164
4340
|
[x: string]: unknown;
|
|
4165
4341
|
name?: string | undefined;
|
|
@@ -4343,6 +4519,14 @@ export declare const PKCWsServerSettingsSerializedSchema: z.ZodObject<{
|
|
|
4343
4519
|
postCid?: string | undefined;
|
|
4344
4520
|
quotedCids?: string[] | undefined;
|
|
4345
4521
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
4522
|
+
gallery?: {
|
|
4523
|
+
[x: string]: unknown;
|
|
4524
|
+
url: string;
|
|
4525
|
+
htmlTagName: "img" | "video" | "audio";
|
|
4526
|
+
width?: number | undefined;
|
|
4527
|
+
height?: number | undefined;
|
|
4528
|
+
alt?: string | undefined;
|
|
4529
|
+
}[] | undefined;
|
|
4346
4530
|
author?: {
|
|
4347
4531
|
[x: string]: unknown;
|
|
4348
4532
|
name?: string | undefined;
|
|
@@ -4532,6 +4716,14 @@ export declare const PKCWsServerSettingsSerializedSchema: z.ZodObject<{
|
|
|
4532
4716
|
postCid?: string | undefined;
|
|
4533
4717
|
quotedCids?: string[] | undefined;
|
|
4534
4718
|
crosspost?: import("../../publications/comment/schema.js").Crosspost | undefined;
|
|
4719
|
+
gallery?: {
|
|
4720
|
+
[x: string]: unknown;
|
|
4721
|
+
url: string;
|
|
4722
|
+
htmlTagName: "img" | "video" | "audio";
|
|
4723
|
+
width?: number | undefined;
|
|
4724
|
+
height?: number | undefined;
|
|
4725
|
+
alt?: string | undefined;
|
|
4726
|
+
}[] | undefined;
|
|
4535
4727
|
author?: {
|
|
4536
4728
|
[x: string]: unknown;
|
|
4537
4729
|
name?: string | undefined;
|
|
@@ -294,6 +294,7 @@ export class DbHandler {
|
|
|
294
294
|
pseudonymityMode TEXT NULLABLE,
|
|
295
295
|
quotedCids TEXT NULLABLE, -- JSON array
|
|
296
296
|
crosspost TEXT NULLABLE, -- JSON: {cid, comment} of the comment this one reposts, stored verbatim so the embedded record keeps reproducing its cid
|
|
297
|
+
gallery TEXT NULLABLE, -- JSON array of media items, stored verbatim since items are loose and author-signed
|
|
297
298
|
extraProps TEXT NULLABLE, -- JSON
|
|
298
299
|
challengeCommentUpdate TEXT NULLABLE, -- JSON: challenge-supplied partial CommentUpdate seeded into queryCalculatedCommentUpdate with lowest priority
|
|
299
300
|
protocolVersion TEXT NOT NULL,
|
|
@@ -977,8 +978,8 @@ export class DbHandler {
|
|
|
977
978
|
// Adding a new column to the comments table requires updating this list manually, which is error-prone.
|
|
978
979
|
const stmt = this._db.prepare(`
|
|
979
980
|
INSERT INTO ${TABLES.COMMENTS}
|
|
980
|
-
(cid, authorSignerAddress, author, link, linkWidth, linkHeight, thumbnailUrl, thumbnailUrlWidth, thumbnailUrlHeight, parentCid, postCid, previousCid, communityPublicKey, communityName, content, timestamp, signature, originalCommentSignatureEncoded, title, depth, linkHtmlTagName, flairs, spoiler, pendingApproval, number, postNumber, nsfw, pseudonymityMode, quotedCids, crosspost, extraProps, challengeCommentUpdate, protocolVersion, insertedAt)
|
|
981
|
-
VALUES (@cid, @authorSignerAddress, @author, @link, @linkWidth, @linkHeight, @thumbnailUrl, @thumbnailUrlWidth, @thumbnailUrlHeight, @parentCid, @postCid, @previousCid, @communityPublicKey, @communityName, @content, @timestamp, @signature, @originalCommentSignatureEncoded, @title, @depth, @linkHtmlTagName, @flairs, @spoiler, @pendingApproval, @number, @postNumber, @nsfw, @pseudonymityMode, @quotedCids, @crosspost, @extraProps, @challengeCommentUpdate, @protocolVersion, @insertedAt)
|
|
981
|
+
(cid, authorSignerAddress, author, link, linkWidth, linkHeight, thumbnailUrl, thumbnailUrlWidth, thumbnailUrlHeight, parentCid, postCid, previousCid, communityPublicKey, communityName, content, timestamp, signature, originalCommentSignatureEncoded, title, depth, linkHtmlTagName, flairs, spoiler, pendingApproval, number, postNumber, nsfw, pseudonymityMode, quotedCids, crosspost, gallery, extraProps, challengeCommentUpdate, protocolVersion, insertedAt)
|
|
982
|
+
VALUES (@cid, @authorSignerAddress, @author, @link, @linkWidth, @linkHeight, @thumbnailUrl, @thumbnailUrlWidth, @thumbnailUrlHeight, @parentCid, @postCid, @previousCid, @communityPublicKey, @communityName, @content, @timestamp, @signature, @originalCommentSignatureEncoded, @title, @depth, @linkHtmlTagName, @flairs, @spoiler, @pendingApproval, @number, @postNumber, @nsfw, @pseudonymityMode, @quotedCids, @crosspost, @gallery, @extraProps, @challengeCommentUpdate, @protocolVersion, @insertedAt)
|
|
982
983
|
`);
|
|
983
984
|
// Create default object with null values for all columns
|
|
984
985
|
const defaults = mapToObj(columnNames, (column) => [column, null]);
|