founder-schema 0.1.0 → 0.2.0
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 +112 -40
- package/dist/chat.d.ts +63 -15
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +55 -17
- package/dist/chat.js.map +1 -1
- package/dist/common.d.ts +84 -8
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +109 -17
- package/dist/common.js.map +1 -1
- package/dist/discover.d.ts +98 -6
- package/dist/discover.d.ts.map +1 -1
- package/dist/discover.js +25 -11
- package/dist/discover.js.map +1 -1
- package/dist/errors.d.ts +85 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +89 -0
- package/dist/errors.js.map +1 -0
- package/dist/feed.d.ts +400 -52
- package/dist/feed.d.ts.map +1 -1
- package/dist/feed.js +98 -68
- package/dist/feed.js.map +1 -1
- package/dist/founder-profile.d.ts +76 -46
- package/dist/founder-profile.d.ts.map +1 -1
- package/dist/founder-profile.js +46 -46
- package/dist/founder-profile.js.map +1 -1
- package/dist/index.d.ts +14 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -10
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +76 -0
- package/dist/limits.d.ts.map +1 -0
- package/dist/limits.js +84 -0
- package/dist/limits.js.map +1 -0
- package/dist/onboarding.d.ts +407 -53
- package/dist/onboarding.d.ts.map +1 -1
- package/dist/onboarding.js +281 -234
- package/dist/onboarding.js.map +1 -1
- package/dist/responses/common.d.ts +122 -4
- package/dist/responses/common.d.ts.map +1 -1
- package/dist/responses/common.js +26 -3
- package/dist/responses/common.js.map +1 -1
- package/dist/responses/index.d.ts +1 -1
- package/dist/responses/index.d.ts.map +1 -1
- package/dist/responses/index.js +1 -1
- package/dist/responses/index.js.map +1 -1
- package/dist/uploads.d.ts +113 -0
- package/dist/uploads.d.ts.map +1 -0
- package/dist/uploads.js +106 -0
- package/dist/uploads.js.map +1 -0
- package/dist/validation.d.ts +136 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +142 -0
- package/dist/validation.js.map +1 -0
- package/package.json +4 -3
package/dist/errors.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* founder-schema — Every error code the API answers with
|
|
3
|
+
*
|
|
4
|
+
* THE CODE IS WHAT A CLIENT ACTS ON; the `message` beside it is English for
|
|
5
|
+
* logs and for a client too old to know the code. A client words each code in
|
|
6
|
+
* the member's language, and a test on the web side asserts every value here
|
|
7
|
+
* has a message in every locale it ships.
|
|
8
|
+
*
|
|
9
|
+
* Before 0.2.0 the backend kept this list to itself, and every domain refusal
|
|
10
|
+
* (a closed poll, a reply to a reply, the edit window) went out as
|
|
11
|
+
* `VALIDATION_ERROR` with an English sentence, so the only way for a client to
|
|
12
|
+
* tell them apart was to match on the wording.
|
|
13
|
+
*
|
|
14
|
+
* WHEN TO USE WHICH:
|
|
15
|
+
* - A request that does not match its schema: `VALIDATION_ERROR`, with every
|
|
16
|
+
* problem in `error.details.issues`.
|
|
17
|
+
* - A well-formed request the current STATE of things refuses: its own code
|
|
18
|
+
* below. These carry no issues; the code says it all.
|
|
19
|
+
*
|
|
20
|
+
* ⚠ Append freely; remove deliberately. A code removed here that an older
|
|
21
|
+
* server still sends fails the client's parse of the error envelope.
|
|
22
|
+
*
|
|
23
|
+
* @module founder-schema/errors
|
|
24
|
+
*/
|
|
25
|
+
import { z } from 'zod';
|
|
26
|
+
/**
|
|
27
|
+
* As a tuple, the way `GENDER_VALUES` is, so a consumer can iterate it (a
|
|
28
|
+
* translation-coverage test does exactly that) and TypeScript keeps the union.
|
|
29
|
+
*/
|
|
30
|
+
export const API_ERROR_CODE_VALUES = [
|
|
31
|
+
// ── Anything ──
|
|
32
|
+
/** A bug or an outage on our side. The message says nothing more on purpose. */
|
|
33
|
+
'INTERNAL_ERROR',
|
|
34
|
+
/** The request did not match its schema. `details.issues` says where. */
|
|
35
|
+
'VALIDATION_ERROR',
|
|
36
|
+
/** No such thing, or not one you may see. Deliberately the same answer. */
|
|
37
|
+
'NOT_FOUND',
|
|
38
|
+
/** Two writes raced for something unique; retrying usually succeeds. */
|
|
39
|
+
'CONFLICT',
|
|
40
|
+
/** Too many requests from this member or address. Wait, then retry. */
|
|
41
|
+
'RATE_LIMITED',
|
|
42
|
+
/** Something we depend on (the chat server) is down or not switched on. */
|
|
43
|
+
'SERVICE_UNAVAILABLE',
|
|
44
|
+
// ── Who you are ──
|
|
45
|
+
/** No credential at all. */
|
|
46
|
+
'UNAUTHORIZED',
|
|
47
|
+
/** A credential that is not ours, or not readable. */
|
|
48
|
+
'INVALID_TOKEN',
|
|
49
|
+
/** A credential that was ours and has expired. Refresh and retry. */
|
|
50
|
+
'TOKEN_EXPIRED',
|
|
51
|
+
/** Signed out everywhere, or the account changed. Sign in again. */
|
|
52
|
+
'SESSION_INVALIDATED',
|
|
53
|
+
/** Signed in, and not allowed to do this. */
|
|
54
|
+
'FORBIDDEN',
|
|
55
|
+
// ── Onboarding ──
|
|
56
|
+
/** Finish onboarding first. The client routes here instead of showing an error. */
|
|
57
|
+
'ONBOARDING_INCOMPLETE',
|
|
58
|
+
/** Onboarding is already finished; there is nothing to save or finish again. */
|
|
59
|
+
'ALREADY_ONBOARDED',
|
|
60
|
+
/** Under `MIN_AGE_YEARS`. Refused at the draft and again at finish. */
|
|
61
|
+
'UNDER_AGE',
|
|
62
|
+
// ── Uploads, at the moment one is attached ──
|
|
63
|
+
/** Not an upload of yours, or nothing was ever uploaded under that key. */
|
|
64
|
+
'UPLOAD_NOT_ATTACHABLE',
|
|
65
|
+
/** Larger than `UPLOAD_MAX_BYTES`. */
|
|
66
|
+
'UPLOAD_TOO_LARGE',
|
|
67
|
+
/** Not one of the image types this product accepts, or not an image at all. */
|
|
68
|
+
'UPLOAD_WRONG_TYPE',
|
|
69
|
+
// ── The feed ──
|
|
70
|
+
/** The post is older than `EDIT_WINDOW_MS`. */
|
|
71
|
+
'EDIT_WINDOW_CLOSED',
|
|
72
|
+
/** A poll is never editable: people have already voted on it. */
|
|
73
|
+
'POLL_NOT_EDITABLE',
|
|
74
|
+
/** The poll has closed, by the server's clock. */
|
|
75
|
+
'POLL_CLOSED',
|
|
76
|
+
/** No option, several on a single-choice poll, or an option that does not exist. */
|
|
77
|
+
'POLL_CHOICE_INVALID',
|
|
78
|
+
/** A reply to a reply. One level of nesting only. */
|
|
79
|
+
'REPLY_TOO_DEEP',
|
|
80
|
+
/** Reporting your own post, poll or comment. */
|
|
81
|
+
'CANNOT_REPORT_OWN',
|
|
82
|
+
// ── Chat ──
|
|
83
|
+
/** Opening a conversation with yourself. */
|
|
84
|
+
'CHAT_WITH_SELF',
|
|
85
|
+
];
|
|
86
|
+
export const apiErrorCodeSchema = z.enum(API_ERROR_CODE_VALUES);
|
|
87
|
+
/** The same codes by name: `API_ERROR_CODE.POLL_CLOSED`. */
|
|
88
|
+
export const API_ERROR_CODE = apiErrorCodeSchema.enum;
|
|
89
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,iBAAiB;IACjB,gFAAgF;IAChF,gBAAgB;IAChB,yEAAyE;IACzE,kBAAkB;IAClB,2EAA2E;IAC3E,WAAW;IACX,wEAAwE;IACxE,UAAU;IACV,uEAAuE;IACvE,cAAc;IACd,2EAA2E;IAC3E,qBAAqB;IAErB,oBAAoB;IACpB,4BAA4B;IAC5B,cAAc;IACd,sDAAsD;IACtD,eAAe;IACf,qEAAqE;IACrE,eAAe;IACf,oEAAoE;IACpE,qBAAqB;IACrB,6CAA6C;IAC7C,WAAW;IAEX,mBAAmB;IACnB,mFAAmF;IACnF,uBAAuB;IACvB,gFAAgF;IAChF,mBAAmB;IACnB,uEAAuE;IACvE,WAAW;IAEX,+CAA+C;IAC/C,2EAA2E;IAC3E,uBAAuB;IACvB,sCAAsC;IACtC,kBAAkB;IAClB,+EAA+E;IAC/E,mBAAmB;IAEnB,iBAAiB;IACjB,+CAA+C;IAC/C,oBAAoB;IACpB,iEAAiE;IACjE,mBAAmB;IACnB,kDAAkD;IAClD,aAAa;IACb,oFAAoF;IACpF,qBAAqB;IACrB,qDAAqD;IACrD,gBAAgB;IAChB,gDAAgD;IAChD,mBAAmB;IAEnB,aAAa;IACb,4CAA4C;IAC5C,gBAAgB;CACR,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAGhE,4DAA4D;AAC5D,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAC,IAAI,CAAC","sourcesContent":["/**\n * founder-schema — Every error code the API answers with\n *\n * THE CODE IS WHAT A CLIENT ACTS ON; the `message` beside it is English for\n * logs and for a client too old to know the code. A client words each code in\n * the member's language, and a test on the web side asserts every value here\n * has a message in every locale it ships.\n *\n * Before 0.2.0 the backend kept this list to itself, and every domain refusal\n * (a closed poll, a reply to a reply, the edit window) went out as\n * `VALIDATION_ERROR` with an English sentence, so the only way for a client to\n * tell them apart was to match on the wording.\n *\n * WHEN TO USE WHICH:\n * - A request that does not match its schema: `VALIDATION_ERROR`, with every\n * problem in `error.details.issues`.\n * - A well-formed request the current STATE of things refuses: its own code\n * below. These carry no issues; the code says it all.\n *\n * ⚠ Append freely; remove deliberately. A code removed here that an older\n * server still sends fails the client's parse of the error envelope.\n *\n * @module founder-schema/errors\n */\n\nimport { z } from 'zod';\n\n/**\n * As a tuple, the way `GENDER_VALUES` is, so a consumer can iterate it (a\n * translation-coverage test does exactly that) and TypeScript keeps the union.\n */\nexport const API_ERROR_CODE_VALUES = [\n // ── Anything ──\n /** A bug or an outage on our side. The message says nothing more on purpose. */\n 'INTERNAL_ERROR',\n /** The request did not match its schema. `details.issues` says where. */\n 'VALIDATION_ERROR',\n /** No such thing, or not one you may see. Deliberately the same answer. */\n 'NOT_FOUND',\n /** Two writes raced for something unique; retrying usually succeeds. */\n 'CONFLICT',\n /** Too many requests from this member or address. Wait, then retry. */\n 'RATE_LIMITED',\n /** Something we depend on (the chat server) is down or not switched on. */\n 'SERVICE_UNAVAILABLE',\n\n // ── Who you are ──\n /** No credential at all. */\n 'UNAUTHORIZED',\n /** A credential that is not ours, or not readable. */\n 'INVALID_TOKEN',\n /** A credential that was ours and has expired. Refresh and retry. */\n 'TOKEN_EXPIRED',\n /** Signed out everywhere, or the account changed. Sign in again. */\n 'SESSION_INVALIDATED',\n /** Signed in, and not allowed to do this. */\n 'FORBIDDEN',\n\n // ── Onboarding ──\n /** Finish onboarding first. The client routes here instead of showing an error. */\n 'ONBOARDING_INCOMPLETE',\n /** Onboarding is already finished; there is nothing to save or finish again. */\n 'ALREADY_ONBOARDED',\n /** Under `MIN_AGE_YEARS`. Refused at the draft and again at finish. */\n 'UNDER_AGE',\n\n // ── Uploads, at the moment one is attached ──\n /** Not an upload of yours, or nothing was ever uploaded under that key. */\n 'UPLOAD_NOT_ATTACHABLE',\n /** Larger than `UPLOAD_MAX_BYTES`. */\n 'UPLOAD_TOO_LARGE',\n /** Not one of the image types this product accepts, or not an image at all. */\n 'UPLOAD_WRONG_TYPE',\n\n // ── The feed ──\n /** The post is older than `EDIT_WINDOW_MS`. */\n 'EDIT_WINDOW_CLOSED',\n /** A poll is never editable: people have already voted on it. */\n 'POLL_NOT_EDITABLE',\n /** The poll has closed, by the server's clock. */\n 'POLL_CLOSED',\n /** No option, several on a single-choice poll, or an option that does not exist. */\n 'POLL_CHOICE_INVALID',\n /** A reply to a reply. One level of nesting only. */\n 'REPLY_TOO_DEEP',\n /** Reporting your own post, poll or comment. */\n 'CANNOT_REPORT_OWN',\n\n // ── Chat ──\n /** Opening a conversation with yourself. */\n 'CHAT_WITH_SELF',\n] as const;\n\nexport const apiErrorCodeSchema = z.enum(API_ERROR_CODE_VALUES);\nexport type ApiErrorCode = z.infer<typeof apiErrorCodeSchema>;\n\n/** The same codes by name: `API_ERROR_CODE.POLL_CLOSED`. */\nexport const API_ERROR_CODE = apiErrorCodeSchema.enum;\n"]}
|
package/dist/feed.d.ts
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* DELIBERATELY NOT PORTED, so nobody "restores" them:
|
|
15
15
|
* - the five civic verticals (lost_found, suggestions_complaints,
|
|
16
16
|
* donate_item, crowdfunding, event). `contentKind` here is post | poll
|
|
17
|
-
* only
|
|
17
|
+
* only; comment threads and bookmarks key off it, and reactions and
|
|
18
|
+
* reports off the same union plus `comment`.
|
|
18
19
|
* - official communities, designations, identity verification badges.
|
|
19
20
|
* - social score, and the whole area-proximity ranking vocabulary
|
|
20
21
|
* (local / district / state / national / global).
|
|
@@ -61,6 +62,16 @@ export declare const POLL_MAX_OPTIONS = 6;
|
|
|
61
62
|
export declare const POLL_MIN_DURATION_MS: number;
|
|
62
63
|
/** 30 days. */
|
|
63
64
|
export declare const POLL_MAX_DURATION_MS: number;
|
|
65
|
+
/**
|
|
66
|
+
* How long after writing it the author may still edit a post or a comment.
|
|
67
|
+
*
|
|
68
|
+
* A window rather than forever: an edit after people have reacted changes what
|
|
69
|
+
* they reacted to. Deletion has no window, because a member must always be able
|
|
70
|
+
* to remove their own words. The server is the gate (`EDIT_WINDOW_CLOSED`);
|
|
71
|
+
* a client uses this to stop offering Edit at the moment the server would
|
|
72
|
+
* start refusing it, instead of on the next reload.
|
|
73
|
+
*/
|
|
74
|
+
export declare const EDIT_WINDOW_MS: number;
|
|
64
75
|
/**
|
|
65
76
|
* What can appear in the feed. Two kinds, not seven.
|
|
66
77
|
*
|
|
@@ -75,6 +86,22 @@ export declare const contentKindSchema: z.ZodEnum<{
|
|
|
75
86
|
poll: "poll";
|
|
76
87
|
}>;
|
|
77
88
|
export type ContentKind = z.infer<typeof contentKindSchema>;
|
|
89
|
+
/**
|
|
90
|
+
* What a reaction or a report can point at: a feed item, or a comment on one.
|
|
91
|
+
*
|
|
92
|
+
* Wider than `ContentKind` on purpose. A comment carries reaction counts and a
|
|
93
|
+
* viewer reaction, and a comment can be abusive, so both reach it. A bookmark
|
|
94
|
+
* and a comment thread cannot: they take `ContentKind`. Until 0.2.0 the
|
|
95
|
+
* reaction and report RESPONSES were typed `ContentKind` while the routes
|
|
96
|
+
* accepted comments, so every answer about a comment broke this contract.
|
|
97
|
+
*/
|
|
98
|
+
export declare const ENGAGEMENT_TARGET_KIND_VALUES: readonly ["post", "poll", "comment"];
|
|
99
|
+
export declare const engagementTargetKindSchema: z.ZodEnum<{
|
|
100
|
+
post: "post";
|
|
101
|
+
poll: "poll";
|
|
102
|
+
comment: "comment";
|
|
103
|
+
}>;
|
|
104
|
+
export type EngagementTargetKind = z.infer<typeof engagementTargetKindSchema>;
|
|
78
105
|
/**
|
|
79
106
|
* Reactions. Jansathi's `support` is dropped: it exists for reacting to a
|
|
80
107
|
* civic complaint or a lost-and-found notice, which this feed does not carry.
|
|
@@ -197,9 +224,12 @@ export type FeedMedia = z.infer<typeof feedMediaSchema>;
|
|
|
197
224
|
* per scroll leaks every reader's address to that site and blocks the feed on
|
|
198
225
|
* somebody else's latency.
|
|
199
226
|
*
|
|
200
|
-
*
|
|
201
|
-
* `
|
|
202
|
-
* and
|
|
227
|
+
* Both URLs take `safeUrlSchema`: the scheme and host rules, WITHOUT the
|
|
228
|
+
* typed-URL cap. `url` came out of a post body, which is already capped as a
|
|
229
|
+
* whole, and `imageUrl` is whatever the remote page advertised; a long CDN URL
|
|
230
|
+
* is ordinary, and one over `LINK_URL_MAX` would otherwise fail the whole feed
|
|
231
|
+
* page it sits on. Neither is ours, so a consumer still treats both as
|
|
232
|
+
* untrusted at render.
|
|
203
233
|
*/
|
|
204
234
|
export declare const linkPreviewSchema: z.ZodObject<{
|
|
205
235
|
url: z.ZodURL;
|
|
@@ -798,28 +828,381 @@ export declare const feedCommentSchema: z.ZodObject<{
|
|
|
798
828
|
}, z.core.$strip>;
|
|
799
829
|
export type FeedComment = z.infer<typeof feedCommentSchema>;
|
|
800
830
|
/**
|
|
801
|
-
*
|
|
831
|
+
* `GET /api/v1/feed`. Inherits `limit` and `cursor`, which already tolerate an
|
|
802
832
|
* emptied control rather than answering 400.
|
|
803
833
|
*
|
|
804
|
-
* `
|
|
805
|
-
* feed
|
|
834
|
+
* `interests=true` narrows to the viewer's topics (falling back to the plain
|
|
835
|
+
* feed when they have none). `z.stringbool`, so `true`/`false`/`1`/`0` all
|
|
836
|
+
* read as a person means them; until 0.2.0 the backend read this parameter
|
|
837
|
+
* raw, outside the schema, and only the exact string `true` counted.
|
|
838
|
+
*
|
|
839
|
+
* ⚠ NO `authorId`. It was accepted here and then ignored by the server, so a
|
|
840
|
+
* profile page asking for one founder's posts silently got everybody's. A
|
|
841
|
+
* member's own posts are `GET /api/v1/feed/by-author/:userId`.
|
|
806
842
|
*/
|
|
807
843
|
export declare const feedQuerySchema: z.ZodObject<{
|
|
808
844
|
limit: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
|
|
809
845
|
cursor: z.ZodOptional<z.ZodString>;
|
|
810
|
-
sort: z.ZodDefault<z.ZodEnum<{
|
|
846
|
+
sort: z.ZodPreprocess<z.ZodDefault<z.ZodEnum<{
|
|
811
847
|
new: "new";
|
|
812
848
|
top: "top";
|
|
813
|
-
}
|
|
814
|
-
|
|
849
|
+
}>>, unknown>;
|
|
850
|
+
interests: z.ZodPreprocess<z.ZodDefault<z.ZodCodec<z.ZodString, z.ZodBoolean>>, unknown>;
|
|
815
851
|
}, z.core.$strip>;
|
|
816
852
|
export type FeedQuery = z.infer<typeof feedQuerySchema>;
|
|
853
|
+
export type FeedQueryInput = z.input<typeof feedQuerySchema>;
|
|
854
|
+
/** `GET /api/v1/feed/:contentKind/:contentId/comments`. */
|
|
817
855
|
export declare const commentsQuerySchema: z.ZodObject<{
|
|
818
856
|
limit: z.ZodPreprocess<z.ZodDefault<z.ZodCoercedNumber<unknown>>, unknown>;
|
|
819
857
|
cursor: z.ZodOptional<z.ZodString>;
|
|
820
|
-
parentCommentId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string
|
|
858
|
+
parentCommentId: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>, unknown>;
|
|
821
859
|
}, z.core.$strip>;
|
|
822
860
|
export type CommentsQuery = z.infer<typeof commentsQuerySchema>;
|
|
861
|
+
export type CommentsQueryInput = z.input<typeof commentsQuerySchema>;
|
|
862
|
+
/**
|
|
863
|
+
* Every id and kind in a feed URL, as a schema, so a bad one answers exactly
|
|
864
|
+
* as a bad body field does: 400 `VALIDATION_ERROR`, the issue at
|
|
865
|
+
* `location: 'params'`. Until 0.2.0 these were hand checks that answered
|
|
866
|
+
* "Invalid id." with no issues at all, and the comment routes never looked at
|
|
867
|
+
* `:contentKind`.
|
|
868
|
+
*/
|
|
869
|
+
/** `GET /feed/:id`, the permalink. */
|
|
870
|
+
export declare const feedItemParamsSchema: z.ZodObject<{
|
|
871
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
872
|
+
}, z.core.$strip>;
|
|
873
|
+
/** `PATCH|DELETE /feed/:contentId`. */
|
|
874
|
+
export declare const contentParamsSchema: z.ZodObject<{
|
|
875
|
+
contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
876
|
+
}, z.core.$strip>;
|
|
877
|
+
/** A bookmark and a comment thread: a post or a poll. */
|
|
878
|
+
export declare const contentTargetParamsSchema: z.ZodObject<{
|
|
879
|
+
contentKind: z.ZodEnum<{
|
|
880
|
+
post: "post";
|
|
881
|
+
poll: "poll";
|
|
882
|
+
}>;
|
|
883
|
+
contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
884
|
+
}, z.core.$strip>;
|
|
885
|
+
/** A reaction and a report: a post, a poll or a comment. */
|
|
886
|
+
export declare const engagementTargetParamsSchema: z.ZodObject<{
|
|
887
|
+
contentKind: z.ZodEnum<{
|
|
888
|
+
post: "post";
|
|
889
|
+
poll: "poll";
|
|
890
|
+
comment: "comment";
|
|
891
|
+
}>;
|
|
892
|
+
contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
893
|
+
}, z.core.$strip>;
|
|
894
|
+
/** `POST|DELETE /feed/poll/:pollId/vote`. */
|
|
895
|
+
export declare const pollParamsSchema: z.ZodObject<{
|
|
896
|
+
pollId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
897
|
+
}, z.core.$strip>;
|
|
898
|
+
/** `DELETE /feed/comments/:commentId`. */
|
|
899
|
+
export declare const commentParamsSchema: z.ZodObject<{
|
|
900
|
+
commentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
901
|
+
}, z.core.$strip>;
|
|
902
|
+
/** `GET /feed/by-author/:userId`. */
|
|
903
|
+
export declare const authorParamsSchema: z.ZodObject<{
|
|
904
|
+
userId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
905
|
+
}, z.core.$strip>;
|
|
906
|
+
export type FeedItemParams = z.infer<typeof feedItemParamsSchema>;
|
|
907
|
+
export type ContentParams = z.infer<typeof contentParamsSchema>;
|
|
908
|
+
export type ContentTargetParams = z.infer<typeof contentTargetParamsSchema>;
|
|
909
|
+
export type EngagementTargetParams = z.infer<typeof engagementTargetParamsSchema>;
|
|
910
|
+
export type PollParams = z.infer<typeof pollParamsSchema>;
|
|
911
|
+
export type CommentParams = z.infer<typeof commentParamsSchema>;
|
|
912
|
+
export type AuthorParams = z.infer<typeof authorParamsSchema>;
|
|
913
|
+
/**
|
|
914
|
+
* A page of the feed, and of one member's posts (`by-author`), which is the
|
|
915
|
+
* same shape. `nextCursor` is null on the last page.
|
|
916
|
+
*/
|
|
917
|
+
export declare const feedPageSchema: z.ZodObject<{
|
|
918
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
919
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
920
|
+
contentKind: z.ZodLiteral<"post">;
|
|
921
|
+
author: z.ZodObject<{
|
|
922
|
+
userId: z.ZodString;
|
|
923
|
+
username: z.ZodString;
|
|
924
|
+
displayName: z.ZodString;
|
|
925
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
926
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
927
|
+
}, z.core.$strip>;
|
|
928
|
+
text: z.ZodString;
|
|
929
|
+
media: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
930
|
+
kind: z.ZodLiteral<"image">;
|
|
931
|
+
url: z.ZodURL;
|
|
932
|
+
thumbnailUrl: z.ZodOptional<z.ZodURL>;
|
|
933
|
+
width: z.ZodNumber;
|
|
934
|
+
height: z.ZodNumber;
|
|
935
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
936
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
937
|
+
kind: z.ZodLiteral<"video">;
|
|
938
|
+
url: z.ZodURL;
|
|
939
|
+
thumbnailUrl: z.ZodURL;
|
|
940
|
+
width: z.ZodNumber;
|
|
941
|
+
height: z.ZodNumber;
|
|
942
|
+
duration: z.ZodNumber;
|
|
943
|
+
}, z.core.$strip>], "kind">>;
|
|
944
|
+
linkPreview: z.ZodOptional<z.ZodObject<{
|
|
945
|
+
url: z.ZodURL;
|
|
946
|
+
title: z.ZodOptional<z.ZodString>;
|
|
947
|
+
description: z.ZodOptional<z.ZodString>;
|
|
948
|
+
imageUrl: z.ZodOptional<z.ZodURL>;
|
|
949
|
+
}, z.core.$strip>>;
|
|
950
|
+
topics: z.ZodArray<z.ZodEnum<{
|
|
951
|
+
ai_ml: "ai_ml";
|
|
952
|
+
b2b_saas: "b2b_saas";
|
|
953
|
+
d2c: "d2c";
|
|
954
|
+
deeptech: "deeptech";
|
|
955
|
+
robotics: "robotics";
|
|
956
|
+
growth: "growth";
|
|
957
|
+
sales: "sales";
|
|
958
|
+
marketing: "marketing";
|
|
959
|
+
supply_chain: "supply_chain";
|
|
960
|
+
fundraising: "fundraising";
|
|
961
|
+
mentoring: "mentoring";
|
|
962
|
+
leadership: "leadership";
|
|
963
|
+
networking: "networking";
|
|
964
|
+
public_speaking: "public_speaking";
|
|
965
|
+
teaching: "teaching";
|
|
966
|
+
hiring_talent: "hiring_talent";
|
|
967
|
+
personal_branding: "personal_branding";
|
|
968
|
+
career_transition: "career_transition";
|
|
969
|
+
remote_work: "remote_work";
|
|
970
|
+
blockchain: "blockchain";
|
|
971
|
+
crypto_web3: "crypto_web3";
|
|
972
|
+
data_science: "data_science";
|
|
973
|
+
cybersecurity: "cybersecurity";
|
|
974
|
+
game_dev: "game_dev";
|
|
975
|
+
ux_design: "ux_design";
|
|
976
|
+
app_development: "app_development";
|
|
977
|
+
open_source: "open_source";
|
|
978
|
+
electronics: "electronics";
|
|
979
|
+
space_exploration: "space_exploration";
|
|
980
|
+
green_tech: "green_tech";
|
|
981
|
+
no_code: "no_code";
|
|
982
|
+
entrepreneurship: "entrepreneurship";
|
|
983
|
+
investing: "investing";
|
|
984
|
+
stock_trading: "stock_trading";
|
|
985
|
+
personal_finance: "personal_finance";
|
|
986
|
+
consulting: "consulting";
|
|
987
|
+
ecommerce: "ecommerce";
|
|
988
|
+
retail: "retail";
|
|
989
|
+
real_estate: "real_estate";
|
|
990
|
+
product_management: "product_management";
|
|
991
|
+
meditation: "meditation";
|
|
992
|
+
journaling: "journaling";
|
|
993
|
+
self_improvement: "self_improvement";
|
|
994
|
+
productivity: "productivity";
|
|
995
|
+
reading: "reading";
|
|
996
|
+
online_courses: "online_courses";
|
|
997
|
+
philosophy: "philosophy";
|
|
998
|
+
psychology: "psychology";
|
|
999
|
+
therapy: "therapy";
|
|
1000
|
+
sleep_optimization: "sleep_optimization";
|
|
1001
|
+
gym: "gym";
|
|
1002
|
+
yoga: "yoga";
|
|
1003
|
+
photography: "photography";
|
|
1004
|
+
writing: "writing";
|
|
1005
|
+
graphic_design: "graphic_design";
|
|
1006
|
+
filmmaking: "filmmaking";
|
|
1007
|
+
digital_art: "digital_art";
|
|
1008
|
+
content_creation: "content_creation";
|
|
1009
|
+
blogging: "blogging";
|
|
1010
|
+
vlogging: "vlogging";
|
|
1011
|
+
podcasts: "podcasts";
|
|
1012
|
+
animation: "animation";
|
|
1013
|
+
music_production: "music_production";
|
|
1014
|
+
volunteering: "volunteering";
|
|
1015
|
+
ngo_work: "ngo_work";
|
|
1016
|
+
environmental: "environmental";
|
|
1017
|
+
women_empowerment: "women_empowerment";
|
|
1018
|
+
community_service: "community_service";
|
|
1019
|
+
social_enterprise: "social_enterprise";
|
|
1020
|
+
education_access: "education_access";
|
|
1021
|
+
}>>;
|
|
1022
|
+
commentCount: z.ZodNumber;
|
|
1023
|
+
reactionCounts: z.ZodRecord<z.ZodEnum<{
|
|
1024
|
+
like: "like";
|
|
1025
|
+
celebrate: "celebrate";
|
|
1026
|
+
insightful: "insightful";
|
|
1027
|
+
curious: "curious";
|
|
1028
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
1029
|
+
createdAt: z.ZodISODateTime;
|
|
1030
|
+
editedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1031
|
+
viewer: z.ZodOptional<z.ZodObject<{
|
|
1032
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
1033
|
+
like: "like";
|
|
1034
|
+
celebrate: "celebrate";
|
|
1035
|
+
insightful: "insightful";
|
|
1036
|
+
curious: "curious";
|
|
1037
|
+
}>>;
|
|
1038
|
+
bookmarked: z.ZodBoolean;
|
|
1039
|
+
isAuthor: z.ZodBoolean;
|
|
1040
|
+
canEdit: z.ZodBoolean;
|
|
1041
|
+
canDelete: z.ZodBoolean;
|
|
1042
|
+
canReport: z.ZodBoolean;
|
|
1043
|
+
}, z.core.$strip>>;
|
|
1044
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1045
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1046
|
+
contentKind: z.ZodLiteral<"poll">;
|
|
1047
|
+
author: z.ZodObject<{
|
|
1048
|
+
userId: z.ZodString;
|
|
1049
|
+
username: z.ZodString;
|
|
1050
|
+
displayName: z.ZodString;
|
|
1051
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
1052
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
1053
|
+
}, z.core.$strip>;
|
|
1054
|
+
question: z.ZodString;
|
|
1055
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1056
|
+
index: z.ZodNumber;
|
|
1057
|
+
label: z.ZodString;
|
|
1058
|
+
voteCount: z.ZodNumber;
|
|
1059
|
+
}, z.core.$strip>>;
|
|
1060
|
+
totalVoters: z.ZodNumber;
|
|
1061
|
+
allowsMultipleChoices: z.ZodBoolean;
|
|
1062
|
+
closesAt: z.ZodISODateTime;
|
|
1063
|
+
isClosed: z.ZodBoolean;
|
|
1064
|
+
topics: z.ZodArray<z.ZodEnum<{
|
|
1065
|
+
ai_ml: "ai_ml";
|
|
1066
|
+
b2b_saas: "b2b_saas";
|
|
1067
|
+
d2c: "d2c";
|
|
1068
|
+
deeptech: "deeptech";
|
|
1069
|
+
robotics: "robotics";
|
|
1070
|
+
growth: "growth";
|
|
1071
|
+
sales: "sales";
|
|
1072
|
+
marketing: "marketing";
|
|
1073
|
+
supply_chain: "supply_chain";
|
|
1074
|
+
fundraising: "fundraising";
|
|
1075
|
+
mentoring: "mentoring";
|
|
1076
|
+
leadership: "leadership";
|
|
1077
|
+
networking: "networking";
|
|
1078
|
+
public_speaking: "public_speaking";
|
|
1079
|
+
teaching: "teaching";
|
|
1080
|
+
hiring_talent: "hiring_talent";
|
|
1081
|
+
personal_branding: "personal_branding";
|
|
1082
|
+
career_transition: "career_transition";
|
|
1083
|
+
remote_work: "remote_work";
|
|
1084
|
+
blockchain: "blockchain";
|
|
1085
|
+
crypto_web3: "crypto_web3";
|
|
1086
|
+
data_science: "data_science";
|
|
1087
|
+
cybersecurity: "cybersecurity";
|
|
1088
|
+
game_dev: "game_dev";
|
|
1089
|
+
ux_design: "ux_design";
|
|
1090
|
+
app_development: "app_development";
|
|
1091
|
+
open_source: "open_source";
|
|
1092
|
+
electronics: "electronics";
|
|
1093
|
+
space_exploration: "space_exploration";
|
|
1094
|
+
green_tech: "green_tech";
|
|
1095
|
+
no_code: "no_code";
|
|
1096
|
+
entrepreneurship: "entrepreneurship";
|
|
1097
|
+
investing: "investing";
|
|
1098
|
+
stock_trading: "stock_trading";
|
|
1099
|
+
personal_finance: "personal_finance";
|
|
1100
|
+
consulting: "consulting";
|
|
1101
|
+
ecommerce: "ecommerce";
|
|
1102
|
+
retail: "retail";
|
|
1103
|
+
real_estate: "real_estate";
|
|
1104
|
+
product_management: "product_management";
|
|
1105
|
+
meditation: "meditation";
|
|
1106
|
+
journaling: "journaling";
|
|
1107
|
+
self_improvement: "self_improvement";
|
|
1108
|
+
productivity: "productivity";
|
|
1109
|
+
reading: "reading";
|
|
1110
|
+
online_courses: "online_courses";
|
|
1111
|
+
philosophy: "philosophy";
|
|
1112
|
+
psychology: "psychology";
|
|
1113
|
+
therapy: "therapy";
|
|
1114
|
+
sleep_optimization: "sleep_optimization";
|
|
1115
|
+
gym: "gym";
|
|
1116
|
+
yoga: "yoga";
|
|
1117
|
+
photography: "photography";
|
|
1118
|
+
writing: "writing";
|
|
1119
|
+
graphic_design: "graphic_design";
|
|
1120
|
+
filmmaking: "filmmaking";
|
|
1121
|
+
digital_art: "digital_art";
|
|
1122
|
+
content_creation: "content_creation";
|
|
1123
|
+
blogging: "blogging";
|
|
1124
|
+
vlogging: "vlogging";
|
|
1125
|
+
podcasts: "podcasts";
|
|
1126
|
+
animation: "animation";
|
|
1127
|
+
music_production: "music_production";
|
|
1128
|
+
volunteering: "volunteering";
|
|
1129
|
+
ngo_work: "ngo_work";
|
|
1130
|
+
environmental: "environmental";
|
|
1131
|
+
women_empowerment: "women_empowerment";
|
|
1132
|
+
community_service: "community_service";
|
|
1133
|
+
social_enterprise: "social_enterprise";
|
|
1134
|
+
education_access: "education_access";
|
|
1135
|
+
}>>;
|
|
1136
|
+
commentCount: z.ZodNumber;
|
|
1137
|
+
reactionCounts: z.ZodRecord<z.ZodEnum<{
|
|
1138
|
+
like: "like";
|
|
1139
|
+
celebrate: "celebrate";
|
|
1140
|
+
insightful: "insightful";
|
|
1141
|
+
curious: "curious";
|
|
1142
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
1143
|
+
createdAt: z.ZodISODateTime;
|
|
1144
|
+
editedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1145
|
+
viewer: z.ZodOptional<z.ZodObject<{
|
|
1146
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
1147
|
+
like: "like";
|
|
1148
|
+
celebrate: "celebrate";
|
|
1149
|
+
insightful: "insightful";
|
|
1150
|
+
curious: "curious";
|
|
1151
|
+
}>>;
|
|
1152
|
+
bookmarked: z.ZodBoolean;
|
|
1153
|
+
isAuthor: z.ZodBoolean;
|
|
1154
|
+
canEdit: z.ZodBoolean;
|
|
1155
|
+
canDelete: z.ZodBoolean;
|
|
1156
|
+
canReport: z.ZodBoolean;
|
|
1157
|
+
votedOptionIndices: z.ZodArray<z.ZodNumber>;
|
|
1158
|
+
}, z.core.$strip>>;
|
|
1159
|
+
}, z.core.$strip>], "contentKind">>;
|
|
1160
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
1161
|
+
}, z.core.$strip>;
|
|
1162
|
+
export type FeedPage = z.infer<typeof feedPageSchema>;
|
|
1163
|
+
/** A page of a thread: top-level comments, or one comment's replies. */
|
|
1164
|
+
export declare const commentPageSchema: z.ZodObject<{
|
|
1165
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1166
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1167
|
+
contentKind: z.ZodEnum<{
|
|
1168
|
+
post: "post";
|
|
1169
|
+
poll: "poll";
|
|
1170
|
+
}>;
|
|
1171
|
+
contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1172
|
+
parentCommentId: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
1173
|
+
author: z.ZodObject<{
|
|
1174
|
+
userId: z.ZodString;
|
|
1175
|
+
username: z.ZodString;
|
|
1176
|
+
displayName: z.ZodString;
|
|
1177
|
+
avatarUrl: z.ZodOptional<z.ZodURL>;
|
|
1178
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
1179
|
+
}, z.core.$strip>;
|
|
1180
|
+
text: z.ZodString;
|
|
1181
|
+
replyCount: z.ZodNumber;
|
|
1182
|
+
reactionCounts: z.ZodRecord<z.ZodEnum<{
|
|
1183
|
+
like: "like";
|
|
1184
|
+
celebrate: "celebrate";
|
|
1185
|
+
insightful: "insightful";
|
|
1186
|
+
curious: "curious";
|
|
1187
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
1188
|
+
createdAt: z.ZodISODateTime;
|
|
1189
|
+
editedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
1190
|
+
viewer: z.ZodOptional<z.ZodObject<{
|
|
1191
|
+
reaction: z.ZodNullable<z.ZodEnum<{
|
|
1192
|
+
like: "like";
|
|
1193
|
+
celebrate: "celebrate";
|
|
1194
|
+
insightful: "insightful";
|
|
1195
|
+
curious: "curious";
|
|
1196
|
+
}>>;
|
|
1197
|
+
isAuthor: z.ZodBoolean;
|
|
1198
|
+
canEdit: z.ZodBoolean;
|
|
1199
|
+
canDelete: z.ZodBoolean;
|
|
1200
|
+
canReport: z.ZodBoolean;
|
|
1201
|
+
}, z.core.$strip>>;
|
|
1202
|
+
}, z.core.$strip>>;
|
|
1203
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
1204
|
+
}, z.core.$strip>;
|
|
1205
|
+
export type CommentPage = z.infer<typeof commentPageSchema>;
|
|
823
1206
|
/**
|
|
824
1207
|
* ⚠️ Every write body below is its own object with NO defaults, and none of
|
|
825
1208
|
* them is built with `.pick().partial()`. `.partial()` does not switch off
|
|
@@ -831,10 +1214,11 @@ export type CommentsQuery = z.infer<typeof commentsQuerySchema>;
|
|
|
831
1214
|
* deliberately not a URL.
|
|
832
1215
|
*
|
|
833
1216
|
* Upload happens first, straight to storage, and the composer sends back the
|
|
834
|
-
* key it was given. The server resolves that
|
|
835
|
-
*
|
|
1217
|
+
* key it was given (`uploadKeySchema`, in `uploads`). The server resolves that
|
|
1218
|
+
* key to the URL, dimensions and poster frame it reads from the object itself,
|
|
1219
|
+
* and those become the read shape.
|
|
836
1220
|
*
|
|
837
|
-
*
|
|
1221
|
+
* ⚠ The first draft of this took the full read shape, URL included. That is
|
|
838
1222
|
* the same hole that was closed on the profile: a URL in a write body is a
|
|
839
1223
|
* member-supplied URL, so a post could have carried `javascript:` in an image
|
|
840
1224
|
* source, and nothing downstream re-checks a value the server itself stored.
|
|
@@ -845,45 +1229,7 @@ export type CommentsQuery = z.infer<typeof commentsQuerySchema>;
|
|
|
845
1229
|
* properties of the uploaded object, so the server reads them from the object;
|
|
846
1230
|
* taking them from the client would let a caller claim a 1x1 image and collapse
|
|
847
1231
|
* the card.
|
|
848
|
-
*
|
|
849
|
-
* FORMAT, set by the backend (hary, 2026-09-21), minted server-side and never
|
|
850
|
-
* by a client:
|
|
851
|
-
*
|
|
852
|
-
* media/<userId>/<uuid>.<ext>
|
|
853
|
-
*
|
|
854
|
-
* ⚠️ THIS SCHEMA IS THE FIRST OF THREE CHECKS AND THE WEAKEST. It proves the
|
|
855
|
-
* key is well FORMED. It cannot prove the two things that actually matter, and
|
|
856
|
-
* nobody should read a green parse as though it had:
|
|
857
|
-
*
|
|
858
|
-
* 1. OWNERSHIP. The `userId` segment is what makes "is this your object"
|
|
859
|
-
* checkable, and the backend compares it against the authenticated caller.
|
|
860
|
-
* A pattern happily accepts a perfectly well-formed key belonging to
|
|
861
|
-
* somebody else, which is the exact attack taking a key was meant to stop.
|
|
862
|
-
* 2. EXISTENCE. The backend calls HeadObject before writing the post, so a
|
|
863
|
-
* key for an object nobody uploaded cannot be committed.
|
|
864
|
-
*
|
|
865
|
-
* The length ceiling and the traversal refusal below are redundant against this
|
|
866
|
-
* pattern, which is anchored and admits no dots outside the extension. They are
|
|
867
|
-
* kept on purpose: they are what still holds if this pattern is ever loosened.
|
|
868
|
-
*/
|
|
869
|
-
export declare const UPLOAD_KEY_MAX_CHARS = 300;
|
|
870
|
-
/**
|
|
871
|
-
* ⚠️ IMAGES ONLY, and that is now a product decision rather than an oversight.
|
|
872
|
-
*
|
|
873
|
-
* The asymmetry was real and was raised: `feedVideoSchema` is in the read union
|
|
874
|
-
* and a card can render a video, while nothing could ever upload one. The user
|
|
875
|
-
* settled it on 2026-09-21: members upload images, and share video by putting a
|
|
876
|
-
* link in the post text, which the client renders inline. So the minter stays
|
|
877
|
-
* images-only by intent.
|
|
878
|
-
*
|
|
879
|
-
* `feedVideoSchema` is deliberately KEPT. Widening the write path later is
|
|
880
|
-
* additive; removing video from the read union once a client handles it is not.
|
|
881
|
-
* A test named for refusing a video key holds this visible, so whoever adds
|
|
882
|
-
* video uploads has to delete a test that says out loud why it exists.
|
|
883
1232
|
*/
|
|
884
|
-
export declare const UPLOAD_KEY_EXTENSIONS: readonly ["jpg", "jpeg", "png", "webp", "gif"];
|
|
885
|
-
export declare const uploadKeySchema: z.ZodString;
|
|
886
|
-
export type UploadKey = z.infer<typeof uploadKeySchema>;
|
|
887
1233
|
export declare const attachedMediaSchema: z.ZodObject<{
|
|
888
1234
|
uploadKey: z.ZodString;
|
|
889
1235
|
alt: z.ZodOptional<z.ZodString>;
|
|
@@ -1095,6 +1441,7 @@ export declare const setReactionResponseSchema: z.ZodObject<{
|
|
|
1095
1441
|
contentKind: z.ZodEnum<{
|
|
1096
1442
|
post: "post";
|
|
1097
1443
|
poll: "poll";
|
|
1444
|
+
comment: "comment";
|
|
1098
1445
|
}>;
|
|
1099
1446
|
contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1100
1447
|
reaction: z.ZodNullable<z.ZodEnum<{
|
|
@@ -1171,6 +1518,7 @@ export declare const createReportResponseSchema: z.ZodObject<{
|
|
|
1171
1518
|
contentKind: z.ZodEnum<{
|
|
1172
1519
|
post: "post";
|
|
1173
1520
|
poll: "poll";
|
|
1521
|
+
comment: "comment";
|
|
1174
1522
|
}>;
|
|
1175
1523
|
contentId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
1176
1524
|
alreadyReported: z.ZodBoolean;
|
package/dist/feed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../src/feed.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../src/feed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAC;AACxC;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,iEAAiE;AACjE,eAAO,MAAM,oBAAoB,QAAgB,CAAC;AAClD,eAAe;AACf,eAAO,MAAM,oBAAoB,QAA2B,CAAC;AAE7D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,QAAiB,CAAC;AAI7C;;;;;;;GAOG;AACH,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