From ab02f23eba1bf5de7f5d310a4335e4791e6f584a Mon Sep 17 00:00:00 2001 From: jdwyant8-seczetta Date: Fri, 18 Aug 2023 16:13:31 -0400 Subject: [PATCH] NEROCKET-72 adding api specs. --- nerm/openapi.yaml | 22 +++++- nerm/paths/workflows/automated_workflows.yaml | 17 +++++ nerm/paths/workflows/batch_workflows.yaml | 17 +++++ nerm/paths/workflows/create_workflows.yaml | 17 +++++ nerm/paths/workflows/login_workflows.yaml | 17 +++++ .../workflows/password_reset_workflows.yaml | 17 +++++ .../workflows/registration_workflows.yaml | 17 +++++ nerm/paths/workflows/update_workflows.yaml | 17 +++++ .../POST/Workflows/AutomatedWorkflow.yaml | 9 +++ .../POST/Workflows/BatchWorkflow.yaml | 9 +++ .../POST/Workflows/CreateWorkflow.yaml | 9 +++ .../POST/Workflows/LoginWorkflow.yaml | 9 +++ .../POST/Workflows/UpdateWorkflow.yaml | 9 +++ nerm/responses/Workflow.yaml | 9 +++ nerm/schemas/GET/Workflow.yaml | 67 +++++++++++++++++++ .../POST/Workflows/AutomatedWorkflow.yaml | 22 ++++++ .../schemas/POST/Workflows/BatchWorkflow.yaml | 27 ++++++++ .../POST/Workflows/CreateWorkflow.yaml | 16 +++++ .../schemas/POST/Workflows/LoginWorkflow.yaml | 23 +++++++ .../POST/Workflows/UpdateWorkflow.yaml | 19 ++++++ 20 files changed, 366 insertions(+), 3 deletions(-) create mode 100644 nerm/paths/workflows/automated_workflows.yaml create mode 100644 nerm/paths/workflows/batch_workflows.yaml create mode 100644 nerm/paths/workflows/create_workflows.yaml create mode 100644 nerm/paths/workflows/login_workflows.yaml create mode 100644 nerm/paths/workflows/password_reset_workflows.yaml create mode 100644 nerm/paths/workflows/registration_workflows.yaml create mode 100644 nerm/paths/workflows/update_workflows.yaml create mode 100644 nerm/requestBodies/POST/Workflows/AutomatedWorkflow.yaml create mode 100644 nerm/requestBodies/POST/Workflows/BatchWorkflow.yaml create mode 100644 nerm/requestBodies/POST/Workflows/CreateWorkflow.yaml create mode 100644 nerm/requestBodies/POST/Workflows/LoginWorkflow.yaml create mode 100644 nerm/requestBodies/POST/Workflows/UpdateWorkflow.yaml create mode 100644 nerm/responses/Workflow.yaml create mode 100644 nerm/schemas/GET/Workflow.yaml create mode 100644 nerm/schemas/POST/Workflows/AutomatedWorkflow.yaml create mode 100644 nerm/schemas/POST/Workflows/BatchWorkflow.yaml create mode 100644 nerm/schemas/POST/Workflows/CreateWorkflow.yaml create mode 100644 nerm/schemas/POST/Workflows/LoginWorkflow.yaml create mode 100644 nerm/schemas/POST/Workflows/UpdateWorkflow.yaml diff --git a/nerm/openapi.yaml b/nerm/openapi.yaml index ebf108a..14ed711 100644 --- a/nerm/openapi.yaml +++ b/nerm/openapi.yaml @@ -10,6 +10,7 @@ servers: - url: https://{tenantName}.nonemployee.com/api variables: tenantName: + default: acmeco description: Tenant name assigned to customer paths: @@ -102,6 +103,21 @@ paths: $ref: "./paths/role_profiles_id.yaml" /role_profile/{id}: $ref: "./paths/role_profile_id.yaml" +# Workflows + /workflows/create_workflow: + $ref: "./paths/workflows/create_workflows.yaml" + /workflows/update_workflow: + $ref: "./paths/workflows/update_workflows.yaml" + /workflows/batch_workflow: + $ref: "./paths/workflows/batch_workflows.yaml" + /workflows/automated_workflow: + $ref: "./paths/workflows/automated_workflows.yaml" + /workflows/registration_workflow: + $ref: "./paths/workflows/registration_workflows.yaml" + /workflows/login_workflow: + $ref: "./paths/workflows/login_workflows.yaml" + /workflows/password_reset_workflow: + $ref: "./paths/workflows/password_reset_workflows.yaml" # Workflow Sessions /workflow_sessions: $ref: "./paths/workflow_sessions.yaml" @@ -126,11 +142,11 @@ paths: $ref: "./paths/job_status.yaml" security: - BearerAuth: [] + - bearerAuth : [] components: securitySchemes: - BearerAuth: + bearerAuth: type: http scheme: bearer - bearerFormat: Token token= \ No newline at end of file + bearerFormat: Token token=your token \ No newline at end of file diff --git a/nerm/paths/workflows/automated_workflows.yaml b/nerm/paths/workflows/automated_workflows.yaml new file mode 100644 index 0000000..ac31098 --- /dev/null +++ b/nerm/paths/workflows/automated_workflows.yaml @@ -0,0 +1,17 @@ +post: + summary: Create an automated workflow + operationId: postAutomatedWorkflow + description: Create an automated workflow + tags: + - workflows + parameters: + - $ref: "../../parameters/query/run.yaml" + requestBody: + $ref: "../../requestBodies/POST/Workflows/AutomatedWorkflow.yaml" + responses: + '200': + $ref: "../../responses/Workflow.yaml" + '400': + $ref: "../../responses/400.yaml" + '500': + $ref: "../../responses/500.yaml" \ No newline at end of file diff --git a/nerm/paths/workflows/batch_workflows.yaml b/nerm/paths/workflows/batch_workflows.yaml new file mode 100644 index 0000000..23411ac --- /dev/null +++ b/nerm/paths/workflows/batch_workflows.yaml @@ -0,0 +1,17 @@ +post: + summary: Create a batch workflow + operationId: postBatchWorkflow + description: Create a batch workflow + tags: + - workflows + parameters: + - $ref: "../../parameters/query/run.yaml" + requestBody: + $ref: "../../requestBodies/POST/Workflows/BatchWorkflow.yaml" + responses: + '200': + $ref: "../../responses/Workflow.yaml" + '400': + $ref: "../../responses/400.yaml" + '500': + $ref: "../../responses/500.yaml" \ No newline at end of file diff --git a/nerm/paths/workflows/create_workflows.yaml b/nerm/paths/workflows/create_workflows.yaml new file mode 100644 index 0000000..05a23c9 --- /dev/null +++ b/nerm/paths/workflows/create_workflows.yaml @@ -0,0 +1,17 @@ +post: + summary: Create a create workflow + operationId: postCreateWorkflow + description: Create a create workflow + tags: + - workflows + parameters: + - $ref: "../../parameters/query/run.yaml" + requestBody: + $ref: "../../requestBodies/POST/Workflows/CreateWorkflow.yaml" + responses: + '200': + $ref: "../../responses/Workflow.yaml" + '400': + $ref: "../../responses/400.yaml" + '500': + $ref: "../../responses/500.yaml" \ No newline at end of file diff --git a/nerm/paths/workflows/login_workflows.yaml b/nerm/paths/workflows/login_workflows.yaml new file mode 100644 index 0000000..c22953e --- /dev/null +++ b/nerm/paths/workflows/login_workflows.yaml @@ -0,0 +1,17 @@ +post: + summary: Create a login workflow + operationId: postLoginWorkflow + description: Create a login workflow + tags: + - workflows + parameters: + - $ref: "../../parameters/query/run.yaml" + requestBody: + $ref: "../../requestBodies/POST/Workflows/LoginWorkflow.yaml" + responses: + '200': + $ref: "../../responses/Workflow.yaml" + '400': + $ref: "../../responses/400.yaml" + '500': + $ref: "../../responses/500.yaml" \ No newline at end of file diff --git a/nerm/paths/workflows/password_reset_workflows.yaml b/nerm/paths/workflows/password_reset_workflows.yaml new file mode 100644 index 0000000..55e5beb --- /dev/null +++ b/nerm/paths/workflows/password_reset_workflows.yaml @@ -0,0 +1,17 @@ +post: + summary: Create a password reset workflow + operationId: postPasswordUpdateWorkflow + description: Create a password reset workflow + tags: + - workflows + parameters: + - $ref: "../../parameters/query/run.yaml" + requestBody: + $ref: "../../requestBodies/POST/Workflows/LoginWorkflow.yaml" + responses: + '200': + $ref: "../../responses/Workflow.yaml" + '400': + $ref: "../../responses/400.yaml" + '500': + $ref: "../../responses/500.yaml" \ No newline at end of file diff --git a/nerm/paths/workflows/registration_workflows.yaml b/nerm/paths/workflows/registration_workflows.yaml new file mode 100644 index 0000000..bccbba6 --- /dev/null +++ b/nerm/paths/workflows/registration_workflows.yaml @@ -0,0 +1,17 @@ +post: + summary: Create a registration workflow + operationId: postRegistrationWorkflow + description: Create a registration workflow + tags: + - workflows + parameters: + - $ref: "../../parameters/query/run.yaml" + requestBody: + $ref: "../../requestBodies/POST/Workflows/CreateWorkflow.yaml" + responses: + '200': + $ref: "../../responses/Workflow.yaml" + '400': + $ref: "../../responses/400.yaml" + '500': + $ref: "../../responses/500.yaml" \ No newline at end of file diff --git a/nerm/paths/workflows/update_workflows.yaml b/nerm/paths/workflows/update_workflows.yaml new file mode 100644 index 0000000..222168d --- /dev/null +++ b/nerm/paths/workflows/update_workflows.yaml @@ -0,0 +1,17 @@ +post: + summary: Create an update workflow + operationId: postUpdateWorkflow + description: Create an update workflow + tags: + - workflows + parameters: + - $ref: "../../parameters/query/run.yaml" + requestBody: + $ref: "../../requestBodies/POST/Workflows/UpdateWorkflow.yaml" + responses: + '200': + $ref: "../../responses/Workflow.yaml" + '400': + $ref: "../../responses/400.yaml" + '500': + $ref: "../../responses/500.yaml" \ No newline at end of file diff --git a/nerm/requestBodies/POST/Workflows/AutomatedWorkflow.yaml b/nerm/requestBodies/POST/Workflows/AutomatedWorkflow.yaml new file mode 100644 index 0000000..4e14355 --- /dev/null +++ b/nerm/requestBodies/POST/Workflows/AutomatedWorkflow.yaml @@ -0,0 +1,9 @@ +required: true +content: + application/json: + schema: + type: object + properties: + workflow_session: + type: object + $ref: "../../../schemas/POST/Workflows/AutomatedWorkflow.yaml" \ No newline at end of file diff --git a/nerm/requestBodies/POST/Workflows/BatchWorkflow.yaml b/nerm/requestBodies/POST/Workflows/BatchWorkflow.yaml new file mode 100644 index 0000000..0ddd6cc --- /dev/null +++ b/nerm/requestBodies/POST/Workflows/BatchWorkflow.yaml @@ -0,0 +1,9 @@ +required: true +content: + application/json: + schema: + type: object + properties: + workflow_session: + type: object + $ref: "../../../schemas/POST/Workflows/BatchWorkflow.yaml" \ No newline at end of file diff --git a/nerm/requestBodies/POST/Workflows/CreateWorkflow.yaml b/nerm/requestBodies/POST/Workflows/CreateWorkflow.yaml new file mode 100644 index 0000000..99225e5 --- /dev/null +++ b/nerm/requestBodies/POST/Workflows/CreateWorkflow.yaml @@ -0,0 +1,9 @@ +required: true +content: + application/json: + schema: + type: object + properties: + workflow_session: + type: object + $ref: "../../../schemas/POST/Workflows/CreateWorkflow.yaml" \ No newline at end of file diff --git a/nerm/requestBodies/POST/Workflows/LoginWorkflow.yaml b/nerm/requestBodies/POST/Workflows/LoginWorkflow.yaml new file mode 100644 index 0000000..4294521 --- /dev/null +++ b/nerm/requestBodies/POST/Workflows/LoginWorkflow.yaml @@ -0,0 +1,9 @@ +required: true +content: + application/json: + schema: + type: object + properties: + workflow_session: + type: object + $ref: "../../../schemas/POST/Workflows/LoginWorkflow.yaml" \ No newline at end of file diff --git a/nerm/requestBodies/POST/Workflows/UpdateWorkflow.yaml b/nerm/requestBodies/POST/Workflows/UpdateWorkflow.yaml new file mode 100644 index 0000000..637576d --- /dev/null +++ b/nerm/requestBodies/POST/Workflows/UpdateWorkflow.yaml @@ -0,0 +1,9 @@ +required: true +content: + application/json: + schema: + type: object + properties: + workflow_session: + type: object + $ref: "../../../schemas/POST/Workflows/UpdateWorkflow.yaml" \ No newline at end of file diff --git a/nerm/responses/Workflow.yaml b/nerm/responses/Workflow.yaml new file mode 100644 index 0000000..e05ae76 --- /dev/null +++ b/nerm/responses/Workflow.yaml @@ -0,0 +1,9 @@ +description: Expected response to a valid request +content: + application/json: + schema: + type: object + properties: + workflow: + type: object + $ref: '../schemas/GET/WorkflowSession.yaml' \ No newline at end of file diff --git a/nerm/schemas/GET/Workflow.yaml b/nerm/schemas/GET/Workflow.yaml new file mode 100644 index 0000000..e7f9960 --- /dev/null +++ b/nerm/schemas/GET/Workflow.yaml @@ -0,0 +1,67 @@ +type: object +properties: + id: + type: string + format: uuid + readOnly: true + archived: + type: boolean + default: false + archived_on: + type: string + format: date-time + created_at: + type: string + format: date-time + readOnly: true + description: + type: string + legacy_id: + type: string + format: uuid + name: + type: string + ne_attribute_id: + type: string + format: uuid + options: + type: object + properties: + all_profiles: + type: string + enum: ["true", "false"] + multiple_requests: + type: string + enum: ["true", "false"] + expiration_time: + type: integer + minimum: 1 + position: + type: integer + minimum: 1 + profile_status: + type: string + profile_type_id: + type: string + format: uuid + runs_other_workflows: + type: boolean + default: false + status: + type: string + enum: [Enabled, Disabled] + uid: + type: string + minLength: 32 + maxLength: 32 + readOnly: true + updated_at: + type: string + format: date-time + readOnly: true + url: + type: string + format: uuid + allow_block_permissions: + type: boolean + default: false diff --git a/nerm/schemas/POST/Workflows/AutomatedWorkflow.yaml b/nerm/schemas/POST/Workflows/AutomatedWorkflow.yaml new file mode 100644 index 0000000..62e6663 --- /dev/null +++ b/nerm/schemas/POST/Workflows/AutomatedWorkflow.yaml @@ -0,0 +1,22 @@ +type: object +properties: + profile_type_id: + type: string + format: uuid + required: true + status: + type: string + enum: [Enabled, Disabled] + required: true + uid: + type: string + required: true + name: + type: string + required: true + condition_rule_ids: + type: array + items: + type: string + format: uuid + description: The ProfileTypeRule this workflow will be working with. \ No newline at end of file diff --git a/nerm/schemas/POST/Workflows/BatchWorkflow.yaml b/nerm/schemas/POST/Workflows/BatchWorkflow.yaml new file mode 100644 index 0000000..b8d4111 --- /dev/null +++ b/nerm/schemas/POST/Workflows/BatchWorkflow.yaml @@ -0,0 +1,27 @@ +type: object +properties: + profile_type_id: + type: string + format: uuid + required: true + status: + type: string + enum: [Enabled, Disabled] + required: true + uid: + type: string + required: true + name: + type: string + required: true + options: + type: object + properties: + all_profiles: + type: string + enum: ["true", "false"] + required: true + multiple_requests: + type: string + enum: ["true", "false"] + required: true \ No newline at end of file diff --git a/nerm/schemas/POST/Workflows/CreateWorkflow.yaml b/nerm/schemas/POST/Workflows/CreateWorkflow.yaml new file mode 100644 index 0000000..8e5c877 --- /dev/null +++ b/nerm/schemas/POST/Workflows/CreateWorkflow.yaml @@ -0,0 +1,16 @@ +type: object +properties: + profile_type_id: + type: string + format: uuid + required: true + status: + type: string + enum: [Enabled, Disabled] + required: true + uid: + type: string + required: true + name: + type: string + required: true \ No newline at end of file diff --git a/nerm/schemas/POST/Workflows/LoginWorkflow.yaml b/nerm/schemas/POST/Workflows/LoginWorkflow.yaml new file mode 100644 index 0000000..f04788e --- /dev/null +++ b/nerm/schemas/POST/Workflows/LoginWorkflow.yaml @@ -0,0 +1,23 @@ +type: object +properties: + profile_type_id: + type: string + format: uuid + required: true + status: + type: string + enum: [Enabled, Disabled] + required: true + uid: + type: string + required: true + name: + type: string + required: true + options: + type: object + properties: + expiration_time: + type: integer + minimum: 1 + required: true \ No newline at end of file diff --git a/nerm/schemas/POST/Workflows/UpdateWorkflow.yaml b/nerm/schemas/POST/Workflows/UpdateWorkflow.yaml new file mode 100644 index 0000000..85fd957 --- /dev/null +++ b/nerm/schemas/POST/Workflows/UpdateWorkflow.yaml @@ -0,0 +1,19 @@ +type: object +properties: + profile_type_id: + type: string + format: uuid + required: true + status: + type: string + enum: [Enabled, Disabled] + required: true + uid: + type: string + required: true + name: + type: string + required: true + profile_status: + type: string + required: true \ No newline at end of file