@seamapi/types 1.1099.0 → 1.1101.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1099.0",
3
+ "version": "1.1101.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -260,12 +260,25 @@ const notifying_connector_mutation = common_pending_mutation
260
260
  "Seam is in the process of notifying the connector about this access method's issuance.",
261
261
  )
262
262
 
263
+ const waiting_for_access_on_acs_system_mutation = common_pending_mutation
264
+ .extend({
265
+ mutation_code: z
266
+ .literal('waiting_for_access_on_acs_system')
267
+ .describe(
268
+ 'Mutation code to indicate that the access system has not yet received all the access this card needs, so the card is not ready to be encoded.',
269
+ ),
270
+ })
271
+ .describe(
272
+ 'The access system has not yet received all the access this card needs. A card encoded now would carry only the access the system already has, so wait until this clears before encoding.',
273
+ )
274
+
263
275
  export const access_method_pending_mutations = z.discriminatedUnion(
264
276
  'mutation_code',
265
277
  [
266
278
  provisioning_access_mutation,
267
279
  revoking_access_mutation,
268
280
  updating_access_times_mutation,
281
+ waiting_for_access_on_acs_system_mutation,
269
282
  ],
270
283
  )
271
284
 
@@ -278,6 +291,9 @@ const _access_method_pending_mutations_map = z.object({
278
291
  revoking_access: revoking_access_mutation.optional().nullable(),
279
292
  updating_access_times: updating_access_times_mutation.optional().nullable(),
280
293
  notifying_connector: notifying_connector_mutation.optional().nullable(),
294
+ waiting_for_access_on_acs_system: waiting_for_access_on_acs_system_mutation
295
+ .optional()
296
+ .nullable(),
281
297
  })
282
298
 
283
299
  export type AccessMethodPendingMutationsMap = z.infer<
