@seamapi/types 1.438.0 → 1.439.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 (38) hide show
  1. package/dist/connect.cjs +216 -1
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +7321 -141
  4. package/lib/seam/connect/internal/schemas.d.ts +1 -1
  5. package/lib/seam/connect/internal/schemas.js +1 -1
  6. package/lib/seam/connect/internal/schemas.js.map +1 -1
  7. package/lib/seam/connect/model-types.d.ts +1 -1
  8. package/lib/seam/connect/models/batches/batch.d.ts +5669 -0
  9. package/lib/seam/connect/models/batches/batch.js +8 -0
  10. package/lib/seam/connect/models/batches/batch.js.map +1 -0
  11. package/lib/seam/connect/models/batches/index.d.ts +2 -0
  12. package/lib/seam/connect/models/batches/index.js +3 -0
  13. package/lib/seam/connect/models/batches/index.js.map +1 -0
  14. package/lib/seam/connect/models/batches/spaces.d.ts +5669 -0
  15. package/lib/seam/connect/models/batches/spaces.js +13 -0
  16. package/lib/seam/connect/models/batches/spaces.js.map +1 -0
  17. package/lib/seam/connect/models/events/seam-event.js +1 -1
  18. package/lib/seam/connect/models/index.d.ts +1 -0
  19. package/lib/seam/connect/models/index.js +1 -0
  20. package/lib/seam/connect/models/index.js.map +1 -1
  21. package/lib/seam/connect/openapi.d.ts +223 -0
  22. package/lib/seam/connect/openapi.js +183 -0
  23. package/lib/seam/connect/openapi.js.map +1 -1
  24. package/lib/seam/connect/route-types.d.ts +1287 -0
  25. package/lib/seam/connect/schemas.d.ts +1 -1
  26. package/lib/seam/connect/schemas.js +1 -1
  27. package/lib/seam/connect/schemas.js.map +1 -1
  28. package/package.json +1 -1
  29. package/src/lib/seam/connect/internal/schemas.ts +1 -0
  30. package/src/lib/seam/connect/model-types.ts +1 -0
  31. package/src/lib/seam/connect/models/batches/batch.ts +12 -0
  32. package/src/lib/seam/connect/models/batches/index.ts +2 -0
  33. package/src/lib/seam/connect/models/batches/spaces.ts +16 -0
  34. package/src/lib/seam/connect/models/events/seam-event.ts +1 -1
  35. package/src/lib/seam/connect/models/index.ts +1 -0
  36. package/src/lib/seam/connect/openapi.ts +185 -0
  37. package/src/lib/seam/connect/route-types.ts +1632 -0
  38. package/src/lib/seam/connect/schemas.ts +1 -0
@@ -1 +1 @@
1
- export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, bridge, bridge_client_session, building_block_type, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, magic_link, noise_threshold, pagination, seam_event, thermostat_daily_program, thermostat_schedule, thermostat_weekly_program, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
1
+ export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, batch, bridge, bridge_client_session, building_block_type, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, magic_link, noise_threshold, pagination, seam_event, thermostat_daily_program, thermostat_schedule, thermostat_weekly_program, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
@@ -1,2 +1,2 @@
1
- export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, bridge, bridge_client_session, building_block_type, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, magic_link, noise_threshold, pagination, seam_event, thermostat_daily_program, thermostat_schedule, thermostat_weekly_program, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
1
+ export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, batch, bridge, bridge_client_session, building_block_type, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, magic_link, noise_threshold, pagination, seam_event, thermostat_daily_program, thermostat_schedule, thermostat_weekly_program, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
2
2
  //# sourceMappingURL=schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,cAAc,EACd,MAAM,EACN,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,eAAe,EACf,WAAW,EACX,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,SAAS,GACV,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,cAAc,EACd,KAAK,EACL,MAAM,EACN,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,eAAe,EACf,WAAW,EACX,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,SAAS,GACV,MAAM,mBAAmB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.438.0",
3
+ "version": "1.439.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -72,6 +72,7 @@ export {
72
72
  room_resource,
73
73
  space,
74
74
  neutral_resource as space_resource,
75
+ spaces_batch,
75
76
  tenant_resource,
76
77
  thermostat_capability_properties,
77
78
  thermostat_device_type,
