@seamapi/types 1.912.0 → 1.914.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.
@@ -100,6 +100,74 @@ export const access_code_changed_event = access_code_event.extend({
100
100
 
101
101
  export type AccessCodeChangedEvent = z.infer<typeof access_code_changed_event>
102
102
 
103
+ export const access_code_name_changed_event = access_code_event.extend({
104
+ event_type: z.literal('access_code.name_changed'),
105
+ from: z.object({
106
+ name: z.string().nullable().describe('Previous name of the access code.'),
107
+ }),
108
+ to: z.object({
109
+ name: z.string().nullable().describe('New name of the access code.'),
110
+ }),
111
+ description: z
112
+ .string()
113
+ .describe('Human-readable description of the change and its source.'),
114
+ }).describe(`
115
+ ---
116
+ route_path: /access_codes
117
+ ---
118
+ The name of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device.
119
+ `)
120
+
121
+ export type AccessCodeNameChangedEvent = z.infer<
122
+ typeof access_code_name_changed_event
123
+ >
124
+
125
+ export const access_code_code_changed_event = access_code_event.extend({
126
+ event_type: z.literal('access_code.code_changed'),
127
+ from: z.object({
128
+ code: z.string().nullable().describe('Previous pin code.'),
129
+ }),
130
+ to: z.object({
131
+ code: z.string().nullable().describe('New pin code.'),
132
+ }),
133
+ description: z
134
+ .string()
135
+ .describe('Human-readable description of the change and its source.'),
136
+ }).describe(`
137
+ ---
138
+ route_path: /access_codes
139
+ ---
140
+ The pin code of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device.
141
+ `)
142
+
143
+ export type AccessCodeCodeChangedEvent = z.infer<
144
+ typeof access_code_code_changed_event
145
+ >
146
+
147
+ export const access_code_time_frame_changed_event = access_code_event.extend({
148
+ event_type: z.literal('access_code.time_frame_changed'),
149
+ from: z.object({
150
+ starts_at: z.string().nullable().describe('Previous start time.'),
151
+ ends_at: z.string().nullable().describe('Previous end time.'),
152
+ }),
153
+ to: z.object({
154
+ starts_at: z.string().nullable().describe('New start time.'),
155
+ ends_at: z.string().nullable().describe('New end time.'),
156
+ }),
157
+ description: z
158
+ .string()
159
+ .describe('Human-readable description of the change and its source.'),
160
+ }).describe(`
161
+ ---
162
+ route_path: /access_codes
163
+ ---
164
+ The time frame of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device.
165
+ `)
166
+
167
+ export type AccessCodeTimeFrameChangedEvent = z.infer<
168
+ typeof access_code_time_frame_changed_event
169
+ >
170
+
103
171
  export const access_code_scheduled_on_device_event = access_code_event.extend({
104
172
  event_type: z.literal('access_code.scheduled_on_device'),
105
173
  code,
@@ -317,6 +385,9 @@ export type UnmanagedAccessCodeRemovedEvent = z.infer<
317
385
  export const access_code_events = [
318
386
  access_code_created_event,
319
387
  access_code_changed_event,
388
+ access_code_name_changed_event,
389
+ access_code_code_changed_event,
390
+ access_code_time_frame_changed_event,
320
391
  access_code_scheduled_on_device_event,
321
392
  access_code_set_on_device_event,
322
393
  access_code_removed_from_device_event,
@@ -81,6 +81,13 @@ export const workspace = z.object({
81
81
  .describe(
82
82
  'Indicates whether publishable key authentication is enabled for this workspace.',
83
83
  ),
84
+ organization_id: z
85
+ .string()
86
+ .uuid()
87
+ .nullable()
88
+ .describe(
89
+ 'ID of the organization to which the [workspace](https://docs.seam.co/core-concepts/workspaces) belongs, or `null` if the workspace is not assigned to an organization.',
90
+ ),
84
91
  }).describe(`
85
92
  ---
86
93
  route_path: /workspaces
@@ -17354,6 +17354,334 @@ const openapi: OpenAPISpec = {
17354
17354
  type: 'object',
17355
17355
  'x-route-path': '/access_codes',
17356
17356
  },
17357
+ {
17358
+ description:
17359
+ 'The name of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device.',
17360
+ properties: {
17361
+ access_code_id: {
17362
+ description: 'ID of the affected access code.',
17363
+ format: 'uuid',
17364
+ type: 'string',
17365
+ },
17366
+ connected_account_custom_metadata: {
17367
+ additionalProperties: {
17368
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
17369
+ },
17370
+ description:
17371
+ 'Custom metadata of the connected account, present when connected_account_id is provided.',
17372
+ type: 'object',
17373
+ },
17374
+ connected_account_id: {
17375
+ description:
17376
+ 'ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) associated with the affected access code.',
17377
+ format: 'uuid',
17378
+ type: 'string',
17379
+ },
17380
+ created_at: {
17381
+ description: 'Date and time at which the event was created.',
17382
+ format: 'date-time',
17383
+ type: 'string',
17384
+ },
17385
+ description: {
17386
+ description:
17387
+ 'Human-readable description of the change and its source.',
17388
+ type: 'string',
17389
+ },
17390
+ device_custom_metadata: {
17391
+ additionalProperties: {
17392
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
17393
+ },
17394
+ description:
17395
+ 'Custom metadata of the device, present when device_id is provided.',
17396
+ type: 'object',
17397
+ },
17398
+ device_id: {
17399
+ description:
17400
+ 'ID of the device associated with the affected access code.',
17401
+ format: 'uuid',
17402
+ type: 'string',
17403
+ },
17404
+ event_id: {
17405
+ description: 'ID of the event.',
17406
+ format: 'uuid',
17407
+ type: 'string',
17408
+ },
17409
+ event_type: {
17410
+ enum: ['access_code.name_changed'],
17411
+ type: 'string',
17412
+ },
17413
+ from: {
17414
+ properties: {
17415
+ name: {
17416
+ description: 'Previous name of the access code.',
17417
+ nullable: true,
17418
+ type: 'string',
17419
+ },
17420
+ },
17421
+ required: ['name'],
17422
+ type: 'object',
17423
+ },
17424
+ occurred_at: {
17425
+ description: 'Date and time at which the event occurred.',
17426
+ format: 'date-time',
17427
+ type: 'string',
17428
+ },
17429
+ to: {
17430
+ properties: {
17431
+ name: {
17432
+ description: 'New name of the access code.',
17433
+ nullable: true,
17434
+ type: 'string',
17435
+ },
17436
+ },
17437
+ required: ['name'],
17438
+ type: 'object',
17439
+ },
17440
+ workspace_id: {
17441
+ description:
17442
+ 'ID of the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the event.',
17443
+ format: 'uuid',
17444
+ type: 'string',
17445
+ },
17446
+ },
17447
+ required: [
17448
+ 'event_id',
17449
+ 'workspace_id',
17450
+ 'created_at',
17451
+ 'occurred_at',
17452
+ 'access_code_id',
17453
+ 'device_id',
17454
+ 'connected_account_id',
17455
+ 'event_type',
17456
+ 'from',
17457
+ 'to',
17458
+ 'description',
17459
+ ],
17460
+ type: 'object',
17461
+ 'x-route-path': '/access_codes',
17462
+ },
17463
+ {
17464
+ description:
17465
+ 'The pin code of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device.',
17466
+ properties: {
17467
+ access_code_id: {
17468
+ description: 'ID of the affected access code.',
17469
+ format: 'uuid',
17470
+ type: 'string',
17471
+ },
17472
+ connected_account_custom_metadata: {
17473
+ additionalProperties: {
17474
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
17475
+ },
17476
+ description:
17477
+ 'Custom metadata of the connected account, present when connected_account_id is provided.',
17478
+ type: 'object',
17479
+ },
17480
+ connected_account_id: {
17481
+ description:
17482
+ 'ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) associated with the affected access code.',
17483
+ format: 'uuid',
17484
+ type: 'string',
17485
+ },
17486
+ created_at: {
17487
+ description: 'Date and time at which the event was created.',
17488
+ format: 'date-time',
17489
+ type: 'string',
17490
+ },
17491
+ description: {
17492
+ description:
17493
+ 'Human-readable description of the change and its source.',
17494
+ type: 'string',
17495
+ },
17496
+ device_custom_metadata: {
17497
+ additionalProperties: {
17498
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
17499
+ },
17500
+ description:
17501
+ 'Custom metadata of the device, present when device_id is provided.',
17502
+ type: 'object',
17503
+ },
17504
+ device_id: {
17505
+ description:
17506
+ 'ID of the device associated with the affected access code.',
17507
+ format: 'uuid',
17508
+ type: 'string',
17509
+ },
17510
+ event_id: {
17511
+ description: 'ID of the event.',
17512
+ format: 'uuid',
17513
+ type: 'string',
17514
+ },
17515
+ event_type: {
17516
+ enum: ['access_code.code_changed'],
17517
+ type: 'string',
17518
+ },
17519
+ from: {
17520
+ properties: {
17521
+ code: {
17522
+ description: 'Previous pin code.',
17523
+ nullable: true,
17524
+ type: 'string',
17525
+ },
17526
+ },
17527
+ required: ['code'],
17528
+ type: 'object',
17529
+ },
17530
+ occurred_at: {
17531
+ description: 'Date and time at which the event occurred.',
17532
+ format: 'date-time',
17533
+ type: 'string',
17534
+ },
17535
+ to: {
17536
+ properties: {
17537
+ code: {
17538
+ description: 'New pin code.',
17539
+ nullable: true,
17540
+ type: 'string',
17541
+ },
17542
+ },
17543
+ required: ['code'],
17544
+ type: 'object',
17545
+ },
17546
+ workspace_id: {
17547
+ description:
17548
+ 'ID of the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the event.',
17549
+ format: 'uuid',
17550
+ type: 'string',
17551
+ },
17552
+ },
17553
+ required: [
17554
+ 'event_id',
17555
+ 'workspace_id',
17556
+ 'created_at',
17557
+ 'occurred_at',
17558
+ 'access_code_id',
17559
+ 'device_id',
17560
+ 'connected_account_id',
17561
+ 'event_type',
17562
+ 'from',
17563
+ 'to',
17564
+ 'description',
17565
+ ],
17566
+ type: 'object',
17567
+ 'x-route-path': '/access_codes',
17568
+ },
17569
+ {
17570
+ description:
17571
+ 'The time frame of an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was changed on the device.',
17572
+ properties: {
17573
+ access_code_id: {
17574
+ description: 'ID of the affected access code.',
17575
+ format: 'uuid',
17576
+ type: 'string',
17577
+ },
17578
+ connected_account_custom_metadata: {
17579
+ additionalProperties: {
17580
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
17581
+ },
17582
+ description:
17583
+ 'Custom metadata of the connected account, present when connected_account_id is provided.',
17584
+ type: 'object',
17585
+ },
17586
+ connected_account_id: {
17587
+ description:
17588
+ 'ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) associated with the affected access code.',
17589
+ format: 'uuid',
17590
+ type: 'string',
17591
+ },
17592
+ created_at: {
17593
+ description: 'Date and time at which the event was created.',
17594
+ format: 'date-time',
17595
+ type: 'string',
17596
+ },
17597
+ description: {
17598
+ description:
17599
+ 'Human-readable description of the change and its source.',
17600
+ type: 'string',
17601
+ },
17602
+ device_custom_metadata: {
17603
+ additionalProperties: {
17604
+ oneOf: [{ type: 'string' }, { type: 'boolean' }],
17605
+ },
17606
+ description:
17607
+ 'Custom metadata of the device, present when device_id is provided.',
17608
+ type: 'object',
17609
+ },
17610
+ device_id: {
17611
+ description:
17612
+ 'ID of the device associated with the affected access code.',
17613
+ format: 'uuid',
17614
+ type: 'string',
17615
+ },
17616
+ event_id: {
17617
+ description: 'ID of the event.',
17618
+ format: 'uuid',
17619
+ type: 'string',
17620
+ },
17621
+ event_type: {
17622
+ enum: ['access_code.time_frame_changed'],
17623
+ type: 'string',
17624
+ },
17625
+ from: {
17626
+ properties: {
17627
+ ends_at: {
17628
+ description: 'Previous end time.',
17629
+ nullable: true,
17630
+ type: 'string',
17631
+ },
17632
+ starts_at: {
17633
+ description: 'Previous start time.',
17634
+ nullable: true,
17635
+ type: 'string',
17636
+ },
17637
+ },
17638
+ required: ['starts_at', 'ends_at'],
17639
+ type: 'object',
17640
+ },
17641
+ occurred_at: {
17642
+ description: 'Date and time at which the event occurred.',
17643
+ format: 'date-time',
17644
+ type: 'string',
17645
+ },
17646
+ to: {
17647
+ properties: {
17648
+ ends_at: {
17649
+ description: 'New end time.',
17650
+ nullable: true,
17651
+ type: 'string',
17652
+ },
17653
+ starts_at: {
17654
+ description: 'New start time.',
17655
+ nullable: true,
17656
+ type: 'string',
17657
+ },
17658
+ },
17659
+ required: ['starts_at', 'ends_at'],
17660
+ type: 'object',
17661
+ },
17662
+ workspace_id: {
17663
+ description:
17664
+ 'ID of the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the event.',
17665
+ format: 'uuid',
17666
+ type: 'string',
17667
+ },
17668
+ },
17669
+ required: [
17670
+ 'event_id',
17671
+ 'workspace_id',
17672
+ 'created_at',
17673
+ 'occurred_at',
17674
+ 'access_code_id',
17675
+ 'device_id',
17676
+ 'connected_account_id',
17677
+ 'event_type',
17678
+ 'from',
17679
+ 'to',
17680
+ 'description',
17681
+ ],
17682
+ type: 'object',
17683
+ 'x-route-path': '/access_codes',
17684
+ },
17357
17685
  {
17358
17686
  description:
17359
17687
  'An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was [scheduled natively](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) on a device.',
@@ -33242,6 +33570,13 @@ const openapi: OpenAPISpec = {
33242
33570
  'Name of the [workspace](https://docs.seam.co/core-concepts/workspaces).',
33243
33571
  type: 'string',
33244
33572
  },
33573
+ organization_id: {
33574
+ description:
33575
+ 'ID of the organization to which the [workspace](https://docs.seam.co/core-concepts/workspaces) belongs, or `null` if the workspace is not assigned to an organization.',
33576
+ format: 'uuid',
33577
+ nullable: true,
33578
+ type: 'string',
33579
+ },
33245
33580
  publishable_key: {
33246
33581
  description:
33247
33582
  'Publishable key for the [workspace](https://docs.seam.co/core-concepts/workspaces). This key is used to identify the workspace in client-side applications.',
@@ -33263,6 +33598,7 @@ const openapi: OpenAPISpec = {
33263
33598
  'is_suspended',
33264
33599
  'connect_partner_name',
33265
33600
  'is_publishable_key_auth_enabled',
33601
+ 'organization_id',
33266
33602
  ],
33267
33603
  type: 'object',
33268
33604
  'x-route-path': '/workspaces',
@@ -59835,6 +60171,9 @@ const openapi: OpenAPISpec = {
59835
60171
  enum: [
59836
60172
  'access_code.created',
59837
60173
  'access_code.changed',
60174
+ 'access_code.name_changed',
60175
+ 'access_code.code_changed',
60176
+ 'access_code.time_frame_changed',
59838
60177
  'access_code.scheduled_on_device',
59839
60178
  'access_code.set_on_device',
59840
60179
  'access_code.removed_from_device',
@@ -59949,6 +60288,9 @@ const openapi: OpenAPISpec = {
59949
60288
  enum: [
59950
60289
  'access_code.created',
59951
60290
  'access_code.changed',
60291
+ 'access_code.name_changed',
60292
+ 'access_code.code_changed',
60293
+ 'access_code.time_frame_changed',
59952
60294
  'access_code.scheduled_on_device',
59953
60295
  'access_code.set_on_device',
59954
60296
  'access_code.removed_from_device',
@@ -60396,6 +60738,9 @@ const openapi: OpenAPISpec = {
60396
60738
  enum: [
60397
60739
  'access_code.created',
60398
60740
  'access_code.changed',
60741
+ 'access_code.name_changed',
60742
+ 'access_code.code_changed',
60743
+ 'access_code.time_frame_changed',
60399
60744
  'access_code.scheduled_on_device',
60400
60745
  'access_code.set_on_device',
60401
60746
  'access_code.removed_from_device',
@@ -60506,6 +60851,9 @@ const openapi: OpenAPISpec = {
60506
60851
  enum: [
60507
60852
  'access_code.created',
60508
60853
  'access_code.changed',
60854
+ 'access_code.name_changed',
60855
+ 'access_code.code_changed',
60856
+ 'access_code.time_frame_changed',
60509
60857
  'access_code.scheduled_on_device',
60510
60858
  'access_code.set_on_device',
60511
60859
  'access_code.removed_from_device',
@@ -70774,6 +71122,9 @@ const openapi: OpenAPISpec = {
70774
71122
  enum: [
70775
71123
  'access_code.created',
70776
71124
  'access_code.changed',
71125
+ 'access_code.name_changed',
71126
+ 'access_code.code_changed',
71127
+ 'access_code.time_frame_changed',
70777
71128
  'access_code.scheduled_on_device',
70778
71129
  'access_code.set_on_device',
70779
71130
  'access_code.removed_from_device',
@@ -70889,6 +71240,9 @@ const openapi: OpenAPISpec = {
70889
71240
  enum: [
70890
71241
  'access_code.created',
70891
71242
  'access_code.changed',
71243
+ 'access_code.name_changed',
71244
+ 'access_code.code_changed',
71245
+ 'access_code.time_frame_changed',
70892
71246
  'access_code.scheduled_on_device',
70893
71247
  'access_code.set_on_device',
70894
71248
  'access_code.removed_from_device',
@@ -71067,6 +71421,9 @@ const openapi: OpenAPISpec = {
71067
71421
  enum: [
71068
71422
  'access_code.created',
71069
71423
  'access_code.changed',
71424
+ 'access_code.name_changed',
71425
+ 'access_code.code_changed',
71426
+ 'access_code.time_frame_changed',
71070
71427
  'access_code.scheduled_on_device',
71071
71428
  'access_code.set_on_device',
71072
71429
  'access_code.removed_from_device',
@@ -71177,6 +71534,9 @@ const openapi: OpenAPISpec = {
71177
71534
  enum: [
71178
71535
  'access_code.created',
71179
71536
  'access_code.changed',
71537
+ 'access_code.name_changed',
71538
+ 'access_code.code_changed',
71539
+ 'access_code.time_frame_changed',
71180
71540
  'access_code.scheduled_on_device',
71181
71541
  'access_code.set_on_device',
71182
71542
  'access_code.removed_from_device',
@@ -87516,6 +87876,12 @@ const openapi: OpenAPISpec = {
87516
87876
  description: 'Name of the workspace.',
87517
87877
  type: 'string',
87518
87878
  },
87879
+ organization_id: {
87880
+ description:
87881
+ 'ID of the organization to assign the workspace to. The authenticated user must be the owner of the workspace and an admin of the target organization.',
87882
+ format: 'uuid',
87883
+ type: 'string',
87884
+ },
87519
87885
  },
87520
87886
  type: 'object',
87521
87887
  },
@@ -87598,6 +87964,12 @@ const openapi: OpenAPISpec = {
87598
87964
  description: 'Name of the workspace.',
87599
87965
  type: 'string',
87600
87966
  },
87967
+ organization_id: {
87968
+ description:
87969
+ 'ID of the organization to assign the workspace to. The authenticated user must be the owner of the workspace and an admin of the target organization.',
87970
+ format: 'uuid',
87971
+ type: 'string',
87972
+ },
87601
87973
  },
87602
87974
  type: 'object',
87603
87975
  },