@seamapi/types 1.379.0 → 1.380.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.
Files changed (31) hide show
  1. package/dist/connect.cjs +404 -34
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +533 -51
  4. package/lib/seam/connect/models/access-grants/access-grant.d.ts +8 -13
  5. package/lib/seam/connect/models/access-grants/access-grant.js +4 -4
  6. package/lib/seam/connect/models/access-grants/access-grant.js.map +1 -1
  7. package/lib/seam/connect/models/access-grants/access-method.d.ts +6 -3
  8. package/lib/seam/connect/models/access-grants/access-method.js +4 -2
  9. package/lib/seam/connect/models/access-grants/access-method.js.map +1 -1
  10. package/lib/seam/connect/models/access-grants/requested-access-method.d.ts +18 -0
  11. package/lib/seam/connect/models/access-grants/requested-access-method.js +19 -0
  12. package/lib/seam/connect/models/access-grants/requested-access-method.js.map +1 -0
  13. package/lib/seam/connect/models/devices/device-metadata.d.ts +0 -5
  14. package/lib/seam/connect/models/devices/device-metadata.js +0 -1
  15. package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
  16. package/lib/seam/connect/models/devices/device.d.ts +0 -7
  17. package/lib/seam/connect/models/devices/unmanaged-device.d.ts +0 -5
  18. package/lib/seam/connect/models/events/acs/credentials.js +2 -1
  19. package/lib/seam/connect/models/events/acs/credentials.js.map +1 -1
  20. package/lib/seam/connect/openapi.d.ts +415 -16
  21. package/lib/seam/connect/openapi.js +401 -31
  22. package/lib/seam/connect/openapi.js.map +1 -1
  23. package/lib/seam/connect/route-types.d.ts +118 -23
  24. package/package.json +1 -1
  25. package/src/lib/seam/connect/models/access-grants/access-grant.ts +4 -4
  26. package/src/lib/seam/connect/models/access-grants/access-method.ts +6 -2
  27. package/src/lib/seam/connect/models/access-grants/requested-access-method.ts +25 -0
  28. package/src/lib/seam/connect/models/devices/device-metadata.ts +0 -1
  29. package/src/lib/seam/connect/models/events/acs/credentials.ts +2 -1
  30. package/src/lib/seam/connect/openapi.ts +429 -33
  31. package/src/lib/seam/connect/route-types.ts +123 -30
