@seamapi/types 1.365.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 (28) hide show
  1. package/dist/connect.cjs +370 -2
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +1304 -14
  4. package/lib/seam/connect/models/acs/{acs-user.d.ts → acs-users/acs-user.d.ts} +540 -18
  5. package/lib/seam/connect/models/acs/{acs-user.js → acs-users/acs-user.js} +9 -2
  6. package/lib/seam/connect/models/acs/acs-users/acs-user.js.map +1 -0
  7. package/lib/seam/connect/models/acs/acs-users/index.d.ts +2 -0
  8. package/lib/seam/connect/models/acs/acs-users/index.js +3 -0
  9. package/lib/seam/connect/models/acs/acs-users/index.js.map +1 -0
  10. package/lib/seam/connect/models/acs/acs-users/pending-modifications.d.ts +176 -0
  11. package/lib/seam/connect/models/acs/acs-users/pending-modifications.js +42 -0
  12. package/lib/seam/connect/models/acs/acs-users/pending-modifications.js.map +1 -0
  13. package/lib/seam/connect/models/acs/index.d.ts +1 -1
  14. package/lib/seam/connect/models/acs/index.js +1 -1
  15. package/lib/seam/connect/models/acs/index.js.map +1 -1
  16. package/lib/seam/connect/models/user-identities/user-identity.d.ts +2 -2
  17. package/lib/seam/connect/openapi.d.ts +432 -0
  18. package/lib/seam/connect/openapi.js +320 -0
  19. package/lib/seam/connect/openapi.js.map +1 -1
  20. package/lib/seam/connect/route-types.d.ts +336 -0
  21. package/package.json +1 -1
  22. package/src/lib/seam/connect/models/acs/{acs-user.ts → acs-users/acs-user.ts} +9 -2
  23. package/src/lib/seam/connect/models/acs/acs-users/index.ts +2 -0
  24. package/src/lib/seam/connect/models/acs/acs-users/pending-modifications.ts +56 -0
  25. package/src/lib/seam/connect/models/acs/index.ts +1 -1
  26. package/src/lib/seam/connect/openapi.ts +328 -0
  27. package/src/lib/seam/connect/route-types.ts +385 -0
  28. package/lib/seam/connect/models/acs/acs-user.js.map +0 -1
@@ -7026,6 +7026,54 @@ export interface Routes {
7026
7026
  message: string;
7027
7027
  error_code: 'failed_to_delete_on_acs_system';
7028
7028
  }>;
7029
+ /** */
7030
+ pending_modifications?: Array<{
7031
+ created_at: string;
7032
+ modification_code: 'profile';
7033
+ modified_from: {
7034
+ email_address?: (string | null) | undefined;
7035
+ full_name?: (string | null) | undefined;
7036
+ phone_number?: ((string | undefined) | null) | undefined;
7037
+ };
7038
+ modified_to: {
7039
+ email_address?: (string | null) | undefined;
7040
+ full_name?: (string | null) | undefined;
7041
+ phone_number?: ((string | undefined) | null) | undefined;
7042
+ };
7043
+ } | {
7044
+ created_at: string;
7045
+ modification_code: 'access_schedule';
7046
+ modified_from: {
7047
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
7048
+ starts_at: string;
7049
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
7050
+ ends_at: string | null;
7051
+ };
7052
+ modified_to: {
7053
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
7054
+ starts_at: string;
7055
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
7056
+ ends_at: string | null;
7057
+ };
7058
+ } | {
7059
+ created_at: string;
7060
+ modification_code: 'suspension_state';
7061
+ modified_from: {
7062
+ is_suspended: boolean;
7063
+ };
7064
+ modified_to: {
7065
+ is_suspended: boolean;
7066
+ };
7067
+ } | {
7068
+ created_at: string;
7069
+ modification_code: 'acs_access_group_membership';
7070
+ modified_from: {
7071
+ acs_access_group_id: string | null;
7072
+ };
7073
+ modified_to: {
7074
+ acs_access_group_id: string | null;
7075
+ };
7076
+ }> | undefined;
7029
7077
  /** Full name of the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management). */
