@seamapi/types 1.879.0 → 1.880.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.
@@ -0,0 +1,547 @@
1
+ import { z } from 'zod';
2
+ export declare const assign_credential_action_attempt: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
3
+ action_attempt_id: z.ZodString;
4
+ } & {
5
+ status: z.ZodLiteral<"pending">;
6
+ result: z.ZodNull;
7
+ error: z.ZodNull;
8
+ } & {
9
+ action_type: z.ZodLiteral<"ASSIGN_CREDENTIAL">;
10
+ }, "strip", z.ZodTypeAny, {
11
+ status: "pending";
12
+ action_attempt_id: string;
13
+ error: null;
14
+ result: null;
15
+ action_type: "ASSIGN_CREDENTIAL";
16
+ }, {
17
+ status: "pending";
18
+ action_attempt_id: string;
19
+ error: null;
20
+ result: null;
21
+ action_type: "ASSIGN_CREDENTIAL";
22
+ }>, z.ZodObject<{
23
+ action_attempt_id: z.ZodString;
24
+ } & {
25
+ status: z.ZodLiteral<"success">;
26
+ error: z.ZodNull;
27
+ } & {
28
+ action_type: z.ZodLiteral<"ASSIGN_CREDENTIAL">;
29
+ result: z.ZodObject<{
30
+ workspace_id: z.ZodString;
31
+ access_method_id: z.ZodString;
32
+ display_name: z.ZodString;
33
+ mode: z.ZodEnum<["code", "card", "mobile_key", "cloud_key"]>;
34
+ created_at: z.ZodString;
35
+ issued_at: z.ZodNullable<z.ZodString>;
36
+ is_issued: z.ZodBoolean;
37
+ instant_key_url: z.ZodOptional<z.ZodString>;
38
+ client_session_token: z.ZodOptional<z.ZodString>;
39
+ is_encoding_required: z.ZodOptional<z.ZodBoolean>;
40
+ is_ready_for_encoding: z.ZodOptional<z.ZodBoolean>;
41
+ is_assignment_required: z.ZodOptional<z.ZodBoolean>;
42
+ is_ready_for_assignment: z.ZodOptional<z.ZodBoolean>;
43
+ code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ warnings: z.ZodArray<z.ZodDiscriminatedUnion<"warning_code", [z.ZodObject<{
45
+ created_at: z.ZodString;
46
+ message: z.ZodString;
47
+ } & {
48
+ warning_code: z.ZodLiteral<"being_deleted">;
49
+ }, "strip", z.ZodTypeAny, {
50
+ message: string;
51
+ created_at: string;
52
+ warning_code: "being_deleted";
53
+ }, {
54
+ message: string;
55
+ created_at: string;
56
+ warning_code: "being_deleted";
57
+ }>, z.ZodObject<{
58
+ created_at: z.ZodString;
59
+ message: z.ZodString;
60
+ } & {
61
+ warning_code: z.ZodLiteral<"updating_access_times">;
62
+ }, "strip", z.ZodTypeAny, {
63
+ message: string;
64
+ created_at: string;
65
+ warning_code: "updating_access_times";
66
+ }, {
67
+ message: string;
68
+ created_at: string;
69
+ warning_code: "updating_access_times";
70
+ }>, z.ZodObject<{
71
+ created_at: z.ZodString;
72
+ message: z.ZodString;
73
+ } & {
74
+ warning_code: z.ZodLiteral<"pulled_backup_access_code">;
75
+ original_access_method_id: z.ZodOptional<z.ZodString>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ message: string;
78
+ created_at: string;
79
+ warning_code: "pulled_backup_access_code";
80
+ original_access_method_id?: string | undefined;
81
+ }, {
82
+ message: string;
83
+ created_at: string;
84
+ warning_code: "pulled_backup_access_code";
85
+ original_access_method_id?: string | undefined;
86
+ }>]>, "many">;
87
+ pending_mutations: z.ZodArray<z.ZodDiscriminatedUnion<"mutation_code", [z.ZodObject<{
88
+ created_at: z.ZodString;
89
+ message: z.ZodString;
90
+ } & {
91
+ mutation_code: z.ZodLiteral<"provisioning_access">;
92
+ from: z.ZodObject<{
93
+ device_ids: z.ZodArray<z.ZodString, "many">;
94
+ }, "strip", z.ZodTypeAny, {
95
+ device_ids: string[];
96
+ }, {
97
+ device_ids: string[];
98
+ }>;
99
+ to: z.ZodObject<{
100
+ device_ids: z.ZodArray<z.ZodString, "many">;
101
+ }, "strip", z.ZodTypeAny, {
102
+ device_ids: string[];
103
+ }, {
104
+ device_ids: string[];
105
+ }>;
106
+ }, "strip", z.ZodTypeAny, {
107
+ message: string;
108
+ created_at: string;
109
+ mutation_code: "provisioning_access";
110
+ from: {
111
+ device_ids: string[];
112
+ };
113
+ to: {
114
+ device_ids: string[];
115
+ };
116
+ }, {
117
+ message: string;
118
+ created_at: string;
119
+ mutation_code: "provisioning_access";
120
+ from: {
121
+ device_ids: string[];
122
+ };
123
+ to: {
124
+ device_ids: string[];
125
+ };
126
+ }>, z.ZodObject<{
127
+ created_at: z.ZodString;
128
+ message: z.ZodString;
129
+ } & {
130
+ mutation_code: z.ZodLiteral<"revoking_access">;
131
+ from: z.ZodObject<{
132
+ device_ids: z.ZodArray<z.ZodString, "many">;
133
+ }, "strip", z.ZodTypeAny, {
134
+ device_ids: string[];
135
+ }, {
136
+ device_ids: string[];
137
+ }>;
138
+ to: z.ZodObject<{
139
+ device_ids: z.ZodArray<z.ZodString, "many">;
140
+ }, "strip", z.ZodTypeAny, {
141
+ device_ids: string[];
142
+ }, {
143
+ device_ids: string[];
144
+ }>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ message: string;
147
+ created_at: string;
148
+ mutation_code: "revoking_access";
149
+ from: {
150
+ device_ids: string[];
151
+ };
152
+ to: {
153
+ device_ids: string[];
154
+ };
155
+ }, {
156
+ message: string;
157
+ created_at: string;
158
+ mutation_code: "revoking_access";
159
+ from: {
160
+ device_ids: string[];
161
+ };
162
+ to: {
163
+ device_ids: string[];
164
+ };
165
+ }>, z.ZodObject<{
166
+ created_at: z.ZodString;
167
+ message: z.ZodString;
168
+ } & {
169
+ mutation_code: z.ZodLiteral<"updating_access_times">;
170
+ from: z.ZodObject<{
171
+ starts_at: z.ZodNullable<z.ZodString>;
172
+ ends_at: z.ZodNullable<z.ZodString>;
173
+ }, "strip", z.ZodTypeAny, {
174
+ starts_at: string | null;
175
+ ends_at: string | null;
176
+ }, {
177
+ starts_at: string | null;
178
+ ends_at: string | null;
179
+ }>;
180
+ to: z.ZodObject<{
181
+ starts_at: z.ZodNullable<z.ZodString>;
182
+ ends_at: z.ZodNullable<z.ZodString>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ starts_at: string | null;
185
+ ends_at: string | null;
186
+ }, {
187
+ starts_at: string | null;
188
+ ends_at: string | null;
189
+ }>;
190
+ }, "strip", z.ZodTypeAny, {
191
+ message: string;
192
+ created_at: string;
193
+ mutation_code: "updating_access_times";
194
+ from: {
195
+ starts_at: string | null;
196
+ ends_at: string | null;
197
+ };
198
+ to: {
199
+ starts_at: string | null;
200
+ ends_at: string | null;
201
+ };
202
+ }, {
203
+ message: string;
204
+ created_at: string;
205
+ mutation_code: "updating_access_times";
206
+ from: {
207
+ starts_at: string | null;
208
+ ends_at: string | null;
209
+ };
210
+ to: {
211
+ starts_at: string | null;
212
+ ends_at: string | null;
213
+ };
214
+ }>]>, "many">;
215
+ customization_profile_id: z.ZodOptional<z.ZodString>;
216
+ }, "strip", z.ZodTypeAny, {
217
+ display_name: string;
218
+ workspace_id: string;
219
+ created_at: string;
220
+ warnings: ({
221
+ message: string;
222
+ created_at: string;
223
+ warning_code: "being_deleted";
224
+ } | {
225
+ message: string;
226
+ created_at: string;
227
+ warning_code: "updating_access_times";
228
+ } | {
229
+ message: string;
230
+ created_at: string;
231
+ warning_code: "pulled_backup_access_code";
232
+ original_access_method_id?: string | undefined;
233
+ })[];
234
+ pending_mutations: ({
235
+ message: string;
236
+ created_at: string;
237
+ mutation_code: "provisioning_access";
238
+ from: {
239
+ device_ids: string[];
240
+ };
241
+ to: {
242
+ device_ids: string[];
243
+ };
244
+ } | {
245
+ message: string;
246
+ created_at: string;
247
+ mutation_code: "revoking_access";
248
+ from: {
249
+ device_ids: string[];
250
+ };
251
+ to: {
252
+ device_ids: string[];
253
+ };
254
+ } | {
255
+ message: string;
256
+ created_at: string;
257
+ mutation_code: "updating_access_times";
258
+ from: {
259
+ starts_at: string | null;
260
+ ends_at: string | null;
261
+ };
262
+ to: {
263
+ starts_at: string | null;
264
+ ends_at: string | null;
265
+ };
266
+ })[];
267
+ mode: "code" | "card" | "mobile_key" | "cloud_key";
268
+ access_method_id: string;
269
+ issued_at: string | null;
270
+ is_issued: boolean;
271
+ code?: string | null | undefined;
272
+ client_session_token?: string | undefined;
273
+ instant_key_url?: string | undefined;
274
+ customization_profile_id?: string | undefined;
275
+ is_encoding_required?: boolean | undefined;
276
+ is_ready_for_encoding?: boolean | undefined;
277
+ is_assignment_required?: boolean | undefined;
278
+ is_ready_for_assignment?: boolean | undefined;
279
+ }, {
280
+ display_name: string;
281
+ workspace_id: string;
282
+ created_at: string;
283
+ warnings: ({
284
+ message: string;
285
+ created_at: string;
286
+ warning_code: "being_deleted";
287
+ } | {
288
+ message: string;
289
+ created_at: string;
290
+ warning_code: "updating_access_times";
291
+ } | {
292
+ message: string;
293
+ created_at: string;
294
+ warning_code: "pulled_backup_access_code";
295
+ original_access_method_id?: string | undefined;
296
+ })[];
297
+ pending_mutations: ({
298
+ message: string;
299
+ created_at: string;
300
+ mutation_code: "provisioning_access";
301
+ from: {
302
+ device_ids: string[];
303
+ };
304
+ to: {
305
+ device_ids: string[];
306
+ };
307
+ } | {
308
+ message: string;
309
+ created_at: string;
310
+ mutation_code: "revoking_access";
311
+ from: {
312
+ device_ids: string[];
313
+ };
314
+ to: {
315
+ device_ids: string[];
316
+ };
317
+ } | {
318
+ message: string;
319
+ created_at: string;
320
+ mutation_code: "updating_access_times";
321
+ from: {
322
+ starts_at: string | null;
323
+ ends_at: string | null;
324
+ };
325
+ to: {
326
+ starts_at: string | null;
327
+ ends_at: string | null;
328
+ };
329
+ })[];
330
+ mode: "code" | "card" | "mobile_key" | "cloud_key";
331
+ access_method_id: string;
332
+ issued_at: string | null;
333
+ is_issued: boolean;
334
+ code?: string | null | undefined;
335
+ client_session_token?: string | undefined;
336
+ instant_key_url?: string | undefined;
337
+ customization_profile_id?: string | undefined;
338
+ is_encoding_required?: boolean | undefined;
339
+ is_ready_for_encoding?: boolean | undefined;
340
+ is_assignment_required?: boolean | undefined;
341
+ is_ready_for_assignment?: boolean | undefined;
342
+ }>;
343
+ }, "strip", z.ZodTypeAny, {
344
+ status: "success";
345
+ action_attempt_id: string;
346
+ error: null;
347
+ result: {
348
+ display_name: string;
349
+ workspace_id: string;
350
+ created_at: string;
351
+ warnings: ({
352
+ message: string;
353
+ created_at: string;
354
+ warning_code: "being_deleted";
355
+ } | {
356
+ message: string;
357
+ created_at: string;
358
+ warning_code: "updating_access_times";
359
+ } | {
360
+ message: string;
361
+ created_at: string;
362
+ warning_code: "pulled_backup_access_code";
363
+ original_access_method_id?: string | undefined;
364
+ })[];
365
+ pending_mutations: ({
366
+ message: string;
367
+ created_at: string;
368
+ mutation_code: "provisioning_access";
369
+ from: {
370
+ device_ids: string[];
371
+ };
372
+ to: {
373
+ device_ids: string[];
374
+ };
375
+ } | {
376
+ message: string;
377
+ created_at: string;
378
+ mutation_code: "revoking_access";
379
+ from: {
380
+ device_ids: string[];
381
+ };
382
+ to: {
383
+ device_ids: string[];
384
+ };
385
+ } | {
386
+ message: string;
387
+ created_at: string;
388
+ mutation_code: "updating_access_times";
389
+ from: {
390
+ starts_at: string | null;
391
+ ends_at: string | null;
392
+ };
393
+ to: {
394
+ starts_at: string | null;
395
+ ends_at: string | null;
396
+ };
397
+ })[];
398
+ mode: "code" | "card" | "mobile_key" | "cloud_key";
399
+ access_method_id: string;
400
+ issued_at: string | null;
401
+ is_issued: boolean;
402
+ code?: string | null | undefined;
403
+ client_session_token?: string | undefined;
404
+ instant_key_url?: string | undefined;
405
+ customization_profile_id?: string | undefined;
406
+ is_encoding_required?: boolean | undefined;
407
+ is_ready_for_encoding?: boolean | undefined;
408
+ is_assignment_required?: boolean | undefined;
409
+ is_ready_for_assignment?: boolean | undefined;
410
+ };
411
+ action_type: "ASSIGN_CREDENTIAL";
412
+ }, {
413
+ status: "success";
414
+ action_attempt_id: string;
415
+ error: null;
416
+ result: {
417
+ display_name: string;
418
+ workspace_id: string;
419
+ created_at: string;
420
+ warnings: ({
421
+ message: string;
422
+ created_at: string;
423
+ warning_code: "being_deleted";
424
+ } | {
425
+ message: string;
426
+ created_at: string;
427
+ warning_code: "updating_access_times";
428
+ } | {
429
+ message: string;
430
+ created_at: string;
431
+ warning_code: "pulled_backup_access_code";
432
+ original_access_method_id?: string | undefined;
433
+ })[];
434
+ pending_mutations: ({
435
+ message: string;
436
+ created_at: string;
437
+ mutation_code: "provisioning_access";
438
+ from: {
439
+ device_ids: string[];
440
+ };
441
+ to: {
442
+ device_ids: string[];
443
+ };
444
+ } | {
445
+ message: string;
446
+ created_at: string;
447
+ mutation_code: "revoking_access";
448
+ from: {
449
+ device_ids: string[];
450
+ };
451
+ to: {
452
+ device_ids: string[];
453
+ };
454
+ } | {
455
+ message: string;
456
+ created_at: string;
457
+ mutation_code: "updating_access_times";
458
+ from: {
459
+ starts_at: string | null;
460
+ ends_at: string | null;
461
+ };
462
+ to: {
463
+ starts_at: string | null;
464
+ ends_at: string | null;
465
+ };
466
+ })[];
467
+ mode: "code" | "card" | "mobile_key" | "cloud_key";
468
+ access_method_id: string;
469
+ issued_at: string | null;
470
+ is_issued: boolean;
471
+ code?: string | null | undefined;
472
+ client_session_token?: string | undefined;
473
+ instant_key_url?: string | undefined;
474
+ customization_profile_id?: string | undefined;
475
+ is_encoding_required?: boolean | undefined;
476
+ is_ready_for_encoding?: boolean | undefined;
477
+ is_assignment_required?: boolean | undefined;
478
+ is_ready_for_assignment?: boolean | undefined;
479
+ };
480
+ action_type: "ASSIGN_CREDENTIAL";
481
+ }>, z.ZodObject<{
482
+ action_attempt_id: z.ZodString;
483
+ } & {
484
+ status: z.ZodLiteral<"error">;
485
+ result: z.ZodNull;
486
+ } & {
487
+ action_type: z.ZodLiteral<"ASSIGN_CREDENTIAL">;
488
+ error: z.ZodUnion<[z.ZodObject<{
489
+ type: z.ZodLiteral<"uncategorized_error">;
490
+ message: z.ZodString;
491
+ }, "strip", z.ZodTypeAny, {
492
+ message: string;
493
+ type: "uncategorized_error";
494
+ }, {
495
+ message: string;
496
+ type: "uncategorized_error";
497
+ }>, z.ZodObject<{
498
+ type: z.ZodLiteral<"action_attempt_expired">;
499
+ message: z.ZodString;
500
+ }, "strip", z.ZodTypeAny, {
501
+ message: string;
502
+ type: "action_attempt_expired";
503
+ }, {
504
+ message: string;
505
+ type: "action_attempt_expired";
506
+ }>, z.ZodObject<{
507
+ type: z.ZodLiteral<"credential_not_found">;
508
+ message: z.ZodString;
509
+ }, "strip", z.ZodTypeAny, {
510
+ message: string;
511
+ type: "credential_not_found";
512
+ }, {
513
+ message: string;
514
+ type: "credential_not_found";
515
+ }>]>;
516
+ }, "strip", z.ZodTypeAny, {
517
+ status: "error";
518
+ action_attempt_id: string;
519
+ error: {
520
+ message: string;
521
+ type: "uncategorized_error";
522
+ } | {
523
+ message: string;
524
+ type: "action_attempt_expired";
525
+ } | {
526
+ message: string;
527
+ type: "credential_not_found";
528
+ };
529
+ result: null;
530
+ action_type: "ASSIGN_CREDENTIAL";
531
+ }, {
532
+ status: "error";
533
+ action_attempt_id: string;
534
+ error: {
535
+ message: string;
536
+ type: "uncategorized_error";
537
+ } | {
538
+ message: string;
539
+ type: "action_attempt_expired";
540
+ } | {
541
+ message: string;
542
+ type: "credential_not_found";
543
+ };
544
+ result: null;
545
+ action_type: "ASSIGN_CREDENTIAL";
546
+ }>]>;
547
+ export type AssignCredentialActionAttempt = z.infer<typeof assign_credential_action_attempt>;
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod';
2
+ import { access_method } from '../access-grants/access-method.js';
3
+ import { common_action_attempt_errors, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, } from './common.js';
4
+ const action_type = z
5
+ .literal('ASSIGN_CREDENTIAL')
6
+ .describe('Action attempt to track the status of assigning an existing credential to an access method.');
7
+ const credential_not_found_error = z
8
+ .object({
9
+ type: z
10
+ .literal('credential_not_found')
11
+ .describe('Error type to indicate that no matching credential was found.'),
12
+ message: z
13
+ .string()
14
+ .describe('Detailed description of the error. Provides insights into the issue and potentially how to rectify it.'),
15
+ })
16
+ .describe('Error to indicate that no matching credential was found.');
17
+ const error = z.union([
18
+ ...common_action_attempt_errors,
19
+ credential_not_found_error,
20
+ ]);
21
+ const result = access_method.describe('Result of an assignment attempt. If the attempt was successful, includes the updated access method with the assigned credential.');
22
+ export const assign_credential_action_attempt = z.discriminatedUnion('status', [
23
+ common_pending_action_attempt
24
+ .extend({
25
+ action_type,
26
+ })
27
+ .describe('Assigning a credential to an access method is pending.'),
28
+ common_succeeded_action_attempt
29
+ .extend({
30
+ action_type,
31
+ result,
32
+ })
33
+ .describe('Assigning a credential to an access method succeeded.'),
34
+ common_failed_action_attempt
35
+ .extend({ action_type, error })
36
+ .describe('Assigning a credential to an access method failed.'),
37
+ ]);
38
+ //# sourceMappingURL=assign-credential.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assign-credential.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/models/action-attempts/assign-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AACjE,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,GAAG,CAAC;KAClB,OAAO,CAAC,mBAAmB,CAAC;KAC5B,QAAQ,CACP,6FAA6F,CAC9F,CAAA;AAEH,MAAM,0BAA0B,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,IAAI,EAAE,CAAC;SACJ,OAAO,CAAC,sBAAsB,CAAC;SAC/B,QAAQ,CACP,+DAA+D,CAChE;IACH,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,CACP,wGAAwG,CACzG;CACJ,CAAC;KACD,QAAQ,CAAC,0DAA0D,CAAC,CAAA;AAEvE,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;IACpB,GAAG,4BAA4B;IAC/B,0BAA0B;CAC3B,CAAC,CAAA;AAEF,MAAM,MAAM,GAAG,aAAa,CAAC,QAAQ,CACnC,kIAAkI,CACnI,CAAA;AAED,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IAC7E,6BAA6B;SAC1B,MAAM,CAAC;QACN,WAAW;KACZ,CAAC;SACD,QAAQ,CAAC,wDAAwD,CAAC;IACrE,+BAA+B;SAC5B,MAAM,CAAC;QACN,WAAW;QACX,MAAM;KACP,CAAC;SACD,QAAQ,CAAC,uDAAuD,CAAC;IACpE,4BAA4B;SACzB,MAAM,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;SAC9B,QAAQ,CAAC,oDAAoD,CAAC;CAClE,CAAC,CAAA"}