@seamapi/types 1.385.0 → 1.386.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.385.0",
3
+ "version": "1.386.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -92,7 +92,7 @@
92
92
  "zod": "^3.24.0"
93
93
  },
94
94
  "devDependencies": {
95
- "@seamapi/blueprint": "^0.39.0",
95
+ "@seamapi/blueprint": "^0.40.0",
96
96
  "@types/node": "^20.8.10",
97
97
  "concurrently": "^8.2.0",
98
98
  "del-cli": "^5.0.0",
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod'
2
+
3
+ export const hex_color_code = z.string().refine((value) => {
4
+ if (value != null) {
5
+ return /^#[\da-fa-z]{3,6}$/i.test(value)
6
+ }
7
+
8
+ return true
9
+ }, 'Must be a hex color')
@@ -0,0 +1,92 @@
1
+ import { z } from 'zod'
2
+
3
+ import { common_event } from './common.js'
4
+
5
+ const access_grant_event = common_event.extend({
6
+ access_grant_id: z.string().uuid().describe('ID of the access grant.'),
7
+ })
8
+
9
+ export const access_grant_created_event = access_grant_event.extend({
10
+ event_type: z.literal('access_grant.created'),
11
+ }).describe(`
12
+ ---
13
+ route_path: /access_grants
14
+ ---
15
+ An access grant was created.
16
+ `)
17
+
18
+ export type AccessGrantCreatedEvent = z.infer<typeof access_grant_created_event>
19
+
20
+ export const access_grant_deleted_event = access_grant_event.extend({
21
+ event_type: z.literal('access_grant.deleted'),
22
+ }).describe(`
23
+ ---
24
+ route_path: /access_grants
25
+ ---
26
+ An access grant was deleted.
27
+ `)
28
+
29
+ export type AccessGrantDeleteddEvent = z.infer<
30
+ typeof access_grant_deleted_event
31
+ >
32
+
33
+ export const access_grant_access_granted_to_all_doors_event =
34
+ access_grant_event.extend({
35
+ event_type: z.literal('access_grant.access_granted_to_all_doors'),
36
+ }).describe(`
37
+ ---
38
+ route_path: /access_grants
39
+ ---
40
+ All access requested for an access grant was successfully granted.
41
+ `)
42
+
43
+ export type AccessGrantAccessGrantedToAllDoorsEvent = z.infer<
44
+ typeof access_grant_access_granted_to_all_doors_event
45
+ >
46
+
47
+ const acs_entrance_id = z
48
+ .string()
49
+ .uuid()
50
+ .describe(
51
+ 'ID of the door, an [ACS entrance](https://docs.seam.co/latest/capability-guides/retrieving-entrance-details).',
52
+ )
53
+
54
+ export const access_grant_access_granted_to_door_event =
55
+ access_grant_event.extend({
56
+ event_type: z.literal('access_grant.access_granted_to_door'),
57
+ acs_entrance_id,
58
+ }).describe(`
59
+ ---
60
+ route_path: /access_grants
61
+ ---
62
+ Access requested as part of an access grant to a particular door was successfully granted.
63
+ `)
64
+
65
+ export type AccessGrantAccessGrantedToDoorEvent = z.infer<
66
+ typeof access_grant_access_granted_to_door_event
67
+ >
68
+
69
+ export const access_grant_access_to_door_lost_event = access_grant_event.extend(
70
+ {
71
+ event_type: z.literal('access_grant.access_to_door_lost'),
72
+ acs_entrance_id,
73
+ },
74
+ ).describe(`
75
+ ---
76
+ route_path: /access_grants
77
+ ---
78
+ Access to a particular door that was requested as part of an access grant was lost.
79
+ `)
80
+
81
+ export type AccessGrantAccessToDoorLostEvent = z.infer<
82
+ typeof access_grant_access_to_door_lost_event
83
+ >
84
+
85
+ export const access_code_events = [
86
+ access_grant_created_event,
87
+ access_grant_deleted_event,
88
+ access_grant_access_granted_to_all_doors_event,
89
+ access_grant_access_granted_to_door_event,
90
+ access_grant_access_to_door_lost_event,
91
+ access_grant_deleted_event,
92
+ ] as const
@@ -0,0 +1,51 @@
1
+ import { z } from 'zod'
2
+
3
+ import { common_event } from './common.js'
4
+
5
+ const access_method_event = common_event.extend({
6
+ access_method_id: z.string().uuid().describe('ID of the access method.'),
7
+ })
8
+
9
+ export const access_method_issued_event = access_method_event.extend({
10
+ event_type: z.literal('access_method.issued'),
11
+ }).describe(`
12
+ ---
13
+ route_path: /access_methods
14
+ ---
15
+ An access method was issued.
16
+ `)
17
+
18
+ export type AccessMethodIssuedEvent = z.infer<typeof access_method_issued_event>
19
+
20
+ export const access_method_card_encoding_required_event =
21
+ access_method_event.extend({
22
+ event_type: z.literal('access_method.card_encoding_required'),
23
+ }).describe(`
24
+ ---
25
+ route_path: /access_methods
26
+ ---
27
+ An access method representing a physical card requires encoding.
28
+ `)
29
+
30
+ export type AccessMethodCardEncodingRequiredEvent = z.infer<
31
+ typeof access_method_card_encoding_required_event
32
+ >
33
+
34
+ export const access_method_revoked_event = access_method_event.extend({
35
+ event_type: z.literal('access_method.revoked'),
36
+ }).describe(`
37
+ ---
38
+ route_path: /access_methods
39
+ ---
40
+ An access method was revoked.
41
+ `)
42
+
43
+ export type AccessMethodRevokedEvent = z.infer<
44
+ typeof access_method_revoked_event
45
+ >
46
+
47
+ export const access_code_events = [
48
+ access_method_issued_event,
49
+ access_method_revoked_event,
50
+ access_method_card_encoding_required_event,
51
+ ] as const
@@ -1,10 +1,19 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { hex_color_code } from '../colors.js'
4
+
3
5
  export const workspace = z.object({
4
6
  workspace_id: z.string().uuid(),
5
7
  name: z.string(),
6
8
  company_name: z.string(),
7
9
  is_sandbox: z.boolean(),
10
+ connect_webview_customization: z.object({
11
+ primary_button_color: hex_color_code.optional(),
12
+ primary_button_text_color: hex_color_code.optional(),
13
+ success_message: z.string().optional(),
14
+ logo_shape: z.enum(['circle', 'square']).optional(),
15
+ inviter_logo_url: z.string().optional(),
16
+ }),
8
17
  is_suspended: z
9
18
  .boolean()
10
19
  .describe('True if a sandbox workspace has not been accessed in 14 days'),
@@ -17563,6 +17563,16 @@ export default {
17563
17563
  type: 'string',
17564
17564
  'x-deprecated': 'use company_name',
17565
17565
  },
17566
+ connect_webview_customization: {
17567
+ properties: {
17568
+ inviter_logo_url: { type: 'string' },
17569
+ logo_shape: { enum: ['circle', 'square'], type: 'string' },
17570
+ primary_button_color: { type: 'string' },
17571
+ primary_button_text_color: { type: 'string' },
17572
+ success_message: { type: 'string' },
17573
+ },
17574
+ type: 'object',
17575
+ },
17566
17576
  is_sandbox: { type: 'boolean' },
17567
17577
  is_suspended: {
17568
17578
  description:
@@ -17577,6 +17587,7 @@ export default {
17577
17587
  'name',
17578
17588
  'company_name',
17579
17589
  'is_sandbox',
17590
+ 'connect_webview_customization',
17580
17591
  'is_suspended',
17581
17592
  'connect_partner_name',
17582
17593
  ],
@@ -26277,11 +26288,11 @@ export default {
26277
26288
  schema: {
26278
26289
  properties: {
26279
26290
  action_attempt: {
26280
- $ref: '#/components/schemas/access_code',
26291
+ $ref: '#/components/schemas/action_attempt',
26281
26292
  },
26282
26293
  ok: { type: 'boolean' },
26283
26294
  },
26284
- required: ['ok'],
26295
+ required: ['action_attempt', 'ok'],
26285
26296
  type: 'object',
26286
26297
  },
26287
26298
  },
@@ -26327,11 +26338,11 @@ export default {
26327
26338
  schema: {
26328
26339
  properties: {
26329
26340
  action_attempt: {
26330
- $ref: '#/components/schemas/access_code',
26341
+ $ref: '#/components/schemas/action_attempt',
26331
26342
  },
26332
26343
  ok: { type: 'boolean' },
26333
26344
  },
26334
- required: ['ok'],
26345
+ required: ['action_attempt', 'ok'],
26335
26346
  type: 'object',
26336
26347
  },
26337
26348
  },
@@ -26351,7 +26362,8 @@ export default {
26351
26362
  'x-action-attempt-type': 'SIMULATE_MANUAL_LOCK_VIA_KEYPAD',
26352
26363
  'x-fern-sdk-group-name': ['locks', 'simulate'],
26353
26364
  'x-fern-sdk-method-name': 'manual_lock_via_keypad',
26354
- 'x-response-key': null,
26365
+ 'x-fern-sdk-return-value': 'action_attempt',
26366
+ 'x-response-key': 'action_attempt',
26355
26367
  'x-undocumented': 'Unreleased.',
26356
26368
  },
26357
26369
  },
@@ -32680,6 +32692,13 @@ export default {
32680
32692
  'application/json': {
32681
32693
  schema: {
32682
32694
  properties: {
32695
+ max_use_count: {
32696
+ default: 1,
32697
+ description:
32698
+ 'The maximum number of times the instant key can be used. Defaults to 1.',
32699
+ format: 'float',
32700
+ type: 'number',
32701
+ },
32683
32702
  user_identity_id: {
32684
32703
  description:
32685
32704
  'ID of the user identity for which you want to generate an instant key.',
@@ -33702,15 +33721,49 @@ export default {
33702
33721
  type: 'string',
33703
33722
  'x-deprecated': 'use company_name',
33704
33723
  },
33724
+ connect_webview_customization: {
33725
+ properties: {
33726
+ logo_shape: {
33727
+ enum: ['circle', 'square'],
33728
+ nullable: true,
33729
+ type: 'string',
33730
+ },
33731
+ primary_button_color: { nullable: true, type: 'string' },
33732
+ primary_button_text_color: {
33733
+ nullable: true,
33734
+ type: 'string',
33735
+ },
33736
+ success_message: { nullable: true, type: 'string' },
33737
+ },
33738
+ type: 'object',
33739
+ },
33705
33740
  is_sandbox: { default: false, type: 'boolean' },
33706
33741
  name: { type: 'string' },
33707
33742
  webview_logo_shape: {
33743
+ deprecated: true,
33708
33744
  enum: ['circle', 'square'],
33709
33745
  type: 'string',
33746
+ 'x-deprecated':
33747
+ 'Use `connect_webview_customization.webview_logo_shape` instead.',
33748
+ },
33749
+ webview_primary_button_color: {
33750
+ deprecated: true,
33751
+ type: 'string',
33752
+ 'x-deprecated':
33753
+ 'Use `connect_webview_customization.webview_primary_button_color` instead.',
33754
+ },
33755
+ webview_primary_button_text_color: {
33756
+ deprecated: true,
33757
+ type: 'string',
33758
+ 'x-deprecated':
33759
+ 'Use `connect_webview_customization.webview_primary_button_text_color` instead.',
33760
+ },
33761
+ webview_success_message: {
33762
+ deprecated: true,
33763
+ type: 'string',
33764
+ 'x-deprecated':
33765
+ 'Use `connect_webview_customization.webview_success_message` instead.',
33710
33766
  },
33711
- webview_primary_button_color: { type: 'string' },
33712
- webview_primary_button_text_color: { type: 'string' },
33713
- webview_success_message: { type: 'string' },
33714
33767
  },
33715
33768
  required: ['name'],
33716
33769
  type: 'object',
@@ -33934,6 +33987,103 @@ export default {
33934
33987
  'x-response-key': 'action_attempt',
33935
33988
  },
33936
33989
  },
33990
+ '/workspaces/update': {
33991
+ patch: {
33992
+ operationId: 'workspacesUpdatePatch',
33993
+ requestBody: {
33994
+ content: {
33995
+ 'application/json': {
33996
+ schema: {
33997
+ properties: {
33998
+ connect_partner_name: { type: 'string' },
33999
+ connect_webview_customization: {
34000
+ properties: {
34001
+ logo_shape: {
34002
+ enum: ['circle', 'square'],
34003
+ nullable: true,
34004
+ type: 'string',
34005
+ },
34006
+ primary_button_color: { nullable: true, type: 'string' },
34007
+ primary_button_text_color: {
34008
+ nullable: true,
34009
+ type: 'string',
34010
+ },
34011
+ success_message: { nullable: true, type: 'string' },
34012
+ },
34013
+ type: 'object',
34014
+ },
34015
+ is_suspended: { type: 'boolean' },
34016
+ name: { type: 'string' },
34017
+ },
34018
+ type: 'object',
34019
+ },
34020
+ },
34021
+ },
34022
+ },
34023
+ responses: {
34024
+ 200: { description: 'OK' },
34025
+ 400: { description: 'Bad Request' },
34026
+ 401: { description: 'Unauthorized' },
34027
+ },
34028
+ security: [
34029
+ { api_key: [] },
34030
+ { console_session_with_workspace: [] },
34031
+ { pat_with_workspace: [] },
34032
+ ],
34033
+ summary: '/workspaces/update',
34034
+ tags: ['/workspaces'],
34035
+ 'x-fern-ignore': true,
34036
+ 'x-response-key': null,
34037
+ },
34038
+ post: {
34039
+ operationId: 'workspacesUpdatePost',
34040
+ requestBody: {
34041
+ content: {
34042
+ 'application/json': {
34043
+ schema: {
34044
+ properties: {
34045
+ connect_partner_name: { type: 'string' },
34046
+ connect_webview_customization: {
34047
+ properties: {
34048
+ logo_shape: {
34049
+ enum: ['circle', 'square'],
34050
+ nullable: true,
34051
+ type: 'string',
34052
+ },
34053
+ primary_button_color: { nullable: true, type: 'string' },
34054
+ primary_button_text_color: {
34055
+ nullable: true,
34056
+ type: 'string',
34057
+ },
34058
+ success_message: { nullable: true, type: 'string' },
34059
+ },
34060
+ type: 'object',
34061
+ },
34062
+ is_suspended: { type: 'boolean' },
34063
+ name: { type: 'string' },
34064
+ },
34065
+ type: 'object',
34066
+ },
34067
+ },
34068
+ },
34069
+ },
34070
+ responses: {
34071
+ 200: { description: 'OK' },
34072
+ 400: { description: 'Bad Request' },
34073
+ 401: { description: 'Unauthorized' },
34074
+ },
34075
+ security: [
34076
+ { api_key: [] },
34077
+ { console_session_with_workspace: [] },
34078
+ { pat_with_workspace: [] },
34079
+ ],
34080
+ summary: '/workspaces/update',
34081
+ tags: ['/workspaces'],
34082
+ 'x-fern-sdk-group-name': ['workspaces'],
34083
+ 'x-fern-sdk-method-name': 'update',
34084
+ 'x-response-key': null,
34085
+ },
34086
+ },
33937
34087
  },
33938
34088
  servers: [{ url: 'https://connect.getseam.com' }],
33939
34089
  tags: [