@seamapi/types 1.453.0 → 1.455.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.453.0",
3
+ "version": "1.455.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod'
2
+
3
+ import { acs_entrance } from '../acs/index.js'
4
+ import { device } from '../devices/index.js'
5
+ import { space } from '../spaces/index.js'
6
+
7
+ export const access_grants_batch = z.object({
8
+ batch_type: z.literal('access_grants'),
9
+ spaces: space.array().optional(),
10
+ devices: device.array().optional(),
11
+ acs_entrances: acs_entrance.array().optional(),
12
+ })
13
+
14
+ export type AccessGrantsBundle = z.infer<typeof access_grants_batch>
@@ -1,8 +1,9 @@
1
- import type { z } from 'zod'
1
+ import { z } from 'zod'
2
2
 
3
+ import { access_grants_batch } from './access_grants.js'
3
4
  import { spaces_batch } from './spaces.js'
4
5
 
5
- export const batch = spaces_batch.describe(`
6
+ export const batch = z.union([spaces_batch, access_grants_batch]).describe(`
6
7
  ---
7
8
  route_path: /
8
9
  ---
@@ -1,2 +1,3 @@
1
+ export * from './access_grants.js'
1
2
  export * from './batch.js'
2
3
  export * from './spaces.js'
@@ -27959,6 +27959,255 @@ export default {
27959
27959
  'x-title': 'Get an Access Grant',
27960
27960
  },
27961
27961
  },