7030
7078
  full_name?: string | undefined;
7031
7079
  /**
@@ -11209,6 +11257,54 @@ export interface Routes {
11209
11257
  message: string;
11210
11258
  error_code: 'failed_to_delete_on_acs_system';
11211
11259
  }>;
11260
+ /** */
11261
+ pending_modifications?: Array<{
11262
+ created_at: string;
11263
+ modification_code: 'profile';
11264
+ modified_from: {
11265
+ email_address?: (string | null) | undefined;
11266
+ full_name?: (string | null) | undefined;
11267
+ phone_number?: ((string | undefined) | null) | undefined;
11268
+ };
11269
+ modified_to: {
11270
+ email_address?: (string | null) | undefined;
11271
+ full_name?: (string | null) | undefined;
11272
+ phone_number?: ((string | undefined) | null) | undefined;
11273
+ };
11274
+ } | {
11275
+ created_at: string;
11276
+ modification_code: 'access_schedule';
11277
+ modified_from: {
11278
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11279
+ starts_at: string;
11280
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11281
+ ends_at: string | null;
11282
+ };
11283
+ modified_to: {
11284
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11285
+ starts_at: string;
11286
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11287
+ ends_at: string | null;
11288
+ };
11289
+ } | {
11290
+ created_at: string;
11291
+ modification_code: 'suspension_state';
11292
+ modified_from: {
11293
+ is_suspended: boolean;
11294
+ };
11295
+ modified_to: {
11296
+ is_suspended: boolean;
11297
+ };
11298
+ } | {
11299
+ created_at: string;
11300
+ modification_code: 'acs_access_group_membership';
11301
+ modified_from: {
11302
+ acs_access_group_id: string | null;
11303
+ };
11304
+ modified_to: {
11305
+ acs_access_group_id: string | null;
11306
+ };
11307
+ }> | undefined;
11212
11308
  /** Full name of the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management). */
11213
11309
  full_name?: string | undefined;
11214
11310
  /**
@@ -11335,6 +11431,54 @@ export interface Routes {
11335
11431
  message: string;
11336
11432
  error_code: 'failed_to_delete_on_acs_system';
11337
11433
  }>;
11434
+ /** */
11435
+ pending_modifications?: Array<{
11436
+ created_at: string;
11437
+ modification_code: 'profile';
11438
+ modified_from: {
11439
+ email_address?: (string | null) | undefined;
11440
+ full_name?: (string | null) | undefined;
11441
+ phone_number?: ((string | undefined) | null) | undefined;
11442
+ };
11443
+ modified_to: {
11444
+ email_address?: (string | null) | undefined;
11445
+ full_name?: (string | null) | undefined;
11446
+ phone_number?: ((string | undefined) | null) | undefined;
11447
+ };
11448
+ } | {
11449
+ created_at: string;
11450
+ modification_code: 'access_schedule';
11451
+ modified_from: {
11452
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11453
+ starts_at: string;
11454
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11455
+ ends_at: string | null;
11456
+ };
11457
+ modified_to: {
11458
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11459
+ starts_at: string;
11460
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11461
+ ends_at: string | null;
11462
+ };
11463
+ } | {
11464
+ created_at: string;
11465
+ modification_code: 'suspension_state';
11466
+ modified_from: {
11467
+ is_suspended: boolean;
11468
+ };
11469
+ modified_to: {
11470
+ is_suspended: boolean;
11471
+ };
11472
+ } | {
11473
+ created_at: string;
11474
+ modification_code: 'acs_access_group_membership';
11475
+ modified_from: {
11476
+ acs_access_group_id: string | null;
11477
+ };
11478
+ modified_to: {
11479
+ acs_access_group_id: string | null;
11480
+ };
11481
+ }> | undefined;
11338
11482
  /** Full name of the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management). */
11339
11483
  full_name?: string | undefined;
