@seamapi/types 1.364.0 → 1.366.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 (60) hide show
  1. package/dist/connect.cjs +1007 -4
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +2441 -178
  4. package/lib/seam/connect/internal/schemas.d.ts +1 -1
  5. package/lib/seam/connect/internal/schemas.js +1 -1
  6. package/lib/seam/connect/internal/schemas.js.map +1 -1
  7. package/lib/seam/connect/models/acs/acs-access-group.js +1 -2
  8. package/lib/seam/connect/models/acs/acs-access-group.js.map +1 -1
  9. package/lib/seam/connect/models/acs/acs-credential.js +1 -2
  10. package/lib/seam/connect/models/acs/acs-credential.js.map +1 -1
  11. package/lib/seam/connect/models/acs/acs-system.d.ts +1 -1
  12. package/lib/seam/connect/models/acs/acs-system.js +2 -2
  13. package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
  14. package/lib/seam/connect/models/acs/{acs-user.d.ts → acs-users/acs-user.d.ts} +540 -18
  15. package/lib/seam/connect/models/acs/{acs-user.js → acs-users/acs-user.js} +10 -4
  16. package/lib/seam/connect/models/acs/acs-users/acs-user.js.map +1 -0
  17. package/lib/seam/connect/models/acs/acs-users/index.d.ts +2 -0
  18. package/lib/seam/connect/models/acs/acs-users/index.js +3 -0
  19. package/lib/seam/connect/models/acs/acs-users/index.js.map +1 -0
  20. package/lib/seam/connect/models/acs/acs-users/pending-modifications.d.ts +176 -0
  21. package/lib/seam/connect/models/acs/acs-users/pending-modifications.js +42 -0
  22. package/lib/seam/connect/models/acs/acs-users/pending-modifications.js.map +1 -0
  23. package/lib/seam/connect/models/acs/index.d.ts +1 -1
  24. package/lib/seam/connect/models/acs/index.js +1 -1
  25. package/lib/seam/connect/models/acs/index.js.map +1 -1
  26. package/lib/seam/connect/models/connected-accounts/connected-account.js +1 -2
  27. package/lib/seam/connect/models/connected-accounts/connected-account.js.map +1 -1
  28. package/lib/seam/connect/models/devices/device.js +1 -2
  29. package/lib/seam/connect/models/devices/device.js.map +1 -1
  30. package/lib/seam/connect/models/index.d.ts +1 -0
  31. package/lib/seam/connect/models/index.js +1 -0
  32. package/lib/seam/connect/models/index.js.map +1 -1
  33. package/lib/seam/connect/models/locations/index.d.ts +1 -0
  34. package/lib/seam/connect/models/locations/index.js +2 -0
  35. package/lib/seam/connect/models/locations/index.js.map +1 -0
  36. package/lib/seam/connect/models/locations/location.d.ts +49 -0
  37. package/lib/seam/connect/models/locations/location.js +25 -0
  38. package/lib/seam/connect/models/locations/location.js.map +1 -0
  39. package/lib/seam/connect/models/user-identities/user-identity.d.ts +2 -2
  40. package/lib/seam/connect/openapi.d.ts +1271 -36
  41. package/lib/seam/connect/openapi.js +955 -0
  42. package/lib/seam/connect/openapi.js.map +1 -1
  43. package/lib/seam/connect/route-types.d.ts +506 -0
  44. package/package.json +1 -1
  45. package/src/lib/seam/connect/internal/schemas.ts +2 -0
  46. package/src/lib/seam/connect/models/acs/acs-access-group.ts +1 -2
  47. package/src/lib/seam/connect/models/acs/acs-credential.ts +1 -2
  48. package/src/lib/seam/connect/models/acs/acs-system.ts +2 -2
  49. package/src/lib/seam/connect/models/acs/{acs-user.ts → acs-users/acs-user.ts} +10 -4
  50. package/src/lib/seam/connect/models/acs/acs-users/index.ts +2 -0
  51. package/src/lib/seam/connect/models/acs/acs-users/pending-modifications.ts +56 -0
  52. package/src/lib/seam/connect/models/acs/index.ts +1 -1
  53. package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +1 -2
  54. package/src/lib/seam/connect/models/devices/device.ts +1 -2
  55. package/src/lib/seam/connect/models/index.ts +1 -0
  56. package/src/lib/seam/connect/models/locations/index.ts +1 -0
  57. package/src/lib/seam/connect/models/locations/location.ts +30 -0
  58. package/src/lib/seam/connect/openapi.ts +976 -0
  59. package/src/lib/seam/connect/route-types.ts +567 -0
  60. package/lib/seam/connect/models/acs/acs-user.js.map +0 -1
@@ -1,7 +1,8 @@
1
1
  import { z } from 'zod'
2
2
 
3
- import { phone_number } from '../phone-number.js'
4
- import { schedule } from '../schedule.js'
3
+ import { phone_number } from '../../phone-number.js'
4
+ import { schedule } from '../../schedule.js'
5
+ import { acs_user_pending_modification } from './pending-modifications.js'
5
6
 
6
7
  export const acs_user_external_type = z.enum([
7
8
  'pti_user',
@@ -129,8 +130,7 @@ export const unknown_issue_with_acs_user = common_acs_user_warning
129
130
  warning_code: z.literal('unknown_issue_with_acs_user'),
130
131
  })
131
132
  .describe(
132
- 'An unknown issue occurred while syncing the state of this [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management) with the provider. ' +
133
- 'This issue may affect the proper functioning of this user.',
133
+ 'An unknown issue occurred while syncing the state of this [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management) with the provider. This issue may affect the proper functioning of this user.',
134
134
  )
