@zyacreatives/shared 2.5.77 → 2.5.79
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/schemas/chat.d.ts +6 -0
- package/dist/schemas/chat.js +6 -1
- package/dist/schemas/comment.d.ts +72 -0
- package/dist/schemas/comment.js +15 -1
- package/dist/schemas/common.d.ts +5 -0
- package/dist/schemas/common.js +4 -1
- package/dist/schemas/discipline.d.ts +6 -0
- package/dist/schemas/discipline.js +5 -1
- package/dist/schemas/feed.d.ts +106 -0
- package/dist/schemas/feed.js +6 -1
- package/dist/schemas/file.d.ts +16 -0
- package/dist/schemas/file.js +12 -1
- package/dist/schemas/investor-shortlist.d.ts +9 -0
- package/dist/schemas/investor-shortlist.js +6 -1
- package/dist/schemas/investor-signal.d.ts +9 -0
- package/dist/schemas/investor-signal.js +6 -1
- package/dist/schemas/job-application.d.ts +41 -0
- package/dist/schemas/job-application.js +10 -1
- package/dist/schemas/job.d.ts +1 -0
- package/dist/schemas/message.d.ts +22 -8
- package/dist/schemas/message.js +14 -2
- package/dist/schemas/payout-method.d.ts +9 -0
- package/dist/schemas/payout-method.js +8 -1
- package/dist/schemas/post.d.ts +11 -11
- package/dist/schemas/post.js +1 -1
- package/dist/schemas/product.d.ts +4 -0
- package/dist/schemas/product.js +4 -1
- package/dist/schemas/transaction.d.ts +72 -1
- package/dist/schemas/transaction.js +36 -1
- package/dist/schemas/user.d.ts +41 -3
- package/dist/schemas/user.js +15 -1
- package/docs/backend-openapi-shared-contracts-handoff.md +193 -0
- package/package.json +1 -1
- package/src/schemas/chat.ts +25 -17
- package/src/schemas/comment.ts +40 -8
- package/src/schemas/common.ts +18 -11
- package/src/schemas/discipline.ts +24 -10
- package/src/schemas/feed.ts +18 -7
- package/src/schemas/file.ts +37 -13
- package/src/schemas/investor-shortlist.ts +30 -15
- package/src/schemas/investor-signal.ts +36 -21
- package/src/schemas/job-application.ts +34 -15
- package/src/schemas/job.ts +11 -9
- package/src/schemas/message.ts +30 -7
- package/src/schemas/payout-method.ts +18 -5
- package/src/schemas/post.ts +1 -1
- package/src/schemas/product.ts +15 -9
- package/src/schemas/transaction.ts +61 -8
- package/src/schemas/user.ts +44 -16
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# Backend OpenAPI Shared Contracts Handoff
|
|
2
|
+
|
|
3
|
+
Shared now exports the backend OpenAPI request/response contracts that were previously defined locally in backend route files. After publishing this package, update the backend dependency and replace the local schemas with top-level imports from `@zyacreatives/shared`.
|
|
4
|
+
|
|
5
|
+
## Publish Target
|
|
6
|
+
|
|
7
|
+
- Package: `@zyacreatives/shared`
|
|
8
|
+
- Current source version: `2.5.79`
|
|
9
|
+
- Import style: prefer `@zyacreatives/shared` over deep imports such as `@zyacreatives/shared/dist/schemas/comment`.
|
|
10
|
+
|
|
11
|
+
## Highest Priority Replacements
|
|
12
|
+
|
|
13
|
+
### User Purchase Library
|
|
14
|
+
|
|
15
|
+
Backend sources:
|
|
16
|
+
- `src/api/user/user.openapi.ts`
|
|
17
|
+
- `src/api/transaction/transaction.services.ts`
|
|
18
|
+
|
|
19
|
+
Shared exports:
|
|
20
|
+
- `PurchaseLibraryInputSchema`
|
|
21
|
+
- `PurchaseLibraryItemSchema`
|
|
22
|
+
- `PurchaseLibraryOutputSchema`
|
|
23
|
+
- `type PurchaseLibraryInput`
|
|
24
|
+
- `type PurchaseLibraryItem`
|
|
25
|
+
- `type PurchaseLibraryOutput`
|
|
26
|
+
|
|
27
|
+
Backend migration notes:
|
|
28
|
+
- Replace the local OpenAPI schemas in `user.openapi.ts`.
|
|
29
|
+
- Remove duplicated `PurchaseLibraryItem` / purchase result service types in `transaction.services.ts` and infer/use the shared types instead.
|
|
30
|
+
|
|
31
|
+
### Chat Reports And Chat List Query
|
|
32
|
+
|
|
33
|
+
Backend source:
|
|
34
|
+
- `src/api/chat/chat.openapi.ts`
|
|
35
|
+
|
|
36
|
+
Shared exports:
|
|
37
|
+
- `ReportChatInputSchema`
|
|
38
|
+
- `ReportChatOutputSchema`
|
|
39
|
+
- `ChatListQuerySchema`
|
|
40
|
+
- `type ReportChatInput`
|
|
41
|
+
- `type ReportChatOutput`
|
|
42
|
+
- `type ChatListQuery`
|
|
43
|
+
|
|
44
|
+
### Job Dashboard / Application Status Outputs
|
|
45
|
+
|
|
46
|
+
Backend sources:
|
|
47
|
+
- `src/api/job/job.openapi.ts`
|
|
48
|
+
- `src/entity/job.entity.ts`
|
|
49
|
+
|
|
50
|
+
Shared exports:
|
|
51
|
+
- `NormalizedJobSchema`
|
|
52
|
+
- `type NormalizedJob`
|
|
53
|
+
- `GetCreatedJobsOutputSchema`
|
|
54
|
+
- `GetApplicationStatusUpdatesCountOutputSchema`
|
|
55
|
+
- `JobApplicationIdInputSchema`
|
|
56
|
+
- `GetApplicationsForJobOutputSchema`
|
|
57
|
+
|
|
58
|
+
Backend migration notes:
|
|
59
|
+
- Use shared `NormalizedJobSchema` for OpenAPI responses.
|
|
60
|
+
- `NormalizedJobSchema` remains compatible with the existing shared job entity schemas.
|
|
61
|
+
- `JobApplicationIdInputSchema` uses `{ applicationId: string }` for the path param.
|
|
62
|
+
|
|
63
|
+
### Comment Threads And Replies
|
|
64
|
+
|
|
65
|
+
Backend sources:
|
|
66
|
+
- `src/api/comment/comment.openapi.ts`
|
|
67
|
+
- `src/api/project/project.openapi.ts`
|
|
68
|
+
|
|
69
|
+
Shared exports:
|
|
70
|
+
- `CommentThreadResponseSchema`
|
|
71
|
+
- `CommentRepliesOutputSchema`
|
|
72
|
+
- `CommentIdInputSchema`
|
|
73
|
+
- `ProjectCommentParamsSchema`
|
|
74
|
+
|
|
75
|
+
Backend migration notes:
|
|
76
|
+
- Replace deep `CommentEntitySchema` imports with top-level imports from `@zyacreatives/shared`.
|
|
77
|
+
|
|
78
|
+
### Payout Method Utility Inputs
|
|
79
|
+
|
|
80
|
+
Backend source:
|
|
81
|
+
- `src/api/payout-method/payout-method.openapi.ts`
|
|
82
|
+
|
|
83
|
+
Shared exports:
|
|
84
|
+
- `GetBanksInputSchema`
|
|
85
|
+
- `VerifyAccountInputSchema`
|
|
86
|
+
- `type GetBanksInput`
|
|
87
|
+
- `type VerifyAccountInput`
|
|
88
|
+
|
|
89
|
+
## Medium Priority Replacements
|
|
90
|
+
|
|
91
|
+
### User Auth / Mentions / Feed Preferences
|
|
92
|
+
|
|
93
|
+
Backend source:
|
|
94
|
+
- `src/api/user/user.openapi.ts`
|
|
95
|
+
|
|
96
|
+
Shared exports:
|
|
97
|
+
- `UserAuthStatusEntitySchema`
|
|
98
|
+
- `DeactivateAccountInputSchema`
|
|
99
|
+
- `MentionableUsersInputSchema`
|
|
100
|
+
- `MentionableUsersOutputSchema`
|
|
101
|
+
- `UserWithJobBookmarksInputSchema`
|
|
102
|
+
- `FeedTagsInputSchema`
|
|
103
|
+
- `FeedTagsSchema`
|
|
104
|
+
|
|
105
|
+
### Feed Variant Output
|
|
106
|
+
|
|
107
|
+
Backend source:
|
|
108
|
+
- `src/api/feed/feed.openapi.ts`
|
|
109
|
+
|
|
110
|
+
Shared export:
|
|
111
|
+
- `GetFeedWithCommentPolicyOutputSchema`
|
|
112
|
+
|
|
113
|
+
Note:
|
|
114
|
+
- If this is now the canonical feed response, consider replacing or aliasing backend usage of any older local feed output schema.
|
|
115
|
+
|
|
116
|
+
### Messages Delete And Params
|
|
117
|
+
|
|
118
|
+
Backend sources:
|
|
119
|
+
- `src/api/message/message.openapi.ts`
|
|
120
|
+
- `src/api/message/message.services.ts`
|
|
121
|
+
|
|
122
|
+
Shared exports:
|
|
123
|
+
- `ChatIdParamSchema`
|
|
124
|
+
- `MessageParamsSchema`
|
|
125
|
+
- `DeleteMessagesInputSchema`
|
|
126
|
+
- `type DeleteMessagesInput`
|
|
127
|
+
|
|
128
|
+
### Investor Signal / Shortlist Checks
|
|
129
|
+
|
|
130
|
+
Backend sources:
|
|
131
|
+
- `src/api/investor-signal/investor-signal.openapi.ts`
|
|
132
|
+
- `src/api/investor-shortlist-item/investor-shortlist-item.openapi.ts`
|
|
133
|
+
|
|
134
|
+
Shared exports:
|
|
135
|
+
- `CheckInvestorSignalOutputSchema`
|
|
136
|
+
- `CheckInvestorShortlistItemOutputSchema`
|
|
137
|
+
- `InvestorSignalIdInputSchema`
|
|
138
|
+
- `InvestorShortlistItemIdInputSchema`
|
|
139
|
+
- `DefaultApiSuccessOutputSchema`
|
|
140
|
+
|
|
141
|
+
### File Route Params And JSend URL Response
|
|
142
|
+
|
|
143
|
+
Backend source:
|
|
144
|
+
- `src/api/file/file.openapi.ts`
|
|
145
|
+
|
|
146
|
+
Shared exports:
|
|
147
|
+
- `PurchasedDownloadUrlInputSchema`
|
|
148
|
+
- `PublicFileUrlInputSchema`
|
|
149
|
+
- `PresignedUrlJSendOutputSchema`
|
|
150
|
+
|
|
151
|
+
## Low Priority / Primitive Replacements
|
|
152
|
+
|
|
153
|
+
### Entity Id Params
|
|
154
|
+
|
|
155
|
+
Backend sources:
|
|
156
|
+
- `src/api/product/product.openapi.ts`
|
|
157
|
+
- `src/api/transaction/transaction.openapi.ts`
|
|
158
|
+
- `src/api/job/job.openapi.ts`
|
|
159
|
+
- inline investor module params
|
|
160
|
+
|
|
161
|
+
Shared exports:
|
|
162
|
+
- `ProductIdInputSchema`
|
|
163
|
+
- `TransactionIdInputSchema`
|
|
164
|
+
- `JobIdSchema`
|
|
165
|
+
- `ApplicationIdInputSchema`
|
|
166
|
+
- `IdInputSchema`
|
|
167
|
+
|
|
168
|
+
### Discipline Tags Query
|
|
169
|
+
|
|
170
|
+
Backend source:
|
|
171
|
+
- `src/api/discipline/discipline.openapi.ts`
|
|
172
|
+
|
|
173
|
+
Shared exports:
|
|
174
|
+
- `GetDisciplineTagsInputSchema`
|
|
175
|
+
- `GetDisciplineTagsOutputSchema`
|
|
176
|
+
|
|
177
|
+
## Suggested Backend Migration Order
|
|
178
|
+
|
|
179
|
+
1. Update `@zyacreatives/shared` in backend `package.json` after publishing.
|
|
180
|
+
2. Replace local OpenAPI schemas listed above with top-level shared imports.
|
|
181
|
+
3. Remove duplicated service-level types where shared now exports matching types.
|
|
182
|
+
4. Replace deep shared imports with top-level `@zyacreatives/shared` imports.
|
|
183
|
+
5. Regenerate OpenAPI output.
|
|
184
|
+
6. Run backend typecheck and route/OpenAPI tests.
|
|
185
|
+
|
|
186
|
+
## Verification Completed In Shared
|
|
187
|
+
|
|
188
|
+
The shared package typechecks successfully with:
|
|
189
|
+
|
|
190
|
+
```sh
|
|
191
|
+
pnpm.cmd tsc
|
|
192
|
+
```
|
|
193
|
+
|
package/package.json
CHANGED
package/src/schemas/chat.ts
CHANGED
|
@@ -72,9 +72,9 @@ export const CreateChatInputSchema = z.object({
|
|
|
72
72
|
|
|
73
73
|
export type CreateChatInput = z.infer<typeof CreateChatInputSchema>;
|
|
74
74
|
|
|
75
|
-
export const ChatIdInputSchema = z.object({
|
|
76
|
-
chatId: z.cuid2(),
|
|
77
|
-
});
|
|
75
|
+
export const ChatIdInputSchema = z.object({
|
|
76
|
+
chatId: z.cuid2(),
|
|
77
|
+
});
|
|
78
78
|
|
|
79
79
|
export type ChatIdInput = z.infer<typeof ChatIdInputSchema>;
|
|
80
80
|
|
|
@@ -118,17 +118,25 @@ export type GetMessageRequestsForUserOutput = z.infer<
|
|
|
118
118
|
typeof GetMessageRequestsForUserOutputSchema
|
|
119
119
|
>;
|
|
120
120
|
|
|
121
|
-
export const ReportChatInputSchema = z.object({
|
|
122
|
-
complaint: z.string().trim().min(10).max(1000),
|
|
123
|
-
messageId: z.cuid2().optional(),
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
export type ReportChatInput = z.infer<typeof ReportChatInputSchema
|
|
127
|
-
|
|
128
|
-
export const ReportChatOutputSchema = z.object({
|
|
129
|
-
reported: z.boolean(),
|
|
130
|
-
chatId: z.string(),
|
|
131
|
-
messageId: z.string().nullable(),
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
export type ReportChatOutput = z.infer<typeof ReportChatOutputSchema
|
|
121
|
+
export const ReportChatInputSchema = z.object({
|
|
122
|
+
complaint: z.string().trim().min(10).max(1000),
|
|
123
|
+
messageId: z.cuid2().optional(),
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export type ReportChatInput = z.infer<typeof ReportChatInputSchema>;
|
|
127
|
+
|
|
128
|
+
export const ReportChatOutputSchema = z.object({
|
|
129
|
+
reported: z.boolean(),
|
|
130
|
+
chatId: z.string(),
|
|
131
|
+
messageId: z.string().nullable(),
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
export type ReportChatOutput = z.infer<typeof ReportChatOutputSchema>;
|
|
135
|
+
|
|
136
|
+
export const ChatListQuerySchema = z.object({
|
|
137
|
+
cursor: z.string().optional(),
|
|
138
|
+
query: z.string().trim().max(100).optional(),
|
|
139
|
+
limit: z.coerce.number().int().min(1).max(100).default(20),
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
export type ChatListQuery = z.infer<typeof ChatListQuerySchema>;
|
package/src/schemas/comment.ts
CHANGED
|
@@ -59,11 +59,26 @@ export const CreateCommentInputSchema = z.object({
|
|
|
59
59
|
|
|
60
60
|
export type CreateCommentInput = z.infer<typeof CreateCommentInputSchema>;
|
|
61
61
|
|
|
62
|
-
export const DeleteCommentInputSchema = z.object({
|
|
63
|
-
commentId: z.cuid2(),
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
export type DeleteCommentInput = z.infer<typeof DeleteCommentInputSchema>;
|
|
62
|
+
export const DeleteCommentInputSchema = z.object({
|
|
63
|
+
commentId: z.cuid2(),
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export type DeleteCommentInput = z.infer<typeof DeleteCommentInputSchema>;
|
|
67
|
+
|
|
68
|
+
export const CommentIdInputSchema = z.object({
|
|
69
|
+
commentId: z.cuid2(),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export type CommentIdInput = z.infer<typeof CommentIdInputSchema>;
|
|
73
|
+
|
|
74
|
+
export const ProjectCommentParamsSchema = z.object({
|
|
75
|
+
projectId: z.cuid2(),
|
|
76
|
+
commentId: z.cuid2(),
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export type ProjectCommentParams = z.infer<
|
|
80
|
+
typeof ProjectCommentParamsSchema
|
|
81
|
+
>;
|
|
67
82
|
|
|
68
83
|
/**
|
|
69
84
|
* --------------------------------
|
|
@@ -71,6 +86,23 @@ export type DeleteCommentInput = z.infer<typeof DeleteCommentInputSchema>;
|
|
|
71
86
|
* --------------------------------
|
|
72
87
|
*/
|
|
73
88
|
|
|
74
|
-
export const CommentOutputSchema = CommentEntitySchema;
|
|
75
|
-
|
|
76
|
-
export type CommentOutput = z.infer<typeof CommentOutputSchema>;
|
|
89
|
+
export const CommentOutputSchema = CommentEntitySchema;
|
|
90
|
+
|
|
91
|
+
export type CommentOutput = z.infer<typeof CommentOutputSchema>;
|
|
92
|
+
|
|
93
|
+
export const CommentThreadResponseSchema = z.object({
|
|
94
|
+
comments: z.array(CommentEntitySchema),
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
export type CommentThreadResponse = z.infer<
|
|
98
|
+
typeof CommentThreadResponseSchema
|
|
99
|
+
>;
|
|
100
|
+
|
|
101
|
+
export const CommentRepliesOutputSchema = z.object({
|
|
102
|
+
replies: z.array(CommentEntitySchema),
|
|
103
|
+
nextCursor: z.string().nullable(),
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
export type CommentRepliesOutput = z.infer<
|
|
107
|
+
typeof CommentRepliesOutputSchema
|
|
108
|
+
>;
|
package/src/schemas/common.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { CommentEntitySchema } from "./comment";
|
|
3
|
-
import { ActivitySchema } from "./activity";
|
|
4
|
-
import { LINK_TYPES } from "../constants";
|
|
5
|
-
|
|
6
|
-
export const CuidSchema = z.cuid2({ error: "Invalid CUID2 is written." });
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
import { CommentEntitySchema } from "./comment";
|
|
3
|
+
import { ActivitySchema } from "./activity";
|
|
4
|
+
import { LINK_TYPES } from "../constants";
|
|
5
|
+
|
|
6
|
+
export const CuidSchema = z.cuid2({ error: "Invalid CUID2 is written." });
|
|
7
|
+
|
|
8
|
+
export const IdInputSchema = z.object({
|
|
9
|
+
id: z.cuid2(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type IdInput = z.infer<typeof IdInputSchema>;
|
|
7
13
|
|
|
8
14
|
export const UserIdentifierSchema = z.object({
|
|
9
15
|
by: z.enum(["id", "username"]).optional().default("id"),
|
|
@@ -23,11 +29,12 @@ export const ProjectIdentifierSchema = z.object({
|
|
|
23
29
|
|
|
24
30
|
export type ProjectIdentifier = z.infer<typeof ProjectIdentifierSchema>;
|
|
25
31
|
|
|
26
|
-
export const DefaultApiSuccessOutputSchema = z.object({
|
|
27
|
-
status: z.literal("success"),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export type ApiSuccessOutput = z.infer<typeof DefaultApiSuccessOutputSchema>;
|
|
32
|
+
export const DefaultApiSuccessOutputSchema = z.object({
|
|
33
|
+
status: z.literal("success"),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export type ApiSuccessOutput = z.infer<typeof DefaultApiSuccessOutputSchema>;
|
|
37
|
+
export type DefaultApiSuccessOutput = ApiSuccessOutput;
|
|
31
38
|
|
|
32
39
|
export const EntityCommentsOutputSchema = z.object({
|
|
33
40
|
comments: z.array(CommentEntitySchema),
|
|
@@ -85,11 +85,19 @@ export const GetDisciplinesInputSchema = z.object({
|
|
|
85
85
|
|
|
86
86
|
export type GetDisciplinesInput = z.infer<typeof GetDisciplinesInputSchema>;
|
|
87
87
|
|
|
88
|
-
export const SlugInputSchema = z.object({
|
|
89
|
-
slug: z.string().max(128),
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
export type SlugInput = z.infer<typeof SlugInputSchema>;
|
|
88
|
+
export const SlugInputSchema = z.object({
|
|
89
|
+
slug: z.string().max(128),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export type SlugInput = z.infer<typeof SlugInputSchema>;
|
|
93
|
+
|
|
94
|
+
export const GetDisciplineTagsInputSchema = z.object({
|
|
95
|
+
substring: z.string(),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export type GetDisciplineTagsInput = z.infer<
|
|
99
|
+
typeof GetDisciplineTagsInputSchema
|
|
100
|
+
>;
|
|
93
101
|
|
|
94
102
|
/**
|
|
95
103
|
* --------------------------------
|
|
@@ -113,8 +121,14 @@ export type CreateDisciplinesOutput = z.infer<
|
|
|
113
121
|
typeof CreateDisciplinesOutputSchema
|
|
114
122
|
>;
|
|
115
123
|
|
|
116
|
-
export const GetDisciplinesOutputSchema = z.object({
|
|
117
|
-
disciplines: z.array(DisciplineEntitySchema),
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
export type GetDisciplinesOutput = z.infer<typeof GetDisciplinesOutputSchema>;
|
|
124
|
+
export const GetDisciplinesOutputSchema = z.object({
|
|
125
|
+
disciplines: z.array(DisciplineEntitySchema),
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
export type GetDisciplinesOutput = z.infer<typeof GetDisciplinesOutputSchema>;
|
|
129
|
+
|
|
130
|
+
export const GetDisciplineTagsOutputSchema = z.array(z.string());
|
|
131
|
+
|
|
132
|
+
export type GetDisciplineTagsOutput = z.infer<
|
|
133
|
+
typeof GetDisciplineTagsOutputSchema
|
|
134
|
+
>;
|
package/src/schemas/feed.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { z } from "@hono/zod-openapi";
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
|
|
3
|
+
import { FeedPostEntitySchema } from "./post";
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* --------------------------------
|
|
@@ -64,11 +66,20 @@ export const FeedTagsOutputSchema = FeedTagsEntitySchema;
|
|
|
64
66
|
|
|
65
67
|
export type FeedTagsOutput = z.infer<typeof FeedTagsOutputSchema>;
|
|
66
68
|
|
|
67
|
-
export const TrendingUsersOutputSchema = z.object({
|
|
68
|
-
creators: z.array(TrendingUserSchema),
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
export type TrendingUsersOutput = z.infer<typeof TrendingUsersOutputSchema>;
|
|
69
|
+
export const TrendingUsersOutputSchema = z.object({
|
|
70
|
+
creators: z.array(TrendingUserSchema),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export type TrendingUsersOutput = z.infer<typeof TrendingUsersOutputSchema>;
|
|
74
|
+
|
|
75
|
+
export const GetFeedWithCommentPolicyOutputSchema = z.object({
|
|
76
|
+
feed: z.array(FeedPostEntitySchema),
|
|
77
|
+
nextCursor: z.string().optional(),
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export type GetFeedWithCommentPolicyOutput = z.infer<
|
|
81
|
+
typeof GetFeedWithCommentPolicyOutputSchema
|
|
82
|
+
>;
|
|
72
83
|
|
|
73
84
|
export const FeedTagsInputSchema = z.object({
|
|
74
85
|
tags: z.array(z.string().min(1)).default([]),
|
|
@@ -79,4 +90,4 @@ export const FeedTagsSchema = z.object({
|
|
|
79
90
|
tags: z.array(z.string()),
|
|
80
91
|
});
|
|
81
92
|
|
|
82
|
-
export type FeedTagsInput = z.infer<typeof FeedTagsInputSchema>;
|
|
93
|
+
export type FeedTagsInput = z.infer<typeof FeedTagsInputSchema>;
|
package/src/schemas/file.ts
CHANGED
|
@@ -86,13 +86,28 @@ export type GetPresignedUploadUrlInput = z.infer<
|
|
|
86
86
|
typeof GetPresignedUploadUrlInputSchema
|
|
87
87
|
>;
|
|
88
88
|
|
|
89
|
-
export const GetPresignedDownloadUrlInputSchema = z.object({
|
|
90
|
-
fileId: z.cuid2(),
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
export type GetPresignedDownloadUrlInput = z.infer<
|
|
94
|
-
typeof GetPresignedDownloadUrlInputSchema
|
|
95
|
-
>;
|
|
89
|
+
export const GetPresignedDownloadUrlInputSchema = z.object({
|
|
90
|
+
fileId: z.cuid2(),
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export type GetPresignedDownloadUrlInput = z.infer<
|
|
94
|
+
typeof GetPresignedDownloadUrlInputSchema
|
|
95
|
+
>;
|
|
96
|
+
|
|
97
|
+
export const PurchasedDownloadUrlInputSchema = z.object({
|
|
98
|
+
productId: z.cuid2(),
|
|
99
|
+
fileId: z.cuid2(),
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export type PurchasedDownloadUrlInput = z.infer<
|
|
103
|
+
typeof PurchasedDownloadUrlInputSchema
|
|
104
|
+
>;
|
|
105
|
+
|
|
106
|
+
export const PublicFileUrlInputSchema = z.object({
|
|
107
|
+
fileId: z.cuid2().openapi({ example: "ckq7t9yb40001q9l5z6a5c7fg" }),
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
export type PublicFileUrlInput = z.infer<typeof PublicFileUrlInputSchema>;
|
|
96
111
|
|
|
97
112
|
/**
|
|
98
113
|
* --------------------------------
|
|
@@ -118,9 +133,18 @@ export type GetPresignedUploadUrlOutput = z.infer<
|
|
|
118
133
|
typeof GetPresignedUploadUrlOutputSchema
|
|
119
134
|
>;
|
|
120
135
|
|
|
121
|
-
export const GetPresignedDownloadUrlOutputSchema =
|
|
122
|
-
GetPresignedUploadUrlOutputSchema;
|
|
123
|
-
|
|
124
|
-
export type GetPresignedDownloadUrlOutput = z.infer<
|
|
125
|
-
typeof GetPresignedDownloadUrlOutputSchema
|
|
126
|
-
>;
|
|
136
|
+
export const GetPresignedDownloadUrlOutputSchema =
|
|
137
|
+
GetPresignedUploadUrlOutputSchema;
|
|
138
|
+
|
|
139
|
+
export type GetPresignedDownloadUrlOutput = z.infer<
|
|
140
|
+
typeof GetPresignedDownloadUrlOutputSchema
|
|
141
|
+
>;
|
|
142
|
+
|
|
143
|
+
export const PresignedUrlJSendOutputSchema = z.object({
|
|
144
|
+
status: z.string(),
|
|
145
|
+
data: GetPresignedDownloadUrlOutputSchema,
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
export type PresignedUrlJSendOutput = z.infer<
|
|
149
|
+
typeof PresignedUrlJSendOutputSchema
|
|
150
|
+
>;
|
|
@@ -55,13 +55,19 @@ export type CreateInvestorShortlistInput = z.infer<
|
|
|
55
55
|
typeof CreateInvestorShortlistInputSchema
|
|
56
56
|
>;
|
|
57
57
|
|
|
58
|
-
export const GetInvestorShortlistInputSchema = z.object({
|
|
59
|
-
cursor: z.string().optional(),
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
export type GetInvestorShortlistInput = z.infer<
|
|
63
|
-
typeof GetInvestorShortlistInputSchema
|
|
64
|
-
>;
|
|
58
|
+
export const GetInvestorShortlistInputSchema = z.object({
|
|
59
|
+
cursor: z.string().optional(),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export type GetInvestorShortlistInput = z.infer<
|
|
63
|
+
typeof GetInvestorShortlistInputSchema
|
|
64
|
+
>;
|
|
65
|
+
|
|
66
|
+
export const InvestorShortlistItemIdInputSchema = z.object({ id: z.cuid2() });
|
|
67
|
+
|
|
68
|
+
export type InvestorShortlistItemIdInput = z.infer<
|
|
69
|
+
typeof InvestorShortlistItemIdInputSchema
|
|
70
|
+
>;
|
|
65
71
|
|
|
66
72
|
/**
|
|
67
73
|
* --------------------------------
|
|
@@ -69,11 +75,20 @@ export type GetInvestorShortlistInput = z.infer<
|
|
|
69
75
|
* --------------------------------
|
|
70
76
|
*/
|
|
71
77
|
|
|
72
|
-
export const GetInvestorShortlistOutputSchema = z.object({
|
|
73
|
-
nextCursor: z.string().optional(),
|
|
74
|
-
shortlistItems: z.array(InvestorShortlistEntitySchema),
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
export type GetInvestorShortlistOutput = z.infer<
|
|
78
|
-
typeof GetInvestorShortlistOutputSchema
|
|
79
|
-
>;
|
|
78
|
+
export const GetInvestorShortlistOutputSchema = z.object({
|
|
79
|
+
nextCursor: z.string().optional(),
|
|
80
|
+
shortlistItems: z.array(InvestorShortlistEntitySchema),
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export type GetInvestorShortlistOutput = z.infer<
|
|
84
|
+
typeof GetInvestorShortlistOutputSchema
|
|
85
|
+
>;
|
|
86
|
+
|
|
87
|
+
export const CheckInvestorShortlistItemOutputSchema = z.object({
|
|
88
|
+
exists: z.boolean(),
|
|
89
|
+
shortlistItemId: z.string().nullable(),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export type CheckInvestorShortlistItemOutput = z.infer<
|
|
93
|
+
typeof CheckInvestorShortlistItemOutputSchema
|
|
94
|
+
>;
|
|
@@ -67,24 +67,30 @@ export type CreateInvestorSignalInput = z.infer<
|
|
|
67
67
|
typeof CreateInvestorSignalInputSchema
|
|
68
68
|
>;
|
|
69
69
|
|
|
70
|
-
export const UpdateInvestorSignalStatusInputSchema = z.object({
|
|
71
|
-
id: z.cuid2(),
|
|
72
|
-
signalStatus: z.enum(SIGNAL_STATUS),
|
|
73
|
-
version: z.int(),
|
|
74
|
-
});
|
|
70
|
+
export const UpdateInvestorSignalStatusInputSchema = z.object({
|
|
71
|
+
id: z.cuid2(),
|
|
72
|
+
signalStatus: z.enum(SIGNAL_STATUS),
|
|
73
|
+
version: z.int(),
|
|
74
|
+
});
|
|
75
75
|
|
|
76
76
|
export type UpdateInvestorSignalStatusInput = z.infer<
|
|
77
77
|
typeof UpdateInvestorSignalStatusInputSchema
|
|
78
78
|
>;
|
|
79
79
|
|
|
80
|
-
export const GetInvestorSignalInputSchema = z.object({
|
|
81
|
-
cursor: z.string().optional(),
|
|
82
|
-
signalStatus: z.enum(SIGNAL_STATUS).optional(),
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
export type GetInvestorSignalInput = z.infer<
|
|
86
|
-
typeof GetInvestorSignalInputSchema
|
|
87
|
-
>;
|
|
80
|
+
export const GetInvestorSignalInputSchema = z.object({
|
|
81
|
+
cursor: z.string().optional(),
|
|
82
|
+
signalStatus: z.enum(SIGNAL_STATUS).optional(),
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export type GetInvestorSignalInput = z.infer<
|
|
86
|
+
typeof GetInvestorSignalInputSchema
|
|
87
|
+
>;
|
|
88
|
+
|
|
89
|
+
export const InvestorSignalIdInputSchema = z.object({ id: z.cuid2() });
|
|
90
|
+
|
|
91
|
+
export type InvestorSignalIdInput = z.infer<
|
|
92
|
+
typeof InvestorSignalIdInputSchema
|
|
93
|
+
>;
|
|
88
94
|
|
|
89
95
|
/**
|
|
90
96
|
* --------------------------------
|
|
@@ -92,11 +98,20 @@ export type GetInvestorSignalInput = z.infer<
|
|
|
92
98
|
* --------------------------------
|
|
93
99
|
*/
|
|
94
100
|
|
|
95
|
-
export const GetInvestorSignalOutputSchema = z.object({
|
|
96
|
-
nextCursor: z.string().optional(),
|
|
97
|
-
signals: z.array(InvestorSignalEntitySchema),
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
export type GetInvestorSignalOutput = z.infer<
|
|
101
|
-
typeof GetInvestorSignalOutputSchema
|
|
102
|
-
>;
|
|
101
|
+
export const GetInvestorSignalOutputSchema = z.object({
|
|
102
|
+
nextCursor: z.string().optional(),
|
|
103
|
+
signals: z.array(InvestorSignalEntitySchema),
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
export type GetInvestorSignalOutput = z.infer<
|
|
107
|
+
typeof GetInvestorSignalOutputSchema
|
|
108
|
+
>;
|
|
109
|
+
|
|
110
|
+
export const CheckInvestorSignalOutputSchema = z.object({
|
|
111
|
+
exists: z.boolean(),
|
|
112
|
+
signalId: z.string().nullable(),
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export type CheckInvestorSignalOutput = z.infer<
|
|
116
|
+
typeof CheckInvestorSignalOutputSchema
|
|
117
|
+
>;
|
|
@@ -183,11 +183,21 @@ export type TrackedJobApplicationEntity = z.infer<
|
|
|
183
183
|
* --------------------------------
|
|
184
184
|
*/
|
|
185
185
|
|
|
186
|
-
export const ApplicationIdInputSchema = z.object({
|
|
187
|
-
id: z.cuid2(),
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
export type ApplicationIdInput = z.infer<typeof ApplicationIdInputSchema>;
|
|
186
|
+
export const ApplicationIdInputSchema = z.object({
|
|
187
|
+
id: z.cuid2(),
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
export type ApplicationIdInput = z.infer<typeof ApplicationIdInputSchema>;
|
|
191
|
+
|
|
192
|
+
export const JobApplicationIdInputSchema = z.object({
|
|
193
|
+
applicationId: z
|
|
194
|
+
.string()
|
|
195
|
+
.openapi({ param: { name: "applicationId", in: "path" } }),
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
export type JobApplicationIdInput = z.infer<
|
|
199
|
+
typeof JobApplicationIdInputSchema
|
|
200
|
+
>;
|
|
191
201
|
|
|
192
202
|
export const CreateJobApplicationInputSchema = JobApplicationShape.extend({
|
|
193
203
|
jobSections: z.array(z.enum(JOB_SECTIONS)).optional(),
|
|
@@ -248,18 +258,27 @@ export type GetTrackedJobApplicationsOutput = z.infer<
|
|
|
248
258
|
typeof GetTrackedJobApplicationsOutputSchema
|
|
249
259
|
>;
|
|
250
260
|
|
|
251
|
-
export const GetApplicationStatusUpdatesCountOutputSchema = z.object({
|
|
252
|
-
unreadCount: z.number(),
|
|
253
|
-
});
|
|
261
|
+
export const GetApplicationStatusUpdatesCountOutputSchema = z.object({
|
|
262
|
+
unreadCount: z.number(),
|
|
263
|
+
});
|
|
254
264
|
|
|
255
265
|
export type GetApplicationStatusUpdatesCountOutput = z.infer<
|
|
256
266
|
typeof GetApplicationStatusUpdatesCountOutputSchema
|
|
257
267
|
>;
|
|
258
268
|
|
|
259
|
-
export const GetBrandUnansweredApplicationsOutputSchema = z.object({
|
|
260
|
-
unansweredCount: z.number(),
|
|
261
|
-
});
|
|
262
|
-
|
|
263
|
-
export type GetBrandUnansweredApplicationsOutput = z.infer<
|
|
264
|
-
typeof GetBrandUnansweredApplicationsOutputSchema
|
|
265
|
-
>;
|
|
269
|
+
export const GetBrandUnansweredApplicationsOutputSchema = z.object({
|
|
270
|
+
unansweredCount: z.number(),
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
export type GetBrandUnansweredApplicationsOutput = z.infer<
|
|
274
|
+
typeof GetBrandUnansweredApplicationsOutputSchema
|
|
275
|
+
>;
|
|
276
|
+
|
|
277
|
+
export const GetApplicationsForJobOutputSchema = z.object({
|
|
278
|
+
applications: z.array(MinimalJobApplicationEntitySchema),
|
|
279
|
+
nextCursor: z.string().optional(),
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
export type GetApplicationsForJobOutput = z.infer<
|
|
283
|
+
typeof GetApplicationsForJobOutputSchema
|
|
284
|
+
>;
|