@oxide/turnstile.ts 0.7.0-rc.0 → 0.7.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/retry.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiConfig, a as Api, F as FullParams, b as ApiResult } from './Api-Z7zZcVks.cjs';
1
+ import { A as ApiConfig, a as Api, F as FullParams, b as ApiResult } from './Api-Mqr0O9hE.cjs';
2
2
 
3
3
  type RetryHandler = (err: any) => boolean;
4
4
  type RetryHandlerFactory = (url: RequestInfo | URL, init: RequestInit) => RetryHandler;
package/dist/retry.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ApiConfig, a as Api, F as FullParams, b as ApiResult } from './Api-Z7zZcVks.js';
1
+ import { A as ApiConfig, a as Api, F as FullParams, b as ApiResult } from './Api-Mqr0O9hE.js';
2
2
 
3
3
  type RetryHandler = (err: any) => boolean;
4
4
  type RetryHandlerFactory = (url: RequestInfo | URL, init: RequestInit) => RetryHandler;
package/dist/retry.js CHANGED
@@ -325,6 +325,9 @@ var Api = class extends HttpClient {
325
325
  ...params
326
326
  });
327
327
  },
328
+ /**
329
+ * View all applications
330
+ */
328
331
  listApplications: (_, params = {}) => {
329
332
  return this.request({
330
333
  path: `/application`,
@@ -332,6 +335,9 @@ var Api = class extends HttpClient {
332
335
  ...params
333
336
  });
334
337
  },
338
+ /**
339
+ * Create a new application
340
+ */
335
341
  createApplication: ({
336
342
  body
337
343
  }, params = {}) => {
@@ -342,6 +348,9 @@ var Api = class extends HttpClient {
342
348
  ...params
343
349
  });
344
350
  },
351
+ /**
352
+ * View an application
353
+ */
345
354
  viewApplication: ({
346
355
  path
347
356
  }, params = {}) => {
@@ -398,6 +407,9 @@ var Api = class extends HttpClient {
398
407
  ...params
399
408
  });
400
409
  },
410
+ /**
411
+ * Attach an uploaded document to an application
412
+ */
401
413
  attachDocument: ({
402
414
  path,
403
415
  body
@@ -409,6 +421,9 @@ var Api = class extends HttpClient {
409
421
  ...params
410
422
  });
411
423
  },
424
+ /**
425
+ * Generate a pre-signed upload url for uploading a document to an application
426
+ */
412
427
  createDocumentUploadUrl: ({
413
428
  path
414
429
  }, params = {}) => {
@@ -418,6 +433,9 @@ var Api = class extends HttpClient {
418
433
  ...params
419
434
  });
420
435
  },
436
+ /**
437
+ * Retrieve the interview code associated with an application
438
+ */
421
439
  getApplicationInterviewCode: ({
422
440
  path
423
441
  }, params = {}) => {
@@ -439,6 +457,9 @@ var Api = class extends HttpClient {
439
457
  ...params
440
458
  });
441
459
  },
460
+ /**
461
+ * Submit an application that has all required documents attached
462
+ */
442
463
  submitApplication: ({
443
464
  path
444
465
  }, params = {}) => {
@@ -448,6 +469,9 @@ var Api = class extends HttpClient {
448
469
  ...params
449
470
  });
450
471
  },
472
+ /**
473
+ * Move an application to the Declined stage
474
+ */
451
475
  transitionApplicationToDeclined: ({
452
476
  path,
453
477
  body
@@ -459,6 +483,9 @@ var Api = class extends HttpClient {
459
483
  ...params
460
484
  });
461
485
  },
486
+ /**
487
+ * Move an application to the Deferred stage
488
+ */
462
489
  transitionApplicationToDeferred: ({
463
490
  path,
464
491
  body
@@ -470,6 +497,9 @@ var Api = class extends HttpClient {
470
497
  ...params
471
498
  });
472
499
  },
