@seamapi/types 1.901.0 → 1.903.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 (26) hide show
  1. package/dist/connect.cjs +15 -6
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +7 -7
  4. package/dist/index.cjs +15 -6
  5. package/dist/index.cjs.map +1 -1
  6. package/lib/seam/connect/models/acs/acs-users/acs-user.d.ts +6 -6
  7. package/lib/seam/connect/models/acs/acs-users/acs-user.js +2 -2
  8. package/lib/seam/connect/models/acs/acs-users/acs-user.js.map +1 -1
  9. package/lib/seam/connect/models/acs/acs-users/pending-mutations.d.ts +6 -6
  10. package/lib/seam/connect/models/acs/acs-users/pending-mutations.js +4 -4
  11. package/lib/seam/connect/models/acs/acs-users/pending-mutations.js.map +1 -1
  12. package/lib/seam/connect/models/phone-number.d.ts +1 -0
  13. package/lib/seam/connect/models/phone-number.js +11 -0
  14. package/lib/seam/connect/models/phone-number.js.map +1 -1
  15. package/lib/seam/connect/models/phones/phone-session.d.ts +1 -1
  16. package/lib/seam/connect/models/user-identities/user-identity.d.ts +2 -2
  17. package/lib/seam/connect/models/user-identities/user-identity.js +2 -2
  18. package/lib/seam/connect/models/user-identities/user-identity.js.map +1 -1
  19. package/lib/seam/connect/openapi.js +8 -0
  20. package/lib/seam/connect/openapi.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/lib/seam/connect/models/acs/acs-users/acs-user.ts +2 -2
  23. package/src/lib/seam/connect/models/acs/acs-users/pending-mutations.ts +4 -4
  24. package/src/lib/seam/connect/models/phone-number.ts +12 -0
  25. package/src/lib/seam/connect/models/user-identities/user-identity.ts +2 -2
  26. package/src/lib/seam/connect/openapi.ts +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.901.0",
3
+ "version": "1.903.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 { phone_number } from '../../phone-number.js'
3
+ import { loose_phone_number } from '../../phone-number.js'
4
4
  import { schedule } from '../../schedule.js'
5
5
  import { acs_user_salto_space_metadata } from '../metadata/salto-space.js'
6
6
  import { acs_user_pending_mutations } from './pending-mutations.js'
