@oxide/turnstile.ts 0.7.0-rc.0 → 0.8.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/dist/{Api-Z7zZcVks.d.cts → Api-IM66ePFV.d.cts} +285 -161
- package/dist/{Api-Z7zZcVks.d.ts → Api-IM66ePFV.d.ts} +285 -161
- package/dist/Api.cjs +101 -2
- package/dist/Api.d.cts +1 -1
- package/dist/Api.d.ts +1 -1
- package/dist/Api.js +101 -2
- package/dist/retry.cjs +101 -2
- package/dist/retry.d.cts +1 -1
- package/dist/retry.d.ts +1 -1
- package/dist/retry.js +101 -2
- package/dist/validate.cjs +1110 -1013
- package/dist/validate.d.cts +8417 -38672
- package/dist/validate.d.ts +8417 -38672
- package/dist/validate.js +223 -135
- package/package.json +2 -5
- package/src/Api.ts +343 -169
- package/src/util.ts +12 -2
- package/src/validate.ts +220 -141
package/src/validate.ts
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
5
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
6
|
-
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
|
7
|
-
*
|
|
8
|
-
* Copyright Oxide Computer Company
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { z, ZodType } from 'zod'
|
|
3
|
+
import { z, ZodType } from 'zod/v4'
|
|
12
4
|
import { processResponseBody, uniqueItems } from './util'
|
|
13
5
|
|
|
14
6
|
/**
|
|
@@ -24,17 +16,17 @@ const IntEnum = <T extends readonly number[]>(values: T) =>
|
|
|
24
16
|
/** Helper to ensure booleans provided as strings end up with the correct value */
|
|
25
17
|
const SafeBoolean = z.preprocess(v => v === 'false' ? false : v, z.coerce.boolean())
|
|
26
18
|
|
|
27
|
-
export const TypedUuidForApplicantId = z.preprocess(processResponseBody, z.
|
|
19
|
+
export const TypedUuidForApplicantId = z.preprocess(processResponseBody, z.uuid())
|
|
28
20
|
|
|
29
|
-
export const TypedUuidForUserId = z.preprocess(processResponseBody, z.
|
|
21
|
+
export const TypedUuidForUserId = z.preprocess(processResponseBody, z.uuid())
|
|
30
22
|
|
|
31
|
-
export const TypedUuidForApplicationId = z.preprocess(processResponseBody, z.
|
|
23
|
+
export const TypedUuidForApplicationId = z.preprocess(processResponseBody, z.uuid())
|
|
32
24
|
|
|
33
|
-
export const TypedUuidForDocumentId = z.preprocess(processResponseBody, z.
|
|
25
|
+
export const TypedUuidForDocumentId = z.preprocess(processResponseBody, z.uuid())
|
|
34
26
|
|
|
35
|
-
export const TypedUuidForEmployeeId = z.preprocess(processResponseBody, z.
|
|
27
|
+
export const TypedUuidForEmployeeId = z.preprocess(processResponseBody, z.uuid())
|
|
36
28
|
|
|
37
|
-
export const TypedUuidForOnboardingId = z.preprocess(processResponseBody, z.
|
|
29
|
+
export const TypedUuidForOnboardingId = z.preprocess(processResponseBody, z.uuid())
|
|
38
30
|
|
|
39
31
|
export const DocumentParent = z.preprocess(
|
|
40
32
|
processResponseBody,
|
|
@@ -45,35 +37,35 @@ export const DocumentParent = z.preprocess(
|
|
|
45
37
|
]),
|
|
46
38
|
)
|
|
47
39
|
|
|
48
|
-
export const TypedUuidForDepartmentId = z.preprocess(processResponseBody, z.
|
|
40
|
+
export const TypedUuidForDepartmentId = z.preprocess(processResponseBody, z.uuid())
|
|
49
41
|
|
|
50
|
-
export const TypedUuidForRoleId = z.preprocess(processResponseBody, z.
|
|
42
|
+
export const TypedUuidForRoleId = z.preprocess(processResponseBody, z.uuid())
|
|
51
43
|
|
|
52
|
-
export const TypedUuidForListingId = z.preprocess(processResponseBody, z.
|
|
44
|
+
export const TypedUuidForListingId = z.preprocess(processResponseBody, z.uuid())
|
|
53
45
|
|
|
54
|
-
export const TypedUuidForPoolId = z.preprocess(processResponseBody, z.
|
|
46
|
+
export const TypedUuidForPoolId = z.preprocess(processResponseBody, z.uuid())
|
|
55
47
|
|
|
56
|
-
export const TypedUuidForReviewerId = z.preprocess(processResponseBody, z.
|
|
48
|
+
export const TypedUuidForReviewerId = z.preprocess(processResponseBody, z.uuid())
|
|
57
49
|
|
|
58
|
-
export const TypedUuidForReviewId = z.preprocess(processResponseBody, z.
|
|
50
|
+
export const TypedUuidForReviewId = z.preprocess(processResponseBody, z.uuid())
|
|
59
51
|
|
|
60
|
-
export const TypedUuidForInterviewerId = z.preprocess(processResponseBody, z.
|
|
52
|
+
export const TypedUuidForInterviewerId = z.preprocess(processResponseBody, z.uuid())
|
|
61
53
|
|
|
62
|
-
export const TypedUuidForInterviewId = z.preprocess(processResponseBody, z.
|
|
54
|
+
export const TypedUuidForInterviewId = z.preprocess(processResponseBody, z.uuid())
|
|
63
55
|
|
|
64
|
-
export const TypedUuidForBackgroundCheckId = z.preprocess(processResponseBody, z.
|
|
56
|
+
export const TypedUuidForBackgroundCheckId = z.preprocess(processResponseBody, z.uuid())
|
|
65
57
|
|
|
66
|
-
export const TypedUuidForOperationId = z.preprocess(processResponseBody, z.
|
|
58
|
+
export const TypedUuidForOperationId = z.preprocess(processResponseBody, z.uuid())
|
|
67
59
|
|
|
68
|
-
export const TypedUuidForApiKeyId = z.preprocess(processResponseBody, z.
|
|
60
|
+
export const TypedUuidForApiKeyId = z.preprocess(processResponseBody, z.uuid())
|
|
69
61
|
|
|
70
|
-
export const TypedUuidForAccessGroupId = z.preprocess(processResponseBody, z.
|
|
62
|
+
export const TypedUuidForAccessGroupId = z.preprocess(processResponseBody, z.uuid())
|
|
71
63
|
|
|
72
|
-
export const TypedUuidForMapperId = z.preprocess(processResponseBody, z.
|
|
64
|
+
export const TypedUuidForMapperId = z.preprocess(processResponseBody, z.uuid())
|
|
73
65
|
|
|
74
|
-
export const TypedUuidForOAuthClientId = z.preprocess(processResponseBody, z.
|
|
66
|
+
export const TypedUuidForOAuthClientId = z.preprocess(processResponseBody, z.uuid())
|
|
75
67
|
|
|
76
|
-
export const TypedUuidForMagicLinkId = z.preprocess(processResponseBody, z.
|
|
68
|
+
export const TypedUuidForMagicLinkId = z.preprocess(processResponseBody, z.uuid())
|
|
77
69
|
|
|
78
70
|
export const TurnstilePermission = z.preprocess(
|
|
79
71
|
processResponseBody,
|
|
@@ -100,6 +92,7 @@ export const TurnstilePermission = z.preprocess(
|
|
|
100
92
|
'WithdrawApplicationsAssigned',
|
|
101
93
|
'ManageApplicationsAssigned',
|
|
102
94
|
'ManageApplicationsAll',
|
|
95
|
+
'GetApplicationSummariesAll',
|
|
103
96
|
'GetDocumentsAssigned',
|
|
104
97
|
'GetDocumentsAll',
|
|
105
98
|
'CreateDocument',
|
|
@@ -286,7 +279,7 @@ export const TurnstilePermission = z.preprocess(
|
|
|
286
279
|
z.object({ 'GetMagicLinkClients': TypedUuidForMagicLinkId.array().refine(...uniqueItems) }),
|
|
287
280
|
z.object({ 'ManageMagicLinkClient': TypedUuidForMagicLinkId }),
|
|
288
281
|
z.object({ 'ManageMagicLinkClients': TypedUuidForMagicLinkId.array().refine(...uniqueItems) }),
|
|
289
|
-
z.object({ 'Unsupported': z.record(z.unknown()) }),
|
|
282
|
+
z.object({ 'Unsupported': z.record(z.string(), z.unknown()) }),
|
|
290
283
|
]),
|
|
291
284
|
)
|
|
292
285
|
|
|
@@ -301,7 +294,7 @@ export const AccessGroup_for_TurnstilePermission = z.preprocess(
|
|
|
301
294
|
processResponseBody,
|
|
302
295
|
z.object({
|
|
303
296
|
'createdAt': z.coerce.date(),
|
|
304
|
-
'deletedAt': z.coerce.date().optional(),
|
|
297
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
305
298
|
'id': TypedUuidForAccessGroupId,
|
|
306
299
|
'name': z.string(),
|
|
307
300
|
'permissions': Permissions_for_TurnstilePermission,
|
|
@@ -311,7 +304,7 @@ export const AccessGroup_for_TurnstilePermission = z.preprocess(
|
|
|
311
304
|
|
|
312
305
|
export const AccessTokenExchangeRequest = z.preprocess(
|
|
313
306
|
processResponseBody,
|
|
314
|
-
z.object({ 'deviceCode': z.string(), 'expiresAt': z.coerce.date().optional(), 'grantType': z.string() }),
|
|
307
|
+
z.object({ 'deviceCode': z.string(), 'expiresAt': z.coerce.date().nullable().optional(), 'grantType': z.string() }),
|
|
315
308
|
)
|
|
316
309
|
|
|
317
310
|
export const AddGroupBody = z.preprocess(processResponseBody, z.object({ 'groupId': TypedUuidForAccessGroupId }))
|
|
@@ -322,7 +315,10 @@ export const AddOAuthClientRedirectBody = z.preprocess(processResponseBody, z.ob
|
|
|
322
315
|
|
|
323
316
|
export const ApiKeyCreateParams_for_TurnstilePermission = z.preprocess(
|
|
324
317
|
processResponseBody,
|
|
325
|
-
z.object({
|
|
318
|
+
z.object({
|
|
319
|
+
'expiresAt': z.coerce.date(),
|
|
320
|
+
'permissions': Permissions_for_TurnstilePermission.nullable().optional(),
|
|
321
|
+
}),
|
|
326
322
|
)
|
|
327
323
|
|
|
328
324
|
export const ApiKeyResponse_for_TurnstilePermission = z.preprocess(
|
|
@@ -330,17 +326,17 @@ export const ApiKeyResponse_for_TurnstilePermission = z.preprocess(
|
|
|
330
326
|
z.object({
|
|
331
327
|
'createdAt': z.coerce.date(),
|
|
332
328
|
'id': TypedUuidForApiKeyId,
|
|
333
|
-
'permissions': Permissions_for_TurnstilePermission.optional(),
|
|
329
|
+
'permissions': Permissions_for_TurnstilePermission.nullable().optional(),
|
|
334
330
|
}),
|
|
335
331
|
)
|
|
336
332
|
|
|
337
|
-
export const TypedUuidForUserProviderId = z.preprocess(processResponseBody, z.
|
|
333
|
+
export const TypedUuidForUserProviderId = z.preprocess(processResponseBody, z.uuid())
|
|
338
334
|
|
|
339
335
|
export const ApiUserContactEmail = z.preprocess(
|
|
340
336
|
processResponseBody,
|
|
341
337
|
z.object({
|
|
342
338
|
'createdAt': z.coerce.date(),
|
|
343
|
-
'deletedAt': z.coerce.date().optional(),
|
|
339
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
344
340
|
'email': z.string(),
|
|
345
341
|
'id': TypedUuidForUserProviderId,
|
|
346
342
|
'updatedAt': z.coerce.date(),
|
|
@@ -354,7 +350,7 @@ export const ApiUserProvider = z.preprocess(
|
|
|
354
350
|
processResponseBody,
|
|
355
351
|
z.object({
|
|
356
352
|
'createdAt': z.coerce.date(),
|
|
357
|
-
'deletedAt': z.coerce.date().optional(),
|
|
353
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
358
354
|
'displayNames': z.string().array(),
|
|
359
355
|
'emails': z.string().array(),
|
|
360
356
|
'id': TypedUuidForUserProviderId,
|
|
@@ -369,7 +365,7 @@ export const ApiUser_for_TurnstilePermission = z.preprocess(
|
|
|
369
365
|
processResponseBody,
|
|
370
366
|
z.object({
|
|
371
367
|
'createdAt': z.coerce.date(),
|
|
372
|
-
'deletedAt': z.coerce.date().optional(),
|
|
368
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
373
369
|
'groups': TypedUuidForAccessGroupId.array().refine(...uniqueItems),
|
|
374
370
|
'id': TypedUuidForUserId,
|
|
375
371
|
'permissions': Permissions_for_TurnstilePermission,
|
|
@@ -380,7 +376,7 @@ export const ApiUser_for_TurnstilePermission = z.preprocess(
|
|
|
380
376
|
export const ApiUserInfo_for_TurnstilePermission = z.preprocess(
|
|
381
377
|
processResponseBody,
|
|
382
378
|
z.object({
|
|
383
|
-
'email': ApiUserContactEmail.optional(),
|
|
379
|
+
'email': ApiUserContactEmail.nullable().optional(),
|
|
384
380
|
'providers': ApiUserProvider.array(),
|
|
385
381
|
'user': ApiUser_for_TurnstilePermission,
|
|
386
382
|
}),
|
|
@@ -407,13 +403,13 @@ export const Applicant = z.preprocess(
|
|
|
407
403
|
z.object({
|
|
408
404
|
'apiUserId': TypedUuidForUserId,
|
|
409
405
|
'createdAt': z.coerce.date(),
|
|
410
|
-
'deletedAt': z.coerce.date().optional(),
|
|
406
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
411
407
|
'id': TypedUuidForApplicantId,
|
|
412
408
|
'updatedAt': z.coerce.date(),
|
|
413
409
|
}),
|
|
414
410
|
)
|
|
415
411
|
|
|
416
|
-
export const TypedUuidForApplicantContactId = z.preprocess(processResponseBody, z.
|
|
412
|
+
export const TypedUuidForApplicantContactId = z.preprocess(processResponseBody, z.uuid())
|
|
417
413
|
|
|
418
414
|
export const ApplicantContactField = z.preprocess(
|
|
419
415
|
processResponseBody,
|
|
@@ -425,11 +421,11 @@ export const ApplicantContact = z.preprocess(
|
|
|
425
421
|
z.object({
|
|
426
422
|
'applicantId': TypedUuidForApplicantId,
|
|
427
423
|
'createdAt': z.coerce.date(),
|
|
428
|
-
'deletedAt': z.coerce.date().optional(),
|
|
424
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
429
425
|
'id': TypedUuidForApplicantContactId,
|
|
430
426
|
'kind': ApplicantContactField,
|
|
431
427
|
'updatedAt': z.coerce.date(),
|
|
432
|
-
'value': z.string().optional(),
|
|
428
|
+
'value': z.string().nullable().optional(),
|
|
433
429
|
}),
|
|
434
430
|
)
|
|
435
431
|
|
|
@@ -445,14 +441,16 @@ export const InterviewingState = z.preprocess(
|
|
|
445
441
|
|
|
446
442
|
export const OfferState = z.preprocess(
|
|
447
443
|
processResponseBody,
|
|
448
|
-
z.
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
444
|
+
z.union([
|
|
445
|
+
z.enum([
|
|
446
|
+
'documents_sent',
|
|
447
|
+
'documents_complete',
|
|
448
|
+
'background_check_sent',
|
|
449
|
+
'background_check_warning',
|
|
450
|
+
'background_check_complete',
|
|
451
|
+
'complete',
|
|
452
|
+
]),
|
|
453
|
+
z.object({ 'start': z.string() }),
|
|
456
454
|
]),
|
|
457
455
|
)
|
|
458
456
|
|
|
@@ -479,13 +477,13 @@ export const Application = z.preprocess(
|
|
|
479
477
|
processResponseBody,
|
|
480
478
|
z.object({
|
|
481
479
|
'applicantId': TypedUuidForApplicantId,
|
|
482
|
-
'completedAt': z.coerce.date().optional(),
|
|
480
|
+
'completedAt': z.coerce.date().nullable().optional(),
|
|
483
481
|
'createdAt': z.coerce.date(),
|
|
484
|
-
'deletedAt': z.coerce.date().optional(),
|
|
482
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
485
483
|
'id': TypedUuidForApplicationId,
|
|
486
484
|
'listingId': TypedUuidForListingId,
|
|
487
485
|
'state': ApplicationState,
|
|
488
|
-
'submittedAt': z.coerce.date().optional(),
|
|
486
|
+
'submittedAt': z.coerce.date().nullable().optional(),
|
|
489
487
|
'updatedAt': z.coerce.date(),
|
|
490
488
|
}),
|
|
491
489
|
)
|
|
@@ -512,14 +510,14 @@ export const Document = z.preprocess(
|
|
|
512
510
|
processResponseBody,
|
|
513
511
|
z.object({
|
|
514
512
|
'createdAt': z.coerce.date(),
|
|
515
|
-
'deletedAt': z.coerce.date().optional(),
|
|
513
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
516
514
|
'externalId': z.string(),
|
|
517
515
|
'id': TypedUuidForDocumentId,
|
|
518
516
|
'kind': DocumentKind,
|
|
519
|
-
'mime': z.string().optional(),
|
|
517
|
+
'mime': z.string().nullable().optional(),
|
|
520
518
|
'parentId': DocumentParent,
|
|
521
519
|
'source': DocumentSource,
|
|
522
|
-
'status': z.string().optional(),
|
|
520
|
+
'status': z.string().nullable().optional(),
|
|
523
521
|
'updatedAt': z.coerce.date(),
|
|
524
522
|
}),
|
|
525
523
|
)
|
|
@@ -529,7 +527,7 @@ export const ApplicationBundle = z.preprocess(
|
|
|
529
527
|
z.object({ 'applicant': ApplicantInfo, 'application': Application, 'documents': Document.array() }),
|
|
530
528
|
)
|
|
531
529
|
|
|
532
|
-
export const TypedUuidForApplicationInterviewCodeId = z.preprocess(processResponseBody, z.
|
|
530
|
+
export const TypedUuidForApplicationInterviewCodeId = z.preprocess(processResponseBody, z.uuid())
|
|
533
531
|
|
|
534
532
|
export const ApplicationInterviewCode = z.preprocess(
|
|
535
533
|
processResponseBody,
|
|
@@ -541,31 +539,43 @@ export const ApplicationInterviewCode = z.preprocess(
|
|
|
541
539
|
}),
|
|
542
540
|
)
|
|
543
541
|
|
|
544
|
-
export const TypedUuidForApplicationStateRecordId = z.preprocess(processResponseBody, z.
|
|
542
|
+
export const TypedUuidForApplicationStateRecordId = z.preprocess(processResponseBody, z.uuid())
|
|
545
543
|
|
|
546
544
|
export const ApplicationStateRecord = z.preprocess(
|
|
547
545
|
processResponseBody,
|
|
548
546
|
z.object({
|
|
549
547
|
'applicationId': TypedUuidForApplicationId,
|
|
550
548
|
'createdAt': z.coerce.date(),
|
|
551
|
-
'deletedAt': z.coerce.date().optional(),
|
|
552
549
|
'id': TypedUuidForApplicationStateRecordId,
|
|
553
550
|
'state': ApplicationState,
|
|
551
|
+
'supersededAt': z.coerce.date().nullable().optional(),
|
|
554
552
|
'updatedAt': z.coerce.date(),
|
|
555
553
|
}),
|
|
556
554
|
)
|
|
557
555
|
|
|
558
556
|
export const ListingPoolAssociation = z.preprocess(processResponseBody, z.enum(['first', 'early_positive', 'positive']))
|
|
559
557
|
|
|
558
|
+
export const TriageReason = z.preprocess(
|
|
559
|
+
processResponseBody,
|
|
560
|
+
z.enum([
|
|
561
|
+
'has_no_ratings',
|
|
562
|
+
'likely_next_steps',
|
|
563
|
+
'likely_pass',
|
|
564
|
+
'possibly_next_steps',
|
|
565
|
+
'possibly_pass',
|
|
566
|
+
'very_likely_pass',
|
|
567
|
+
'unknown',
|
|
568
|
+
]),
|
|
569
|
+
)
|
|
570
|
+
|
|
560
571
|
export const PoolAction = z.preprocess(
|
|
561
572
|
processResponseBody,
|
|
562
573
|
z.union([
|
|
574
|
+
z.enum(['drop', 'wait']),
|
|
563
575
|
z.object({
|
|
564
|
-
'
|
|
565
|
-
'association': ListingPoolAssociation,
|
|
566
|
-
'count': z.number().min(0).max(4294967295),
|
|
576
|
+
'add': z.object({ 'association': ListingPoolAssociation, 'count': z.number().min(0).max(4294967295) }),
|
|
567
577
|
}),
|
|
568
|
-
z.object({ '
|
|
578
|
+
z.object({ 'triage': z.object({ 'reason': TriageReason }) }),
|
|
569
579
|
]),
|
|
570
580
|
)
|
|
571
581
|
|
|
@@ -601,8 +611,8 @@ export const ExpandedApplicationSummary = z.preprocess(
|
|
|
601
611
|
export const Evaluator = z.preprocess(
|
|
602
612
|
processResponseBody,
|
|
603
613
|
z.object({
|
|
604
|
-
'interviewer': TypedUuidForInterviewerId.optional(),
|
|
605
|
-
'reviewer': TypedUuidForReviewerId.optional(),
|
|
614
|
+
'interviewer': TypedUuidForInterviewerId.nullable().optional(),
|
|
615
|
+
'reviewer': TypedUuidForReviewerId.nullable().optional(),
|
|
606
616
|
'user': ApiUserInfo_for_TurnstilePermission,
|
|
607
617
|
}),
|
|
608
618
|
)
|
|
@@ -624,15 +634,15 @@ export const AssignPool = z.preprocess(
|
|
|
624
634
|
|
|
625
635
|
export const AttachDocument = z.preprocess(
|
|
626
636
|
processResponseBody,
|
|
627
|
-
z.object({ 'externalId': z.string(), 'mime': z.string().optional() }),
|
|
637
|
+
z.object({ 'externalId': z.string(), 'mime': z.string().nullable().optional() }),
|
|
628
638
|
)
|
|
629
639
|
|
|
630
640
|
export const EmailConfig = z.preprocess(
|
|
631
641
|
processResponseBody,
|
|
632
642
|
z.object({
|
|
633
643
|
'from': z.string(),
|
|
634
|
-
'htmlTemplate': z.string().optional(),
|
|
635
|
-
'name': z.string().optional(),
|
|
644
|
+
'htmlTemplate': z.string().nullable().optional(),
|
|
645
|
+
'name': z.string().nullable().optional(),
|
|
636
646
|
'subject': z.string(),
|
|
637
647
|
'textTemplate': z.string(),
|
|
638
648
|
}),
|
|
@@ -681,7 +691,7 @@ export const CreateDocument = z.preprocess(
|
|
|
681
691
|
'mime': z.string(),
|
|
682
692
|
'parent': DocumentParent,
|
|
683
693
|
'source': DocumentSource,
|
|
684
|
-
'status': z.string().optional(),
|
|
694
|
+
'status': z.string().nullable().optional(),
|
|
685
695
|
}),
|
|
686
696
|
)
|
|
687
697
|
|
|
@@ -695,18 +705,18 @@ export const CreateListing = z.preprocess(
|
|
|
695
705
|
export const CreateMapper = z.preprocess(
|
|
696
706
|
processResponseBody,
|
|
697
707
|
z.object({
|
|
698
|
-
'maxActivations': z.number().min(-2147483647).max(2147483647).optional(),
|
|
708
|
+
'maxActivations': z.number().min(-2147483647).max(2147483647).nullable().optional(),
|
|
699
709
|
'name': z.string(),
|
|
700
|
-
'rule': z.record(z.unknown()),
|
|
710
|
+
'rule': z.record(z.string(), z.unknown()),
|
|
701
711
|
}),
|
|
702
712
|
)
|
|
703
713
|
|
|
704
714
|
export const CreatePool = z.preprocess(
|
|
705
715
|
processResponseBody,
|
|
706
716
|
z.object({
|
|
707
|
-
'description': z.string().optional(),
|
|
717
|
+
'description': z.string().nullable().optional(),
|
|
708
718
|
'name': z.string(),
|
|
709
|
-
'
|
|
719
|
+
'reviewers': TypedUuidForReviewerId.array().optional(),
|
|
710
720
|
}),
|
|
711
721
|
)
|
|
712
722
|
|
|
@@ -736,10 +746,10 @@ export const CreateReviewAssignments = z.preprocess(
|
|
|
736
746
|
*/
|
|
737
747
|
export const ReviewAssignmentCreationError = z.preprocess(
|
|
738
748
|
processResponseBody,
|
|
739
|
-
z.enum(['DoesNotExist', 'Forbidden', 'Internal']),
|
|
749
|
+
z.enum(['Conflict', 'DoesNotExist', 'Forbidden', 'Internal']),
|
|
740
750
|
)
|
|
741
751
|
|
|
742
|
-
export const TypedUuidForReviewAssignmentId = z.preprocess(processResponseBody, z.
|
|
752
|
+
export const TypedUuidForReviewAssignmentId = z.preprocess(processResponseBody, z.uuid())
|
|
743
753
|
|
|
744
754
|
export const ReviewAssignmentState = z.preprocess(processResponseBody, z.enum(['pending', 'complete']))
|
|
745
755
|
|
|
@@ -748,7 +758,7 @@ export const ReviewAssignment = z.preprocess(
|
|
|
748
758
|
z.object({
|
|
749
759
|
'applicationId': TypedUuidForApplicationId,
|
|
750
760
|
'createdAt': z.coerce.date(),
|
|
751
|
-
'deletedAt': z.coerce.date().optional(),
|
|
761
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
752
762
|
'id': TypedUuidForReviewAssignmentId,
|
|
753
763
|
'reviewerId': TypedUuidForReviewerId,
|
|
754
764
|
'state': ReviewAssignmentState,
|
|
@@ -767,8 +777,8 @@ export const CreatedAssignment = z.preprocess(processResponseBody, z.object({ 'a
|
|
|
767
777
|
export const CreateReviewAssignmentsResponse = z.preprocess(
|
|
768
778
|
processResponseBody,
|
|
769
779
|
z.object({
|
|
770
|
-
'failure': z.record(z.string()
|
|
771
|
-
'success': z.record(z.string()
|
|
780
|
+
'failure': z.record(z.string(), ReviewAssignmentCreationError),
|
|
781
|
+
'success': z.record(z.string(), CreatedAssignment),
|
|
772
782
|
}),
|
|
773
783
|
)
|
|
774
784
|
|
|
@@ -783,7 +793,7 @@ export const Department = z.preprocess(
|
|
|
783
793
|
processResponseBody,
|
|
784
794
|
z.object({
|
|
785
795
|
'createdAt': z.coerce.date(),
|
|
786
|
-
'deletedAt': z.coerce.date().optional(),
|
|
796
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
787
797
|
'id': TypedUuidForDepartmentId,
|
|
788
798
|
'name': z.string(),
|
|
789
799
|
'updatedAt': z.coerce.date(),
|
|
@@ -792,12 +802,37 @@ export const Department = z.preprocess(
|
|
|
792
802
|
|
|
793
803
|
export const DocumentUploadUrlResponse = z.preprocess(
|
|
794
804
|
processResponseBody,
|
|
795
|
-
z.object({ 'externalId': z.string().optional(), 'url': z.string() }),
|
|
805
|
+
z.object({ 'externalId': z.string().nullable().optional(), 'url': z.string() }),
|
|
796
806
|
)
|
|
797
807
|
|
|
798
808
|
export const EmailApplicantBody = z.preprocess(
|
|
799
809
|
processResponseBody,
|
|
800
|
-
z.object({
|
|
810
|
+
z.object({
|
|
811
|
+
'from': z.string(),
|
|
812
|
+
'html': z.string().nullable().optional(),
|
|
813
|
+
'subject': z.string(),
|
|
814
|
+
'text': z.string(),
|
|
815
|
+
}),
|
|
816
|
+
)
|
|
817
|
+
|
|
818
|
+
export const EmployeeState = z.preprocess(
|
|
819
|
+
processResponseBody,
|
|
820
|
+
z.union([
|
|
821
|
+
z.enum(['onboarding', 'onboarded', 'offboarding', 'offboarded']),
|
|
822
|
+
z.object({ 'newHire': z.string() }),
|
|
823
|
+
]),
|
|
824
|
+
)
|
|
825
|
+
|
|
826
|
+
export const Employee = z.preprocess(
|
|
827
|
+
processResponseBody,
|
|
828
|
+
z.object({
|
|
829
|
+
'apiUserId': TypedUuidForUserId,
|
|
830
|
+
'createdAt': z.coerce.date(),
|
|
831
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
832
|
+
'id': TypedUuidForEmployeeId,
|
|
833
|
+
'state': EmployeeState,
|
|
834
|
+
'updatedAt': z.coerce.date(),
|
|
835
|
+
}),
|
|
801
836
|
)
|
|
802
837
|
|
|
803
838
|
/**
|
|
@@ -819,36 +854,36 @@ export const InitialApiKeyResponse_for_TurnstilePermission = z.preprocess(
|
|
|
819
854
|
'createdAt': z.coerce.date(),
|
|
820
855
|
'id': TypedUuidForApiKeyId,
|
|
821
856
|
'key': SecretString,
|
|
822
|
-
'permissions': Permissions_for_TurnstilePermission.optional(),
|
|
857
|
+
'permissions': Permissions_for_TurnstilePermission.nullable().optional(),
|
|
823
858
|
}),
|
|
824
859
|
)
|
|
825
860
|
|
|
826
|
-
export const TypedUuidForMagicLinkSecretId = z.preprocess(processResponseBody, z.
|
|
861
|
+
export const TypedUuidForMagicLinkSecretId = z.preprocess(processResponseBody, z.uuid())
|
|
827
862
|
|
|
828
863
|
export const InitialMagicLinkSecretResponse = z.preprocess(
|
|
829
864
|
processResponseBody,
|
|
830
865
|
z.object({ 'createdAt': z.coerce.date(), 'id': TypedUuidForMagicLinkSecretId, 'key': SecretString }),
|
|
831
866
|
)
|
|
832
867
|
|
|
833
|
-
export const TypedUuidForOAuthSecretId = z.preprocess(processResponseBody, z.
|
|
868
|
+
export const TypedUuidForOAuthSecretId = z.preprocess(processResponseBody, z.uuid())
|
|
834
869
|
|
|
835
870
|
export const InitialOAuthClientSecretResponse = z.preprocess(
|
|
836
871
|
processResponseBody,
|
|
837
872
|
z.object({ 'createdAt': z.coerce.date(), 'id': TypedUuidForOAuthSecretId, 'key': SecretString }),
|
|
838
873
|
)
|
|
839
874
|
|
|
840
|
-
export const TypedUuidForInterviewAttendeeId = z.preprocess(processResponseBody, z.
|
|
875
|
+
export const TypedUuidForInterviewAttendeeId = z.preprocess(processResponseBody, z.uuid())
|
|
841
876
|
|
|
842
877
|
export const InterviewAttendee = z.preprocess(
|
|
843
878
|
processResponseBody,
|
|
844
879
|
z.object({
|
|
845
880
|
'createdAt': z.coerce.date(),
|
|
846
|
-
'deletedAt': z.coerce.date().optional(),
|
|
881
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
847
882
|
'id': TypedUuidForInterviewAttendeeId,
|
|
848
883
|
'interviewId': TypedUuidForInterviewId,
|
|
849
884
|
'interviewerDisplayName': z.string(),
|
|
850
885
|
'interviewerEmail': z.string(),
|
|
851
|
-
'interviewerId': TypedUuidForInterviewerId.optional(),
|
|
886
|
+
'interviewerId': TypedUuidForInterviewerId.nullable().optional(),
|
|
852
887
|
'updatedAt': z.coerce.date(),
|
|
853
888
|
}),
|
|
854
889
|
)
|
|
@@ -861,7 +896,7 @@ export const Interview = z.preprocess(
|
|
|
861
896
|
'attendees': InterviewAttendee.array(),
|
|
862
897
|
'calendarSource': z.string(),
|
|
863
898
|
'createdAt': z.coerce.date(),
|
|
864
|
-
'deletedAt': z.coerce.date().optional(),
|
|
899
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
865
900
|
'endTime': z.coerce.date(),
|
|
866
901
|
'externalId': z.string(),
|
|
867
902
|
'id': TypedUuidForInterviewId,
|
|
@@ -875,7 +910,7 @@ export const Interviewer = z.preprocess(
|
|
|
875
910
|
z.object({
|
|
876
911
|
'apiUserId': TypedUuidForUserId,
|
|
877
912
|
'createdAt': z.coerce.date(),
|
|
878
|
-
'deletedAt': z.coerce.date().optional(),
|
|
913
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
879
914
|
'id': TypedUuidForInterviewerId,
|
|
880
915
|
'updatedAt': z.coerce.date(),
|
|
881
916
|
}),
|
|
@@ -892,7 +927,7 @@ export const Listing = z.preprocess(
|
|
|
892
927
|
processResponseBody,
|
|
893
928
|
z.object({
|
|
894
929
|
'createdAt': z.coerce.date(),
|
|
895
|
-
'deletedAt': z.coerce.date().optional(),
|
|
930
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
896
931
|
'id': TypedUuidForListingId,
|
|
897
932
|
'name': z.string(),
|
|
898
933
|
'roleId': TypedUuidForRoleId,
|
|
@@ -901,14 +936,14 @@ export const Listing = z.preprocess(
|
|
|
901
936
|
}),
|
|
902
937
|
)
|
|
903
938
|
|
|
904
|
-
export const TypedUuidForListingPoolId = z.preprocess(processResponseBody, z.
|
|
939
|
+
export const TypedUuidForListingPoolId = z.preprocess(processResponseBody, z.uuid())
|
|
905
940
|
|
|
906
941
|
export const ListingPool = z.preprocess(
|
|
907
942
|
processResponseBody,
|
|
908
943
|
z.object({
|
|
909
944
|
'association': ListingPoolAssociation,
|
|
910
945
|
'createdAt': z.coerce.date(),
|
|
911
|
-
'deletedAt': z.coerce.date().optional(),
|
|
946
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
912
947
|
'id': TypedUuidForListingPoolId,
|
|
913
948
|
'listingId': TypedUuidForListingId,
|
|
914
949
|
'poolId': TypedUuidForPoolId,
|
|
@@ -916,13 +951,13 @@ export const ListingPool = z.preprocess(
|
|
|
916
951
|
}),
|
|
917
952
|
)
|
|
918
953
|
|
|
919
|
-
export const TypedUuidForMagicLinkRedirectUriId = z.preprocess(processResponseBody, z.
|
|
954
|
+
export const TypedUuidForMagicLinkRedirectUriId = z.preprocess(processResponseBody, z.uuid())
|
|
920
955
|
|
|
921
956
|
export const MagicLinkRedirectUri = z.preprocess(
|
|
922
957
|
processResponseBody,
|
|
923
958
|
z.object({
|
|
924
959
|
'createdAt': z.coerce.date(),
|
|
925
|
-
'deletedAt': z.coerce.date().optional(),
|
|
960
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
926
961
|
'id': TypedUuidForMagicLinkRedirectUriId,
|
|
927
962
|
'magicLinkClientId': TypedUuidForMagicLinkId,
|
|
928
963
|
'redirectUri': z.string(),
|
|
@@ -933,7 +968,7 @@ export const MagicLinkSecret = z.preprocess(
|
|
|
933
968
|
processResponseBody,
|
|
934
969
|
z.object({
|
|
935
970
|
'createdAt': z.coerce.date(),
|
|
936
|
-
'deletedAt': z.coerce.date().optional(),
|
|
971
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
937
972
|
'id': TypedUuidForMagicLinkSecretId,
|
|
938
973
|
'magicLinkClientId': TypedUuidForMagicLinkId,
|
|
939
974
|
'secretSignature': z.string(),
|
|
@@ -944,14 +979,14 @@ export const MagicLink = z.preprocess(
|
|
|
944
979
|
processResponseBody,
|
|
945
980
|
z.object({
|
|
946
981
|
'createdAt': z.coerce.date(),
|
|
947
|
-
'deletedAt': z.coerce.date().optional(),
|
|
982
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
948
983
|
'id': TypedUuidForMagicLinkId,
|
|
949
984
|
'redirectUris': MagicLinkRedirectUri.array(),
|
|
950
985
|
'secrets': MagicLinkSecret.array(),
|
|
951
986
|
}),
|
|
952
987
|
)
|
|
953
988
|
|
|
954
|
-
export const TypedUuidForMagicLinkAttemptId = z.preprocess(processResponseBody, z.
|
|
989
|
+
export const TypedUuidForMagicLinkAttemptId = z.preprocess(processResponseBody, z.uuid())
|
|
955
990
|
|
|
956
991
|
export const MagicLinkExchangeRequest = z.preprocess(
|
|
957
992
|
processResponseBody,
|
|
@@ -972,7 +1007,7 @@ export const MagicLinkSendRequest = z.preprocess(
|
|
|
972
1007
|
'medium': MagicLinkMedium,
|
|
973
1008
|
'recipient': z.string(),
|
|
974
1009
|
'redirectUri': z.string(),
|
|
975
|
-
'scope': z.string().optional(),
|
|
1010
|
+
'scope': z.string().nullable().optional(),
|
|
976
1011
|
'secret': z.string(),
|
|
977
1012
|
}),
|
|
978
1013
|
)
|
|
@@ -985,29 +1020,36 @@ export const MagicLinkSendResponse = z.preprocess(
|
|
|
985
1020
|
export const Mapper = z.preprocess(
|
|
986
1021
|
processResponseBody,
|
|
987
1022
|
z.object({
|
|
988
|
-
'activations': z.number().min(-2147483647).max(2147483647).optional(),
|
|
1023
|
+
'activations': z.number().min(-2147483647).max(2147483647).nullable().optional(),
|
|
989
1024
|
'createdAt': z.coerce.date(),
|
|
990
|
-
'deletedAt': z.coerce.date().optional(),
|
|
991
|
-
'depletedAt': z.coerce.date().optional(),
|
|
1025
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1026
|
+
'depletedAt': z.coerce.date().nullable().optional(),
|
|
992
1027
|
'id': TypedUuidForMapperId,
|
|
993
|
-
'maxActivations': z.number().min(-2147483647).max(2147483647).optional(),
|
|
1028
|
+
'maxActivations': z.number().min(-2147483647).max(2147483647).nullable().optional(),
|
|
994
1029
|
'name': z.string(),
|
|
995
|
-
'rule': z.record(z.unknown()),
|
|
1030
|
+
'rule': z.record(z.string(), z.unknown()),
|
|
996
1031
|
'updatedAt': z.coerce.date(),
|
|
997
1032
|
}),
|
|
998
1033
|
)
|
|
999
1034
|
|
|
1035
|
+
export const Provider = z.preprocess(processResponseBody, z.enum(['google']))
|
|
1036
|
+
|
|
1037
|
+
export const NewHireBody = z.preprocess(
|
|
1038
|
+
processResponseBody,
|
|
1039
|
+
z.object({ 'applicationId': TypedUuidForApplicationId, 'provider': Provider, 'providerId': z.string() }),
|
|
1040
|
+
)
|
|
1041
|
+
|
|
1000
1042
|
export const NotificationMedium = z.preprocess(processResponseBody, z.enum(['Email']))
|
|
1001
1043
|
|
|
1002
1044
|
export const NotificationStatus = z.preprocess(processResponseBody, z.enum(['Failed', 'Pending', 'Scheduled', 'Sent']))
|
|
1003
1045
|
|
|
1004
|
-
export const TypedUuidForNotificationId = z.preprocess(processResponseBody, z.
|
|
1046
|
+
export const TypedUuidForNotificationId = z.preprocess(processResponseBody, z.uuid())
|
|
1005
1047
|
|
|
1006
1048
|
export const RenderedEmail = z.preprocess(
|
|
1007
1049
|
processResponseBody,
|
|
1008
1050
|
z.object({
|
|
1009
1051
|
'from': z.string(),
|
|
1010
|
-
'html': z.string().optional(),
|
|
1052
|
+
'html': z.string().nullable().optional(),
|
|
1011
1053
|
'name': z.string(),
|
|
1012
1054
|
'subject': z.string(),
|
|
1013
1055
|
'text': z.string(),
|
|
@@ -1027,11 +1069,11 @@ export const Notification_for_RenderedEmail = z.preprocess(
|
|
|
1027
1069
|
processResponseBody,
|
|
1028
1070
|
z.object({
|
|
1029
1071
|
'createdAt': z.coerce.date(),
|
|
1030
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1072
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1031
1073
|
'id': TypedUuidForNotificationId,
|
|
1032
1074
|
'kind': z.string(),
|
|
1033
1075
|
'medium': NotificationMedium,
|
|
1034
|
-
'message': RenderedEmail.optional(),
|
|
1076
|
+
'message': RenderedEmail.nullable().optional(),
|
|
1035
1077
|
'recipient': RecipientId,
|
|
1036
1078
|
'status': NotificationStatus,
|
|
1037
1079
|
'updatedAt': z.coerce.date(),
|
|
@@ -1041,11 +1083,11 @@ export const Notification_for_RenderedEmail = z.preprocess(
|
|
|
1041
1083
|
export const OAuthAuthzCodeExchangeBody = z.preprocess(
|
|
1042
1084
|
processResponseBody,
|
|
1043
1085
|
z.object({
|
|
1044
|
-
'clientId': TypedUuidForOAuthClientId.optional(),
|
|
1045
|
-
'clientSecret': SecretString.optional(),
|
|
1086
|
+
'clientId': TypedUuidForOAuthClientId.nullable().optional(),
|
|
1087
|
+
'clientSecret': SecretString.nullable().optional(),
|
|
1046
1088
|
'code': z.string(),
|
|
1047
1089
|
'grantType': z.string(),
|
|
1048
|
-
'pkceVerifier': z.string().optional(),
|
|
1090
|
+
'pkceVerifier': z.string().nullable().optional(),
|
|
1049
1091
|
'redirectUri': z.string(),
|
|
1050
1092
|
}),
|
|
1051
1093
|
)
|
|
@@ -1055,13 +1097,13 @@ export const OAuthAuthzCodeExchangeResponse = z.preprocess(
|
|
|
1055
1097
|
z.object({ 'accessToken': z.string(), 'expiresIn': z.number(), 'tokenType': z.string() }),
|
|
1056
1098
|
)
|
|
1057
1099
|
|
|
1058
|
-
export const TypedUuidForOAuthRedirectUriId = z.preprocess(processResponseBody, z.
|
|
1100
|
+
export const TypedUuidForOAuthRedirectUriId = z.preprocess(processResponseBody, z.uuid())
|
|
1059
1101
|
|
|
1060
1102
|
export const OAuthClientRedirectUri = z.preprocess(
|
|
1061
1103
|
processResponseBody,
|
|
1062
1104
|
z.object({
|
|
1063
1105
|
'createdAt': z.coerce.date(),
|
|
1064
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1106
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1065
1107
|
'id': TypedUuidForOAuthRedirectUriId,
|
|
1066
1108
|
'oauthClientId': TypedUuidForOAuthClientId,
|
|
1067
1109
|
'redirectUri': z.string(),
|
|
@@ -1072,7 +1114,7 @@ export const OAuthClientSecret = z.preprocess(
|
|
|
1072
1114
|
processResponseBody,
|
|
1073
1115
|
z.object({
|
|
1074
1116
|
'createdAt': z.coerce.date(),
|
|
1075
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1117
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1076
1118
|
'id': TypedUuidForOAuthSecretId,
|
|
1077
1119
|
'oauthClientId': TypedUuidForOAuthClientId,
|
|
1078
1120
|
'secretSignature': z.string(),
|
|
@@ -1083,7 +1125,7 @@ export const OAuthClient = z.preprocess(
|
|
|
1083
1125
|
processResponseBody,
|
|
1084
1126
|
z.object({
|
|
1085
1127
|
'createdAt': z.coerce.date(),
|
|
1086
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1128
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1087
1129
|
'id': TypedUuidForOAuthClientId,
|
|
1088
1130
|
'redirectUris': OAuthClientRedirectUri.array(),
|
|
1089
1131
|
'secrets': OAuthClientSecret.array(),
|
|
@@ -1104,25 +1146,30 @@ export const OAuthProviderInfo = z.preprocess(
|
|
|
1104
1146
|
}),
|
|
1105
1147
|
)
|
|
1106
1148
|
|
|
1149
|
+
export const OfferTransitionBody = z.preprocess(
|
|
1150
|
+
processResponseBody,
|
|
1151
|
+
z.object({ 'message': EmailConfig.nullable().optional(), 'startDate': z.string() }),
|
|
1152
|
+
)
|
|
1153
|
+
|
|
1107
1154
|
export const OpenIdConfiguration = z.preprocess(processResponseBody, z.object({ 'jwksUri': z.string() }))
|
|
1108
1155
|
|
|
1109
1156
|
export const OperationState = z.preprocess(processResponseBody, z.enum(['complete', 'pending', 'started']))
|
|
1110
1157
|
|
|
1111
1158
|
export const OperationTaskState = z.preprocess(processResponseBody, z.enum(['complete', 'failed', 'pending']))
|
|
1112
1159
|
|
|
1113
|
-
export const TypedUuidForOperationTaskId = z.preprocess(processResponseBody, z.
|
|
1160
|
+
export const TypedUuidForOperationTaskId = z.preprocess(processResponseBody, z.uuid())
|
|
1114
1161
|
|
|
1115
1162
|
export const OperationTask_for_AnyValue_and_AnyValue_and_AnyValue_and_AnyValue = z.preprocess(
|
|
1116
1163
|
processResponseBody,
|
|
1117
1164
|
z.object({
|
|
1118
|
-
'body': z.record(z.unknown()).optional(),
|
|
1165
|
+
'body': z.record(z.string(), z.unknown()).optional(),
|
|
1119
1166
|
'createdAt': z.coerce.date(),
|
|
1120
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1167
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1121
1168
|
'id': TypedUuidForOperationTaskId,
|
|
1122
1169
|
'operationId': TypedUuidForOperationId,
|
|
1123
|
-
'path': z.record(z.unknown()).optional(),
|
|
1124
|
-
'query': z.record(z.unknown()).optional(),
|
|
1125
|
-
'response': z.record(z.unknown()).optional(),
|
|
1170
|
+
'path': z.record(z.string(), z.unknown()).optional(),
|
|
1171
|
+
'query': z.record(z.string(), z.unknown()).optional(),
|
|
1172
|
+
'response': z.record(z.string(), z.unknown()).optional(),
|
|
1126
1173
|
'state': OperationTaskState,
|
|
1127
1174
|
'updatedAt': z.coerce.date(),
|
|
1128
1175
|
}),
|
|
@@ -1133,7 +1180,7 @@ export const Operation_for_TurnstilePermission_and_String = z.preprocess(
|
|
|
1133
1180
|
z.object({
|
|
1134
1181
|
'callerPermissions': Permissions_for_TurnstilePermission,
|
|
1135
1182
|
'createdAt': z.coerce.date(),
|
|
1136
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1183
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1137
1184
|
'endpoint': z.string(),
|
|
1138
1185
|
'id': TypedUuidForOperationId,
|
|
1139
1186
|
'state': OperationState,
|
|
@@ -1148,7 +1195,7 @@ export const Operation_for_TurnstilePermission_and_TransitionApplicationToDeclin
|
|
|
1148
1195
|
z.object({
|
|
1149
1196
|
'callerPermissions': Permissions_for_TurnstilePermission,
|
|
1150
1197
|
'createdAt': z.coerce.date(),
|
|
1151
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1198
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1152
1199
|
'endpoint': TransitionApplicationToDeclinedBatchEndpoint,
|
|
1153
1200
|
'id': TypedUuidForOperationId,
|
|
1154
1201
|
'state': OperationState,
|
|
@@ -1163,7 +1210,7 @@ export const Operation_for_TurnstilePermission_and_TransitionApplicationToDeferr
|
|
|
1163
1210
|
z.object({
|
|
1164
1211
|
'callerPermissions': Permissions_for_TurnstilePermission,
|
|
1165
1212
|
'createdAt': z.coerce.date(),
|
|
1166
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1213
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1167
1214
|
'endpoint': TransitionApplicationToDeferredBatchEndpoint,
|
|
1168
1215
|
'id': TypedUuidForOperationId,
|
|
1169
1216
|
'state': OperationState,
|
|
@@ -1171,14 +1218,17 @@ export const Operation_for_TurnstilePermission_and_TransitionApplicationToDeferr
|
|
|
1171
1218
|
}),
|
|
1172
1219
|
)
|
|
1173
1220
|
|
|
1174
|
-
export const OptionalTransitionBody = z.preprocess(
|
|
1221
|
+
export const OptionalTransitionBody = z.preprocess(
|
|
1222
|
+
processResponseBody,
|
|
1223
|
+
z.object({ 'message': EmailConfig.nullable().optional() }),
|
|
1224
|
+
)
|
|
1175
1225
|
|
|
1176
1226
|
export const Pool = z.preprocess(
|
|
1177
1227
|
processResponseBody,
|
|
1178
1228
|
z.object({
|
|
1179
1229
|
'createdAt': z.coerce.date(),
|
|
1180
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1181
|
-
'description': z.string().optional(),
|
|
1230
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1231
|
+
'description': z.string().nullable().optional(),
|
|
1182
1232
|
'id': TypedUuidForPoolId,
|
|
1183
1233
|
'listings': ListingPool.array(),
|
|
1184
1234
|
'name': z.string(),
|
|
@@ -1195,7 +1245,7 @@ export const Review = z.preprocess(
|
|
|
1195
1245
|
'applicationId': TypedUuidForApplicationId,
|
|
1196
1246
|
'content': z.string(),
|
|
1197
1247
|
'createdAt': z.coerce.date(),
|
|
1198
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1248
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1199
1249
|
'id': TypedUuidForReviewId,
|
|
1200
1250
|
'reviewerId': TypedUuidForReviewerId,
|
|
1201
1251
|
'score': ReviewScore,
|
|
@@ -1211,7 +1261,7 @@ export const Reviewer = z.preprocess(
|
|
|
1211
1261
|
z.object({
|
|
1212
1262
|
'apiUserId': TypedUuidForUserId,
|
|
1213
1263
|
'createdAt': z.coerce.date(),
|
|
1214
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1264
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1215
1265
|
'id': TypedUuidForReviewerId,
|
|
1216
1266
|
'updatedAt': z.coerce.date(),
|
|
1217
1267
|
}),
|
|
@@ -1219,19 +1269,19 @@ export const Reviewer = z.preprocess(
|
|
|
1219
1269
|
|
|
1220
1270
|
export const ReviewerInfo = z.preprocess(
|
|
1221
1271
|
processResponseBody,
|
|
1222
|
-
z.object({ 'reviewer': Reviewer, 'user': ApiUserInfo_for_TurnstilePermission.optional() }),
|
|
1272
|
+
z.object({ 'reviewer': Reviewer, 'user': ApiUserInfo_for_TurnstilePermission.nullable().optional() }),
|
|
1223
1273
|
)
|
|
1224
1274
|
|
|
1225
1275
|
export const ReviewInfo = z.preprocess(
|
|
1226
1276
|
processResponseBody,
|
|
1227
|
-
z.object({ 'review': Review, 'reviewer': ReviewerInfo.optional() }),
|
|
1277
|
+
z.object({ 'review': Review, 'reviewer': ReviewerInfo.nullable().optional() }),
|
|
1228
1278
|
)
|
|
1229
1279
|
|
|
1230
1280
|
export const Role = z.preprocess(
|
|
1231
1281
|
processResponseBody,
|
|
1232
1282
|
z.object({
|
|
1233
1283
|
'createdAt': z.coerce.date(),
|
|
1234
|
-
'deletedAt': z.coerce.date().optional(),
|
|
1284
|
+
'deletedAt': z.coerce.date().nullable().optional(),
|
|
1235
1285
|
'departmentId': TypedUuidForDepartmentId,
|
|
1236
1286
|
'id': TypedUuidForRoleId,
|
|
1237
1287
|
'name': z.string(),
|
|
@@ -1255,13 +1305,16 @@ export const UpdateDocument = z.preprocess(
|
|
|
1255
1305
|
processResponseBody,
|
|
1256
1306
|
z.object({
|
|
1257
1307
|
'kind': DocumentKind,
|
|
1258
|
-
'mime': z.string().optional(),
|
|
1308
|
+
'mime': z.string().nullable().optional(),
|
|
1259
1309
|
'source': DocumentSource,
|
|
1260
|
-
'status': z.string().optional(),
|
|
1310
|
+
'status': z.string().nullable().optional(),
|
|
1261
1311
|
}),
|
|
1262
1312
|
)
|
|
1263
1313
|
|
|
1264
|
-
export const UpdateDocumentStatus = z.preprocess(
|
|
1314
|
+
export const UpdateDocumentStatus = z.preprocess(
|
|
1315
|
+
processResponseBody,
|
|
1316
|
+
z.object({ 'status': z.string().nullable().optional() }),
|
|
1317
|
+
)
|
|
1265
1318
|
|
|
1266
1319
|
export const UpdateListing = z.preprocess(
|
|
1267
1320
|
processResponseBody,
|
|
@@ -1311,6 +1364,14 @@ export const OpenidConfigurationParams = z.preprocess(
|
|
|
1311
1364
|
}),
|
|
1312
1365
|
)
|
|
1313
1366
|
|
|
1367
|
+
export const ListApiUsersParams = z.preprocess(
|
|
1368
|
+
processResponseBody,
|
|
1369
|
+
z.object({
|
|
1370
|
+
path: z.object({}),
|
|
1371
|
+
query: z.object({}),
|
|
1372
|
+
}),
|
|
1373
|
+
)
|
|
1374
|
+
|
|
1314
1375
|
export const CreateApiUserParams = z.preprocess(
|
|
1315
1376
|
processResponseBody,
|
|
1316
1377
|
z.object({
|
|
@@ -1571,6 +1632,16 @@ export const GetApplicationInterviewCodeParams = z.preprocess(
|
|
|
1571
1632
|
}),
|
|
1572
1633
|
)
|
|
1573
1634
|
|
|
1635
|
+
export const NotifyApplicationReviewAssignmentsParams = z.preprocess(
|
|
1636
|
+
processResponseBody,
|
|
1637
|
+
z.object({
|
|
1638
|
+
path: z.object({
|
|
1639
|
+
application: TypedUuidForApplicationId,
|
|
1640
|
+
}),
|
|
1641
|
+
query: z.object({}),
|
|
1642
|
+
}),
|
|
1643
|
+
)
|
|
1644
|
+
|
|
1574
1645
|
export const SimulateReviewActionParams = z.preprocess(
|
|
1575
1646
|
processResponseBody,
|
|
1576
1647
|
z.object({
|
|
@@ -1815,6 +1886,14 @@ export const UpdateDocumentStatusParams = z.preprocess(
|
|
|
1815
1886
|
}),
|
|
1816
1887
|
)
|
|
1817
1888
|
|
|
1889
|
+
export const NewHireParams = z.preprocess(
|
|
1890
|
+
processResponseBody,
|
|
1891
|
+
z.object({
|
|
1892
|
+
path: z.object({}),
|
|
1893
|
+
query: z.object({}),
|
|
1894
|
+
}),
|
|
1895
|
+
)
|
|
1896
|
+
|
|
1818
1897
|
export const GetGroupsParams = z.preprocess(
|
|
1819
1898
|
processResponseBody,
|
|
1820
1899
|
z.object({
|
|
@@ -1957,7 +2036,7 @@ export const AuthzCodeRedirectParams = z.preprocess(
|
|
|
1957
2036
|
clientId: TypedUuidForOAuthClientId,
|
|
1958
2037
|
redirectUri: z.string(),
|
|
1959
2038
|
responseType: z.string(),
|
|
1960
|
-
scope: z.string().optional(),
|
|
2039
|
+
scope: z.string().nullable().optional(),
|
|
1961
2040
|
state: z.string(),
|
|
1962
2041
|
}),
|
|
1963
2042
|
}),
|
|
@@ -1970,9 +2049,9 @@ export const AuthzCodeCallbackParams = z.preprocess(
|
|
|
1970
2049
|
provider: OAuthProviderName,
|
|
1971
2050
|
}),
|
|
1972
2051
|
query: z.object({
|
|
1973
|
-
code: z.string().optional(),
|
|
1974
|
-
error: z.string().optional(),
|
|
1975
|
-
state: z.string().optional(),
|
|
2052
|
+
code: z.string().nullable().optional(),
|
|
2053
|
+
error: z.string().nullable().optional(),
|
|
2054
|
+
state: z.string().nullable().optional(),
|
|
1976
2055
|
}),
|
|
1977
2056
|
}),
|
|
1978
2057
|
)
|
|
@@ -2080,7 +2159,7 @@ export const GetMappersParams = z.preprocess(
|
|
|
2080
2159
|
z.object({
|
|
2081
2160
|
path: z.object({}),
|
|
2082
2161
|
query: z.object({
|
|
2083
|
-
includeDepleted: SafeBoolean.optional(),
|
|
2162
|
+
includeDepleted: SafeBoolean.nullable().optional(),
|
|
2084
2163
|
}),
|
|
2085
2164
|
}),
|
|
2086
2165
|
)
|