Files
hatchet/api-contracts/openapi/paths/workflow/workflow.yaml
Gabe Ruttner 697757879f feat: billing (#624)
* feat: init lago client

* feat: billable meter

* feat: db persistence

* wip: expose sub

* feat: rename page

* wip: billing section

* wip: lago integration

* feat: separate plan and period

* wip: webhook

* feat: improve empty state

* feat: update limits on plan changes

* feat: can change plans

* feat: change plan loading state

* feat: yearly filter

* feat: billing clarification

* fix: treatment

* feat: filter plans

* feat: prevent non-owner from changing plan

* fix: loading state

* fix: jit portal link

* fix: rm import

* fix: build errors

* fix: default to free

* fix: wrong files

* fix: select or insert customer

* fix: note

* feat: upgrade dependent on payment method state

* fix: dedupe

* chore: remove github-app from core

* chore: port to cloud

* chore: port to cloud

* chore: port to cloud

* chore: port to cloud

* chore: port to cloud

* add new components, repository callbacks

* chore: rm unused packages

* chore: fix generation

* chore: gen

* fix: cloud api references

* debug

* debug

* fix: actually set plans

* chore: rm debug

* fix: build

* feat: callbacks

* fix: add generated code

* chore: group cloud components

* chore: group by feature

* feat: alert change

* feat: confirm

* fix: confirm modal

* fix: ui

* fix: remove arrears

* fix: open in same tab

* fix: wan alert

* fix: call the callback

* fix: callback obj

* fix: disable if no cloud meta

---------

Co-authored-by: Alexander Belanger <alexander@hatchet.run>
2024-06-25 13:57:16 -04:00

621 lines
17 KiB
YAML

withTenant:
get:
x-resources: ["tenant"]
description: Get all workflows for a tenant
operationId: workflow:list
parameters:
- description: The tenant id
in: path
name: tenant
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
responses:
"200":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/WorkflowList"
description: Successfully retrieved the workflows
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
"403":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Forbidden
summary: Get workflows
tags:
- Workflow
withWorkflow:
get:
x-resources: ["tenant", "workflow"]
description: Get a workflow for a tenant
operationId: workflow:get
parameters:
- description: The workflow id
in: path
name: workflow
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
responses:
"200":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/Workflow"
description: Successfully retrieved the workflow
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
"403":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Forbidden
summary: Get workflow
tags:
- Workflow
delete:
x-resources: ["tenant", "workflow"]
description: Delete a workflow for a tenant
operationId: workflow:delete
parameters:
- description: The workflow id
in: path
name: workflow
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
responses:
"204":
description: Successfully deleted the workflow
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
"403":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Forbidden
"404":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Not found
summary: Delete workflow
tags:
- Workflow
workflowVersion:
get:
x-resources: ["tenant", "workflow"]
description: Get a workflow version for a tenant
operationId: workflow-version:get
parameters:
- description: The workflow id
in: path
name: workflow
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The workflow version. If not supplied, the latest version is fetched.
in: query
name: version
required: false
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
responses:
"200":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/WorkflowVersion"
description: Successfully retrieved the workflow version
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
"403":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Forbidden
"404":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Not found
summary: Get workflow version
tags:
- Workflow
workflowVersionDefinition:
get:
x-resources: ["tenant", "workflow"]
description: Get a workflow version definition for a tenant
operationId: workflow-version:get:definition
parameters:
- description: The workflow id
in: path
name: workflow
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The workflow version. If not supplied, the latest version is fetched.
in: query
name: version
required: false
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
responses:
"200":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/WorkflowVersionDefinition"
description: Successfully retrieved the workflow version definition
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
"403":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Forbidden
"404":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Not found
summary: Get workflow version definition
tags:
- Workflow
triggerWorkflow:
post:
x-resources: ["tenant", "workflow"]
description: Trigger a new workflow run for a tenant
operationId: workflow-run:create
parameters:
- description: The workflow id
in: path
name: workflow
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The workflow version. If not supplied, the latest version is fetched.
in: query
name: version
required: false
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
requestBody:
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/TriggerWorkflowRunRequest"
description: The input to the workflow run
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/WorkflowRun"
description: Successfully created the workflow run
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
"429":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Resource limit exceeded
"403":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Forbidden
"404":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Not found
summary: Trigger workflow run
tags:
- Workflow Run
cancelWorkflowRuns:
post:
x-resources: ["tenant"]
description: Cancel a batch of workflow runs
operationId: workflow-run:cancel
parameters:
- description: The tenant id
in: path
name: tenant
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
requestBody:
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/WorkflowRunsCancelRequest"
description: The input to cancel the workflow runs
required: true
responses:
"200":
content:
application/json:
schema:
type: object
properties:
workflowRunIds:
type: array
items:
type: string
format: uuid
minLength: 36
maxLength: 36
description: Successfully cancelled the workflow runs
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
"403":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Forbidden
summary: Cancel workflow runs
tags:
- Workflow Run
workflowRuns:
get:
x-resources: ["tenant"]
description: Get all workflow runs for a tenant
operationId: workflow-run:list
parameters:
- description: The tenant id
in: path
name: tenant
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The number to skip
in: query
name: offset
required: false
schema:
type: integer
format: int64
- description: The number to limit by
in: query
name: limit
required: false
schema:
type: integer
format: int64
- description: The event id to get runs for.
in: query
name: eventId
required: false
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The workflow id to get runs for.
in: query
name: workflowId
required: false
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The parent workflow run id
in: query
name: parentWorkflowRunId
required: false
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The parent step run id
in: query
name: parentStepRunId
required: false
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: A list of workflow run statuses to filter by
in: query
name: statuses
required: false
schema:
$ref: "../../components/schemas/_index.yaml#/WorkflowRunStatusList"
- description: A list of metadata key value pairs to filter by
in: query
name: additionalMetadata
example: ["key1:value1", "key2:value2"]
required: false
schema:
type: array
items:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/WorkflowRunList"
description: Successfully retrieved the workflow runs
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
"403":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Forbidden
summary: Get workflow runs
tags:
- Workflow
workflowRunsMetrics:
get:
x-resources: ["tenant"]
description: Get a summary of workflow run metrics for a tenant
operationId: workflow-run:get:metrics
parameters:
- description: The tenant id
in: path
name: tenant
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The event id to get runs for.
in: query
name: eventId
required: false
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The workflow id to get runs for.
in: query
name: workflowId
required: false
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The parent workflow run id
in: query
name: parentWorkflowRunId
required: false
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The parent step run id
in: query
name: parentStepRunId
required: false
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: A list of metadata key value pairs to filter by
in: query
name: additionalMetadata
example: ["key1:value1", "key2:value2"]
required: false
schema:
type: array
items:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/WorkflowRunsMetrics"
description: Successfully retrieved the workflow runs metrics
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
"403":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Forbidden
summary: Get workflow runs
tags:
- Workflow
workflowRun:
get:
x-resources: ["tenant", "workflow-run"]
description: Get a workflow run for a tenant
operationId: workflow-run:get
parameters:
- description: The tenant id
in: path
name: tenant
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: The workflow run id
in: path
name: workflow-run
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
responses:
"200":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/WorkflowRun"
description: Successfully retrieved the workflow run
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
"403":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Forbidden
summary: Get workflow run
tags:
- Workflow
getMetrics:
get:
x-resources: ["tenant", "workflow"]
description: Get the metrics for a workflow version
operationId: workflow:get:metrics
parameters:
- description: The workflow id
in: path
name: workflow
required: true
schema:
type: string
format: uuid
minLength: 36
maxLength: 36
- description: A status of workflow run statuses to filter by
in: query
name: status
required: false
schema:
$ref: "../../components/schemas/_index.yaml#/WorkflowRunStatus"
- description: A group key to filter metrics by
in: query
name: groupKey
required: false
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/WorkflowMetrics"
description: Successfully retrieved the workflow version metrics
"400":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: A malformed or bad request
"403":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Forbidden
"404":
content:
application/json:
schema:
$ref: "../../components/schemas/_index.yaml#/APIErrors"
description: Not found
summary: Get workflow metrics
tags:
- Workflow