Skip to content

Commit

Permalink
feat: Add /devices/simulate/(connect|disconnect) (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
seambot authored Jun 27, 2024
1 parent ddba29b commit 54e6b63
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/seam/connect/models/devices/managed-device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { phone_specific_properties } from './phone-properties.js'
export const device_capability_flags =
devicedb_schemas.device_capability_flags.extend({
can_simulate_removal: z.boolean().optional(),
can_simulate_connection: z.boolean().optional(),
can_simulate_disconnection: z.boolean().optional(),
})

export const battery_status = z.enum(['critical', 'low', 'good', 'full'])
Expand Down
104 changes: 104 additions & 0 deletions src/lib/seam/connect/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1818,6 +1818,8 @@ export default {
can_program_online_access_codes: { type: 'boolean' },
can_remotely_lock: { type: 'boolean' },
can_remotely_unlock: { type: 'boolean' },
can_simulate_connection: { type: 'boolean' },
can_simulate_disconnection: { type: 'boolean' },
can_simulate_removal: { type: 'boolean' },
capabilities_supported: {
description:
Expand Down Expand Up @@ -3243,6 +3245,8 @@ export default {
can_program_online_access_codes: { type: 'boolean' },
can_remotely_lock: { type: 'boolean' },
can_remotely_unlock: { type: 'boolean' },
can_simulate_connection: { type: 'boolean' },
can_simulate_disconnection: { type: 'boolean' },
can_simulate_removal: { type: 'boolean' },
capabilities_supported: {
description:
Expand Down Expand Up @@ -3470,6 +3474,8 @@ export default {
can_program_online_access_codes: { type: 'boolean' },
can_remotely_lock: { type: 'boolean' },
can_remotely_unlock: { type: 'boolean' },
can_simulate_connection: { type: 'boolean' },
can_simulate_disconnection: { type: 'boolean' },
can_simulate_removal: { type: 'boolean' },
capabilities_supported: {
description:
Expand Down Expand Up @@ -8312,6 +8318,8 @@ export default {
'can_program_offline_access_codes',
'can_program_online_access_codes',
'can_simulate_removal',
'can_simulate_connection',
'can_simulate_disconnection',
],
type: 'string',
},
Expand All @@ -8325,6 +8333,8 @@ export default {
'can_program_offline_access_codes',
'can_program_online_access_codes',
'can_simulate_removal',
'can_simulate_connection',
'can_simulate_disconnection',
],
type: 'string',
},
Expand Down Expand Up @@ -8471,6 +8481,88 @@ export default {
'x-fern-sdk-return-value': 'device_providers',
},
},
'/devices/simulate/connect': {
post: {
operationId: 'devicesSimulateConnectPost',
requestBody: {
content: {
'application/json': {
schema: {
properties: { device_id: { format: 'uuid', type: 'string' } },
required: ['device_id'],
type: 'object',
},
},
},
},
responses: {
200: {
content: {
'application/json': {
schema: {
properties: { ok: { type: 'boolean' } },
required: ['ok'],
type: 'object',
},
},
},
description: 'OK',
},
400: { description: 'Bad Request' },
401: { description: 'Unauthorized' },
},
security: [
{ api_key: [] },
{ pat_with_workspace: [] },
{ console_session: [] },
],
summary: '/devices/simulate/connect',
tags: ['/devices'],
'x-fern-sdk-group-name': ['devices', 'simulate'],
'x-fern-sdk-method-name': 'connect',
},
},
'/devices/simulate/disconnect': {
post: {
operationId: 'devicesSimulateDisconnectPost',
requestBody: {
content: {
'application/json': {
schema: {
properties: { device_id: { format: 'uuid', type: 'string' } },
required: ['device_id'],
type: 'object',
},
},
},
},
responses: {
200: {
content: {
'application/json': {
schema: {
properties: { ok: { type: 'boolean' } },
required: ['ok'],
type: 'object',
},
},
},
description: 'OK',
},
400: { description: 'Bad Request' },
401: { description: 'Unauthorized' },
},
security: [
{ api_key: [] },
{ pat_with_workspace: [] },
{ console_session: [] },
],
summary: '/devices/simulate/disconnect',
tags: ['/devices'],
'x-fern-sdk-group-name': ['devices', 'simulate'],
'x-fern-sdk-method-name': 'disconnect',
},
},
'/devices/simulate/remove': {
post: {
operationId: 'devicesSimulateRemovePost',
Expand Down Expand Up @@ -8704,6 +8796,8 @@ export default {
'can_program_offline_access_codes',
'can_program_online_access_codes',
'can_simulate_removal',
'can_simulate_connection',
'can_simulate_disconnection',
],
type: 'string',
},
Expand All @@ -8717,6 +8811,8 @@ export default {
'can_program_offline_access_codes',
'can_program_online_access_codes',
'can_simulate_removal',
'can_simulate_connection',
'can_simulate_disconnection',
],
type: 'string',
},
Expand Down Expand Up @@ -9450,6 +9546,8 @@ export default {
'can_program_offline_access_codes',
'can_program_online_access_codes',
'can_simulate_removal',
'can_simulate_connection',
'can_simulate_disconnection',
],
type: 'string',
},
Expand All @@ -9463,6 +9561,8 @@ export default {
'can_program_offline_access_codes',
'can_program_online_access_codes',
'can_simulate_removal',
'can_simulate_connection',
'can_simulate_disconnection',
],
type: 'string',
},
Expand Down Expand Up @@ -11154,6 +11254,8 @@ export default {
'can_program_offline_access_codes',
'can_program_online_access_codes',
'can_simulate_removal',
'can_simulate_connection',
'can_simulate_disconnection',
],
type: 'string',
},
Expand All @@ -11167,6 +11269,8 @@ export default {
'can_program_offline_access_codes',
'can_program_online_access_codes',
'can_simulate_removal',
'can_simulate_connection',
'can_simulate_disconnection',
],
type: 'string',
},
Expand Down
Loading

0 comments on commit 54e6b63

Please sign in to comment.