@remit/api-zod-schemas 0.0.42 → 0.0.44
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 +9 -5
- package/package.json +1 -1
- package/schemas.d.ts +184 -200
- package/schemas.d.ts.map +1 -1
- package/schemas.js +58 -19
- package/schemas.js.map +1 -1
- package/schemas.ts +65 -22
package/schemas.ts
CHANGED
|
@@ -157,33 +157,78 @@ export const ApiErrorSchema = z.object({
|
|
|
157
157
|
details: z.record(z.string(), z.string()).optional()
|
|
158
158
|
});
|
|
159
159
|
|
|
160
|
+
export const RequestValidationDetailSchema = z.object({
|
|
161
|
+
path: z.string(),
|
|
162
|
+
rule: z.string(),
|
|
163
|
+
message: z.string()
|
|
164
|
+
});
|
|
165
|
+
|
|
160
166
|
export const ValidationErrorSchema = z.object({
|
|
161
167
|
statusCode: z.literal(400),
|
|
162
|
-
|
|
168
|
+
code: z.string(),
|
|
169
|
+
message: z.string(),
|
|
170
|
+
details: z.record(z.string(), z.string()).optional(),
|
|
171
|
+
errors: z.array(RequestValidationDetailSchema).optional()
|
|
163
172
|
});
|
|
164
173
|
|
|
165
|
-
export const
|
|
174
|
+
export const UnauthorizedErrorSchema = z.object({
|
|
175
|
+
statusCode: z.literal(401),
|
|
176
|
+
code: z.string(),
|
|
177
|
+
message: z.string(),
|
|
178
|
+
details: z.record(z.string(), z.string()).optional()
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
export const NotFoundErrorSchema = z.object({
|
|
182
|
+
statusCode: z.literal(404),
|
|
183
|
+
code: z.string(),
|
|
184
|
+
message: z.string(),
|
|
185
|
+
details: z.record(z.string(), z.string()).optional()
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
export const ConflictErrorSchema = z.object({
|
|
166
189
|
statusCode: z.literal(409),
|
|
167
190
|
code: z.string(),
|
|
168
191
|
message: z.string(),
|
|
169
192
|
details: z.record(z.string(), z.string()).optional()
|
|
170
193
|
});
|
|
171
194
|
|
|
172
|
-
export const
|
|
195
|
+
export const UnprocessableEntityErrorSchema = z.object({
|
|
196
|
+
statusCode: z.literal(422),
|
|
197
|
+
code: z.string(),
|
|
198
|
+
message: z.string(),
|
|
199
|
+
details: z.record(z.string(), z.string()).optional()
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
export const ForbiddenErrorSchema = z.object({
|
|
203
|
+
statusCode: z.literal(403),
|
|
204
|
+
code: z.string(),
|
|
205
|
+
message: z.string(),
|
|
206
|
+
details: z.record(z.string(), z.string()).optional()
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
export const NoContentSchema = z.object({
|
|
210
|
+
statusCode: z.literal(204)
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
export const FolderRoleConflictSchema = z.object({
|
|
173
214
|
statusCode: z.literal(409),
|
|
174
215
|
code: z.string(),
|
|
175
216
|
message: z.string(),
|
|
176
217
|
details: z.record(z.string(), z.string()).optional()
|
|
177
218
|
});
|
|
178
219
|
|
|
179
|
-
export const
|
|
180
|
-
statusCode: z.literal(
|
|
181
|
-
|
|
220
|
+
export const AppointFolderRoleConflictSchema = z.object({
|
|
221
|
+
statusCode: z.literal(409),
|
|
222
|
+
code: z.string(),
|
|
223
|
+
message: z.string(),
|
|
224
|
+
details: z.record(z.string(), z.string()).optional()
|
|
182
225
|
});
|
|
183
226
|
|
|
184
227
|
export const PreconditionFailedErrorSchema = z.object({
|
|
185
228
|
statusCode: z.literal(412),
|
|
186
|
-
|
|
229
|
+
code: z.string(),
|
|
230
|
+
message: z.string(),
|
|
231
|
+
details: z.record(z.string(), z.string()).optional()
|
|
187
232
|
});
|
|
188
233
|
|
|
189
234
|
export const DeleteMessagesConflictSchema = z.object({
|
|
@@ -209,17 +254,9 @@ export const AmazonApiGatewayIntegrationSchema = z.object({
|
|
|
209
254
|
|
|
210
255
|
export const InternalServerErrorSchema = z.object({
|
|
211
256
|
statusCode: z.literal(500),
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
export const UnauthorizedErrorSchema = z.object({
|
|
216
|
-
statusCode: z.literal(401),
|
|
217
|
-
error: ApiErrorSchema
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
export const ForbiddenErrorSchema = z.object({
|
|
221
|
-
statusCode: z.literal(403),
|
|
222
|
-
error: ApiErrorSchema
|
|
257
|
+
code: z.string(),
|
|
258
|
+
message: z.string(),
|
|
259
|
+
details: z.record(z.string(), z.string()).optional()
|
|
223
260
|
});
|
|
224
261
|
|
|
225
262
|
export const DeleteMeInputSchema = z.object({
|
|
@@ -552,9 +589,9 @@ export const MailboxSchema = z.object({
|
|
|
552
589
|
lastMessageSyncAt: z.number(),
|
|
553
590
|
initialSyncCompletedAt: z.number().optional(),
|
|
554
591
|
parentMailboxId: z.string(),
|
|
555
|
-
syncStatus: MailboxSyncStatusSchema
|
|
592
|
+
syncStatus: MailboxSyncStatusSchema,
|
|
593
|
+
pendingPath: z.string().optional(),
|
|
556
594
|
cursorState: MailboxCursorStateSchema,
|
|
557
|
-
oldPath: z.string().optional(),
|
|
558
595
|
specialUse: z.array(MailboxSpecialUseSchema).optional(),
|
|
559
596
|
createdAt: z.number(),
|
|
560
597
|
updatedAt: z.number()
|
|
@@ -573,7 +610,8 @@ export const MailboxResponseSchema = z.object({
|
|
|
573
610
|
lastSyncUid: z.number(),
|
|
574
611
|
highWaterMarkUid: z.number(),
|
|
575
612
|
lastMessageSyncAt: z.number(),
|
|
576
|
-
syncStatus: MailboxSyncStatusSchema
|
|
613
|
+
syncStatus: MailboxSyncStatusSchema,
|
|
614
|
+
pendingPath: z.string().optional(),
|
|
577
615
|
specialUse: z.array(MailboxSpecialUseSchema).optional(),
|
|
578
616
|
createdAt: z.number(),
|
|
579
617
|
updatedAt: z.number(),
|
|
@@ -1246,6 +1284,7 @@ export const MintOutboxAttachmentResponseSchema = z.object({
|
|
|
1246
1284
|
});
|
|
1247
1285
|
|
|
1248
1286
|
export const OutboxAttachmentRejectionSchema = z.object({
|
|
1287
|
+
code: z.string(),
|
|
1249
1288
|
reason: OutboxAttachmentRejectionReasonSchema,
|
|
1250
1289
|
message: z.string(),
|
|
1251
1290
|
limitBytes: z.number(),
|
|
@@ -1254,7 +1293,11 @@ export const OutboxAttachmentRejectionSchema = z.object({
|
|
|
1254
1293
|
|
|
1255
1294
|
export const OutboxAttachmentRejectedSchema = z.object({
|
|
1256
1295
|
statusCode: z.union([z.literal(400), z.literal(413)]),
|
|
1257
|
-
|
|
1296
|
+
code: z.string(),
|
|
1297
|
+
reason: OutboxAttachmentRejectionReasonSchema,
|
|
1298
|
+
message: z.string(),
|
|
1299
|
+
limitBytes: z.number(),
|
|
1300
|
+
usedBytes: z.number()
|
|
1258
1301
|
});
|
|
1259
1302
|
|
|
1260
1303
|
export const TrustedFlagSchema = z.object({
|