Skip to content

Commit

Permalink
feat: add /acs/credentials/assign (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
seambot authored Nov 9, 2023
1 parent 3511ed4 commit be07aaf
Show file tree
Hide file tree
Showing 9 changed files with 352 additions and 28 deletions.
232 changes: 224 additions & 8 deletions src/lib/seam/connect/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default {
type: 'string',
},
email_address: { format: 'email', type: 'string' },
external_type: { enum: ['pti_user'], type: 'string' },
external_type: { enum: ['pti_user', 'brivo_user'], type: 'string' },
external_type_display_name: { type: 'string' },
full_name: { type: 'string' },
is_suspended: { type: 'boolean' },
Expand Down Expand Up @@ -286,16 +286,46 @@ export default {
accepted_providers: { items: { type: 'string' }, type: 'array' },
any_device_allowed: { type: 'boolean' },
any_provider_allowed: { type: 'boolean' },
authorized_at: {
format: 'date-time',
nullable: true,
type: 'string',
},
automatically_manage_new_devices: { type: 'boolean' },
connect_webview_id: { format: 'uuid', type: 'string' },
connected_account_id: { format: 'uuid', type: 'string' },
created_at: { format: 'date-time', type: 'string' },
custom_metadata: {
additionalProperties: {
nullable: true,
oneOf: [
{ maxLength: 500, type: 'string' },
{ type: 'number' },
{ format: 'null', nullable: true, type: 'string' },
{ type: 'boolean' },
],
},
type: 'object',
},
custom_redirect_failure_url: {
format: 'uri',
nullable: true,
type: 'string',
},
custom_redirect_url: {
format: 'uri',
nullable: true,
type: 'string',
},
device_selection_mode: {
enum: ['none', 'single', 'multiple'],
type: 'string',
},
login_successful: { type: 'boolean' },
selected_provider: { nullable: true, type: 'string' },
status: { enum: ['pending', 'failed', 'authorized'], type: 'string' },
url: { format: 'uri', type: 'string' },
wait_for_device_creation: { type: 'boolean' },
workspace_id: { format: 'uuid', type: 'string' },
},
required: [
Expand All @@ -310,6 +340,13 @@ export default {
'created_at',
'login_successful',
'status',
'custom_redirect_url',
'custom_redirect_failure_url',
'custom_metadata',
'automatically_manage_new_devices',
'wait_for_device_creation',
'authorized_at',
'selected_provider',
],
type: 'object',
},
Expand Down Expand Up @@ -3113,6 +3150,91 @@ export default {
'x-fern-sdk-method-name': 'update',
},
},
'/acs/credentials/assign': {
patch: {
operationId: 'acsCredentialsAssignPatch',
requestBody: {
content: {
'application/json': {
schema: {
properties: {
acs_credential_id: { format: 'uuid', type: 'string' },
acs_user_id: { format: 'uuid', type: 'string' },
},
required: ['acs_user_id', 'acs_credential_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: [
{ access_token: [], seam_workspace: [] },
{ seam_client_session_token: [] },
{ client_session_token: [] },
],
summary: '/acs/credentials/assign',
tags: [],
'x-fern-ignore': true,
},
post: {
operationId: 'acsCredentialsAssignPost',
requestBody: {
content: {
'application/json': {
schema: {
properties: {
acs_credential_id: { format: 'uuid', type: 'string' },
acs_user_id: { format: 'uuid', type: 'string' },
},
required: ['acs_user_id', 'acs_credential_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: [
{ access_token: [], seam_workspace: [] },
{ seam_client_session_token: [] },
{ client_session_token: [] },
],
summary: '/acs/credentials/assign',
tags: [],
'x-fern-sdk-group-name': ['acs', 'credentials'],
'x-fern-sdk-method-name': 'assign',
},
},
'/acs/credentials/create': {
post: {
operationId: 'acsCredentialsCreatePost',
Expand Down Expand Up @@ -3143,13 +3265,15 @@ export default {
acs_user_id: { format: 'uuid', type: 'string' },
code: { nullable: true, type: 'string' },
created_at: { format: 'date-time', type: 'string' },
external_type: { enum: ['pti_card'], 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_user_id',
'acs_system_id',
'code',
'external_type',
Expand Down Expand Up @@ -3254,13 +3378,15 @@ export default {
acs_user_id: { format: 'uuid', type: 'string' },
code: { nullable: true, type: 'string' },
created_at: { format: 'date-time', type: 'string' },
external_type: { enum: ['pti_card'], 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_user_id',
'acs_system_id',
'code',
'external_type',
Expand Down Expand Up @@ -3342,13 +3468,15 @@ export default {
acs_user_id: { format: 'uuid', type: 'string' },
code: { nullable: true, type: 'string' },
created_at: { format: 'date-time', type: 'string' },
external_type: { enum: ['pti_card'], 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_user_id',
'acs_system_id',
'code',
'external_type',
Expand Down Expand Up @@ -3383,6 +3511,91 @@ export default {
'x-fern-sdk-method-name': 'list',
},
},
'/acs/credentials/unassign': {
patch: {
operationId: 'acsCredentialsUnassignPatch',
requestBody: {
content: {
'application/json': {
schema: {
properties: {
acs_credential_id: { format: 'uuid', type: 'string' },
acs_user_id: { format: 'uuid', type: 'string' },
},
required: ['acs_user_id', 'acs_credential_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: [
{ access_token: [], seam_workspace: [] },
{ seam_client_session_token: [] },
{ client_session_token: [] },
],
summary: '/acs/credentials/unassign',
tags: [],
'x-fern-ignore': true,
},
post: {
operationId: 'acsCredentialsUnassignPost',
requestBody: {
content: {
'application/json': {
schema: {
properties: {
acs_credential_id: { format: 'uuid', type: 'string' },
acs_user_id: { format: 'uuid', type: 'string' },
},
required: ['acs_user_id', 'acs_credential_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: [
{ access_token: [], seam_workspace: [] },
{ seam_client_session_token: [] },
{ client_session_token: [] },
],
summary: '/acs/credentials/unassign',
tags: [],
'x-fern-sdk-group-name': ['acs', 'credentials'],
'x-fern-sdk-method-name': 'unassign',
},
},
'/acs/systems/get': {
post: {
operationId: 'acsSystemsGetPost',
Expand Down Expand Up @@ -3559,6 +3772,7 @@ export default {
format: 'email',
type: 'string',
},
email_address: { format: 'email', type: 'string' },
full_name: { type: 'string' },
phone_number: { nullable: true, type: 'string' },
},
Expand Down Expand Up @@ -3861,6 +4075,7 @@ export default {
format: 'email',
type: 'string',
},
email_address: { format: 'email', type: 'string' },
full_name: { type: 'string' },
phone_number: { nullable: true, type: 'string' },
},
Expand Down Expand Up @@ -3908,6 +4123,7 @@ export default {
format: 'email',
type: 'string',
},
email_address: { format: 'email', type: 'string' },
full_name: { type: 'string' },
phone_number: { nullable: true, type: 'string' },
},
Expand Down Expand Up @@ -8837,7 +9053,7 @@ export default {
tags: ['/workspaces'],
'x-fern-sdk-group-name': ['workspaces'],
'x-fern-sdk-method-name': 'list',
'x-fern-sdk-return-value': 'workspace',
'x-fern-sdk-return-value': 'workspaces',
},
},
'/workspaces/reset_sandbox': {
Expand Down
Loading

0 comments on commit be07aaf

Please sign in to comment.