11340
11484
  /**
@@ -11461,6 +11605,54 @@ export interface Routes {
11461
11605
  message: string;
11462
11606
  error_code: 'failed_to_delete_on_acs_system';
11463
11607
  }>;
11608
+ /** */
11609
+ pending_modifications?: Array<{
11610
+ created_at: string;
11611
+ modification_code: 'profile';
11612
+ modified_from: {
11613
+ email_address?: (string | null) | undefined;
11614
+ full_name?: (string | null) | undefined;
11615
+ phone_number?: ((string | undefined) | null) | undefined;
11616
+ };
11617
+ modified_to: {
11618
+ email_address?: (string | null) | undefined;
11619
+ full_name?: (string | null) | undefined;
11620
+ phone_number?: ((string | undefined) | null) | undefined;
11621
+ };
11622
+ } | {
11623
+ created_at: string;
11624
+ modification_code: 'access_schedule';
11625
+ modified_from: {
11626
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11627
+ starts_at: string;
11628
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11629
+ ends_at: string | null;
11630
+ };
11631
+ modified_to: {
11632
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11633
+ starts_at: string;
11634
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11635
+ ends_at: string | null;
11636
+ };
11637
+ } | {
11638
+ created_at: string;
11639
+ modification_code: 'suspension_state';
11640
+ modified_from: {
11641
+ is_suspended: boolean;
11642
+ };
11643
+ modified_to: {
11644
+ is_suspended: boolean;
11645
+ };
11646
+ } | {
11647
+ created_at: string;
11648
+ modification_code: 'acs_access_group_membership';
11649
+ modified_from: {
11650
+ acs_access_group_id: string | null;
11651
+ };
11652
+ modified_to: {
11653
+ acs_access_group_id: string | null;
11654
+ };
11655
+ }> | undefined;
11464
11656
  /** Full name of the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management). */
11465
11657
  full_name?: string | undefined;
11466
11658
  /**
@@ -11696,6 +11888,54 @@ export interface Routes {
11696
11888
  message: string;
11697
11889
  error_code: 'failed_to_delete_on_acs_system';
11698
11890
  }>;
11891
+ /** */
11892
+ pending_modifications?: Array<{
11893
+ created_at: string;
11894
+ modification_code: 'profile';
11895
+ modified_from: {
11896
+ email_address?: (string | null) | undefined;
11897
+ full_name?: (string | null) | undefined;
11898
+ phone_number?: ((string | undefined) | null) | undefined;
11899
+ };
11900
+ modified_to: {
11901
+ email_address?: (string | null) | undefined;
11902
+ full_name?: (string | null) | undefined;
11903
+ phone_number?: ((string | undefined) | null) | undefined;
11904
+ };
11905
+ } | {
11906
+ created_at: string;
11907
+ modification_code: 'access_schedule';
11908
+ modified_from: {
11909
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11910
+ starts_at: string;
11911
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11912
+ ends_at: string | null;
11913
+ };
11914
+ modified_to: {
11915
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11916
+ starts_at: string;
11917
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
11918
+ ends_at: string | null;
11919
+ };
11920
+ } | {
11921
+ created_at: string;
11922
+ modification_code: 'suspension_state';
11923
+ modified_from: {
11924
+ is_suspended: boolean;
11925
+ };
11926
+ modified_to: {
11927
+ is_suspended: boolean;
11928
+ };
11929
+ } | {
11930
+ created_at: string;
11931
+ modification_code: 'acs_access_group_membership';
11932
+ modified_from: {
11933
+ acs_access_group_id: string | null;
11934
+ };
11935
+ modified_to: {
11936
+ acs_access_group_id: string | null;
11937
+ };
11938
+ }> | undefined;
11699
11939
  /** Full name of the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management). */
11700
11940
  full_name?: string | undefined;