@@ -16520,7 +16520,6 @@ export interface Routes {
16520
16520
  schlage_metadata?: {
16521
16521
  device_id: string;
16522
16522
  device_name: string;
16523
- access_code_length: number | null;
16524
16523
  model?: string | undefined;
16525
16524
  } | undefined;
16526
16525
  smartthings_metadata?: {
@@ -17262,7 +17261,6 @@ export interface Routes {
17262
17261
  schlage_metadata?: {
17263
17262
  device_id: string;
17264
17263
  device_name: string;
17265
- access_code_length: number | null;
17266
17264
  model?: string | undefined;
17267
17265
  } | undefined;
17268
17266
  smartthings_metadata?: {
@@ -21207,7 +21205,6 @@ export interface Routes {
21207
21205
  schlage_metadata?: {
21208
21206
  device_id: string;
21209
21207
  device_name: string;
21210
- access_code_length: number | null;
21211
21208
  model?: string | undefined;
21212
21209
  } | undefined;
21213
21210
  smartthings_metadata?: {
@@ -21911,7 +21908,6 @@ export interface Routes {
21911
21908
  schlage_metadata?: {
21912
21909
  device_id: string;
21913
21910
  device_name: string;
21914
- access_code_length: number | null;
21915
21911
  model?: string | undefined;
21916
21912
  } | undefined;
21917
21913
  smartthings_metadata?: {
@@ -22653,7 +22649,6 @@ export interface Routes {
22653
22649
  schlage_metadata?: {
22654
22650
  device_id: string;
22655
22651
  device_name: string;
22656
- access_code_length: number | null;
22657
22652
  model?: string | undefined;
22658
22653
  } | undefined;
22659
22654
  smartthings_metadata?: {
@@ -23356,7 +23351,6 @@ export interface Routes {
23356
23351
  schlage_metadata?: {
23357
23352
  device_id: string;
23358
23353
  device_name: string;
23359
- access_code_length: number | null;
23360
23354
  model?: string | undefined;
23361
23355
  } | undefined;
23362
23356
  smartthings_metadata?: {
@@ -26059,7 +26053,6 @@ export interface Routes {
26059
26053
  schlage_metadata?: {
26060
26054
  device_id: string;
26061
26055
  device_name: string;
26062
- access_code_length: number | null;
26063
26056
  model?: string | undefined;
26064
26057
  } | undefined;
26065
26058
  smartthings_metadata?: {
@@ -26762,7 +26755,6 @@ export interface Routes {
26762
26755
  schlage_metadata?: {
26763
26756
  device_id: string;
26764
26757
  device_name: string;
26765
- access_code_length: number | null;
26766
26758
  model?: string | undefined;
26767
26759
  } | undefined;
26768
26760
  smartthings_metadata?: {
@@ -32803,7 +32795,6 @@ export interface Routes {
32803
32795
  schlage_metadata?: {
32804
32796
  device_id: string;
32805
32797
  device_name: string;
32806
- access_code_length: number | null;
32807
32798
  model?: string | undefined;
32808
32799
  } | undefined;
32809
32800
  smartthings_metadata?: {
@@ -35487,7 +35478,6 @@ export interface Routes {
35487
35478
  schlage_metadata?: {
35488
35479
  device_id: string;
35489
35480
  device_name: string;
35490
- access_code_length: number | null;
35491
35481
  model?: string | undefined;
35492
35482
  } | undefined;
35493
35483
  smartthings_metadata?: {
@@ -36190,7 +36180,6 @@ export interface Routes {
36190
36180
  schlage_metadata?: {
36191
36181
  device_id: string;
36192
36182
  device_name: string;
36193
- access_code_length: number | null;
36194
36183
  model?: string | undefined;
36195
36184
  } | undefined;
36196
36185
  smartthings_metadata?: {
@@ -40007,16 +39996,16 @@ export interface Routes {
40007
39996
  jsonBody: {};
40008
39997
  commonParams: ({
40009
39998
  /** ID of user identity for whom access is being granted. */
40010
- user_identity_id?: string | undefined;
39999
+ user_identity_id: string;
40011
40000
  } | {
40012
40001
  /** When used, creates a new user identity with the given details, and grants them access. */
40013
- user_identity?: {
40002
+ user_identity: {
40014
40003
  /** Unique email address for the user identity. */
40015
40004
  email_address?: (string | null) | undefined;
40016
40005
  /** Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). */
40017
40006
  phone_number?: (string | null) | undefined;
40018
40007
  full_name?: (string | null) | undefined;
40019
- } | undefined;
40008
+ };
40020
40009
  }) & {
40021
40010
  /** Set of IDs of existing locations to which access is being granted. */
40022
40011
  location_ids?: string[] | undefined;
@@ -40048,18 +40037,16 @@ export interface Routes {
40048
40037
  user_identity_id: string;
40049
40038
  /** IDs of the locations to which access is being given. */
40050
40039
  location_ids: string[];
40051
- /** Access methods associated with this access grant. */
40052
- access_methods: Array<{
40053
- /** Key for the access method - unique within an access grant. */
40054
- access_method_key: string;
40040
+ /** Access methods that the user requested for this access grant. */
40041
+ requested_access_methods: Array<{
40055
40042
  /** Display name of the access method. */
40056
40043
  display_name: string;
40057
40044
  /** Access method mode. Supported values: `code`, `card`, `mobile_key`. */
40058
40045
  mode: 'code' | 'card' | 'mobile_key';
40059
- /** Date and time at which the access method was created. */
40046
+ /** Date and time at which the requested access method was added to this access grant. */
40060
40047
  created_at: string;
40061
- /** Date and time at which the access method was issued. */
40062
- issued_at: string | null;
40048
+ /** IDs of the locations to which access is being given. */
40049
+ provisioned_access_method_ids: string[];
40063
40050
  }>;
40064
40051
  /** Display name of the access grant. */
40065
40052
  display_name: string;
@@ -40068,6 +40055,116 @@ export interface Routes {
40068
40055
  };
40069
40056
  };
40070
40057
  };
40058
+ '/unstable_access_grants/get': {
40059
+ route: '/unstable_access_grants/get';
40060
+ method: 'GET' | 'POST';
40061
+ queryParams: {};
40062
+ jsonBody: {};
40063
+ commonParams: {
40064
+ /** ID of access grant to get. */
40065
+ access_grant_id: string;
40066
+ };
40067
+ formData: {};
40068
+ jsonResponse: {
40069
+ /** */
40070
+ access_grant: {
40071
+ /** Unique identifier for the Seam workspace associated with the access grant. */
40072
+ workspace_id: string;
40073
+ /** ID of the access grant. */
40074
+ access_grant_id: string;
40075
+ /** ID of user identity to which access is being granted. */
40076
+ user_identity_id: string;
40077
+ /** IDs of the locations to which access is being given. */
40078
+ location_ids: string[];
40079
+ /** Access methods that the user requested for this access grant. */
40080
+ requested_access_methods: Array<{
40081
+ /** Display name of the access method. */
40082
+ display_name: string;
40083
+ /** Access method mode. Supported values: `code`, `card`, `mobile_key`. */
40084
+ mode: 'code' | 'card' | 'mobile_key';
40085
+ /** Date and time at which the requested access method was added to this access grant. */
40086
+ created_at: string;
40087
+ /** IDs of the locations to which access is being given. */
40088
+ provisioned_access_method_ids: string[];
40089
+ }>;
40090
+ /** Display name of the access grant. */
40091
+ display_name: string;
40092
+ /** Date and time at which the access grant was created. */
40093
+ created_at: string;
40094
+ };
40095
+ };
40096
+ };
40097
+ '/unstable_access_grants/list': {
40098
+ route: '/unstable_access_grants/list';
40099
+ method: 'GET' | 'POST';
40100
+ queryParams: {};
40101
+ jsonBody: {};
40102
+ commonParams: {
40103
+ /** ID of user identity to filter list of access grants by. */
40104
+ user_identity_id?: string | undefined;
40105
+ /** ID of system to filter list of access grants by. */
40106
+ acs_system_id?: string | undefined;
40107
+ /** ID of entrance to filter list of access grants by. */
40108
+ acs_entrance_id?: string | undefined;
40109
+ /** ID of location to filter list of access grants by. */
40110
+ location_id?: string | undefined;
40111
+ };
40112
+ formData: {};
40113
+ jsonResponse: {
40114
+ access_grants: Array<{
40115
+ /** Unique identifier for the Seam workspace associated with the access grant. */
40116
+ workspace_id: string;
40117
+ /** ID of the access grant. */
40118
+ access_grant_id: string;
40119
+ /** ID of user identity to which access is being granted. */
40120
+ user_identity_id: string;
40121
+ /** IDs of the locations to which access is being given. */
40122
+ location_ids: string[];
40123
+ /** Access methods that the user requested for this access grant. */
40124
+ requested_access_methods: Array<{
40125
+ /** Display name of the access method. */
40126
+ display_name: string;
40127
+ /** Access method mode. Supported values: `code`, `card`, `mobile_key`. */
40128
+ mode: 'code' | 'card' | 'mobile_key';
40129
+ /** Date and time at which the requested access method was added to this access grant. */
40130
+ created_at: string;
40131
+ /** IDs of the locations to which access is being given. */
40132
+ provisioned_access_method_ids: string[];
40133
+ }>;
40134
+ /** Display name of the access grant. */
40135
+ display_name: string;
40136
+ /** Date and time at which the access grant was created. */
40137
+ created_at: string;
40138
+ }>;
40139
+ };
40140
+ };
40141
+ '/unstable_access_grants/list_access_methods': {
40142
+ route: '/unstable_access_grants/list_access_methods';
40143
+ method: 'GET' | 'POST';
40144
+ queryParams: {};
40145
+ jsonBody: {};
40146
+ commonParams: {
40147
+ /** ID of access grant to list access methods for. */
40148
+ access_grant_id: string;
40149
+ };
40150
+ formData: {};
40151
+ jsonResponse: {
40152
+ access_methods: Array<{
40153
+ /** Unique identifier for the Seam workspace associated with the access grant. */
40154
+ workspace_id: string;
40155
+ /** ID of the access method. */
40156
+ access_method_id: string;
40157
+ /** Display name of the access method. */
40158
+ display_name: string;
40159
+ /** Access method mode. Supported values: `code`, `card`, `mobile_key`. */
40160
+ mode: 'code' | 'card' | 'mobile_key';
40161
+ /** Date and time at which the access method was created. */
40162
+ created_at: string;
40163
+ /** Date and time at which the access method was issued. */
40164
+ issued_at: string | null;
40165
+ }>;
40166
+ };
40167
+ };
40071
40168
  '/unstable_locations/add_devices': {
40072
40169
  route: '/unstable_locations/add_devices';
40073
40170
  method: 'POST' | 'PUT';
@@ -40594,7 +40691,6 @@ export interface Routes {
40594
40691
  schlage_metadata?: {
40595
40692
  device_id: string;
40596
40693
  device_name: string;
40597
- access_code_length: number | null;
40598
40694
  model?: string | undefined;
40599
40695
  } | undefined;
40600
40696
  smartthings_metadata?: {
@@ -41299,7 +41395,6 @@ export interface Routes {
41299
41395
  schlage_metadata?: {
41300
41396
  device_id: string;
41301
41397
  device_name: string;
41302
- access_code_length: number | null;
41303
41398
  model?: string | undefined;
41304
41399
  } | undefined;
41305
41400
  smartthings_metadata?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.379.0",
3
+ "version": "1.380.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
- import { access_method } from './access-method.js'
3
+ import { requested_access_method } from './requested-access-method.js'
4
4
 
5
5
  export const access_grant = z.object({
6
6
  workspace_id: z
@@ -17,9 +17,9 @@ export const access_grant = z.object({
17
17
  location_ids: z
18
18
  .array(z.string().uuid())
19
19
  .describe('IDs of the locations to which access is being given.'),
20
- access_methods: z
21
- .array(access_method)
22
- .describe('Access methods associated with this access grant.'),
20
+ requested_access_methods: z
21
+ .array(requested_access_method)
22
+ .describe('Access methods that the user requested for this access grant.'),
23
23
  display_name: z.string().describe('Display name of the access grant.'),
24
24
  created_at: z
25
25
  .string()
@@ -1,9 +1,13 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  export const access_method = z.object({
4
- access_method_key: z
4
+ workspace_id: z
5
5
  .string()
6
- .describe('Key for the access method - unique within an access grant.'),
6
+ .uuid()
7
+ .describe(
8
+ 'Unique identifier for the Seam workspace associated with the access grant.',
9
+ ),
10
+ access_method_id: z.string().uuid().describe('ID of the access method.'),
7
11
  display_name: z.string().describe('Display name of the access method.'),
8
12
  mode: z
9
13
  .enum(['code', 'card', 'mobile_key'])
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod'
2
+
3
+ export const requested_access_method = z.object({
4
+ display_name: z.string().describe('Display name of the access method.'),
5
+ mode: z
6
+ .enum(['code', 'card', 'mobile_key'])
7
+ .describe(
8
+ 'Access method mode. Supported values: `code`, `card`, `mobile_key`.',
9
+ ),
10
+ created_at: z
11
+ .string()
12
+ .datetime()
13
+ .describe(
14
+ 'Date and time at which the requested access method was added to this access grant.',
15
+ ),
16
+ provisioned_access_method_ids: z
17
+ .array(z.string().uuid())
18
+ .describe('IDs of the locations to which access is being given.'),
19
+ }).describe(`
20
+ ---
21
+ undocumented: Unreleased.
22
+ ---
23
+ `)
24
+
25
+ export type RequestedAccessMethod = z.infer<typeof requested_access_method>
@@ -42,7 +42,6 @@ export const device_metadata = z
42
42
  schlage_metadata: z.object({
43
43
  device_id: z.string(),
44
44
  device_name: z.string(),
45
- access_code_length: z.number().nullable(),
46
45
  model: z.string().optional(),
47
46
  }),
48
47
 
@@ -43,7 +43,8 @@ export const acs_credential_invalidated = acs_credential_event.extend({
43
43
  ---
44
44
  route_path: /acs/credentials
45
45
  ---
46
- An [ACS credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) was invalidated.
46
+ An [ACS credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) was invalidated. That is, the credential cannot be used anymore.
47
+
47
48
  `)
48
49
 
49
50
  export const acs_credential_events = [