135
135
 
136
136
  export const acs_users_warning_map = z.object({
@@ -324,6 +324,12 @@ const common_acs_user = z
324
324
  .describe(
325
325
  'Errors associated with the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management).',
326
326
  ),
327
+ pending_modifications: z.array(acs_user_pending_modification).optional()
328
+ .describe(`
329
+ ---
330
+ undocumented: Experimental.
331
+ ---
332
+ `),
327
333
  })
328
334
  .merge(user_fields)
329
335
 
@@ -0,0 +1,2 @@
1
+ export * from './acs-user.js'
2
+ export * from './pending-modifications.js'
@@ -0,0 +1,56 @@
1
+ import { z } from 'zod'
2
+
3
+ import { phone_number } from '../../phone-number.js'
4
+ import { schedule } from '../../schedule.js'
5
+
6
+ const common_pending_modification = z.object({
7
+ created_at: z.string().datetime(),
8
+ })
9
+
10
+ const acs_user_profile = z.object({
11
+ email_address: z.string().email().nullable(),
12
+ full_name: z.string().nullable(),
13
+ phone_number: phone_number.optional().nullable(),
14
+ })
15
+
16
+ const profile_pending_modification = common_pending_modification.extend({
17
+ modification_code: z.literal('profile'),
18
+ modified_from: acs_user_profile.partial(),
19
+ modified_to: acs_user_profile.partial(),
20
+ })
21
+
22
+ const access_schedule_pending_modification = common_pending_modification.extend(
23
+ {
24
+ modification_code: z.literal('access_schedule'),
25
+ modified_from: schedule,
26
+ modified_to: schedule,
27
+ },
28
+ )
29
+
30
+ const suspension_state_pending_modification =
31
+ common_pending_modification.extend({
32
+ modification_code: z.literal('suspension_state'),
33
+ modified_from: z.object({ is_suspended: z.boolean() }),
34
+ modified_to: z.object({ is_suspended: z.boolean() }),
35
+ })
36
+
37
+ const acs_access_group_membership_pending_modification =
38
+ common_pending_modification.extend({
39
+ modification_code: z.literal('acs_access_group_membership'),
40
+ modified_from: z.object({
41
+ acs_access_group_id: z.string().uuid().nullable(),
42
+ }),
43
+ modified_to: z.object({
44
+ acs_access_group_id: z.string().uuid().nullable(),
45
+ }),
46
+ })
47
+
48
+ export const acs_user_pending_modification = z.discriminatedUnion(
49
+ 'modification_code',
50
+ [
51
+ profile_pending_modification,
52
+ access_schedule_pending_modification,
53
+ suspension_state_pending_modification,
54
+ acs_access_group_membership_pending_modification,
55
+ ],
56
+ )
@@ -5,5 +5,5 @@ export * from './acs-credential-provisioning-automation.js'
5
5
  export * from './acs-encoder.js'
6
6
  export * from './acs-entrance.js'
7
7
  export * from './acs-system.js'
8
- export * from './acs-user.js'
8
+ export * from './acs-users/index.js'
9
9
  export * from './metadata/index.js'
@@ -88,8 +88,7 @@ export const unknown_issue_with_connected_account =
88
88
  .describe(warning_code_description),
89
89
  })
90
90
  .describe(
91
- 'An unknown issue occurred while syncing the state of this connected account with the provider. ' +
92
- 'This issue may affect the proper functioning of one or more resources in this account.',
91
+ 'An unknown issue occurred while syncing the state of this connected account with the provider. This issue may affect the proper functioning of one or more resources in this account.',
93
92
  )
94
93
 
95
94
  const scheduled_maintenance_window = common_connected_account_warning
@@ -313,8 +313,7 @@ export const unknown_issue_with_phone = common_device_warning
313
313
  .describe(warning_code_description),
314
314
  })
315
315
  .describe(
316
- 'An unknown issue occurred while syncing the state of this phone with the provider. ' +
317
- 'This issue may affect the proper functioning of this phone.',
316
+ 'An unknown issue occurred while syncing the state of this phone with the provider. This issue may affect the proper functioning of this phone.',
318
317
  )
319
318
 
320
319
  const device_warning = z.discriminatedUnion('warning_code', [
@@ -9,6 +9,7 @@ export * from './connected-accounts/index.js'
9
9
  export * from './custom-metadata.js'
10
10
  export * from './devices/index.js'
11
11
  export * from './events/index.js'
12
+ export * from './locations/index.js'
12
13
  export * from './noise-sensors/index.js'
13
14
  export * from './pagination.js'
14
15
  export * from './phone-number.js'
@@ -0,0 +1 @@
1
+ export * from './location.js'
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod'
2
+
3
+ export const geolocation = z.object({
4
+ latitude: z.number(),
5
+ longitude: z.number(),
6
+ })
7
+
8
+ export const location = z.object({
9
+ location_id: z
10
+ .string()
11
+ .uuid()
12
+ .describe('Unique identifier for the location.'),
13
+ workspace_id: z
14
+ .string()
15
+ .uuid()
16
+ .describe(
17
+ 'Unique identifier for the Seam workspace associated with the location.',
18
+ ),
19
+ display_name: z.string().describe('Display name of the location.'),
20
+ geolocation: geolocation
21
+ .optional()
22
+ .describe('Geographical location of the location.'),
23
+ time_zone: z.string().optional().describe('Time zone of the location.'),
24
+ created_at: z
25
+ .string()
26
+ .datetime()
27
+ .describe('Date and time at which the location object was created.'),
28
+ })
29
+
30
+ export type Location = z.infer<typeof location>