11701
11941
  /**
@@ -11812,6 +12052,54 @@ export interface Routes {
11812
12052
  message: string;
11813
12053
  error_code: 'failed_to_delete_on_acs_system';
11814
12054
  }>;
12055
+ /** */
12056
+ pending_modifications?: Array<{
12057
+ created_at: string;
12058
+ modification_code: 'profile';
12059
+ modified_from: {
12060
+ email_address?: (string | null) | undefined;
12061
+ full_name?: (string | null) | undefined;
12062
+ phone_number?: ((string | undefined) | null) | undefined;
12063
+ };
12064
+ modified_to: {
12065
+ email_address?: (string | null) | undefined;
12066
+ full_name?: (string | null) | undefined;
12067
+ phone_number?: ((string | undefined) | null) | undefined;
12068
+ };
12069
+ } | {
12070
+ created_at: string;
12071
+ modification_code: 'access_schedule';
12072
+ modified_from: {
12073
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
12074
+ starts_at: string;
12075
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
12076
+ ends_at: string | null;
12077
+ };
12078
+ modified_to: {
12079
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
12080
+ starts_at: string;
12081
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
12082
+ ends_at: string | null;
12083
+ };
12084
+ } | {
12085
+ created_at: string;
12086
+ modification_code: 'suspension_state';
12087
+ modified_from: {
12088
+ is_suspended: boolean;
12089
+ };
12090
+ modified_to: {
12091
+ is_suspended: boolean;
12092
+ };
12093
+ } | {
12094
+ created_at: string;
12095
+ modification_code: 'acs_access_group_membership';
12096
+ modified_from: {
12097
+ acs_access_group_id: string | null;
12098
+ };
12099
+ modified_to: {
12100
+ acs_access_group_id: string | null;
12101
+ };
12102
+ }> | undefined;
11815
12103
  /** Full name of the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management). */
11816
12104
  full_name?: string | undefined;
11817
12105
  /**
@@ -38705,6 +38993,54 @@ export interface Routes {
38705
38993
  message: string;
38706
38994
  error_code: 'failed_to_delete_on_acs_system';
38707
38995
  }>;
38996
+ /** */
38997
+ pending_modifications?: Array<{
38998
+ created_at: string;
38999
+ modification_code: 'profile';
39000
+ modified_from: {
39001
+ email_address?: (string | null) | undefined;
39002
+ full_name?: (string | null) | undefined;
39003
+ phone_number?: ((string | undefined) | null) | undefined;
39004
+ };
39005
+ modified_to: {
39006
+ email_address?: (string | null) | undefined;
39007
+ full_name?: (string | null) | undefined;
39008
+ phone_number?: ((string | undefined) | null) | undefined;
39009
+ };
39010
+ } | {
39011
+ created_at: string;
39012
+ modification_code: 'access_schedule';
39013
+ modified_from: {
39014
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
39015
+ starts_at: string;
39016
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
39017
+ ends_at: string | null;
39018
+ };
39019
+ modified_to: {
39020
+ /** Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
39021
+ starts_at: string;
39022
+ /** Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
39023
+ ends_at: string | null;
39024
+ };
39025
+ } | {
39026
+ created_at: string;
39027
+ modification_code: 'suspension_state';
39028
+ modified_from: {
39029
+ is_suspended: boolean;
39030
+ };
39031
+ modified_to: {
39032
+ is_suspended: boolean;
39033
+ };
39034
+ } | {
39035
+ created_at: string;
39036
+ modification_code: 'acs_access_group_membership';
39037
+ modified_from: {
39038
+ acs_access_group_id: string | null;
39039
+ };
39040
+ modified_to: {
39041
+ acs_access_group_id: string | null;
39042
+ };
39043
+ }> | undefined;
38708
39044
  /** Full name of the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management). */
38709
39045
  full_name?: string | undefined;
38710
39046
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.365.0",
3
+ "version": "1.366.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -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',
@@ -323,6 +324,12 @@ const common_acs_user = z
323
324
  .describe(
324
325
  'Errors associated with the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management).',
325
326
  ),
327
+ pending_modifications: z.array(acs_user_pending_modification).optional()
328
+ .describe(`
329
+ ---
330
+ undocumented: Experimental.
331
+ ---
332
+ `),
326
333
  })
327
334
  .merge(user_fields)
328
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'