Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Offline access code params #242

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 66 additions & 3 deletions src/lib/seam/connect/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1555,11 +1555,18 @@ export default {
device_id: { format: 'uuid', type: 'string' },
ends_at: { type: 'string' },
is_external_modification_allowed: { type: 'boolean' },
is_offline_access_code: { type: 'boolean' },
is_one_time_use: { type: 'boolean' },
max_time_rounding: {
enum: ['1hour', '1day', '1h', '1d'],
type: 'string',
},
name: { type: 'string' },
prefer_native_scheduling: { type: 'boolean' },
starts_at: { type: 'string' },
sync: { default: false, type: 'boolean' },
use_backup_access_code_pool: { type: 'boolean' },
use_offline_access_code: { type: 'boolean' },
},
required: ['device_id'],
type: 'object',
Expand Down Expand Up @@ -1631,10 +1638,17 @@ export default {
},
ends_at: { type: 'string' },
is_external_modification_allowed: { type: 'boolean' },
is_offline_access_code: { type: 'boolean' },
is_one_time_use: { type: 'boolean' },
max_time_rounding: {
enum: ['1hour', '1day', '1h', '1d'],
type: 'string',
},
name: { type: 'string' },
prefer_native_scheduling: { type: 'boolean' },
starts_at: { type: 'string' },
use_backup_access_code_pool: { type: 'boolean' },
use_offline_access_code: { type: 'boolean' },
},
required: ['device_ids'],
type: 'object',
Expand Down Expand Up @@ -1704,10 +1718,17 @@ export default {
},
ends_at: { type: 'string' },
is_external_modification_allowed: { type: 'boolean' },
is_offline_access_code: { type: 'boolean' },
is_one_time_use: { type: 'boolean' },
max_time_rounding: {
enum: ['1hour', '1day', '1h', '1d'],
type: 'string',
},
name: { type: 'string' },
prefer_native_scheduling: { type: 'boolean' },
starts_at: { type: 'string' },
use_backup_access_code_pool: { type: 'boolean' },
use_offline_access_code: { type: 'boolean' },
},
required: ['device_ids'],
type: 'object',
Expand Down Expand Up @@ -2411,12 +2432,19 @@ export default {
ends_at: { type: 'string' },
is_external_modification_allowed: { type: 'boolean' },
is_managed: { type: 'boolean' },
is_offline_access_code: { type: 'boolean' },
is_one_time_use: { type: 'boolean' },
max_time_rounding: {
enum: ['1hour', '1day', '1h', '1d'],
type: 'string',
},
name: { type: 'string' },
prefer_native_scheduling: { type: 'boolean' },
starts_at: { type: 'string' },
sync: { default: false, type: 'boolean' },
type: { enum: ['ongoing', 'time_bound'], type: 'string' },
use_backup_access_code_pool: { type: 'boolean' },
use_offline_access_code: { type: 'boolean' },
},
required: ['access_code_id'],
type: 'object',
Expand Down Expand Up @@ -2477,12 +2505,19 @@ export default {
ends_at: { type: 'string' },
is_external_modification_allowed: { type: 'boolean' },
is_managed: { type: 'boolean' },
is_offline_access_code: { type: 'boolean' },
is_one_time_use: { type: 'boolean' },
max_time_rounding: {
enum: ['1hour', '1day', '1h', '1d'],
type: 'string',
},
name: { type: 'string' },
prefer_native_scheduling: { type: 'boolean' },
starts_at: { type: 'string' },
sync: { default: false, type: 'boolean' },
type: { enum: ['ongoing', 'time_bound'], type: 'string' },
use_backup_access_code_pool: { type: 'boolean' },
use_offline_access_code: { type: 'boolean' },
},
required: ['access_code_id'],
type: 'object',
Expand Down Expand Up @@ -2545,12 +2580,19 @@ export default {
ends_at: { type: 'string' },
is_external_modification_allowed: { type: 'boolean' },
is_managed: { type: 'boolean' },
is_offline_access_code: { type: 'boolean' },
is_one_time_use: { type: 'boolean' },
max_time_rounding: {
enum: ['1hour', '1day', '1h', '1d'],
type: 'string',
},
name: { type: 'string' },
prefer_native_scheduling: { type: 'boolean' },
starts_at: { type: 'string' },
sync: { default: false, type: 'boolean' },
type: { enum: ['ongoing', 'time_bound'], type: 'string' },
use_backup_access_code_pool: { type: 'boolean' },
use_offline_access_code: { type: 'boolean' },
},
required: ['access_code_id'],
type: 'object',
Expand Down Expand Up @@ -3228,9 +3270,30 @@ export default {
content: {
'application/json': {
schema: {
properties: { acs_user_id: { format: 'uuid', type: 'string' } },
required: ['acs_user_id'],
type: 'object',
oneOf: [
{
properties: {
acs_user_id: { format: 'uuid', type: 'string' },
},
required: ['acs_user_id'],
type: 'object',
},
{
properties: {
acs_system_id: { format: 'uuid', type: 'string' },
},
required: ['acs_system_id'],
type: 'object',
},
{
properties: {
acs_system_id: { format: 'uuid', type: 'string' },
acs_user_id: { format: 'uuid', type: 'string' },
},
required: ['acs_user_id', 'acs_system_id'],
type: 'object',
},
],
},
},
},
Expand Down
26 changes: 23 additions & 3 deletions src/lib/seam/connect/route-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export interface Routes {
use_backup_access_code_pool?: boolean | undefined
allow_external_modification?: boolean | undefined
is_external_modification_allowed?: boolean | undefined
use_offline_access_code?: boolean | undefined
is_offline_access_code?: boolean | undefined
is_one_time_use?: boolean | undefined
max_time_rounding?: ('1hour' | '1day' | '1h' | '1d') | undefined
}
commonParams: {}
formData: {}
Expand Down Expand Up @@ -84,6 +88,10 @@ export interface Routes {
use_backup_access_code_pool?: boolean | undefined
allow_external_modification?: boolean | undefined
is_external_modification_allowed?: boolean | undefined
use_offline_access_code?: boolean | undefined
is_offline_access_code?: boolean | undefined
is_one_time_use?: boolean | undefined
max_time_rounding?: ('1hour' | '1day' | '1h' | '1d') | undefined
}
commonParams: {}
formData: {}
Expand Down Expand Up @@ -435,6 +443,10 @@ export interface Routes {
use_backup_access_code_pool?: boolean | undefined
allow_external_modification?: boolean | undefined
is_external_modification_allowed?: boolean | undefined
use_offline_access_code?: boolean | undefined
is_offline_access_code?: boolean | undefined
is_one_time_use?: boolean | undefined
max_time_rounding?: ('1hour' | '1day' | '1h' | '1d') | undefined
access_code_id: string
device_id?: string | undefined
type?: ('ongoing' | 'time_bound') | undefined
Expand Down Expand Up @@ -704,9 +716,17 @@ export interface Routes {
method: 'GET' | 'POST'
queryParams: {}
jsonBody: {}
commonParams: {
acs_user_id: string
}
commonParams:
| {
acs_user_id: string
}
| {
acs_system_id: string
}
| {
acs_user_id: string
acs_system_id: string
}
formData: {}
jsonResponse: {
acs_credentials: Array<{
Expand Down