27962
+ '/access_grants/get_related': {
27963
+ get: {
27964
+ description:
27965
+ 'Gets all related resources for one or more Access Grants.',
27966
+ operationId: 'accessGrantsGetRelatedGet',
27967
+ parameters: [
27968
+ {
27969
+ in: 'query',
27970
+ name: 'access_grant_ids',
27971
+ required: true,
27972
+ schema: {
27973
+ description:
27974
+ 'IDs of the access grants that you want to get along with their related resources.',
27975
+ items: { format: 'uuid', type: 'string' },
27976
+ type: 'array',
27977
+ },
27978
+ },
27979
+ {
27980
+ in: 'query',
27981
+ name: 'include',
27982
+ required: false,
27983
+ schema: {
27984
+ items: {
27985
+ enum: ['spaces', 'devices', 'acs_entrances'],
27986
+ type: 'string',
27987
+ },
27988
+ type: 'array',
27989
+ },
27990
+ },
27991
+ {
27992
+ in: 'query',
27993
+ name: 'exclude',
27994
+ required: false,
27995
+ schema: {
27996
+ items: {
27997
+ enum: ['spaces', 'devices', 'acs_entrances'],
27998
+ type: 'string',
27999
+ },
28000
+ type: 'array',
28001
+ },
28002
+ },
28003
+ ],
28004
+ responses: {
28005
+ 200: {
28006
+ content: {
28007
+ 'application/json': {
28008
+ schema: {
28009
+ properties: {
28010
+ batch: {
28011
+ description: 'Represents a resource batch.',
28012
+ oneOf: [
28013
+ {
28014
+ description: 'ID of the affected access system user.',
28015
+ properties: {
28016
+ acs_entrances: {
28017
+ items: {
28018
+ $ref: '#/components/schemas/acs_entrance',
28019
+ },
28020
+ type: 'array',
28021
+ },
28022
+ batch_type: { enum: ['spaces'], type: 'string' },
28023
+ devices: {
28024
+ items: { $ref: '#/components/schemas/device' },
28025
+ type: 'array',
28026
+ },
28027
+ spaces: {
28028
+ items: { $ref: '#/components/schemas/space' },
28029
+ type: 'array',
28030
+ },
28031
+ },
28032
+ required: ['batch_type'],
28033
+ type: 'object',
28034
+ },
28035
+ {
28036
+ properties: {
28037
+ acs_entrances: {
28038
+ items: {
28039
+ $ref: '#/components/schemas/acs_entrance',
28040
+ },
28041
+ type: 'array',
28042
+ },
28043
+ batch_type: {
28044
+ enum: ['access_grants'],
28045
+ type: 'string',
28046
+ },
28047
+ devices: {
28048
+ items: { $ref: '#/components/schemas/device' },
28049
+ type: 'array',
28050
+ },
28051
+ spaces: {
28052
+ items: { $ref: '#/components/schemas/space' },
28053
+ type: 'array',
28054
+ },
28055
+ },
28056
+ required: ['batch_type'],
28057
+ type: 'object',
28058
+ },
28059
+ ],
28060
+ 'x-route-path': '/',
28061
+ },
28062
+ ok: { type: 'boolean' },
28063
+ },
28064
+ required: ['batch', 'ok'],
28065
+ type: 'object',
28066
+ },
28067
+ },
28068
+ },
28069
+ description: 'OK',
28070
+ },
28071
+ 400: { description: 'Bad Request' },
28072
+ 401: { description: 'Unauthorized' },
28073
+ },
28074
+ security: [
28075
+ { pat_with_workspace: [] },
28076
+ { console_session_with_workspace: [] },
28077
+ { api_key: [] },
28078
+ ],
28079
+ summary: '/access_grants/get_related',
28080
+ tags: [],
28081
+ 'x-batch-type': 'access_grants',
28082
+ 'x-draft': 'Early access.',
28083
+ 'x-fern-sdk-group-name': ['access_grants'],
28084
+ 'x-fern-sdk-method-name': 'get_related',
28085
+ 'x-fern-sdk-return-value': 'batch',
28086
+ 'x-response-key': 'batch',
28087
+ 'x-title': 'Get related Access Grant resources',
28088
+ },
28089
+ post: {
28090
+ description:
28091
+ 'Gets all related resources for one or more Access Grants.',
28092
+ operationId: 'accessGrantsGetRelatedPost',
28093
+ requestBody: {
28094
+ content: {
28095
+ 'application/json': {
28096
+ schema: {
28097
+ properties: {
28098
+ access_grant_ids: {
28099
+ description:
28100
+ 'IDs of the access grants that you want to get along with their related resources.',
28101
+ items: { format: 'uuid', type: 'string' },
28102
+ type: 'array',
28103
+ },
28104
+ exclude: {
28105
+ items: {
28106
+ enum: ['spaces', 'devices', 'acs_entrances'],
28107
+ type: 'string',
28108
+ },
28109
+ type: 'array',
28110
+ },
28111
+ include: {
28112
+ items: {
28113
+ enum: ['spaces', 'devices', 'acs_entrances'],
28114
+ type: 'string',
28115
+ },
28116
+ type: 'array',
28117
+ },
28118
+ },
28119
+ required: ['access_grant_ids'],
28120
+ type: 'object',
28121
+ },
28122
+ },
28123
+ },
28124
+ },
28125
+ responses: {
28126
+ 200: {
28127
+ content: {
28128
+ 'application/json': {
28129
+ schema: {
28130
+ properties: {
28131
+ batch: {
28132
+ description: 'Represents a resource batch.',
28133
+ oneOf: [
28134
+ {
28135
+ description: 'ID of the affected access system user.',
28136
+ properties: {
28137
+ acs_entrances: {
28138
+ items: {
28139
+ $ref: '#/components/schemas/acs_entrance',
28140
+ },
28141
+ type: 'array',
28142
+ },
28143
+ batch_type: { enum: ['spaces'], type: 'string' },
28144
+ devices: {
28145
+ items: { $ref: '#/components/schemas/device' },
28146
+ type: 'array',
28147
+ },
28148
+ spaces: {
28149
+ items: { $ref: '#/components/schemas/space' },
28150
+ type: 'array',
28151
+ },
28152
+ },
28153
+ required: ['batch_type'],
28154
+ type: 'object',
28155
+ },
28156
+ {
28157
+ properties: {
28158
+ acs_entrances: {
28159
+ items: {
28160
+ $ref: '#/components/schemas/acs_entrance',
28161
+ },
28162
+ type: 'array',
28163
+ },
28164
+ batch_type: {
28165
+ enum: ['access_grants'],
28166
+ type: 'string',
28167
+ },
28168
+ devices: {
28169
+ items: { $ref: '#/components/schemas/device' },
28170
+ type: 'array',
28171
+ },
28172
+ spaces: {
28173
+ items: { $ref: '#/components/schemas/space' },
28174
+ type: 'array',
28175
+ },
28176
+ },
28177
+ required: ['batch_type'],
28178
+ type: 'object',
28179
+ },
28180
+ ],
28181
+ 'x-route-path': '/',
28182
+ },
28183
+ ok: { type: 'boolean' },
28184
+ },
28185
+ required: ['batch', 'ok'],
28186
+ type: 'object',
28187
+ },
28188
+ },
28189
+ },
28190
+ description: 'OK',
28191
+ },
28192
+ 400: { description: 'Bad Request' },
28193
+ 401: { description: 'Unauthorized' },
28194
+ },
28195
+ security: [
28196
+ { pat_with_workspace: [] },
28197
+ { console_session_with_workspace: [] },
28198
+ { api_key: [] },
28199
+ ],
28200
+ summary: '/access_grants/get_related',
28201
+ tags: [],
28202
+ 'x-batch-type': 'access_grants',
28203
+ 'x-draft': 'Early access.',
28204
+ 'x-fern-sdk-group-name': ['access_grants'],
28205
+ 'x-fern-sdk-method-name': 'get_related',
28206
+ 'x-fern-sdk-return-value': 'batch',
28207
+ 'x-response-key': 'batch',
28208
+ 'x-title': 'Get related Access Grant resources',
28209
+ },
28210
+ },
27962
28211
  '/access_grants/list': {
27963
28212
  get: {
27964
28213
  description: 'Gets an Access Grant.',
@@ -47451,23 +47700,54 @@ export default {
47451
47700
  properties: {
47452
47701
  batch: {
47453
47702
  description: 'Represents a resource batch.',
47454
- properties: {
47455
- acs_entrances: {
47456
- items: { $ref: '#/components/schemas/acs_entrance' },
47457
- type: 'array',
47458
- },
47459
- batch_type: { enum: ['spaces'], type: 'string' },
47460
- devices: {
47461
- items: { $ref: '#/components/schemas/device' },
47462
- type: 'array',
47703
+ oneOf: [
47704
+ {
47705
+ description: 'ID of the affected access system user.',
47706
+ properties: {
47707
+ acs_entrances: {
47708
+ items: {
47709
+ $ref: '#/components/schemas/acs_entrance',
47710
+ },
47711
+ type: 'array',
47712
+ },
47713
+ batch_type: { enum: ['spaces'], type: 'string' },
47714
+ devices: {
47715
+ items: { $ref: '#/components/schemas/device' },
47716
+ type: 'array',
47717
+ },
47718
+ spaces: {
47719
+ items: { $ref: '#/components/schemas/space' },
47720
+ type: 'array',
47721
+ },
47722
+ },
47723
+ required: ['batch_type'],
47724
+ type: 'object',
47463
47725
  },
47464
- spaces: {
47465
- items: { $ref: '#/components/schemas/space' },
47466
- type: 'array',
47726
+ {
47727
+ properties: {
47728
+ acs_entrances: {
47729
+ items: {
47730
+ $ref: '#/components/schemas/acs_entrance',
47731
+ },
47732
+ type: 'array',
47733
+ },
47734
+ batch_type: {
47735
+ enum: ['access_grants'],
47736
+ type: 'string',
47737
+ },
47738
+ devices: {
47739
+ items: { $ref: '#/components/schemas/device' },
47740
+ type: 'array',
47741
+ },
47742
+ spaces: {
47743
+ items: { $ref: '#/components/schemas/space' },
47744
+ type: 'array',
47745
+ },
47746
+ },
47747
+ required: ['batch_type'],
47748
+ type: 'object',
47467
47749
  },
47468
- },
47469
- required: ['batch_type'],
47470
- type: 'object',
47750
+ ],
47471
47751
  'x-route-path': '/',
47472
47752
  },
47473
47753
  ok: { type: 'boolean' },
@@ -47540,23 +47820,54 @@ export default {
47540
47820
  properties: {
47541
47821
  batch: {
47542
47822
  description: 'Represents a resource batch.',
47543
- properties: {
47544
- acs_entrances: {
47545
- items: { $ref: '#/components/schemas/acs_entrance' },
47546
- type: 'array',
47547
- },
47548
- batch_type: { enum: ['spaces'], type: 'string' },
47549
- devices: {
47550
- items: { $ref: '#/components/schemas/device' },
47551
- type: 'array',
47823
+ oneOf: [
47824
+ {
47825
+ description: 'ID of the affected access system user.',
47826
+ properties: {
47827
+ acs_entrances: {
47828
+ items: {
47829
+ $ref: '#/components/schemas/acs_entrance',
47830
+ },
47831
+ type: 'array',
47832
+ },
47833
+ batch_type: { enum: ['spaces'], type: 'string' },
47834
+ devices: {
47835
+ items: { $ref: '#/components/schemas/device' },
47836
+ type: 'array',
47837
+ },
47838
+ spaces: {
47839
+ items: { $ref: '#/components/schemas/space' },
47840
+ type: 'array',
47841
+ },
47842
+ },
47843
+ required: ['batch_type'],
47844
+ type: 'object',
47552
47845
  },
47553
- spaces: {
47554
- items: { $ref: '#/components/schemas/space' },
47555
- type: 'array',
47846
+ {
47847
+ properties: {
47848
+ acs_entrances: {
47849
+ items: {
47850
+ $ref: '#/components/schemas/acs_entrance',
47851
+ },
47852
+ type: 'array',
47853
+ },
47854
+ batch_type: {
47855
+ enum: ['access_grants'],
47856
+ type: 'string',
47857
+ },
47858
+ devices: {
47859
+ items: { $ref: '#/components/schemas/device' },
47860
+ type: 'array',
47861
+ },
47862
+ spaces: {
47863
+ items: { $ref: '#/components/schemas/space' },
47864
+ type: 'array',
47865
+ },
47866
+ },
47867
+ required: ['batch_type'],
47868
+ type: 'object',
47556
47869
  },
47557
- },
47558
- required: ['batch_type'],
47559
- type: 'object',
47870
+ ],
47560
47871
  'x-route-path': '/',
47561
47872
  },
47562
47873
  ok: { type: 'boolean' },
@@ -50594,6 +50905,19 @@ export default {
50594
50905
  required: ['hvac_mode_setting', 'device_id'],
50595
50906
  type: 'object',
50596
50907
  },
50908
+ {
50909
+ properties: {
50910
+ device_id: {
50911
+ description:
50912
+ 'ID of the thermostat device for which you want to set the HVAC mode.',
50913
+ format: 'uuid',
50914
+ type: 'string',
50915
+ },
50916
+ hvac_mode_setting: { enum: ['eco'], type: 'string' },
50917
+ },
50918
+ required: ['hvac_mode_setting', 'device_id'],
50919
+ type: 'object',
50920
+ },
50597
50921
  ],
50598
50922
  },
50599
50923
  },