@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/src/Api.ts CHANGED
@@ -1,13 +1,5 @@
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
3
  import type { FetchParams } from './http-client'
12
4
  import { HttpClient, toQueryString } from './http-client'
13
5
 
@@ -82,6 +74,7 @@ export type TurnstilePermission =
82
74
  | 'WithdrawApplicationsAssigned'
83
75
  | 'ManageApplicationsAssigned'
84
76
  | 'ManageApplicationsAll'
77
+ | 'GetApplicationSummariesAll'
85
78
  | 'GetDocumentsAssigned'
86
79
  | 'GetDocumentsAll'
87
80
  | 'CreateDocument'
@@ -186,90 +179,90 @@ export type TurnstilePermission =
186
179
  | 'ManageMagicLinkClientsAll'
187
180
  | 'CreateAccessToken'
188
181
  | { 'GetApplicant': TypedUuidForApplicantId }
189
- | { 'GetApplicants': TypedUuidForApplicantId[] }
182
+ | { 'GetApplicants': (TypedUuidForApplicantId)[] }
190
183
  | { 'CreateApplicant': TypedUuidForUserId }
191
- | { 'CreateApplicants': TypedUuidForUserId[] }
184
+ | { 'CreateApplicants': (TypedUuidForUserId)[] }
192
185
  | { 'ManageApplicant': TypedUuidForApplicantId }
193
- | { 'ManageApplicants': TypedUuidForApplicantId[] }
186
+ | { 'ManageApplicants': (TypedUuidForApplicantId)[] }
194
187
  | { 'GetApplication': TypedUuidForApplicationId }
195
- | { 'GetApplications': TypedUuidForApplicationId[] }
188
+ | { 'GetApplications': (TypedUuidForApplicationId)[] }
196
189
  | { 'CreateApplication': TypedUuidForApplicantId }
197
190
  | { 'SubmitApplication': TypedUuidForApplicationId }
198
- | { 'SubmitApplications': TypedUuidForApplicationId[] }
191
+ | { 'SubmitApplications': (TypedUuidForApplicationId)[] }
199
192
  | { 'WithdrawApplication': TypedUuidForApplicationId }
200
- | { 'WithdrawApplications': TypedUuidForApplicationId[] }
193
+ | { 'WithdrawApplications': (TypedUuidForApplicationId)[] }
201
194
  | { 'ManageApplication': TypedUuidForApplicationId }
202
- | { 'ManageApplications': TypedUuidForApplicationId[] }
195
+ | { 'ManageApplications': (TypedUuidForApplicationId)[] }
203
196
  | { 'GetDocument': TypedUuidForDocumentId }
204
- | { 'GetDocuments': TypedUuidForDocumentId[] }
197
+ | { 'GetDocuments': (TypedUuidForDocumentId)[] }
205
198
  | { 'ManageDocument': TypedUuidForDocumentId }
206
- | { 'ManageDocuments': TypedUuidForDocumentId[] }
199
+ | { 'ManageDocuments': (TypedUuidForDocumentId)[] }
207
200
  | { 'AttachDocument': DocumentParent }
208
- | { 'AttachDocuments': DocumentParent[] }
201
+ | { 'AttachDocuments': (DocumentParent)[] }
209
202
  | { 'GetDepartment': TypedUuidForDepartmentId }
210
- | { 'GetDepartments': TypedUuidForDepartmentId[] }
203
+ | { 'GetDepartments': (TypedUuidForDepartmentId)[] }
211
204
  | { 'GetRole': TypedUuidForRoleId }
212
- | { 'GetRoles': TypedUuidForRoleId[] }
205
+ | { 'GetRoles': (TypedUuidForRoleId)[] }
213
206
  | { 'GetListing': TypedUuidForListingId }
214
- | { 'GetListings': TypedUuidForListingId[] }
207
+ | { 'GetListings': (TypedUuidForListingId)[] }
215
208
  | { 'GetPool': TypedUuidForPoolId }
216
- | { 'GetPools': TypedUuidForPoolId[] }
209
+ | { 'GetPools': (TypedUuidForPoolId)[] }
217
210
  | { 'GetReviewer': TypedUuidForReviewerId }
218
- | { 'GetReviewers': TypedUuidForReviewerId[] }
211
+ | { 'GetReviewers': (TypedUuidForReviewerId)[] }
219
212
  | { 'CreateReviewer': TypedUuidForUserId }
220
- | { 'CreateReviewers': TypedUuidForUserId[] }
213
+ | { 'CreateReviewers': (TypedUuidForUserId)[] }
221
214
  | { 'GetReview': TypedUuidForReviewId }
222
- | { 'GetReviews': TypedUuidForReviewId[] }
215
+ | { 'GetReviews': (TypedUuidForReviewId)[] }
223
216
  | { 'ManageReview': TypedUuidForReviewId }
224
- | { 'ManageReviews': TypedUuidForReviewId[] }
217
+ | { 'ManageReviews': (TypedUuidForReviewId)[] }
225
218
  | { 'CompleteReviewAssignment': TypedUuidForUserId }
226
219
  | { 'GetInterviewer': TypedUuidForInterviewerId }
227
- | { 'GetInterviewers': TypedUuidForInterviewerId[] }
220
+ | { 'GetInterviewers': (TypedUuidForInterviewerId)[] }
228
221
  | { 'CreateInterviewer': TypedUuidForUserId }
229
- | { 'CreateInterviewers': TypedUuidForUserId[] }
222
+ | { 'CreateInterviewers': (TypedUuidForUserId)[] }
230
223
  | { 'ManageInterviewer': TypedUuidForInterviewerId }
231
- | { 'ManageInterviewers': TypedUuidForInterviewerId[] }
224
+ | { 'ManageInterviewers': (TypedUuidForInterviewerId)[] }
232
225
  | { 'GetInterview': TypedUuidForInterviewId }
233
- | { 'GetInterviews': TypedUuidForInterviewId[] }
226
+ | { 'GetInterviews': (TypedUuidForInterviewId)[] }
234
227
  | { 'ManageInterview': TypedUuidForInterviewId }
235
- | { 'ManageInterviews': TypedUuidForInterviewId[] }
228
+ | { 'ManageInterviews': (TypedUuidForInterviewId)[] }
236
229
  | { 'GetBackgroundCheck': TypedUuidForBackgroundCheckId }
237
- | { 'GetBackgroundChecks': TypedUuidForBackgroundCheckId[] }
230
+ | { 'GetBackgroundChecks': (TypedUuidForBackgroundCheckId)[] }
238
231
  | { 'ManageBackgroundCheck': TypedUuidForBackgroundCheckId }
239
- | { 'ManageBackgroundChecks': TypedUuidForBackgroundCheckId[] }
232
+ | { 'ManageBackgroundChecks': (TypedUuidForBackgroundCheckId)[] }
240
233
  | { 'GetEmployee': TypedUuidForEmployeeId }
241
- | { 'GetEmployees': TypedUuidForEmployeeId[] }
234
+ | { 'GetEmployees': (TypedUuidForEmployeeId)[] }
242
235
  | { 'ManageEmployee': TypedUuidForEmployeeId }