@@ -200,7 +200,7 @@ const user_fields = z.object({
200
200
  .describe(
201
201
  'Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).',
202
202
  ),
203
- phone_number: phone_number
203
+ phone_number: loose_phone_number
204
204
  .optional()
205
205
  .describe(
206
206
  'Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`).',
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
- import { phone_number } from '../../phone-number.js'
3
+ import { loose_phone_number } from '../../phone-number.js'
4
4
 
5
5
  const common_pending_mutation = z.object({
6
6
  created_at: z
@@ -62,7 +62,7 @@ const acs_user_info = z.object({
62
62
  .string()
63
63
  .nullable()
64
64
  .describe('Full name of the access system user.'),
65
- phone_number: phone_number
65
+ phone_number: loose_phone_number
66
66
  .optional()
67
67
  .nullable()
68
68
  .describe('Phone number of the access system user.'),
@@ -276,10 +276,10 @@ const _acs_user_pending_mutations_map = z.object({
276
276
  .extend({
277
277
  mutation_code: z.literal('updating_user_information'),
278
278
  from: z.object({
279
- phone_number: phone_number.nullable(),
279
+ phone_number: loose_phone_number.nullable(),
280
280
  }),
281
281
  to: z.object({
282
- phone_number: phone_number.nullable(),
282
+ phone_number: loose_phone_number.nullable(),
283
283
  }),
284
284
  })
285
285
  .optional()
@@ -12,3 +12,15 @@ export const phone_number = z.coerce
12
12
  message: 'Phone number must be in E.164 format: +14155552671',
13
13
  },
14
14
  )
15
+
16
+ // Use this for phone numbers that originate from provider/external-system sync
17
+ // — user identities, access system users, and their pending mutations — and,
18
+ // because the create/update endpoints for those resources pick `phone_number`
19
+ // from these same schemas, for that API input too. Synced data legitimately
20
+ // contains non-E.164 values (partial/last-four digits, spaces, or a missing
21
+ // `+`), so validating them strictly on the *output* path makes the public
22
+ // mapper throw a ZodError, which 500s the entire list endpoint for any
23
+ // workspace holding one such row; and the create/update endpoints must be able
24
+ // to round-trip those same values. Use the strict `phone_number` schema above
25
+ // only where you specifically want to reject non-E.164 input.
26
+ export const loose_phone_number = z.string()
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
- import { phone_number } from '../phone-number.js'
3
+ import { loose_phone_number } from '../phone-number.js'
4
4
 
5
5
  const common_user_identity_error = z.object({
6
6
  created_at: z
@@ -114,7 +114,7 @@ export const user_identity = z.object({
114
114
  .email()
115
115
  .nullable()
116
116
  .describe('Unique email address for the user identity.'),
117
- phone_number: phone_number
117
+ phone_number: loose_phone_number
118
118
  .nullable()
119
119
  .describe(
120
120
  'Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100).',
@@ -36042,6 +36042,7 @@ const openapi: OpenAPISpec = {
36042
36042
  },
36043
36043
  security: [
36044
36044
  { client_session: [] },
36045
+ { client_session_with_customer: [] },
36045
36046
  { pat_with_workspace: [] },
36046
36047
  { console_session_with_workspace: [] },
36047
36048
  { api_key: [] },
@@ -36114,6 +36115,7 @@ const openapi: OpenAPISpec = {
36114
36115
  },
36115
36116
  security: [
36116
36117
  { client_session: [] },
36118
+ { client_session_with_customer: [] },
36117
36119
  { pat_with_workspace: [] },
36118
36120
  { console_session_with_workspace: [] },
36119
36121
  { api_key: [] },
@@ -36178,6 +36180,7 @@ const openapi: OpenAPISpec = {
36178
36180
  },
36179
36181
  security: [
36180
36182
  { client_session: [] },
36183
+ { client_session_with_customer: [] },
36181
36184
  { pat_with_workspace: [] },
36182
36185
  { console_session_with_workspace: [] },
36183
36186
  { api_key: [] },
@@ -36240,6 +36243,7 @@ const openapi: OpenAPISpec = {
36240
36243
  },
36241
36244
  security: [
36242
36245
  { client_session: [] },
36246
+ { client_session_with_customer: [] },
36243
36247
  { pat_with_workspace: [] },
36244
36248
  { console_session_with_workspace: [] },
36245
36249
  { api_key: [] },
@@ -36312,6 +36316,7 @@ const openapi: OpenAPISpec = {
36312
36316
  },
36313
36317
  security: [
36314
36318
  { client_session: [] },
36319
+ { client_session_with_customer: [] },
36315
36320
  { pat_with_workspace: [] },
36316
36321
  { console_session_with_workspace: [] },
36317
36322
  { api_key: [] },
@@ -36379,6 +36384,7 @@ const openapi: OpenAPISpec = {
36379
36384
  },
36380
36385
  security: [
36381
36386
  { client_session: [] },
36387
+ { client_session_with_customer: [] },
36382
36388
  { pat_with_workspace: [] },
36383
36389
  { console_session_with_workspace: [] },
36384
36390
  { api_key: [] },
@@ -36638,6 +36644,7 @@ const openapi: OpenAPISpec = {
36638
36644
  },
36639
36645
  security: [
36640
36646
  { client_session: [] },
36647
+ { client_session_with_customer: [] },
36641
36648
  { pat_with_workspace: [] },
36642
36649
  { console_session_with_workspace: [] },
36643
36650
  { api_key: [] },
@@ -36705,6 +36712,7 @@ const openapi: OpenAPISpec = {
36705
36712
  },
36706
36713
  security: [
36707
36714
  { client_session: [] },
36715
+ { client_session_with_customer: [] },
36708
36716
  { pat_with_workspace: [] },
36709
36717
  { console_session_with_workspace: [] },
36710
36718
  { api_key: [] },