500
+ /**
501
+ * Move an application to the Interviewing stage
502
+ */
473
503
  transitionApplicationToInterviewing: ({
474
504
  path,
475
505
  body
@@ -481,6 +511,9 @@ var Api = class extends HttpClient {
481
511
  ...params
482
512
  });
483
513
  },
514
+ /**
515
+ * Move an application to the Next Steps stage
516
+ */
484
517
  transitionApplicationToNextSteps: ({
485
518
  path,
486
519
  body
@@ -492,6 +525,9 @@ var Api = class extends HttpClient {
492
525
  ...params
493
526
  });
494
527
  },
528
+ /**
529
+ * Move an application to the Offer stage
530
+ */
495
531
  transitionApplicationToOffer: ({
496
532
  path,
497
533
  body
@@ -503,6 +539,9 @@ var Api = class extends HttpClient {
503
539
  ...params
504
540
  });
505
541
  },
542
+ /**
543
+ * Move an application to the Withdrawn stage
544
+ */
506
545
  transitionApplicationToWithdrawn: ({
507
546
  path,
508
547
  body
@@ -514,6 +553,9 @@ var Api = class extends HttpClient {
514
553
  ...params
515
554
  });
516
555
  },
556
+ /**
557
+ * List all application summaries
558
+ */
517
559
  listApplicationSummaries: ({
518
560
  query = {}
519
561
  }, params = {}) => {
@@ -524,6 +566,9 @@ var Api = class extends HttpClient {
524
566
  ...params
525
567
  });
526
568
  },
569
+ /**
570
+ * View a summary that includes an application and the related evaluations
571
+ */
527
572
  viewApplicationSummary: ({
528
573
  path
529
574
  }, params = {}) => {
@@ -1129,6 +1174,9 @@ var Api = class extends HttpClient {
1129
1174
  ...params
1130
1175
  });
1131
1176
  },
1177
+ /**
1178
+ * List reviewer pools and their associations
1179
+ */
1132
1180
  listPools: (_, params = {}) => {
1133
1181
  return this.request({
1134
1182
  path: `/pool`,
@@ -1136,6 +1184,9 @@ var Api = class extends HttpClient {
1136
1184
  ...params
1137
1185
  });
1138
1186
  },
1187
+ /**
1188
+ * Create a new pool
1189
+ */
1139
1190
  createPool: ({
1140
1191
  body
1141
1192
  }, params = {}) => {
@@ -1146,6 +1197,9 @@ var Api = class extends HttpClient {
1146
1197
  ...params
1147
1198
  });
1148
1199
  },
1200
+ /**
1201
+ * View a pool and its associations
1202
+ */
1149
1203
  viewPool: ({
1150
1204
  path
1151
1205
  }, params = {}) => {
@@ -1155,6 +1209,9 @@ var Api = class extends HttpClient {
1155
1209
  ...params
1156
1210
  });
1157
1211
  },
1212
+ /**
1213
+ * Update a pool
1214
+ */
1158
1215
  updatePool: ({
1159
1216
  path,
1160
1217
  body
@@ -1166,6 +1223,9 @@ var Api = class extends HttpClient {
1166
1223
  ...params
1167
1224
  });
1168
1225
  },
1226
+ /**
1227
+ * Assign a pool to a listing
1228
+ */
1169
1229
  assignPool: ({
1170
1230
  path,
1171
1231
  body
@@ -1177,6 +1237,9 @@ var Api = class extends HttpClient {
1177
1237
  ...params
1178
1238
  });
1179
1239
  },