243
- | { 'ManageEmployees': TypedUuidForEmployeeId[] }
236
+ | { 'ManageEmployees': (TypedUuidForEmployeeId)[] }
244
237
  | { 'GetBatchOperation': TypedUuidForOperationId }
245
- | { 'GetBatchOperations': TypedUuidForOperationId[] }
238
+ | { 'GetBatchOperations': (TypedUuidForOperationId)[] }
246
239
  | { 'GetApiUser': TypedUuidForUserId }
247
- | { 'GetApiUsers': TypedUuidForUserId[] }
240
+ | { 'GetApiUsers': (TypedUuidForUserId)[] }
248
241
  | { 'ManageApiUser': TypedUuidForUserId }
249
- | { 'ManageApiUsers': TypedUuidForUserId[] }
242
+ | { 'ManageApiUsers': (TypedUuidForUserId)[] }
250
243
  | { 'CreateApiKey': TypedUuidForUserId }
251
244
  | { 'GetApiKey': TypedUuidForApiKeyId }
252
- | { 'GetApiKeys': TypedUuidForApiKeyId[] }
245
+ | { 'GetApiKeys': (TypedUuidForApiKeyId)[] }
253
246
  | { 'ManageApiKey': TypedUuidForApiKeyId }
254
- | { 'ManageApiKeys': TypedUuidForApiKeyId[] }
247
+ | { 'ManageApiKeys': (TypedUuidForApiKeyId)[] }
255
248
  | { 'GetGroup': TypedUuidForAccessGroupId }
256
249
  | { 'ManageGroup': TypedUuidForAccessGroupId }
257
- | { 'ManageGroups': TypedUuidForAccessGroupId[] }
250
+ | { 'ManageGroups': (TypedUuidForAccessGroupId)[] }
258
251
  | { 'ManageGroupMembership': TypedUuidForAccessGroupId }
259
- | { 'ManageGroupMemberships': TypedUuidForAccessGroupId[] }
252
+ | { 'ManageGroupMemberships': (TypedUuidForAccessGroupId)[] }
260
253
  | { 'ManageMapper': TypedUuidForMapperId }
261
- | { 'ManageMappers': TypedUuidForMapperId[] }
254
+ | { 'ManageMappers': (TypedUuidForMapperId)[] }
262
255
  | { 'GetOAuthClient': TypedUuidForOAuthClientId }
263
- | { 'GetOAuthClients': TypedUuidForOAuthClientId[] }
256
+ | { 'GetOAuthClients': (TypedUuidForOAuthClientId)[] }
264
257
  | { 'ManageOAuthClient': TypedUuidForOAuthClientId }
265
- | { 'ManageOAuthClients': TypedUuidForOAuthClientId[] }
258
+ | { 'ManageOAuthClients': (TypedUuidForOAuthClientId)[] }
266
259
  | { 'GetMagicLinkClient': TypedUuidForMagicLinkId }
267
- | { 'GetMagicLinkClients': TypedUuidForMagicLinkId[] }
260
+ | { 'GetMagicLinkClients': (TypedUuidForMagicLinkId)[] }
268
261
  | { 'ManageMagicLinkClient': TypedUuidForMagicLinkId }
269
- | { 'ManageMagicLinkClients': TypedUuidForMagicLinkId[] }
262
+ | { 'ManageMagicLinkClients': (TypedUuidForMagicLinkId)[] }
270
263
  | { 'Unsupported': Record<string, unknown> }
271
264
 
272
- export type Permissions_for_TurnstilePermission = TurnstilePermission[]
265
+ export type Permissions_for_TurnstilePermission = (TurnstilePermission)[]
273
266
 