@@ -13,6 +13,7 @@ export type {
13
13
  ActionAttempt,
14
14
  Bridge,
15
15
  BuildingBlockType,
16
+ Bundle,
16
17
  ClientSession,
17
18
  ConnectedAccount,
18
19
  ConnectedAccountError,
@@ -0,0 +1,12 @@
1
+ import type { z } from 'zod'
2
+
3
+ import { spaces_batch } from './spaces.js'
4
+
5
+ export const batch = spaces_batch.describe(`
6
+ ---
7
+ route_path: /
8
+ ---
9
+ Represents a resource batch.
10
+ `)
11
+
12
+ export type Bundle = z.infer<typeof batch>
@@ -0,0 +1,2 @@
1
+ export * from './batch.js'
2
+ export * from './spaces.js'
@@ -0,0 +1,16 @@
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 spaces_batch = z
8
+ .object({
9
+ batch_type: z.literal('spaces'),
10
+ spaces: space.array().optional(),
11
+ devices: device.array().optional(),
12
+ acs_entrances: acs_entrance.array().optional(),
13
+ })
14
+ .describe('ID of the affected access system user.')
15
+
16
+ export type SpacesBundle = z.infer<typeof spaces_batch>
@@ -29,7 +29,7 @@ export const seam_event = z.discriminatedUnion('event_type', [
29
29
  route_path: /events
30
30
  ---
31
31
  Represents an event. Events let you know when something interesting happens in your workspace. For example, when a lock is unlocked, Seam creates a \`lock.unlocked\` event. When a device's battery level is low, Seam creates a \`device.battery_low\` event.
32
-
32
+
33
33
  As with other API resources, you can retrieve an individual event or a list of events. Seam also provides a separate [webhook](https://docs.seam.co/latest/developer-tools/webhooks) system for sending the event objects directly to an endpoint on your sever. Manage webhooks through [Seam Console](https://console.seam.co). You can also use the webhooks sandbox in Seam Console to see the different payloads for each event and test them against your own endpoints.
34
34
  `)
35
35
 
@@ -2,6 +2,7 @@ export * from './access-codes/index.js'
2
2
  export * from './access-grants/index.js'
3
3
  export * from './acs/index.js'
4
4
  export * from './action-attempts/index.js'
5
+ export * from './batches/index.js'
5
6
  export * from './bridges/index.js'
6
7
  export * from './bridges/index.js'
7
8
  export * from './client-sessions/index.js'
@@ -47116,6 +47116,191 @@ export default {
47116
47116
  'x-title': 'Get a Space',
47117
47117
  },
47118
47118
  },
47119
+ '/spaces/get_related': {
47120
+ get: {
47121
+ description: 'Gets all related resources for one or more Spaces.',
47122
+ operationId: 'spacesGetRelatedGet',
47123
+ parameters: [
47124
+ {
47125
+ in: 'query',
47126
+ name: 'space_ids',
47127
+ required: true,
47128
+ schema: {
47129
+ description:
47130
+ 'IDs of the spaces that you want to get along with their related resources.',
47131
+ items: { format: 'uuid', type: 'string' },
47132
+ type: 'array',
47133
+ },
47134
+ },
47135
+ {
47136
+ in: 'query',
47137
+ name: 'include',
47138
+ required: false,
47139
+ schema: {
47140
+ items: {
47141
+ enum: ['spaces', 'devices', 'acs_entrances'],
47142
+ type: 'string',
47143
+ },
47144
+ type: 'array',
47145
+ },
47146
+ },
47147
+ {
47148
+ in: 'query',
47149
+ name: 'exclude',
47150
+ required: false,
47151
+ schema: {
47152
+ items: {
47153
+ enum: ['spaces', 'devices', 'acs_entrances'],
47154
+ type: 'string',
47155
+ },
47156
+ type: 'array',
47157
+ },
47158
+ },
47159
+ ],
47160
+ responses: {
47161
+ 200: {
47162
+ content: {
47163
+ 'application/json': {
47164
+ schema: {
47165
+ properties: {
47166
+ batch: {
47167
+ description: 'Represents a resource batch.',
47168
+ properties: {
47169
+ acs_entrances: {
47170
+ items: { $ref: '#/components/schemas/acs_entrance' },
47171
+ type: 'array',
47172
+ },
47173
+ batch_type: { enum: ['spaces'], type: 'string' },
47174
+ devices: {
47175
+ items: { $ref: '#/components/schemas/device' },
47176
+ type: 'array',
47177
+ },
47178
+ spaces: {
47179
+ items: { $ref: '#/components/schemas/space' },
47180
+ type: 'array',
47181
+ },
47182
+ },
47183
+ required: ['batch_type'],
47184
+ type: 'object',
47185
+ 'x-route-path': '/',
47186
+ },
47187
+ ok: { type: 'boolean' },
47188
+ },
47189
+ required: ['batch', 'ok'],
47190
+ type: 'object',
47191
+ },
47192
+ },
47193
+ },
47194
+ description: 'OK',
47195
+ },
47196
+ 400: { description: 'Bad Request' },
47197
+ 401: { description: 'Unauthorized' },
47198
+ },
47199
+ security: [
47200
+ { pat_with_workspace: [] },
47201
+ { console_session_with_workspace: [] },
47202
+ { api_key: [] },
47203
+ ],
47204
+ summary: '/spaces/get_related',
47205
+ tags: [],
47206
+ 'x-batch-type': 'spaces',
47207
+ 'x-draft': 'Early access.',
47208
+ 'x-fern-sdk-group-name': ['spaces'],
47209
+ 'x-fern-sdk-method-name': 'get_related',
47210
+ 'x-fern-sdk-return-value': 'batch',
47211
+ 'x-response-key': 'batch',
47212
+ 'x-title': 'Get related Space resources',
47213
+ },
47214
+ post: {
47215
+ description: 'Gets all related resources for one or more Spaces.',
47216
+ operationId: 'spacesGetRelatedPost',
47217
+ requestBody: {
47218
+ content: {
47219
+ 'application/json': {
47220
+ schema: {
47221
+ properties: {
47222
+ exclude: {
47223
+ items: {
47224
+ enum: ['spaces', 'devices', 'acs_entrances'],
47225
+ type: 'string',
47226
+ },
47227
+ type: 'array',
47228
+ },
47229
+ include: {
47230
+ items: {
47231
+ enum: ['spaces', 'devices', 'acs_entrances'],
47232
+ type: 'string',
47233
+ },
47234
+ type: 'array',
47235
+ },
47236
+ space_ids: {
47237
+ description:
47238
+ 'IDs of the spaces that you want to get along with their related resources.',
47239
+ items: { format: 'uuid', type: 'string' },
47240
+ type: 'array',
47241
+ },
47242
+ },
47243
+ required: ['space_ids'],
47244
+ type: 'object',
47245
+ },
47246
+ },
47247
+ },
47248
+ },
47249
+ responses: {
47250
+ 200: {
47251
+ content: {
47252
+ 'application/json': {
47253
+ schema: {
47254
+ properties: {
47255
+ batch: {
47256
+ description: 'Represents a resource batch.',
47257
+ properties: {
47258
+ acs_entrances: {
47259
+ items: { $ref: '#/components/schemas/acs_entrance' },
47260
+ type: 'array',
47261
+ },
47262
+ batch_type: { enum: ['spaces'], type: 'string' },
47263
+ devices: {
47264
+ items: { $ref: '#/components/schemas/device' },
47265
+ type: 'array',
47266
+ },
47267
+ spaces: {
47268
+ items: { $ref: '#/components/schemas/space' },
47269
+ type: 'array',
47270
+ },
47271
+ },
47272
+ required: ['batch_type'],
47273
+ type: 'object',
47274
+ 'x-route-path': '/',
47275
+ },
47276
+ ok: { type: 'boolean' },
47277
+ },
47278
+ required: ['batch', 'ok'],
47279
+ type: 'object',
47280
+ },
47281
+ },
47282
+ },
47283
+ description: 'OK',
47284
+ },
47285
+ 400: { description: 'Bad Request' },
47286
+ 401: { description: 'Unauthorized' },
47287
+ },
47288
+ security: [
47289
+ { pat_with_workspace: [] },
47290
+ { console_session_with_workspace: [] },
47291
+ { api_key: [] },
47292
+ ],
47293
+ summary: '/spaces/get_related',
47294
+ tags: [],
47295
+ 'x-batch-type': 'spaces',
47296
+ 'x-draft': 'Early access.',
47297
+ 'x-fern-sdk-group-name': ['spaces'],
47298
+ 'x-fern-sdk-method-name': 'get_related',
47299
+ 'x-fern-sdk-return-value': 'batch',
47300
+ 'x-response-key': 'batch',
47301
+ 'x-title': 'Get related Space resources',
47302
+ },
47303
+ },
47119
47304
  '/spaces/list': {
47120
47305
  get: {
47121
47306
  description: 'Returns a list of all spaces.',