1240
+ /**
1241
+ * Unassign a pool from a listing
1242
+ */
1180
1243
  unassignPool: ({
1181
1244
  path
1182
1245
  }, params = {}) => {
package/dist/validate.cjs CHANGED
@@ -229,6 +229,7 @@ __export(validate_exports, {
229
229
  TransitionApplicationToWithdrawnParams: () => TransitionApplicationToWithdrawnParams,
230
230
  TransitionBody: () => TransitionBody,
231
231
  TransitionMessage: () => TransitionMessage,
232
+ TriageReason: () => TriageReason,
232
233
  TurnstilePermission: () => TurnstilePermission,
233
234
  TypedUuidForAccessGroupId: () => TypedUuidForAccessGroupId,
234
235
  TypedUuidForApiKeyId: () => TypedUuidForApiKeyId,
@@ -386,6 +387,7 @@ var TurnstilePermission = import_zod.z.preprocess(
386
387
  "WithdrawApplicationsAssigned",
387
388
  "ManageApplicationsAssigned",
388
389
  "ManageApplicationsAll",
390
+ "GetApplicationSummariesAll",
389
391
  "GetDocumentsAssigned",
390
392
  "GetDocumentsAll",
391
393
  "CreateDocument",
@@ -804,15 +806,26 @@ var ApplicationStateRecord = import_zod.z.preprocess(
804
806
  })
805
807
  );
806
808
  var ListingPoolAssociation = import_zod.z.preprocess(processResponseBody, import_zod.z.enum(["first", "early_positive", "positive"]));
809
+ var TriageReason = import_zod.z.preprocess(
810
+ processResponseBody,
811
+ import_zod.z.enum([
812
+ "has_no_ratings",
813
+ "likely_next_steps",
814
+ "likely_pass",
815
+ "possibly_next_steps",
816
+ "possibly_pass",
817
+ "very_likely_pass",
818
+ "unknown"
819
+ ])
820
+ );
807
821
  var PoolAction = import_zod.z.preprocess(
808
822
  processResponseBody,
809
823
  import_zod.z.union([
824
+ import_zod.z.enum(["drop", "wait"]),
810
825
  import_zod.z.object({
811
- "action": import_zod.z.enum(["add"]),
812
- "association": ListingPoolAssociation,
813
- "count": import_zod.z.number().min(0).max(4294967295)
826
+ "add": import_zod.z.object({ "association": ListingPoolAssociation, "count": import_zod.z.number().min(0).max(4294967295) })
814
827
  }),
815
- import_zod.z.object({ "action": import_zod.z.enum(["triage"]) })
828
+ import_zod.z.object({ "triage": import_zod.z.object({ "reason": TriageReason }) })
816
829
  ])
817
830
  );
818
831
  var ReviewScore = import_zod.z.preprocess(
@@ -932,7 +945,7 @@ var CreatePool = import_zod.z.preprocess(
932
945
  import_zod.z.object({
933
946
  "description": import_zod.z.string().optional(),
934
947
  "name": import_zod.z.string(),
935
- "reviwers": TypedUuidForReviewerId.array().optional()
948
+ "reviewers": TypedUuidForReviewerId.array().optional()
936
949
  })
937
950
  );
938
951
  var CreateReview = import_zod.z.preprocess(
@@ -953,7 +966,7 @@ var CreateReviewAssignments = import_zod.z.preprocess(
953
966
  );
954
967
  var ReviewAssignmentCreationError = import_zod.z.preprocess(
955
968
  processResponseBody,
956
- import_zod.z.enum(["DoesNotExist", "Forbidden", "Internal"])
969
+ import_zod.z.enum(["Conflict", "DoesNotExist", "Forbidden", "Internal"])
957
970
  );
958
971
  var TypedUuidForReviewAssignmentId = import_zod.z.preprocess(processResponseBody, import_zod.z.string().uuid());
959
972
  var ReviewAssignmentState = import_zod.z.preprocess(processResponseBody, import_zod.z.enum(["pending", "complete"]));
@@ -2590,6 +2603,7 @@ var GetSelfParams = import_zod.z.preprocess(
2590
2603
  TransitionApplicationToWithdrawnParams,
2591
2604
  TransitionBody,
2592
2605
  TransitionMessage,
2606
+ TriageReason,
2593
2607
  TurnstilePermission,
2594
2608
  TypedUuidForAccessGroupId,
2595
2609
  TypedUuidForApiKeyId,