Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
seambot authored Oct 4, 2023
1 parent 4d581f2 commit 4e4f1c6
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 9 deletions.
19 changes: 17 additions & 2 deletions src/lib/seam/connect/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ export default {
properties: {
access_group_type: {
description: 'deprecated: use external_type',
enum: ['pti_unit'],
enum: [
'pti_unit',
'pti_access_level',
'salto_access_group',
'brivo_group',
],
type: 'string',
},
access_group_type_display_name: {
Expand All @@ -59,7 +64,15 @@ export default {
acs_access_group_id: { format: 'uuid', type: 'string' },
acs_system_id: { format: 'uuid', type: 'string' },
created_at: { format: 'date-time', type: 'string' },
external_type: { enum: ['pti_unit'], type: 'string' },
external_type: {
enum: [
'pti_unit',
'pti_access_level',
'salto_access_group',
'brivo_group',
],
type: 'string',
},
external_type_display_name: { type: 'string' },
name: { type: 'string' },
workspace_id: { format: 'uuid', type: 'string' },
Expand Down Expand Up @@ -763,11 +776,13 @@ export default {
device_info_model: { type: 'string' },
device_name: { type: 'string' },
product_model: { type: 'string' },
product_name: { type: 'string' },
product_type: { type: 'string' },
},
required: [
'device_id',
'device_name',
'product_name',
'product_type',
'product_model',
'device_info_model',
Expand Down
40 changes: 34 additions & 6 deletions src/lib/seam/connect/route-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,18 @@ export interface Routes {
workspace_id: string
name: string
/** deprecated: use external_type */
access_group_type: 'pti_unit'
access_group_type:
| 'pti_unit'
| 'pti_access_level'
| 'salto_access_group'
| 'brivo_group'
/** deprecated: use external_type_display_name */
access_group_type_display_name: string
external_type: 'pti_unit'
external_type:
| 'pti_unit'
| 'pti_access_level'
| 'salto_access_group'
| 'brivo_group'
external_type_display_name: string
created_at: string
}
Expand Down Expand Up @@ -537,10 +545,18 @@ export interface Routes {
workspace_id: string
name: string
/** deprecated: use external_type */
access_group_type: 'pti_unit'
access_group_type:
| 'pti_unit'
| 'pti_access_level'
| 'salto_access_group'
| 'brivo_group'
/** deprecated: use external_type_display_name */
access_group_type_display_name: string
external_type: 'pti_unit'
external_type:
| 'pti_unit'
| 'pti_access_level'
| 'salto_access_group'
| 'brivo_group'
external_type_display_name: string
created_at: string
}
Expand All @@ -563,10 +579,18 @@ export interface Routes {
workspace_id: string
name: string
/** deprecated: use external_type */
access_group_type: 'pti_unit'
access_group_type:
| 'pti_unit'
| 'pti_access_level'
| 'salto_access_group'
| 'brivo_group'
/** deprecated: use external_type_display_name */
access_group_type_display_name: string
external_type: 'pti_unit'
external_type:
| 'pti_unit'
| 'pti_access_level'
| 'salto_access_group'
| 'brivo_group'
external_type_display_name: string
created_at: string
}>
Expand Down Expand Up @@ -1572,6 +1596,7 @@ export interface Routes {
| {
device_id: string
device_name: string
product_name: string
product_type: string
product_model: string
device_info_model: string
Expand Down Expand Up @@ -2266,6 +2291,7 @@ export interface Routes {
| {
device_id: string
device_name: string
product_name: string
product_type: string
product_model: string
device_info_model: string
Expand Down Expand Up @@ -3932,6 +3958,7 @@ export interface Routes {
| {
device_id: string
device_name: string
product_name: string
product_type: string
product_model: string
device_info_model: string
Expand Down Expand Up @@ -4656,6 +4683,7 @@ export interface Routes {
| {
device_id: string
device_name: string
product_name: string
product_type: string
product_model: string
device_info_model: string
Expand Down
7 changes: 6 additions & 1 deletion src/lib/seam/connect/unstable/models/acs/access_group.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { z } from 'zod'

// If changed, update seam.acs_access_group.access_group_type check constraint
export const acs_access_group_external_type = z.enum(['pti_unit'])
export const acs_access_group_external_type = z.enum([
'pti_unit',
'pti_access_level',
'salto_access_group',
'brivo_group',
])

export type AcsAccessGroupExternalType = z.infer<
typeof acs_access_group_external_type
Expand Down
1 change: 1 addition & 0 deletions src/lib/seam/connect/unstable/models/device-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export const device_metadata = z
wyze_metadata: z.object({
device_id: z.string(),
device_name: z.string(),
product_name: z.string(),
product_type: z.string(),
product_model: z.string(),
device_info_model: z.string(),
Expand Down

0 comments on commit 4e4f1c6

Please sign in to comment.