274
267
  export type AccessGroupUpdateParams_for_TurnstilePermission = {
275
268
  'name': string
@@ -278,14 +271,14 @@ export type AccessGroupUpdateParams_for_TurnstilePermission = {
278
271
 
279
272
  export type AccessGroup_for_TurnstilePermission = {
280
273
  'createdAt': Date
281
- 'deletedAt'?: Date
274
+ 'deletedAt'?: Date | null
282
275
  'id': TypedUuidForAccessGroupId
283
276
  'name': string
284
277
  'permissions': Permissions_for_TurnstilePermission
285
278
  'updatedAt': Date
286
279
  }
287
280
 
288
- export type AccessTokenExchangeRequest = { 'deviceCode': string; 'expiresAt'?: Date; 'grantType': string }
281
+ export type AccessTokenExchangeRequest = { 'deviceCode': string; 'expiresAt'?: Date | null; 'grantType': string }
289
282
 
290
283
  export type AddGroupBody = { 'groupId': TypedUuidForAccessGroupId }
291
284
 
@@ -295,20 +288,20 @@ export type AddOAuthClientRedirectBody = { 'redirectUri': string }
295
288
 
296
289
  export type ApiKeyCreateParams_for_TurnstilePermission = {
297
290
  'expiresAt': Date
298
- 'permissions'?: Permissions_for_TurnstilePermission
291
+ 'permissions'?: Permissions_for_TurnstilePermission | null
299
292
  }
300
293
 
301
294
  export type ApiKeyResponse_for_TurnstilePermission = {
302
295
  'createdAt': Date
303
296
  'id': TypedUuidForApiKeyId
304
- 'permissions'?: Permissions_for_TurnstilePermission
297
+ 'permissions'?: Permissions_for_TurnstilePermission | null
305
298
  }
306
299
 
307
300
  export type TypedUuidForUserProviderId = string
308
301
 
309
302
  export type ApiUserContactEmail = {
310
303
  'createdAt': Date
311
- 'deletedAt'?: Date
304
+ 'deletedAt'?: Date | null
312
305
  'email': string
313
306
  'id': TypedUuidForUserProviderId
314
307
  'updatedAt': Date
@@ -319,9 +312,9 @@ export type ApiUserEmailUpdateParams = { 'email': string }
319
312
 
320
313
  export type ApiUserProvider = {
321
314
  'createdAt': Date
322
- 'deletedAt'?: Date
323
- 'displayNames': string[]
324
- 'emails': string[]
315
+ 'deletedAt'?: Date | null
316
+ 'displayNames': (string)[]
317
+ 'emails': (string)[]
325
318
  'id': TypedUuidForUserProviderId
326
319
  'provider': string
327
320
  'providerId': string
@@ -331,16 +324,16 @@ export type ApiUserProvider = {
331
324
 
332
325
  export type ApiUser_for_TurnstilePermission = {
333
326
  'createdAt': Date
334
- 'deletedAt'?: Date
335
- 'groups': TypedUuidForAccessGroupId[]
327
+ 'deletedAt'?: Date | null
328
+ 'groups': (TypedUuidForAccessGroupId)[]
336
329
  'id': TypedUuidForUserId
337
330
  'permissions': Permissions_for_TurnstilePermission
338
331
  'updatedAt': Date
339
332
  }
340
333
 
341
334
  export type ApiUserInfo_for_TurnstilePermission = {
342
- 'email'?: ApiUserContactEmail
343
- 'providers': ApiUserProvider[]
335
+ 'email'?: ApiUserContactEmail | null
336
+ 'providers': (ApiUserProvider)[]
344
337
  'user': ApiUser_for_TurnstilePermission
345
338
  }
346
339
 
@@ -353,14 +346,14 @@ export type ApiUserLinkRequestResponse = { 'token': SecretString }
353
346
  export type ApiUserProviderLinkPayload = { 'token': string }
354
347
 
355
348
  export type ApiUserUpdateParams_for_TurnstilePermission = {
356
- 'groupIds': TypedUuidForAccessGroupId[]
349
+ 'groupIds': (TypedUuidForAccessGroupId)[]
357
350
  'permissions': Permissions_for_TurnstilePermission
358
351
  }
359
352
 
360
353
  export type Applicant = {
361
354
  'apiUserId': TypedUuidForUserId
362
355
  'createdAt': Date
363
- 'deletedAt'?: Date
356
+ 'deletedAt'?: Date | null
364
357
  'id': TypedUuidForApplicantId
365
358
  'updatedAt': Date
366
359
  }
@@ -382,14 +375,14 @@ export type ApplicantContactField =
382
375
  export type ApplicantContact = {
383
376
  'applicantId': TypedUuidForApplicantId
384
377
  'createdAt': Date
385
- 'deletedAt'?: Date
378
+ 'deletedAt'?: Date | null
386
379
  'id': TypedUuidForApplicantContactId
387
380
  'kind': ApplicantContactField
388
381
  'updatedAt': Date
389
- 'value'?: string
382
+ 'value'?: string | null
390
383
  }
391
384
 
392
- export type ApplicantInfo = { 'contact': ApplicantContact[]; 'info': Applicant }
385
+ export type ApplicantInfo = { 'contact': (ApplicantContact)[]; 'info': Applicant }
393
386
 
394
387
  export type InterviewingState =
395
388
  | 'scheduled'
@@ -399,13 +392,13 @@ export type InterviewingState =
399
392
  | 'complete'
400
393
 
401
394
  export type OfferState =
402
- | 'start'
403
395
  | 'documents_sent'
404
396
  | 'documents_complete'
405
397
  | 'background_check_sent'
406
398
  | 'background_check_warning'
407
399
  | 'background_check_complete'
408
400
  | 'complete'
401
+ | { 'start': string }
409
402
 
410
403
  export type ApplicationState =
411
404
  | 'contracted'
@@ -422,13 +415,13 @@ export type ApplicationState =
422
415
 
423
416
  export type Application = {
424
417
  'applicantId': TypedUuidForApplicantId
425
- 'completedAt'?: Date
418
+ 'completedAt'?: Date | null
426
419
  'createdAt': Date
427
- 'deletedAt'?: Date
420
+ 'deletedAt'?: Date | null
428
421
  'id': TypedUuidForApplicationId
429
422
  'listingId': TypedUuidForListingId
430
423
  'state': ApplicationState
431
- 'submittedAt'?: Date
424
+ 'submittedAt'?: Date | null
432
425
  'updatedAt': Date
433
426
  }
434
427
 
@@ -449,18 +442,18 @@ export type DocumentSource =
449
442
 
450
443
  export type Document = {
451
444
  'createdAt': Date
452
- 'deletedAt'?: Date
445
+ 'deletedAt'?: Date | null
453
446
  'externalId': string
454
447
  'id': TypedUuidForDocumentId
455
448
  'kind': DocumentKind
456
- 'mime'?: string
449
+ 'mime'?: string | null
457
450
  'parentId': DocumentParent
458
451
  'source': DocumentSource
459
- 'status'?: string
452
+ 'status'?: string | null
460
453
  'updatedAt': Date
461
454
  }
462
455
 
463
- export type ApplicationBundle = { 'applicant': ApplicantInfo; 'application': Application; 'documents': Document[] }
456
+ export type ApplicationBundle = { 'applicant': ApplicantInfo; 'application': Application; 'documents': (Document)[] }
464
457
 
465
458
  export type TypedUuidForApplicationInterviewCodeId = string
466
459
 
@@ -476,9 +469,9 @@ export type TypedUuidForApplicationStateRecordId = string
476
469
  export type ApplicationStateRecord = {
477
470
  'applicationId': TypedUuidForApplicationId
478
471
  'createdAt': Date
479
- 'deletedAt'?: Date
480
472
  'id': TypedUuidForApplicationStateRecordId
481
473
  'state': ApplicationState
474
+ 'supersededAt'?: Date | null
482
475
  'updatedAt': Date
483
476
  }
484
477
 
@@ -487,9 +480,20 @@ export type ListingPoolAssociation =
487
480
  | 'early_positive'
488
481
  | 'positive'
489
482
 
483
+ export type TriageReason =
484
+ | 'has_no_ratings'
485
+ | 'likely_next_steps'
486
+ | 'likely_pass'
487
+ | 'possibly_next_steps'
488
+ | 'possibly_pass'
489
+ | 'very_likely_pass'
490
+ | 'unknown'
491
+
490
492
  export type PoolAction =
491
- | { 'action': 'add'; 'association': ListingPoolAssociation; 'count': number }
492
- | { 'action': 'triage' }
493
+ | 'drop'
494
+ | 'wait'
495
+ | { 'add': { 'association': ListingPoolAssociation; 'count': number } }
496
+ | { 'triage': { 'reason': TriageReason } }
493
497
 
494
498
  export type ReviewScore =
495
499
  | 'emphatic_yes'
@@ -501,40 +505,50 @@ export type ReviewScore =
501
505
 
502
506
  export type Reviews = {
503
507
  'applicationId': TypedUuidForApplicationId
504
- 'complete': TypedUuidForReviewerId[]
505
- 'pending': TypedUuidForReviewerId[]
506
- 'reviewers': TypedUuidForReviewerId[]
507
- 'scores': ReviewScore[]
508
+ 'complete': (TypedUuidForReviewerId)[]
509
+ 'pending': (TypedUuidForReviewerId)[]
510
+ 'reviewers': (TypedUuidForReviewerId)[]
511
+ 'scores': (ReviewScore)[]
508
512
  }
509
513
 
510
514
  export type ExpandedApplicationSummary = {
511
515
  'action': PoolAction
512
516
  'applicant': ApplicantInfo
513
517
  'application': Application
514
- 'documents': Document[]
515
- 'interviewers': TypedUuidForInterviewerId[]
516
- 'interviews': TypedUuidForInterviewId[]
518
+ 'documents': (Document)[]
519
+ 'interviewers': (TypedUuidForInterviewerId)[]
520
+ 'interviews': (TypedUuidForInterviewId)[]
517
521
  'reviews': Reviews
518
522
  }
519
523
 
520
524
  export type Evaluator = {
521
- 'interviewer'?: TypedUuidForInterviewerId
522
- 'reviewer'?: TypedUuidForReviewerId
525
+ 'interviewer'?: TypedUuidForInterviewerId | null
526
+ 'reviewer'?: TypedUuidForReviewerId | null
523
527
  'user': ApiUserInfo_for_TurnstilePermission
524
528
  }
525
529
 
526
- export type ApplicationSummariesResponse = { 'summaries': ExpandedApplicationSummary[]; 'users': Evaluator[] }
530
+ export type ApplicationSummariesResponse = { 'summaries': (ExpandedApplicationSummary)[]; 'users': (Evaluator)[] }
527
531
 
528
- export type ApplicationSummaryResponse = { 'summary': ExpandedApplicationSummary; 'users': Evaluator[] }
532
+ export type ApplicationSummaryResponse = { 'summary': ExpandedApplicationSummary; 'users': (Evaluator)[] }
529
533
 
530
- export type AssignPool = { 'association': ListingPoolAssociation; 'listing': TypedUuidForListingId }
534
+ export type AssignPool = {
535
+ /** Review stage of the listing this pool should be associated to */
536
+ 'association': ListingPoolAssociation
537
+ /** Listing to assign this pool to */
538
+ 'listing': TypedUuidForListingId
539
+ }
531
540
 
532
- export type AttachDocument = { 'externalId': string; 'mime'?: string }
541
+ export type AttachDocument = {
542
+ /** Id assigned to the document by the external datastore */
543
+ 'externalId': string
544
+ /** Mime type of the document */
545
+ 'mime'?: string | null
546
+ }
533
547
 
534
548
  export type EmailConfig = {
535
549
  'from': string
536
- 'htmlTemplate'?: string
537
- 'name'?: string
550
+ 'htmlTemplate'?: string | null
551
+ 'name'?: string | null
538
552
  'subject': string
539
553
  'textTemplate': string
540
554
  }
@@ -544,19 +558,30 @@ export type TransitionMessage =
544
558
  | 'omit'
545
559
  | { 'custom': EmailConfig }
546
560
 
547
- export type TransitionBody = { 'message': TransitionMessage }
561
+ export type TransitionBody = {
562
+ /** The message to send to the applicant */
563
+ 'message': TransitionMessage
564
+ }
548
565
 
549
566
  export type BatchParameter_for_TransitionBody =
550
567
  | { 'all': TransitionBody }
551
- | { 'each': TransitionBody[] }
568
+ | { 'each': (TransitionBody)[] }
552
569
 
553
- export type ViewApplication = { 'application': TypedUuidForApplicationId }
570
+ export type ViewApplication = {
571
+ /** Application to operate on */
572
+ 'application': TypedUuidForApplicationId
573
+ }
554
574
 
555
575
  export type BatchParameter_for_ViewApplication =
556
576
  | { 'all': ViewApplication }
557
- | { 'each': ViewApplication[] }
577
+ | { 'each': (ViewApplication)[] }
558
578
 
559
- export type CreateApplication = { 'applicant': TypedUuidForApplicantId; 'listing': TypedUuidForListingId }
579
+ export type CreateApplication = {
580
+ /** Applicant to create an application for */
581
+ 'applicant': TypedUuidForApplicantId
582
+ /** Listing to apply to */
583
+ 'listing': TypedUuidForListingId
584
+ }
560
585
 
561
586
  export type CreateDepartment = { 'name': string }
562
587
 
@@ -566,7 +591,7 @@ export type CreateDocument = {
566
591
  'mime': string
567
592
  'parent': DocumentParent
568
593
  'source': DocumentSource
569
- 'status'?: string
594
+ 'status'?: string | null
570
595
  }
571
596
 
572
597
  export type RoleListingStatus =
@@ -575,9 +600,16 @@ export type RoleListingStatus =
575
600
 
576
601
  export type CreateListing = { 'name': string; 'role': TypedUuidForRoleId; 'status': RoleListingStatus }
577
602
 
578
- export type CreateMapper = { 'maxActivations'?: number; 'name': string; 'rule': Record<string, unknown> }
603
+ export type CreateMapper = { 'maxActivations'?: number | null; 'name': string; 'rule': Record<string, unknown> }
579
604
 
580
- export type CreatePool = { 'description'?: string; 'name': string; 'reviwers'?: TypedUuidForReviewerId[] }
605
+ export type CreatePool = {
606
+ /** Optional description of the pool */
607
+ 'description'?: string | null
608
+ /** Required display name for the pool */
609
+ 'name': string
610
+ /** List of reviewers to assign to this pool */
611
+ 'reviewers'?: (TypedUuidForReviewerId)[] | null
612
+ }
581
613
 
582
614
  export type CreateReview = {
583
615
  'application': TypedUuidForApplicationId
@@ -586,24 +618,27 @@ export type CreateReview = {
586
618
  'score': ReviewScore
587
619
  'valueReflected': string
588
620
  'valueViolated': string
589
- 'valuesInTension': string[]
621
+ 'valuesInTension': (string)[]
590
622
  }
591
623
 
592
624
  /**
593
625
  * Reviewers to assign to this application for review
594
626
  */
595
- export type CreateReviewAssignments = { 'reviewers': TypedUuidForReviewerId[] }
627
+ export type CreateReviewAssignments = { 'reviewers': (TypedUuidForReviewerId)[] }
596
628
 
597
629
  /**
598
630
  * Failures that can occur when assigning a reviewer
599
631
  */
600
- export type ReviewAssignmentCreationError =
632
+ export type ReviewAssignmentCreationError = (
633
+ /** A requested object resource already exist */
634
+ | 'Conflict'
601
635
  /** A requested object resource does not exist */
602
636
  | 'DoesNotExist'
603
637
  /** Caller does not have access to a require object resource */
604
638
  | 'Forbidden'
605
639
  /** Internal server error */
606
640
  | 'Internal'
641
+ )
607
642
 
608
643
  export type TypedUuidForReviewAssignmentId = string
609
644
 
@@ -614,7 +649,7 @@ export type ReviewAssignmentState =
614
649
  export type ReviewAssignment = {
615
650
  'applicationId': TypedUuidForApplicationId
616
651
  'createdAt': Date
617
- 'deletedAt'?: Date
652
+ 'deletedAt'?: Date | null
618
653
  'id': TypedUuidForReviewAssignmentId
619
654
  'reviewerId': TypedUuidForReviewerId
620
655
  'state': ReviewAssignmentState
@@ -640,26 +675,42 @@ export type CreatedApplication = { 'application': Application }
640
675
 
641
676
  export type Department = {
642
677
  'createdAt': Date
643
- 'deletedAt'?: Date
678
+ 'deletedAt'?: Date | null
644
679
  'id': TypedUuidForDepartmentId
645
680
  'name': string
646
681
  'updatedAt': Date
647
682
  }
648
683
 
649
- export type DocumentUploadUrlResponse = { 'externalId'?: string; 'url': string }
684
+ export type DocumentUploadUrlResponse = { 'externalId'?: string | null; 'url': string }
650
685
 
651
- export type EmailApplicantBody = { 'from': string; 'html'?: string; 'subject': string; 'text': string }
686
+ export type EmailApplicantBody = { 'from': string; 'html'?: string | null; 'subject': string; 'text': string }
687
+
688
+ export type EmployeeState =
689
+ | 'onboarding'
690
+ | 'onboarded'
691
+ | 'offboarding'
692
+ | 'offboarded'
693
+ | { 'newHire': string }
694
+
695
+ export type Employee = {
696
+ 'apiUserId': TypedUuidForUserId
697
+ 'createdAt': Date
698
+ 'deletedAt'?: Date | null
699
+ 'id': TypedUuidForEmployeeId
700
+ 'state': EmployeeState
701
+ 'updatedAt': Date
702
+ }
652
703
 
653
704
  export type GetUserResponse_for_TurnstilePermission = {
654
705
  'info': ApiUser_for_TurnstilePermission
655
- 'providers': ApiUserProvider[]
706
+ 'providers': (ApiUserProvider)[]
656
707
  }
657
708
 
658
709
  export type InitialApiKeyResponse_for_TurnstilePermission = {
659
710
  'createdAt': Date
660
711
  'id': TypedUuidForApiKeyId
661
712
  'key': SecretString
662
- 'permissions'?: Permissions_for_TurnstilePermission
713
+ 'permissions'?: Permissions_for_TurnstilePermission | null
663
714
  }
664
715
 
665
716
  export type TypedUuidForMagicLinkSecretId = string
@@ -682,22 +733,22 @@ export type TypedUuidForInterviewAttendeeId = string
682
733
 
683
734
  export type InterviewAttendee = {
684
735
  'createdAt': Date
685
- 'deletedAt'?: Date
736
+ 'deletedAt'?: Date | null
686
737
  'id': TypedUuidForInterviewAttendeeId
687
738
  'interviewId': TypedUuidForInterviewId
688
739
  'interviewerDisplayName': string
689
740
  'interviewerEmail': string
690
- 'interviewerId'?: TypedUuidForInterviewerId
741
+ 'interviewerId'?: TypedUuidForInterviewerId | null
691
742
  'updatedAt': Date
692
743
  }
693
744
 
694
745
  export type Interview = {
695
746
  'applicantId': TypedUuidForApplicantId
696
747
  'applicationId': TypedUuidForApplicationId
697
- 'attendees': InterviewAttendee[]
748
+ 'attendees': (InterviewAttendee)[]
698
749
  'calendarSource': string
699
750
  'createdAt': Date
700
- 'deletedAt'?: Date
751
+ 'deletedAt'?: Date | null
701
752
  'endTime': Date
702
753
  'externalId': string
703
754
  'id': TypedUuidForInterviewId
@@ -708,18 +759,18 @@ export type Interview = {
708
759
  export type Interviewer = {
709
760
  'apiUserId': TypedUuidForUserId
710
761
  'createdAt': Date
711
- 'deletedAt'?: Date
762
+ 'deletedAt'?: Date | null
712
763
  'id': TypedUuidForInterviewerId
713
764
  'updatedAt': Date
714
765
  }
715
766
 
716
767
  export type Jwk = { 'e': string; 'kid': string; 'kty': string; 'n': string; 'use': string }
717
768
 
718
- export type Jwks = { 'keys': Jwk[] }
769
+ export type Jwks = { 'keys': (Jwk)[] }
719
770
 
720
771
  export type Listing = {
721
772
  'createdAt': Date
722
- 'deletedAt'?: Date
773
+ 'deletedAt'?: Date | null
723
774
  'id': TypedUuidForListingId
724
775
  'name': string
725
776
  'roleId': TypedUuidForRoleId
@@ -732,7 +783,7 @@ export type TypedUuidForListingPoolId = string
732
783
  export type ListingPool = {
733
784
  'association': ListingPoolAssociation
734
785
  'createdAt': Date
735
- 'deletedAt'?: Date
786
+ 'deletedAt'?: Date | null
736
787
  'id': TypedUuidForListingPoolId
737
788
  'listingId': TypedUuidForListingId
738
789
  'poolId': TypedUuidForPoolId
@@ -743,7 +794,7 @@ export type TypedUuidForMagicLinkRedirectUriId = string
743
794
 
744
795
  export type MagicLinkRedirectUri = {
745
796
  'createdAt': Date
746
- 'deletedAt'?: Date
797
+ 'deletedAt'?: Date | null
747
798
  'id': TypedUuidForMagicLinkRedirectUriId
748
799
  'magicLinkClientId': TypedUuidForMagicLinkId
749
800
  'redirectUri': string
@@ -751,7 +802,7 @@ export type MagicLinkRedirectUri = {
751
802
 
752
803
  export type MagicLinkSecret = {
753
804
  'createdAt': Date
754
- 'deletedAt'?: Date
805
+ 'deletedAt'?: Date | null
755
806
  'id': TypedUuidForMagicLinkSecretId
756
807
  'magicLinkClientId': TypedUuidForMagicLinkId
757
808
  'secretSignature': string
@@ -759,10 +810,10 @@ export type MagicLinkSecret = {
759
810
 
760
811
  export type MagicLink = {
761
812
  'createdAt': Date
762
- 'deletedAt'?: Date
813
+ 'deletedAt'?: Date | null
763
814
  'id': TypedUuidForMagicLinkId
764
- 'redirectUris': MagicLinkRedirectUri[]
765
- 'secrets': MagicLinkSecret[]
815
+ 'redirectUris': (MagicLinkRedirectUri)[]
816
+ 'secrets': (MagicLinkSecret)[]
766
817
  }
767
818
 
768
819
  export type TypedUuidForMagicLinkAttemptId = string
@@ -782,24 +833,28 @@ export type MagicLinkSendRequest = {
782
833
  'medium': MagicLinkMedium
783
834
  'recipient': string
784
835
  'redirectUri': string
785
- 'scope'?: string
836
+ 'scope'?: string | null
786
837
  'secret': string
787
838
  }
788
839
 
789
840
  export type MagicLinkSendResponse = { 'attemptId': TypedUuidForMagicLinkAttemptId }
790
841
 
791
842
  export type Mapper = {
792
- 'activations'?: number
843
+ 'activations'?: number | null
793
844
  'createdAt': Date
794
- 'deletedAt'?: Date
795
- 'depletedAt'?: Date
845
+ 'deletedAt'?: Date | null
846
+ 'depletedAt'?: Date | null
796
847
  'id': TypedUuidForMapperId
797
- 'maxActivations'?: number
848
+ 'maxActivations'?: number | null
798
849
  'name': string
799
850
  'rule': Record<string, unknown>
800
851
  'updatedAt': Date
801
852
  }
802
853
 
854
+ export type Provider = 'google'
855
+
856
+ export type NewHireBody = { 'applicationId': TypedUuidForApplicationId; 'provider': Provider; 'providerId': string }
857
+
803
858
  export type NotificationMedium = 'Email'
804
859
 
805
860
  export type NotificationStatus =
@@ -810,7 +865,13 @@ export type NotificationStatus =
810
865
 
811
866
  export type TypedUuidForNotificationId = string
812
867
 
813
- export type RenderedEmail = { 'from': string; 'html'?: string; 'name': string; 'subject': string; 'text': string }
868
+ export type RenderedEmail = {
869
+ 'from': string
870
+ 'html'?: string | null
871
+ 'name': string
872
+ 'subject': string
873
+ 'text': string
874
+ }
814
875
 
815
876
  export type RecipientId =
816
877
  | { 'Applicant': TypedUuidForApplicantId }
@@ -819,22 +880,22 @@ export type RecipientId =
819
880
 
820
881
  export type Notification_for_RenderedEmail = {
821
882
  'createdAt': Date
822
- 'deletedAt'?: Date
883
+ 'deletedAt'?: Date | null
823
884
  'id': TypedUuidForNotificationId
824
885
  'kind': string
825
886
  'medium': NotificationMedium
826
- 'message'?: RenderedEmail
887
+ 'message'?: RenderedEmail | null
827
888
  'recipient': RecipientId
828
889
  'status': NotificationStatus
829
890
  'updatedAt': Date
830
891
  }
831
892
 
832
893
  export type OAuthAuthzCodeExchangeBody = {
833
- 'clientId'?: TypedUuidForOAuthClientId
834
- 'clientSecret'?: SecretString
894
+ 'clientId'?: TypedUuidForOAuthClientId | null
895
+ 'clientSecret'?: SecretString | null
835
896
  'code': string
836
897
  'grantType': string
837
- 'pkceVerifier'?: string
898
+ 'pkceVerifier'?: string | null
838
899
  'redirectUri': string
839
900
  }
840
901
 
@@ -844,7 +905,7 @@ export type TypedUuidForOAuthRedirectUriId = string
844
905
 
845
906
  export type OAuthClientRedirectUri = {
846
907
  'createdAt': Date
847
- 'deletedAt'?: Date
908
+ 'deletedAt'?: Date | null
848
909
  'id': TypedUuidForOAuthRedirectUriId
849
910
  'oauthClientId': TypedUuidForOAuthClientId
850
911
  'redirectUri': string
@@ -852,7 +913,7 @@ export type OAuthClientRedirectUri = {
852
913
 
853
914
  export type OAuthClientSecret = {
854
915
  'createdAt': Date
855
- 'deletedAt'?: Date
916
+ 'deletedAt'?: Date | null
856
917
  'id': TypedUuidForOAuthSecretId
857
918
  'oauthClientId': TypedUuidForOAuthClientId
858
919
  'secretSignature': string
@@ -860,10 +921,10 @@ export type OAuthClientSecret = {
860
921
 
861
922
  export type OAuthClient = {
862
923
  'createdAt': Date
863
- 'deletedAt'?: Date
924
+ 'deletedAt'?: Date | null
864
925
  'id': TypedUuidForOAuthClientId
865
- 'redirectUris': OAuthClientRedirectUri[]
866
- 'secrets': OAuthClientSecret[]
926
+ 'redirectUris': (OAuthClientRedirectUri)[]
927
+ 'secrets': (OAuthClientSecret)[]
867
928
  }
868
929
 
869
930
  export type OAuthProviderName =
@@ -875,10 +936,16 @@ export type OAuthProviderInfo = {
875
936
  'clientId': string
876
937
  'deviceCodeEndpoint': string
877
938
  'provider': OAuthProviderName
878
- 'scopes': string[]
939
+ 'scopes': (string)[]
879
940
  'tokenEndpoint': string
880
941
  }
881
942
 
943
+ export type OfferTransitionBody = {
944
+ /** An optional message to send to the applicant */
945
+ 'message'?: EmailConfig | null
946
+ 'startDate': string
947
+ }
948
+
882
949
  export type OpenIdConfiguration = { 'jwksUri': string }
883
950
 
884
951
  export type OperationState =
@@ -896,7 +963,7 @@ export type TypedUuidForOperationTaskId = string
896
963
  export type OperationTask_for_AnyValue_and_AnyValue_and_AnyValue_and_AnyValue = {
897
964
  'body'?: Record<string, unknown>
898
965
  'createdAt': Date
899
- 'deletedAt'?: Date
966
+ 'deletedAt'?: Date | null
900
967
  'id': TypedUuidForOperationTaskId
901
968
  'operationId': TypedUuidForOperationId
902
969
  'path'?: Record<string, unknown>
@@ -909,7 +976,7 @@ export type OperationTask_for_AnyValue_and_AnyValue_and_AnyValue_and_AnyValue =
909
976
  export type Operation_for_TurnstilePermission_and_String = {
910
977
  'callerPermissions': Permissions_for_TurnstilePermission
911
978
  'createdAt': Date
912
- 'deletedAt'?: Date
979
+ 'deletedAt'?: Date | null
913
980
  'endpoint': string
914
981
  'id': TypedUuidForOperationId
915
982
  'state': OperationState
@@ -921,7 +988,7 @@ export type TransitionApplicationToDeclinedBatchEndpoint = string
921
988
  export type Operation_for_TurnstilePermission_and_TransitionApplicationToDeclinedBatchEndpoint = {
922
989
  'callerPermissions': Permissions_for_TurnstilePermission
923
990
  'createdAt': Date
924
- 'deletedAt'?: Date
991
+ 'deletedAt'?: Date | null
925
992
  'endpoint': TransitionApplicationToDeclinedBatchEndpoint
926
993
  'id': TypedUuidForOperationId
927
994
  'state': OperationState
@@ -933,23 +1000,26 @@ export type TransitionApplicationToDeferredBatchEndpoint = string
933
1000
  export type Operation_for_TurnstilePermission_and_TransitionApplicationToDeferredBatchEndpoint = {
934
1001
  'callerPermissions': Permissions_for_TurnstilePermission
935
1002
  'createdAt': Date
936
- 'deletedAt'?: Date
1003
+ 'deletedAt'?: Date | null
937
1004
  'endpoint': TransitionApplicationToDeferredBatchEndpoint
938
1005
  'id': TypedUuidForOperationId
939
1006
  'state': OperationState
940
1007
  'updatedAt': Date
941
1008
  }
942
1009
 
943
- export type OptionalTransitionBody = { 'message'?: EmailConfig }
1010
+ export type OptionalTransitionBody = {
1011
+ /** An optional message to send to the applicant */
1012
+ 'message'?: EmailConfig | null
1013
+ }
944
1014
 
945
1015
  export type Pool = {
946
1016
  'createdAt': Date
947
- 'deletedAt'?: Date
948
- 'description'?: string
1017
+ 'deletedAt'?: Date | null
1018
+ 'description'?: string | null
949
1019
  'id': TypedUuidForPoolId
950
- 'listings': ListingPool[]
1020
+ 'listings': (ListingPool)[]
951
1021
  'name': string
952
- 'reviewers': TypedUuidForReviewerId[]
1022
+ 'reviewers': (TypedUuidForReviewerId)[]
953
1023
  'updatedAt': Date
954
1024
  }
955
1025
 
@@ -959,31 +1029,31 @@ export type Review = {
959
1029
  'applicationId': TypedUuidForApplicationId
960
1030
  'content': string
961
1031
  'createdAt': Date
962
- 'deletedAt'?: Date
1032
+ 'deletedAt'?: Date | null
963
1033
  'id': TypedUuidForReviewId
964
1034
  'reviewerId': TypedUuidForReviewerId
965
1035
  'score': ReviewScore
966
1036
  'updatedAt': Date
967
1037
  'valueReflected': string
968
1038
  'valueViolated': string
969
- 'valuesInTension': string[]
1039
+ 'valuesInTension': (string)[]
970
1040
  }
971
1041
 
972
1042
  export type Reviewer = {
973
1043
  'apiUserId': TypedUuidForUserId
974
1044
  'createdAt': Date
975
- 'deletedAt'?: Date
1045
+ 'deletedAt'?: Date | null
976
1046
  'id': TypedUuidForReviewerId
977
1047
  'updatedAt': Date
978
1048
  }
979
1049
 
980
- export type ReviewerInfo = { 'reviewer': Reviewer; 'user'?: ApiUserInfo_for_TurnstilePermission }
1050
+ export type ReviewerInfo = { 'reviewer': Reviewer; 'user'?: ApiUserInfo_for_TurnstilePermission | null }
981
1051
 
982
- export type ReviewInfo = { 'review': Review; 'reviewer'?: ReviewerInfo }
1052
+ export type ReviewInfo = { 'review': Review; 'reviewer'?: ReviewerInfo | null }
983
1053
 
984
1054
  export type Role = {
985
1055
  'createdAt': Date
986
- 'deletedAt'?: Date
1056
+ 'deletedAt'?: Date | null
987
1057
  'departmentId': TypedUuidForDepartmentId
988
1058
  'id': TypedUuidForRoleId
989
1059
  'name': string
@@ -1002,9 +1072,14 @@ export type TransitionApplicationToDeferredBatch = {
1002
1072
 
1003
1073
  export type UpdateApplicantContact = { 'value': string }
1004
1074
 
1005
- export type UpdateDocument = { 'kind': DocumentKind; 'mime'?: string; 'source': DocumentSource; 'status'?: string }
1075
+ export type UpdateDocument = {
1076
+ 'kind': DocumentKind
1077
+ 'mime'?: string | null
1078
+ 'source': DocumentSource
1079
+ 'status'?: string | null
1080
+ }
1006
1081
 
1007
- export type UpdateDocumentStatus = { 'status'?: string }
1082
+ export type UpdateDocumentStatus = { 'status'?: string | null }
1008
1083
 
1009
1084
  export type UpdateListing = { 'name': string; 'status': RoleListingStatus }
1010
1085
 
@@ -1013,7 +1088,7 @@ export type UpdateReview = {
1013
1088
  'score': ReviewScore
1014
1089
  'valueReflected': string
1015
1090
  'valueViolated': string
1016
- 'valuesInTension': string[]
1091
+ 'valuesInTension': (string)[]
1017
1092
  }
1018
1093
 
1019
1094
  export type ScalarApplicationState =
@@ -1124,6 +1199,10 @@ export interface GetApplicationInterviewCodePathParams {
1124
1199
  application: TypedUuidForApplicationId
1125
1200
  }
1126
1201
 
1202
+ export interface NotifyApplicationReviewAssignmentsPathParams {
1203
+ application: TypedUuidForApplicationId
1204
+ }
1205
+
1127
1206
  export interface SimulateReviewActionPathParams {
1128
1207
  application: TypedUuidForApplicationId
1129
1208
  }
@@ -1254,7 +1333,7 @@ export interface AuthzCodeRedirectQueryParams {
1254
1333
  clientId: TypedUuidForOAuthClientId
1255
1334
  redirectUri: string
1256
1335
  responseType: string
1257
- scope?: string
1336
+ scope?: string | null
1258
1337
  state: string
1259
1338
  }
1260
1339
 
@@ -1263,9 +1342,9 @@ export interface AuthzCodeCallbackPathParams {
1263
1342
  }
1264
1343
 
1265
1344
  export interface AuthzCodeCallbackQueryParams {
1266
- code?: string
1267
- error?: string
1268
- state?: string
1345
+ code?: string | null
1346
+ error?: string | null
1347
+ state?: string | null
1269
1348
  }
1270
1349
 
1271
1350
  export interface AuthzCodeExchangePathParams {
@@ -1303,7 +1382,7 @@ export interface DeleteMagicLinkSecretPathParams {
1303
1382
  }
1304
1383
 
1305
1384
  export interface GetMappersQueryParams {
1306
- includeDepleted?: boolean
1385
+ includeDepleted?: boolean | null
1307
1386
  }
1308
1387
 
1309
1388
  export interface DeleteMapperPathParams {
@@ -1400,6 +1479,16 @@ export class Api extends HttpClient {
1400
1479
  ...params,
1401
1480
  })
1402
1481
  },
1482
+ /**
1483
+ * List details for users
1484
+ */
1485
+ listApiUsers: (_: EmptyObj, params: FetchParams = {}) => {
1486
+ return this.request<GetUserResponse_for_TurnstilePermission[]>({
1487
+ path: `/api-user`,
1488
+ method: 'GET',
1489
+ ...params,
1490
+ })
1491
+ },
1403
1492
  /**
1404
1493
  * Create a new user
1405
1494
  */
@@ -1603,6 +1692,9 @@ export class Api extends HttpClient {
1603
1692
  ...params,
1604
1693
  })
1605
1694
  },
1695
+ /**
1696
+ * View all applications
1697
+ */
1606
1698
  listApplications: (_: EmptyObj, params: FetchParams = {}) => {
1607
1699
  return this.request<Application[]>({
1608
1700
  path: `/application`,
@@ -1610,6 +1702,9 @@ export class Api extends HttpClient {
1610
1702
  ...params,
1611
1703
  })
1612
1704
  },
1705
+ /**
1706
+ * Create a new application
1707
+ */
1613
1708
  createApplication: ({
1614
1709
  body,
1615
1710
  }: { body: CreateApplication }, params: FetchParams = {}) => {
@@ -1620,6 +1715,9 @@ export class Api extends HttpClient {
1620
1715
  ...params,
1621
1716
  })
1622
1717
  },
1718
+ /**
1719
+ * View an application
1720
+ */
1623
1721
  viewApplication: ({
1624
1722
  path,
1625
1723
  }: { path: ViewApplicationPathParams }, params: FetchParams = {}) => {
@@ -1679,6 +1777,9 @@ export class Api extends HttpClient {
1679
1777
  ...params,
1680
1778
  })
1681
1779
  },
1780
+ /**
1781
+ * Attach an uploaded document to an application
1782
+ */
1682
1783
  attachDocument: ({
1683
1784
  path,
1684
1785
  body,
@@ -1690,6 +1791,9 @@ export class Api extends HttpClient {
1690
1791
  ...params,
1691
1792
  })
1692
1793
  },
1794
+ /**
1795
+ * Generate a pre-signed upload url for uploading a document to an application
1796
+ */
1693
1797
  createDocumentUploadUrl: ({
1694
1798
  path,
1695
1799
  }: { path: CreateDocumentUploadUrlPathParams }, params: FetchParams = {}) => {
@@ -1699,6 +1803,9 @@ export class Api extends HttpClient {
1699
1803
  ...params,
1700
1804
  })
1701
1805
  },
1806
+ /**
1807
+ * Retrieve the interview code associated with an application
1808
+ */
1702
1809
  getApplicationInterviewCode: ({
1703
1810
  path,
1704
1811
  }: { path: GetApplicationInterviewCodePathParams }, params: FetchParams = {}) => {
@@ -1708,6 +1815,18 @@ export class Api extends HttpClient {
1708
1815
  ...params,
1709
1816
  })
1710
1817
  },
1818
+ /**
1819
+ * Send a notification to all pending reviewers
1820
+ */
1821
+ notifyApplicationReviewAssignments: ({
1822
+ path,
1823
+ }: { path: NotifyApplicationReviewAssignmentsPathParams }, params: FetchParams = {}) => {
1824
+ return this.request<ReviewAssignment[]>({
1825
+ path: `/application/${path.application}/notify-assignment`,
1826
+ method: 'POST',
1827
+ ...params,
1828
+ })
1829
+ },
1711
1830
  /**
1712
1831
  * Simulate the selection of the next review action without performing any changes
1713
1832
  */
@@ -1720,6 +1839,9 @@ export class Api extends HttpClient {
1720
1839
  ...params,
1721
1840
  })
1722
1841
  },
1842
+ /**
1843
+ * Submit an application that has all required documents attached
1844
+ */
1723
1845
  submitApplication: ({
1724
1846
  path,
1725
1847
  }: { path: SubmitApplicationPathParams }, params: FetchParams = {}) => {
@@ -1729,6 +1851,9 @@ export class Api extends HttpClient {
1729
1851
  ...params,
1730
1852
  })
1731
1853
  },
1854
+ /**
1855
+ * Move an application to the Declined stage
1856
+ */
1732
1857
  transitionApplicationToDeclined: ({
1733
1858
  path,
1734
1859
  body,
@@ -1740,6 +1865,9 @@ export class Api extends HttpClient {
1740
1865
  ...params,
1741
1866
  })
1742
1867
  },
1868
+ /**
1869
+ * Move an application to the Deferred stage
1870
+ */
1743
1871
  transitionApplicationToDeferred: ({
1744
1872
  path,
1745
1873
  body,
@@ -1751,6 +1879,9 @@ export class Api extends HttpClient {
1751
1879
  ...params,
1752
1880
  })
1753
1881
  },
1882
+ /**
1883
+ * Move an application to the Interviewing stage
1884
+ */
1754
1885
  transitionApplicationToInterviewing: (
1755
1886
  {
1756
1887
  path,
@@ -1765,6 +1896,9 @@ export class Api extends HttpClient {
1765
1896
  ...params,
1766
1897
  })
1767
1898
  },
1899
+ /**
1900
+ * Move an application to the Next Steps stage
1901
+ */
1768
1902
  transitionApplicationToNextSteps: (
1769
1903
  {
1770
1904
  path,
@@ -1779,13 +1913,13 @@ export class Api extends HttpClient {
1779
1913
  ...params,
1780
1914
  })
1781
1915
  },
1782
- transitionApplicationToOffer: (
1783
- {
1784
- path,
1785
- body,
1786
- }: { path: TransitionApplicationToOfferPathParams; body: OptionalTransitionBody },
1787
- params: FetchParams = {},
1788
- ) => {
1916
+ /**
1917
+ * Move an application to the Offer stage
1918
+ */
1919
+ transitionApplicationToOffer: ({
1920
+ path,
1921
+ body,
1922
+ }: { path: TransitionApplicationToOfferPathParams; body: OfferTransitionBody }, params: FetchParams = {}) => {
1789
1923
  return this.request<ApplicationStateRecord>({
1790
1924
  path: `/application/${path.application}/transition/offer`,
1791
1925
  method: 'POST',
@@ -1793,6 +1927,9 @@ export class Api extends HttpClient {
1793
1927
  ...params,
1794
1928
  })
1795
1929
  },
1930
+ /**
1931
+ * Move an application to the Withdrawn stage
1932
+ */
1796
1933
  transitionApplicationToWithdrawn: (
1797
1934
  {
1798
1935
  path,
@@ -1807,6 +1944,9 @@ export class Api extends HttpClient {
1807
1944
  ...params,
1808
1945
  })
1809
1946
  },
1947
+ /**
1948
+ * List all application summaries
1949
+ */
1810
1950
  listApplicationSummaries: ({
1811
1951
  query = {},
1812
1952
  }: { query?: ListApplicationSummariesQueryParams }, params: FetchParams = {}) => {
@@ -1817,6 +1957,9 @@ export class Api extends HttpClient {
1817
1957
  ...params,
1818
1958
  })
1819
1959
  },
1960
+ /**
1961
+ * View a summary that includes an application and the related evaluations
1962
+ */
1820
1963
  viewApplicationSummary: ({
1821
1964
  path,
1822
1965
  }: { path: ViewApplicationSummaryPathParams }, params: FetchParams = {}) => {
@@ -1985,6 +2128,19 @@ export class Api extends HttpClient {
1985
2128
  ...params,
1986
2129
  })
1987
2130
  },
2131
+ /**
2132
+ * Hire a new employee
2133
+ */
2134
+ newHire: ({
2135
+ body,
2136
+ }: { body: NewHireBody }, params: FetchParams = {}) => {
2137
+ return this.request<Employee>({
2138
+ path: `/employee/new-hire`,
2139
+ method: 'POST',
2140
+ body,
2141
+ ...params,
2142
+ })
2143
+ },
1988
2144
  /**
1989
2145
  * List all groups
1990
2146
  */
@@ -2431,6 +2587,9 @@ export class Api extends HttpClient {
2431
2587
  ...params,
2432
2588
  })
2433
2589
  },
2590
+ /**
2591
+ * List reviewer pools and their associations
2592
+ */
2434
2593
  listPools: (_: EmptyObj, params: FetchParams = {}) => {
2435
2594
  return this.request<Pool[]>({
2436
2595
  path: `/pool`,
@@ -2438,6 +2597,9 @@ export class Api extends HttpClient {
2438
2597
  ...params,
2439
2598
  })
2440
2599
  },
2600
+ /**
2601
+ * Create a new pool
2602
+ */
2441
2603
  createPool: ({
2442
2604
  body,
2443
2605
  }: { body: CreatePool }, params: FetchParams = {}) => {
@@ -2448,6 +2610,9 @@ export class Api extends HttpClient {
2448
2610
  ...params,
2449
2611
  })
2450
2612
  },
2613
+ /**
2614
+ * View a pool and its associations
2615
+ */
2451
2616
  viewPool: ({
2452
2617
  path,
2453
2618
  }: { path: ViewPoolPathParams }, params: FetchParams = {}) => {
@@ -2457,6 +2622,9 @@ export class Api extends HttpClient {
2457
2622
  ...params,
2458
2623
  })
2459
2624
  },
2625
+ /**
2626
+ * Update a pool
2627
+ */
2460
2628
  updatePool: ({
2461
2629
  path,
2462
2630
  body,
@@ -2468,17 +2636,23 @@ export class Api extends HttpClient {
2468
2636
  ...params,
2469
2637
  })
2470
2638
  },
2639
+ /**
2640
+ * Assign a pool to a listing
2641
+ */
2471
2642
  assignPool: ({
2472
2643
  path,
2473
2644
  body,
2474
2645
  }: { path: AssignPoolPathParams; body: AssignPool }, params: FetchParams = {}) => {
2475
- return this.request<Pool>({
2646
+ return this.request<ListingPool>({
2476
2647
  path: `/pool/${path.pool}/assignment`,
2477
2648
  method: 'POST',
2478
2649
  body,
2479
2650
  ...params,
2480
2651
  })
2481
2652
  },
2653
+ /**
2654
+ * Unassign a pool from a listing
2655
+ */
2482
2656
  unassignPool: ({
2483
2657
  path,
2484
2658
  }: { path: UnassignPoolPathParams }, params: FetchParams = {}) => {