@@ -329,7 +345,7 @@ export const access_method = z.object({
329
345
  .boolean()
330
346
  .optional()
331
347
  .describe(
332
- 'Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued.',
348
+ 'Indicates whether the access method is ready to be encoded. This is true when the card has not yet been issued and the access system has received all the access the card needs. While it is false, `pending_mutations` contains `waiting_for_access_on_acs_system`.',
333
349
  ),
334
350
  is_assignment_required: z
335
351
  .boolean()
@@ -4,6 +4,7 @@ import { activate_climate_preset_action_attempt } from './activate-climate-prese
4
4
  import { activate_weekly_program_action_attempt } from './activate-weekly-program.js'
5
5
  import { assign_credential_action_attempt } from './assign-credential.js'
6
6
  import { configure_auto_lock_action_attempt } from './configure-auto-lock.js'
7
+ import { convert_access_code_to_managed_action_attempt } from './convert-access-code-to-managed.js'
7
8
  import { deprecated_action_attempts } from './deprecated.js'
8
9
  import { encode_credential_action_attempt } from './encode-credential.js'
9
10
  import { lock_door_action_attempt } from './lock-door.js'
@@ -33,6 +34,7 @@ export const action_attempt = z.union([
33
34
  ...simulate_manual_lock_via_keypad_action_attempt.options,
34
35
  ...push_thermostat_programs_action_attempt.options,
35
36
  ...configure_auto_lock_action_attempt.options,
37
+ ...convert_access_code_to_managed_action_attempt.options,
36
38
  ...deprecated_action_attempts,
37
39
  ]).describe(`
38
40
  ---
@@ -0,0 +1,44 @@
1
+ import * as z from 'zod/v3'
2
+
3
+ import {
4
+ common_failed_action_attempt,
5
+ common_pending_action_attempt,
6
+ common_succeeded_action_attempt,
7
+ } from './common.js'
8
+
9
+ const action_type = z
10
+ .literal('CONVERT_ACCESS_CODE_TO_MANAGED')
11
+ .describe(
12
+ 'Action attempt to track the status of converting an unmanaged access code to a managed access code.',
13
+ )
14
+
15
+ const error = z
16
+ .object({
17
+ type: z.string().describe('Type of the error.'),
18
+ message: z
19
+ .string()
20
+ .describe(
21
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
22
+ ),
23
+ })
24
+ .describe('Error associated with the action.')
25
+
26
+ const result = z.object({}).describe('Result of the action.')
27
+
28
+ export const convert_access_code_to_managed_action_attempt =
29
+ z.discriminatedUnion('status', [
30
+ common_pending_action_attempt
31
+ .extend({
32
+ action_type,
33
+ })
34
+ .describe('Converting an unmanaged access code to managed is pending.'),
35
+ common_succeeded_action_attempt
36
+ .extend({
37
+ action_type,
38
+ result,
39
+ })
40
+ .describe('Converting an unmanaged access code to managed succeeded.'),
41
+ common_failed_action_attempt
42
+ .extend({ action_type, error })
43
+ .describe('Converting an unmanaged access code to managed failed.'),
44
+ ])
@@ -2579,7 +2579,7 @@ const openapi: OpenAPISpec = {
2579
2579
  },
2580
2580
  is_ready_for_encoding: {
2581
2581
  description:
2582
- 'Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued.',
2582
+ 'Indicates whether the access method is ready to be encoded. This is true when the card has not yet been issued and the access system has received all the access the card needs. While it is false, `pending_mutations` contains `waiting_for_access_on_acs_system`.',
2583
2583
  type: 'boolean',
2584
2584
  },
2585
2585
  issued_at: {
@@ -2780,6 +2780,30 @@ const openapi: OpenAPISpec = {
2780
2780
  ],
2781
2781
  type: 'object',
2782
2782
  },
2783
+ {
2784
+ description:
2785
+ 'The access system has not yet received all the access this card needs. A card encoded now would carry only the access the system already has, so wait until this clears before encoding.',
2786
+ properties: {
2787
+ created_at: {
2788
+ description:
2789
+ 'Date and time at which the mutation was created.',
2790
+ format: 'date-time',
2791
+ type: 'string',
2792
+ },
2793
+ message: {
2794
+ description: 'Detailed description of the mutation.',
2795
+ type: 'string',
2796
+ },
2797
+ mutation_code: {
2798
+ description:
2799
+ 'Mutation code to indicate that the access system has not yet received all the access this card needs, so the card is not ready to be encoded.',
2800
+ enum: ['waiting_for_access_on_acs_system'],
2801
+ type: 'string',
2802
+ },
2803
+ },
2804
+ required: ['created_at', 'message', 'mutation_code'],
2805
+ type: 'object',
2806
+ },
2783
2807
  ],
2784
2808
  },
2785
2809
  type: 'array',
@@ -10044,7 +10068,7 @@ const openapi: OpenAPISpec = {
10044
10068
  },
10045
10069
  is_ready_for_encoding: {
10046
10070
  description:
10047
- 'Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued.',
10071
+ 'Indicates whether the access method is ready to be encoded. This is true when the card has not yet been issued and the access system has received all the access the card needs. While it is false, `pending_mutations` contains `waiting_for_access_on_acs_system`.',
10048
10072
  type: 'boolean',
10049
10073
  },
10050
10074
  issued_at: {
@@ -10251,6 +10275,31 @@ const openapi: OpenAPISpec = {
10251
10275
  ],
10252
10276
  type: 'object',
10253
10277
  },
10278
+ {
10279
+ description:
10280
+ 'The access system has not yet received all the access this card needs. A card encoded now would carry only the access the system already has, so wait until this clears before encoding.',
10281
+ properties: {
10282
+ created_at: {
10283
+ description:
10284
+ 'Date and time at which the mutation was created.',
10285
+ format: 'date-time',
10286
+ type: 'string',
10287
+ },
10288
+ message: {
10289
+ description:
10290
+ 'Detailed description of the mutation.',
10291
+ type: 'string',
10292
+ },
10293
+ mutation_code: {
10294
+ description:
10295
+ 'Mutation code to indicate that the access system has not yet received all the access this card needs, so the card is not ready to be encoded.',
10296
+ enum: ['waiting_for_access_on_acs_system'],
10297
+ type: 'string',
10298
+ },
10299
+ },
10300
+ required: ['created_at', 'message', 'mutation_code'],
10301
+ type: 'object',
10302
+ },
10254
10303
  ],
10255
10304
  },
10256
10305
  type: 'array',
@@ -11566,6 +11615,122 @@ const openapi: OpenAPISpec = {
11566
11615
  ],
11567
11616
  type: 'object',
11568
11617
  },
11618
+ {
11619
+ description:
11620
+ 'Converting an unmanaged access code to managed is pending.',
11621
+ properties: {
11622
+ action_attempt_id: {
11623
+ description: 'ID of the action attempt.',
11624
+ format: 'uuid',
11625
+ type: 'string',
11626
+ },
11627
+ action_type: {
11628
+ description:
11629
+ 'Action attempt to track the status of converting an unmanaged access code to a managed access code.',
11630
+ enum: ['CONVERT_ACCESS_CODE_TO_MANAGED'],
11631
+ type: 'string',
11632
+ },
11633
+ error: {
11634
+ description:
11635
+ 'Errors associated with the action attempt. Null for pending action attempts.',
11636
+ nullable: true,
11637
+ },
11638
+ result: {
11639
+ description:
11640
+ 'Result of the action attempt. Null for pending action attempts.',
11641
+ nullable: true,
11642
+ },
11643
+ status: { enum: ['pending'], type: 'string' },
11644
+ },
11645
+ required: [
11646
+ 'action_attempt_id',
11647
+ 'status',
11648
+ 'result',
11649
+ 'error',
11650
+ 'action_type',
11651
+ ],
11652
+ type: 'object',
11653
+ },
11654
+ {
11655
+ description:
11656
+ 'Converting an unmanaged access code to managed succeeded.',
11657
+ properties: {
11658
+ action_attempt_id: {
11659
+ description: 'ID of the action attempt.',
11660
+ format: 'uuid',
11661
+ type: 'string',
11662
+ },
11663
+ action_type: {
11664
+ description:
11665
+ 'Action attempt to track the status of converting an unmanaged access code to a managed access code.',
11666
+ enum: ['CONVERT_ACCESS_CODE_TO_MANAGED'],
11667
+ type: 'string',
11668
+ },
11669
+ error: {
11670
+ description:
11671
+ 'Errors associated with the action attempt. Null for successful action attempts.',
11672
+ nullable: true,
11673
+ },
11674
+ result: {
11675
+ description: 'Result of the action.',
11676
+ properties: {},
11677
+ type: 'object',
11678
+ },
11679
+ status: { enum: ['success'], type: 'string' },
11680
+ },
11681
+ required: [
11682
+ 'action_attempt_id',
11683
+ 'status',
11684
+ 'error',
11685
+ 'action_type',
11686
+ 'result',
11687
+ ],
11688
+ type: 'object',
11689
+ },
11690
+ {
11691
+ description:
11692
+ 'Converting an unmanaged access code to managed failed.',
11693
+ properties: {
11694
+ action_attempt_id: {
11695
+ description: 'ID of the action attempt.',
11696
+ format: 'uuid',
11697
+ type: 'string',
11698
+ },
11699
+ action_type: {
11700
+ description:
11701
+ 'Action attempt to track the status of converting an unmanaged access code to a managed access code.',
11702
+ enum: ['CONVERT_ACCESS_CODE_TO_MANAGED'],
11703
+ type: 'string',
11704
+ },
11705
+ error: {
11706
+ description: 'Error associated with the action.',
11707
+ properties: {
11708
+ message: {
11709
+ description:
11710
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
11711
+ type: 'string',
11712
+ },
11713
+ type: { description: 'Type of the error.', type: 'string' },
11714
+ },
11715
+ required: ['type', 'message'],
11716
+ type: 'object',
11717
+ },
11718
+ result: {
11719
+ description:
11720
+ 'Result of the action attempt. Null for failed action attempts.',
11721
+ nullable: true,
11722
+ },
11723
+ status: { enum: ['error'], type: 'string' },
11724
+ },
11725
+ required: [
11726
+ 'action_attempt_id',
11727
+ 'status',
11728
+ 'result',
11729
+ 'action_type',
11730
+ 'error',
11731
+ ],
11732
+ type: 'object',
11733
+ },
11569
11734
  {
11570
11735
  properties: {
11571
11736
  action_attempt_id: {
@@ -34250,7 +34415,7 @@ const openapi: OpenAPISpec = {
34250
34415
  },
34251
34416
  is_ready_for_encoding: {
34252
34417
  description:
34253
- 'Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued.',
34418
+ 'Indicates whether the access method is ready to be encoded. This is true when the card has not yet been issued and the access system has received all the access the card needs. While it is false, `pending_mutations` contains `waiting_for_access_on_acs_system`.',
34254
34419
  type: 'boolean',
34255
34420
  },
34256
34421
  issued_at: {
@@ -34451,6 +34616,30 @@ const openapi: OpenAPISpec = {
34451
34616
  ],
34452
34617
  type: 'object',
34453
34618
  },
34619
+ {
34620
+ description:
34621
+ 'The access system has not yet received all the access this card needs. A card encoded now would carry only the access the system already has, so wait until this clears before encoding.',
34622
+ properties: {
34623
+ created_at: {
34624
+ description:
34625
+ 'Date and time at which the mutation was created.',
34626
+ format: 'date-time',
34627
+ type: 'string',
34628
+ },
34629
+ message: {
34630
+ description: 'Detailed description of the mutation.',
34631
+ type: 'string',
34632
+ },
34633
+ mutation_code: {
34634
+ description:
34635
+ 'Mutation code to indicate that the access system has not yet received all the access this card needs, so the card is not ready to be encoded.',
34636
+ enum: ['waiting_for_access_on_acs_system'],
34637
+ type: 'string',
34638
+ },
34639
+ },
34640
+ required: ['created_at', 'message', 'mutation_code'],
34641
+ type: 'object',
34642
+ },
34454
34643
  ],
34455
34644
  },
34456
34645
  type: 'array',