Skip to content

Commit

Permalink
feat: /acs/credentials/assign responds with an acs_credential (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
seambot authored Nov 14, 2023
1 parent d90c1ec commit 85092e2
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 26 deletions.
106 changes: 81 additions & 25 deletions src/lib/seam/connect/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,24 @@ export default {
],
type: 'object',
},
device_provider: {
properties: {
device_provider_name: { type: 'string' },
display_name: { type: 'string' },
image_url: { type: 'string' },
provider_categories: {
items: { enum: ['stable', 'consumer_smartlocks'], type: 'string' },
type: 'array',
},
},
required: [
'device_provider_name',
'display_name',
'image_url',
'provider_categories',
],
type: 'object',
},
event: {
properties: {
created_at: { format: 'date-time', type: 'string' },
Expand Down Expand Up @@ -3022,8 +3040,37 @@ export default {
content: {
'application/json': {
schema: {
properties: { ok: { type: 'boolean' } },
required: ['ok'],
properties: {
acs_credential: {
properties: {
acs_credential_id: { format: 'uuid', type: 'string' },
acs_system_id: { format: 'uuid', type: 'string' },
acs_user_id: { format: 'uuid', type: 'string' },
code: { nullable: true, type: 'string' },
created_at: { format: 'date-time', type: 'string' },
display_name: { minLength: 1, type: 'string' },
external_type: {
enum: ['pti_card', 'brivo_credential'],
type: 'string',
},
external_type_display_name: { type: 'string' },
workspace_id: { format: 'uuid', type: 'string' },
},
required: [
'acs_credential_id',
'acs_system_id',
'display_name',
'code',
'external_type',
'external_type_display_name',
'created_at',
'workspace_id',
],
type: 'object',
},
ok: { type: 'boolean' },
},
required: ['acs_credential', 'ok'],
type: 'object',
},
},
Expand Down Expand Up @@ -3063,8 +3110,37 @@ export default {
content: {
'application/json': {
schema: {
properties: { ok: { type: 'boolean' } },
required: ['ok'],
properties: {
acs_credential: {
properties: {
acs_credential_id: { format: 'uuid', type: 'string' },
acs_system_id: { format: 'uuid', type: 'string' },
acs_user_id: { format: 'uuid', type: 'string' },
code: { nullable: true, type: 'string' },
created_at: { format: 'date-time', type: 'string' },
display_name: { minLength: 1, type: 'string' },
external_type: {
enum: ['pti_card', 'brivo_credential'],
type: 'string',
},
external_type_display_name: { type: 'string' },
workspace_id: { format: 'uuid', type: 'string' },
},
required: [
'acs_credential_id',
'acs_system_id',
'display_name',
'code',
'external_type',
'external_type_display_name',
'created_at',
'workspace_id',
],
type: 'object',
},
ok: { type: 'boolean' },
},
required: ['acs_credential', 'ok'],
type: 'object',
},
},
Expand Down Expand Up @@ -5594,27 +5670,7 @@ export default {
schema: {
properties: {
device_providers: {
items: {
properties: {
device_provider_name: { type: 'string' },
display_name: { type: 'string' },
image_url: { type: 'string' },
provider_categories: {
items: {
enum: ['stable', 'consumer_smartlocks'],
type: 'string',
},
type: 'array',
},
},
required: [
'device_provider_name',
'display_name',
'image_url',
'provider_categories',
],
type: 'object',
},
items: { $ref: '#/components/schemas/device_provider' },
type: 'array',
},
ok: { type: 'boolean' },
Expand Down
14 changes: 13 additions & 1 deletion src/lib/seam/connect/route-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,19 @@ export interface Routes {
}
commonParams: {}
formData: {}
jsonResponse: {}
jsonResponse: {
acs_credential: {
acs_credential_id: string
acs_user_id?: string | undefined
acs_system_id: string
display_name: string
code: string | null
external_type: 'pti_card' | 'brivo_credential'
external_type_display_name: string
created_at: string
workspace_id: string
}
}
}
'/acs/credentials/create': {
route: '/acs/credentials/create'
Expand Down

0 comments on commit 85092e2

Please sign in to comment.