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