diff --git a/docs/api-reference/human-executor.md b/docs/api-reference/human-executor.md index 0689cd8c..a8222ade 100644 --- a/docs/api-reference/human-executor.md +++ b/docs/api-reference/human-executor.md @@ -4,13 +4,13 @@ The `HumanExecutor` class provides comprehensive human task management. ## Constructor -### `new HumanExecutor(client: ConductorClient)` +### `new HumanExecutor(client: Client)` Creates a new `HumanExecutor`. **Parameters:** -- `client` (`ConductorClient`): An instance of `ConductorClient`. +- `client` (`Client`): An instance of `Client`. --- @@ -18,50 +18,87 @@ Creates a new `HumanExecutor`. ### `getTasksByFilter(state: "PENDING" | "ASSIGNED" | "IN_PROGRESS" | "COMPLETED" | "TIMED_OUT", assignee?: string, assigneeType?: "EXTERNAL_USER" | "EXTERNAL_GROUP" | "CONDUCTOR_USER" | "CONDUCTOR_GROUP", claimedBy?: string, taskName?: string, taskInputQuery?: string, taskOutputQuery?: string): Promise` +**⚠️ DEPRECATED**: Use `search()` method instead. + Gets human tasks by a set of filter parameters. **Parameters:** -- `state` (`"PENDING" | "ASSIGNED" | "IN_PROGRESS" | "COMPLETED" | "TIMED_OUT"`): The state of the tasks to filter by. -- `assignee` (`string`, optional): The assignee of the tasks. -- `assigneeType` (`"EXTERNAL_USER" | "EXTERNAL_GROUP" | "CONDUCTOR_USER" | "CONDUCTOR_GROUP"`, optional): The type of the assignee. -- `claimedBy` (`string`, optional): The user who has claimed the tasks. -- `taskName` (`string`, optional): The name of the tasks. -- `taskInputQuery` (`string`, optional): A query to filter tasks by their input data. -- `taskOutputQuery` (`string`, optional): A query to filter tasks by their output data. +- `state` (`"PENDING" | "ASSIGNED" | "IN_PROGRESS" | "COMPLETED" | "TIMED_OUT"`): The state of the tasks to filter by. +- `assignee` (`string`, optional): The assignee of the tasks. +- `assigneeType` (`"EXTERNAL_USER" | "EXTERNAL_GROUP" | "CONDUCTOR_USER" | "CONDUCTOR_GROUP"`, optional): The type of the assignee. +- `claimedBy` (`string`, optional): The user who has claimed the tasks (format: `:`). +- `taskName` (`string`, optional): The name of the tasks. +- `taskInputQuery` (`string`, optional): A query to filter tasks by their input data. +- `taskOutputQuery` (`string`, optional): A query to filter tasks by their output data. **Returns:** -- `Promise`: An array of human task entries. +- `Promise`: An array of human task entries. --- ### `search(searchParams: Partial): Promise` -Searches for human tasks. +Searches for human tasks using flexible search parameters. **Parameters:** -- `searchParams` (`Partial`): The search parameters. +- `searchParams` (`Partial`): The search parameters. **Returns:** -- `Promise`: An array of human task entries. +- `Promise`: An array of human task entries. + +**Example:** + +```typescript +import { HumanExecutor } from "@io-orkes/conductor-javascript"; + +const humanExecutor = new HumanExecutor(client); + +// Search for pending tasks +const pendingTasks = await humanExecutor.search({ + states: ["PENDING"], + definitionNames: ["approval_task"], + size: 20, +}); + +console.log(`Found ${pendingTasks.length} pending tasks`); +``` --- ### `pollSearch(searchParams: Partial, options: PollIntervalOptions = { pollInterval: 100, maxPollTimes: 20 }): Promise` -Polls for human tasks until a result is returned. +Polls for human tasks until a result is returned or maximum poll attempts are reached. **Parameters:** -- `searchParams` (`Partial`): The search parameters. -- `options` (`PollIntervalOptions`, optional): The polling options. +- `searchParams` (`Partial`): The search parameters. +- `options` (`PollIntervalOptions`, optional): The polling options. **Returns:** -- `Promise`: An array of human task entries. +- `Promise`: An array of human task entries. + +**Example:** + +```typescript +import { HumanExecutor } from "@io-orkes/conductor-javascript"; + +const humanExecutor = new HumanExecutor(client); + +// Poll for new tasks +const newTasks = await humanExecutor.pollSearch( + { states: ["PENDING"] }, + { pollInterval: 500, maxPollTimes: 10 } +); + +if (newTasks.length > 0) { + console.log(`Found ${newTasks.length} new tasks to process`); +} +``` --- @@ -71,11 +108,23 @@ Gets a human task by its ID. **Parameters:** -- `taskId` (`string`): The ID of the task. +- `taskId` (`string`): The ID of the task. **Returns:** -- `Promise`: The human task entry. +- `Promise`: The human task entry. + +**Example:** + +```typescript +import { HumanExecutor } from "@io-orkes/conductor-javascript"; + +const humanExecutor = new HumanExecutor(client); + +// Get specific task details +const task = await humanExecutor.getTaskById("task_123"); +console.log(`Task ${task.taskId} is ${task.state}`); +``` --- @@ -85,13 +134,30 @@ Claims a task as an external user. **Parameters:** -- `taskId` (`string`): The ID of the task. -- `assignee` (`string`): The external user to assign the task to. -- `options` (`Record`, optional): Additional options. +- `taskId` (`string`): The ID of the task. +- `assignee` (`string`): The external user to assign the task to. +- `options` (`Record`, optional): Additional options including `overrideAssignment` and `withTemplate`. **Returns:** -- `Promise`: The claimed human task entry. +- `Promise`: The claimed human task entry. + +**Example:** + +```typescript +import { HumanExecutor } from "@io-orkes/conductor-javascript"; + +const humanExecutor = new HumanExecutor(client); + +// Claim task as external user +const claimedTask = await humanExecutor.claimTaskAsExternalUser( + "task_123", + "user@example.com", + { overrideAssignment: false, withTemplate: true } +); + +console.log(`Task claimed by ${claimedTask.claimant?.user}`); +``` --- @@ -101,26 +167,54 @@ Claims a task as a Conductor user. **Parameters:** -- `taskId` (`string`): The ID of the task. -- `options` (`Record`, optional): Additional options. +- `taskId` (`string`): The ID of the task. +- `options` (`Record`, optional): Additional options including `overrideAssignment` and `withTemplate`. **Returns:** -- `Promise`: The claimed human task entry. +- `Promise`: The claimed human task entry. + +**Example:** + +```typescript +import { HumanExecutor } from "@io-orkes/conductor-javascript"; + +const humanExecutor = new HumanExecutor(client); + +// Claim task as conductor user +const claimedTask = await humanExecutor.claimTaskAsConductorUser("task_123", { + overrideAssignment: false, + withTemplate: true, +}); + +console.log(`Task claimed by conductor user`); +``` --- ### `releaseTask(taskId: string): Promise` -Releases a task. +Releases a claimed task. **Parameters:** -- `taskId` (`string`): The ID of the task. +- `taskId` (`string`): The ID of the task. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { HumanExecutor } from "@io-orkes/conductor-javascript"; + +const humanExecutor = new HumanExecutor(client); + +// Release a task +await humanExecutor.releaseTask("task_123"); +console.log("Task released"); +``` --- @@ -130,143 +224,309 @@ Gets a human task template by name and version. **Parameters:** -- `name` (`string`): The name of the template. -- `version` (`number`): The version of the template. +- `name` (`string`): The name of the template. +- `version` (`number`): The version of the template. **Returns:** -- `Promise`: The human task template. +- `Promise`: The human task template. + +**Example:** + +```typescript +import { HumanExecutor } from "@io-orkes/conductor-javascript"; + +const humanExecutor = new HumanExecutor(client); + +// Get template details +const template = await humanExecutor.getTemplateByNameVersion( + "approval_form", + 1 +); +console.log(`Template version: ${template.version}`); +``` --- ### `getTemplateById(templateNameVersionOne: string): Promise` +**⚠️ DEPRECATED**: Use `getTemplateByNameVersion()` instead. + Gets a human task template by ID (name with version 1). **Parameters:** -- `templateNameVersionOne` (`string`): The name of the template. +- `templateNameVersionOne` (`string`): The name of the template. **Returns:** -- `Promise`: The human task template. +- `Promise`: The human task template. --- -### `updateTaskOutput(taskId: string, requestBody: Record>): Promise` +### `updateTaskOutput(taskId: string, requestBody: Record>): Promise` -Updates the output of a task. +Updates the output of a task without completing it. **Parameters:** -- `taskId` (`string`): The ID of the task. -- `requestBody` (`Record>`): The new output data. +- `taskId` (`string`): The ID of the task. +- `requestBody` (`Record>`): The new output data. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { HumanExecutor } from "@io-orkes/conductor-javascript"; + +const humanExecutor = new HumanExecutor(client); + +// Update task output +await humanExecutor.updateTaskOutput("task_123", { + output: { + status: "in_progress", + comments: "Working on approval", + }, +}); +``` --- -### `completeTask(taskId: string, requestBody: Record> = {}): Promise` +### `completeTask(taskId: string, requestBody: Record> = {}): Promise` -Completes a task. +Completes a task with the provided output data. **Parameters:** -- `taskId` (`string`): The ID of the task. -- `requestBody` (`Record>`, optional): The output data. +- `taskId` (`string`): The ID of the task. +- `requestBody` (`Record>`, optional): The output data. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { HumanExecutor } from "@io-orkes/conductor-javascript"; + +const humanExecutor = new HumanExecutor(client); + +// Complete task +await humanExecutor.completeTask("task_123", { + output: { + approved: true, + finalComments: "Approved with minor changes", + }, +}); + +console.log("Task completed"); +``` --- ## Type Definitions ### `HumanTaskEntry` -| Property | Type | Description | -| --- | --- | --- | -| `assignee` | `HumanTaskUser` | The user assigned to the task. | -| `claimant`| `HumanTaskUser` | The user who has claimed the task. | -| `createdBy` | `string` | The user who created the task. | -| `createdOn` | `number` | The time the task was created. | -| `definitionName`| `string` | The name of the task definition. | -| `displayName` | `string` | The display name of the task. | -| `humanTaskDef`| `HumanTaskDefinition` | The task definition. | -| `input` | `Record` | The input data for the task. | -| `output`| `Record` | The output data for the task. | -| `state` | `'PENDING' \| 'ASSIGNED' \| 'IN_PROGRESS' \| 'COMPLETED' \| 'TIMED_OUT' \| 'DELETED'` | The state of the task. | -| `taskId`| `string` | The ID of the task. | -| `taskRefName` | `string` | The reference name of the task. | -| `updatedBy` | `string` | The user who last updated the task. | -| `updatedOn` | `number` | The time the task was last updated. | -| `workflowId`| `string` | The ID of the workflow instance. | -| `workflowName`| `string` | The name of the workflow. | + +```typescript +export type HumanTaskEntry = { + assignee?: HumanTaskUser; + claimant?: HumanTaskUser; + createdBy?: string; + createdOn?: number; + definitionName?: string; + displayName?: string; + humanTaskDef?: HumanTaskDefinition; + input?: { + [key: string]: unknown; + }; + output?: { + [key: string]: unknown; + }; + ownerApp?: string; + state?: + | "PENDING" + | "ASSIGNED" + | "IN_PROGRESS" + | "COMPLETED" + | "TIMED_OUT" + | "DELETED"; + taskId?: string; + taskRefName?: string; + updatedBy?: string; + updatedOn?: number; + workflowId?: string; + workflowName?: string; +}; +``` ### `HumanTaskUser` -| Property | Type | Description | -| --- | --- | --- | -| `user` | `string` | The user or group ID. | -| `userType`| `'EXTERNAL_USER' \| 'EXTERNAL_GROUP' \| 'CONDUCTOR_USER' \| 'CONDUCTOR_GROUP'` | The type of the user. | + +```typescript +export type HumanTaskUser = { + user?: string; + userType?: + | "EXTERNAL_USER" + | "EXTERNAL_GROUP" + | "CONDUCTOR_USER" + | "CONDUCTOR_GROUP"; +}; +``` ### `HumanTaskDefinition` -| Property | Type | Description | -| --- | --- | --- | -| `assignmentCompletionStrategy` | `'LEAVE_OPEN' \| 'TERMINATE'` | The strategy for completing the assignment. | -| `assignments` | `HumanTaskAssignment[]` | A list of assignments for the task. | -| `taskTriggers` | `HumanTaskTrigger[]` | A list of triggers for the task. | -| `userFormTemplate` | `UserFormTemplate` | The user form template for the task. | + +```typescript +export type HumanTaskDefinition = { + assignmentCompletionStrategy?: "LEAVE_OPEN" | "TERMINATE"; + assignments?: Array; + displayName?: string; + fullTemplate?: HumanTaskTemplate; + taskTriggers?: Array; + userFormTemplate?: UserFormTemplate; +}; +``` ### `HumanTaskAssignment` -| Property | Type | Description | -| --- | --- | --- | -| `assignee` | `HumanTaskUser` | The user or group assigned to the task. | -| `slaMinutes` | `number` | The service level agreement in minutes. | + +```typescript +export type HumanTaskAssignment = { + assignee?: HumanTaskUser; + slaMinutes?: number; +}; +``` ### `HumanTaskTrigger` -| Property | Type | Description | -| --- | --- | --- | -| `startWorkflowRequest` | `StartWorkflowRequest` | The request to start a workflow. | -| `triggerType` | `'ASSIGNEE_CHANGED' \| 'PENDING' \| 'IN_PROGRESS' \| 'ASSIGNED' \| 'COMPLETED' \| 'TIMED_OUT'` | The type of the trigger. | + +```typescript +export type HumanTaskTrigger = { + startWorkflowRequest?: StartWorkflowRequest; + triggerType?: + | "ASSIGNEE_CHANGED" + | "CLAIMANT_CHANGED" + | "PENDING" + | "IN_PROGRESS" + | "ASSIGNED" + | "COMPLETED" + | "TIMED_OUT"; +}; +``` + +### `HumanTaskTemplate` + +```typescript +export type HumanTaskTemplate = { + createTime?: number; + createdBy?: string; + jsonSchema: { + [key: string]: unknown; + }; + name: string; + ownerApp?: string; + tags?: Array; + templateUI: { + [key: string]: unknown; + }; + updateTime?: number; + updatedBy?: string; + version: number; +}; +``` ### `UserFormTemplate` -| Property | Type | Description | -| --- | --- | --- | -| `name` | `string` | The name of the template. | -| `version` | `number` | The version of the template. | + +```typescript +export type UserFormTemplate = { + name?: string; + version?: number; +}; +``` ### `StartWorkflowRequest` -| Property | Type | Description | -| --- | --- | --- | -| `name` | `string` | The name of the workflow. | -| `version` | `number` | The version of the workflow. | -| `correlationId` | `string` | The correlation ID of the workflow. | -| `input` | `Record` | The input data for the workflow. | -| `taskToDomain` | `Record` | A map of task reference names to domains. | -| `workflowDef` | `WorkflowDef` | The workflow definition. | -| `externalInputPayloadStoragePath`| `string` | The path to the external input payload storage. | -| `idempotencyKey` | `string` | The idempotency key for the workflow. | -| `idempotencyStrategy` | `'FAIL' \| 'RETURN_EXISTING'` | The idempotency strategy for the workflow. | -| `priority` | `number` | The priority of the workflow. | -| `createdBy` | `string` | The user who created the workflow. | + +```typescript +export type StartWorkflowRequest = { + correlationId?: string; + createdBy?: string; + externalInputPayloadStoragePath?: string; + idempotencyKey?: string; + idempotencyStrategy?: "FAIL" | "RETURN_EXISTING" | "FAIL_ON_RUNNING"; + input?: { + [key: string]: unknown; + }; + name: string; + priority?: number; + taskToDomain?: { + [key: string]: string; + }; + version?: number; + workflowDef?: WorkflowDef; +}; +``` ### `HumanTaskSearch` -| Property | Type | Description | -| --- | --- | --- | -| `size` | `number` | The number of results to return. | -| `states` | `string[]` | A list of states to filter by. | -| `taskInputQuery` | `string` | A query to filter tasks by their input data. | -| `taskOutputQuery` | `string` | A query to filter tasks by their output data. | -| `definitionNames` | `string[]` | A list of task definition names to filter by. | -| `taskRefNames` | `string[]` | A list of task reference names to filter by. | -| `claimants` | `HumanTaskUser[]` | A list of claimants to filter by. | -| `assignees` | `HumanTaskUser[]` | A list of assignees to filter by. | -| `start` | `number` | The starting offset. | + +```typescript +export type HumanTaskSearch = { + assignees?: Array; + claimants?: Array; + definitionNames?: Array; + displayNames?: Array; + fullTextQuery?: string; + searchType?: "ADMIN" | "INBOX"; + size?: number; + start?: number; + states?: Array< + | "PENDING" + | "ASSIGNED" + | "IN_PROGRESS" + | "COMPLETED" + | "TIMED_OUT" + | "DELETED" + >; + taskInputQuery?: string; + taskOutputQuery?: string; + taskRefNames?: Array; + updateEndTime?: number; + updateStartTime?: number; + workflowIds?: Array; + workflowNames?: Array; +}; +``` ### `PollIntervalOptions` -| Property | Type | Description | -| --- | --- | --- | -| `pollInterval` | `number` | The interval in milliseconds to poll for tasks. | -| `maxPollTimes` | `number` | The maximum number of times to poll for tasks. | + +```typescript +export interface PollIntervalOptions { + pollInterval: number; + maxPollTimes: number; +} +``` + +### `HumanTaskSearchResult` + +```typescript +export type HumanTaskSearchResult = { + hits?: number; + pageSizeLimit?: number; + results?: Array; + start?: number; + totalHits?: number; +}; +``` + +### `Tag` + +```typescript +export type Tag = { + key?: string; + /** + * @deprecated + */ + type?: string; + value?: string; +}; +``` diff --git a/docs/api-reference/metadata-client.md b/docs/api-reference/metadata-client.md index faa3d4a0..3538f32e 100644 --- a/docs/api-reference/metadata-client.md +++ b/docs/api-reference/metadata-client.md @@ -4,13 +4,13 @@ The `MetadataClient` class provides methods for managing task and workflow defin ## Constructor -### `new MetadataClient(client: ConductorClient)` +### `new MetadataClient(client: Client)` Creates a new `MetadataClient`. **Parameters:** -- `client` (`ConductorClient`): An instance of `ConductorClient`. +- `client` (`Client`): An instance of `Client`. --- @@ -22,54 +22,187 @@ Unregisters an existing task definition by name. **Parameters:** -- `name` (`string`): The name of the task definition. +- `name` (`string`): The name of the task definition. **Returns:** -- `Promise` +- `Promise` --- -### `registerTask(taskDef: TaskDef): Promise` +### `registerTask(taskDef: ExtendedTaskDef): Promise` Registers a new task definition. **Parameters:** -- `taskDef` (`TaskDef`): The task definition to register. +- `taskDef` (`ExtendedTaskDef`): The task definition to register. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { MetadataClient, taskDefinition } from "@io-orkes/conductor-javascript"; + +const metadataClient = new MetadataClient(client); + +// Register a single task +const taskDef = taskDefinition({ + name: "email_task", + description: "Send an email", + ownerEmail: "dev@example.com", +}); + +await metadataClient.registerTask(taskDef); +``` --- -### `updateTask(taskDef: TaskDef): Promise` +### `registerTasks(taskDefs: ExtendedTaskDef[]): Promise` + +Registers multiple task definitions. + +**Parameters:** + +- `taskDefs` (`ExtendedTaskDef[]`): Array of task definitions to register. + +**Returns:** + +- `Promise` + +**Example:** + +```typescript +import { MetadataClient, taskDefinition } from "@io-orkes/conductor-javascript"; + +const metadataClient = new MetadataClient(client); + +// Register multiple tasks +const taskDefs = [ + taskDefinition({ name: "email_task", description: "Send email" }), + taskDefinition({ name: "sms_task", description: "Send SMS" }), +]; + +await metadataClient.registerTasks(taskDefs); +``` + +--- + +### `updateTask(taskDef: ExtendedTaskDef): Promise` Updates an existing task definition. **Parameters:** -- `taskDef` (`TaskDef`): The task definition to update. +- `taskDef` (`ExtendedTaskDef`): The task definition to update. + +**Returns:** + +- `Promise` + +**Example:** + +```typescript +import { MetadataClient, taskDefinition } from "@io-orkes/conductor-javascript"; + +const metadataClient = new MetadataClient(client); + +// Update an existing task +const updatedTask = taskDefinition({ + name: "email_task", + retryCount: 5, + timeoutSeconds: 300, +}); + +await metadataClient.updateTask(updatedTask); +``` + +--- + +### `getTask(taskName: string): Promise` + +Gets an existing task definition. + +**Parameters:** + +- `taskName` (`string`): The name of the task definition. **Returns:** -- `Promise` +- `Promise`: The task definition. + +**Example:** + +```typescript +import { MetadataClient } from "@io-orkes/conductor-javascript"; + +const metadataClient = new MetadataClient(client); + +// Get task definition +const taskDef = await metadataClient.getTask("email_task"); +console.log(`Task timeout: ${taskDef.timeoutSeconds}`); +``` --- -### `registerWorkflowDef(workflowDef: WorkflowDef, overwrite: boolean = false): Promise` +### `registerWorkflowDef(workflowDef: ExtendedWorkflowDef, overwrite: boolean = false): Promise` Creates or updates a workflow definition. **Parameters:** -- `workflowDef` (`WorkflowDef`): The workflow definition to register. -- `overwrite` (`boolean`, optional): Whether to overwrite an existing workflow definition. Defaults to `false`. +- `workflowDef` (`ExtendedWorkflowDef`): The workflow definition to register. +- `overwrite` (`boolean`, optional): Whether to overwrite an existing workflow definition. Defaults to `false`. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { MetadataClient, workflow } from "@io-orkes/conductor-javascript"; + +const metadataClient = new MetadataClient(client); + +// Register a workflow +const workflowDef = workflow("email_workflow", [ + simpleTask("send_email", "email_task", { to: "user@example.com" }), +]); + +await metadataClient.registerWorkflowDef(workflowDef, true); +``` + +--- + +### `getWorkflowDef(name: string, version?: number, metadata: boolean = false): Promise` + +Gets an existing workflow definition. + +**Parameters:** + +- `name` (`string`): The name of the workflow definition. +- `version` (`number`, optional): The version of the workflow definition. +- `metadata` (`boolean`, optional): Whether to include metadata. Defaults to `false`. + +**Returns:** + +- `Promise`: The workflow definition. + +**Example:** + +```typescript +import { MetadataClient } from "@io-orkes/conductor-javascript"; + +const metadataClient = new MetadataClient(client); + +// Get workflow definition +const workflowDef = await metadataClient.getWorkflowDef("email_workflow", 1); +console.log(`Workflow has ${workflowDef.tasks.length} tasks`); +``` --- @@ -79,41 +212,294 @@ Unregisters a workflow definition. **Parameters:** -- `workflowName` (`string`): The name of the workflow to unregister. -- `version` (`number`, optional): The version of the workflow to unregister. Defaults to `1`. +- `workflowName` (`string`): The name of the workflow to unregister. +- `version` (`number`, optional): The version of the workflow to unregister. Defaults to `1`. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { MetadataClient } from "@io-orkes/conductor-javascript"; + +const metadataClient = new MetadataClient(client); + +// Unregister workflow +await metadataClient.unregisterWorkflow("email_workflow", 1); +``` --- ## Type Definitions -### `TaskDef` -| Property | Type | Description | -| --- | --- | --- | -| `ownerApp` | `string` | The owner app of the task. | -| `createTime` | `number` | The creation time of the task. | -| `updateTime` | `number` | The last update time of the task. | -| `createdBy` | `string` | The user who created the task. | -| `updatedBy` | `string` | The user who last updated the task. | -| `name` | `string` | The name of the task. | -| `description` | `string` | The description of the task. | -| `retryCount` | `number` | The retry count. | -| `timeoutSeconds` | `number` | The timeout in seconds. | -| `inputKeys` | `string[]` | The input keys of the task. | -| `outputKeys` | `string[]` | The output keys of the task. | -| `timeoutPolicy` | `'RETRY' \| 'TIME_OUT_WF' \| 'ALERT_ONLY'` | The timeout policy of the task. | -| `retryLogic` | `'FIXED' \| 'EXPONENTIAL_BACKOFF' \| 'LINEAR_BACKOFF'` | The retry logic of the task. | -| `retryDelaySeconds` | `number` | The retry delay in seconds. | -| `responseTimeoutSeconds` | `number` | The response timeout in seconds. | -| `concurrentExecLimit` | `number` | The concurrent execution limit. | -| `inputTemplate` | `Record` | The input template of the task. | -| `rateLimitPerFrequency` | `number` | The rate limit per frequency. | -| `rateLimitFrequencyInSeconds` | `number` | The rate limit frequency in seconds. | -| `isolationGroupId` | `string` | The isolation group ID. | -| `executionNameSpace` | `string` | The execution namespace. | -| `ownerEmail` | `string` | The owner email of the task. | -| `pollTimeoutSeconds` | `number` | The poll timeout in seconds. | -| `backoffScaleFactor` | `number` | The backoff scale factor. | +### `ExtendedTaskDef` + +```typescript +interface ExtendedTaskDef { + name: string; + description?: string; + ownerEmail?: string; + ownerApp?: string; + retryCount?: number; + timeoutSeconds?: number; + timeoutPolicy?: "RETRY" | "TIME_OUT_WF" | "ALERT_ONLY"; + retryLogic?: "FIXED" | "EXPONENTIAL_BACKOFF" | "LINEAR_BACKOFF"; + retryDelaySeconds?: number; + responseTimeoutSeconds?: number; + concurrentExecLimit?: number; + inputKeys?: string[]; + outputKeys?: string[]; + inputTemplate?: Record; + rateLimitPerFrequency?: number; + rateLimitFrequencyInSeconds?: number; + pollTimeoutSeconds?: number; + backoffScaleFactor?: number; + executionNameSpace?: string; + isolationGroupId?: string; + tags?: Array<{ key: string; value: string }>; + inputSchema?: SchemaDef; + outputSchema?: SchemaDef; + baseType?: string; + enforceSchema?: boolean; + overwriteTags?: boolean; + createTime?: number; + updateTime?: number; + createdBy?: string; + updatedBy?: string; + totalTimeoutSeconds?: number; +} +``` + +## `TaskDef` + +```typescript +export type TaskDef = { + backoffScaleFactor?: number; + baseType?: string; + concurrentExecLimit?: number; + createTime?: number; + createdBy?: string; + description?: string; + enforceSchema?: boolean; + executionNameSpace?: string; + inputKeys?: Array; + inputSchema?: SchemaDef; + inputTemplate?: { + [key: string]: unknown; + }; + isolationGroupId?: string; + name: string; + outputKeys?: Array; + outputSchema?: SchemaDef; + ownerApp?: string; + ownerEmail?: string; + pollTimeoutSeconds?: number; + rateLimitFrequencyInSeconds?: number; + rateLimitPerFrequency?: number; + responseTimeoutSeconds?: number; + retryCount?: number; + retryDelaySeconds?: number; + retryLogic?: "FIXED" | "EXPONENTIAL_BACKOFF" | "LINEAR_BACKOFF"; + timeoutPolicy?: "RETRY" | "TIME_OUT_WF" | "ALERT_ONLY"; + timeoutSeconds: number; + totalTimeoutSeconds: number; + updateTime?: number; + updatedBy?: string; +}; +``` + +### `ExtendedWorkflowDef` + +```typescript +export type ExtendedWorkflowDef = { + cacheConfig?: CacheConfig; + createTime?: number; + createdBy?: string; + description?: string; + enforceSchema?: boolean; + failureWorkflow?: string; + inputParameters?: Array; + inputSchema?: SchemaDef; + inputTemplate?: { + [key: string]: unknown; + }; + maskedFields?: Array; + metadata?: { + [key: string]: unknown; + }; + name: string; + outputParameters?: { + [key: string]: unknown; + }; + outputSchema?: SchemaDef; + overwriteTags?: boolean; + ownerApp?: string; + ownerEmail?: string; + rateLimitConfig?: RateLimitConfig; + restartable?: boolean; + schemaVersion?: number; + tags?: Array; + tasks: Array; + timeoutPolicy?: "TIME_OUT_WF" | "ALERT_ONLY"; + timeoutSeconds: number; + updateTime?: number; + updatedBy?: string; + variables?: { + [key: string]: unknown; + }; + version?: number; + workflowStatusListenerEnabled?: boolean; + workflowStatusListenerSink?: string; +}; +``` + +### `WorkflowDef` + +```typescript +export type WorkflowDef = { + cacheConfig?: CacheConfig; + createTime?: number; + createdBy?: string; + description?: string; + enforceSchema?: boolean; + failureWorkflow?: string; + inputParameters?: Array; + inputSchema?: SchemaDef; + inputTemplate?: { + [key: string]: unknown; + }; + maskedFields?: Array; + metadata?: { + [key: string]: unknown; + }; + name: string; + outputParameters?: { + [key: string]: unknown; + }; + outputSchema?: SchemaDef; + ownerApp?: string; + ownerEmail?: string; + rateLimitConfig?: RateLimitConfig; + restartable?: boolean; + schemaVersion?: number; + tasks: Array; + timeoutPolicy?: "TIME_OUT_WF" | "ALERT_ONLY"; + timeoutSeconds: number; + updateTime?: number; + updatedBy?: string; + variables?: { + [key: string]: unknown; + }; + version?: number; + workflowStatusListenerEnabled?: boolean; + workflowStatusListenerSink?: string; +}; +``` + +### `WorkflowTask` + +```typescript +export type WorkflowTask = { + asyncComplete?: boolean; + cacheConfig?: CacheConfig; + /** + * @deprecated + */ + caseExpression?: string; + /** + * @deprecated + */ + caseValueParam?: string; + decisionCases?: { + [key: string]: Array; + }; + defaultCase?: Array; + defaultExclusiveJoinTask?: Array; + description?: string; + /** + * @deprecated + */ + dynamicForkJoinTasksParam?: string; + dynamicForkTasksInputParamName?: string; + dynamicForkTasksParam?: string; + dynamicTaskNameParam?: string; + evaluatorType?: string; + expression?: string; + forkTasks?: Array>; + inputParameters?: { + [key: string]: unknown; + }; + joinOn?: Array; + joinStatus?: string; + loopCondition?: string; + loopOver?: Array; + name: string; + onStateChange?: { + [key: string]: Array; + }; + optional?: boolean; + permissive?: boolean; + rateLimited?: boolean; + retryCount?: number; + scriptExpression?: string; + sink?: string; + startDelay?: number; + subWorkflowParam?: SubWorkflowParams; + taskDefinition?: TaskDef; + taskReferenceName: string; + type: string; + workflowTaskType?: string; +}; +``` + +### `SchemaDef` + +```typescript +export type SchemaDef = { + createTime?: number; + createdBy?: string; + data?: { + [key: string]: unknown; + }; + externalRef?: string; + name: string; + ownerApp?: string; + type: "JSON" | "AVRO" | "PROTOBUF"; + updateTime?: number; + updatedBy?: string; + version: number; +}; +``` + +### `CacheConfig` + +```typescript +export type CacheConfig = { + key?: string; + ttlInSecond?: number; +}; +``` + +### `Tag` + +```typescript +export type Tag = { + key?: string; + /** + * @deprecated + */ + type?: string; + value?: string; +}; +``` + +### `RateLimitConfig` + +```typescript +export type RateLimitConfig = { + concurrentExecLimit?: number; + rateLimitKey?: string; +}; +``` diff --git a/docs/api-reference/scheduler-client.md b/docs/api-reference/scheduler-client.md index 2c0ea5a0..8a49df8c 100644 --- a/docs/api-reference/scheduler-client.md +++ b/docs/api-reference/scheduler-client.md @@ -4,13 +4,13 @@ The `SchedulerClient` manages workflow scheduling and provides methods for creat ## Constructor -### `new SchedulerClient(client: ConductorClient)` +### `new SchedulerClient(client: Client)` Creates a new `SchedulerClient`. **Parameters:** -- `client` (`ConductorClient`): An instance of `ConductorClient`. +- `client` (`Client`): An instance of `Client`. --- @@ -22,43 +22,95 @@ Creates or updates a schedule for a specified workflow. **Parameters:** -- `param` (`SaveScheduleRequest`): The request to save a schedule. +- `param` (`SaveScheduleRequest`): The request to save a schedule. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { SchedulerClient } from "@io-orkes/conductor-javascript"; + +const scheduler = new SchedulerClient(client); + +// Create a schedule +await scheduler.saveSchedule({ + name: "daily_report", + cronExpression: "0 0 9 * * ?", // Daily at 9 AM + startWorkflowRequest: { + name: "generate_report", + version: 1, + input: { reportType: "daily" }, + }, + scheduleStartTime: Date.now(), + scheduleEndTime: Date.now() + 365 * 24 * 60 * 60 * 1000, // 1 year from now +}); +``` --- -### `search(start: number, size: number, sort: string = "", freeText: string, query: string): Promise` +### `search(start: number, size: number = 100, sort: string = "", freeText: string = "*", query?: string): Promise` Searches for scheduler executions. **Parameters:** -- `start` (`number`): The starting offset. -- `size` (`number`): The number of results to return. -- `sort` (`string`, optional): The sort order. -- `freeText` (`string`): The free text to search for. -- `query` (`string`): The search query. +- `start` (`number`): The starting offset. +- `size` (`number`, optional): The number of results to return. Defaults to 100. +- `sort` (`string`, optional): The sort order. Defaults to `""`. +- `freeText` (`string`, optional): The free text to search for. Defaults to `"*"`. +- `query` (`string`, optional): The search query. **Returns:** -- `Promise`: The search results. +- `Promise`: The search results. + +**Example:** + +```typescript +import { SchedulerClient } from "@io-orkes/conductor-javascript"; + +const scheduler = new SchedulerClient(client); + +// Search for failed executions +const failedExecutions = await scheduler.search( + 0, + 50, + "scheduledTime:DESC", + "*", + "state:FAILED" +); + +console.log(`Found ${failedExecutions.totalHits} failed executions`); +``` --- -### `getSchedule(name: string): Promise` +### `getSchedule(name: string): Promise` Gets an existing schedule by name. **Parameters:** -- `name` (`string`): The name of the schedule. +- `name` (`string`): The name of the schedule. **Returns:** -- `Promise`: The schedule. +- `Promise`: The schedule. + +**Example:** + +```typescript +import { SchedulerClient } from "@io-orkes/conductor-javascript"; + +const scheduler = new SchedulerClient(client); + +// Get schedule details +const schedule = await scheduler.getSchedule("daily_report"); +console.log(`Schedule paused: ${schedule.paused}`); +``` --- @@ -68,11 +120,23 @@ Pauses an existing schedule by name. **Parameters:** -- `name` (`string`): The name of the schedule. +- `name` (`string`): The name of the schedule. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { SchedulerClient } from "@io-orkes/conductor-javascript"; + +const scheduler = new SchedulerClient(client); + +// Pause a schedule +await scheduler.pauseSchedule("daily_report"); +console.log("Schedule paused"); +``` --- @@ -82,11 +146,23 @@ Resumes a paused schedule by name. **Parameters:** -- `name` (`string`): The name of the schedule. +- `name` (`string`): The name of the schedule. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { SchedulerClient } from "@io-orkes/conductor-javascript"; + +const scheduler = new SchedulerClient(client); + +// Resume a schedule +await scheduler.resumeSchedule("daily_report"); +console.log("Schedule resumed"); +``` --- @@ -96,62 +172,134 @@ Deletes an existing schedule by name. **Parameters:** -- `name` (`string`): The name of the schedule. +- `name` (`string`): The name of the schedule. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { SchedulerClient } from "@io-orkes/conductor-javascript"; + +const scheduler = new SchedulerClient(client); + +// Delete a schedule +await scheduler.deleteSchedule("daily_report"); +console.log("Schedule deleted"); +``` --- -### `getAllSchedules(workflowName?: string): Promise>` +### `getAllSchedules(workflowName?: string): Promise` Gets all existing workflow schedules, optionally filtering by workflow name. **Parameters:** -- `workflowName` (`string`, optional): The name of the workflow. +- `workflowName` (`string`, optional): The name of the workflow. **Returns:** -- `Promise>`: An array of workflow schedules. +- `Promise`: An array of workflow schedules. + +**Example:** + +```typescript +import { SchedulerClient } from "@io-orkes/conductor-javascript"; + +const scheduler = new SchedulerClient(client); + +// Get all schedules +const schedules = await scheduler.getAllSchedules(); +console.log(`Found ${schedules.length} schedules`); + +// Get schedules for specific workflow +const reportSchedules = await scheduler.getAllSchedules("generate_report"); +``` --- -### `getNextFewSchedules(cronExpression: string, scheduleStartTime?: number, scheduleEndTime?: number, limit: number = 3): Promise>` +### `getNextFewSchedules(cronExpression: string, scheduleStartTime?: number, scheduleEndTime?: number, limit: number = 3): Promise` Gets a list of the next execution times for a schedule. **Parameters:** -- `cronExpression` (`string`): The cron expression for the schedule. -- `scheduleStartTime` (`number`, optional): The start time for the schedule. -- `scheduleEndTime` (`number`, optional): The end time for the schedule. -- `limit` (`number`, optional): The number of execution times to return. Defaults to 3. +- `cronExpression` (`string`): The cron expression for the schedule. +- `scheduleStartTime` (`number`, optional): The start time for the schedule. +- `scheduleEndTime` (`number`, optional): The end time for the schedule. +- `limit` (`number`, optional): The number of execution times to return. Defaults to 3. **Returns:** -- `Promise>`: An array of the next execution times. +- `Promise`: An array of the next execution times (in milliseconds since epoch). + +**Example:** + +```typescript +import { SchedulerClient } from "@io-orkes/conductor-javascript"; + +const scheduler = new SchedulerClient(client); + +// Get next 5 execution times +const nextTimes = await scheduler.getNextFewSchedules( + "0 0 9 * * ?", // Daily at 9 AM + Date.now(), + Date.now() + 30 * 24 * 60 * 60 * 1000, // Next 30 days + 5 +); + +console.log("Next execution times:"); +nextTimes.forEach((time) => { + console.log(new Date(time).toISOString()); +}); +``` --- ### `pauseAllSchedules(): Promise` -Pauses all scheduling in the Conductor server instance. +Pauses all scheduling in the Conductor server instance (for debugging purposes only). **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { SchedulerClient } from "@io-orkes/conductor-javascript"; + +const scheduler = new SchedulerClient(client); + +// Pause all schedules (for maintenance) +await scheduler.pauseAllSchedules(); +console.log("All schedules paused"); +``` --- ### `requeueAllExecutionRecords(): Promise` -Requeues all execution records. +Requeues all execution records that may have failed or been missed. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { SchedulerClient } from "@io-orkes/conductor-javascript"; + +const scheduler = new SchedulerClient(client); + +// Requeue failed executions +await scheduler.requeueAllExecutionRecords(); +console.log("All execution records requeued"); +``` --- @@ -161,56 +309,337 @@ Resumes all scheduling in the Conductor server instance. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { SchedulerClient } from "@io-orkes/conductor-javascript"; + +const scheduler = new SchedulerClient(client); + +// Resume all schedules after maintenance +await scheduler.resumeAllSchedules(); +console.log("All schedules resumed"); +``` --- ## Type Definitions ### `SaveScheduleRequest` -| Property | Type | Description | -| --- | --- | --- | -| `name` | `string` | The name of the schedule. | -| `cronExpression` | `string` | The cron expression for the schedule. | -| `runCatchupScheduleInstances` | `boolean` | Whether to run catch-up schedule instances. | -| `paused` | `boolean` | Whether the schedule is paused. | -| `startWorkflowRequest` | `StartWorkflowRequest` | The request to start a workflow. | -| `createdBy` | `string` | The user who created the schedule. | -| `updatedBy` | `string` | The user who last updated the schedule. | -| `scheduleStartTime` | `number` | The start time for the schedule. | -| `scheduleEndTime` | `number` | The end time for the schedule. | -### `SearchResultWorkflowScheduleExecutionModel` -| Property | Type | Description | -| --- | --- | --- | -| `totalHits` | `number` | The total number of hits. | -| `results` | `WorkflowScheduleExecutionModel[]` | The search results. | +```typescript +export type SaveScheduleRequest = { + createdBy?: string; + cronExpression: string; + description?: string; + name: string; + paused?: boolean; + runCatchupScheduleInstances?: boolean; + scheduleEndTime?: number; + scheduleStartTime?: number; + startWorkflowRequest: StartWorkflowRequest; + updatedBy?: string; + zoneId?: string; +}; +``` ### `WorkflowSchedule` -| Property | Type | Description | -| --- | --- | --- | -| `name` | `string` | The name of the schedule. | -| `cronExpression` | `string` | The cron expression for the schedule. | -| `runCatchupScheduleInstances` | `boolean` | Whether to run catch-up schedule instances. | -| `paused` | `boolean` | Whether the schedule is paused. | -| `startWorkflowRequest` | `StartWorkflowRequest` | The request to start a workflow. | -| `scheduleStartTime` | `number` | The start time for the schedule. | -| `scheduleEndTime` | `number` | The end time for the schedule. | -| `createTime` | `number` | The creation time of the schedule. | -| `updatedTime` | `number` | The last update time of the schedule. | -| `createdBy` | `string` | The user who created the schedule. | -| `updatedBy` | `string` | The user who last updated the schedule. | + +```typescript +export type WorkflowSchedule = { + createTime?: number; + createdBy?: string; + cronExpression?: string; + description?: string; + name?: string; + paused?: boolean; + pausedReason?: string; + runCatchupScheduleInstances?: boolean; + scheduleEndTime?: number; + scheduleStartTime?: number; + startWorkflowRequest?: StartWorkflowRequest; + tags?: Tag[]; + updatedBy?: string; + updatedTime?: number; + zoneId?: string; +}; +``` + +### `WorkflowScheduleModel` + +```typescript +export type WorkflowScheduleModel = { + createTime?: number; + createdBy?: string; + cronExpression?: string; + description?: string; + name?: string; + orgId?: string; + paused?: boolean; + pausedReason?: string; + queueMsgId?: string; + runCatchupScheduleInstances?: boolean; + scheduleEndTime?: number; + scheduleStartTime?: number; + startWorkflowRequest?: StartWorkflowRequest; + tags?: Tag[]; + updatedBy?: string; + updatedTime?: number; + zoneId?: string; +}; +``` + +### `SearchResultWorkflowScheduleExecutionModel` + +```typescript +export type SearchResultWorkflowScheduleExecutionModel = { + results?: WorkflowScheduleExecutionModel[]; + totalHits?: number; +}; +``` ### `WorkflowScheduleExecutionModel` -| Property | Type | Description | -| --- | --- | --- | -| `executionId` | `string` | The ID of the execution. | -| `scheduleName` | `string` | The name of the schedule. | -| `scheduledTime` | `number` | The scheduled time of the execution. | -| `executionTime` | `number` | The execution time. | -| `workflowName` | `string` | The name of the workflow. | -| `workflowId` | `string` | The ID of the workflow instance. | -| `reason` | `string` | The reason for the execution status. | -| `stackTrace` | `string` | The stack trace for a failed execution. | -| `startWorkflowRequest` | `StartWorkflowRequest` | The request to start a workflow. | -| `state` | `'POLLED' \| 'FAILED' \| 'EXECUTED'` | The state of the execution. | + +```typescript +export type WorkflowScheduleExecutionModel = { + executionId?: string; + executionTime?: number; + orgId?: string; + queueMsgId?: string; + reason?: string; + scheduleName?: string; + scheduledTime?: number; + stackTrace?: string; + startWorkflowRequest?: StartWorkflowRequest; + state?: "POLLED" | "FAILED" | "EXECUTED"; + workflowId?: string; + workflowName?: string; + zoneId?: string; +}; +``` + +### `StartWorkflowRequest` + +```typescript +export type StartWorkflowRequest = { + correlationId?: string; + createdBy?: string; + externalInputPayloadStoragePath?: string; + idempotencyKey?: string; + idempotencyStrategy?: "FAIL" | "RETURN_EXISTING" | "FAIL_ON_RUNNING"; + input?: { + [key: string]: unknown; + }; + name: string; + priority?: number; + taskToDomain?: { + [key: string]: string; + }; + version?: number; + workflowDef?: WorkflowDef; +}; +``` + +### `Tag` + +```typescript +export type Tag = { + key?: string; + /** + * @deprecated + */ + type?: string; +}; +``` + +### `WorkflowDef` + +```typescript +export type WorkflowDef = { + cacheConfig?: CacheConfig; + createTime?: number; + createdBy?: string; + description?: string; + enforceSchema?: boolean; + failureWorkflow?: string; + inputParameters?: string[]; + inputSchema?: SchemaDef; + inputTemplate?: { + [key: string]: unknown; + }; + maskedFields?: string[]; + metadata?: { + [key: string]: unknown; + }; + name: string; + outputParameters?: { + [key: string]: unknown; + }; + outputSchema?: SchemaDef; + ownerApp?: string; + ownerEmail?: string; + rateLimitConfig?: RateLimitConfig; + restartable?: boolean; + schemaVersion?: number; + tasks: WorkflowTask[]; + timeoutPolicy?: "TIME_OUT_WF" | "ALERT_ONLY"; + timeoutSeconds: number; + updateTime?: number; + updatedBy?: string; +}; +``` + +### `CacheConfig` + +```typescript +export type CacheConfig = { + key?: string; + ttlInSecond?: number; +}; +``` + +### `SchemaDef` + +```typescript +export type SchemaDef = { + createTime?: number; + createdBy?: string; + data?: { + [key: string]: unknown; + }; + externalRef?: string; + name: string; + ownerApp?: string; + type: "JSON" | "AVRO" | "PROTOBUF"; + updateTime?: number; +}; +``` + +### `RateLimitConfig` + +```typescript +export type RateLimitConfig = { + concurrentExecLimit?: number; + rateLimitKey?: string; +}; +``` + +### `WorkflowTask` + +```typescript +export type WorkflowTask = { + asyncComplete?: boolean; + cacheConfig?: CacheConfig; + /** + * @deprecated + */ + caseExpression?: string; + /** + * @deprecated + */ + caseValueParam?: string; + decisionCases?: { + [key: string]: Array; + }; + defaultCase?: Array; + defaultExclusiveJoinTask?: Array; + description?: string; + /** + * @deprecated + */ + dynamicForkJoinTasksParam?: string; + dynamicForkTasksInputParamName?: string; + dynamicForkTasksParam?: string; + dynamicTaskNameParam?: string; + evaluatorType?: string; + expression?: string; + forkTasks?: Array>; + inputParameters?: { + [key: string]: unknown; + }; + joinOn?: Array; + joinStatus?: string; + loopCondition?: string; + loopOver?: Array; + name: string; + onStateChange?: { + [key: string]: Array; + }; + optional?: boolean; + permissive?: boolean; + rateLimited?: boolean; + retryCount?: number; + scriptExpression?: string; + sink?: string; + startDelay?: number; + subWorkflowParam?: SubWorkflowParams; + taskDefinition?: TaskDef; + taskReferenceName: string; + type?: string; +}; +``` + +### `StateChangeEvent` + +```typescript +export type StateChangeEvent = { + payload?: { + [key: string]: unknown; + }; + type: string; +}; +``` + +### `SubWorkflowParams` + +```typescript +export type SubWorkflowParams = { + idempotencyKey?: string; + idempotencyStrategy?: "FAIL" | "RETURN_EXISTING" | "FAIL_ON_RUNNING"; + name?: string; + taskToDomain?: { + [key: string]: string; + }; + version?: number; + workflowDefinition?: WorkflowDef; +}; +``` + +### `TaskDef` + +```typescript +export type TaskDef = { + backoffScaleFactor?: number; + baseType?: string; + concurrentExecLimit?: number; + createTime?: number; + createdBy?: string; + description?: string; + enforceSchema?: boolean; + executionNameSpace?: string; + inputKeys?: Array; + inputSchema?: SchemaDef; + inputTemplate?: { + [key: string]: unknown; + }; + isolationGroupId?: string; + name: string; + outputKeys?: Array; + outputSchema?: SchemaDef; + ownerApp?: string; + ownerEmail?: string; + pollTimeoutSeconds?: number; + rateLimitFrequencyInSeconds?: number; + rateLimitPerFrequency?: number; + responseTimeoutSeconds?: number; + retryCount?: number; + retryDelaySeconds?: number; + retryLogic?: "FIXED" | "EXPONENTIAL_BACKOFF" | "LINEAR_BACKOFF"; + timeoutPolicy?: "RETRY" | "TIME_OUT_WF" | "ALERT_ONLY"; + timeoutSeconds: number; + totalTimeoutSeconds: number; + updateTime?: number; +}; +``` diff --git a/docs/api-reference/service-registry-client.md b/docs/api-reference/service-registry-client.md index 7d887f96..3afd35e9 100644 --- a/docs/api-reference/service-registry-client.md +++ b/docs/api-reference/service-registry-client.md @@ -4,13 +4,13 @@ The `ServiceRegistryClient` manages service registrations and circuit breakers. ## Constructor -### `new ServiceRegistryClient(client: ConductorClient)` +### `new ServiceRegistryClient(client: Client)` Creates a new `ServiceRegistryClient`. **Parameters:** -- `client` (`ConductorClient`): An instance of `ConductorClient`. +- `client` (`Client`): An instance of `Client`. --- @@ -22,7 +22,7 @@ Retrieves all registered services. **Returns:** -- `Promise`: An array of all registered services. +- `Promise`: An array of all registered services. --- @@ -32,11 +32,11 @@ Removes a service by name. **Parameters:** -- `name` (`string`): The name of the service to remove. +- `name` (`string`): The name of the service to remove. **Returns:** -- `Promise` +- `Promise` --- @@ -46,11 +46,11 @@ Gets a service by name. **Parameters:** -- `name` (`string`): The name of the service to retrieve. +- `name` (`string`): The name of the service to retrieve. **Returns:** -- `Promise`: The requested service registry. +- `Promise`: The requested service registry. --- @@ -60,11 +60,11 @@ Opens the circuit breaker for a service. **Parameters:** -- `name` (`string`): The name of the service. +- `name` (`string`): The name of the service. **Returns:** -- `Promise`: A response with the circuit breaker status. +- `Promise`: A response with the circuit breaker status. --- @@ -74,11 +74,11 @@ Closes the circuit breaker for a service. **Parameters:** -- `name` (`string`): The name of the service. +- `name` (`string`): The name of the service. **Returns:** -- `Promise`: A response with the circuit breaker status. +- `Promise`: A response with the circuit breaker status. --- @@ -88,11 +88,11 @@ Gets the circuit breaker status for a service. **Parameters:** -- `name` (`string`): The name of the service. +- `name` (`string`): The name of the service. **Returns:** -- `Promise`: A response with the circuit breaker status. +- `Promise`: A response with the circuit breaker status. --- @@ -102,11 +102,11 @@ Adds or updates a service registry. **Parameters:** -- `serviceRegistry` (`ServiceRegistry`): The service registry to add or update. +- `serviceRegistry` (`ServiceRegistry`): The service registry to add or update. **Returns:** -- `Promise` +- `Promise` --- @@ -116,12 +116,12 @@ Adds or updates a service method. **Parameters:** -- `registryName` (`string`): The name of the registry. -- `method` (`ServiceMethod`): The service method to add or update. +- `registryName` (`string`): The name of the registry. +- `method` (`ServiceMethod`): The service method to add or update. **Returns:** -- `Promise` +- `Promise` --- @@ -131,14 +131,14 @@ Removes a service method. **Parameters:** -- `registryName` (`string`): The name of the registry. -- `serviceName` (`string`): The name of the service. -- `method` (`string`): The name of the method. -- `methodType` (`string`): The type of the method. +- `registryName` (`string`): The name of the registry. +- `serviceName` (`string`): The name of the service. +- `method` (`string`): The name of the method. +- `methodType` (`string`): The type of the method. **Returns:** -- `Promise` +- `Promise` --- @@ -148,12 +148,12 @@ Gets proto data. **Parameters:** -- `registryName` (`string`): The name of the registry. -- `filename` (`string`): The name of the proto file. +- `registryName` (`string`): The name of the registry. +- `filename` (`string`): The name of the proto file. **Returns:** -- `Promise`: The proto file data as a `Blob`. +- `Promise`: The proto file data as a `Blob`. --- @@ -163,13 +163,13 @@ Sets proto data. **Parameters:** -- `registryName` (`string`): The name of the registry. -- `filename` (`string`): The name of the proto file. -- `data` (`Blob`): The proto file data. +- `registryName` (`string`): The name of the registry. +- `filename` (`string`): The name of the proto file. +- `data` (`Blob`): The proto file data. **Returns:** -- `Promise` +- `Promise` --- @@ -179,12 +179,12 @@ Deletes a proto file. **Parameters:** -- `registryName` (`string`): The name of the registry. -- `filename` (`string`): The name of the proto file. +- `registryName` (`string`): The name of the registry. +- `filename` (`string`): The name of the proto file. **Returns:** -- `Promise` +- `Promise` --- @@ -194,11 +194,11 @@ Gets all proto files for a registry. **Parameters:** -- `registryName` (`string`): The name of the registry. +- `registryName` (`string`): The name of the registry. **Returns:** -- `Promise`: A list of proto registry entries. +- `Promise`: A list of proto registry entries. --- @@ -208,86 +208,123 @@ Discovers service methods. **Parameters:** -- `name` (`string`): The name of the service. -- `create` (`boolean`, optional): Whether to create the discovered methods. Defaults to `false`. +- `name` (`string`): The name of the service. +- `create` (`boolean`, optional): Whether to create the discovered methods. Defaults to `false`. **Returns:** -- `Promise`: The discovered service methods. +- `Promise`: The discovered service methods. --- ## Type Definitions +### `ServiceType` + +```typescript +export enum ServiceType { + HTTP = "HTTP", + MCP_REMOTE = "MCP_REMOTE", + gRPC = "gRPC", +} +``` + ### `ServiceRegistry` -| Property | Type | Description | -| --- | --- | --- | -| `name` | `string` | The name of the service. | -| `type` | `ServiceType` | The type of the service. | -| `serviceURI` | `string` | The URI of the service. | -| `methods` | `ServiceMethod[]` | The methods of the service. | -| `requestParams` | `RequestParam[]` | The request parameters of the service. | -| `config` | `ServiceRegistryConfig` | The configuration of the service. | -### `ServiceType` -`ServiceType` is an enum that can be one of the following values: `'HTTP'`, `'gRPC'`. +```typescript +export type ServiceRegistry = { + circuitBreakerEnabled?: boolean; + config?: Config; + methods?: ServiceMethod[]; + name?: string; + requestParams?: RequestParam[]; + serviceURI?: string; + type?: "HTTP" | "gRPC" | "MCP_REMOTE"; +}; +``` ### `ServiceMethod` -| Property | Type | Description | -| --- | --- | --- | -| `id` | `number` | The ID of the method. | -| `operationName` | `string` | The name of the operation. | -| `methodName` | `string` | The name of the method. | -| `methodType` | `string` | The type of the method. | -| `inputType` | `string` | The input type of the method. | -| `outputType` | `string` | The output type of the method. | -| `requestParams` | `RequestParam[]` | The request parameters of the method. | -| `exampleInput` | `Record` | An example input for the method. | -### `RequestParam` -| Property | Type | Description | -| --- | --- | --- | -| `name` | `string` | The name of the parameter. | -| `type` | `string` | The type of the parameter. | -| `required` | `boolean` | Whether the parameter is required. | -| `schema` | `RequestParamSchema` | The schema of the parameter. | - -### `RequestParamSchema` -| Property | Type | Description | -| --- | --- | --- | -| `type` | `string` | The type of the schema. | -| `format` | `string` | The format of the schema. | -| `defaultValue` | `any` | The default value of the schema. | - -### `ServiceRegistryConfig` -| Property | Type | Description | -| --- | --- | --- | -| `circuitBreakerConfig` | `OrkesCircuitBreakerConfig` | The circuit breaker configuration. | - -### `OrkesCircuitBreakerConfig` -| Property | Type | Description | -| --- | --- | --- | -| `failureRateThreshold` | `number` | The failure rate threshold. | -| `slidingWindowSize` | `number` | The sliding window size. | -| `minimumNumberOfCalls` | `number` | The minimum number of calls. | -| `waitDurationInOpenState` | `number` | The wait duration in the open state. | -| `permittedNumberOfCallsInHalfOpenState`| `number` | The permitted number of calls in the half-open state. | -| `slowCallRateThreshold` | `number` | The slow call rate threshold. | -| `slowCallDurationThreshold` | `number` | The slow call duration threshold. | -| `automaticTransitionFromOpenToHalfOpenEnabled` | `boolean` | Whether automatic transition from open to half-open is enabled. | -| `maxWaitDurationInHalfOpenState` | `number` | The maximum wait duration in the half-open state. | +```typescript +export type ServiceMethod = { + exampleInput?: { + [key: string]: unknown; + }; + id?: number; + inputType?: string; + methodName?: string; + methodType?: string; + operationName?: string; + outputType?: string; + requestParams?: RequestParam[]; +}; +``` ### `CircuitBreakerTransitionResponse` -| Property | Type | Description | -| --- | --- | --- | -| `service` | `string` | The name of the service. | -| `previousState` | `string` | The previous state of the circuit breaker. | -| `currentState` | `string` | The current state of the circuit breaker. | -| `transitionTimestamp` | `number` | The timestamp of the transition. | -| `message` | `string` | The transition message. | + +```typescript +export type CircuitBreakerTransitionResponse = { + currentState?: string; + message?: string; + previousState?: string; + service?: string; + transitionTimestamp?: number; +}; +``` ### `ProtoRegistryEntry` -| Property | Type | Description | -| --- | --- | --- | -| `filename` | `string` | The name of the proto file. | -| `lastUpdated` | `number` | The last update time of the proto file. | + +```typescript +export type ProtoRegistryEntry = { + data?: string; + filename?: string; + serviceName?: string; +}; +``` + +### `Config` + +```typescript +export type Config = { + circuitBreakerConfig?: OrkesCircuitBreakerConfig; +}; +``` + +### `OrkesCircuitBreakerConfig` + +```typescript +export type OrkesCircuitBreakerConfig = { + automaticTransitionFromOpenToHalfOpenEnabled?: boolean; + failureRateThreshold?: number; + maxWaitDurationInHalfOpenState?: number; + minimumNumberOfCalls?: number; + permittedNumberOfCallsInHalfOpenState?: number; + slidingWindowSize?: number; + slowCallDurationThreshold?: number; + slowCallRateThreshold?: number; + waitDurationInOpenState?: number; +}; +``` + +### `RequestParam` + +```typescript +export type RequestParam = { + name?: string; + required?: boolean; + schema?: Schema; + type?: string; +}; +``` + +### `Schema` + +```typescript +export type Schema = { + defaultValue?: { + [key: string]: unknown; + }; + format?: string; + type?: string; +}; +``` diff --git a/docs/api-reference/task-client.md b/docs/api-reference/task-client.md index 7ec8431c..66f761ac 100644 --- a/docs/api-reference/task-client.md +++ b/docs/api-reference/task-client.md @@ -4,33 +4,52 @@ The `TaskClient` provides capabilities for monitoring and debugging tasks within ## Constructor -### `new TaskClient(client: ConductorClient)` +### `new TaskClient(client: Client)` Creates a new TaskClient. **Parameters:** -- `client` (`ConductorClient`): An instance of `ConductorClient`. +- `client` (`Client`): An instance of `Client`. --- ## Methods -### `search(start: number, size: number, sort: string = "", freeText: string, query: string): Promise` +### `search(start: number, size: number, sort: string = "", freeText: string, query: string): Promise` Searches for tasks. **Parameters:** -- `start` (`number`): The starting offset. -- `size` (`number`): The number of results to return. -- `sort` (`string`, optional): The sort order. -- `freeText` (`string`): The free text to search for. -- `query` (`string`): The search query. +- `start` (`number`): The starting offset. +- `size` (`number`): The number of results to return. +- `sort` (`string`, optional): The sort order. Defaults to `""`. +- `freeText` (`string`): The free text to search for. +- `query` (`string`): The search query. **Returns:** -- `Promise`: The search results. +- `Promise`: The search results. + +**Example:** + +```typescript +import { TaskClient } from "@io-orkes/conductor-javascript"; + +const taskClient = new TaskClient(client); + +// Search for failed tasks +const failedTasks = await taskClient.search( + 0, + 100, + "startTime:DESC", + "*", + "status:FAILED" +); + +console.log(`Found ${failedTasks.totalHits} failed tasks`); +``` --- @@ -40,56 +59,548 @@ Gets a task by its ID. **Parameters:** -- `taskId` (`string`): The ID of the task. +- `taskId` (`string`): The ID of the task. **Returns:** -- `Promise`: The task. +- `Promise`: The task details. + +**Example:** + +```typescript +import { TaskClient } from "@io-orkes/conductor-javascript"; + +const taskClient = new TaskClient(client); + +// Get task details +const task = await taskClient.getTask("task_123"); +console.log(`Task ${task.taskId} status: ${task.status}`); +``` --- -### `updateTaskResult(workflowId: string, taskReferenceName: string, status: TaskResultStatus, outputData: Record): Promise` +### `updateTaskResult(workflowId: string, taskRefName: string, status: TaskResultStatus, outputData: Record): Promise` Updates the result of a task. **Parameters:** -- `workflowId` (`string`): The ID of the workflow instance. -- `taskReferenceName` (`string`): The reference name of the task. -- `status` (`TaskResultStatus`): The new status of the task. -- `outputData` (`Record`): The output data of the task. +- `workflowId` (`string`): The ID of the workflow instance. +- `taskRefName` (`string`): The reference name of the task. +- `status` (`TaskResultStatus`): The new status of the task. +- `outputData` (`Record`): The output data of the task. **Returns:** -- `Promise`: The result of the task update. +- `Promise`: The ID of the updated task. + +**Example:** + +```typescript +import { TaskClient, TaskResultStatus } from "@io-orkes/conductor-javascript"; + +const taskClient = new TaskClient(client); + +// Update task result +const taskId = await taskClient.updateTaskResult( + "workflow_123", + "process_data_ref", + TaskResultStatus.COMPLETED, + { result: "success", processed: true } +); + +console.log(`Updated task: ${taskId}`); +``` --- ## Type Definitions -### `SearchResultTask` -| Property | Type | Description | -| --- | --- | --- | -| `totalHits` | `number` | The total number of hits. | -| `results` | `Task[]` | The search results. | +### `TaskResultStatus` + +```typescript +export type TaskResultStatus = NonNullable; +``` + +Represents the possible status values for a task result: + +- `"IN_PROGRESS"` - Task is currently running +- `"FAILED"` - Task failed but can be retried +- `"FAILED_WITH_TERMINAL_ERROR"` - Task failed and cannot be retried +- `"COMPLETED"` - Task completed successfully + +### `SearchResultTaskSummary` + +```typescript +export type SearchResultTaskSummary = { + results?: Array; + totalHits?: number; +}; +``` + +### `TaskSummary` + +```typescript +export type TaskSummary = { + correlationId?: string; + endTime?: string; + executionTime?: number; + externalInputPayloadStoragePath?: string; + externalOutputPayloadStoragePath?: string; + input?: string; + output?: string; + queueWaitTime?: number; + reasonForIncompletion?: string; + scheduledTime?: string; + startTime?: string; + status?: + | "IN_PROGRESS" + | "CANCELED" + | "FAILED" + | "FAILED_WITH_TERMINAL_ERROR" + | "COMPLETED" + | "COMPLETED_WITH_ERRORS" + | "SCHEDULED" + | "TIMED_OUT" + | "SKIPPED"; + taskDefName?: string; + taskId?: string; + taskReferenceName?: string; + taskType?: string; + updateTime?: string; + workflowId?: string; + workflowPriority?: number; + workflowType?: string; +}; +``` + +### `Task` + +```typescript +export type Task = { + callbackAfterSeconds?: number; + callbackFromWorker?: boolean; + correlationId?: string; + domain?: string; + endTime?: number; + executed?: boolean; + executionNameSpace?: string; + externalInputPayloadStoragePath?: string; + externalOutputPayloadStoragePath?: string; + firstStartTime?: number; + inputData?: { + [key: string]: unknown; + }; + isolationGroupId?: string; + iteration?: number; + loopOverTask?: boolean; + outputData?: { + [key: string]: unknown; + }; + parentTaskId?: string; + pollCount?: number; + queueWaitTime?: number; + rateLimitFrequencyInSeconds?: number; + rateLimitPerFrequency?: number; + reasonForIncompletion?: string; + referenceTaskName?: string; + responseTimeoutSeconds?: number; + retried?: boolean; + retriedTaskId?: string; + retryCount?: number; + scheduledTime?: number; + seq?: number; + startDelayInSeconds?: number; + startTime?: number; + status?: + | "IN_PROGRESS" + | "CANCELED" + | "FAILED" + | "FAILED_WITH_TERMINAL_ERROR" + | "COMPLETED" + | "COMPLETED_WITH_ERRORS" + | "SCHEDULED" + | "TIMED_OUT" + | "SKIPPED"; + subWorkflowId?: string; + subworkflowChanged?: boolean; + taskDefName?: string; + taskDefinition?: TaskDef; + taskId?: string; + taskType?: string; + updateTime?: number; + workerId?: string; + workflowInstanceId?: string; + workflowPriority?: number; + workflowTask?: WorkflowTask; + workflowType?: string; +}; +``` + +### `TaskDef` + +```typescript +export type TaskDef = { + backoffScaleFactor?: number; + baseType?: string; + concurrentExecLimit?: number; + createTime?: number; + createdBy?: string; + description?: string; + enforceSchema?: boolean; + executionNameSpace?: string; + inputKeys?: Array; + inputSchema?: SchemaDef; + inputTemplate?: { + [key: string]: unknown; + }; + isolationGroupId?: string; + name: string; + outputKeys?: Array; + outputSchema?: SchemaDef; + ownerApp?: string; + ownerEmail?: string; + pollTimeoutSeconds?: number; + rateLimitFrequencyInSeconds?: number; + rateLimitPerFrequency?: number; + responseTimeoutSeconds?: number; + retryCount?: number; + retryDelaySeconds?: number; + retryLogic?: "FIXED" | "EXPONENTIAL_BACKOFF" | "LINEAR_BACKOFF"; + timeoutPolicy?: "RETRY" | "TIME_OUT_WF" | "ALERT_ONLY"; + timeoutSeconds: number; + totalTimeoutSeconds: number; + updateTime?: number; + updatedBy?: string; +}; +``` ### `TaskResult` -| Property | Type | Description | -| --- | --- | --- | -| `workflowInstanceId` | `string` | The ID of the workflow instance. | -| `taskId` | `string` | The ID of the task. | -| `reasonForIncompletion` | `string` | The reason for incompletion. | -| `callbackAfterSeconds` | `number` | The callback after seconds. | -| `workerId` | `string` | The ID of the worker. | -| `status` | `'IN_PROGRESS' \| 'FAILED' \| 'FAILED_WITH_TERMINAL_ERROR' \| 'COMPLETED'` | The status of the task. | -| `outputData` | `Record` | The output data of the task. | -| `logs` | `TaskExecLog[]` | The execution logs of the task. | -| `externalOutputPayloadStoragePath`| `string` | The path to the external output payload storage. | -| `subWorkflowId` | `string` | The ID of the sub-workflow. | + +```typescript +export type TaskResult = { + callbackAfterSeconds?: number; + extendLease?: boolean; + externalOutputPayloadStoragePath?: string; + logs?: Array; + outputData?: { + [key: string]: unknown; + }; + reasonForIncompletion?: string; + status?: + | "IN_PROGRESS" + | "FAILED" + | "FAILED_WITH_TERMINAL_ERROR" + | "COMPLETED"; + subWorkflowId?: string; + taskId: string; + workerId?: string; + workflowInstanceId: string; +}; +``` ### `TaskExecLog` -| Property | Type | Description | -| --- | --- | --- | -| `log` | `string` | The log message. | -| `taskId` | `string` | The ID of the task. | -| `createdTime` | `number` | The creation time of the log. | + +```typescript +export type TaskExecLog = { + createdTime?: number; + log?: string; + taskId?: string; +}; +``` + +### `WorkflowTask` + +```typescript +export type WorkflowTask = { + asyncComplete?: boolean; + cacheConfig?: CacheConfig; + /** + * @deprecated + */ + caseExpression?: string; + /** + * @deprecated + */ + caseValueParam?: string; + decisionCases?: { + [key: string]: Array; + }; + defaultCase?: Array; + defaultExclusiveJoinTask?: Array; + description?: string; + /** + * @deprecated + */ + dynamicForkJoinTasksParam?: string; + dynamicForkTasksInputParamName?: string; + dynamicForkTasksParam?: string; + dynamicTaskNameParam?: string; + evaluatorType?: string; + expression?: string; + forkTasks?: Array>; + inputParameters?: { + [key: string]: unknown; + }; + joinOn?: Array; + joinStatus?: string; + loopCondition?: string; + loopOver?: Array; + name: string; + onStateChange?: { + [key: string]: Array; + }; + optional?: boolean; + permissive?: boolean; + rateLimited?: boolean; + retryCount?: number; + scriptExpression?: string; + sink?: string; + startDelay?: number; + subWorkflowParam?: SubWorkflowParams; + taskDefinition?: TaskDef; + taskReferenceName: string; + type?: string; +}; +``` + +### `SchemaDef` + +```typescript +export type SchemaDef = { + createTime?: number; + createdBy?: string; + data?: { + [key: string]: unknown; + }; + externalRef?: string; + name: string; + ownerApp?: string; + type: "JSON" | "AVRO" | "PROTOBUF"; + updateTime?: number; + updatedBy?: string; + version: number; +}; +``` + +### `TaskListSearchResultSummary` + +```typescript +export type TaskListSearchResultSummary = { + results?: Array; + summary?: { + [key: string]: number; + }; + totalHits?: number; +}; +``` + +### `CacheConfig` + +```typescript +export type CacheConfig = { + key?: string; + ttlInSecond?: number; +}; +``` + +### `StateChangeEvent` + +```typescript +export type StateChangeEvent = { + payload?: { + [key: string]: unknown; + }; + type: string; +}; +``` + +### `SubWorkflowParams` + +```typescript +export type SubWorkflowParams = { + idempotencyKey?: string; + idempotencyStrategy?: "FAIL" | "RETURN_EXISTING" | "FAIL_ON_RUNNING"; + name?: string; + priority?: { + [key: string]: unknown; + }; + taskToDomain?: { + [key: string]: string; + }; + version?: number; + workflowDefinition?: { + [key: string]: unknown; + }; +}; +``` + +### `ConductorSdkError` + +```typescript +export class ConductorSdkError extends Error { + private _trace: unknown; + private __proto__: unknown; + + constructor(message?: string, innerError?: Error); +} +``` + +### `TaskResultOutputData` + +```typescript +export type TaskResultOutputData = NonNullable; +``` + +### `SignalResponse` + +```typescript +export type SignalResponse = { + correlationId?: string; + input?: { + [key: string]: unknown; + }; + output?: { + [key: string]: unknown; + }; + requestId?: string; + responseType?: + | "TARGET_WORKFLOW" + | "BLOCKING_WORKFLOW" + | "BLOCKING_TASK" + | "BLOCKING_TASK_INPUT"; + targetWorkflowId?: string; + targetWorkflowStatus?: string; + workflowId?: string; + priority?: number; + variables?: Record; + tasks?: Task[]; + createdBy?: string; + createTime?: number; + status?: string; + updateTime?: number; + taskType?: string; + taskId?: string; + referenceTaskName?: string; + retryCount?: number; + taskDefName?: string; + workflowType?: string; +}; +``` + +### `EnhancedSignalResponse` + +```typescript +export interface EnhancedSignalResponse extends SignalResponse { + isTargetWorkflow(): boolean; + isBlockingWorkflow(): boolean; + isBlockingTask(): boolean; + isBlockingTaskInput(): boolean; + getWorkflow(): Workflow; + getBlockingTask(): Task; + getTaskInput(): Record; + getWorkflowId(): string; + getTargetWorkflowId(): string; + hasWorkflowData(): boolean; + hasTaskData(): boolean; + getResponseType(): string; + isTerminal(): boolean; + isRunning(): boolean; + isPaused(): boolean; + getSummary(): string; + toDebugJSON(): Record; + toString(): string; +} +``` + +### `Workflow` + +```typescript +export type Workflow = { + correlationId?: string; + createTime?: number; + createdBy?: string; + endTime?: number; + event?: string; + externalInputPayloadStoragePath?: string; + externalOutputPayloadStoragePath?: string; + failedReferenceTaskNames?: Array; + failedTaskNames?: Array; + history?: Array; + idempotencyKey?: string; + input?: { + [key: string]: unknown; + }; + lastRetriedTime?: number; + output?: { + [key: string]: unknown; + }; + ownerApp?: string; + parentWorkflowId?: string; + parentWorkflowTaskId?: string; + priority?: number; + rateLimitKey?: string; + rateLimited?: boolean; + reRunFromWorkflowId?: string; + reasonForIncompletion?: string; + startTime?: number; + status?: + | "RUNNING" + | "COMPLETED" + | "FAILED" + | "TIMED_OUT" + | "TERMINATED" + | "PAUSED"; + taskToDomain?: { + [key: string]: string; + }; + tasks?: Array; + updateTime?: number; + updatedBy?: string; + variables?: { + [key: string]: unknown; + }; + workflowDefinition?: WorkflowDef; + workflowId?: string; + workflowName?: string; + workflowVersion?: number; +}; +``` + +### `WorkflowDef` + +```typescript +export type WorkflowDef = { + cacheConfig?: CacheConfig; + createTime?: number; + createdBy?: string; + description?: string; + enforceSchema?: boolean; + failureWorkflow?: string; + inputParameters?: Array; + inputSchema?: SchemaDef; + inputTemplate?: { + [key: string]: unknown; + }; + name?: string; + outputParameters?: { + [key: string]: unknown; + }; + outputSchema?: SchemaDef; + ownerApp?: string; + ownerEmail?: string; + restartable?: boolean; + schemaVersion?: number; + tasks?: Array; + timeoutPolicy?: "ALERT_ONLY" | "TIME_OUT_WF"; + timeoutSeconds?: number; + updateTime?: number; + updatedBy?: string; + variables?: { + [key: string]: unknown; + }; + version?: number; + workflowStatusListenerEnabled?: boolean; + workflowStatusListenerSink?: string; +}; +``` diff --git a/docs/api-reference/task-generators.md b/docs/api-reference/task-generators.md index b5e66e5d..fb9744f4 100644 --- a/docs/api-reference/task-generators.md +++ b/docs/api-reference/task-generators.md @@ -1,29 +1,30 @@ -### Task Generators Reference +# Task Generators Reference This section provides code examples for each task type generator. Use these to build your workflow task lists. -**Note:** These generators create workflow task references. To register task metadata (retry policies, timeouts, rate limits), use `taskDefinition()` or `MetadataClient` (see [Metadata](#metadata)). +**Note:** These generators create workflow task references. To register task metadata (retry policies, timeouts, rate limits), use `taskDefinition()` or `MetadataClient` (see [MetadataClient API Reference](metadata-client.md)). -#### Simple Task +## Simple Task -*Requires Custom Workers* - Executes custom business logic via workers you implement. +_Requires Custom Workers_ - Executes custom business logic via workers you implement. ```typescript import { simpleTask } from "@io-orkes/conductor-javascript"; const task = simpleTask( - "task_ref", // taskReferenceName (required) - "task_name", // name (required): must match worker's taskDefName - { // inputParameters (required) - inputParam: "value" + "task_ref", // taskReferenceName (required) + "task_name", // name (required): must match worker's taskDefName + { + // inputParameters (required) + inputParam: "value", }, - false // optional (optional): if true, workflow continues on failure + false // optional (optional): if true, workflow continues on failure ); ``` -#### HTTP Task +## HTTP Task -*System Task* - Makes HTTP/REST API calls. +_System Task_ - Makes HTTP/REST API calls. ```typescript import { httpTask } from "@io-orkes/conductor-javascript"; @@ -33,188 +34,218 @@ const task = httpTask( { uri: "http://api.example.com/data", method: "GET", - headers: { "Authorization": "Bearer token" }, + headers: { Authorization: "Bearer token" }, connectionTimeOut: 5000, - readTimeOut: 10000 + readTimeOut: 10000, }, - false, // asyncComplete (optional) - false // optional (optional): workflow continues on failure + false, // asyncComplete (optional) + false // optional (optional): workflow continues on failure ); ``` -#### Switch Task +## Switch Task -*System Task* - Provides conditional branching based on input values. +_System Task_ - Provides conditional branching based on input values. ```typescript import { switchTask } from "@io-orkes/conductor-javascript"; const task = switchTask( "switch_ref", - "input.status", // expression to evaluate + "input.status", // expression to evaluate { - "active": [simpleTask("active_task", "process_active", {})], - "inactive": [simpleTask("inactive_task", "process_inactive", {})] + active: [simpleTask("active_task", "process_active", {})], + inactive: [simpleTask("inactive_task", "process_inactive", {})], }, - [simpleTask("default_task", "process_default", {})], // defaultCase (optional) - false // optional (optional): workflow continues on failure + [simpleTask("default_task", "process_default", {})], // defaultCase (optional) + false // optional (optional): workflow continues on failure ); ``` -#### Fork-Join Task +## Fork-Join Task -*System Task* - Executes multiple task branches in parallel and waits for all to complete. +_System Task_ - Executes multiple task branches in parallel and waits for all to complete. ```typescript -import { forkJoinTask } from "@io-orkes/conductor-javascript"; +import { forkTask, forkTaskJoin } from "@io-orkes/conductor-javascript"; + +// Method 1: Using forkTask (creates only the fork) +const task1 = forkTask("fork_ref", [ + simpleTask("task1", "process_1", {}), + simpleTask("task2", "process_2", {}), + simpleTask("task3", "process_3", {}), +]); -const task = forkJoinTask("fork_ref", [ - [simpleTask("task1", "process_1", {})], - [simpleTask("task2", "process_2", {})], - [simpleTask("task3", "process_3", {})] +// Method 2: Using forkTaskJoin (creates both fork and join) +const [fork, join] = forkTaskJoin("fork_ref", [ + simpleTask("task1", "process_1", {}), + simpleTask("task2", "process_2", {}), + simpleTask("task3", "process_3", {}), ]); ``` -#### Do-While Task +## Do-While Task -*System Task* - Executes a loop with a condition evaluated after each iteration. +_System Task_ - Executes a loop with a condition evaluated after each iteration. ```typescript import { doWhileTask } from "@io-orkes/conductor-javascript"; const task = doWhileTask("while_ref", "workflow.variables.counter < 10", [ simpleTask("loop_task", "process_item", { - index: "${workflow.variables.counter}" + index: "${workflow.variables.counter}", }), setVariableTask("increment", { variableName: "counter", - value: "${workflow.variables.counter + 1}" - }) + value: "${workflow.variables.counter + 1}", + }), ]); ``` -#### Sub-Workflow Task +## Sub-Workflow Task -*System Task* - Executes another workflow as a task. +_System Task_ - Executes another workflow as a task. ```typescript import { subWorkflowTask } from "@io-orkes/conductor-javascript"; const task = subWorkflowTask( "sub_ref", - "child_workflow", // workflowName - 1, // version (optional): uses latest if not specified - false // optional (optional) + "child_workflow", // workflowName + 1, // version (optional): uses latest if not specified + false // optional (optional) ); // Set input parameters task.inputParameters = { inputParam: "value" }; ``` -#### Event Task +## Event Task -*System Task* - Publishes events to external eventing systems. +_System Task_ - Publishes events to external eventing systems. ```typescript -import { eventTask } from "@io-orkes/conductor-javascript"; +import { + eventTask, + sqsEventTask, + conductorEventTask, +} from "@io-orkes/conductor-javascript"; -const task = eventTask("event_ref", "event_name", { - sink: "event_sink", - asyncComplete: true -}); +// Generic event task +const task1 = eventTask("event_ref", "sqs", "my-queue"); + +// SQS specific event task +const task2 = sqsEventTask("sqs_ref", "my-queue"); + +// Conductor internal event task +const task3 = conductorEventTask("conductor_ref", "my-event"); ``` -#### Wait Task +## Wait Task -*System Task* - Pauses workflow execution for a specified duration or until a specific time. +_System Task_ - Pauses workflow execution for a specified duration or until a specific time. ```typescript -import { waitTaskDuration, waitTaskUntil } from "@io-orkes/conductor-javascript"; +import { + waitTaskDuration, + waitTaskUntil, +} from "@io-orkes/conductor-javascript"; // Wait for a duration (e.g., "30s", "5m", "1h", "2d") const taskDuration = waitTaskDuration( "wait_ref", - "30s", // duration string - false // optional (optional) + "30s", // duration string + false // optional (optional) ); // Wait until a specific time (ISO 8601 format) const taskUntil = waitTaskUntil( "wait_until_ref", - "2025-12-31T23:59:59Z", // ISO 8601 timestamp - false // optional (optional) + "2025-12-31T23:59:59Z", // ISO 8601 timestamp + false // optional (optional) ); ``` -#### Terminate Task +## Terminate Task -*System Task* - Terminates workflow execution with a specified status. +_System Task_ - Terminates workflow execution with a specified status. ```typescript import { terminateTask } from "@io-orkes/conductor-javascript"; const task = terminateTask( "terminate_ref", - "FAILED", // status: "COMPLETED" or "FAILED" - "Error message" // terminationReason (optional) + "FAILED", // status: "COMPLETED" or "FAILED" + "Error message" // terminationReason (optional) ); ``` -#### Set Variable Task +## Set Variable Task -*System Task* - Sets or updates workflow variables. +_System Task_ - Sets or updates workflow variables. ```typescript import { setVariableTask } from "@io-orkes/conductor-javascript"; const task = setVariableTask("var_ref", { variableName: "result", - value: "computed_value" + value: "computed_value", }); ``` -#### JSON JQ Transform Task +## JSON JQ Transform Task -*System Task* - Transforms JSON data using JQ expressions. +_System Task_ - Transforms JSON data using JQ expressions. ```typescript import { jsonJqTask } from "@io-orkes/conductor-javascript"; -const task = jsonJqTask("transform_ref", ".data.items[] | {id: .id, name: .name}"); +const task = jsonJqTask( + "transform_ref", + ".data.items[] | {id: .id, name: .name}" +); ``` -#### Kafka Publish Task +## Kafka Publish Task -*System Task* - Publishes messages to Kafka topics. +_System Task_ - Publishes messages to Kafka topics. ```typescript import { kafkaPublishTask } from "@io-orkes/conductor-javascript"; -const task = kafkaPublishTask("kafka_ref", "topic_name", { - message: "Hello Kafka!" -}, { - key: "message_key", - partition: 0 -}); +const task = kafkaPublishTask( + "kafka_ref", + "topic_name", + { + message: "Hello Kafka!", + }, + { + key: "message_key", + partition: 0, + } +); ``` -#### Inline Task +## Inline Task -*System Task* - Executes JavaScript code inline within the workflow. +_System Task_ - Executes JavaScript code inline within the workflow. ```typescript import { inlineTask } from "@io-orkes/conductor-javascript"; -const task = inlineTask("inline_ref", ` +const task = inlineTask( + "inline_ref", + ` function execute(input) { return { result: input.value * 2 }; } -`); +` +); ``` -#### Dynamic Fork Task +## Dynamic Fork Task -*System Task* - Dynamically creates parallel task executions based on input. +_System Task_ - Dynamically creates parallel task executions based on input. ```typescript import { dynamicForkTask } from "@io-orkes/conductor-javascript"; @@ -222,9 +253,9 @@ import { dynamicForkTask } from "@io-orkes/conductor-javascript"; const task = dynamicForkTask("dynamic_ref", "input.tasks", "task_name"); ``` -#### Join Task +## Join Task -*System Task* - Synchronization point for forked tasks. +_System Task_ - Synchronization point for forked tasks. ```typescript import { joinTask } from "@io-orkes/conductor-javascript"; @@ -232,9 +263,9 @@ import { joinTask } from "@io-orkes/conductor-javascript"; const task = joinTask("join_ref"); ``` -#### Human Task +## Human Task -*System Task* - Pauses workflow until a person completes an action (approval, form submission, etc.). +_System Task_ - Pauses workflow until a person completes an action (approval, form submission, etc.). ```typescript import { humanTask } from "@io-orkes/conductor-javascript"; @@ -244,8 +275,43 @@ const task = humanTask("human_ref", "approval_task", { form: { fields: [ { name: "approved", type: "boolean", required: true }, - { name: "comments", type: "text", required: false } - ] - } + { name: "comments", type: "text", required: false }, + ], + }, }); ``` + +## Loop Task + +_System Task_ - Creates a loop that executes a fixed number of times. + +```typescript +import { newLoopTask } from "@io-orkes/conductor-javascript"; + +const task = newLoopTask("loop_ref", 5, [ + simpleTask("loop_task", "process_item", { + iteration: "${loop_ref.iteration}", + }), +]); +``` + +## Workflow Generator + +Helper function to create workflow definitions. + +```typescript +import { workflow } from "@io-orkes/conductor-javascript"; + +const workflowDef = workflow("my_workflow", [ + simpleTask("task1", "process_data", { input: "value" }), + httpTask("task2", { + uri: "https://api.example.com/process", + method: "POST", + }), +]); + +// The workflow generator creates a basic workflow definition +console.log(workflowDef.name); // "my_workflow" +console.log(workflowDef.version); // 1 +console.log(workflowDef.tasks.length); // 2 +``` diff --git a/docs/api-reference/task-manager.md b/docs/api-reference/task-manager.md index c5b19e0f..ee10ff0f 100644 --- a/docs/api-reference/task-manager.md +++ b/docs/api-reference/task-manager.md @@ -4,15 +4,42 @@ The `TaskManager` is responsible for initializing and managing the runners that ## Constructor -### `new TaskManager(client: ConductorClient, workers: Array, config: TaskManagerConfig = {})` +### `new TaskManager(client: Client, workers: Array, config: TaskManagerConfig = {})` Creates a new TaskManager. **Parameters:** -- `client` (`ConductorClient`): An instance of `ConductorClient`. -- `workers` (`Array`): An array of `ConductorWorker` instances. -- `config` (`TaskManagerConfig`, optional): Configuration for the `TaskManager`. +- `client` (`Client`): An instance of `Client`. +- `workers` (`Array`): An array of `ConductorWorker` instances. +- `config` (`TaskManagerConfig`, optional): Configuration for the `TaskManager`. + +**Example:** + +```typescript +import { TaskManager } from "@io-orkes/conductor-javascript"; + +const workers = [ + { + taskDefName: "email_task", + execute: async (task) => { + // Task execution logic + return { + status: "COMPLETED", + outputData: { sent: true }, + }; + }, + }, +]; + +const taskManager = new TaskManager(client, workers, { + options: { + concurrency: 5, + pollInterval: 100, + }, + maxRetries: 3, +}); +``` --- @@ -32,8 +59,22 @@ Updates the polling options for a specific worker. **Parameters:** -- `workerTaskDefName` (`string`): The task definition name of the worker. -- `options` (`Partial`): The new polling options. +- `workerTaskDefName` (`string`): The task definition name of the worker. +- `options` (`Partial`): The new polling options. + +**Example:** + +```typescript +import { TaskManager } from "@io-orkes/conductor-javascript"; + +const taskManager = new TaskManager(client, workers); + +// Update polling options for a specific worker +taskManager.updatePollingOptionForWorker("email_task", { + concurrency: 10, + pollInterval: 500, +}); +``` --- @@ -43,7 +84,21 @@ Updates the polling options for all workers. **Parameters:** -- `options` (`Partial`): The new polling options. +- `options` (`Partial`): The new polling options. + +**Example:** + +```typescript +import { TaskManager } from "@io-orkes/conductor-javascript"; + +const taskManager = new TaskManager(client, workers); + +// Update polling options for all workers +taskManager.updatePollingOptions({ + concurrency: 5, + pollInterval: 200, +}); +``` --- @@ -51,48 +106,419 @@ Updates the polling options for all workers. Starts polling for tasks for all workers. +**Example:** + +```typescript +import { TaskManager } from "@io-orkes/conductor-javascript"; + +const taskManager = new TaskManager(client, workers); + +// Start polling for tasks +taskManager.startPolling(); +console.log(`Polling started: ${taskManager.isPolling}`); +``` + --- ### `stopPolling(): Promise` Stops polling for tasks for all workers. +**Example:** + +```typescript +import { TaskManager } from "@io-orkes/conductor-javascript"; + +const taskManager = new TaskManager(client, workers); + +// Stop polling for tasks +await taskManager.stopPolling(); +console.log(`Polling stopped: ${taskManager.isPolling}`); +``` + --- ### `sanityCheck(): void` Performs a sanity check on the workers, ensuring there are no duplicates and that at least one worker is present. Throws an error if the check fails. ---- +**Example:** -## Type Definitions +```typescript +import { TaskManager } from "@io-orkes/conductor-javascript"; -### `ConductorWorker` -| Property | Type | Description | -| --- | --- | --- | -| `taskDefName` | `string` | The name of the task definition. | -| `execute` | `(task: Task) => Promise>` | The function that executes the task. | -| `domain` | `string` | The domain of the worker. | -| `concurrency` | `number` | The number of polling instances to run concurrently. | -| `pollInterval` | `number` | The interval in milliseconds to poll for tasks. | +const taskManager = new TaskManager(client, workers); + +// Perform sanity check +try { + taskManager.sanityCheck(); + console.log("All workers are valid"); +} catch (error) { + console.error("Worker configuration error:", error.message); +} +``` + +## Type Definitions ### `TaskManagerConfig` -| Property | Type | Description | -| --- | --- | --- | -| `logger` | `ConductorLogger` | A logger instance. | -| `options` | `Partial` | The options for the `TaskManager`. | -| `onError` | `TaskErrorHandler` | A function to handle errors. | -| `maxRetries` | `number` | The maximum number of retries for a task. | + +```typescript +export interface TaskManagerConfig { + logger?: ConductorLogger; + options?: Partial; + onError?: TaskErrorHandler; + maxRetries?: number; +} +``` ### `TaskManagerOptions` -| Property | Type | Description | -| --- | --- | --- | -| `workerID` | `string` | The ID of the worker. | -| `domain` | `string` | The domain of the worker. | -| `pollInterval` | `number` | The interval in milliseconds to poll for tasks. | -| `concurrency` | `number` | The number of polling instances to run concurrently. | -| `batchPollingTimeout` | `number` | The timeout in milliseconds for batch polling. | + +```typescript +export type TaskManagerOptions = TaskRunnerOptions; +``` + +### `TaskRunnerOptions` + +```typescript +export interface TaskRunnerOptions { + workerID: string; + domain: string | undefined; + pollInterval?: number; + concurrency?: number; + batchPollingTimeout?: number; +} +``` + +### `ConductorWorker` + +```typescript +export interface ConductorWorker { + taskDefName: string; + execute: ( + task: Task + ) => Promise>; + domain?: string; + concurrency?: number; + pollInterval?: number; +} +``` ### `TaskErrorHandler` -`TaskErrorHandler` is a function that takes an `Error` and an optional `Task` and handles the error. -`(error: Error, task?: Task) => void` + +```typescript +export type TaskErrorHandler = (error: Error, task?: Task) => void; +``` + +### `ConductorLogger` + +```typescript +export interface ConductorLogger { + info(...args: unknown[]): void; + error(...args: unknown[]): void; + debug(...args: unknown[]): void; +} +``` + +### `DefaultLogger` + +```typescript +export declare class DefaultLogger implements ConductorLogger { + constructor(config?: DefaultLoggerConfig); + + info(...args: unknown[]): void; + error(...args: unknown[]): void; + debug(...args: unknown[]): void; +} +``` + +### `DefaultLoggerConfig` + +```typescript +export interface DefaultLoggerConfig { + level?: ConductorLogLevel; + tags?: object[]; +} +``` + +### `ConductorLogLevel` + +```typescript +export type ConductorLogLevel = "DEBUG" | "INFO" | "ERROR"; +``` + +### `Task` + +```typescript +export type Task = { + callbackAfterSeconds?: number; + callbackFromWorker?: boolean; + correlationId?: string; + domain?: string; + endTime?: number; + executed?: boolean; + executionNameSpace?: string; + externalInputPayloadStoragePath?: string; + externalOutputPayloadStoragePath?: string; + firstStartTime?: number; + inputData?: { + [key: string]: unknown; + }; + isolationGroupId?: string; + iteration?: number; + loopOverTask?: boolean; + outputData?: { + [key: string]: unknown; + }; + parentTaskId?: string; + pollCount?: number; + queueWaitTime?: number; + rateLimitFrequencyInSeconds?: number; + rateLimitPerFrequency?: number; + reasonForIncompletion?: string; + referenceTaskName?: string; + responseTimeoutSeconds?: number; + retried?: boolean; + retriedTaskId?: string; + retryCount?: number; + scheduledTime?: number; + seq?: number; + startDelayInSeconds?: number; + startTime?: number; + status?: + | "IN_PROGRESS" + | "CANCELED" + | "FAILED" + | "FAILED_WITH_TERMINAL_ERROR" + | "COMPLETED" + | "COMPLETED_WITH_ERRORS" + | "SCHEDULED" + | "TIMED_OUT" + | "SKIPPED"; + subWorkflowId?: string; + subworkflowChanged?: boolean; + taskDefName?: string; + taskDefinition?: TaskDef; + taskId?: string; + taskType?: string; + updateTime?: number; + workerId?: string; + workflowInstanceId?: string; + workflowPriority?: number; + workflowTask?: WorkflowTask; + workflowType?: string; +}; +``` + +### `TaskResult` + +```typescript +export type TaskResult = { + callbackAfterSeconds?: number; + extendLease?: boolean; + externalOutputPayloadStoragePath?: string; + logs?: Array; + outputData?: { + [key: string]: unknown; + }; + reasonForIncompletion?: string; + status?: + | "IN_PROGRESS" + | "FAILED" + | "FAILED_WITH_TERMINAL_ERROR" + | "COMPLETED"; + subWorkflowId?: string; + taskId: string; + workerId?: string; + workflowInstanceId: string; +}; +``` + +### `TaskResultStatusEnum` + +```typescript +export enum TaskResultStatusEnum { + IN_PROGRESS = "IN_PROGRESS", + FAILED = "FAILED", + FAILED_WITH_TERMINAL_ERROR = "FAILED_WITH_TERMINAL_ERROR", + COMPLETED = "COMPLETED", +} +``` + +### `RunnerArgs` + +```typescript +export interface RunnerArgs { + worker: ConductorWorker; + client: Client; + options: TaskRunnerOptions; + logger?: ConductorLogger; + onError?: TaskErrorHandler; + concurrency?: number; + maxRetries?: number; +} +``` + +### `TaskExecLog` + +```typescript +export type TaskExecLog = { + createdTime?: number; + log?: string; + taskId?: string; +}; +``` + +### `TaskDef` + +```typescript +export type TaskDef = { + name?: string; + description?: string; + retryCount?: number; + timeoutSeconds?: number; + inputKeys?: Array; + outputKeys?: Array; + timeoutPolicy?: "RETRY" | "TIME_OUT_WF" | "ALERT_ONLY"; + retryLogic?: "FIXED" | "EXPONENTIAL_BACKOFF" | "LINEAR_BACKOFF"; + retryDelaySeconds?: number; + responseTimeoutSeconds?: number; + concurrentExecLimit?: number; + inputTemplate?: { + [key: string]: unknown; + }; + rateLimitPerFrequency?: number; + rateLimitFrequencyInSeconds?: number; + isolationGroupId?: string; + executionNameSpace?: string; + ownerEmail?: string; + pollTimeoutSeconds?: number; + backoffScaleFactor?: number; + createTime?: number; + updateTime?: number; + createdBy?: string; + updatedBy?: string; + accessPolicy?: { + [key: string]: Array; + }; + workflowTaskType?: string; + archivalConfig?: { + enabled?: boolean; + archiveAfterDays?: number; + }; +}; +``` + +### `WorkflowTask` + +```typescript +export type WorkflowTask = { + name?: string; + taskReferenceName?: string; + description?: string; + inputParameters?: { + [key: string]: unknown; + }; + type?: string; + dynamicTaskNameParam?: string; + caseValueParam?: string; + caseValues?: Array; + dynamicForkJoinTasksParam?: string; + dynamicForkTasksParam?: string; + dynamicForkTasksInputParamName?: string; + defaultCase?: Array; + forkTasks?: Array>; + startDelay?: number; + subWorkflowParam?: { + name?: string; + version?: number; + taskToDomain?: { + [key: string]: string; + }; + workflowDefinition?: WorkflowDef; + }; + joinOn?: Array; + sink?: string; + optional?: boolean; + taskDefinition?: TaskDef; + rateLimited?: boolean; + defaultExclusiveJoinTask?: Array; + asyncComplete?: boolean; + loopCondition?: string; + loopOver?: Array; + retryCount?: number; + evaluatorType?: string; + expression?: string; + decisionCases?: { + [key: string]: Array; + }; + scriptExpression?: string; + eventTaskName?: string; + eventTaskInput?: { + [key: string]: unknown; + }; + status?: string; + retryLogic?: string; + retryDelaySeconds?: number; + timeoutSeconds?: number; + timeoutPolicy?: string; + responseTimeoutSeconds?: number; + concurrentExecLimit?: number; + rateLimitPerFrequency?: number; + rateLimitFrequencyInSeconds?: number; + isolationGroupId?: string; + executionNameSpace?: string; + ownerEmail?: string; + onStateChange?: { + [key: string]: unknown; + }; + defaultRetryPolicy?: { + initialIntervalSeconds?: number; + backoffCoefficient?: number; + maximumAttempts?: number; + maximumIntervalSeconds?: number; + }; +}; +``` + +### `WorkflowDef` + +```typescript +export type WorkflowDef = { + cacheConfig?: CacheConfig; + createTime?: number; + createdBy?: string; + description?: string; + enforceSchema?: boolean; + failureWorkflow?: string; + inputParameters?: Array; + inputSchema?: SchemaDef; + inputTemplate?: { + [key: string]: unknown; + }; + maskedFields?: Array; + metadata?: { + [key: string]: unknown; + }; + name: string; + outputParameters?: { + [key: string]: unknown; + }; + outputSchema?: SchemaDef; + ownerApp?: string; + ownerEmail?: string; + rateLimitConfig?: RateLimitConfig; + restartable?: boolean; + schemaVersion?: number; + tasks: Array; + timeoutPolicy?: "TIME_OUT_WF" | "ALERT_ONLY"; + timeoutSeconds: number; + updateTime?: number; + updatedBy?: string; + variables?: { + [key: string]: unknown; + }; + version?: number; + workflowStatusListenerEnabled?: boolean; + workflowStatusListenerSink?: string; +}; +``` diff --git a/docs/api-reference/template-client.md b/docs/api-reference/template-client.md index 5d06fc3c..481be89e 100644 --- a/docs/api-reference/template-client.md +++ b/docs/api-reference/template-client.md @@ -1,16 +1,16 @@ # TemplateClient API Reference -The `TemplateClient` class provides methods for managing human task templates (forms and UI). +The `TemplateClient` provides functionality for managing human task templates. Human task templates define the UI forms and schemas that are presented to users when they interact with human tasks in workflows. ## Constructor -### `new TemplateClient(client: ConductorClient)` +### `new TemplateClient(client: Client)` -Creates a new `TemplateClient`. +Creates a new TemplateClient. **Parameters:** -- `client` (`ConductorClient`): An instance of `ConductorClient`. +- `client` (`Client`): An instance of `Client`. --- @@ -18,29 +18,112 @@ Creates a new `TemplateClient`. ### `registerTemplate(template: HumanTaskTemplate, asNewVersion: boolean = false): Promise` -Registers a new human task template. +Register a new human task template or creates a new version of an existing template. **Parameters:** -- `template` (`HumanTaskTemplate`): The template to register. -- `asNewVersion` (`boolean`, optional): Whether to register the template as a new version. Defaults to `false`. +- `template` (`HumanTaskTemplate`): The human task template to register. +- `asNewVersion` (`boolean`, optional): Whether to create as a new version. Defaults to `false`. **Returns:** -- `Promise`: The registered template. - ---- +- `Promise`: The registered template. + +**Example:** + +```typescript +import { TemplateClient } from "@io-orkes/conductor-javascript"; + +const templateClient = new TemplateClient(client); + +// Register a new template +const template = { + name: "approval_form", + version: 1, + jsonSchema: { + type: "object", + properties: { + approved: { + type: "boolean", + description: "Approve the request", + }, + comments: { + type: "string", + description: "Additional comments", + }, + }, + required: ["approved"], + }, + templateUI: { + fields: [ + { + name: "approved", + type: "boolean", + label: "Approval", + required: true, + }, + { + name: "comments", + type: "text", + label: "Comments", + required: false, + }, + ], + }, +}; + +const registeredTemplate = await templateClient.registerTemplate(template); +console.log(`Template registered with version: ${registeredTemplate.version}`); +``` + +## Usage in Workflows + +Once registered, templates can be referenced in human tasks within workflows: + +```typescript +import { humanTask } from "@io-orkes/conductor-javascript"; + +const task = humanTask("approval_ref", "approval_task", { + template: "approval_form", // References the template name +}); +``` ## Type Definitions ### `HumanTaskTemplate` -| Property | Type | Description | -| --- | --- | --- | -| `createdBy` | `string` | The user who created the template. | -| `createdOn` | `number` | The creation time of the template. | -| `jsonSchema` | `Record` | The JSON schema of the template. | -| `name` | `string` | The name of the template. | -| `templateUI` | `Record` | The UI of the template. | -| `updatedBy` | `string` | The user who last updated the template. | -| `updatedOn` | `number` | The last update time of the template. | -| `version` | `number` | The version of the template. | + +Human task template definition that specifies the form schema and UI for human tasks. + +```typescript +export type HumanTaskTemplate = { + createTime?: number; + createdBy?: string; + jsonSchema: { + [key: string]: unknown; + }; + name: string; + ownerApp?: string; + tags?: Array; + templateUI: { + [key: string]: unknown; + }; + updateTime?: number; + updatedBy?: string; + version: number; +}; +``` + +### `Tag` + +Tag associated with a template for categorization and search. + +```typescript +export type Tag = { + key?: string; + /** + * @deprecated + */ + type?: string; + value?: string; +}; +``` diff --git a/docs/api-reference/workflow-executor.md b/docs/api-reference/workflow-executor.md index 2a5e316b..eec46f36 100644 --- a/docs/api-reference/workflow-executor.md +++ b/docs/api-reference/workflow-executor.md @@ -4,13 +4,13 @@ The `WorkflowExecutor` class is your main interface for managing workflows. It p ## Constructor -### `new WorkflowExecutor(client: ConductorClient)` +### `new WorkflowExecutor(client: Client)` Creates a new WorkflowExecutor. **Parameters:** -- `client` (`ConductorClient`): An instance of `ConductorClient`. +- `client` (`Client`): An instance of `Client`. --- @@ -18,16 +18,32 @@ Creates a new WorkflowExecutor. ### `registerWorkflow(override: boolean, workflow: WorkflowDef): Promise` -Registers a workflow definition. +Registers a workflow definition with Conductor. **Parameters:** -- `override` (`boolean`): Whether to override the existing workflow definition. -- `workflow` (`WorkflowDef`): The workflow definition. +- `override` (`boolean`): Whether to override the existing workflow definition. +- `workflow` (`WorkflowDef`): The workflow definition. **Returns:** -- `Promise` +- `Promise` + +**Example:** + +```typescript +import { WorkflowExecutor, workflow } from "@io-orkes/conductor-javascript"; + +const executor = new WorkflowExecutor(client); + +// Register a workflow +await executor.registerWorkflow( + true, + workflow("email_workflow", [ + simpleTask("send_email", "email_task", { to: "user@example.com" }), + ]) +); +``` --- @@ -37,33 +53,80 @@ Starts a new workflow execution. **Parameters:** -- `workflowRequest` (`StartWorkflowRequest`): The request to start a workflow. +- `workflowRequest` (`StartWorkflowRequest`): The request to start a workflow. **Returns:** -- `Promise`: The ID of the workflow instance. +- `Promise`: The ID of the workflow instance. + +**Example:** + +```typescript +import { WorkflowExecutor } from "@io-orkes/conductor-javascript"; + +const executor = new WorkflowExecutor(client); + +// Start a workflow +const executionId = await executor.startWorkflow({ + name: "email_workflow", + version: 1, + input: { + to: "user@example.com", + subject: "Welcome!", + message: "Welcome to our platform!", + }, +}); + +console.log(`Workflow started with ID: ${executionId}`); +``` --- ### `executeWorkflow(workflowRequest: StartWorkflowRequest, name: string, version: number, requestId: string, waitUntilTaskRef?: string): Promise` -### `executeWorkflow(workflowRequest: StartWorkflowRequest, name: string, version: number, requestId: string, waitUntilTaskRef: string, waitForSeconds: number, consistency: Consistency, returnStrategy: ReturnStrategy): Promise` + +### `executeWorkflow(workflowRequest: StartWorkflowRequest, name: string, version: number, requestId: string, waitUntilTaskRef: string, waitForSeconds: number, consistency: Consistency, returnStrategy: ReturnStrategy): Promise` Executes a workflow synchronously and waits for completion. Can return different responses based on the provided parameters. **Parameters:** -- `workflowRequest` (`StartWorkflowRequest`): The request to start a workflow. -- `name` (`string`): The name of the workflow. -- `version` (`number`): The version of the workflow. -- `requestId` (`string`): A unique ID for the request. -- `waitUntilTaskRef` (`string`, optional): The reference name of the task to wait for. -- `waitForSeconds` (`number`, optional): The number of seconds to wait for the task. -- `consistency` (`Consistency`, optional): The consistency level for the read operations. -- `returnStrategy` (`ReturnStrategy`, optional): The strategy for what data to return. +- `workflowRequest` (`StartWorkflowRequest`): The request to start a workflow. +- `name` (`string`): The name of the workflow. +- `version` (`number`): The version of the workflow. +- `requestId` (`string`): A unique ID for the request. +- `waitUntilTaskRef` (`string`, optional): The reference name of the task to wait for. +- `waitForSeconds` (`number`, optional): The number of seconds to wait for the task. +- `consistency` (`Consistency`, optional): The consistency level for the read operations. +- `returnStrategy` (`ReturnStrategy`, optional): The strategy for what data to return. **Returns:** -- `Promise`: A `WorkflowRun` object or a `SignalResponse` object. +- `Promise`: A `WorkflowRun` object or a `EnhancedSignalResponse` object. + +**Example:** + +```typescript +import { + WorkflowExecutor, + ReturnStrategy, +} from "@io-orkes/conductor-javascript"; + +const executor = new WorkflowExecutor(client); + +// Execute workflow synchronously +const workflowRun = await executor.executeWorkflow( + { + name: "data_processing", + version: 1, + input: { fileId: "file_123" }, + }, + "data_processing", + 1, + "req_123" +); + +console.log(`Workflow completed with status: ${workflowRun.status}`); +``` --- @@ -73,11 +136,32 @@ Starts multiple workflows at once. **Parameters:** -- `workflowsRequest` (`StartWorkflowRequest[]`): An array of workflow start requests. +- `workflowsRequest` (`StartWorkflowRequest[]`): An array of workflow start requests. **Returns:** -- `Promise[]`: An array of promises that resolve to the workflow instance IDs. +- `Promise[]`: An array of promises that resolve to the workflow instance IDs. + +**Example:** + +```typescript +import { WorkflowExecutor } from "@io-orkes/conductor-javascript"; + +const executor = new WorkflowExecutor(client); + +// Start multiple workflows +const workflowRequests = [ + { name: "email_workflow", version: 1, input: { to: "user1@example.com" } }, + { name: "email_workflow", version: 1, input: { to: "user2@example.com" } }, + { name: "email_workflow", version: 1, input: { to: "user3@example.com" } }, +]; + +const promises = executor.startWorkflows(workflowRequests); + +// Wait for all to complete +const executionIds = await Promise.all(promises); +console.log(`Started ${executionIds.length} workflows:`, executionIds); +``` --- @@ -87,13 +171,13 @@ Reruns a workflow from a specific task. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `taskFinderPredicate` (`TaskFinderPredicate`): A function to find the task to rerun from. -- `rerunWorkflowRequestOverrides` (`Partial`, optional): Overrides for the rerun request. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `taskFinderPredicate` (`TaskFinderPredicate`): A function to find the task to rerun from. +- `rerunWorkflowRequestOverrides` (`Partial`, optional): Overrides for the rerun request. **Returns:** -- `Promise` +- `Promise` --- @@ -103,12 +187,12 @@ Reruns a workflow from the first task of a specific type. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `taskType` (`string`): The type of the task to rerun from. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `taskType` (`string`): The type of the task to rerun from. **Returns:** -- `Promise` +- `Promise` --- @@ -118,13 +202,13 @@ Gets the execution status of a workflow. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `includeTasks` (`boolean`): Whether to include the tasks in the response. -- `retry` (`number`, optional): The number of times to retry on failure. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `includeTasks` (`boolean`): Whether to include the tasks in the response. +- `retry` (`number`, optional): The number of times to retry on failure. **Returns:** -- `Promise`: The workflow execution status. +- `Promise`: The workflow execution status. --- @@ -134,13 +218,13 @@ Gets a summary of the current workflow status. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `includeOutput` (`boolean`): Whether to include the output in the response. -- `includeVariables` (`boolean`): Whether to include the variables in the response. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `includeOutput` (`boolean`): Whether to include the output in the response. +- `includeVariables` (`boolean`): Whether to include the variables in the response. **Returns:** -- `Promise`: The workflow status summary. +- `Promise`: The workflow status summary. --- @@ -150,12 +234,12 @@ Gets the execution status of a workflow, including tasks by default. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `includeTasks` (`boolean`, optional): Whether to include the tasks in the response. Defaults to `true`. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `includeTasks` (`boolean`, optional): Whether to include the tasks in the response. Defaults to `true`. **Returns:** -- `Promise`: The workflow execution status. +- `Promise`: The workflow execution status. --- @@ -165,11 +249,11 @@ Pauses a running workflow. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `workflowInstanceId` (`string`): The ID of the workflow instance. **Returns:** -- `Promise` +- `Promise` --- @@ -179,12 +263,12 @@ Reruns a workflow with new parameters. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `rerunWorkflowRequest` (`Partial`, optional): Overrides for the rerun request. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `rerunWorkflowRequest` (`Partial`, optional): Overrides for the rerun request. **Returns:** -- `Promise`: The ID of the new workflow instance. +- `Promise`: The ID of the new workflow instance. --- @@ -194,12 +278,12 @@ Restarts a workflow. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `useLatestDefinitions` (`boolean`): Whether to use the latest workflow definition. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `useLatestDefinitions` (`boolean`): Whether to use the latest workflow definition. **Returns:** -- `Promise` +- `Promise` --- @@ -209,11 +293,11 @@ Resumes a paused workflow. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `workflowInstanceId` (`string`): The ID of the workflow instance. **Returns:** -- `Promise` +- `Promise` --- @@ -223,12 +307,12 @@ Retries a workflow from the last failing task. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `resumeSubworkflowTasks` (`boolean`): Whether to resume tasks in sub-workflows. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `resumeSubworkflowTasks` (`boolean`): Whether to resume tasks in sub-workflows. **Returns:** -- `Promise` +- `Promise` --- @@ -238,16 +322,16 @@ Searches for workflows. **Parameters:** -- `start` (`number`): The starting offset. -- `size` (`number`): The number of results to return. -- `query` (`string`): The search query. -- `freeText` (`string`): The free text to search for. -- `sort` (`string`, optional): The sort order. -- `skipCache` (`boolean`, optional): Whether to skip the cache. +- `start` (`number`): The starting offset. +- `size` (`number`): The number of results to return. +- `query` (`string`): The search query. +- `freeText` (`string`): The free text to search for. +- `sort` (`string`, optional): The sort order. +- `skipCache` (`boolean`, optional): Whether to skip the cache. **Returns:** -- `Promise`: The search results. +- `Promise`: The search results. --- @@ -257,13 +341,13 @@ Skips a task in a running workflow. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `taskReferenceName` (`string`): The reference name of the task to skip. -- `skipTaskRequest` (`Partial`): The request to skip the task. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `taskReferenceName` (`string`): The reference name of the task to skip. +- `skipTaskRequest` (`Partial`): The request to skip the task. **Returns:** -- `Promise` +- `Promise` --- @@ -273,12 +357,12 @@ Terminates a running workflow. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `reason` (`string`): The reason for termination. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `reason` (`string`): The reason for termination. **Returns:** -- `Promise` +- `Promise` --- @@ -288,14 +372,14 @@ Updates a task by its ID. **Parameters:** -- `taskId` (`string`): The ID of the task. -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `taskStatus` (`TaskResultStatus`): The new status of the task. -- `outputData` (`Record`): The output data of the task. +- `taskId` (`string`): The ID of the task. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `taskStatus` (`TaskResultStatus`): The new status of the task. +- `outputData` (`Record`): The output data of the task. **Returns:** -- `Promise` +- `Promise` --- @@ -305,14 +389,14 @@ Updates a task by its reference name. **Parameters:** -- `taskReferenceName` (`string`): The reference name of the task. -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `status` (`TaskResultStatus`): The new status of the task. -- `taskOutput` (`Record`): The output data of the task. +- `taskReferenceName` (`string`): The reference name of the task. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `status` (`TaskResultStatus`): The new status of the task. +- `taskOutput` (`Record`): The output data of the task. **Returns:** -- `Promise` +- `Promise` --- @@ -322,11 +406,11 @@ Gets a task by its ID. **Parameters:** -- `taskId` (`string`): The ID of the task. +- `taskId` (`string`): The ID of the task. **Returns:** -- `Promise`: The task. +- `Promise`: The task. --- @@ -336,32 +420,32 @@ Updates a task by its reference name synchronously and returns the complete work **Parameters:** -- `taskReferenceName` (`string`): The reference name of the task. -- `workflowInstanceId` (`string`): The ID of the workflow instance. -- `status` (`TaskResultStatusEnum`): The new status of the task. -- `taskOutput` (`Record`): The output data of the task. -- `workerId` (`string`, optional): The ID of the worker. +- `taskReferenceName` (`string`): The reference name of the task. +- `workflowInstanceId` (`string`): The ID of the workflow instance. +- `status` (`TaskResultStatusEnum`): The new status of the task. +- `taskOutput` (`Record`): The output data of the task. +- `workerId` (`string`, optional): The ID of the worker. **Returns:** -- `Promise`: The updated workflow. +- `Promise`: The updated workflow. --- -### `signal(workflowInstanceId: string, status: TaskResultStatusEnum, taskOutput: Record, returnStrategy: ReturnStrategy = ReturnStrategy.TARGET_WORKFLOW): Promise` +### `signal(workflowInstanceId: string, status: TaskResultStatusEnum, taskOutput: Record, returnStrategy: ReturnStrategy = ReturnStrategy.TARGET_WORKFLOW): Promise` Signals a workflow task and returns data based on the specified return strategy. **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance to signal. -- `status` (`TaskResultStatusEnum`): The task status to set. -- `taskOutput` (`Record`): The output data for the task. -- `returnStrategy` (`ReturnStrategy`, optional): The strategy for what data to return. Defaults to `TARGET_WORKFLOW`. +- `workflowInstanceId` (`string`): The ID of the workflow instance to signal. +- `status` (`TaskResultStatusEnum`): The task status to set. +- `taskOutput` (`Record`): The output data for the task. +- `returnStrategy` (`ReturnStrategy`, optional): The strategy for what data to return. Defaults to `TARGET_WORKFLOW`. **Returns:** -- `Promise`: The response from the signal. +- `Promise`: The response from the signal. --- @@ -371,206 +455,567 @@ Signals a workflow task asynchronously (fire-and-forget). **Parameters:** -- `workflowInstanceId` (`string`): The ID of the workflow instance to signal. -- `status` (`TaskResultStatusEnum`): The task status to set. -- `taskOutput` (`Record`): The output data for the task. +- `workflowInstanceId` (`string`): The ID of the workflow instance to signal. +- `status` (`TaskResultStatusEnum`): The task status to set. +- `taskOutput` (`Record`): The output data for the task. **Returns:** -- `Promise` +- `Promise` --- ## Type Definitions +### `Consistency` + +```typescript +enum Consistency { + SYNCHRONOUS = "SYNCHRONOUS", + DURABLE = "DURABLE", + REGION_DURABLE = "REGION_DURABLE", +} +``` + +### `ReturnStrategy` + +```typescript +enum ReturnStrategy { + TARGET_WORKFLOW = "TARGET_WORKFLOW", + BLOCKING_WORKFLOW = "BLOCKING_WORKFLOW", + BLOCKING_TASK = "BLOCKING_TASK", + BLOCKING_TASK_INPUT = "BLOCKING_TASK_INPUT", +} +``` + +### `TaskResultStatusEnum` + +```typescript +enum TaskResultStatusEnum { + IN_PROGRESS = "IN_PROGRESS", + FAILED = "FAILED", + FAILED_WITH_TERMINAL_ERROR = "FAILED_WITH_TERMINAL_ERROR", + COMPLETED = "COMPLETED", +} +``` + +### `StartWorkflowRequest` + +```typescript +type StartWorkflowRequest = { + correlationId?: string; + createdBy?: string; + externalInputPayloadStoragePath?: string; + idempotencyKey?: string; + idempotencyStrategy?: "FAIL" | "RETURN_EXISTING" | "FAIL_ON_RUNNING"; + input?: { + [key: string]: unknown; + }; + name: string; + priority?: number; + taskToDomain?: { + [key: string]: string; + }; + version?: number; + workflowDef?: WorkflowDef; +}; +``` + ### `WorkflowDef` -| Property | Type | Description | -| --- | --- | --- | -| `ownerApp` | `string` | The owner app of the workflow. | -| `createTime` | `number` | The creation time of the workflow. | -| `updateTime` | `number` | The last update time of the workflow. | -| `createdBy` | `string` | The user who created the workflow. | -| `updatedBy` | `string` | The user who last updated the workflow. | -| `name` | `string` | The name of the workflow. | -| `description` | `string` | The description of the workflow. | -| `version` | `number` | The version of the workflow. | -| `tasks` | `WorkflowTask[]` | The tasks in the workflow. | -| `inputParameters` | `string[]` | The input parameters of the workflow. | -| `outputParameters` | `Record` | The output parameters of the workflow. | -| `failureWorkflow` | `string` | The failure workflow. | -| `schemaVersion` | `number` | The schema version of the workflow. | -| `restartable` | `boolean` | Whether the workflow is restartable. | -| `workflowStatusListenerEnabled` | `boolean` | Whether the workflow status listener is enabled. | -| `ownerEmail` | `string` | The owner email of the workflow. | -| `timeoutPolicy` | `'TIME_OUT_WF' \| 'ALERT_ONLY'` | The timeout policy of the workflow. | -| `timeoutSeconds` | `number` | The timeout in seconds of the workflow. | -| `variables` | `Record` | The variables of the workflow. | -| `inputTemplate` | `Record` | The input template of the workflow. | + +```typescript +interface WorkflowDef { + name: string; + description?: string; + version?: number; + tasks: WorkflowTask[]; + inputParameters?: string[]; + outputParameters?: Record; + failureWorkflow?: string; + schemaVersion?: number; + restartable?: boolean; + workflowStatusListenerEnabled?: boolean; + workflowStatusListenerSink?: string; + ownerEmail?: string; + ownerApp?: string; + timeoutPolicy?: "TIME_OUT_WF" | "ALERT_ONLY"; + timeoutSeconds?: number; + variables?: Record; + inputTemplate?: Record; + inputSchema?: SchemaDef; + outputSchema?: SchemaDef; + enforceSchema?: boolean; + maskedFields?: string[]; + rateLimitConfig?: RateLimitConfig; + cacheConfig?: CacheConfig; + metadata?: Record; + createTime?: number; + updateTime?: number; + createdBy?: string; + updatedBy?: string; +} +``` + +### `CacheConfig` + +```typescript +export type CacheConfig = { + key?: string; + ttlInSecond?: number; +}; +``` + +### `RateLimitConfig` + +```typescript +export type RateLimitConfig = { + concurrentExecLimit?: number; + rateLimitKey?: string; +}; +``` ### `WorkflowTask` -| Property | Type | Description | -| --- | --- | --- | -| `name` | `string` | The name of the task. | -| `taskReferenceName` | `string` | The reference name of the task. | -| `description` | `string` | The description of the task. | -| `inputParameters` | `Record` | The input parameters of the task. | -| `type` | `string` | The type of the task. | -| `dynamicTaskNameParam` | `string` | The dynamic task name parameter. | -| `caseValueParam` | `string` | The case value parameter. | -| `caseExpression` | `string` | The case expression. | -| `scriptExpression` | `string` | The script expression. | -| `decisionCases` | `Record>` | The decision cases. | -| `dynamicForkJoinTasksParam`| `string` | The dynamic fork join tasks parameter. | -| `dynamicForkTasksParam` | `string` | The dynamic fork tasks parameter. | -| `dynamicForkTasksInputParamName` | `string` | The dynamic fork tasks input parameter name. | -| `defaultCase` | `WorkflowTask[]` | The default case. | -| `forkTasks` | `WorkflowTask[][]` | The fork tasks. | -| `startDelay` | `number` | The start delay in seconds. | -| `subWorkflowParam` | `SubWorkflowParams` | The sub-workflow parameters. | -| `joinOn` | `string[]` | The join on tasks. | -| `sink` | `string` | The sink. | -| `optional` | `boolean` | Whether the task is optional. | -| `taskDefinition` | `TaskDef` | The task definition. | -| `rateLimited` | `boolean` | Whether the task is rate limited. | -| `defaultExclusiveJoinTask` | `string[]` | The default exclusive join task. | -| `asyncComplete` | `boolean` | Whether the task is async complete. | -| `loopCondition` | `string` | The loop condition. | -| `loopOver` | `WorkflowTask[]` | The loop over tasks. | -| `retryCount` | `number` | The retry count. | -| `evaluatorType` | `string` | The evaluator type. | -| `expression` | `string` | The expression. | -| `workflowTaskType` | `'SIMPLE' \| 'DYNAMIC' \| 'FORK_JOIN' \| 'FORK_JOIN_DYNAMIC' \| 'DECISION' \| 'SWITCH' \| 'JOIN' \| 'DO_WHILE' \| 'SUB_WORKFLOW' \| 'START_WORKFLOW' \| 'EVENT' \| 'WAIT' \| 'HUMAN' \| 'USER_DEFINED' \| 'HTTP' \| 'LAMBDA' \| 'INLINE' \| 'EXCLUSIVE_JOIN' \| 'TERMINATE' \| 'KAFKA_PUBLISH' \| 'JSON_JQ_TRANSFORM' \| 'SET_VARIABLE'` | The type of the workflow task. | + +```typescript +interface WorkflowTask { + name: string; + taskReferenceName: string; + type: string; + description?: string; + optional?: boolean; + inputParameters?: Record; + asyncComplete?: boolean; + startDelay?: number; + retryCount?: number; + evaluatorType?: string; + expression?: string; + decisionCases?: Record; + defaultCase?: WorkflowTask[]; + forkTasks?: WorkflowTask[][]; + joinOn?: string[]; + joinStatus?: string; + loopCondition?: string; + loopOver?: WorkflowTask[]; + dynamicTaskNameParam?: string; + dynamicForkTasksParam?: string; + dynamicForkTasksInputParamName?: string; + defaultExclusiveJoinTask?: string[]; + caseExpression?: string; + caseValueParam?: string; + sink?: string; + taskDefinition?: TaskDef; + rateLimited?: boolean; + permissive?: boolean; + cacheConfig?: CacheConfig; + onStateChange?: Record; + scriptExpression?: string; + subWorkflowParam?: SubWorkflowParams; +} +``` + +### `SubWorkflowParams` + +```typescript +export type SubWorkflowParams = { + idempotencyKey?: string; + idempotencyStrategy?: "FAIL" | "RETURN_EXISTING" | "FAIL_ON_RUNNING"; + name?: string; + taskToDomain?: { + [key: string]: string; + }; + version?: number; + workflowDefinition?: WorkflowDef; +}; +``` + +### `StateChangeEvent` + +```typescript +export type StateChangeEvent = { + payload?: { + [key: string]: unknown; + }; + type: string; +}; +``` ### `WorkflowRun` -| Property | Type | Description | -| --- | --- | --- | -| `correlationId` | `string` | The correlation ID of the workflow. | -| `createTime` | `number` | The creation time of the workflow. | -| `createdBy` | `string` | The user who created the workflow. | -| `priority` | `number` | The priority of the workflow. | -| `requestId` | `string` | The request ID of the workflow. | -| `status` | `string` | The status of the workflow. | -| `tasks` | `Task[]` | The tasks in the workflow. | -| `updateTime` | `number` | The last update time of the workflow. | -| `workflowId` | `string` | The ID of the workflow instance. | -| `variables` | `Record` | The variables of the workflow. | -| `input` | `Record` | The input data for the workflow. | -| `output` | `Record` | The output data for the workflow. | - -### `SignalResponse` -`SignalResponse` represents a unified response from the signal API. It contains different fields depending on the `returnStrategy` used. It also has helper methods to extract the workflow or task details from the response. + +```typescript +type WorkflowRun = { + correlationId?: string; + createTime?: number; + createdBy?: string; + input?: { + [key: string]: unknown; + }; + output?: { + [key: string]: unknown; + }; + priority?: number; + requestId?: string; + responseType?: + | "TARGET_WORKFLOW" + | "BLOCKING_WORKFLOW" + | "BLOCKING_TASK" + | "BLOCKING_TASK_INPUT"; + status?: + | "RUNNING" + | "COMPLETED" + | "FAILED" + | "TIMED_OUT" + | "TERMINATED" + | "PAUSED"; + targetWorkflowId?: string; + targetWorkflowStatus?: string; + tasks?: Array; + updateTime?: number; + variables?: { + [key: string]: unknown; + }; + workflowId?: string; +}; +``` + +### `EnhancedSignalResponse` + +```typescript +interface EnhancedSignalResponse extends SignalResponse { + correlationId?: string; + input?: { + [key: string]: unknown; + }; + output?: { + [key: string]: unknown; + }; + requestId?: string; + responseType?: + | "TARGET_WORKFLOW" + | "BLOCKING_WORKFLOW" + | "BLOCKING_TASK" + | "BLOCKING_TASK_INPUT"; + targetWorkflowId?: string; + targetWorkflowStatus?: string; + workflowId?: string; + priority?: number; + variables?: Record; + tasks?: Task[]; + createdBy?: string; + createTime?: number; + status?: string; + updateTime?: number; + taskType?: string; + taskId?: string; + referenceTaskName?: string; + retryCount?: number; + taskDefName?: string; + workflowType?: string; + isTargetWorkflow(): boolean; + isBlockingWorkflow(): boolean; + isBlockingTask(): boolean; + isBlockingTaskInput(): boolean; + getWorkflow(): Workflow; + getBlockingTask(): Task; + getTaskInput(): Record; + getWorkflowId(): string; + getTargetWorkflowId(): string; + hasWorkflowData(): boolean; + hasTaskData(): boolean; + getResponseType(): string; + isTerminal(): boolean; + isRunning(): boolean; + isPaused(): boolean; + getSummary(): string; + toDebugJSON(): Record; + toString(): string; +} +``` ### `TaskFinderPredicate` -`TaskFinderPredicate` is a function that takes a `Task` and returns a boolean. It is used to find a specific task in a workflow. -` (task: Task) => boolean` + +```typescript +type TaskFinderPredicate = (task: Task) => boolean; +``` ### `RerunWorkflowRequest` -| Property | Type | Description | -| --- | --- | --- | -| `reRunFromWorkflowId` | `string` | The ID of the workflow to rerun from. | -| `workflowInput` | `Record` | The input data for the workflow. | -| `reRunFromTaskId` | `string` | The ID of the task to rerun from. | -| `taskInput` | `Record` | The input data for the task. | -| `correlationId` | `string` | The correlation ID of the workflow. | + +```typescript +type RerunWorkflowRequest = { + correlationId?: string; + reRunFromTaskId?: string; + reRunFromWorkflowId?: string; + taskInput?: { + [key: string]: unknown; + }; + workflowInput?: { + [key: string]: unknown; + }; +}; +``` ### `Workflow` -| Property | Type | Description | -| --- | --- | --- | -| `ownerApp` | `string` | The owner app of the workflow. | -| `createTime` | `number` | The creation time of the workflow. | -| `updateTime` | `number` | The last update time of the workflow. | -| `createdBy` | `string` | The user who created the workflow. | -| `updatedBy` | `string` | The user who last updated the workflow. | -| `status` | `'RUNNING' \| 'COMPLETED' \| 'FAILED' \| 'TIMED_OUT' \| 'TERMINATED' \| 'PAUSED'` | The status of the workflow. | -| `idempotencyKey` | `string` | The idempotency key for the workflow. | -| `endTime` | `number` | The end time of the workflow. | -| `workflowId` | `string` | The ID of the workflow instance. | -| `parentWorkflowId` | `string` | The ID of the parent workflow instance. | -| `parentWorkflowTaskId` | `string` | The ID of the parent workflow task. | -| `tasks` | `Task[]` | The tasks in the workflow. | -| `input` | `Record` | The input data for the workflow. | -| `output` | `Record` | The output data for the workflow. | -| `correlationId` | `string` | The correlation ID of the workflow. | -| `reRunFromWorkflowId` | `string` | The ID of the workflow to rerun from. | -| `reasonForIncompletion` | `string` | The reason for incompletion. | -| `event` | `string` | The event that triggered the workflow. | -| `taskToDomain` | `Record` | A map of task reference names to domains. | -| `failedReferenceTaskNames` | `string[]` | A list of failed task reference names. | -| `workflowDefinition` | `WorkflowDef` | The workflow definition. | -| `externalInputPayloadStoragePath`| `string` | The path to the external input payload storage. | -| `externalOutputPayloadStoragePath`| `string` | The path to the external output payload storage. | -| `priority` | `number` | The priority of the workflow. | -| `variables` | `Record` | The variables of the workflow. | -| `lastRetriedTime` | `number` | The last time the workflow was retried. | -| `startTime` | `number` | The start time of the workflow. | -| `workflowVersion` | `number` | The version of the workflow. | -| `workflowName` | `string` | The name of the workflow. | + +```typescript +type Workflow = { + correlationId?: string; + createTime?: number; + createdBy?: string; + endTime?: number; + event?: string; + externalInputPayloadStoragePath?: string; + externalOutputPayloadStoragePath?: string; + failedReferenceTaskNames?: Array; + failedTaskNames?: Array; + history?: Array; + idempotencyKey?: string; + input?: { + [key: string]: unknown; + }; + lastRetriedTime?: number; + output?: { + [key: string]: unknown; + }; + ownerApp?: string; + parentWorkflowId?: string; + parentWorkflowTaskId?: string; + priority?: number; + rateLimitKey?: string; + rateLimited?: boolean; + reRunFromWorkflowId?: string; + reasonForIncompletion?: string; + startTime?: number; + status?: + | "RUNNING" + | "COMPLETED" + | "FAILED" + | "TIMED_OUT" + | "TERMINATED" + | "PAUSED"; + taskToDomain?: { + [key: string]: string; + }; + tasks?: Array; + updateTime?: number; + updatedBy?: string; + variables?: { + [key: string]: unknown; + }; + workflowDefinition?: WorkflowDef; + workflowId?: string; + workflowName?: string; + workflowVersion?: number; +}; +``` ### `WorkflowStatus` -| Property | Type | Description | -| --- | --- | --- | -| `workflowId` | `string` | The ID of the workflow instance. | -| `correlationId` | `string` | The correlation ID of the workflow. | -| `output` | `Record` | The output data for the workflow. | -| `variables` | `Record` | The variables of the workflow. | -| `status` | `'RUNNING' \| 'COMPLETED' \| 'FAILED' \| 'TIMED_OUT' \| 'TERMINATED' \| 'PAUSED'` | The status of the workflow. | + +```typescript +type WorkflowStatus = { + correlationId?: string; + output?: { + [key: string]: unknown; + }; + status?: + | "RUNNING" + | "COMPLETED" + | "FAILED" + | "TIMED_OUT" + | "TERMINATED" + | "PAUSED"; + variables?: { + [key: string]: unknown; + }; + workflowId?: string; +}; +``` ### `ScrollableSearchResultWorkflowSummary` -| Property | Type | Description | -| --- | --- | --- | -| `results` | `WorkflowSummary[]` | The search results. | -| `totalHits` | `number` | The total number of hits. | + +```typescript +type ScrollableSearchResultWorkflowSummary = { + queryId?: string; + results?: Array; + totalHits?: number; +}; +``` + +### `WorkflowSummary` + +```typescript +export type WorkflowSummary = { + correlationId?: string; + createdBy?: string; + endTime?: string; + event?: string; + executionTime?: number; + externalInputPayloadStoragePath?: string; + externalOutputPayloadStoragePath?: string; + failedReferenceTaskNames?: string; + failedTaskNames?: Array; + idempotencyKey?: string; + input?: string; + inputSize?: number; + output?: string; + outputSize?: number; + priority?: number; + reasonForIncompletion?: string; + startTime?: string; + status?: + | "RUNNING" + | "COMPLETED" + | "FAILED" + | "TIMED_OUT" + | "TERMINATED" + | "PAUSED"; + taskToDomain?: { + [key: string]: string; + }; + updateTime?: string; + version?: number; + workflowId?: string; + workflowType?: string; +}; +``` ### `SkipTaskRequest` -| Property | Type | Description | -| --- | --- | --- | -| `taskInput` | `Record` | The input data for the task. | -| `taskOutput` | `Record` | The output data for the task. | + +```typescript +type SkipTaskRequest = { + taskInput?: { + [key: string]: unknown; + }; + taskOutput?: { + [key: string]: unknown; + }; +}; +``` ### `TaskResultStatus` -`TaskResultStatus` is a string that represents the status of a task result. It can be one of the following values: `'IN_PROGRESS'`, `'FAILED'`, `'FAILED_WITH_TERMINAL_ERROR'`, `'COMPLETED'`. + +```typescript +type TaskResultStatus = + | "IN_PROGRESS" + | "FAILED" + | "FAILED_WITH_TERMINAL_ERROR" + | "COMPLETED"; +``` + +### `TaskDef` + +```typescript +type TaskDef = { + backoffScaleFactor?: number; + baseType?: string; + concurrentExecLimit?: number; + createTime?: number; + createdBy?: string; + description?: string; + enforceSchema?: boolean; + executionNameSpace?: string; + inputKeys?: Array; + inputSchema?: SchemaDef; + inputTemplate?: { + [key: string]: unknown; + }; + isolationGroupId?: string; + name: string; + outputKeys?: Array; + outputSchema?: SchemaDef; + ownerApp?: string; + ownerEmail?: string; + pollTimeoutSeconds?: number; + rateLimitFrequencyInSeconds?: number; + rateLimitPerFrequency?: number; + responseTimeoutSeconds?: number; + retryCount?: number; + retryDelaySeconds?: number; + retryLogic?: "FIXED" | "EXPONENTIAL_BACKOFF" | "LINEAR_BACKOFF"; + timeoutPolicy?: "RETRY" | "TIME_OUT_WF" | "ALERT_ONLY"; + timeoutSeconds: number; + totalTimeoutSeconds: number; + updateTime?: number; + updatedBy?: string; +}; +``` ### `Task` -| Property | Type | Description | -| --- | --- | --- | -| `taskType` | `string` | The type of the task. | -| `status` | `'IN_PROGRESS' \| 'CANCELED' \| 'FAILED' \| 'FAILED_WITH_TERMINAL_ERROR' \| 'COMPLETED' \| 'COMPLETED_WITH_ERRORS' \| 'SCHEDULED' \| 'TIMED_OUT' \| 'SKIPPED'` | The status of the task. | -| `inputData` | `Record` | The input data for the task. | -| `referenceTaskName` | `string` | The reference name of the task. | -| `retryCount` | `number` | The retry count. | -| `seq` | `number` | The sequence number of the task. | -| `correlationId` | `string` | The correlation ID of the task. | -| `pollCount` | `number` | The poll count. | -| `taskDefName` | `string` | The name of the task definition. | -| `scheduledTime` | `number` | The scheduled time of the task. | -| `startTime` | `number` | The start time of the task. | -| `endTime` | `number` | The end time of the task. | -| `updateTime` | `number` | The last update time of the task. | -| `startDelayInSeconds` | `number` | The start delay in seconds. | -| `retriedTaskId` | `string` | The ID of the retried task. | -| `retried` | `boolean` | Whether the task was retried. | -| `executed` | `boolean` | Whether the task was executed. | -| `callbackFromWorker` | `boolean` | Whether the callback is from a worker. | -| `responseTimeoutSeconds` | `number` | The response timeout in seconds. | -| `workflowInstanceId` | `string` | The ID of the workflow instance. | -| `workflowType` | `string` | The type of the workflow. | -| `taskId` | `string` | The ID of the task. | -| `reasonForIncompletion` | `string` | The reason for incompletion. | -| `callbackAfterSeconds` | `number` | The callback after seconds. | -| `workerId` | `string` | The ID of the worker. | -| `outputData` | `Record` | The output data of the task. | -| `workflowTask` | `WorkflowTask` | The workflow task. | -| `domain` | `string` | The domain of the task. | -| `rateLimitPerFrequency` | `number` | The rate limit per frequency. | -| `rateLimitFrequencyInSeconds` | `number` | The rate limit frequency in seconds. | -| `externalInputPayloadStoragePath`| `string` | The path to the external input payload storage. | -| `externalOutputPayloadStoragePath`| `string` | The path to the external output payload storage. | -| `workflowPriority` | `number` | The priority of the workflow. | -| `executionNameSpace` | `string` | The execution namespace. | -| `isolationGroupId` | `string` | The isolation group ID. | -| `iteration` | `number` | The iteration number. | -| `subWorkflowId` | `string` | The ID of the sub-workflow. | -| `subworkflowChanged` | `boolean` | Whether the sub-workflow was changed. | -| `queueWaitTime` | `number` | The queue wait time. | -| `taskDefinition` | `TaskDef` | The task definition. | -| `loopOverTask` | `boolean` | Whether the task is a loop over task. | + +```typescript +type Task = { + callbackAfterSeconds?: number; + callbackFromWorker?: boolean; + correlationId?: string; + domain?: string; + endTime?: number; + executed?: boolean; + executionNameSpace?: string; + externalInputPayloadStoragePath?: string; + externalOutputPayloadStoragePath?: string; + firstStartTime?: number; + inputData?: { + [key: string]: unknown; + }; + isolationGroupId?: string; + iteration?: number; + loopOverTask?: boolean; + outputData?: { + [key: string]: unknown; + }; + parentTaskId?: string; + pollCount?: number; + queueWaitTime?: number; + rateLimitFrequencyInSeconds?: number; + rateLimitPerFrequency?: number; + reasonForIncompletion?: string; + referenceTaskName?: string; + responseTimeoutSeconds?: number; + retried?: boolean; + retriedTaskId?: string; + retryCount?: number; + scheduledTime?: number; + seq?: number; + startDelayInSeconds?: number; + startTime?: number; + status?: + | "IN_PROGRESS" + | "CANCELED" + | "FAILED" + | "FAILED_WITH_TERMINAL_ERROR" + | "COMPLETED" + | "COMPLETED_WITH_ERRORS" + | "SCHEDULED" + | "TIMED_OUT" + | "SKIPPED"; + subWorkflowId?: string; + subworkflowChanged?: boolean; + taskDefName?: string; + taskDefinition?: TaskDef; + taskId?: string; + taskType?: string; + updateTime?: number; + workerId?: string; + workflowInstanceId?: string; + workflowPriority?: number; + workflowTask?: WorkflowTask; + workflowType?: string; +}; +``` + +### `SchemaDef` + +```typescript +export type SchemaDef = { + createTime?: number; + createdBy?: string; + data?: { + [key: string]: unknown; + }; + externalRef?: string; + name: string; + ownerApp?: string; + type: "JSON" | "AVRO" | "PROTOBUF"; + updateTime?: number; + updatedBy?: string; + version: number; +}; +``` diff --git a/integration-tests/common/EventResourceService.test.ts b/integration-tests/common/EventResourceService.test.ts index 09718dd8..4b2b8dbd 100644 --- a/integration-tests/common/EventResourceService.test.ts +++ b/integration-tests/common/EventResourceService.test.ts @@ -1,10 +1,11 @@ import { expect, describe, test } from "@jest/globals"; import { orkesConductorClient } from "../../src/orkes"; +import { EventResource } from "../../src/common/open-api/sdk.gen"; describe("EventResourceService", () => { test("Should create an event handler with description and tags and then delete it", async () => { - const orkesClient = await orkesConductorClient(); - const eventApi = orkesClient.eventResource; + const client = await orkesConductorClient(); + const eventApi = EventResource; const now = Date.now(); const [eventName, event, eventDescription, eventTagKey, eventTagValue] = [ @@ -24,8 +25,14 @@ describe("EventResourceService", () => { tags: [{ key: eventTagKey, value: eventTagValue }], }; - await eventApi.addEventHandler(eventHandler); - const eventHandlers = await eventApi.getEventHandlersForEvent(event); + await eventApi.addEventHandler({ body: [eventHandler], client }); + const { data: eventHandlers } = await eventApi.getEventHandlersForEvent({ + path: { event }, + client, + }); + if (!eventHandlers) { + throw new Error("Event handlers not found"); + } expect(eventHandlers.length).toEqual(1); expect(eventHandlers[0].description).toEqual(eventDescription); @@ -33,10 +40,15 @@ describe("EventResourceService", () => { { key: eventTagKey, value: eventTagValue }, ]); - await eventApi.removeEventHandlerStatus(eventName); - const eventHandlersAfterRemove = await eventApi.getEventHandlersForEvent( - event - ); + await eventApi.removeEventHandlerStatus({ + path: { name: eventName }, + client, + }); + const { data: eventHandlersAfterRemove } = + await eventApi.getEventHandlersForEvent({ path: { event }, client }); + if (!eventHandlersAfterRemove) { + throw new Error("Event handlers not found"); + } expect(eventHandlersAfterRemove.length).toEqual(0); }); diff --git a/integration-tests/common/MetadataClient.test.ts b/integration-tests/common/MetadataClient.test.ts index 02ff50d8..4d87d872 100644 --- a/integration-tests/common/MetadataClient.test.ts +++ b/integration-tests/common/MetadataClient.test.ts @@ -36,10 +36,13 @@ describe("MetadataClient", () => { await expect( metadataClient.registerTask(newTaskDefinition) ).resolves.not.toThrow(); - const taskDefinitionFromApi = await client.metadataResource.getTaskDef( + const taskDefinitionFromApi = await metadataClient.getTask( newTaskDefinition.name ); + if (!taskDefinitionFromApi) { + throw new Error("Task definition not found"); + } expect(taskDefinitionFromApi.name).toEqual(newTaskDefinition.name); expect(taskDefinitionFromApi.description).toEqual(newTaskDefinition.description); expect(taskDefinitionFromApi.retryCount).toEqual(newTaskDefinition.retryCount); @@ -86,10 +89,13 @@ describe("MetadataClient", () => { await expect( metadataClient.updateTask(newTaskDefinition) ).resolves.not.toThrow(); - const taskDefinitionFromApi = await client.metadataResource.getTaskDef( + const taskDefinitionFromApi = await metadataClient.getTask( newTaskDefinition.name ); + if (!taskDefinitionFromApi) { + throw new Error("Task definition not found"); + } expect(taskDefinitionFromApi.description).toEqual(newTaskDefinition.description); expect(taskDefinitionFromApi.retryCount).toEqual(newTaskDefinition.retryCount); expect(taskDefinitionFromApi.timeoutSeconds).toEqual(newTaskDefinition.timeoutSeconds); @@ -116,7 +122,7 @@ describe("MetadataClient", () => { metadataClient.unregisterTask(taskName) ).resolves.not.toThrow(); - await expect(client.metadataResource.getTaskDef( + await expect(metadataClient.getTask( taskName )).rejects.toThrow(); }) diff --git a/integration-tests/common/TaskManager.test.ts b/integration-tests/common/TaskManager.test.ts index 9869463b..16d0407e 100644 --- a/integration-tests/common/TaskManager.test.ts +++ b/integration-tests/common/TaskManager.test.ts @@ -1,5 +1,10 @@ import { expect, describe, test, jest } from "@jest/globals"; -import { simpleTask, taskDefinition, WorkflowExecutor } from "../../src/core"; +import { + MetadataClient, + simpleTask, + taskDefinition, + WorkflowExecutor, +} from "../../src/core"; import { orkesConductorClient } from "../../src/orkes"; import { TaskManager, ConductorWorker } from "../../src/task/index"; import { mockLogger } from "../utils/mockLogger"; @@ -50,6 +55,10 @@ describe("TaskManager", () => { version: 1, }); + if (!executionId) { + throw new Error("Execution ID is undefined"); + } + const workflowStatus = await waitForWorkflowCompletion( executor, executionId, @@ -64,6 +73,7 @@ describe("TaskManager", () => { test("On error it should call the errorHandler provided", async () => { const client = await clientPromise; const executor = new WorkflowExecutor(client); + const metadataClient = new MetadataClient(client); const taskName = `jsSdkTest-taskmanager-error-handler-test-${Date.now()}`; const workflowName = `jsSdkTest-taskmanager-error-handler-test-wf-${Date.now()}`; @@ -76,13 +86,13 @@ describe("TaskManager", () => { }, }; - await client.metadataResource.registerTaskDef([ + await metadataClient.registerTask( taskDefinition({ name: taskName, timeoutSeconds: 0, retryCount: 0, - }), - ]); + }) + ); const manager = new TaskManager(client, [worker], { options: { pollInterval: BASE_TIME }, @@ -108,6 +118,10 @@ describe("TaskManager", () => { correlationId: `${workflowName}-id`, }); + if (!status) { + throw new Error("Status is undefined"); + } + const workflowStatus = await waitForWorkflowCompletion( executor, status, @@ -122,6 +136,7 @@ describe("TaskManager", () => { test("If no error handler provided. it should just update the task", async () => { const client = await clientPromise; const executor = new WorkflowExecutor(client); + const metadataClient = new MetadataClient(client); const taskName = `jsSdkTest-taskmanager-error-test-${Date.now()}`; const workflowName = `jsSdkTest-taskmanager-error-test-wf-${Date.now()}`; @@ -132,13 +147,13 @@ describe("TaskManager", () => { }, }; - await client.metadataResource.registerTaskDef([ + await metadataClient.registerTask( taskDefinition({ name: taskName, timeoutSeconds: 0, retryCount: 0, - }), - ]); + }) + ); const manager = new TaskManager(client, [worker], { options: { pollInterval: BASE_TIME }, @@ -163,6 +178,10 @@ describe("TaskManager", () => { correlationId: `${workflowName}-id`, }); + if (!executionId) { + throw new Error("Execution ID is undefined"); + } + const workflowStatus = await waitForWorkflowCompletion( executor, executionId, @@ -228,6 +247,9 @@ describe("TaskManager", () => { }); expect(executionId).toBeDefined(); + if (!executionId) { + throw new Error("Execution ID is undefined"); + } // decrease speed again manager.updatePollingOptions({ pollInterval: BASE_TIME, concurrency: 1 }); @@ -358,6 +380,9 @@ describe("TaskManager", () => { correlationId: `${workflowName}-id`, }); expect(executionId).toBeDefined(); + if (!executionId) { + throw new Error("Execution ID is undefined"); + } // decrease speed again manager.updatePollingOptions({ pollInterval: BASE_TIME, concurrency: 1 }); diff --git a/integration-tests/common/TaskRunnerIntTest.test.ts b/integration-tests/common/TaskRunnerIntTest.test.ts index 4018119b..5e209500 100644 --- a/integration-tests/common/TaskRunnerIntTest.test.ts +++ b/integration-tests/common/TaskRunnerIntTest.test.ts @@ -15,7 +15,7 @@ describe("TaskManager", () => { const workflowName = `jsSdkTest-task-manager-int-test-wf-${Date.now()}`; const taskRunner = new TaskRunner({ - taskResource: client.taskResource, + client: client, worker: { taskDefName: taskName, execute: async () => { @@ -80,6 +80,6 @@ describe("TaskManager", () => { expect(taskRunner.isPolling).toEqual(false); const taskDetails = await executor.getTask(firstTask?.taskId || ""); - expect(taskDetails.status).toEqual("COMPLETED"); + expect(taskDetails?.status).toEqual("COMPLETED"); }); }); diff --git a/integration-tests/common/WorkflowResourceService.test.ts b/integration-tests/common/WorkflowResourceService.test.ts index d0d28190..987eb2d7 100644 --- a/integration-tests/common/WorkflowResourceService.test.ts +++ b/integration-tests/common/WorkflowResourceService.test.ts @@ -3,6 +3,7 @@ import { MetadataClient } from "../../src/core"; import { simpleTask, workflow } from "../../src/core/sdk"; import { orkesConductorClient } from "../../src/orkes"; import { TaskDefTypes } from "../../src/common/types"; +import { WorkflowResource } from "../../src/common/open-api/sdk.gen"; describe("WorkflowResourceService", () => { jest.setTimeout(120000); @@ -16,18 +17,25 @@ describe("WorkflowResourceService", () => { const wfDef = workflow(`jsSdkTest-test_wf-${Date.now()}`, tasks); wfDef.outputParameters = { message: "${simple_ref.output.message}" }; - metadataClient.registerWorkflowDef(wfDef, true); + await metadataClient.registerWorkflowDef(wfDef, true); const status = "COMPLETED"; const output = { message: "Mocked message" }; - const wf = await client.workflowResource.testWorkflow({ - name: wfDef.name, - taskRefToMockOutput: { - simple_ref: [{ status, output }], + const { data: wf } = await WorkflowResource.testWorkflow({ + client: client, + body: { + name: wfDef.name, + taskRefToMockOutput: { + simple_ref: [{ status, output }], + }, }, }); + if (!wf) { + throw new Error("Workflow not found"); + } + expect(wf.status).toEqual(status); expect(wf.output).toEqual(output); }); diff --git a/integration-tests/common/executor.test.ts b/integration-tests/common/executor.test.ts index 453733b0..bc295849 100644 --- a/integration-tests/common/executor.test.ts +++ b/integration-tests/common/executor.test.ts @@ -6,16 +6,18 @@ import { v4 as uuidv4 } from "uuid"; import { waitForWorkflowStatus } from "../utils/waitForWorkflowStatus"; import { httpTask } from "../../src/core/sdk"; import { TaskClient } from "../../src/core/taskClient"; +import { MetadataClient } from "../../src/core"; describe("Executor", () => { const clientPromise = orkesConductorClient(); - jest.setTimeout(15000); + jest.setTimeout(30000); const name = `jsSdkTest-Workflow-${Date.now()}`; const version = 1; test("Should be able to register a workflow", async () => { const client = await clientPromise; const executor = new WorkflowExecutor(client); + const metadataClient = new MetadataClient(client); const workflowDefinition: WorkflowDef = { name, @@ -37,19 +39,21 @@ describe("Executor", () => { await expect( executor.registerWorkflow(true, workflowDefinition) ).resolves.not.toThrow(); - const workflowDefinitionFromApi = await client.metadataResource.get( + + const workflowDefinitionFromApi = await metadataClient.getWorkflowDef( name, version ); - expect(workflowDefinitionFromApi.name).toEqual(name); - expect(workflowDefinitionFromApi.version).toEqual(version); - expect(workflowDefinitionFromApi.tasks[0].name).toEqual( + + expect(workflowDefinitionFromApi?.name).toEqual(name); + expect(workflowDefinitionFromApi?.version).toEqual(version); + expect(workflowDefinitionFromApi?.tasks[0].name).toEqual( workflowDefinition.tasks[0].name ); - expect(workflowDefinitionFromApi.tasks[0].taskReferenceName).toEqual( + expect(workflowDefinitionFromApi?.tasks[0].taskReferenceName).toEqual( workflowDefinition.tasks[0].taskReferenceName ); - expect(workflowDefinitionFromApi.tasks[0].inputParameters).toEqual( + expect(workflowDefinitionFromApi?.tasks[0].inputParameters).toEqual( (workflowDefinition.tasks[0] as SetVariableTaskDef).inputParameters ); }); @@ -89,7 +93,7 @@ describe("Executor", () => { true, true ); - expect(workflowStatus.status).toBeTruthy(); + expect(workflowStatus?.status).toBeTruthy(); }); test("Should return workflow status detail", async () => { @@ -101,8 +105,8 @@ describe("Executor", () => { } const workflowStatus = await executor.getWorkflow(executionId, true); - expect(workflowStatus.status).toBeTruthy(); - expect(workflowStatus.tasks?.length).toBe(1); + expect(workflowStatus?.status).toBeTruthy(); + expect(workflowStatus?.tasks?.length).toBe(1); }); test("Should execute a workflow with indempotency key", async () => { const client = await clientPromise; @@ -115,8 +119,11 @@ describe("Executor", () => { idempotencyStrategy: "RETURN_EXISTING", }); + if (!executionId) { + throw new Error("Execution ID is undefined"); + } const executionDetails = await executor.getWorkflow(executionId, true); - expect(executionDetails.idempotencyKey).toEqual(idempotencyKey); + expect(executionDetails?.idempotencyKey).toEqual(idempotencyKey); }); test("Should run workflow with http task with asyncComplete true", async () => { @@ -147,6 +154,10 @@ describe("Executor", () => { version: 1, }); + if (!executionId) { + throw new Error("Execution ID is undefined"); + } + const workflowStatusBefore = await waitForWorkflowStatus( executor, executionId, @@ -158,7 +169,7 @@ describe("Executor", () => { ); const taskClient = new TaskClient(client); - taskClient.updateTaskResult(executionId, taskName, "COMPLETED", { + await taskClient.updateTaskResult(executionId, taskName, "COMPLETED", { hello: "From manuall api call updating task result", }); @@ -199,6 +210,10 @@ describe("Executor", () => { version: 1, }); + if (!executionId) { + throw new Error("Execution ID is undefined"); + } + const workflowStatus = await waitForWorkflowStatus( executor, executionId, diff --git a/integration-tests/common/readme.test.ts b/integration-tests/common/readme.test.ts index 2b83ec99..308b06bb 100644 --- a/integration-tests/common/readme.test.ts +++ b/integration-tests/common/readme.test.ts @@ -16,7 +16,7 @@ describe("TaskManager", () => { const taskName = `jsSdkTest-taskmanager-test-${Date.now()}`; const taskRunner = new TaskRunner({ - taskResource: client.taskResource, + client: client, worker: { taskDefName: taskName, execute: async () => { @@ -53,6 +53,10 @@ describe("TaskManager", () => { version: 1, }); + if (!executionId) { + throw new Error("Execution ID is undefined"); + } + const workflowStatus = await waitForWorkflowStatus( executor, executionId, @@ -65,7 +69,7 @@ describe("TaskManager", () => { taskRunner.stopPolling(); const taskDetails = await executor.getTask(firstTask?.taskId || ""); - expect(taskDetails.status).toEqual("COMPLETED"); + expect(taskDetails?.status).toEqual("COMPLETED"); }); test("update task example ", async () => { @@ -95,7 +99,7 @@ describe("TaskManager", () => { } const workflowStatus = await executor.getWorkflow(executionId, true); - const [firstTask] = workflowStatus.tasks || []; + const [firstTask] = workflowStatus?.tasks || []; expect(firstTask?.referenceTaskName).toBeDefined(); expect(firstTask?.referenceTaskName).toEqual(waitTaskReference); @@ -112,7 +116,7 @@ describe("TaskManager", () => { ); const taskDetails = await executor.getTask(firstTask?.taskId || ""); - expect(taskDetails.outputData).toEqual(changedValue); + expect(taskDetails?.outputData).toEqual(changedValue); const newChange = { greet: "bye" }; expect(firstTask?.taskId).toBeDefined(); @@ -128,7 +132,7 @@ describe("TaskManager", () => { ); const taskAfterUpdate = await executor.getTask(firstTask?.taskId || ""); - expect(taskAfterUpdate.outputData).toEqual(newChange); + expect(taskAfterUpdate?.outputData).toEqual(newChange); }); test("Should create and run a workflow that sums two numbers", async () => { @@ -185,7 +189,7 @@ describe("TaskManager", () => { if (!executionId) { throw new Error("Execution ID is undefined"); } - + const workflowStatus = await waitForWorkflowStatus( executor, executionId, diff --git a/integration-tests/common/schedulerExecutor.test.ts b/integration-tests/common/schedulerExecutor.test.ts index ccf847d2..f4fe6558 100644 --- a/integration-tests/common/schedulerExecutor.test.ts +++ b/integration-tests/common/schedulerExecutor.test.ts @@ -1,7 +1,8 @@ import { expect, describe, test, jest } from "@jest/globals"; import { orkesConductorClient } from "../../src/orkes"; import { SchedulerClient } from "../../src/core/schedulerClient"; -import { SaveScheduleRequest, TaskType, WorkflowDef } from "../../src/common"; +import { ExtendedWorkflowDef, SaveScheduleRequest, TaskType } from "../../src/common"; +import { MetadataClient } from "../../src/core"; describe("ScheduleExecutor", () => { const clientPromise = orkesConductorClient(); @@ -18,7 +19,7 @@ describe("ScheduleExecutor", () => { const client = await clientPromise; const executor = new SchedulerClient(client); - const workflowDefinition: WorkflowDef = { + const workflowDefinition: ExtendedWorkflowDef = { name: workflowName, version: workflowVersion, description: "Test Workflow for Scheduler", @@ -36,13 +37,18 @@ describe("ScheduleExecutor", () => { timeoutSeconds: 15, }; - await client.metadataResource.create(workflowDefinition, true); + const metadataClient = new MetadataClient(client); + await metadataClient.registerWorkflowDef(workflowDefinition, true); - const workflowDefinitionFromApi = await client.metadataResource.get( + const workflowDefinitionFromApi = await metadataClient.getWorkflowDef( workflowName, workflowVersion ); + expect(workflowDefinitionFromApi).toBeDefined(); + if (!workflowDefinitionFromApi) { + throw new Error("Workflow definition is undefined"); + } expect(workflowDefinitionFromApi.name).toEqual(workflowName); expect(workflowDefinitionFromApi.version).toEqual(workflowVersion); @@ -65,6 +71,10 @@ describe("ScheduleExecutor", () => { executor.saveSchedule(schedulerDefinition) ).resolves.not.toThrow(); const scheduler = await executor.getSchedule(name); + expect(scheduler).toBeDefined(); + if (!scheduler) { + throw new Error("Scheduler is undefined"); + } expect(scheduler.name).toEqual(name); expect(scheduler.cronExpression).toEqual(cronExpression); }); @@ -74,6 +84,10 @@ describe("ScheduleExecutor", () => { const executor = new SchedulerClient(client); await executor.resumeSchedule(name); const scheduler = await executor.getSchedule(name); + expect(scheduler).toBeDefined(); + if (!scheduler) { + throw new Error("Scheduler is undefined"); + } expect(scheduler.paused).toBeFalsy(); }); @@ -96,19 +110,26 @@ describe("ScheduleExecutor", () => { const executor = new SchedulerClient(client); await executor.pauseSchedule(name); const scheduler = await executor.getSchedule(name); + if (!scheduler) { + throw new Error("Scheduler is undefined"); + } expect(scheduler.paused).toBeTruthy(); }); test("Should be able to delete the schedule", async () => { const client = await clientPromise; const executor = new SchedulerClient(client); + const metadataClient = new MetadataClient(client); await executor.deleteSchedule(name); // delete workflowDef too - await client.metadataResource.unregisterWorkflowDef( + await metadataClient.unregisterWorkflow( workflowName, workflowVersion ); const schedulerList = await executor.getAllSchedules(); + if (!schedulerList) { + throw new Error("Scheduler list is undefined"); + } const testSchedule = schedulerList.some( (schedule) => schedule.name === name ); diff --git a/integration-tests/utils/mockLogger.ts b/integration-tests/utils/mockLogger.ts index c5011ae2..9084898a 100644 --- a/integration-tests/utils/mockLogger.ts +++ b/integration-tests/utils/mockLogger.ts @@ -1,9 +1,8 @@ -import {jest} from "@jest/globals" -import {ConductorLogger} from "../../src/common/ConductorLogger" +import { jest } from "@jest/globals"; +import { ConductorLogger } from "../../src/common/ConductorLogger"; export const mockLogger: ConductorLogger = { debug: jest.fn(), error: jest.fn(), - info: jest.fn() -} - + info: jest.fn(), +}; diff --git a/integration-tests/utils/waitForWorkflowCompletion.ts b/integration-tests/utils/waitForWorkflowCompletion.ts index c4604201..bb641ccc 100644 --- a/integration-tests/utils/waitForWorkflowCompletion.ts +++ b/integration-tests/utils/waitForWorkflowCompletion.ts @@ -13,7 +13,7 @@ export const waitForWorkflowCompletion = async ( try { const workflowStatus = await executor.getWorkflow(workflowId, true); - if (!workflowStatus.status) { + if (!workflowStatus?.status) { throw new Error("Workflow status is undefined"); } // Check if workflow is in a terminal state @@ -44,4 +44,3 @@ export const waitForWorkflowCompletion = async ( `Workflow ${workflowId} did not complete within ${maxWaitMs}ms` ); }; - diff --git a/integration-tests/utils/waitForWorkflowStatus.ts b/integration-tests/utils/waitForWorkflowStatus.ts index 451d7479..d5ae7744 100644 --- a/integration-tests/utils/waitForWorkflowStatus.ts +++ b/integration-tests/utils/waitForWorkflowStatus.ts @@ -17,13 +17,13 @@ export const waitForWorkflowStatus = async ( try { const workflow = await workflowClient.getWorkflow(workflowId, true); - if (workflow.status === expectedStatus) { + if (workflow?.status === expectedStatus) { return workflow; } - if (workflow.status === "FAILED" || workflow.status === "TERMINATED") { + if (workflow?.status === "FAILED" || workflow?.status === "TERMINATED") { throw new Error( - `Workflow ended in unexpected state: ${workflow.status}` + `Workflow ended in unexpected state: ${workflow?.status}` ); } diff --git a/integration-tests/v5-only/ServiceRegistryClient.test.ts b/integration-tests/v5-only/ServiceRegistryClient.test.ts index 9341f050..5f29db48 100644 --- a/integration-tests/v5-only/ServiceRegistryClient.test.ts +++ b/integration-tests/v5-only/ServiceRegistryClient.test.ts @@ -1,7 +1,7 @@ import {beforeAll, afterEach, describe, expect, jest, test} from "@jest/globals"; import {ServiceRegistryClient} from "../../src/core/serviceRegistryClient"; import {orkesConductorClient} from "../../src/orkes"; -import {ServiceType} from "../../src/common/open-api/models/ServiceRegistryModels"; +import {ServiceType} from "../../src/common/"; import * as fs from 'fs'; import * as path from 'path'; @@ -65,6 +65,9 @@ describe("ServiceRegistryClient", () => { ); // Verify the service registry properties + if (!retrievedServiceRegistry) { + throw new Error("Retrieved service registry is undefined"); + } expect(retrievedServiceRegistry.name).toEqual(testServiceRegistry.name); expect(retrievedServiceRegistry.type).toEqual(testServiceRegistry.type); expect(retrievedServiceRegistry.serviceURI).toEqual(testServiceRegistry.serviceURI); @@ -151,7 +154,9 @@ describe("ServiceRegistryClient", () => { const retrievedServiceRegistry = await serviceRegistryClient.getService( testServiceRegistry.name ); - + if (!retrievedServiceRegistry) { + throw new Error("Retrieved service registry is undefined"); + } // Check if methods array exists and contains our method expect(retrievedServiceRegistry.methods).toBeDefined(); @@ -189,6 +194,9 @@ describe("ServiceRegistryClient", () => { // Verify that we discovered methods expect(discoveredMethods).toBeDefined(); + if (!discoveredMethods) { + throw new Error("Discovered methods are undefined"); + } expect(Array.isArray(discoveredMethods)).toBe(true); expect(discoveredMethods.length).toBeGreaterThan(0); @@ -222,6 +230,9 @@ describe("ServiceRegistryClient", () => { await serviceRegistryClient.setProtoData(testServiceRegistry.name, 'compiled.bin', blob); const serviceMethods = await serviceRegistryClient.getService(testServiceRegistry.name); + if (!serviceMethods) { + throw new Error("Service methods are undefined"); + } const methods = serviceMethods.methods; expect(serviceMethods).toBeDefined(); diff --git a/integration-tests/v5-only/executor.test.ts b/integration-tests/v5-only/executor.test.ts index 4aacb348..4cb39aac 100644 --- a/integration-tests/v5-only/executor.test.ts +++ b/integration-tests/v5-only/executor.test.ts @@ -1,16 +1,24 @@ -import {expect, describe, test, jest, beforeAll, afterEach, afterAll} from "@jest/globals"; -import {ConductorClient, Consistency, ReturnStrategy} from "../../src/common"; +import { + expect, + describe, + test, + jest, + beforeAll, + afterEach, + afterAll, +} from "@jest/globals"; +import { Consistency, ReturnStrategy } from "../../src/common"; import { orkesConductorClient } from "../../src/orkes"; import { WorkflowExecutor } from "../../src/core/executor"; import { v4 as uuidv4 } from "uuid"; -import {MetadataClient} from "../../src/core/metadataClient"; -import {waitForWorkflowStatus} from "../utils/waitForWorkflowStatus"; -import {TaskResultStatusEnum} from "../../src/common/open-api/models/TaskResultStatusEnum"; -import {SignalResponse} from "../../src/common/open-api/models/SignalResponse"; +import { MetadataClient } from "../../src/core/metadataClient"; +import { waitForWorkflowStatus } from "../utils/waitForWorkflowStatus"; +import { TaskResultStatusEnum } from "../../src/common/"; import { getComplexSignalTestWfDef } from "./metadata/complex_wf_signal_test"; import { getComplexSignalTestSubWf1Def } from "./metadata/complex_wf_signal_test_subworkflow_1"; import { getComplexSignalTestSubWf2Def } from "./metadata/complex_wf_signal_test_subworkflow_2"; import { getWaitSignalTestWfDef } from "./metadata/wait_signal_test"; +import { Client } from "../../src/common/open-api/client/types.gen"; describe("Execute with Return Strategy and Consistency", () => { // Constants specific to this test suite @@ -19,16 +27,16 @@ describe("Execute with Return Strategy and Consistency", () => { COMPLEX_WF: getComplexSignalTestWfDef(now), SUB_WF_1: getComplexSignalTestSubWf1Def(now), SUB_WF_2: getComplexSignalTestSubWf2Def(now), - WAIT_SIGNAL_TEST: getWaitSignalTestWfDef(now) + WAIT_SIGNAL_TEST: getWaitSignalTestWfDef(now), }; const clientPromise = orkesConductorClient(); jest.setTimeout(300000); - let client: ConductorClient; + let client: Client; let executor: WorkflowExecutor; let metadataClient: MetadataClient; - const workflowsToCleanup: {name: string, version: number}[] = []; + const workflowsToCleanup: { name: string; version: number }[] = []; const executionsToCleanup: string[] = []; beforeAll(async () => { @@ -44,13 +52,24 @@ describe("Execute with Return Strategy and Consistency", () => { // Clean up executions first for (const executionId of executionsToCleanup) { try { - const workflowStatus = await executor.getWorkflowStatus(executionId, false, false); + const workflowStatus = await executor.getWorkflowStatus( + executionId, + false, + false + ); - if (workflowStatus.status && !['COMPLETED', 'FAILED', 'TERMINATED', 'TIMED_OUT'].includes(workflowStatus.status)) { + if ( + workflowStatus?.status && + !["COMPLETED", "FAILED", "TERMINATED", "TIMED_OUT"].includes( + workflowStatus.status + ) + ) { await executor.terminate(executionId, "Test cleanup"); console.debug(`Terminated running workflow: ${executionId}`); } else { - console.debug(`Skipping cleanup for ${workflowStatus.status} workflow: ${executionId}`); + console.debug( + `Skipping cleanup for ${workflowStatus?.status} workflow: ${executionId}` + ); } } catch (e) { console.debug(`Failed to cleanup execution ${executionId}:`, e); @@ -70,36 +89,37 @@ describe("Execute with Return Strategy and Consistency", () => { metadataClient.registerWorkflowDef(WORKFLOWS.COMPLEX_WF, true), metadataClient.registerWorkflowDef(WORKFLOWS.SUB_WF_1, true), metadataClient.registerWorkflowDef(WORKFLOWS.SUB_WF_2, true), - metadataClient.registerWorkflowDef(WORKFLOWS.WAIT_SIGNAL_TEST, true) + metadataClient.registerWorkflowDef(WORKFLOWS.WAIT_SIGNAL_TEST, true), ]); // Add to cleanup list - Object.values(WORKFLOWS).forEach(workflow => { - workflowsToCleanup.push({name: workflow.name, version: 1}); + Object.values(WORKFLOWS).forEach((workflow) => { + workflowsToCleanup.push({ name: workflow.name, version: 1 }); }); - console.log('✓ All workflows registered successfully'); + console.log("✓ All workflows registered successfully"); } catch (error) { throw new Error(`Failed to register workflows: ${error}`); } } async function cleanupAllWorkflows(): Promise { - const cleanupPromises = workflowsToCleanup.map(({name, version}) => + const cleanupPromises = workflowsToCleanup.map(({ name, version }) => metadataClient.unregisterWorkflow(name, version) ); const results = await Promise.allSettled(cleanupPromises); results.forEach((result, index) => { - if (result.status === 'rejected') { - console.warn(`Failed to cleanup workflow ${workflowsToCleanup[index].name}: ${result.reason}`); + if (result.status === "rejected") { + console.warn( + `Failed to cleanup workflow ${workflowsToCleanup[index].name}: ${result.reason}` + ); } }); - console.log('✓ Cleanup completed'); + console.log("✓ Cleanup completed"); } describe("Execute Workflow with Return Strategies and Consistency Levels", () => { - // Test data for combinations const testCombinations = [ // SYNCHRONOUS consistency tests @@ -108,28 +128,28 @@ describe("Execute with Return Strategy and Consistency", () => { consistency: Consistency.SYNCHRONOUS, returnStrategy: ReturnStrategy.TARGET_WORKFLOW, shouldHaveWorkflowFields: true, - shouldHaveTaskFields: false + shouldHaveTaskFields: false, }, { name: "SYNC + BLOCKING_WORKFLOW", consistency: Consistency.SYNCHRONOUS, returnStrategy: ReturnStrategy.BLOCKING_WORKFLOW, shouldHaveWorkflowFields: true, - shouldHaveTaskFields: false + shouldHaveTaskFields: false, }, { name: "SYNC + BLOCKING_TASK", consistency: Consistency.SYNCHRONOUS, returnStrategy: ReturnStrategy.BLOCKING_TASK, shouldHaveWorkflowFields: false, - shouldHaveTaskFields: true + shouldHaveTaskFields: true, }, { name: "SYNC + BLOCKING_TASK_INPUT", consistency: Consistency.SYNCHRONOUS, returnStrategy: ReturnStrategy.BLOCKING_TASK_INPUT, shouldHaveWorkflowFields: false, - shouldHaveTaskFields: true + shouldHaveTaskFields: true, }, // REGION_DURABLE consistency tests { @@ -137,29 +157,29 @@ describe("Execute with Return Strategy and Consistency", () => { consistency: Consistency.REGION_DURABLE, returnStrategy: ReturnStrategy.TARGET_WORKFLOW, shouldHaveWorkflowFields: true, - shouldHaveTaskFields: false + shouldHaveTaskFields: false, }, { name: "DURABLE + BLOCKING_WORKFLOW", consistency: Consistency.REGION_DURABLE, returnStrategy: ReturnStrategy.BLOCKING_WORKFLOW, shouldHaveWorkflowFields: true, - shouldHaveTaskFields: false + shouldHaveTaskFields: false, }, { name: "DURABLE + BLOCKING_TASK", consistency: Consistency.REGION_DURABLE, returnStrategy: ReturnStrategy.BLOCKING_TASK, shouldHaveWorkflowFields: false, - shouldHaveTaskFields: true + shouldHaveTaskFields: true, }, { name: "DURABLE + BLOCKING_TASK_INPUT", consistency: Consistency.REGION_DURABLE, returnStrategy: ReturnStrategy.BLOCKING_TASK_INPUT, shouldHaveWorkflowFields: false, - shouldHaveTaskFields: true - } + shouldHaveTaskFields: true, + }, ]; test("Should execute complex workflow with SYNC + TARGET_WORKFLOW and validate all aspects", async () => { @@ -168,26 +188,25 @@ describe("Execute with Return Strategy and Consistency", () => { console.log(`\n--- Testing ${testCase.name} ---`); // 1. Execute workflow with return strategy - const rawResult = await executor.executeWorkflow( - { name: WORKFLOWS.COMPLEX_WF.name, version: 1 }, - WORKFLOWS.COMPLEX_WF.name, - 1, - uuidv4(), - "", // waitUntilTaskRef - 10, // waitForSeconds - testCase.consistency, - testCase.returnStrategy + const result = await executor.executeWorkflow( + { name: WORKFLOWS.COMPLEX_WF.name, version: 1 }, + WORKFLOWS.COMPLEX_WF.name, + 1, + uuidv4(), + "", // waitUntilTaskRef + 10, // waitForSeconds + testCase.consistency, + testCase.returnStrategy ); - // Convert to SignalResponse instance - const result = Object.assign(new SignalResponse(), rawResult); - // Add to cleanup list if (result.workflowId) { executionsToCleanup.push(result.workflowId); } - console.log(`Started workflow with ID: ${result.workflowId} for strategy: ${testCase.name}`); + console.log( + `Started workflow with ID: ${result.workflowId} for strategy: ${testCase.name}` + ); // ========== BASIC VALIDATIONS ========== expect(result).not.toBeNull(); @@ -199,10 +218,18 @@ describe("Execute with Return Strategy and Consistency", () => { expect(result.output).toBeDefined(); // ========== TYPE CHECK VALIDATIONS ========== - expect(result.isTargetWorkflow()).toBe(testCase.returnStrategy === ReturnStrategy.TARGET_WORKFLOW); - expect(result.isBlockingWorkflow()).toBe(testCase.returnStrategy === ReturnStrategy.BLOCKING_WORKFLOW); - expect(result.isBlockingTask()).toBe(testCase.returnStrategy === ReturnStrategy.BLOCKING_TASK); - expect(result.isBlockingTaskInput()).toBe(testCase.returnStrategy === ReturnStrategy.BLOCKING_TASK_INPUT); + expect(result.isTargetWorkflow()).toBe( + testCase.returnStrategy === ReturnStrategy.TARGET_WORKFLOW + ); + expect(result.isBlockingWorkflow()).toBe( + testCase.returnStrategy === ReturnStrategy.BLOCKING_WORKFLOW + ); + expect(result.isBlockingTask()).toBe( + testCase.returnStrategy === ReturnStrategy.BLOCKING_TASK + ); + expect(result.isBlockingTaskInput()).toBe( + testCase.returnStrategy === ReturnStrategy.BLOCKING_TASK_INPUT + ); // ========== STRATEGY-SPECIFIC VALIDATIONS ========== if (testCase.shouldHaveWorkflowFields) { @@ -246,11 +273,17 @@ describe("Execute with Return Strategy and Consistency", () => { expect(workflowFromResp.updateTime).toEqual(result.updateTime); // Test that task helper methods throw errors - expect(() => result.getBlockingTask()).toThrow('does not contain task details'); - expect(() => result.getTaskInput()).toThrow('does not contain task input details'); + expect(() => result.getBlockingTask()).toThrow( + "does not contain task details" + ); + expect(() => result.getTaskInput()).toThrow( + "does not contain task input details" + ); } else { // Test that workflow helper method throws error - expect(() => result.getWorkflow()).toThrow('does not contain workflow details'); + expect(() => result.getWorkflow()).toThrow( + "does not contain workflow details" + ); } if (testCase.shouldHaveTaskFields) { @@ -259,7 +292,9 @@ describe("Execute with Return Strategy and Consistency", () => { expect(taskFromResp).not.toBeNull(); expect(taskFromResp.taskId).toEqual(result.taskId); expect(taskFromResp.taskType).toEqual(result.taskType); - expect(taskFromResp.referenceTaskName).toEqual(result.referenceTaskName); + expect(taskFromResp.referenceTaskName).toEqual( + result.referenceTaskName + ); expect(taskFromResp.taskDefName).toEqual(result.taskDefName); expect(taskFromResp.workflowType).toEqual(result.workflowType); @@ -270,7 +305,9 @@ describe("Execute with Return Strategy and Consistency", () => { expect(taskInput).toEqual(result.input); } else { // Test that getTaskInput throws error for non-BLOCKING_TASK_INPUT - expect(() => result.getTaskInput()).toThrow('does not contain task input details'); + expect(() => result.getTaskInput()).toThrow( + "does not contain task input details" + ); } } @@ -282,35 +319,38 @@ describe("Execute with Return Strategy and Consistency", () => { // Signal workflow with same return strategy const signalResponse = await executor.signal( - workflowId, - TaskResultStatusEnum.COMPLETED, - { result: `Signal received for ${testCase.name}`, timestamp: Date.now() }, - testCase.returnStrategy + workflowId, + TaskResultStatusEnum.COMPLETED, + { + result: `Signal received for ${testCase.name}`, + timestamp: Date.now(), + }, + testCase.returnStrategy ); // Validate signal response - expect(signalResponse.responseType).toEqual(testCase.returnStrategy); - expect(signalResponse.workflowId).toEqual(workflowId); + expect(signalResponse?.responseType).toEqual(testCase.returnStrategy); + expect(signalResponse?.workflowId).toEqual(workflowId); // ========== COMPLETE WORKFLOW ========== // Signal again to complete workflow await executor.signal( - workflowId, - TaskResultStatusEnum.COMPLETED, - { result: `Final signal for ${testCase.name}` }, - testCase.returnStrategy + workflowId, + TaskResultStatusEnum.COMPLETED, + { result: `Final signal for ${testCase.name}` }, + testCase.returnStrategy ); // Wait for workflow completion const finalWorkflow = await waitForWorkflowStatus( - executor, - workflowId, - 'COMPLETED', - 300000, // 5 min max wait - 200 // 200ms poll interval + executor, + workflowId, + "COMPLETED", + 300000, // 5 min max wait + 200 // 200ms poll interval ); - expect(finalWorkflow.status).toEqual('COMPLETED'); + expect(finalWorkflow.status).toEqual("COMPLETED"); console.log(`✓ ${testCase.name} test completed successfully`); }); @@ -320,20 +360,17 @@ describe("Execute with Return Strategy and Consistency", () => { console.log(`\n--- Testing ${testCase.name} ---`); // Execute workflow - const rawResult = await executor.executeWorkflow( - { name: WORKFLOWS.COMPLEX_WF.name, version: 1 }, - WORKFLOWS.COMPLEX_WF.name, - 1, - uuidv4(), - "", - 10, - testCase.consistency, - testCase.returnStrategy + const result = await executor.executeWorkflow( + { name: WORKFLOWS.COMPLEX_WF.name, version: 1 }, + WORKFLOWS.COMPLEX_WF.name, + 1, + uuidv4(), + "", + 10, + testCase.consistency, + testCase.returnStrategy ); - // Convert to SignalResponse instance - const result = Object.assign(new SignalResponse(), rawResult); - // Add to cleanup list if (result.workflowId) { executionsToCleanup.push(result.workflowId); @@ -344,10 +381,18 @@ describe("Execute with Return Strategy and Consistency", () => { expect(result.workflowId).toBeDefined(); // Type check validations - expect(result.isTargetWorkflow()).toBe(testCase.returnStrategy === ReturnStrategy.TARGET_WORKFLOW); - expect(result.isBlockingWorkflow()).toBe(testCase.returnStrategy === ReturnStrategy.BLOCKING_WORKFLOW); - expect(result.isBlockingTask()).toBe(testCase.returnStrategy === ReturnStrategy.BLOCKING_TASK); - expect(result.isBlockingTaskInput()).toBe(testCase.returnStrategy === ReturnStrategy.BLOCKING_TASK_INPUT); + expect(result.isTargetWorkflow()).toBe( + testCase.returnStrategy === ReturnStrategy.TARGET_WORKFLOW + ); + expect(result.isBlockingWorkflow()).toBe( + testCase.returnStrategy === ReturnStrategy.BLOCKING_WORKFLOW + ); + expect(result.isBlockingTask()).toBe( + testCase.returnStrategy === ReturnStrategy.BLOCKING_TASK + ); + expect(result.isBlockingTaskInput()).toBe( + testCase.returnStrategy === ReturnStrategy.BLOCKING_TASK_INPUT + ); // Strategy-specific validations if (testCase.shouldHaveWorkflowFields) { @@ -380,12 +425,22 @@ describe("Execute with Return Strategy and Consistency", () => { if (!workflowId) { throw new Error("workflowId is undefined"); } - await executor.signal(workflowId, TaskResultStatusEnum.COMPLETED, { result: "signal1" }); - await executor.signal(workflowId, TaskResultStatusEnum.COMPLETED, { result: "signal2" }); - - await waitForWorkflowStatus(executor, workflowId, 'COMPLETED', 300000, 200); + await executor.signal(workflowId, TaskResultStatusEnum.COMPLETED, { + result: "signal1", + }); + await executor.signal(workflowId, TaskResultStatusEnum.COMPLETED, { + result: "signal2", + }); + + await waitForWorkflowStatus( + executor, + workflowId, + "COMPLETED", + 300000, + 200 + ); console.log(`✓ ${testCase.name} test completed successfully`); }); }); }); -}); \ No newline at end of file +}); diff --git a/open-api-spec/fix-additional-properties.ts b/open-api-spec/fix-additional-properties.ts new file mode 100644 index 00000000..d7557ad3 --- /dev/null +++ b/open-api-spec/fix-additional-properties.ts @@ -0,0 +1,79 @@ +import * as fs from "fs"; + +// Read the api-docs.json file +const filePath = "open-api-spec/spec.json"; +let content = fs.readFileSync(filePath, "utf8"); + +// Pattern 1: Handle nested object case +// "type": "object", +// "additionalProperties": { +// "type": "object" +// } +// +// Replace with: +// "type": "object", +// "additionalProperties": {} + +const pattern1 = + /("type"\s*:\s*"object"\s*,\s*"additionalProperties"\s*:\s*{\s*"type"\s*:\s*"object"\s*})/g; +const replacement1 = + '"type": "object",\n "additionalProperties": {}'; + +const matches1 = content.match(pattern1); +const matchCount1 = matches1 ? matches1.length : 0; +console.log(`Found ${matchCount1} nested object patterns to replace`); +content = content.replace(pattern1, replacement1); + +// Pattern 2: Handle all bare "type": "object" properties within component schemas +// Fix ALL properties with "type": "object" that lack additionalProperties +// But EXCLUDE: +// - "schema" properties (used in responses/requests) +// - Properties that already have additionalProperties + +// First, let's find all bare "type": "object" within property definitions +// Match pattern: "propertyName": { "type": "object" } (followed by closing brace) +// But NOT "schema": { "type": "object" } + +const pattern2 = + /("(?!schema)[^"]+"\s*:\s*{\s*)"type"\s*:\s*"object"(\s*\n\s*})/g; + +// Find matches within the components/schemas section only +const componentsStart = content.indexOf('"components"'); +const componentsEnd = content.lastIndexOf("}"); // End of file + +let matchCount2 = 0; +const fixedProperties = new Set(); + +if (componentsStart !== -1) { + // Work only within the components section + const beforeComponents = content.substring(0, componentsStart); + let componentsSection = content.substring(componentsStart, componentsEnd); + const afterComponents = content.substring(componentsEnd); + + // Replace in components section only + componentsSection = componentsSection.replace( + pattern2, + (match, g1, g2) => { + // Extract property name for logging + const propNameMatch = g1.match(/"([^"]+)"\s*:\s*{\s*$/); + const propName = propNameMatch ? propNameMatch[1] : "unknown"; + + matchCount2++; + fixedProperties.add(propName); + + return `${g1}"type": "object",\n "additionalProperties": {}${g2}`; + } + ); + + content = beforeComponents + componentsSection + afterComponents; +} + +console.log(`Found ${matchCount2} bare object patterns to fix`); + +// Write back to file +fs.writeFileSync(filePath, content, "utf8"); + +const totalCount = matchCount1 + matchCount2; +console.log( + `✓ Successfully fixed ${totalCount} total occurrences (${matchCount1} nested object + ${matchCount2} bare object)` +); diff --git a/open-api-spec/spec.json b/open-api-spec/spec.json new file mode 100644 index 00000000..bb429f80 --- /dev/null +++ b/open-api-spec/spec.json @@ -0,0 +1,18680 @@ +{ + "openapi": "3.0.1", + "info": { + "description": "Orkes Conductor API Server", + "title": "Orkes Conductor API Server", + "version": "v2" + }, + "servers": [ + { + "url": "https://sdkdev.orkesconductor.io", + "description": "Generated server url" + } + ], + "security": [ + { + "api_key": [] + } + ], + "paths": { + "/api/admin/cache/clear/{taskDefName}": { + "post": { + "operationId": "clearTaskExecutionCache", + "parameters": [ + { + "in": "path", + "name": "taskDefName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Remove execution cached values for the task", + "tags": [ + "admin-resource" + ] + } + }, + "/api/admin/consistency/verifyAndRepair/{workflowId}": { + "post": { + "operationId": "verifyAndRepairWorkflowConsistency", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Verify and repair workflow consistency", + "tags": [ + "admin-resource" + ] + } + }, + "/api/admin/redisUsage": { + "get": { + "operationId": "getRedisUsage", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "description": "OK" + } + }, + "summary": "Get details of redis usage", + "tags": [ + "admin-resource" + ] + } + }, + "/api/admin/sweep/requeue/{workflowId}": { + "post": { + "operationId": "requeueSweep", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Queue up all the running workflows for sweep", + "tags": [ + "admin-resource" + ] + } + }, + "/api/admin/task/{tasktype}": { + "get": { + "operationId": "view", + "parameters": [ + { + "in": "path", + "name": "tasktype", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "start", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "in": "query", + "name": "count", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get the list of pending tasks for a given task type", + "tags": [ + "admin-resource" + ] + } + }, + "/api/applications": { + "get": { + "operationId": "listApplications", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedConductorApplication" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get all applications", + "tags": [ + "application-resource" + ] + }, + "post": { + "operationId": "createApplication", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrUpdateApplicationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Create an application", + "tags": [ + "application-resource" + ] + } + }, + "/api/applications/key/{accessKeyId}": { + "get": { + "operationId": "getAppByAccessKeyId", + "parameters": [ + { + "in": "path", + "name": "accessKeyId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Get application id by access key id", + "tags": [ + "application-resource" + ] + } + }, + "/api/applications/{applicationId}/accessKeys/{keyId}": { + "delete": { + "operationId": "deleteAccessKey", + "parameters": [ + { + "in": "path", + "name": "applicationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "keyId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Delete an access key", + "tags": [ + "application-resource" + ] + } + }, + "/api/applications/{applicationId}/accessKeys/{keyId}/status": { + "post": { + "operationId": "toggleAccessKeyStatus", + "parameters": [ + { + "in": "path", + "name": "applicationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "keyId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Toggle the status of an access key", + "tags": [ + "application-resource" + ] + } + }, + "/api/applications/{applicationId}/roles/{role}": { + "delete": { + "operationId": "removeRoleFromApplicationUser", + "parameters": [ + { + "in": "path", + "name": "applicationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "role", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "application-resource" + ] + }, + "post": { + "operationId": "addRoleToApplicationUser", + "parameters": [ + { + "in": "path", + "name": "applicationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "role", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "application-resource" + ] + } + }, + "/api/applications/{id}": { + "delete": { + "operationId": "deleteApplication", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Delete an application", + "tags": [ + "application-resource" + ] + }, + "get": { + "operationId": "getApplication", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Get an application by id", + "tags": [ + "application-resource" + ] + }, + "put": { + "operationId": "updateApplication", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrUpdateApplicationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Update an application", + "tags": [ + "application-resource" + ] + } + }, + "/api/applications/{id}/accessKeys": { + "get": { + "operationId": "getAccessKeys", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Get application's access keys", + "tags": [ + "application-resource" + ] + }, + "post": { + "operationId": "createAccessKey", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Create an access key for an application", + "tags": [ + "application-resource" + ] + } + }, + "/api/applications/{id}/tags": { + "delete": { + "operationId": "deleteTagForApplication", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete a tag for application", + "tags": [ + "application-resource" + ] + }, + "get": { + "operationId": "getTagsForApplication", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get tags by application", + "tags": [ + "application-resource" + ] + }, + "put": { + "operationId": "putTagForApplication", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Put a tag to application", + "tags": [ + "application-resource" + ] + } + }, + "/api/auth/authorization": { + "delete": { + "operationId": "removePermissions", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Response" + } + } + }, + "description": "OK" + } + }, + "summary": "Remove user's access over the target", + "tags": [ + "authorization-resource" + ] + }, + "post": { + "operationId": "grantPermissions", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthorizationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Response" + } + } + }, + "description": "OK" + } + }, + "summary": "Grant access to a user over the target", + "tags": [ + "authorization-resource" + ] + } + }, + "/api/auth/authorization/{type}/{id}": { + "get": { + "operationId": "getPermissions", + "parameters": [ + { + "in": "path", + "name": "type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "WORKFLOW", + "WORKFLOW_DEF", + "WORKFLOW_SCHEDULE", + "EVENT_HANDLER", + "TASK_DEF", + "TASK_REF_NAME", + "TASK_ID", + "APPLICATION", + "USER", + "SECRET_NAME", + "ENV_VARIABLE", + "TAG", + "DOMAIN", + "INTEGRATION_PROVIDER", + "INTEGRATION", + "PROMPT", + "USER_FORM_TEMPLATE", + "SCHEMA", + "CLUSTER_CONFIG", + "WEBHOOK" + ] + } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Get the access that have been granted over the given object", + "tags": [ + "authorization-resource" + ] + } + }, + "/api/environment": { + "get": { + "operationId": "getAll", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentVariable" + } + } + } + }, + "description": "OK" + } + }, + "summary": "List all the environment variables", + "tags": [ + "environment-resource" + ] + } + }, + "/api/environment/{key}": { + "delete": { + "operationId": "deleteEnvVariable", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Delete an environment variable (requires metadata or admin role)", + "tags": [ + "environment-resource" + ] + }, + "get": { + "operationId": "get_3", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Get the environment value by key", + "tags": [ + "environment-resource" + ] + }, + "put": { + "operationId": "createOrUpdateEnvVariable", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "maxLength": 65535, + "minLength": 0, + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Create or update an environment variable (requires metadata or admin role)", + "tags": [ + "environment-resource" + ] + } + }, + "/api/environment/{name}/tags": { + "delete": { + "operationId": "deleteTagForEnvVar", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete a tag for environment variable name", + "tags": [ + "environment-resource" + ] + }, + "get": { + "operationId": "getTagsForEnvVar", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get tags by environment variable name", + "tags": [ + "environment-resource" + ] + }, + "put": { + "operationId": "putTagForEnvVar", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Put a tag to environment variable name", + "tags": [ + "environment-resource" + ] + } + }, + "/api/event": { + "get": { + "operationId": "getEventHandlers", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventHandler" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get all the event handlers", + "tags": [ + "event-resource" + ] + }, + "post": { + "operationId": "addEventHandler", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventHandler" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Add a new event handler.", + "tags": [ + "event-resource" + ] + }, + "put": { + "operationId": "updateEventHandler", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventHandler" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Update an existing event handler.", + "tags": [ + "event-resource" + ] + } + }, + "/api/event/execution": { + "get": { + "operationId": "getEventHandlersForEvent_1", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/SearchResultHandledEventResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Get All active Event Handlers", + "tags": [ + "event-execution-resource" + ] + } + }, + "/api/event/execution/{eventHandlerName}": { + "get": { + "operationId": "getEventHandlersForEvent_2", + "parameters": [ + { + "in": "path", + "name": "eventHandlerName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedEventExecution" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get event handlers for a given event", + "tags": [ + "event-execution-resource" + ] + } + }, + "/api/event/handleIncomingEvent": { + "post": { + "operationId": "handleIncomingEvent", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Handle an incoming event", + "tags": [ + "event-resource" + ] + } + }, + "/api/event/handler/": { + "get": { + "operationId": "test", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/EventHandler" + } + } + }, + "description": "OK" + } + }, + "summary": "Get event handler by name", + "tags": [ + "event-resource" + ] + } + }, + "/api/event/handler/{name}": { + "get": { + "operationId": "getEventHandlerByName", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/EventHandler" + } + } + }, + "description": "OK" + } + }, + "summary": "Get event handler by name", + "tags": [ + "event-resource" + ] + } + }, + "/api/event/message": { + "get": { + "operationId": "getEvents", + "parameters": [ + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/SearchResultHandledEventResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Get all event handlers with statistics", + "tags": [ + "event-message-resource" + ] + } + }, + "/api/event/message/{event}": { + "get": { + "operationId": "getMessages", + "parameters": [ + { + "in": "path", + "name": "event", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "from", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventMessage" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get event messages for a given event", + "tags": [ + "event-message-resource" + ] + } + }, + "/api/event/queue/config": { + "get": { + "operationId": "getQueueNames", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get all queue configs", + "tags": [ + "event-resource" + ] + } + }, + "/api/event/queue/config/{queueType}/{queueName}": { + "delete": { + "operationId": "deleteQueueConfig", + "parameters": [ + { + "in": "path", + "name": "queueType", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "queueName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete queue config by name", + "tags": [ + "event-resource" + ] + }, + "get": { + "operationId": "getQueueConfig", + "parameters": [ + { + "in": "path", + "name": "queueType", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "queueName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "description": "OK" + } + }, + "summary": "Get queue config by name", + "tags": [ + "event-resource" + ] + }, + "put": { + "deprecated": true, + "operationId": "putQueueConfig", + "parameters": [ + { + "in": "path", + "name": "queueType", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "queueName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Create or update queue config by name", + "tags": [ + "event-resource" + ] + } + }, + "/api/event/queue/connectivity": { + "post": { + "operationId": "testConnectivity", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectivityTestInput" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ConnectivityTestResult" + } + } + }, + "description": "OK" + } + }, + "summary": "Test connectivity for a given queue using a workflow with EVENT task and an EventHandler", + "tags": [ + "event-resource" + ] + } + }, + "/api/event/{event}": { + "get": { + "operationId": "getEventHandlersForEvent", + "parameters": [ + { + "in": "path", + "name": "event", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "activeOnly", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventHandler" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get event handlers for a given event", + "tags": [ + "event-resource" + ] + } + }, + "/api/event/{name}": { + "delete": { + "operationId": "removeEventHandlerStatus", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Remove an event handler", + "tags": [ + "event-resource" + ] + } + }, + "/api/event/{name}/tags": { + "delete": { + "operationId": "deleteTagForEventHandler", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete a tag for event handler", + "tags": [ + "event-resource" + ] + }, + "get": { + "operationId": "getTagsForEventHandler", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get tags by event handler", + "tags": [ + "event-resource" + ] + }, + "put": { + "operationId": "putTagForEventHandler", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Put a tag to event handler", + "tags": [ + "event-resource" + ] + } + }, + "/api/global_schema": { + "post": { + "operationId": "save_1", + "parameters": [ + { + "in": "query", + "name": "newVersion", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchemaDef" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Save schema", + "tags": [ + "global-schema-resource" + ] + } + }, + "/api/global_schema/{name}": { + "get": { + "operationId": "getSchemaByNameWithLatestVersion_1", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchemaDef" + } + } + }, + "description": "OK" + } + }, + "summary": "Get schema by name with latest version", + "tags": [ + "global-schema-resource" + ] + } + }, + "/api/groups": { + "get": { + "operationId": "listGroups", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get all groups", + "tags": [ + "group-resource" + ] + } + }, + "/api/groups/{groupId}/permissions": { + "get": { + "operationId": "getGrantedPermissions_1", + "parameters": [ + { + "in": "path", + "name": "groupId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GrantedAccessResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Get the permissions this group has over workflows and tasks", + "tags": [ + "group-resource" + ] + } + }, + "/api/groups/{groupId}/users": { + "delete": { + "operationId": "removeUsersFromGroup", + "parameters": [ + { + "in": "path", + "name": "groupId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Remove users from group", + "tags": [ + "group-resource" + ] + }, + "post": { + "operationId": "addUsersToGroup", + "parameters": [ + { + "in": "path", + "name": "groupId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Add users to group", + "tags": [ + "group-resource" + ] + } + }, + "/api/groups/{groupId}/users/{userId}": { + "delete": { + "operationId": "removeUserFromGroup", + "parameters": [ + { + "in": "path", + "name": "groupId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Remove user from group", + "tags": [ + "group-resource" + ] + }, + "post": { + "operationId": "addUserToGroup", + "parameters": [ + { + "in": "path", + "name": "groupId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Add user to group", + "tags": [ + "group-resource" + ] + } + }, + "/api/groups/{id}": { + "delete": { + "operationId": "deleteGroup", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Response" + } + } + }, + "description": "OK" + } + }, + "summary": "Delete a group", + "tags": [ + "group-resource" + ] + }, + "get": { + "operationId": "getGroup", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Get a group by id", + "tags": [ + "group-resource" + ] + }, + "put": { + "operationId": "upsertGroup", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertGroupRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Create or update a group", + "tags": [ + "group-resource" + ] + } + }, + "/api/groups/{id}/users": { + "get": { + "operationId": "getUsersInGroup", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Get all users in group", + "tags": [ + "group-resource" + ] + } + }, + "/api/human/tasks/backPopulateFullTextIndex": { + "get": { + "operationId": "backPopulateFullTextIndex", + "parameters": [ + { + "in": "query", + "name": "100", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "description": "OK" + } + }, + "summary": "API for backpopulating index data", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/delete": { + "delete": { + "operationId": "deleteTaskFromHumanTaskRecords", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "If the workflow is disconnected from tasks, this API can be used to clean up (in bulk)", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/delete/{taskId}": { + "delete": { + "operationId": "deleteTaskFromHumanTaskRecords_1", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "If the workflow is disconnected from tasks, this API can be used to clean up", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/getTaskDisplayNames": { + "get": { + "operationId": "getTaskDisplayNames", + "parameters": [ + { + "in": "query", + "name": "searchType", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ADMIN", + "INBOX" + ] + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get list of task display names applicable for the user", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/search": { + "post": { + "operationId": "search", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanTaskSearch" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanTaskSearchResult" + } + } + }, + "description": "OK" + } + }, + "summary": "Search human tasks", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/update/taskRef": { + "post": { + "operationId": "updateTaskOutputByRef", + "parameters": [ + { + "in": "query", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "taskRefName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "complete", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "description": "Populate this value if your task is in a loop and you want to update a specific iteration. If its not in a loop OR if you want to just update the latest iteration, leave this as empty", + "in": "query", + "name": "iteration", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Update task output, optionally complete", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/{taskId}": { + "get": { + "operationId": "getTask_1", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "withTemplate", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanTaskEntry" + } + } + }, + "description": "OK" + } + }, + "summary": "Get a task", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/{taskId}/claim": { + "post": { + "operationId": "claimTask", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "overrideAssignment", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "withTemplate", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanTaskEntry" + } + } + }, + "description": "OK" + } + }, + "summary": "Claim a task by authenticated Conductor user", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/{taskId}/conductorTask": { + "get": { + "operationId": "getConductorTaskById", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + }, + "description": "OK" + } + }, + "summary": "Get Conductor task by id (for human tasks only)", + "tags": [ + "human-task-resource" + ] + } + }, + "/api/human/tasks/{taskId}/externalUser/{userId}": { + "post": { + "operationId": "assignAndClaim", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "overrideAssignment", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "withTemplate", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanTaskEntry" + } + } + }, + "description": "OK" + } + }, + "summary": "Claim a task to an external user", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/{taskId}/reassign": { + "post": { + "operationId": "reassignTask", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HumanTaskAssignment" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Reassign a task without completing it", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/{taskId}/release": { + "post": { + "operationId": "releaseTask", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Release a task without completing it", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/{taskId}/skip": { + "post": { + "operationId": "skipTask", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "reason", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "If a task is assigned to a user, this API can be used to skip that assignment and move to the next assignee", + "tags": [ + "human-task" + ] + } + }, + "/api/human/tasks/{taskId}/update": { + "post": { + "operationId": "updateTaskOutput", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "complete", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Update task output, optionally complete", + "tags": [ + "human-task" + ] + } + }, + "/api/human/template": { + "get": { + "operationId": "getAllTemplates", + "parameters": [ + { + "in": "query", + "name": "name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "version", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HumanTaskTemplate" + } + } + } + }, + "description": "OK" + } + }, + "summary": "List all user form templates or get templates by name, or a template by name and version", + "tags": [ + "user-form", + "human-task" + ] + }, + "post": { + "operationId": "saveTemplate", + "parameters": [ + { + "in": "query", + "name": "newVersion", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanTaskTemplate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanTaskTemplate" + } + } + }, + "description": "OK" + } + }, + "summary": "Save user form template", + "tags": [ + "user-form", + "human-task" + ] + } + }, + "/api/human/template/bulk": { + "post": { + "operationId": "saveTemplates", + "parameters": [ + { + "in": "query", + "name": "newVersion", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HumanTaskTemplate" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HumanTaskTemplate" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Save user form template", + "tags": [ + "user-form", + "human-task" + ] + } + }, + "/api/human/template/{humanTaskId}": { + "get": { + "operationId": "getTemplateByTaskId", + "parameters": [ + { + "in": "path", + "name": "humanTaskId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanTaskTemplate" + } + } + }, + "description": "OK" + } + }, + "summary": "Get user form by human task id", + "tags": [ + "user-form", + "human-task" + ] + } + }, + "/api/human/template/{name}": { + "delete": { + "operationId": "deleteTemplateByName", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete all versions of user form template by name", + "tags": [ + "user-form", + "human-task" + ] + } + }, + "/api/human/template/{name}/tags": { + "delete": { + "operationId": "deleteTagForUserFormTemplate", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete a tag for template name", + "tags": [ + "user-form-template-resource" + ] + }, + "get": { + "operationId": "getTagsForUserFormTemplate", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get tags by template name", + "tags": [ + "user-form-template-resource" + ] + }, + "put": { + "operationId": "putTagForUserFormTemplate", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Put a tag to template name", + "tags": [ + "user-form-template-resource" + ] + } + }, + "/api/human/template/{name}/{version}": { + "delete": { + "operationId": "deleteTemplatesByNameAndVersion", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete a version of form template by name", + "tags": [ + "human-task" + ] + }, + "get": { + "operationId": "getTemplateByNameAndVersion", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HumanTaskTemplate" + } + } + }, + "description": "OK" + } + }, + "summary": "Get user form template by name and version", + "tags": [ + "user-form", + "human-task" + ] + } + }, + "/api/integrations/": { + "get": { + "operationId": "getAllIntegrations", + "parameters": [ + { + "in": "query", + "name": "category", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "activeOnly", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get all Integrations", + "tags": [ + "integration-resource" + ] + }, + "post": { + "operationId": "saveAllIntegrations", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Save all Integrations", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/all": { + "get": { + "operationId": "getProvidersAndIntegrations", + "parameters": [ + { + "in": "query", + "name": "type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "activeOnly", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get Integrations Providers and Integrations combo", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/def": { + "get": { + "operationId": "getIntegrationProviderDefs", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationDef" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get Integration provider definitions", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/def/register": { + "post": { + "operationId": "registerIntegration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationDef" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "upsert an integration definition", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/def/{name}": { + "get": { + "operationId": "getIntegrationDef", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationDef" + } + } + }, + "description": "OK" + } + }, + "summary": "Get an integration definition", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/eventStats/{type}": { + "post": { + "operationId": "recordEventStats", + "parameters": [ + { + "in": "query", + "name": "type", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EventLog" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Record Event Stats", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/llm/{name}/token": { + "get": { + "operationId": "getTokenLimit", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenLimit" + } + } + }, + "description": "OK" + } + }, + "summary": "Get the Token Limit for an integration", + "tags": [ + "LLM" + ] + }, + "post": { + "operationId": "updateTokenLimit", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenLimit" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Register Token Limit for an integration", + "tags": [ + "LLM" + ] + } + }, + "/api/integrations/llm/{name}/token/history": { + "get": { + "operationId": "getTokenUsage", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "model", + "required": false, + "schema": { + "type": "string", + "default": "*" + } + }, + { + "in": "query", + "name": "lookUpWindow", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 31 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TokenUsageLog" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get Token Usage by Integration provider", + "tags": [ + "LLM" + ] + } + }, + "/api/integrations/provider": { + "get": { + "operationId": "getIntegrationProviders", + "parameters": [ + { + "in": "query", + "name": "category", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "activeOnly", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get all Integrations Providers", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/provider/{integration_provider}/integration/{integration_name}/prompt": { + "get": { + "operationId": "getPromptsWithIntegration", + "parameters": [ + { + "in": "path", + "name": "integration_provider", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "integration_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageTemplate" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get the list of prompt templates associated with an integration", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/provider/{integration_provider}/integration/{integration_name}/prompt/{prompt_name}": { + "post": { + "operationId": "associatePromptWithIntegration", + "parameters": [ + { + "in": "path", + "name": "integration_provider", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "integration_name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "prompt_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Associate a Prompt Template with an Integration", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/provider/{name}": { + "delete": { + "operationId": "deleteIntegrationProvider", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete an Integration Provider", + "tags": [ + "integration-resource" + ] + }, + "get": { + "operationId": "getIntegrationProvider", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + }, + "description": "OK" + } + }, + "summary": "Get Integration provider", + "tags": [ + "integration-resource" + ] + }, + "post": { + "operationId": "saveIntegrationProvider", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Create or Update Integration provider", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/provider/{name}/integration": { + "get": { + "operationId": "getIntegrationApis", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "activeOnly", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationApi" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get Integrations of an Integration Provider", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/provider/{name}/integration/all": { + "get": { + "operationId": "getIntegrationAvailableApis", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get Integrations Available for an Integration Provider", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/provider/{name}/integration/{integration_name}": { + "delete": { + "operationId": "deleteIntegrationApi", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "integration_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete an Integration", + "tags": [ + "integration-resource" + ] + }, + "get": { + "operationId": "getIntegrationApi", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "integration_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationApi" + } + } + }, + "description": "OK" + } + }, + "summary": "Get Integration details", + "tags": [ + "integration-resource" + ] + }, + "post": { + "operationId": "saveIntegrationApi", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "integration_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationApiUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Create or Update Integration", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/provider/{name}/integration/{integration_name}/tags": { + "delete": { + "operationId": "deleteTagForIntegration", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "integration_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete a tag for Integration", + "tags": [ + "integration-resource" + ] + }, + "get": { + "operationId": "getTagsForIntegration", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "integration_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get tags by Integration", + "tags": [ + "integration-resource" + ] + }, + "put": { + "operationId": "putTagForIntegration", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "integration_name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Put a tag to Integration", + "tags": [ + "integration-resource" + ] + } + }, + "/api/integrations/provider/{name}/tags": { + "delete": { + "operationId": "deleteTagForIntegrationProvider", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete a tag for Integration Provider", + "tags": [ + "integration-resource" + ] + }, + "get": { + "operationId": "getTagsForIntegrationProvider", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get tags by Integration Provider", + "tags": [ + "integration-resource" + ] + }, + "put": { + "operationId": "putTagForIntegrationProvider", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Put a tag to Integration Provider", + "tags": [ + "integration-resource" + ] + } + }, + "/api/limits": { + "get": { + "operationId": "get_2", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "description": "OK" + } + }, + "tags": [ + "limits-resource" + ] + } + }, + "/api/metadata/tags": { + "get": { + "operationId": "getTags_1", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "List all tags", + "tags": [ + "tags" + ] + } + }, + "/api/metadata/task/{taskName}/tags": { + "delete": { + "operationId": "deleteTaskTag", + "parameters": [ + { + "in": "path", + "name": "taskName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Removes the tag of the task", + "tags": [ + "tags" + ] + }, + "get": { + "operationId": "getTaskTags", + "parameters": [ + { + "in": "path", + "name": "taskName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Returns all the tags of the task", + "tags": [ + "tags" + ] + }, + "post": { + "operationId": "addTaskTag", + "parameters": [ + { + "in": "path", + "name": "taskName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Adds the tag to the task", + "tags": [ + "tags" + ] + }, + "put": { + "operationId": "setTaskTags", + "parameters": [ + { + "in": "path", + "name": "taskName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Sets (replaces existing) the tags to the task", + "tags": [ + "tags" + ] + } + }, + "/api/metadata/taskdefs": { + "get": { + "operationId": "getTaskDefs", + "parameters": [ + { + "in": "query", + "name": "access", + "required": false, + "schema": { + "type": "string", + "default": "READ" + } + }, + { + "in": "query", + "name": "metadata", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "tagKey", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "tagValue", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskDef" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Gets all task definition", + "tags": [ + "metadata-resource" + ] + }, + "post": { + "operationId": "registerTaskDef", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedTaskDef" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Create or update task definition(s)", + "tags": [ + "metadata-resource" + ] + }, + "put": { + "operationId": "updateTaskDef", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedTaskDef" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Update an existing task", + "tags": [ + "metadata-resource" + ] + } + }, + "/api/metadata/taskdefs/{tasktype}": { + "delete": { + "operationId": "unregisterTaskDef", + "parameters": [ + { + "in": "path", + "name": "tasktype", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Remove a task definition", + "tags": [ + "metadata-resource" + ] + }, + "get": { + "operationId": "getTaskDef", + "parameters": [ + { + "in": "path", + "name": "tasktype", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "metadata", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Gets the task definition", + "tags": [ + "metadata-resource" + ] + } + }, + "/api/metadata/webhook": { + "get": { + "operationId": "getAllWebhook", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + } + }, + "description": "OK" + } + }, + "tags": [ + "webhooks-config-resource" + ] + }, + "post": { + "operationId": "createWebhook", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "webhooks-config-resource" + ] + } + }, + "/api/metadata/webhook/{id}": { + "delete": { + "operationId": "deleteWebhook", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "webhooks-config-resource" + ] + }, + "get": { + "operationId": "getWebhook", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "webhooks-config-resource" + ] + }, + "put": { + "operationId": "updateWebhook", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookConfig" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "webhooks-config-resource" + ] + } + }, + "/api/metadata/webhook/{id}/tags": { + "delete": { + "operationId": "deleteTagForWebhook", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete a tag for webhook id", + "tags": [ + "webhooks-config-resource" + ] + }, + "get": { + "operationId": "getTagsForWebhook", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get tags by webhook id", + "tags": [ + "webhooks-config-resource" + ] + }, + "put": { + "operationId": "putTagForWebhook", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Put a tag to webhook id", + "tags": [ + "webhooks-config-resource" + ] + } + }, + "/api/metadata/workflow": { + "get": { + "operationId": "getWorkflowDefs", + "parameters": [ + { + "in": "query", + "name": "access", + "required": false, + "schema": { + "type": "string", + "default": "READ" + } + }, + { + "in": "query", + "name": "metadata", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "tagKey", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "tagValue", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "short", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowDef" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Retrieves all workflow definition along with blueprint", + "tags": [ + "metadata-resource" + ] + }, + "post": { + "operationId": "create", + "parameters": [ + { + "in": "query", + "name": "overwrite", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "newVersion", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedWorkflowDef" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Create a new workflow definition", + "tags": [ + "metadata-resource" + ] + }, + "put": { + "operationId": "update", + "parameters": [ + { + "in": "query", + "name": "overwrite", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "in": "query", + "name": "newVersion", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedWorkflowDef" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Create or update workflow definition(s)", + "tags": [ + "metadata-resource" + ] + } + }, + "/api/metadata/workflow-importer/import-bpm": { + "post": { + "operationId": "uploadBpmnFile", + "parameters": [ + { + "in": "query", + "name": "overwrite", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IncomingBpmnFile" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedWorkflowDef" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Imports bpmn workflow", + "tags": [ + "metadata-resource" + ] + } + }, + "/api/metadata/workflow-task-defs/upload": { + "post": { + "operationId": "uploadWorkflowsAndTasksDefinitionsToS3", + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Upload all workflows and tasks definitions to Object storage if configured", + "tags": [ + "metadata-resource" + ] + } + }, + "/api/metadata/workflow/{name}": { + "get": { + "operationId": "get_1", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "version", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "in": "query", + "name": "metadata", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/WorkflowDef" + } + } + }, + "description": "OK" + } + }, + "summary": "Retrieves workflow definition along with blueprint", + "tags": [ + "metadata-resource" + ] + } + }, + "/api/metadata/workflow/{name}/tags": { + "delete": { + "operationId": "deleteWorkflowTag", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Removes the tag of the workflow", + "tags": [ + "tags" + ] + }, + "get": { + "operationId": "getWorkflowTags", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Returns all the tags of the workflow", + "tags": [ + "tags" + ] + }, + "post": { + "operationId": "addWorkflowTag", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tag" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Adds the tag to the workflow", + "tags": [ + "tags" + ] + }, + "put": { + "operationId": "setWorkflowTags", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Set (replaces all existing) the tags of the workflow", + "tags": [ + "tags" + ] + } + }, + "/api/metadata/workflow/{name}/{version}": { + "delete": { + "operationId": "unregisterWorkflowDef", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Removes workflow definition. It does not remove workflows associated with the definition.", + "tags": [ + "metadata-resource" + ] + } + }, + "/api/prompts": { + "get": { + "operationId": "getMessageTemplates", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageTemplate" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get Templates", + "tags": [ + "prompt-resource" + ] + } + }, + "/api/prompts/": { + "post": { + "operationId": "createMessageTemplates", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageTemplate" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Create message templates in bulk", + "tags": [ + "prompt-resource" + ] + } + }, + "/api/prompts/test": { + "post": { + "operationId": "testMessageTemplate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PromptTemplateTestRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Test Prompt Template", + "tags": [ + "prompt-resource" + ] + } + }, + "/api/prompts/{name}": { + "delete": { + "operationId": "deleteMessageTemplate", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete Template", + "tags": [ + "prompt-resource" + ] + }, + "get": { + "operationId": "getMessageTemplate", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "version", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageTemplate" + } + } + }, + "description": "OK" + } + }, + "summary": "Get Template", + "tags": [ + "prompt-resource" + ] + }, + "post": { + "operationId": "saveMessageTemplate", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "description", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "models", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "in": "query", + "name": "version", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "in": "query", + "name": "autoIncrement", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Create or Update a template", + "tags": [ + "prompt-resource" + ] + }, + "put": { + "operationId": "updateMessageTemplate", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "version", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "in": "query", + "name": "description", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "models", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Create a template", + "tags": [ + "prompt-resource" + ] + } + }, + "/api/prompts/{name}/tags": { + "delete": { + "operationId": "deleteTagForPromptTemplate", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete a tag for Prompt Template", + "tags": [ + "prompt-resource" + ] + }, + "get": { + "operationId": "getTagsForPromptTemplate", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get tags by Prompt Template", + "tags": [ + "prompt-resource" + ] + }, + "put": { + "operationId": "putTagForPromptTemplate", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Put a tag to Prompt Template", + "tags": [ + "prompt-resource" + ] + } + }, + "/api/prompts/{name}/versions": { + "get": { + "operationId": "getMessageTemplateVersions", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageTemplate" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get all versions of a Template", + "tags": [ + "prompt-resource" + ] + } + }, + "/api/prompts/{name}/versions/{version}": { + "delete": { + "operationId": "deleteMessageTemplate_1", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete Template", + "tags": [ + "prompt-resource" + ] + } + }, + "/api/queue/": { + "get": { + "operationId": "names", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get Queue Names", + "tags": [ + "queue-admin-resource" + ] + } + }, + "/api/queue/size": { + "get": { + "operationId": "size_1", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get the queue length", + "tags": [ + "queue-admin-resource" + ] + } + }, + "/api/registry/service": { + "get": { + "operationId": "getRegisteredServices", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceRegistry" + } + } + } + }, + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + }, + "post": { + "operationId": "addOrUpdateService", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceRegistry" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + } + }, + "/api/registry/service/protos/{registryName}": { + "get": { + "operationId": "getAllProtos", + "parameters": [ + { + "in": "path", + "name": "registryName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProtoRegistryEntry" + } + } + } + }, + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + } + }, + "/api/registry/service/protos/{registryName}/{filename}": { + "delete": { + "operationId": "deleteProto", + "parameters": [ + { + "in": "path", + "name": "registryName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "filename", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + }, + "get": { + "operationId": "getProtoData", + "parameters": [ + { + "in": "path", + "name": "registryName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "filename", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "byte" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + }, + "post": { + "operationId": "setProtoData", + "parameters": [ + { + "in": "path", + "name": "registryName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "filename", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "byte" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + } + }, + "/api/registry/service/{name}": { + "delete": { + "operationId": "removeService", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + }, + "get": { + "operationId": "getService", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceRegistry" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + } + }, + "/api/registry/service/{name}/circuit-breaker/close": { + "post": { + "operationId": "closeCircuitBreaker", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CircuitBreakerTransitionResponse" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + } + }, + "/api/registry/service/{name}/circuit-breaker/open": { + "post": { + "operationId": "openCircuitBreaker", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CircuitBreakerTransitionResponse" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + } + }, + "/api/registry/service/{name}/circuit-breaker/status": { + "get": { + "operationId": "getCircuitBreakerStatus", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CircuitBreakerTransitionResponse" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + } + }, + "/api/registry/service/{name}/discover": { + "get": { + "operationId": "discover", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "create", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceMethod" + } + } + } + }, + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + } + }, + "/api/registry/service/{registryName}/methods": { + "delete": { + "operationId": "removeMethod", + "parameters": [ + { + "in": "path", + "name": "registryName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "serviceName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "method", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "methodType", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + }, + "post": { + "operationId": "addOrUpdateMethod", + "parameters": [ + { + "in": "path", + "name": "registryName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceMethod" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "service-registry-resource" + ] + } + }, + "/api/scheduler/admin/pause": { + "get": { + "operationId": "pauseAllSchedules", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "description": "OK" + } + }, + "summary": "Pause all scheduling in a single conductor server instance (for debugging only)", + "tags": [ + "scheduler-resource" + ] + } + }, + "/api/scheduler/admin/requeue": { + "get": { + "operationId": "requeueAllExecutionRecords", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "description": "OK" + } + }, + "summary": "Requeue all execution records", + "tags": [ + "scheduler-resource" + ] + } + }, + "/api/scheduler/admin/resume": { + "get": { + "operationId": "resumeAllSchedules", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "description": "OK" + } + }, + "summary": "Resume all scheduling", + "tags": [ + "scheduler-resource" + ] + } + }, + "/api/scheduler/bulk/pause": { + "put": { + "operationId": "pauseSchedules", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/BulkResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Pause the list of schedules", + "tags": [ + "scheduler-bulk-resource" + ] + } + }, + "/api/scheduler/bulk/resume": { + "put": { + "operationId": "resumeSchedules", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/BulkResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Resume the list of schedules", + "tags": [ + "scheduler-bulk-resource" + ] + } + }, + "/api/scheduler/nextFewSchedules": { + "get": { + "operationId": "getNextFewSchedules", + "parameters": [ + { + "in": "query", + "name": "cronExpression", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "scheduleStartTime", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "scheduleEndTime", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 3 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get list of the next x (default 3, max 5) execution times for a scheduler", + "tags": [ + "scheduler-resource" + ] + } + }, + "/api/scheduler/schedules": { + "get": { + "operationId": "getAllSchedules", + "parameters": [ + { + "in": "query", + "name": "workflowName", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowScheduleModel" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get all existing workflow schedules and optionally filter by workflow name", + "tags": [ + "scheduler-resource" + ] + }, + "post": { + "operationId": "saveSchedule", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveScheduleRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Create or update a schedule for a specified workflow with a corresponding start workflow request", + "tags": [ + "scheduler-resource" + ] + } + }, + "/api/scheduler/schedules/tags": { + "get": { + "operationId": "getSchedulesByTag", + "parameters": [ + { + "in": "query", + "name": "tag", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowScheduleModel" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get schedules by tag", + "tags": [ + "scheduler-resource" + ] + } + }, + "/api/scheduler/schedules/{name}": { + "delete": { + "operationId": "deleteSchedule", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Deletes an existing workflow schedule by name", + "tags": [ + "scheduler-resource" + ] + }, + "get": { + "operationId": "getSchedule", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowSchedule" + } + } + }, + "description": "OK" + } + }, + "summary": "Get an existing workflow schedule by name", + "tags": [ + "scheduler-resource" + ] + } + }, + "/api/scheduler/schedules/{name}/pause": { + "get": { + "operationId": "pauseSchedule", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Pauses an existing schedule by name", + "tags": [ + "scheduler-resource" + ] + } + }, + "/api/scheduler/schedules/{name}/resume": { + "get": { + "operationId": "resumeSchedule", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Resume a paused schedule by name", + "tags": [ + "scheduler-resource" + ] + } + }, + "/api/scheduler/schedules/{name}/tags": { + "delete": { + "operationId": "deleteTagForSchedule", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete a tag for schedule", + "tags": [ + "scheduler-resource" + ] + }, + "get": { + "operationId": "getTagsForSchedule", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get tags by schedule", + "tags": [ + "scheduler-resource" + ] + }, + "put": { + "operationId": "putTagForSchedule", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Put a tag to schedule", + "tags": [ + "scheduler-resource" + ] + } + }, + "/api/scheduler/search/executions": { + "get": { + "description": "use sort options as sort=\u003Cfield\u003E:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC.", + "operationId": "searchV2", + "parameters": [ + { + "in": "query", + "name": "start", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 100 + } + }, + { + "in": "query", + "name": "sort", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "freeText", + "required": false, + "schema": { + "type": "string", + "default": "*" + } + }, + { + "in": "query", + "name": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchResultWorkflowScheduleExecutionModel" + } + } + }, + "description": "OK" + } + }, + "summary": "Search for workflow executions based on payload and other parameters", + "tags": [ + "scheduler-resource" + ] + } + }, + "/api/schema": { + "get": { + "operationId": "getAllSchemas", + "parameters": [ + { + "in": "query", + "name": "short", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchemaDef" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get all schemas", + "tags": [ + "schema-resource" + ] + }, + "post": { + "operationId": "save", + "parameters": [ + { + "in": "query", + "name": "newVersion", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchemaDef" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Save schema", + "tags": [ + "schema-resource" + ] + } + }, + "/api/schema/{name}": { + "delete": { + "operationId": "deleteSchemaByName", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete all versions of schema by name", + "tags": [ + "schema-resource" + ] + }, + "get": { + "operationId": "getSchemaByNameWithLatestVersion", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchemaDef" + } + } + }, + "description": "OK" + } + }, + "summary": "Get schema by name with latest version", + "tags": [ + "schema-resource" + ] + } + }, + "/api/schema/{name}/{version}": { + "delete": { + "operationId": "deleteSchemaByNameAndVersion", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete a version of schema by name", + "tags": [ + "schema-resource" + ] + }, + "get": { + "operationId": "getSchemaByNameAndVersion", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchemaDef" + } + } + }, + "description": "OK" + } + }, + "summary": "Get schema by name and version", + "tags": [ + "schema-resource" + ] + } + }, + "/api/secrets": { + "get": { + "operationId": "listSecretsThatUserCanGrantAccessTo", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "description": "OK" + } + }, + "summary": "List all secret names user can grant access to", + "tags": [ + "secret-resource" + ] + }, + "post": { + "operationId": "listAllSecretNames", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "description": "OK" + } + }, + "summary": "List all secret names", + "tags": [ + "secret-resource" + ] + } + }, + "/api/secrets-v2": { + "get": { + "operationId": "listSecretsWithTagsThatUserCanGrantAccessTo", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedSecret" + } + } + } + }, + "description": "OK" + } + }, + "summary": "List all secret names along with tags user can grant access to", + "tags": [ + "secret-resource" + ] + } + }, + "/api/secrets/clearLocalCache": { + "get": { + "operationId": "clearLocalCache", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Clear local cache", + "tags": [ + "secret-resource" + ] + } + }, + "/api/secrets/clearRedisCache": { + "get": { + "operationId": "clearRedisCache", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Clear redis cache", + "tags": [ + "secret-resource" + ] + } + }, + "/api/secrets/{key}": { + "delete": { + "operationId": "deleteSecret", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "pattern": "[a-zA-Z0-9_-]+", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Delete a secret value by key", + "tags": [ + "secret-resource" + ] + }, + "get": { + "operationId": "getSecret", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "pattern": "[a-zA-Z0-9_-]+", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Get secret value by key", + "tags": [ + "secret-resource" + ] + }, + "put": { + "operationId": "putSecret", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "pattern": "[a-zA-Z0-9_-]+", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "maxLength": 65535, + "minLength": 0, + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Put a secret value by key", + "tags": [ + "secret-resource" + ] + } + }, + "/api/secrets/{key}/exists": { + "get": { + "operationId": "secretExists", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "pattern": "[a-zA-Z0-9_-]+", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Check if secret exists", + "tags": [ + "secret-resource" + ] + } + }, + "/api/secrets/{key}/tags": { + "delete": { + "operationId": "deleteTagForSecret", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "pattern": "[a-zA-Z0-9_-]+", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Delete tags of the secret", + "tags": [ + "secret-resource" + ] + }, + "get": { + "operationId": "getTags", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "pattern": "[a-zA-Z0-9_-]+", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get tags by secret", + "tags": [ + "secret-resource" + ] + }, + "put": { + "operationId": "putTagForSecret", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "pattern": "[a-zA-Z0-9_-]+", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Tag a secret", + "tags": [ + "secret-resource" + ] + } + }, + "/api/tasks": { + "post": { + "operationId": "updateTask", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskResult" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Update a task", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/poll/batch/{tasktype}": { + "get": { + "operationId": "batchPoll", + "parameters": [ + { + "in": "path", + "name": "tasktype", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "workerid", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "domain", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "count", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "in": "query", + "name": "timeout", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 100 + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Batch poll for a task of a certain type", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/poll/{tasktype}": { + "get": { + "operationId": "poll", + "parameters": [ + { + "in": "path", + "name": "tasktype", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "workerid", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "domain", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + }, + "description": "OK" + } + }, + "summary": "Poll for a task of a certain type", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/queue/all": { + "get": { + "operationId": "all", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get the details about each queue", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/queue/all/verbose": { + "get": { + "operationId": "allVerbose", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + } + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get the details about each queue", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/queue/polldata": { + "get": { + "operationId": "getPollData", + "parameters": [ + { + "in": "query", + "name": "taskType", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PollData" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get the last poll data for a given task type", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/queue/polldata/all": { + "get": { + "operationId": "getAllPollData", + "parameters": [ + { + "in": "query", + "name": "workerSize", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "workerOpt", + "required": false, + "schema": { + "type": "string", + "enum": [ + "GT", + "LT" + ] + } + }, + { + "in": "query", + "name": "queueSize", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "queueOpt", + "required": false, + "schema": { + "type": "string", + "enum": [ + "GT", + "LT" + ] + } + }, + { + "in": "query", + "name": "lastPollTimeSize", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "lastPollTimeOpt", + "required": false, + "schema": { + "type": "string", + "enum": [ + "GT", + "LT" + ] + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "description": "OK" + } + }, + "summary": "Get the last poll data for all task types", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/queue/requeue/{taskType}": { + "post": { + "operationId": "requeuePendingTask", + "parameters": [ + { + "in": "path", + "name": "taskType", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Requeue pending tasks", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/queue/sizes": { + "get": { + "operationId": "size", + "parameters": [ + { + "in": "query", + "name": "taskType", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get Task type queue sizes", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/search": { + "get": { + "description": "use sort options as sort=\u003Cfield\u003E:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC", + "operationId": "search_2", + "parameters": [ + { + "in": "query", + "name": "start", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 100 + } + }, + { + "in": "query", + "name": "sort", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "freeText", + "required": false, + "schema": { + "type": "string", + "default": "*" + } + }, + { + "in": "query", + "name": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/SearchResultTaskSummary" + } + } + }, + "description": "OK" + } + }, + "summary": "Search for tasks based in payload and other parameters", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/update-v2": { + "post": { + "operationId": "updateTaskV2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskResult" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + }, + "description": "OK" + } + }, + "summary": "Update a task", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/{taskId}": { + "get": { + "operationId": "getTask", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Task" + } + } + }, + "description": "OK" + } + }, + "summary": "Get task by Id", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/{taskId}/log": { + "get": { + "operationId": "getTaskLogs", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskExecLog" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get Task Execution Logs", + "tags": [ + "task-resource" + ] + }, + "post": { + "operationId": "log", + "parameters": [ + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Log Task Execution Details", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/{workflowId}/{status}/signal": { + "post": { + "operationId": "signalWorkflowTaskASync", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "status", + "required": true, + "schema": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "FAILED", + "FAILED_WITH_TERMINAL_ERROR", + "COMPLETED" + ] + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Update running task in the workflow with given status and output asynchronously", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/{workflowId}/{status}/signal/sync": { + "post": { + "operationId": "signalWorkflowTaskSync", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "status", + "required": true, + "schema": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "FAILED", + "FAILED_WITH_TERMINAL_ERROR", + "COMPLETED" + ] + } + }, + { + "in": "query", + "name": "returnStrategy", + "required": false, + "schema": { + "type": "string", + "enum": [ + "TARGET_WORKFLOW", + "BLOCKING_WORKFLOW", + "BLOCKING_TASK", + "BLOCKING_TASK_INPUT" + ], + "default": "TARGET_WORKFLOW" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignalResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Update running task in the workflow with given status and output synchronously and return back updated workflow", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/{workflowId}/{taskRefName}/{status}": { + "post": { + "operationId": "updateTask_1", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "taskRefName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "status", + "required": true, + "schema": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "FAILED", + "FAILED_WITH_TERMINAL_ERROR", + "COMPLETED" + ] + } + }, + { + "in": "query", + "name": "workerid", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Update a task By Ref Name. The output data is merged if data from a previous API call already exists.", + "tags": [ + "task-resource" + ] + } + }, + "/api/tasks/{workflowId}/{taskRefName}/{status}/sync": { + "post": { + "operationId": "updateTaskSync", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "taskRefName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "status", + "required": true, + "schema": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "FAILED", + "FAILED_WITH_TERMINAL_ERROR", + "COMPLETED" + ] + } + }, + { + "in": "query", + "name": "workerid", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workflow" + } + } + }, + "description": "OK" + } + }, + "summary": "Update a task By Ref Name synchronously. The output data is merged if data from a previous API call already exists.", + "tags": [ + "task-resource" + ] + } + }, + "/api/token": { + "post": { + "operationId": "generateToken", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateTokenRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Response" + } + } + }, + "description": "OK" + } + }, + "summary": "Generate JWT with the given access key", + "tags": [ + "token-resource" + ] + } + }, + "/api/token/userInfo": { + "get": { + "operationId": "getUserInfo", + "parameters": [ + { + "in": "query", + "name": "claims", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Get the user info from the token", + "tags": [ + "token-resource" + ] + } + }, + "/api/users": { + "get": { + "operationId": "listUsers", + "parameters": [ + { + "in": "query", + "name": "apps", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConductorUser" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Get all users", + "tags": [ + "user-resource" + ] + } + }, + "/api/users/{id}": { + "delete": { + "operationId": "deleteUser", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Response" + } + } + }, + "description": "OK" + } + }, + "summary": "Delete a user", + "tags": [ + "user-resource" + ] + }, + "get": { + "operationId": "getUser", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Get a user by id", + "tags": [ + "user-resource" + ] + }, + "put": { + "operationId": "upsertUser", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertUserRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Create or update a user", + "tags": [ + "user-resource" + ] + } + }, + "/api/users/{userId}/checkPermissions": { + "get": { + "operationId": "checkPermissions", + "parameters": [ + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "type", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Get the permissions this user has over workflows and tasks", + "tags": [ + "user-resource" + ] + } + }, + "/api/users/{userId}/permissions": { + "get": { + "operationId": "getGrantedPermissions", + "parameters": [ + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "description": "OK" + } + }, + "summary": "Get the permissions this user has over workflows and tasks", + "tags": [ + "user-resource" + ] + } + }, + "/api/version": { + "get": { + "operationId": "getVersion", + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Get the server's version", + "tags": [ + "version-resource" + ] + } + }, + "/api/workflow": { + "post": { + "operationId": "startWorkflow", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartWorkflowRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/bulk/delete": { + "post": { + "operationId": "delete", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/BulkResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Permanently remove workflows from the system", + "tags": [ + "workflow-bulk-resource" + ] + } + }, + "/api/workflow/bulk/pause": { + "put": { + "operationId": "pauseWorkflow_1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/BulkResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Pause the list of workflows", + "tags": [ + "workflow-bulk-resource" + ] + } + }, + "/api/workflow/bulk/restart": { + "post": { + "operationId": "restart_1", + "parameters": [ + { + "in": "query", + "name": "useLatestDefinitions", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/BulkResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Restart the list of completed workflow", + "tags": [ + "workflow-bulk-resource" + ] + } + }, + "/api/workflow/bulk/resume": { + "put": { + "operationId": "resumeWorkflow_1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/BulkResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Resume the list of workflows", + "tags": [ + "workflow-bulk-resource" + ] + } + }, + "/api/workflow/bulk/retry": { + "post": { + "operationId": "retry_1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/BulkResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Retry the last failed task for each workflow from the list", + "tags": [ + "workflow-bulk-resource" + ] + } + }, + "/api/workflow/bulk/terminate": { + "post": { + "operationId": "terminate", + "parameters": [ + { + "in": "query", + "name": "reason", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "triggerFailureWorkflow", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/BulkResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Terminate workflows execution", + "tags": [ + "workflow-bulk-resource" + ] + } + }, + "/api/workflow/correlated/batch": { + "post": { + "operationId": "getWorkflows_1", + "parameters": [ + { + "in": "query", + "name": "includeClosed", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "includeTasks", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CorrelationIdsSearchRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Workflow" + } + } + } + } + }, + "description": "OK" + } + }, + "summary": "Lists workflows for the given correlation id list and workflow name list", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/decide/{workflowId}": { + "put": { + "operationId": "decide", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Starts the decision task for a workflow", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/execute/{name}": { + "get": { + "deprecated": true, + "operationId": "executeWorkflowAsGetAPI", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "version", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "in": "header", + "name": "requestId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "waitUntilTaskRef", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "waitForSeconds", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "in": "header", + "name": "X-Idempotency-key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "X-on-conflict", + "required": false, + "schema": { + "type": "string", + "enum": [ + "FAIL", + "RETURN_EXISTING", + "FAIL_ON_RUNNING" + ] + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "description": "OK" + } + }, + "summary": "Execute a workflow synchronously with input and outputs using get api", + "tags": [ + "workflow-resource" + ] + }, + "post": { + "deprecated": true, + "operationId": "executeWorkflowAsAPI", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "version", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "in": "header", + "name": "requestId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "waitUntilTaskRef", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "waitForSeconds", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "in": "header", + "name": "X-Idempotency-key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "X-on-conflict", + "required": false, + "schema": { + "type": "string", + "enum": [ + "FAIL", + "RETURN_EXISTING", + "FAIL_ON_RUNNING" + ] + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "description": "OK" + } + }, + "summary": "Execute a workflow synchronously with input and outputs", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/execute/{name}/{version}": { + "post": { + "operationId": "executeWorkflow", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "in": "query", + "name": "requestId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "waitUntilTaskRef", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "waitForSeconds", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "in": "query", + "name": "consistency", + "required": false, + "schema": { + "type": "string", + "enum": [ + "SYNCHRONOUS", + "DURABLE", + "REGION_DURABLE" + ], + "default": "DURABLE" + } + }, + { + "in": "query", + "name": "returnStrategy", + "required": false, + "schema": { + "type": "string", + "enum": [ + "TARGET_WORKFLOW", + "BLOCKING_WORKFLOW", + "BLOCKING_TASK", + "BLOCKING_TASK_INPUT" + ], + "default": "TARGET_WORKFLOW" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartWorkflowRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignalResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Execute a workflow synchronously", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/running/{name}": { + "get": { + "operationId": "getRunningWorkflow", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "version", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "in": "query", + "name": "startTime", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "endTime", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Retrieve all the running workflows", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/search": { + "get": { + "description": "Search for workflow executions based on payload and other parameters.\nThe query parameter accepts exact matches using `=` and `IN` on the following fields: `workflowId`, `correlationId`, `taskId`, `workflowType`, `taskType`, and `status`.\n\tMatches using `=` can be written as `taskType = HTTP`.\n\tMatches using `IN` are written as `status IN (SCHEDULED, IN_PROGRESS)`.\nThe 'startTime' and 'modifiedTime' field uses unix timestamps and accepts queries using `\u003C` and `\u003E`, for example `startTime \u003C 1696143600000`.\nQueries can be combined using `AND`, for example `taskType = HTTP AND status = SCHEDULED`.\n", + "operationId": "search_1", + "parameters": [ + { + "in": "query", + "name": "start", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "in": "query", + "name": "size", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 100 + } + }, + { + "in": "query", + "name": "sort", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "freeText", + "required": false, + "schema": { + "type": "string", + "default": "*" + } + }, + { + "in": "query", + "name": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "skipCache", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ScrollableSearchResultWorkflowSummary" + } + } + }, + "description": "OK" + } + }, + "summary": "Search for workflow executions based on payload and other parameters", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/start/{name}/{version}": { + "post": { + "operationId": "startWorkflowAsync", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "version", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "in": "query", + "name": "correlationId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "priority", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "in": "header", + "name": "X-Idempotency-key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "X-on-conflict", + "required": false, + "schema": { + "type": "string", + "enum": [ + "FAIL", + "RETURN_EXISTING", + "FAIL_ON_RUNNING" + ] + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Start a new workflow asynchronously. Returns the ID of the workflow instance that can be later used for tracking", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/test": { + "post": { + "operationId": "testWorkflow", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowTestRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workflow" + } + } + }, + "description": "OK" + } + }, + "summary": "Test workflow execution using mock data", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{name}": { + "post": { + "operationId": "startWorkflow_1", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "version", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "in": "query", + "name": "correlationId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "priority", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "in": "header", + "name": "X-Idempotency-key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "X-on-conflict", + "required": false, + "schema": { + "type": "string", + "enum": [ + "FAIL", + "RETURN_EXISTING", + "FAIL_ON_RUNNING" + ] + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{name}/correlated": { + "post": { + "operationId": "getWorkflows", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "includeClosed", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "includeTasks", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Workflow" + } + } + } + } + }, + "description": "OK" + } + }, + "summary": "Lists workflows for the given correlation id list", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{name}/correlated/{correlationId}": { + "get": { + "operationId": "getWorkflows_2", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "correlationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "includeClosed", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "includeTasks", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Workflow" + } + } + } + }, + "description": "OK" + } + }, + "summary": "Lists workflows for the given correlation id", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}": { + "delete": { + "operationId": "terminate_1", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "reason", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "triggerFailureWorkflow", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Terminate workflow execution", + "tags": [ + "workflow-resource" + ] + }, + "get": { + "operationId": "getExecutionStatus", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "includeTasks", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "in": "query", + "name": "summarize", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Workflow" + } + } + }, + "description": "OK" + } + }, + "summary": "Gets the workflow by workflow (execution) id", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/jump/{taskReferenceName}": { + "post": { + "description": "Jump workflow execution to given task.", + "operationId": "jumpToTask", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "taskReferenceName", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Jump workflow execution to given task", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/pause": { + "put": { + "operationId": "pauseWorkflow", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Pauses the workflow", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/remove": { + "delete": { + "operationId": "delete_1", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "archiveWorkflow", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Removes the workflow from the system", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/rerun": { + "post": { + "operationId": "rerun", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RerunWorkflowRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Reruns the workflow from a specific task", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/resetcallbacks": { + "post": { + "operationId": "resetWorkflow", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Resets callback times of all non-terminal SIMPLE tasks to 0", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/restart": { + "post": { + "operationId": "restart", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "useLatestDefinitions", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Restarts a completed workflow", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/resume": { + "put": { + "operationId": "resumeWorkflow", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Resumes the workflow", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/retry": { + "post": { + "operationId": "retry", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "resumeSubworkflowTasks", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "retryIfRetriedByParent", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "summary": "Retries the last failed task", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/skiptask/{taskReferenceName}": { + "put": { + "operationId": "skipTaskFromWorkflow", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "taskReferenceName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkipTaskRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Skips a given task from a current running workflow", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/state": { + "post": { + "description": "Updates the workflow variables, tasks and triggers evaluation.", + "operationId": "updateWorkflowAndTaskState", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "requestId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "waitUntilTaskRef", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "waitForSeconds", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkflowStateUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/WorkflowRun" + } + } + }, + "description": "OK" + } + }, + "summary": "Update a workflow state by updating variables or in progress task", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/status": { + "get": { + "operationId": "getWorkflowStatusSummary", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "includeOutput", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "in": "query", + "name": "includeVariables", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/WorkflowStatus" + } + } + }, + "description": "OK" + } + }, + "summary": "Gets the workflow by workflow (execution) id", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/tasks": { + "get": { + "operationId": "getExecutionStatusTaskList", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "start", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "in": "query", + "name": "count", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 15 + } + }, + { + "in": "query", + "name": "status", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/TaskListSearchResultSummary" + } + } + }, + "description": "OK" + } + }, + "summary": "Gets the workflow tasks by workflow (execution) id", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/upgrade": { + "post": { + "description": "Upgrade running workflow to newer version", + "operationId": "upgradeRunningWorkflowToVersion", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpgradeWorkflowRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Upgrade running workflow to newer version", + "tags": [ + "workflow-resource" + ] + } + }, + "/api/workflow/{workflowId}/variables": { + "post": { + "description": "Updates the workflow variables and triggers evaluation.", + "operationId": "updateWorkflowState", + "parameters": [ + { + "in": "path", + "name": "workflowId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Workflow" + } + } + }, + "description": "OK" + } + }, + "summary": "Update workflow variables", + "tags": [ + "workflow-resource" + ] + } + }, + "/context.js": { + "get": { + "operationId": "get", + "responses": { + "200": { + "description": "OK" + } + }, + "tags": [ + "context-controller" + ] + } + }, + "/health": { + "get": { + "operationId": "doCheck", + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "description": "OK" + } + }, + "tags": [ + "health-check-resource" + ] + } + }, + "/webhook/{id}": { + "get": { + "operationId": "handleWebhook_1", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "requestParams", + "required": true, + "schema": { + "type": "object", + "additionalProperties": {} + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "incoming-webhook-resource" + ] + }, + "post": { + "operationId": "handleWebhook", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "requestParams", + "required": true, + "schema": { + "type": "object", + "additionalProperties": {} + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "tags": [ + "incoming-webhook-resource" + ] + } + } + }, + "components": { + "schemas": { + "Action": { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "start_workflow", + "complete_task", + "fail_task", + "terminate_workflow", + "update_workflow_variables" + ] + }, + "complete_task": { + "$ref": "#/components/schemas/TaskDetails" + }, + "expandInlineJSON": { + "type": "boolean" + }, + "fail_task": { + "$ref": "#/components/schemas/TaskDetails" + }, + "start_workflow": { + "$ref": "#/components/schemas/StartWorkflowRequest" + }, + "terminate_workflow": { + "$ref": "#/components/schemas/TerminateWorkflow" + }, + "update_workflow_variables": { + "$ref": "#/components/schemas/UpdateWorkflowVariables" + } + } + }, + "Any": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Any" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserAny" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "typeUrl": { + "type": "string" + }, + "typeUrlBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "value": { + "$ref": "#/components/schemas/ByteString" + } + } + }, + "AuthorizationRequest": { + "required": [ + "access", + "subject", + "target" + ], + "type": "object", + "properties": { + "access": { + "uniqueItems": true, + "type": "array", + "description": "The set of access which is granted or removed", + "items": { + "type": "string", + "description": "The set of access which is granted or removed", + "enum": [ + "CREATE", + "READ", + "EXECUTE", + "UPDATE", + "DELETE" + ] + } + }, + "subject": { + "$ref": "#/components/schemas/SubjectRef" + }, + "target": { + "$ref": "#/components/schemas/TargetRef" + } + } + }, + "BulkResponse": { + "type": "object", + "properties": { + "bulkErrorResults": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "bulkSuccessfulResults": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": {} + } + } + } + }, + "ByteString": { + "type": "object", + "properties": { + "empty": { + "type": "boolean" + }, + "validUtf8": { + "type": "boolean" + } + } + }, + "CacheConfig": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "ttlInSecond": { + "type": "integer", + "format": "int32" + } + } + }, + "CircuitBreakerTransitionResponse": { + "type": "object", + "properties": { + "currentState": { + "type": "string" + }, + "message": { + "type": "string" + }, + "previousState": { + "type": "string" + }, + "service": { + "type": "string" + }, + "transitionTimestamp": { + "type": "integer", + "format": "int64" + } + } + }, + "ConductorUser": { + "type": "object", + "properties": { + "applicationUser": { + "type": "boolean" + }, + "encryptedId": { + "type": "boolean" + }, + "encryptedIdDisplayValue": { + "type": "string" + }, + "groups": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "orkesWorkersApp": { + "type": "boolean" + }, + "roles": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + }, + "uuid": { + "type": "string" + } + } + }, + "Config": { + "type": "object", + "properties": { + "circuitBreakerConfig": { + "$ref": "#/components/schemas/OrkesCircuitBreakerConfig" + } + } + }, + "ConnectivityTestInput": { + "required": [ + "sink" + ], + "type": "object", + "properties": { + "input": { + "type": "object", + "additionalProperties": {} + }, + "sink": { + "type": "string" + } + } + }, + "ConnectivityTestResult": { + "type": "object", + "properties": { + "reason": { + "type": "string" + }, + "successful": { + "type": "boolean" + }, + "workflowId": { + "type": "string" + } + } + }, + "CorrelationIdsSearchRequest": { + "required": [ + "correlationIds", + "workflowNames" + ], + "type": "object", + "properties": { + "correlationIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "workflowNames": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "CreateOrUpdateApplicationRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Application's name e.g.: Payment Processors" + } + } + }, + "Declaration": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Declaration" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "fullName": { + "type": "string" + }, + "fullNameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "number": { + "type": "integer", + "format": "int32" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserDeclaration" + }, + "repeated": { + "type": "boolean" + }, + "reserved": { + "type": "boolean" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "type": { + "type": "string" + }, + "typeBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "DeclarationOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "fullName": { + "type": "string" + }, + "fullNameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "number": { + "type": "integer", + "format": "int32" + }, + "repeated": { + "type": "boolean" + }, + "reserved": { + "type": "boolean" + }, + "type": { + "type": "string" + }, + "typeBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "Descriptor": { + "type": "object", + "properties": { + "containingType": { + "$ref": "#/components/schemas/Descriptor" + }, + "enumTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumDescriptor" + } + }, + "extendable": { + "type": "boolean" + }, + "extensions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptor" + } + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptor" + } + }, + "file": { + "$ref": "#/components/schemas/FileDescriptor" + }, + "fullName": { + "type": "string" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nestedTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Descriptor" + } + }, + "oneofs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OneofDescriptor" + } + }, + "options": { + "$ref": "#/components/schemas/MessageOptions" + }, + "proto": { + "$ref": "#/components/schemas/DescriptorProto" + }, + "realOneofs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OneofDescriptor" + } + } + } + }, + "DescriptorProto": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/DescriptorProto" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "enumTypeCount": { + "type": "integer", + "format": "int32" + }, + "enumTypeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumDescriptorProto" + } + }, + "enumTypeOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumDescriptorProtoOrBuilder" + } + }, + "extensionCount": { + "type": "integer", + "format": "int32" + }, + "extensionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptorProto" + } + }, + "extensionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptorProtoOrBuilder" + } + }, + "extensionRangeCount": { + "type": "integer", + "format": "int32" + }, + "extensionRangeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtensionRange" + } + }, + "extensionRangeOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtensionRangeOrBuilder" + } + }, + "fieldCount": { + "type": "integer", + "format": "int32" + }, + "fieldList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptorProto" + } + }, + "fieldOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptorProtoOrBuilder" + } + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "nestedTypeCount": { + "type": "integer", + "format": "int32" + }, + "nestedTypeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DescriptorProto" + } + }, + "nestedTypeOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DescriptorProtoOrBuilder" + } + }, + "oneofDeclCount": { + "type": "integer", + "format": "int32" + }, + "oneofDeclList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OneofDescriptorProto" + } + }, + "oneofDeclOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OneofDescriptorProtoOrBuilder" + } + }, + "options": { + "$ref": "#/components/schemas/MessageOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/MessageOptionsOrBuilder" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserDescriptorProto" + }, + "reservedNameCount": { + "type": "integer", + "format": "int32" + }, + "reservedNameList": { + "type": "array", + "properties": { + "empty": { + "type": "boolean" + }, + "first": { + "type": "string" + }, + "last": { + "type": "string" + } + }, + "items": { + "type": "string" + } + }, + "reservedRangeCount": { + "type": "integer", + "format": "int32" + }, + "reservedRangeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReservedRange" + } + }, + "reservedRangeOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReservedRangeOrBuilder" + } + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "DescriptorProtoOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "enumTypeCount": { + "type": "integer", + "format": "int32" + }, + "enumTypeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumDescriptorProto" + } + }, + "enumTypeOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumDescriptorProtoOrBuilder" + } + }, + "extensionCount": { + "type": "integer", + "format": "int32" + }, + "extensionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptorProto" + } + }, + "extensionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptorProtoOrBuilder" + } + }, + "extensionRangeCount": { + "type": "integer", + "format": "int32" + }, + "extensionRangeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtensionRange" + } + }, + "extensionRangeOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtensionRangeOrBuilder" + } + }, + "fieldCount": { + "type": "integer", + "format": "int32" + }, + "fieldList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptorProto" + } + }, + "fieldOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptorProtoOrBuilder" + } + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "nestedTypeCount": { + "type": "integer", + "format": "int32" + }, + "nestedTypeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DescriptorProto" + } + }, + "oneofDeclCount": { + "type": "integer", + "format": "int32" + }, + "oneofDeclList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OneofDescriptorProto" + } + }, + "oneofDeclOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OneofDescriptorProtoOrBuilder" + } + }, + "options": { + "$ref": "#/components/schemas/MessageOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/MessageOptionsOrBuilder" + }, + "reservedNameCount": { + "type": "integer", + "format": "int32" + }, + "reservedNameList": { + "type": "array", + "items": { + "type": "string" + } + }, + "reservedRangeCount": { + "type": "integer", + "format": "int32" + }, + "reservedRangeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReservedRange" + } + }, + "reservedRangeOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReservedRangeOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "EditionDefault": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/EditionDefault" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "edition": { + "type": "string", + "enum": [ + "EDITION_UNKNOWN", + "EDITION_PROTO2", + "EDITION_PROTO3", + "EDITION_2023", + "EDITION_1_TEST_ONLY", + "EDITION_2_TEST_ONLY", + "EDITION_99997_TEST_ONLY", + "EDITION_99998_TEST_ONLY", + "EDITION_99999_TEST_ONLY" + ] + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserEditionDefault" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "value": { + "type": "string" + }, + "valueBytes": { + "$ref": "#/components/schemas/ByteString" + } + } + }, + "EditionDefaultOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "edition": { + "type": "string", + "enum": [ + "EDITION_UNKNOWN", + "EDITION_PROTO2", + "EDITION_PROTO3", + "EDITION_2023", + "EDITION_1_TEST_ONLY", + "EDITION_2_TEST_ONLY", + "EDITION_99997_TEST_ONLY", + "EDITION_99998_TEST_ONLY", + "EDITION_99999_TEST_ONLY" + ] + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "value": { + "type": "string" + }, + "valueBytes": { + "$ref": "#/components/schemas/ByteString" + } + } + }, + "EnumDescriptor": { + "type": "object", + "properties": { + "closed": { + "type": "boolean" + }, + "containingType": { + "$ref": "#/components/schemas/Descriptor" + }, + "file": { + "$ref": "#/components/schemas/FileDescriptor" + }, + "fullName": { + "type": "string" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "options": { + "$ref": "#/components/schemas/EnumOptions" + }, + "proto": { + "$ref": "#/components/schemas/EnumDescriptorProto" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumValueDescriptor" + } + } + } + }, + "EnumDescriptorProto": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/EnumDescriptorProto" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "options": { + "$ref": "#/components/schemas/EnumOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/EnumOptionsOrBuilder" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserEnumDescriptorProto" + }, + "reservedNameCount": { + "type": "integer", + "format": "int32" + }, + "reservedNameList": { + "type": "array", + "properties": { + "empty": { + "type": "boolean" + }, + "first": { + "type": "string" + }, + "last": { + "type": "string" + } + }, + "items": { + "type": "string" + } + }, + "reservedRangeCount": { + "type": "integer", + "format": "int32" + }, + "reservedRangeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumReservedRange" + } + }, + "reservedRangeOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumReservedRangeOrBuilder" + } + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "valueCount": { + "type": "integer", + "format": "int32" + }, + "valueList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumValueDescriptorProto" + } + }, + "valueOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumValueDescriptorProtoOrBuilder" + } + } + } + }, + "EnumDescriptorProtoOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "options": { + "$ref": "#/components/schemas/EnumOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/EnumOptionsOrBuilder" + }, + "reservedNameCount": { + "type": "integer", + "format": "int32" + }, + "reservedNameList": { + "type": "array", + "items": { + "type": "string" + } + }, + "reservedRangeCount": { + "type": "integer", + "format": "int32" + }, + "reservedRangeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumReservedRange" + } + }, + "reservedRangeOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumReservedRangeOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "valueCount": { + "type": "integer", + "format": "int32" + }, + "valueList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumValueDescriptorProto" + } + }, + "valueOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumValueDescriptorProtoOrBuilder" + } + } + } + }, + "EnumOptions": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "allFieldsRaw": { + "type": "object", + "additionalProperties": {} + }, + "allowAlias": { + "type": "boolean" + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/EnumOptions" + }, + "deprecated": { + "type": "boolean" + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "boolean", + "deprecated": true + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserEnumOptions" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "EnumOptionsOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "allowAlias": { + "type": "boolean" + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "deprecated": { + "type": "boolean" + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "boolean", + "deprecated": true + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "EnumReservedRange": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/EnumReservedRange" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "end": { + "type": "integer", + "format": "int32" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserEnumReservedRange" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "start": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "EnumReservedRangeOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "end": { + "type": "integer", + "format": "int32" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "start": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "EnumValueDescriptor": { + "type": "object", + "properties": { + "file": { + "$ref": "#/components/schemas/FileDescriptor" + }, + "fullName": { + "type": "string" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "number": { + "type": "integer", + "format": "int32" + }, + "options": { + "$ref": "#/components/schemas/EnumValueOptions" + }, + "proto": { + "$ref": "#/components/schemas/EnumValueDescriptorProto" + }, + "type": { + "$ref": "#/components/schemas/EnumDescriptor" + } + } + }, + "EnumValueDescriptorProto": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/EnumValueDescriptorProto" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "number": { + "type": "integer", + "format": "int32" + }, + "options": { + "$ref": "#/components/schemas/EnumValueOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/EnumValueOptionsOrBuilder" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserEnumValueDescriptorProto" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "EnumValueDescriptorProtoOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "number": { + "type": "integer", + "format": "int32" + }, + "options": { + "$ref": "#/components/schemas/EnumValueOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/EnumValueOptionsOrBuilder" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "EnumValueOptions": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "allFieldsRaw": { + "type": "object", + "additionalProperties": {} + }, + "debugRedact": { + "type": "boolean" + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/EnumValueOptions" + }, + "deprecated": { + "type": "boolean" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserEnumValueOptions" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "EnumValueOptionsOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "debugRedact": { + "type": "boolean" + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "deprecated": { + "type": "boolean" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "EnvironmentVariable": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "value": { + "type": "string" + } + } + }, + "EventHandler": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Action" + } + }, + "active": { + "type": "boolean" + }, + "condition": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "description": { + "type": "string" + }, + "evaluatorType": { + "type": "string" + }, + "event": { + "type": "string" + }, + "name": { + "type": "string" + }, + "orgId": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "EventLog": { + "type": "object", + "properties": { + "createdAt": { + "type": "integer", + "format": "int64" + }, + "event": { + "type": "string" + }, + "eventType": { + "type": "string", + "enum": [ + "SEND", + "RECEIVE" + ] + }, + "handlerName": { + "type": "string" + }, + "id": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "workerId": { + "type": "string" + } + } + }, + "EventMessage": { + "type": "object", + "properties": { + "createdAt": { + "type": "integer", + "format": "int64" + }, + "eventExecutions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtendedEventExecution" + } + }, + "eventTarget": { + "type": "string" + }, + "eventType": { + "type": "string", + "enum": [ + "WEBHOOK", + "MESSAGE" + ] + }, + "fullPayload": { + "type": "object", + "additionalProperties": {} + }, + "id": { + "type": "string" + }, + "orgId": { + "type": "string" + }, + "payload": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "RECEIVED", + "HANDLED", + "REJECTED" + ] + }, + "statusDescription": { + "type": "string" + } + } + }, + "ExtendedConductorApplication": { + "type": "object", + "properties": { + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + } + } + }, + "ExtendedEventExecution": { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "start_workflow", + "complete_task", + "fail_task", + "terminate_workflow", + "update_workflow_variables" + ] + }, + "created": { + "type": "integer", + "format": "int64" + }, + "event": { + "type": "string" + }, + "eventHandler": { + "$ref": "#/components/schemas/EventHandler" + }, + "fullMessagePayload": { + "type": "object", + "additionalProperties": {} + }, + "id": { + "type": "string" + }, + "messageId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "orgId": { + "type": "string" + }, + "output": { + "type": "object", + "additionalProperties": {} + }, + "payload": { + "type": "object", + "additionalProperties": {} + }, + "status": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "COMPLETED", + "FAILED", + "SKIPPED" + ] + }, + "statusDescription": { + "type": "string" + } + } + }, + "ExtendedSecret": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + } + } + }, + "ExtendedTaskDef": { + "required": [ + "name", + "timeoutSeconds", + "totalTimeoutSeconds" + ], + "type": "object", + "properties": { + "backoffScaleFactor": { + "type": "integer", + "format": "int32" + }, + "baseType": { + "type": "string" + }, + "concurrentExecLimit": { + "type": "integer", + "format": "int32" + }, + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enforceSchema": { + "type": "boolean" + }, + "executionNameSpace": { + "type": "string" + }, + "inputKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "inputSchema": { + "$ref": "#/components/schemas/SchemaDef" + }, + "inputTemplate": { + "type": "object", + "additionalProperties": {} + }, + "isolationGroupId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "outputKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputSchema": { + "$ref": "#/components/schemas/SchemaDef" + }, + "overwriteTags": { + "type": "boolean" + }, + "ownerApp": { + "type": "string" + }, + "ownerEmail": { + "type": "string" + }, + "pollTimeoutSeconds": { + "type": "integer", + "format": "int32" + }, + "rateLimitFrequencyInSeconds": { + "type": "integer", + "format": "int32" + }, + "rateLimitPerFrequency": { + "type": "integer", + "format": "int32" + }, + "responseTimeoutSeconds": { + "type": "integer", + "format": "int64" + }, + "retryCount": { + "type": "integer", + "format": "int32" + }, + "retryDelaySeconds": { + "type": "integer", + "format": "int32" + }, + "retryLogic": { + "type": "string", + "enum": [ + "FIXED", + "EXPONENTIAL_BACKOFF", + "LINEAR_BACKOFF" + ] + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "timeoutPolicy": { + "type": "string", + "enum": [ + "RETRY", + "TIME_OUT_WF", + "ALERT_ONLY" + ] + }, + "timeoutSeconds": { + "type": "integer", + "format": "int64" + }, + "totalTimeoutSeconds": { + "type": "integer", + "format": "int64" + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + } + } + }, + "ExtendedWorkflowDef": { + "required": [ + "name", + "tasks", + "timeoutSeconds" + ], + "type": "object", + "properties": { + "cacheConfig": { + "$ref": "#/components/schemas/CacheConfig" + }, + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enforceSchema": { + "type": "boolean" + }, + "failureWorkflow": { + "type": "string" + }, + "inputParameters": { + "type": "array", + "items": { + "type": "string" + } + }, + "inputSchema": { + "$ref": "#/components/schemas/SchemaDef" + }, + "inputTemplate": { + "type": "object", + "additionalProperties": {} + }, + "maskedFields": { + "type": "array", + "items": { + "type": "string" + } + }, + "metadata": { + "type": "object", + "additionalProperties": {} + }, + "name": { + "type": "string" + }, + "outputParameters": { + "type": "object", + "additionalProperties": {} + }, + "outputSchema": { + "$ref": "#/components/schemas/SchemaDef" + }, + "overwriteTags": { + "type": "boolean" + }, + "ownerApp": { + "type": "string" + }, + "ownerEmail": { + "type": "string" + }, + "rateLimitConfig": { + "$ref": "#/components/schemas/RateLimitConfig" + }, + "restartable": { + "type": "boolean" + }, + "schemaVersion": { + "type": "integer", + "format": "int32" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowTask" + } + }, + "timeoutPolicy": { + "type": "string", + "enum": [ + "TIME_OUT_WF", + "ALERT_ONLY" + ] + }, + "timeoutSeconds": { + "type": "integer", + "format": "int64" + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": {} + }, + "version": { + "type": "integer", + "format": "int32" + }, + "workflowStatusListenerEnabled": { + "type": "boolean" + }, + "workflowStatusListenerSink": { + "type": "string" + } + } + }, + "ExtensionRange": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/ExtensionRange" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "end": { + "type": "integer", + "format": "int32" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "options": { + "$ref": "#/components/schemas/ExtensionRangeOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/ExtensionRangeOptionsOrBuilder" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserExtensionRange" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "start": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "ExtensionRangeOptions": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "allFieldsRaw": { + "type": "object", + "additionalProperties": {} + }, + "declarationCount": { + "type": "integer", + "format": "int32" + }, + "declarationList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Declaration" + } + }, + "declarationOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeclarationOrBuilder" + } + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/ExtensionRangeOptions" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserExtensionRangeOptions" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "verification": { + "type": "string", + "enum": [ + "DECLARATION", + "UNVERIFIED" + ] + } + } + }, + "ExtensionRangeOptionsOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "declarationCount": { + "type": "integer", + "format": "int32" + }, + "declarationList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Declaration" + } + }, + "declarationOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeclarationOrBuilder" + } + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "verification": { + "type": "string", + "enum": [ + "DECLARATION", + "UNVERIFIED" + ] + } + } + }, + "ExtensionRangeOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "end": { + "type": "integer", + "format": "int32" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "options": { + "$ref": "#/components/schemas/ExtensionRangeOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/ExtensionRangeOptionsOrBuilder" + }, + "start": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "FeatureSet": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "allFieldsRaw": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/FeatureSet" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "enumType": { + "type": "string", + "enum": [ + "ENUM_TYPE_UNKNOWN", + "OPEN", + "CLOSED" + ] + }, + "fieldPresence": { + "type": "string", + "enum": [ + "FIELD_PRESENCE_UNKNOWN", + "EXPLICIT", + "IMPLICIT", + "LEGACY_REQUIRED" + ] + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "jsonFormat": { + "type": "string", + "enum": [ + "JSON_FORMAT_UNKNOWN", + "ALLOW", + "LEGACY_BEST_EFFORT" + ] + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "messageEncoding": { + "type": "string", + "enum": [ + "MESSAGE_ENCODING_UNKNOWN", + "LENGTH_PREFIXED", + "DELIMITED" + ] + }, + "parserForType": { + "$ref": "#/components/schemas/ParserFeatureSet" + }, + "repeatedFieldEncoding": { + "type": "string", + "enum": [ + "REPEATED_FIELD_ENCODING_UNKNOWN", + "PACKED", + "EXPANDED" + ] + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "utf8Validation": { + "type": "string", + "enum": [ + "UTF8_VALIDATION_UNKNOWN", + "NONE", + "VERIFY" + ] + } + } + }, + "FeatureSetOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "enumType": { + "type": "string", + "enum": [ + "ENUM_TYPE_UNKNOWN", + "OPEN", + "CLOSED" + ] + }, + "fieldPresence": { + "type": "string", + "enum": [ + "FIELD_PRESENCE_UNKNOWN", + "EXPLICIT", + "IMPLICIT", + "LEGACY_REQUIRED" + ] + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "jsonFormat": { + "type": "string", + "enum": [ + "JSON_FORMAT_UNKNOWN", + "ALLOW", + "LEGACY_BEST_EFFORT" + ] + }, + "messageEncoding": { + "type": "string", + "enum": [ + "MESSAGE_ENCODING_UNKNOWN", + "LENGTH_PREFIXED", + "DELIMITED" + ] + }, + "repeatedFieldEncoding": { + "type": "string", + "enum": [ + "REPEATED_FIELD_ENCODING_UNKNOWN", + "PACKED", + "EXPANDED" + ] + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "utf8Validation": { + "type": "string", + "enum": [ + "UTF8_VALIDATION_UNKNOWN", + "NONE", + "VERIFY" + ] + } + } + }, + "FieldDescriptor": { + "type": "object", + "properties": { + "containingOneof": { + "$ref": "#/components/schemas/OneofDescriptor" + }, + "containingType": { + "$ref": "#/components/schemas/Descriptor" + }, + "defaultValue": { + "type": "object", + "additionalProperties": {} + }, + "enumType": { + "$ref": "#/components/schemas/EnumDescriptor" + }, + "extension": { + "type": "boolean" + }, + "extensionScope": { + "$ref": "#/components/schemas/Descriptor" + }, + "file": { + "$ref": "#/components/schemas/FileDescriptor" + }, + "fullName": { + "type": "string" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "javaType": { + "type": "string", + "enum": [ + "INT", + "LONG", + "FLOAT", + "DOUBLE", + "BOOLEAN", + "STRING", + "BYTE_STRING", + "ENUM", + "MESSAGE" + ] + }, + "jsonName": { + "type": "string" + }, + "liteJavaType": { + "type": "string", + "enum": [ + "INT", + "LONG", + "FLOAT", + "DOUBLE", + "BOOLEAN", + "STRING", + "BYTE_STRING", + "ENUM", + "MESSAGE" + ] + }, + "liteType": { + "type": "string", + "enum": [ + "DOUBLE", + "FLOAT", + "INT64", + "UINT64", + "INT32", + "FIXED64", + "FIXED32", + "BOOL", + "STRING", + "GROUP", + "MESSAGE", + "BYTES", + "UINT32", + "ENUM", + "SFIXED32", + "SFIXED64", + "SINT32", + "SINT64" + ] + }, + "mapField": { + "type": "boolean" + }, + "messageType": { + "$ref": "#/components/schemas/Descriptor" + }, + "name": { + "type": "string" + }, + "number": { + "type": "integer", + "format": "int32" + }, + "optional": { + "type": "boolean" + }, + "options": { + "$ref": "#/components/schemas/FieldOptions" + }, + "packable": { + "type": "boolean" + }, + "packed": { + "type": "boolean" + }, + "proto": { + "$ref": "#/components/schemas/FieldDescriptorProto" + }, + "realContainingOneof": { + "$ref": "#/components/schemas/OneofDescriptor" + }, + "repeated": { + "type": "boolean" + }, + "required": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "DOUBLE", + "FLOAT", + "INT64", + "UINT64", + "INT32", + "FIXED64", + "FIXED32", + "BOOL", + "STRING", + "GROUP", + "MESSAGE", + "BYTES", + "UINT32", + "ENUM", + "SFIXED32", + "SFIXED64", + "SINT32", + "SINT64" + ] + } + } + }, + "FieldDescriptorProto": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/FieldDescriptorProto" + }, + "defaultValue": { + "type": "string" + }, + "defaultValueBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "extendee": { + "type": "string" + }, + "extendeeBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "jsonName": { + "type": "string" + }, + "jsonNameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "label": { + "type": "string", + "enum": [ + "LABEL_OPTIONAL", + "LABEL_REPEATED", + "LABEL_REQUIRED" + ] + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "number": { + "type": "integer", + "format": "int32" + }, + "oneofIndex": { + "type": "integer", + "format": "int32" + }, + "options": { + "$ref": "#/components/schemas/FieldOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/FieldOptionsOrBuilder" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserFieldDescriptorProto" + }, + "proto3Optional": { + "type": "boolean" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "type": { + "type": "string", + "enum": [ + "TYPE_DOUBLE", + "TYPE_FLOAT", + "TYPE_INT64", + "TYPE_UINT64", + "TYPE_INT32", + "TYPE_FIXED64", + "TYPE_FIXED32", + "TYPE_BOOL", + "TYPE_STRING", + "TYPE_GROUP", + "TYPE_MESSAGE", + "TYPE_BYTES", + "TYPE_UINT32", + "TYPE_ENUM", + "TYPE_SFIXED32", + "TYPE_SFIXED64", + "TYPE_SINT32", + "TYPE_SINT64" + ] + }, + "typeName": { + "type": "string" + }, + "typeNameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "FieldDescriptorProtoOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "defaultValue": { + "type": "string" + }, + "defaultValueBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "extendee": { + "type": "string" + }, + "extendeeBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "jsonName": { + "type": "string" + }, + "jsonNameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "label": { + "type": "string", + "enum": [ + "LABEL_OPTIONAL", + "LABEL_REPEATED", + "LABEL_REQUIRED" + ] + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "number": { + "type": "integer", + "format": "int32" + }, + "oneofIndex": { + "type": "integer", + "format": "int32" + }, + "options": { + "$ref": "#/components/schemas/FieldOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/FieldOptionsOrBuilder" + }, + "proto3Optional": { + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "TYPE_DOUBLE", + "TYPE_FLOAT", + "TYPE_INT64", + "TYPE_UINT64", + "TYPE_INT32", + "TYPE_FIXED64", + "TYPE_FIXED32", + "TYPE_BOOL", + "TYPE_STRING", + "TYPE_GROUP", + "TYPE_MESSAGE", + "TYPE_BYTES", + "TYPE_UINT32", + "TYPE_ENUM", + "TYPE_SFIXED32", + "TYPE_SFIXED64", + "TYPE_SINT32", + "TYPE_SINT64" + ] + }, + "typeName": { + "type": "string" + }, + "typeNameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "FieldOptions": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "allFieldsRaw": { + "type": "object", + "additionalProperties": {} + }, + "ctype": { + "type": "string", + "enum": [ + "STRING", + "CORD", + "STRING_PIECE" + ] + }, + "debugRedact": { + "type": "boolean" + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/FieldOptions" + }, + "deprecated": { + "type": "boolean" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "editionDefaultsCount": { + "type": "integer", + "format": "int32" + }, + "editionDefaultsList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EditionDefault" + } + }, + "editionDefaultsOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EditionDefaultOrBuilder" + } + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "jstype": { + "type": "string", + "enum": [ + "JS_NORMAL", + "JS_STRING", + "JS_NUMBER" + ] + }, + "lazy": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "packed": { + "type": "boolean" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserFieldOptions" + }, + "retention": { + "type": "string", + "enum": [ + "RETENTION_UNKNOWN", + "RETENTION_RUNTIME", + "RETENTION_SOURCE" + ] + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "targetsCount": { + "type": "integer", + "format": "int32" + }, + "targetsList": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "TARGET_TYPE_UNKNOWN", + "TARGET_TYPE_FILE", + "TARGET_TYPE_EXTENSION_RANGE", + "TARGET_TYPE_MESSAGE", + "TARGET_TYPE_FIELD", + "TARGET_TYPE_ONEOF", + "TARGET_TYPE_ENUM", + "TARGET_TYPE_ENUM_ENTRY", + "TARGET_TYPE_SERVICE", + "TARGET_TYPE_METHOD" + ] + } + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "unverifiedLazy": { + "type": "boolean" + }, + "weak": { + "type": "boolean" + } + } + }, + "FieldOptionsOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "ctype": { + "type": "string", + "enum": [ + "STRING", + "CORD", + "STRING_PIECE" + ] + }, + "debugRedact": { + "type": "boolean" + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "deprecated": { + "type": "boolean" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "editionDefaultsCount": { + "type": "integer", + "format": "int32" + }, + "editionDefaultsList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EditionDefault" + } + }, + "editionDefaultsOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EditionDefaultOrBuilder" + } + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "jstype": { + "type": "string", + "enum": [ + "JS_NORMAL", + "JS_STRING", + "JS_NUMBER" + ] + }, + "lazy": { + "type": "boolean" + }, + "packed": { + "type": "boolean" + }, + "retention": { + "type": "string", + "enum": [ + "RETENTION_UNKNOWN", + "RETENTION_RUNTIME", + "RETENTION_SOURCE" + ] + }, + "targetsCount": { + "type": "integer", + "format": "int32" + }, + "targetsList": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "TARGET_TYPE_UNKNOWN", + "TARGET_TYPE_FILE", + "TARGET_TYPE_EXTENSION_RANGE", + "TARGET_TYPE_MESSAGE", + "TARGET_TYPE_FIELD", + "TARGET_TYPE_ONEOF", + "TARGET_TYPE_ENUM", + "TARGET_TYPE_ENUM_ENTRY", + "TARGET_TYPE_SERVICE", + "TARGET_TYPE_METHOD" + ] + } + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "unverifiedLazy": { + "type": "boolean" + }, + "weak": { + "type": "boolean" + } + } + }, + "FileDescriptor": { + "type": "object", + "properties": { + "dependencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileDescriptor" + } + }, + "edition": { + "type": "string", + "enum": [ + "EDITION_UNKNOWN", + "EDITION_PROTO2", + "EDITION_PROTO3", + "EDITION_2023", + "EDITION_1_TEST_ONLY", + "EDITION_2_TEST_ONLY", + "EDITION_99997_TEST_ONLY", + "EDITION_99998_TEST_ONLY", + "EDITION_99999_TEST_ONLY" + ] + }, + "editionName": { + "type": "string" + }, + "enumTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumDescriptor" + } + }, + "extensions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptor" + } + }, + "file": { + "$ref": "#/components/schemas/FileDescriptor" + }, + "fullName": { + "type": "string" + }, + "messageTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Descriptor" + } + }, + "name": { + "type": "string" + }, + "options": { + "$ref": "#/components/schemas/FileOptions" + }, + "package": { + "type": "string" + }, + "proto": { + "$ref": "#/components/schemas/FileDescriptorProto" + }, + "publicDependencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileDescriptor" + } + }, + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceDescriptor" + } + }, + "syntax": { + "type": "string", + "deprecated": true, + "enum": [ + "UNKNOWN", + "PROTO2", + "PROTO3", + "EDITIONS" + ] + } + } + }, + "FileDescriptorProto": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/FileDescriptorProto" + }, + "dependencyCount": { + "type": "integer", + "format": "int32" + }, + "dependencyList": { + "type": "array", + "properties": { + "empty": { + "type": "boolean" + }, + "first": { + "type": "string" + }, + "last": { + "type": "string" + } + }, + "items": { + "type": "string" + } + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "edition": { + "type": "string", + "enum": [ + "EDITION_UNKNOWN", + "EDITION_PROTO2", + "EDITION_PROTO3", + "EDITION_2023", + "EDITION_1_TEST_ONLY", + "EDITION_2_TEST_ONLY", + "EDITION_99997_TEST_ONLY", + "EDITION_99998_TEST_ONLY", + "EDITION_99999_TEST_ONLY" + ] + }, + "enumTypeCount": { + "type": "integer", + "format": "int32" + }, + "enumTypeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumDescriptorProto" + } + }, + "enumTypeOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumDescriptorProtoOrBuilder" + } + }, + "extensionCount": { + "type": "integer", + "format": "int32" + }, + "extensionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptorProto" + } + }, + "extensionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldDescriptorProtoOrBuilder" + } + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "messageTypeCount": { + "type": "integer", + "format": "int32" + }, + "messageTypeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DescriptorProto" + } + }, + "messageTypeOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DescriptorProtoOrBuilder" + } + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "options": { + "$ref": "#/components/schemas/FileOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/FileOptionsOrBuilder" + }, + "package": { + "type": "string" + }, + "packageBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserFileDescriptorProto" + }, + "publicDependencyCount": { + "type": "integer", + "format": "int32" + }, + "publicDependencyList": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "serviceCount": { + "type": "integer", + "format": "int32" + }, + "serviceList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceDescriptorProto" + } + }, + "serviceOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceDescriptorProtoOrBuilder" + } + }, + "sourceCodeInfo": { + "$ref": "#/components/schemas/SourceCodeInfo" + }, + "sourceCodeInfoOrBuilder": { + "$ref": "#/components/schemas/SourceCodeInfoOrBuilder" + }, + "syntax": { + "type": "string" + }, + "syntaxBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "weakDependencyCount": { + "type": "integer", + "format": "int32" + }, + "weakDependencyList": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + }, + "FileOptions": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "allFieldsRaw": { + "type": "object", + "additionalProperties": {} + }, + "ccEnableArenas": { + "type": "boolean" + }, + "ccGenericServices": { + "type": "boolean" + }, + "csharpNamespace": { + "type": "string" + }, + "csharpNamespaceBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/FileOptions" + }, + "deprecated": { + "type": "boolean" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "goPackage": { + "type": "string" + }, + "goPackageBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "javaGenerateEqualsAndHash": { + "type": "boolean", + "deprecated": true + }, + "javaGenericServices": { + "type": "boolean" + }, + "javaMultipleFiles": { + "type": "boolean" + }, + "javaOuterClassname": { + "type": "string" + }, + "javaOuterClassnameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "javaPackage": { + "type": "string" + }, + "javaPackageBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "javaStringCheckUtf8": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "objcClassPrefix": { + "type": "string" + }, + "objcClassPrefixBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "optimizeFor": { + "type": "string", + "enum": [ + "SPEED", + "CODE_SIZE", + "LITE_RUNTIME" + ] + }, + "parserForType": { + "$ref": "#/components/schemas/ParserFileOptions" + }, + "phpClassPrefix": { + "type": "string" + }, + "phpClassPrefixBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "phpGenericServices": { + "type": "boolean" + }, + "phpMetadataNamespace": { + "type": "string" + }, + "phpMetadataNamespaceBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "phpNamespace": { + "type": "string" + }, + "phpNamespaceBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "pyGenericServices": { + "type": "boolean" + }, + "rubyPackage": { + "type": "string" + }, + "rubyPackageBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "swiftPrefix": { + "type": "string" + }, + "swiftPrefixBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "FileOptionsOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "ccEnableArenas": { + "type": "boolean" + }, + "ccGenericServices": { + "type": "boolean" + }, + "csharpNamespace": { + "type": "string" + }, + "csharpNamespaceBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "deprecated": { + "type": "boolean" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "goPackage": { + "type": "string" + }, + "goPackageBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "javaGenerateEqualsAndHash": { + "type": "boolean", + "deprecated": true + }, + "javaGenericServices": { + "type": "boolean" + }, + "javaMultipleFiles": { + "type": "boolean" + }, + "javaOuterClassname": { + "type": "string" + }, + "javaOuterClassnameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "javaPackage": { + "type": "string" + }, + "javaPackageBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "javaStringCheckUtf8": { + "type": "boolean" + }, + "objcClassPrefix": { + "type": "string" + }, + "objcClassPrefixBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "optimizeFor": { + "type": "string", + "enum": [ + "SPEED", + "CODE_SIZE", + "LITE_RUNTIME" + ] + }, + "phpClassPrefix": { + "type": "string" + }, + "phpClassPrefixBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "phpGenericServices": { + "type": "boolean" + }, + "phpMetadataNamespace": { + "type": "string" + }, + "phpMetadataNamespaceBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "phpNamespace": { + "type": "string" + }, + "phpNamespaceBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "pyGenericServices": { + "type": "boolean" + }, + "rubyPackage": { + "type": "string" + }, + "rubyPackageBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "swiftPrefix": { + "type": "string" + }, + "swiftPrefixBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "GenerateTokenRequest": { + "required": [ + "keyId", + "keySecret" + ], + "type": "object", + "properties": { + "expiration": { + "type": "integer", + "format": "int64" + }, + "keyId": { + "type": "string" + }, + "keySecret": { + "type": "string" + } + } + }, + "GrantedAccess": { + "type": "object", + "properties": { + "access": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string", + "enum": [ + "CREATE", + "READ", + "EXECUTE", + "UPDATE", + "DELETE" + ] + } + }, + "tag": { + "type": "string" + }, + "target": { + "$ref": "#/components/schemas/TargetRef" + } + } + }, + "GrantedAccessResponse": { + "type": "object", + "properties": { + "grantedAccess": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrantedAccess" + } + } + } + }, + "Group": { + "type": "object", + "properties": { + "defaultAccess": { + "type": "object", + "additionalProperties": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string", + "enum": [ + "CREATE", + "READ", + "EXECUTE", + "UPDATE", + "DELETE" + ] + } + } + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "roles": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "HandledEventResponse": { + "type": "object", + "properties": { + "active": { + "type": "boolean" + }, + "event": { + "type": "string" + }, + "name": { + "type": "string" + }, + "numberOfActions": { + "type": "integer", + "format": "int64" + }, + "numberOfMessages": { + "type": "integer", + "format": "int64" + } + } + }, + "HumanTaskAssignment": { + "type": "object", + "properties": { + "assignee": { + "$ref": "#/components/schemas/HumanTaskUser" + }, + "slaMinutes": { + "type": "integer", + "format": "int64" + } + } + }, + "HumanTaskDefinition": { + "type": "object", + "properties": { + "assignmentCompletionStrategy": { + "type": "string", + "enum": [ + "LEAVE_OPEN", + "TERMINATE" + ] + }, + "assignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HumanTaskAssignment" + } + }, + "displayName": { + "type": "string" + }, + "fullTemplate": { + "$ref": "#/components/schemas/HumanTaskTemplate" + }, + "taskTriggers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HumanTaskTrigger" + } + }, + "userFormTemplate": { + "$ref": "#/components/schemas/UserFormTemplate" + } + } + }, + "HumanTaskEntry": { + "type": "object", + "properties": { + "assignee": { + "$ref": "#/components/schemas/HumanTaskUser" + }, + "claimant": { + "$ref": "#/components/schemas/HumanTaskUser" + }, + "createdBy": { + "type": "string" + }, + "createdOn": { + "type": "integer", + "format": "int64" + }, + "definitionName": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "humanTaskDef": { + "$ref": "#/components/schemas/HumanTaskDefinition" + }, + "input": { + "type": "object", + "additionalProperties": {} + }, + "output": { + "type": "object", + "additionalProperties": {} + }, + "ownerApp": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "PENDING", + "ASSIGNED", + "IN_PROGRESS", + "COMPLETED", + "TIMED_OUT", + "DELETED" + ] + }, + "taskId": { + "type": "string" + }, + "taskRefName": { + "type": "string" + }, + "updatedBy": { + "type": "string" + }, + "updatedOn": { + "type": "integer", + "format": "int64" + }, + "workflowId": { + "type": "string" + }, + "workflowName": { + "type": "string" + } + } + }, + "HumanTaskSearch": { + "type": "object", + "properties": { + "assignees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HumanTaskUser" + } + }, + "claimants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HumanTaskUser" + } + }, + "definitionNames": { + "type": "array", + "items": { + "type": "string" + } + }, + "displayNames": { + "type": "array", + "items": { + "type": "string" + } + }, + "fullTextQuery": { + "type": "string" + }, + "searchType": { + "type": "string", + "enum": [ + "ADMIN", + "INBOX" + ] + }, + "size": { + "type": "integer", + "format": "int32" + }, + "start": { + "type": "integer", + "format": "int32" + }, + "states": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "PENDING", + "ASSIGNED", + "IN_PROGRESS", + "COMPLETED", + "TIMED_OUT", + "DELETED" + ] + } + }, + "taskInputQuery": { + "type": "string" + }, + "taskOutputQuery": { + "type": "string" + }, + "taskRefNames": { + "type": "array", + "items": { + "type": "string" + } + }, + "updateEndTime": { + "type": "integer", + "format": "int64" + }, + "updateStartTime": { + "type": "integer", + "format": "int64" + }, + "workflowIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "workflowNames": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "HumanTaskSearchResult": { + "type": "object", + "properties": { + "hits": { + "type": "integer", + "format": "int32" + }, + "pageSizeLimit": { + "type": "integer", + "format": "int32" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HumanTaskEntry" + } + }, + "start": { + "type": "integer", + "format": "int32" + }, + "totalHits": { + "type": "integer", + "format": "int64" + } + } + }, + "HumanTaskTemplate": { + "required": [ + "jsonSchema", + "name", + "templateUI", + "version" + ], + "type": "object", + "properties": { + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "jsonSchema": { + "type": "object", + "additionalProperties": {} + }, + "name": { + "type": "string" + }, + "ownerApp": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "templateUI": { + "type": "object", + "additionalProperties": {} + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + }, + "version": { + "type": "integer", + "format": "int32" + } + } + }, + "HumanTaskTrigger": { + "type": "object", + "properties": { + "startWorkflowRequest": { + "$ref": "#/components/schemas/StartWorkflowRequest" + }, + "triggerType": { + "type": "string", + "enum": [ + "ASSIGNEE_CHANGED", + "CLAIMANT_CHANGED", + "PENDING", + "IN_PROGRESS", + "ASSIGNED", + "COMPLETED", + "TIMED_OUT" + ] + } + } + }, + "HumanTaskUser": { + "type": "object", + "properties": { + "user": { + "type": "string" + }, + "userType": { + "type": "string", + "enum": [ + "EXTERNAL_USER", + "EXTERNAL_GROUP", + "CONDUCTOR_USER", + "CONDUCTOR_GROUP" + ] + } + } + }, + "IncomingBpmnFile": { + "required": [ + "fileContent", + "fileName" + ], + "type": "object", + "properties": { + "fileContent": { + "type": "string" + }, + "fileName": { + "type": "string" + } + } + }, + "Integration": { + "type": "object", + "properties": { + "apis": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationApi" + } + }, + "category": { + "type": "string", + "enum": [ + "API", + "AI_MODEL", + "VECTOR_DB", + "RELATIONAL_DB", + "MESSAGE_BROKER", + "GIT", + "EMAIL", + "MCP" + ] + }, + "configuration": { + "type": "object", + "additionalProperties": {} + }, + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "modelsCount": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "ownerApp": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "type": { + "type": "string" + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + } + } + }, + "IntegrationApi": { + "type": "object", + "properties": { + "api": { + "type": "string" + }, + "configuration": { + "type": "object", + "additionalProperties": {} + }, + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "integrationName": { + "type": "string" + }, + "ownerApp": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + } + } + }, + "IntegrationApiUpdate": { + "type": "object", + "properties": { + "configuration": { + "type": "object", + "additionalProperties": {} + }, + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + } + } + }, + "IntegrationDef": { + "type": "object", + "properties": { + "apis": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationDefApi" + } + }, + "category": { + "type": "string", + "enum": [ + "API", + "AI_MODEL", + "VECTOR_DB", + "RELATIONAL_DB", + "MESSAGE_BROKER", + "GIT", + "EMAIL", + "MCP" + ] + }, + "categoryLabel": { + "type": "string" + }, + "configuration": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationDefFormField" + } + }, + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "iconName": { + "type": "string" + }, + "name": { + "type": "string" + }, + "tags": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string" + } + } + }, + "IntegrationDefApi": { + "type": "object", + "properties": { + "api": { + "type": "string" + }, + "description": { + "type": "string" + }, + "inputSchema": { + "$ref": "#/components/schemas/SchemaDef" + }, + "integrationType": { + "type": "string" + }, + "outputSchema": { + "$ref": "#/components/schemas/SchemaDef" + } + } + }, + "IntegrationDefFormField": { + "type": "object", + "properties": { + "defaultValue": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fieldName": { + "type": "string", + "enum": [ + "api_key", + "user", + "endpoint", + "authUrl", + "environment", + "projectName", + "indexName", + "publisher", + "password", + "namespace", + "batchSize", + "batchWaitTime", + "visibilityTimeout", + "connectionType", + "connectionPoolSize", + "consumer", + "stream", + "batchPollConsumersCount", + "consumer_type", + "region", + "awsAccountId", + "externalId", + "roleArn", + "protocol", + "mechanism", + "port", + "schemaRegistryUrl", + "schemaRegistryApiKey", + "schemaRegistryApiSecret", + "authenticationType", + "truststoreAuthenticationType", + "tls", + "cipherSuite", + "pubSubMethod", + "keyStorePassword", + "keyStoreLocation", + "schemaRegistryAuthType", + "valueSubjectNameStrategy", + "datasourceURL", + "jdbcDriver", + "subscription", + "serviceAccountCredentials", + "file", + "tlsFile", + "queueManager", + "groupId", + "channel", + "dimensions", + "distance_metric", + "indexing_method", + "inverted_list_count", + "pullPeriod", + "pullBatchWaitMillis", + "completionsPath", + "betaVersion", + "version" + ] + }, + "fieldType": { + "type": "string", + "enum": [ + "DROPDOWN", + "TEXT", + "PASSWORD", + "FILE" + ] + }, + "label": { + "type": "string" + }, + "optional": { + "type": "boolean" + }, + "value": { + "type": "string" + }, + "valueOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Option" + } + } + } + }, + "IntegrationUpdate": { + "type": "object", + "properties": { + "category": { + "type": "string", + "enum": [ + "API", + "AI_MODEL", + "VECTOR_DB", + "RELATIONAL_DB", + "MESSAGE_BROKER", + "GIT", + "EMAIL", + "MCP" + ] + }, + "configuration": { + "type": "object", + "additionalProperties": {} + }, + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "type": { + "type": "string" + } + } + }, + "Location": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Location" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "leadingComments": { + "type": "string" + }, + "leadingCommentsBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "leadingDetachedCommentsCount": { + "type": "integer", + "format": "int32" + }, + "leadingDetachedCommentsList": { + "type": "array", + "properties": { + "empty": { + "type": "boolean" + }, + "first": { + "type": "string" + }, + "last": { + "type": "string" + } + }, + "items": { + "type": "string" + } + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserLocation" + }, + "pathCount": { + "type": "integer", + "format": "int32" + }, + "pathList": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "spanCount": { + "type": "integer", + "format": "int32" + }, + "spanList": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "trailingComments": { + "type": "string" + }, + "trailingCommentsBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "LocationOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "leadingComments": { + "type": "string" + }, + "leadingCommentsBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "leadingDetachedCommentsCount": { + "type": "integer", + "format": "int32" + }, + "leadingDetachedCommentsList": { + "type": "array", + "items": { + "type": "string" + } + }, + "pathCount": { + "type": "integer", + "format": "int32" + }, + "pathList": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "spanCount": { + "type": "integer", + "format": "int32" + }, + "spanList": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "trailingComments": { + "type": "string" + }, + "trailingCommentsBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "Message": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/MessageLite" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserMessage" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "MessageLite": { + "type": "object", + "properties": { + "defaultInstanceForType": { + "$ref": "#/components/schemas/MessageLite" + }, + "initialized": { + "type": "boolean" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserMessageLite" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + } + } + }, + "MessageOptions": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "allFieldsRaw": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/MessageOptions" + }, + "deprecated": { + "type": "boolean" + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "boolean", + "deprecated": true + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "mapEntry": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "messageSetWireFormat": { + "type": "boolean" + }, + "noStandardDescriptorAccessor": { + "type": "boolean" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserMessageOptions" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "MessageOptionsOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "deprecated": { + "type": "boolean" + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "boolean", + "deprecated": true + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "mapEntry": { + "type": "boolean" + }, + "messageSetWireFormat": { + "type": "boolean" + }, + "noStandardDescriptorAccessor": { + "type": "boolean" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "MessageTemplate": { + "type": "object", + "properties": { + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "description": { + "type": "string" + }, + "integrations": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "ownerApp": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "template": { + "type": "string" + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + }, + "variables": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "type": "integer", + "format": "int32" + } + } + }, + "MethodDescriptor": { + "type": "object", + "properties": { + "clientStreaming": { + "type": "boolean" + }, + "file": { + "$ref": "#/components/schemas/FileDescriptor" + }, + "fullName": { + "type": "string" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "inputType": { + "$ref": "#/components/schemas/Descriptor" + }, + "name": { + "type": "string" + }, + "options": { + "$ref": "#/components/schemas/MethodOptions" + }, + "outputType": { + "$ref": "#/components/schemas/Descriptor" + }, + "proto": { + "$ref": "#/components/schemas/MethodDescriptorProto" + }, + "serverStreaming": { + "type": "boolean" + }, + "service": { + "$ref": "#/components/schemas/ServiceDescriptor" + } + } + }, + "MethodDescriptorProto": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "clientStreaming": { + "type": "boolean" + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/MethodDescriptorProto" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "inputType": { + "type": "string" + }, + "inputTypeBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "options": { + "$ref": "#/components/schemas/MethodOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/MethodOptionsOrBuilder" + }, + "outputType": { + "type": "string" + }, + "outputTypeBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserMethodDescriptorProto" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "serverStreaming": { + "type": "boolean" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "MethodDescriptorProtoOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "clientStreaming": { + "type": "boolean" + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "inputType": { + "type": "string" + }, + "inputTypeBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "options": { + "$ref": "#/components/schemas/MethodOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/MethodOptionsOrBuilder" + }, + "outputType": { + "type": "string" + }, + "outputTypeBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "serverStreaming": { + "type": "boolean" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "MethodOptions": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "allFieldsRaw": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/MethodOptions" + }, + "deprecated": { + "type": "boolean" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "idempotencyLevel": { + "type": "string", + "enum": [ + "IDEMPOTENCY_UNKNOWN", + "NO_SIDE_EFFECTS", + "IDEMPOTENT" + ] + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserMethodOptions" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "MethodOptionsOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "deprecated": { + "type": "boolean" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "idempotencyLevel": { + "type": "string", + "enum": [ + "IDEMPOTENCY_UNKNOWN", + "NO_SIDE_EFFECTS", + "IDEMPOTENT" + ] + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "NamePart": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/NamePart" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "isExtension": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "namePart": { + "type": "string" + }, + "namePartBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserNamePart" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "NamePartOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "isExtension": { + "type": "boolean" + }, + "namePart": { + "type": "string" + }, + "namePartBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "OneofDescriptor": { + "type": "object", + "properties": { + "containingType": { + "$ref": "#/components/schemas/Descriptor" + }, + "fieldCount": { + "type": "integer", + "format": "int32" + }, + "file": { + "$ref": "#/components/schemas/FileDescriptor" + }, + "fullName": { + "type": "string" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "options": { + "$ref": "#/components/schemas/OneofOptions" + }, + "proto": { + "$ref": "#/components/schemas/OneofDescriptorProto" + }, + "synthetic": { + "type": "boolean", + "deprecated": true + } + } + }, + "OneofDescriptorProto": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/OneofDescriptorProto" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "options": { + "$ref": "#/components/schemas/OneofOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/OneofOptionsOrBuilder" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserOneofDescriptorProto" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "OneofDescriptorProtoOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "options": { + "$ref": "#/components/schemas/OneofOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/OneofOptionsOrBuilder" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "OneofOptions": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "allFieldsRaw": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/OneofOptions" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserOneofOptions" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "OneofOptionsOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "Option": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "OrkesCircuitBreakerConfig": { + "type": "object", + "properties": { + "automaticTransitionFromOpenToHalfOpenEnabled": { + "type": "boolean" + }, + "failureRateThreshold": { + "type": "number", + "format": "float" + }, + "maxWaitDurationInHalfOpenState": { + "type": "integer", + "format": "int64" + }, + "minimumNumberOfCalls": { + "type": "integer", + "format": "int32" + }, + "permittedNumberOfCallsInHalfOpenState": { + "type": "integer", + "format": "int32" + }, + "slidingWindowSize": { + "type": "integer", + "format": "int32" + }, + "slowCallDurationThreshold": { + "type": "integer", + "format": "int64" + }, + "slowCallRateThreshold": { + "type": "number", + "format": "float" + }, + "waitDurationInOpenState": { + "type": "integer", + "format": "int64" + } + } + }, + "Parser": { + "type": "object", + "additionalProperties": {} + }, + "ParserAny": { + "type": "object", + "additionalProperties": {} + }, + "ParserDeclaration": { + "type": "object", + "additionalProperties": {} + }, + "ParserDescriptorProto": { + "type": "object", + "additionalProperties": {} + }, + "ParserEditionDefault": { + "type": "object", + "additionalProperties": {} + }, + "ParserEnumDescriptorProto": { + "type": "object", + "additionalProperties": {} + }, + "ParserEnumOptions": { + "type": "object", + "additionalProperties": {} + }, + "ParserEnumReservedRange": { + "type": "object", + "additionalProperties": {} + }, + "ParserEnumValueDescriptorProto": { + "type": "object", + "additionalProperties": {} + }, + "ParserEnumValueOptions": { + "type": "object", + "additionalProperties": {} + }, + "ParserExtensionRange": { + "type": "object", + "additionalProperties": {} + }, + "ParserExtensionRangeOptions": { + "type": "object", + "additionalProperties": {} + }, + "ParserFeatureSet": { + "type": "object", + "additionalProperties": {} + }, + "ParserFieldDescriptorProto": { + "type": "object", + "additionalProperties": {} + }, + "ParserFieldOptions": { + "type": "object", + "additionalProperties": {} + }, + "ParserFileDescriptorProto": { + "type": "object", + "additionalProperties": {} + }, + "ParserFileOptions": { + "type": "object", + "additionalProperties": {} + }, + "ParserLocation": { + "type": "object", + "additionalProperties": {} + }, + "ParserMessage": { + "type": "object", + "additionalProperties": {} + }, + "ParserMessageLite": { + "type": "object", + "additionalProperties": {} + }, + "ParserMessageOptions": { + "type": "object", + "additionalProperties": {} + }, + "ParserMethodDescriptorProto": { + "type": "object", + "additionalProperties": {} + }, + "ParserMethodOptions": { + "type": "object", + "additionalProperties": {} + }, + "ParserNamePart": { + "type": "object", + "additionalProperties": {} + }, + "ParserOneofDescriptorProto": { + "type": "object", + "additionalProperties": {} + }, + "ParserOneofOptions": { + "type": "object", + "additionalProperties": {} + }, + "ParserReservedRange": { + "type": "object", + "additionalProperties": {} + }, + "ParserServiceDescriptorProto": { + "type": "object", + "additionalProperties": {} + }, + "ParserServiceOptions": { + "type": "object", + "additionalProperties": {} + }, + "ParserSourceCodeInfo": { + "type": "object", + "additionalProperties": {} + }, + "ParserUninterpretedOption": { + "type": "object", + "additionalProperties": {} + }, + "Permission": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "PollData": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "lastPollTime": { + "type": "integer", + "format": "int64" + }, + "queueName": { + "type": "string" + }, + "workerId": { + "type": "string" + } + } + }, + "PromptTemplateTestRequest": { + "type": "object", + "properties": { + "llmProvider": { + "type": "string" + }, + "model": { + "type": "string" + }, + "prompt": { + "type": "string" + }, + "promptVariables": { + "type": "object", + "additionalProperties": {} + }, + "stopWords": { + "type": "array", + "items": { + "type": "string" + } + }, + "temperature": { + "type": "number", + "format": "double" + }, + "topP": { + "type": "number", + "format": "double" + } + } + }, + "ProtoRegistryEntry": { + "type": "object", + "properties": { + "data": { + "type": "string", + "format": "byte" + }, + "filename": { + "type": "string" + }, + "serviceName": { + "type": "string" + } + } + }, + "RateLimitConfig": { + "type": "object", + "properties": { + "concurrentExecLimit": { + "type": "integer", + "format": "int32" + }, + "rateLimitKey": { + "type": "string" + } + } + }, + "RequestParam": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "schema": { + "$ref": "#/components/schemas/Schema" + }, + "type": { + "type": "string" + } + } + }, + "RerunWorkflowRequest": { + "type": "object", + "properties": { + "correlationId": { + "type": "string" + }, + "reRunFromTaskId": { + "type": "string" + }, + "reRunFromWorkflowId": { + "type": "string" + }, + "taskInput": { + "type": "object", + "additionalProperties": {} + }, + "workflowInput": { + "type": "object", + "additionalProperties": {} + } + } + }, + "ReservedRange": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/ReservedRange" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "end": { + "type": "integer", + "format": "int32" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserReservedRange" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "start": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "ReservedRangeOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "end": { + "type": "integer", + "format": "int32" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "start": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "Response": { + "type": "object", + "additionalProperties": {} + }, + "Role": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "permissions": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/Permission" + } + } + } + }, + "SaveScheduleRequest": { + "required": [ + "cronExpression", + "name", + "startWorkflowRequest" + ], + "type": "object", + "properties": { + "createdBy": { + "type": "string" + }, + "cronExpression": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "paused": { + "type": "boolean" + }, + "runCatchupScheduleInstances": { + "type": "boolean" + }, + "scheduleEndTime": { + "type": "integer", + "format": "int64" + }, + "scheduleStartTime": { + "type": "integer", + "format": "int64" + }, + "startWorkflowRequest": { + "$ref": "#/components/schemas/StartWorkflowRequest" + }, + "updatedBy": { + "type": "string" + }, + "zoneId": { + "type": "string" + } + } + }, + "Schema": { + "type": "object", + "properties": { + "defaultValue": { + "type": "object", + "additionalProperties": {} + }, + "format": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "SchemaDef": { + "required": [ + "name", + "type", + "version" + ], + "type": "object", + "properties": { + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "data": { + "type": "object", + "additionalProperties": {} + }, + "externalRef": { + "type": "string" + }, + "name": { + "type": "string" + }, + "ownerApp": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "JSON", + "AVRO", + "PROTOBUF" + ] + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + }, + "version": { + "type": "integer", + "format": "int32" + } + } + }, + "ScrollableSearchResultWorkflowSummary": { + "type": "object", + "properties": { + "queryId": { + "type": "string" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowSummary" + } + }, + "totalHits": { + "type": "integer", + "format": "int64" + } + } + }, + "SearchResultHandledEventResponse": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HandledEventResponse" + } + }, + "totalHits": { + "type": "integer", + "format": "int64" + } + } + }, + "SearchResultTaskSummary": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskSummary" + } + }, + "totalHits": { + "type": "integer", + "format": "int64" + } + } + }, + "SearchResultWorkflowScheduleExecutionModel": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowScheduleExecutionModel" + } + }, + "totalHits": { + "type": "integer", + "format": "int64" + } + } + }, + "ServiceDescriptor": { + "type": "object", + "properties": { + "file": { + "$ref": "#/components/schemas/FileDescriptor" + }, + "fullName": { + "type": "string" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "methods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MethodDescriptor" + } + }, + "name": { + "type": "string" + }, + "options": { + "$ref": "#/components/schemas/ServiceOptions" + }, + "proto": { + "$ref": "#/components/schemas/ServiceDescriptorProto" + } + } + }, + "ServiceDescriptorProto": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/ServiceDescriptorProto" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "methodCount": { + "type": "integer", + "format": "int32" + }, + "methodList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MethodDescriptorProto" + } + }, + "methodOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MethodDescriptorProtoOrBuilder" + } + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "options": { + "$ref": "#/components/schemas/ServiceOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/ServiceOptionsOrBuilder" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserServiceDescriptorProto" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "ServiceDescriptorProtoOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "methodCount": { + "type": "integer", + "format": "int32" + }, + "methodList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MethodDescriptorProto" + } + }, + "methodOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MethodDescriptorProtoOrBuilder" + } + }, + "name": { + "type": "string" + }, + "nameBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "options": { + "$ref": "#/components/schemas/ServiceOptions" + }, + "optionsOrBuilder": { + "$ref": "#/components/schemas/ServiceOptionsOrBuilder" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "ServiceMethod": { + "type": "object", + "properties": { + "exampleInput": { + "type": "object", + "additionalProperties": {} + }, + "id": { + "type": "integer", + "format": "int64" + }, + "inputType": { + "type": "string" + }, + "methodName": { + "type": "string" + }, + "methodType": { + "type": "string" + }, + "operationName": { + "type": "string" + }, + "outputType": { + "type": "string" + }, + "requestParams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RequestParam" + } + } + } + }, + "ServiceOptions": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "allFieldsRaw": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/ServiceOptions" + }, + "deprecated": { + "type": "boolean" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserServiceOptions" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "ServiceOptionsOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "deprecated": { + "type": "boolean" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "features": { + "$ref": "#/components/schemas/FeatureSet" + }, + "featuresOrBuilder": { + "$ref": "#/components/schemas/FeatureSetOrBuilder" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "uninterpretedOptionCount": { + "type": "integer", + "format": "int32" + }, + "uninterpretedOptionList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOption" + } + }, + "uninterpretedOptionOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UninterpretedOptionOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "ServiceRegistry": { + "type": "object", + "properties": { + "circuitBreakerEnabled": { + "type": "boolean" + }, + "config": { + "$ref": "#/components/schemas/Config" + }, + "methods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceMethod" + } + }, + "name": { + "type": "string" + }, + "requestParams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RequestParam" + } + }, + "serviceURI": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "HTTP", + "gRPC", + "MCP_REMOTE" + ] + } + } + }, + "SignalResponse": { + "type": "object", + "properties": { + "correlationId": { + "type": "string" + }, + "input": { + "type": "object", + "additionalProperties": {} + }, + "output": { + "type": "object", + "additionalProperties": {} + }, + "requestId": { + "type": "string" + }, + "responseType": { + "type": "string", + "enum": [ + "TARGET_WORKFLOW", + "BLOCKING_WORKFLOW", + "BLOCKING_TASK", + "BLOCKING_TASK_INPUT" + ] + }, + "targetWorkflowId": { + "type": "string" + }, + "targetWorkflowStatus": { + "type": "string" + }, + "workflowId": { + "type": "string" + } + } + }, + "SkipTaskRequest": { + "type": "object", + "properties": { + "taskInput": { + "type": "object", + "additionalProperties": {} + }, + "taskOutput": { + "type": "object", + "additionalProperties": {} + } + } + }, + "SourceCodeInfo": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/SourceCodeInfo" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "locationCount": { + "type": "integer", + "format": "int32" + }, + "locationList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Location" + } + }, + "locationOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocationOrBuilder" + } + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "parserForType": { + "$ref": "#/components/schemas/ParserSourceCodeInfo" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "SourceCodeInfoOrBuilder": { + "type": "object", + "properties": { + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "locationCount": { + "type": "integer", + "format": "int32" + }, + "locationList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Location" + } + }, + "locationOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocationOrBuilder" + } + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "StartWorkflowRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "correlationId": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "externalInputPayloadStoragePath": { + "type": "string" + }, + "idempotencyKey": { + "type": "string" + }, + "idempotencyStrategy": { + "type": "string", + "enum": [ + "FAIL", + "RETURN_EXISTING", + "FAIL_ON_RUNNING" + ] + }, + "input": { + "type": "object", + "additionalProperties": {} + }, + "name": { + "type": "string" + }, + "priority": { + "type": "integer", + "format": "int32" + }, + "taskToDomain": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "version": { + "type": "integer", + "format": "int32" + }, + "workflowDef": { + "$ref": "#/components/schemas/WorkflowDef" + } + } + }, + "StateChangeEvent": { + "required": [ + "type" + ], + "type": "object", + "properties": { + "payload": { + "type": "object", + "additionalProperties": {} + }, + "type": { + "type": "string" + } + } + }, + "SubWorkflowParams": { + "type": "object", + "properties": { + "idempotencyKey": { + "type": "string" + }, + "idempotencyStrategy": { + "type": "string", + "enum": [ + "FAIL", + "RETURN_EXISTING", + "FAIL_ON_RUNNING" + ] + }, + "name": { + "type": "string" + }, + "priority": { + "type": "object", + "additionalProperties": {} + }, + "taskToDomain": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "version": { + "type": "integer", + "format": "int32" + }, + "workflowDefinition": { + "type": "object", + "additionalProperties": {} + } + } + }, + "SubjectRef": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string", + "description": "User, role or group", + "enum": [ + "USER", + "ROLE", + "GROUP" + ] + } + }, + "description": "User, group or role which is granted/removed access" + }, + "Tag": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "type": { + "type": "string", + "deprecated": true + }, + "value": { + "type": "string" + } + } + }, + "TargetRef": { + "required": [ + "id", + "type" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "Identifier of the target e.g. `name` in case it's a WORKFLOW_DEF" + ] + }, + "type": { + "type": "string", + "enum": [ + "WORKFLOW", + "WORKFLOW_DEF", + "WORKFLOW_SCHEDULE", + "EVENT_HANDLER", + "TASK_DEF", + "TASK_REF_NAME", + "TASK_ID", + "APPLICATION", + "USER", + "SECRET_NAME", + "ENV_VARIABLE", + "TAG", + "DOMAIN", + "INTEGRATION_PROVIDER", + "INTEGRATION", + "PROMPT", + "USER_FORM_TEMPLATE", + "SCHEMA", + "CLUSTER_CONFIG", + "WEBHOOK" + ] + } + }, + "description": "The object over which access is being granted or removed" + }, + "Task": { + "type": "object", + "properties": { + "callbackAfterSeconds": { + "type": "integer", + "format": "int64" + }, + "callbackFromWorker": { + "type": "boolean" + }, + "correlationId": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "endTime": { + "type": "integer", + "format": "int64" + }, + "executed": { + "type": "boolean" + }, + "executionNameSpace": { + "type": "string" + }, + "externalInputPayloadStoragePath": { + "type": "string" + }, + "externalOutputPayloadStoragePath": { + "type": "string" + }, + "firstStartTime": { + "type": "integer", + "format": "int64" + }, + "inputData": { + "type": "object", + "additionalProperties": {} + }, + "isolationGroupId": { + "type": "string" + }, + "iteration": { + "type": "integer", + "format": "int32" + }, + "loopOverTask": { + "type": "boolean" + }, + "outputData": { + "type": "object", + "additionalProperties": {} + }, + "parentTaskId": { + "type": "string" + }, + "pollCount": { + "type": "integer", + "format": "int32" + }, + "queueWaitTime": { + "type": "integer", + "format": "int64" + }, + "rateLimitFrequencyInSeconds": { + "type": "integer", + "format": "int32" + }, + "rateLimitPerFrequency": { + "type": "integer", + "format": "int32" + }, + "reasonForIncompletion": { + "type": "string" + }, + "referenceTaskName": { + "type": "string" + }, + "responseTimeoutSeconds": { + "type": "integer", + "format": "int64" + }, + "retried": { + "type": "boolean" + }, + "retriedTaskId": { + "type": "string" + }, + "retryCount": { + "type": "integer", + "format": "int32" + }, + "scheduledTime": { + "type": "integer", + "format": "int64" + }, + "seq": { + "type": "integer", + "format": "int32" + }, + "startDelayInSeconds": { + "type": "integer", + "format": "int32" + }, + "startTime": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "CANCELED", + "FAILED", + "FAILED_WITH_TERMINAL_ERROR", + "COMPLETED", + "COMPLETED_WITH_ERRORS", + "SCHEDULED", + "TIMED_OUT", + "SKIPPED" + ] + }, + "subWorkflowId": { + "type": "string" + }, + "subworkflowChanged": { + "type": "boolean" + }, + "taskDefName": { + "type": "string" + }, + "taskDefinition": { + "$ref": "#/components/schemas/TaskDef" + }, + "taskId": { + "type": "string" + }, + "taskType": { + "type": "string" + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "workerId": { + "type": "string" + }, + "workflowInstanceId": { + "type": "string" + }, + "workflowPriority": { + "type": "integer", + "format": "int32" + }, + "workflowTask": { + "$ref": "#/components/schemas/WorkflowTask" + }, + "workflowType": { + "type": "string" + } + } + }, + "TaskDef": { + "required": [ + "name", + "timeoutSeconds", + "totalTimeoutSeconds" + ], + "type": "object", + "properties": { + "backoffScaleFactor": { + "type": "integer", + "format": "int32" + }, + "baseType": { + "type": "string" + }, + "concurrentExecLimit": { + "type": "integer", + "format": "int32" + }, + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enforceSchema": { + "type": "boolean" + }, + "executionNameSpace": { + "type": "string" + }, + "inputKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "inputSchema": { + "$ref": "#/components/schemas/SchemaDef" + }, + "inputTemplate": { + "type": "object", + "additionalProperties": {} + }, + "isolationGroupId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "outputKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "outputSchema": { + "$ref": "#/components/schemas/SchemaDef" + }, + "ownerApp": { + "type": "string" + }, + "ownerEmail": { + "type": "string" + }, + "pollTimeoutSeconds": { + "type": "integer", + "format": "int32" + }, + "rateLimitFrequencyInSeconds": { + "type": "integer", + "format": "int32" + }, + "rateLimitPerFrequency": { + "type": "integer", + "format": "int32" + }, + "responseTimeoutSeconds": { + "type": "integer", + "format": "int64" + }, + "retryCount": { + "type": "integer", + "format": "int32" + }, + "retryDelaySeconds": { + "type": "integer", + "format": "int32" + }, + "retryLogic": { + "type": "string", + "enum": [ + "FIXED", + "EXPONENTIAL_BACKOFF", + "LINEAR_BACKOFF" + ] + }, + "timeoutPolicy": { + "type": "string", + "enum": [ + "RETRY", + "TIME_OUT_WF", + "ALERT_ONLY" + ] + }, + "timeoutSeconds": { + "type": "integer", + "format": "int64" + }, + "totalTimeoutSeconds": { + "type": "integer", + "format": "int64" + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + } + } + }, + "TaskDetails": { + "type": "object", + "properties": { + "output": { + "type": "object", + "additionalProperties": {} + }, + "outputMessage": { + "$ref": "#/components/schemas/Any" + }, + "taskId": { + "type": "string" + }, + "taskRefName": { + "type": "string" + }, + "workflowId": { + "type": "string" + } + } + }, + "TaskExecLog": { + "type": "object", + "properties": { + "createdTime": { + "type": "integer", + "format": "int64" + }, + "log": { + "type": "string" + }, + "taskId": { + "type": "string" + } + } + }, + "TaskListSearchResultSummary": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task" + } + }, + "summary": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "totalHits": { + "type": "integer", + "format": "int64" + } + } + }, + "TaskMock": { + "type": "object", + "properties": { + "executionTime": { + "type": "integer", + "format": "int64" + }, + "output": { + "type": "object", + "additionalProperties": {} + }, + "queueWaitTime": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "FAILED", + "FAILED_WITH_TERMINAL_ERROR", + "COMPLETED" + ] + } + } + }, + "TaskResult": { + "required": [ + "taskId", + "workflowInstanceId" + ], + "type": "object", + "properties": { + "callbackAfterSeconds": { + "type": "integer", + "format": "int64" + }, + "extendLease": { + "type": "boolean" + }, + "externalOutputPayloadStoragePath": { + "type": "string" + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskExecLog" + } + }, + "outputData": { + "type": "object", + "additionalProperties": {} + }, + "reasonForIncompletion": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "FAILED", + "FAILED_WITH_TERMINAL_ERROR", + "COMPLETED" + ] + }, + "subWorkflowId": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "workerId": { + "type": "string" + }, + "workflowInstanceId": { + "type": "string" + } + } + }, + "TaskSummary": { + "type": "object", + "properties": { + "correlationId": { + "type": "string" + }, + "endTime": { + "type": "string" + }, + "executionTime": { + "type": "integer", + "format": "int64" + }, + "externalInputPayloadStoragePath": { + "type": "string" + }, + "externalOutputPayloadStoragePath": { + "type": "string" + }, + "input": { + "type": "string" + }, + "output": { + "type": "string" + }, + "queueWaitTime": { + "type": "integer", + "format": "int64" + }, + "reasonForIncompletion": { + "type": "string" + }, + "scheduledTime": { + "type": "string" + }, + "startTime": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "IN_PROGRESS", + "CANCELED", + "FAILED", + "FAILED_WITH_TERMINAL_ERROR", + "COMPLETED", + "COMPLETED_WITH_ERRORS", + "SCHEDULED", + "TIMED_OUT", + "SKIPPED" + ] + }, + "taskDefName": { + "type": "string" + }, + "taskId": { + "type": "string" + }, + "taskReferenceName": { + "type": "string" + }, + "taskType": { + "type": "string" + }, + "updateTime": { + "type": "string" + }, + "workflowId": { + "type": "string" + }, + "workflowPriority": { + "type": "integer", + "format": "int32" + }, + "workflowType": { + "type": "string" + } + } + }, + "TerminateWorkflow": { + "type": "object", + "properties": { + "terminationReason": { + "type": "string" + }, + "workflowId": { + "type": "string" + } + } + }, + "TokenLimit": { + "type": "object", + "properties": { + "api": { + "type": "string" + }, + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "integrationName": { + "type": "string" + }, + "maxTokens": { + "type": "integer", + "format": "int64" + }, + "ownerApp": { + "type": "string" + }, + "tokenLimitPeriod": { + "type": "string", + "enum": [ + "DAY", + "MONTH" + ] + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + } + } + }, + "TokenUsageLog": { + "type": "object", + "properties": { + "api": { + "type": "string" + }, + "completionTokens": { + "type": "integer", + "format": "int32" + }, + "integrationName": { + "type": "string" + }, + "periodStart": { + "type": "integer", + "format": "int64" + }, + "promptTokens": { + "type": "integer", + "format": "int32" + }, + "totalTokens": { + "type": "integer", + "format": "int32" + } + } + }, + "UninterpretedOption": { + "type": "object", + "properties": { + "aggregateValue": { + "type": "string" + }, + "aggregateValueBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/UninterpretedOption" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "doubleValue": { + "type": "number", + "format": "double" + }, + "identifierValue": { + "type": "string" + }, + "identifierValueBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "memoizedSerializedSize": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "nameCount": { + "type": "integer", + "format": "int32" + }, + "nameList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NamePart" + } + }, + "nameOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NamePartOrBuilder" + } + }, + "negativeIntValue": { + "type": "integer", + "format": "int64" + }, + "parserForType": { + "$ref": "#/components/schemas/ParserUninterpretedOption" + }, + "positiveIntValue": { + "type": "integer", + "format": "int64" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "stringValue": { + "$ref": "#/components/schemas/ByteString" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "UninterpretedOptionOrBuilder": { + "type": "object", + "properties": { + "aggregateValue": { + "type": "string" + }, + "aggregateValueBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "allFields": { + "type": "object", + "additionalProperties": {} + }, + "defaultInstanceForType": { + "$ref": "#/components/schemas/Message" + }, + "descriptorForType": { + "$ref": "#/components/schemas/Descriptor" + }, + "doubleValue": { + "type": "number", + "format": "double" + }, + "identifierValue": { + "type": "string" + }, + "identifierValueBytes": { + "$ref": "#/components/schemas/ByteString" + }, + "initializationErrorString": { + "type": "string" + }, + "initialized": { + "type": "boolean" + }, + "nameCount": { + "type": "integer", + "format": "int32" + }, + "nameList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NamePart" + } + }, + "nameOrBuilderList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NamePartOrBuilder" + } + }, + "negativeIntValue": { + "type": "integer", + "format": "int64" + }, + "positiveIntValue": { + "type": "integer", + "format": "int64" + }, + "stringValue": { + "$ref": "#/components/schemas/ByteString" + }, + "unknownFields": { + "$ref": "#/components/schemas/UnknownFieldSet" + } + } + }, + "UnknownFieldSet": { + "type": "object", + "properties": { + "defaultInstanceForType": { + "$ref": "#/components/schemas/UnknownFieldSet" + }, + "initialized": { + "type": "boolean" + }, + "parserForType": { + "$ref": "#/components/schemas/Parser" + }, + "serializedSize": { + "type": "integer", + "format": "int32" + }, + "serializedSizeAsMessageSet": { + "type": "integer", + "format": "int32" + } + } + }, + "UpdateWorkflowVariables": { + "type": "object", + "properties": { + "appendArray": { + "type": "boolean" + }, + "variables": { + "type": "object", + "additionalProperties": {} + }, + "workflowId": { + "type": "string" + } + } + }, + "UpgradeWorkflowRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "taskOutput": { + "type": "object", + "additionalProperties": {} + }, + "version": { + "type": "integer", + "format": "int32" + }, + "workflowInput": { + "type": "object", + "additionalProperties": {} + } + } + }, + "UpsertGroupRequest": { + "required": [ + "description" + ], + "type": "object", + "properties": { + "defaultAccess": { + "type": "object", + "additionalProperties": { + "uniqueItems": true, + "type": "array", + "description": "a default Map\u003CTargetType, Set\u003CAccess\u003E to share permissions, allowed target types: WORKFLOW_DEF, TASK_DEF, WORKFLOW_SCHEDULE", + "items": { + "type": "string", + "description": "a default Map\u003CTargetType, Set\u003CAccess\u003E to share permissions, allowed target types: WORKFLOW_DEF, TASK_DEF, WORKFLOW_SCHEDULE", + "enum": [ + "CREATE", + "READ", + "EXECUTE", + "UPDATE", + "DELETE" + ] + } + }, + "description": "a default Map\u003CTargetType, Set\u003CAccess\u003E to share permissions, allowed target types: WORKFLOW_DEF, TASK_DEF, WORKFLOW_SCHEDULE" + }, + "description": { + "type": "string", + "description": "A general description of the group" + }, + "roles": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string", + "enum": [ + "ADMIN", + "USER", + "WORKER", + "METADATA_MANAGER", + "WORKFLOW_MANAGER" + ] + }, + "enum": [ + "ADMIN", + "USER", + "WORKER", + "METADATA_MANAGER", + "WORKFLOW_MANAGER" + ] + } + } + }, + "UpsertUserRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "groups": { + "uniqueItems": true, + "type": "array", + "description": "Ids of the groups this user belongs to", + "items": { + "type": "string", + "description": "Ids of the groups this user belongs to" + } + }, + "name": { + "type": "string", + "description": "User's full name" + }, + "roles": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string", + "enum": [ + "ADMIN", + "USER", + "WORKER", + "METADATA_MANAGER", + "WORKFLOW_MANAGER" + ] + }, + "enum": [ + "ADMIN", + "USER", + "WORKER", + "METADATA_MANAGER", + "WORKFLOW_MANAGER" + ] + } + } + }, + "UserFormTemplate": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "integer", + "format": "int32" + } + } + }, + "WebhookConfig": { + "type": "object", + "properties": { + "createdBy": { + "type": "string" + }, + "evaluatorType": { + "type": "string" + }, + "expression": { + "type": "string" + }, + "headerKey": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "receiverWorkflowNamesToVersions": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + } + }, + "secretKey": { + "type": "string" + }, + "secretValue": { + "type": "string" + }, + "sourcePlatform": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "urlVerified": { + "type": "boolean" + }, + "verifier": { + "type": "string", + "enum": [ + "SLACK_BASED", + "SIGNATURE_BASED", + "HEADER_BASED", + "STRIPE", + "TWITTER", + "HMAC_BASED", + "SENDGRID" + ] + }, + "webhookExecutionHistory": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebhookExecutionHistory" + } + }, + "workflowsToStart": { + "type": "object", + "additionalProperties": {} + } + } + }, + "WebhookExecutionHistory": { + "type": "object", + "properties": { + "eventId": { + "type": "string" + }, + "matched": { + "type": "boolean" + }, + "payload": { + "type": "string" + }, + "timeStamp": { + "type": "integer", + "format": "int64" + }, + "workflowIds": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Workflow": { + "type": "object", + "properties": { + "correlationId": { + "type": "string" + }, + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "endTime": { + "type": "integer", + "format": "int64" + }, + "event": { + "type": "string" + }, + "externalInputPayloadStoragePath": { + "type": "string" + }, + "externalOutputPayloadStoragePath": { + "type": "string" + }, + "failedReferenceTaskNames": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + }, + "failedTaskNames": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + }, + "history": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Workflow" + } + }, + "idempotencyKey": { + "type": "string" + }, + "input": { + "type": "object", + "additionalProperties": {} + }, + "lastRetriedTime": { + "type": "integer", + "format": "int64" + }, + "output": { + "type": "object", + "additionalProperties": {} + }, + "ownerApp": { + "type": "string" + }, + "parentWorkflowId": { + "type": "string" + }, + "parentWorkflowTaskId": { + "type": "string" + }, + "priority": { + "type": "integer", + "format": "int32" + }, + "rateLimitKey": { + "type": "string" + }, + "rateLimited": { + "type": "boolean" + }, + "reRunFromWorkflowId": { + "type": "string" + }, + "reasonForIncompletion": { + "type": "string" + }, + "startTime": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "string", + "enum": [ + "RUNNING", + "COMPLETED", + "FAILED", + "TIMED_OUT", + "TERMINATED", + "PAUSED" + ] + }, + "taskToDomain": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task" + } + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": {} + }, + "workflowDefinition": { + "$ref": "#/components/schemas/WorkflowDef" + }, + "workflowId": { + "type": "string" + }, + "workflowName": { + "type": "string" + }, + "workflowVersion": { + "type": "integer", + "format": "int32" + } + } + }, + "WorkflowDef": { + "required": [ + "name", + "tasks", + "timeoutSeconds" + ], + "type": "object", + "properties": { + "cacheConfig": { + "$ref": "#/components/schemas/CacheConfig" + }, + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enforceSchema": { + "type": "boolean" + }, + "failureWorkflow": { + "type": "string" + }, + "inputParameters": { + "type": "array", + "items": { + "type": "string" + } + }, + "inputSchema": { + "$ref": "#/components/schemas/SchemaDef" + }, + "inputTemplate": { + "type": "object", + "additionalProperties": {} + }, + "maskedFields": { + "type": "array", + "items": { + "type": "string" + } + }, + "metadata": { + "type": "object", + "additionalProperties": {} + }, + "name": { + "type": "string" + }, + "outputParameters": { + "type": "object", + "additionalProperties": {} + }, + "outputSchema": { + "$ref": "#/components/schemas/SchemaDef" + }, + "ownerApp": { + "type": "string" + }, + "ownerEmail": { + "type": "string" + }, + "rateLimitConfig": { + "$ref": "#/components/schemas/RateLimitConfig" + }, + "restartable": { + "type": "boolean" + }, + "schemaVersion": { + "type": "integer", + "format": "int32" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowTask" + } + }, + "timeoutPolicy": { + "type": "string", + "enum": [ + "TIME_OUT_WF", + "ALERT_ONLY" + ] + }, + "timeoutSeconds": { + "type": "integer", + "format": "int64" + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "updatedBy": { + "type": "string" + }, + "variables": { + "type": "object", + "additionalProperties": {} + }, + "version": { + "type": "integer", + "format": "int32" + }, + "workflowStatusListenerEnabled": { + "type": "boolean" + }, + "workflowStatusListenerSink": { + "type": "string" + } + } + }, + "WorkflowRun": { + "type": "object", + "properties": { + "correlationId": { + "type": "string" + }, + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "input": { + "type": "object", + "additionalProperties": {} + }, + "output": { + "type": "object", + "additionalProperties": {} + }, + "priority": { + "type": "integer", + "format": "int32" + }, + "requestId": { + "type": "string" + }, + "responseType": { + "type": "string", + "enum": [ + "TARGET_WORKFLOW", + "BLOCKING_WORKFLOW", + "BLOCKING_TASK", + "BLOCKING_TASK_INPUT" + ] + }, + "status": { + "type": "string", + "enum": [ + "RUNNING", + "COMPLETED", + "FAILED", + "TIMED_OUT", + "TERMINATED", + "PAUSED" + ] + }, + "targetWorkflowId": { + "type": "string" + }, + "targetWorkflowStatus": { + "type": "string" + }, + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task" + } + }, + "updateTime": { + "type": "integer", + "format": "int64" + }, + "variables": { + "type": "object", + "additionalProperties": {} + }, + "workflowId": { + "type": "string" + } + } + }, + "WorkflowSchedule": { + "type": "object", + "properties": { + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "cronExpression": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "paused": { + "type": "boolean" + }, + "pausedReason": { + "type": "string" + }, + "runCatchupScheduleInstances": { + "type": "boolean" + }, + "scheduleEndTime": { + "type": "integer", + "format": "int64" + }, + "scheduleStartTime": { + "type": "integer", + "format": "int64" + }, + "startWorkflowRequest": { + "$ref": "#/components/schemas/StartWorkflowRequest" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "updatedBy": { + "type": "string" + }, + "updatedTime": { + "type": "integer", + "format": "int64" + }, + "zoneId": { + "type": "string" + } + } + }, + "WorkflowScheduleExecutionModel": { + "type": "object", + "properties": { + "executionId": { + "type": "string" + }, + "executionTime": { + "type": "integer", + "format": "int64" + }, + "orgId": { + "type": "string" + }, + "queueMsgId": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "scheduleName": { + "type": "string" + }, + "scheduledTime": { + "type": "integer", + "format": "int64" + }, + "stackTrace": { + "type": "string" + }, + "startWorkflowRequest": { + "$ref": "#/components/schemas/StartWorkflowRequest" + }, + "state": { + "type": "string", + "enum": [ + "POLLED", + "FAILED", + "EXECUTED" + ] + }, + "workflowId": { + "type": "string" + }, + "workflowName": { + "type": "string" + }, + "zoneId": { + "type": "string" + } + } + }, + "WorkflowScheduleModel": { + "type": "object", + "properties": { + "createTime": { + "type": "integer", + "format": "int64" + }, + "createdBy": { + "type": "string" + }, + "cronExpression": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "orgId": { + "type": "string" + }, + "paused": { + "type": "boolean" + }, + "pausedReason": { + "type": "string" + }, + "queueMsgId": { + "type": "string" + }, + "runCatchupScheduleInstances": { + "type": "boolean" + }, + "scheduleEndTime": { + "type": "integer", + "format": "int64" + }, + "scheduleStartTime": { + "type": "integer", + "format": "int64" + }, + "startWorkflowRequest": { + "$ref": "#/components/schemas/StartWorkflowRequest" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "updatedBy": { + "type": "string" + }, + "updatedTime": { + "type": "integer", + "format": "int64" + }, + "zoneId": { + "type": "string" + } + } + }, + "WorkflowStateUpdate": { + "type": "object", + "properties": { + "taskReferenceName": { + "type": "string" + }, + "taskResult": { + "$ref": "#/components/schemas/TaskResult" + }, + "variables": { + "type": "object", + "additionalProperties": {} + } + } + }, + "WorkflowStatus": { + "type": "object", + "properties": { + "correlationId": { + "type": "string" + }, + "output": { + "type": "object", + "additionalProperties": {} + }, + "status": { + "type": "string", + "enum": [ + "RUNNING", + "COMPLETED", + "FAILED", + "TIMED_OUT", + "TERMINATED", + "PAUSED" + ] + }, + "variables": { + "type": "object", + "additionalProperties": {} + }, + "workflowId": { + "type": "string" + } + } + }, + "WorkflowSummary": { + "type": "object", + "properties": { + "correlationId": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "endTime": { + "type": "string" + }, + "event": { + "type": "string" + }, + "executionTime": { + "type": "integer", + "format": "int64" + }, + "externalInputPayloadStoragePath": { + "type": "string" + }, + "externalOutputPayloadStoragePath": { + "type": "string" + }, + "failedReferenceTaskNames": { + "type": "string" + }, + "failedTaskNames": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + }, + "idempotencyKey": { + "type": "string" + }, + "input": { + "type": "string" + }, + "inputSize": { + "type": "integer", + "format": "int64" + }, + "output": { + "type": "string" + }, + "outputSize": { + "type": "integer", + "format": "int64" + }, + "priority": { + "type": "integer", + "format": "int32" + }, + "reasonForIncompletion": { + "type": "string" + }, + "startTime": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "RUNNING", + "COMPLETED", + "FAILED", + "TIMED_OUT", + "TERMINATED", + "PAUSED" + ] + }, + "taskToDomain": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "updateTime": { + "type": "string" + }, + "version": { + "type": "integer", + "format": "int32" + }, + "workflowId": { + "type": "string" + }, + "workflowType": { + "type": "string" + } + } + }, + "WorkflowTask": { + "required": [ + "name", + "taskReferenceName" + ], + "type": "object", + "properties": { + "asyncComplete": { + "type": "boolean" + }, + "cacheConfig": { + "$ref": "#/components/schemas/CacheConfig" + }, + "caseExpression": { + "type": "string", + "deprecated": true + }, + "caseValueParam": { + "type": "string", + "deprecated": true + }, + "decisionCases": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowTask" + } + } + }, + "defaultCase": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowTask" + } + }, + "defaultExclusiveJoinTask": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "dynamicForkJoinTasksParam": { + "type": "string", + "deprecated": true + }, + "dynamicForkTasksInputParamName": { + "type": "string" + }, + "dynamicForkTasksParam": { + "type": "string" + }, + "dynamicTaskNameParam": { + "type": "string" + }, + "evaluatorType": { + "type": "string" + }, + "expression": { + "type": "string" + }, + "forkTasks": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowTask" + } + } + }, + "inputParameters": { + "type": "object", + "additionalProperties": {} + }, + "joinOn": { + "type": "array", + "items": { + "type": "string" + } + }, + "joinStatus": { + "type": "string" + }, + "loopCondition": { + "type": "string" + }, + "loopOver": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkflowTask" + } + }, + "name": { + "type": "string" + }, + "onStateChange": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StateChangeEvent" + } + } + }, + "optional": { + "type": "boolean" + }, + "permissive": { + "type": "boolean" + }, + "rateLimited": { + "type": "boolean" + }, + "retryCount": { + "type": "integer", + "format": "int32" + }, + "scriptExpression": { + "type": "string" + }, + "sink": { + "type": "string" + }, + "startDelay": { + "type": "integer", + "format": "int32" + }, + "subWorkflowParam": { + "$ref": "#/components/schemas/SubWorkflowParams" + }, + "taskDefinition": { + "$ref": "#/components/schemas/TaskDef" + }, + "taskReferenceName": { + "type": "string" + }, + "type": { + "type": "string" + }, + "workflowTaskType": { + "type": "string", + "writeOnly": true, + "enum": [ + "SIMPLE", + "DYNAMIC", + "FORK_JOIN", + "FORK_JOIN_DYNAMIC", + "DECISION", + "SWITCH", + "JOIN", + "DO_WHILE", + "SUB_WORKFLOW", + "START_WORKFLOW", + "EVENT", + "WAIT", + "HUMAN", + "USER_DEFINED", + "HTTP", + "LAMBDA", + "INLINE", + "EXCLUSIVE_JOIN", + "TERMINATE", + "KAFKA_PUBLISH", + "JSON_JQ_TRANSFORM", + "SET_VARIABLE", + "NOOP" + ] + } + } + }, + "WorkflowTestRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "correlationId": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "externalInputPayloadStoragePath": { + "type": "string" + }, + "idempotencyKey": { + "type": "string" + }, + "idempotencyStrategy": { + "type": "string", + "enum": [ + "FAIL", + "RETURN_EXISTING", + "FAIL_ON_RUNNING" + ] + }, + "input": { + "type": "object", + "additionalProperties": {} + }, + "name": { + "type": "string" + }, + "priority": { + "type": "integer", + "format": "int32" + }, + "subWorkflowTestRequest": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/WorkflowTestRequest" + } + }, + "taskRefToMockOutput": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskMock" + } + } + }, + "taskToDomain": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "version": { + "type": "integer", + "format": "int32" + }, + "workflowDef": { + "$ref": "#/components/schemas/WorkflowDef" + } + } + } + }, + "securitySchemes": { + "api_key": { + "description": "Api Key access", + "in": "header", + "name": "X-Authorization", + "type": "apiKey" + } + } + } + } \ No newline at end of file diff --git a/openapi-ts.config.ts b/openapi-ts.config.ts new file mode 100644 index 00000000..15f3ada3 --- /dev/null +++ b/openapi-ts.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from "@hey-api/openapi-ts"; + +export default defineConfig({ + input: "./open-api-spec/spec.json", + output: "src/common/open-api", + plugins: [ + { + asClass: true, + name: "@hey-api/sdk", + }, + ], +}); diff --git a/package-lock.json b/package-lock.json index b14a6260..9e278bdf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "Apache-2.0", "devDependencies": { "@eslint/js": "^9.34.0", + "@hey-api/openapi-ts": "^0.85.2", "@tsconfig/node18": "^18.2.4", "@types/node": "^22.0.0", "@types/uuid": "^9.0.1", @@ -1158,6 +1159,94 @@ "@shikijs/vscode-textmate": "^10.0.2" } }, + "node_modules/@hey-api/codegen-core": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@hey-api/codegen-core/-/codegen-core-0.2.0.tgz", + "integrity": "sha512-c7VjBy/8ed0EVLNgaeS9Xxams1Tuv/WK/b4xXH3Qr4wjzYeJUtxOcoP8YdwNLavqKP8pGiuctjX2Z1Pwc4jMgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=22.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/hey-api" + }, + "peerDependencies": { + "typescript": ">=5.5.3" + } + }, + "node_modules/@hey-api/json-schema-ref-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@hey-api/json-schema-ref-parser/-/json-schema-ref-parser-1.2.0.tgz", + "integrity": "sha512-BMnIuhVgNmSudadw1GcTsP18Yk5l8FrYrg/OSYNxz0D2E0vf4D5e4j5nUbuY8MU6p1vp7ev0xrfP6A/NWazkzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.15", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/hey-api" + } + }, + "node_modules/@hey-api/openapi-ts": { + "version": "0.85.2", + "resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.85.2.tgz", + "integrity": "sha512-pNu+DOtjeXiGhMqSQ/mYadh6BuKR/QiucVunyA2P7w2uyxkfCJ9sHS20Y72KHXzB3nshKJ9r7JMirysoa50SJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@hey-api/codegen-core": "^0.2.0", + "@hey-api/json-schema-ref-parser": "1.2.0", + "ansi-colors": "4.1.3", + "c12": "3.3.0", + "color-support": "1.1.3", + "commander": "13.0.0", + "handlebars": "4.7.8", + "open": "10.1.2", + "semver": "7.7.2" + }, + "bin": { + "openapi-ts": "bin/index.cjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/hey-api" + }, + "peerDependencies": { + "typescript": ">=5.5.3" + } + }, + "node_modules/@hey-api/openapi-ts/node_modules/commander": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.0.0.tgz", + "integrity": "sha512-oPYleIY8wmTVzkvQq10AEok6YcTC4sRUBl8F9gVuwchGVUCTbl/vhLTaQqutuuySYOsu8YTgV+OxKc/8Yvx+mQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@hey-api/openapi-ts/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", @@ -1737,6 +1826,13 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", + "dev": true, + "license": "MIT" + }, "node_modules/@napi-rs/wasm-runtime": { "version": "0.2.12", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", @@ -2945,6 +3041,16 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -3224,6 +3330,22 @@ "dev": true, "license": "MIT" }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bundle-require": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", @@ -3240,6 +3362,67 @@ "esbuild": ">=0.18" } }, + "node_modules/c12": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/c12/-/c12-3.3.0.tgz", + "integrity": "sha512-K9ZkuyeJQeqLEyqldbYLG3wjqwpw4BVaAqvmxq3GYKK0b1A/yYQdIcJxkzAOWcNVWhJpRXAPfZFueekiY/L8Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.3", + "confbox": "^0.2.2", + "defu": "^6.1.4", + "dotenv": "^17.2.2", + "exsolve": "^1.0.7", + "giget": "^2.0.0", + "jiti": "^2.5.1", + "ohash": "^2.0.11", + "pathe": "^2.0.3", + "perfect-debounce": "^2.0.0", + "pkg-types": "^2.3.0", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.5" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, + "node_modules/c12/node_modules/confbox": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz", + "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/c12/node_modules/dotenv": { + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", + "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/c12/node_modules/pkg-types": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.0.tgz", + "integrity": "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.2.2", + "exsolve": "^1.0.7", + "pathe": "^2.0.3" + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -3350,6 +3533,16 @@ "node": ">=8" } }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "consola": "^3.2.3" + } + }, "node_modules/cjs-module-lexer": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.1.0.tgz", @@ -3473,6 +3666,16 @@ "dev": true, "license": "MIT" }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true, + "license": "ISC", + "bin": { + "color-support": "bin.js" + } + }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -3579,6 +3782,63 @@ "node": ">=0.10.0" } }, + "node_modules/default-browser": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", + "integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz", + "integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "dev": true, + "license": "MIT" + }, + "node_modules/destr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", + "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==", + "dev": true, + "license": "MIT" + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -3952,6 +4212,13 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, + "node_modules/exsolve": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.7.tgz", + "integrity": "sha512-VO5fQUzZtI6C+vx4w/4BWJpg3s/5l+6pRQEHzFRM8WFi4XffSP1Z+4qi7GbjWbvRQEbdIco5mIMq+zX4rPuLrw==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4181,6 +4448,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/giget": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/giget/-/giget-2.0.0.tgz", + "integrity": "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.6", + "nypm": "^0.6.0", + "pathe": "^2.0.3" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, "node_modules/glob": { "version": "10.4.5", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", @@ -4400,6 +4685,22 @@ "dev": true, "license": "MIT" }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -4443,6 +4744,25 @@ "node": ">=0.10.0" } }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4466,6 +4786,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-wsl": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -5228,6 +5564,16 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, "node_modules/joycon": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", @@ -5402,6 +5748,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -5670,6 +6023,13 @@ "dev": true, "license": "MIT" }, + "node_modules/node-fetch-native": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", + "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", + "dev": true, + "license": "MIT" + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -5707,6 +6067,52 @@ "node": ">=8" } }, + "node_modules/nypm": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.6.2.tgz", + "integrity": "sha512-7eM+hpOtrKrBDCh7Ypu2lJ9Z7PNZBdi/8AT3AX8xoCj43BBVHD0hPSTEvMtkMpfs8FCqBGhxB+uToIQimA111g==", + "dev": true, + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.2", + "pathe": "^2.0.3", + "pkg-types": "^2.3.0", + "tinyexec": "^1.0.1" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": "^14.16.0 || >=16.10.0" + } + }, + "node_modules/nypm/node_modules/confbox": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.2.tgz", + "integrity": "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/nypm/node_modules/pkg-types": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.0.tgz", + "integrity": "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.2.2", + "exsolve": "^1.0.7", + "pathe": "^2.0.3" + } + }, + "node_modules/nypm/node_modules/tinyexec": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.1.tgz", + "integrity": "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw==", + "dev": true, + "license": "MIT" + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -5717,6 +6123,13 @@ "node": ">=0.10.0" } }, + "node_modules/ohash": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz", + "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==", + "dev": true, + "license": "MIT" + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5743,6 +6156,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/open": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/open/-/open-10.1.2.tgz", + "integrity": "sha512-cxN6aIDPz6rm8hbebcP7vrQNhvRcveZoJU72Y7vskh4oIm+BZwBECnx5nTmrlres1Qapvx27Qo1Auukpf8PKXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -5903,6 +6335,13 @@ "dev": true, "license": "MIT" }, + "node_modules/perfect-debounce": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.0.0.tgz", + "integrity": "sha512-fkEH/OBiKrqqI/yIgjR92lMfs2K8105zt/VT6+7eTjNwisrsh47CeIED9z58zI7DfKdH3uHAn25ziRZn3kgAow==", + "dev": true, + "license": "MIT" + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -6153,6 +6592,17 @@ ], "license": "MIT" }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, "node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", @@ -6270,6 +6720,19 @@ "fsevents": "~2.3.2" } }, + "node_modules/run-applescript": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", diff --git a/package.json b/package.json index 1536f9c5..5fa794af 100644 --- a/package.json +++ b/package.json @@ -51,13 +51,13 @@ "test:integration:v4": "npm test -- --testMatch='**/integration-tests/common/**/*.test.[jt]s?(x)'", "ci": "npm run lint && npm run test", "build": "tsup index.ts", - "generateClient:models": "npx openapi-typescript-codegen --input http://localhost:8080/api-docs --output src/common/open-api --client node --indent 2 --name ConductorClient --useUnionTypes --exportCore false", - "generateClient:core": "npx openapi-typescript-codegen --input http://localhost:8080/api-docs --output src/common/open-api --client node --indent 2 --name ConductorClient --useUnionTypes && find ./src/common/open-api/services/*Service.ts -type f -exec sed -i '' -e 's/api\\///g' {} \\;", + "generate-openapi-layer": "openapi-ts", "generate-docs": "typedoc --plugin typedoc-plugin-markdown", "prepublishOnly": "npm run build" }, "devDependencies": { "@eslint/js": "^9.34.0", + "@hey-api/openapi-ts": "^0.85.2", "@tsconfig/node18": "^18.2.4", "@types/node": "^22.0.0", "@types/uuid": "^9.0.1", diff --git a/src/common/OPEN-API-README.md b/src/common/OPEN-API-README.md index 92df1ee1..6f9f882a 100644 --- a/src/common/OPEN-API-README.md +++ b/src/common/OPEN-API-README.md @@ -1,17 +1,17 @@ -The client is generated using [this library](https://github.com/ferdikoomen/openapi-typescript-codegen). +The client is generated using [this library](https://github.com/hey-api/openapi-ts). Generated code must not be modified directly. -1. Run the latest conductor OSS server locally -2. Run the npm commands: +## Updating generated code -#### Updating definitions -To update `service` and `model` definitions: +1. Copy OpenApi spec data from up to date cluster `({cluster_url}/api-docs)` +2. Paste to `open-api-spec/spec.json` +3. Prettify `spec.json`, run command: (todo: should be removed after OpenApi spec fix) ```text -npm run generateClient:models +node open-api-spec/fix-additional-properties.ts ``` -#### Updating the core +4. run command: -``` -npm run generateClient:core +```text +npm run generate-openapi-layer ``` diff --git a/src/common/RequestCustomizer.ts b/src/common/RequestCustomizer.ts deleted file mode 100644 index 387a067f..00000000 --- a/src/common/RequestCustomizer.ts +++ /dev/null @@ -1,26 +0,0 @@ -import {ApiRequestOptions} from "./open-api/core/ApiRequestOptions" -import {CancelablePromise} from "./open-api/core/CancelablePromise" -import {OpenAPIConfig} from "./open-api/core/OpenAPI" -import {request as baseRequest} from "./open-api/core/request" - -/** - * A handler to modify requests made by ConductorClient. Useful for metrics/option transformation/etc. - * - * @remarks - * Example: Customizing the request URL - * ``` - * - * const requestCustomizer = (request, config, options) => { - * const url = options.url.replace(/^\/api/, '') - * return request(config, {...options, url }); - * } - * const config = { BASE: "https://my-api.com"} - * const client = new ConductorClient(config, requestCustomizer) - * ``` - * - * @param request the underlying node-fetch powered function - * @param config @see OpenAPIConfig - * @param options {see ApiRequestOptions} - */ -export type RequestType = typeof baseRequest; -export type ConductorHttpRequest = (request: RequestType, config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise diff --git a/src/common/deprecated-types.ts b/src/common/deprecated-types.ts new file mode 100644 index 00000000..75fd7c32 --- /dev/null +++ b/src/common/deprecated-types.ts @@ -0,0 +1,263 @@ +/* eslint-disable */ +// TODO: remove everything below (whole file) after April 2026 (backward compatibility types) +// ------------------------------start------------------------------ +import { + HumanTaskEntry, + ScrollableSearchResultWorkflowSummary, + Workflow, + TaskListSearchResultSummary, +} from "./open-api"; +import { Client } from "./open-api/client"; + +// DEPRECATED +export type TimeoutPolicy = { + type: string; +}; + +// DEPRECATED +export type Terminate = TimeoutPolicy & { + timeoutSeconds?: number; +}; + +// DEPRECATED +export type HTScrollableSearchResultHumanTaskEntry = { + queryId?: string; + results?: HumanTaskEntry[]; +}; + +// DEPRECATED +export type StartWorkflow = { + name?: string; + version?: number; + correlationId?: string; + input?: Record; + taskToDomain?: Record; +}; + +// DEPRECATED +export type SearchResultWorkflowSummary = ScrollableSearchResultWorkflowSummary; + +// DEPRECATED +export type SearchResultWorkflow = { + totalHits?: number; + results?: Array; +}; + +// DEPRECATED +export type SearchResultTask = TaskListSearchResultSummary; + +// DEPRECATED +export type ExternalStorageLocation = { + uri?: string; + path?: string; +}; + +// DEPRECATED +export interface OnCancel { + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; + + (cancelHandler: () => void): void; +} + +// DEPRECATED +export type ApiRequestOptions = { + readonly method: + | "GET" + | "PUT" + | "POST" + | "DELETE" + | "OPTIONS" + | "HEAD" + | "PATCH"; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; +}; + +// DEPRECATED +type Resolver = (options: ApiRequestOptions) => Promise; +export type OpenAPIConfig = { + BASE: string; + VERSION: string; + WITH_CREDENTIALS: boolean; + CREDENTIALS: "include" | "omit" | "same-origin"; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + HEADERS?: Headers | Resolver | undefined; + ENCODE_PATH?: ((path: string) => string) | undefined; +}; + +// DEPRECATED +export type ApiResult = { + readonly url: string; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly body: any; +}; + +// DEPRECATED +export class ApiError extends Error { + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: any; + public readonly request: ApiRequestOptions; + + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string + ) { + super(message); + + this.name = "ApiError"; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } +} + +// DEPRECATED +export type ConductorClient = Client; + +// DEPRECATED +export class CancelError extends Error { + constructor(message: string) { + super(message); + this.name = "CancelError"; + } + + public get isCancelled(): boolean { + return true; + } +} + +// DEPRECATED +export class CancelablePromise implements Promise { + #isResolved: boolean; + #isRejected: boolean; + #isCancelled: boolean; + readonly #cancelHandlers: (() => void)[]; + readonly #promise: Promise; + #resolve?: (value: T | PromiseLike) => void; + #reject?: (reason?: any) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: any) => void, + onCancel: OnCancel + ) => void + ) { + this.#isResolved = false; + this.#isRejected = false; + this.#isCancelled = false; + this.#cancelHandlers = []; + this.#promise = new Promise((resolve, reject) => { + this.#resolve = resolve; + this.#reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isResolved = true; + if (this.#resolve) this.#resolve(value); + }; + + const onReject = (reason?: any): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isRejected = true; + if (this.#reject) this.#reject(reason); + }; + + const onCancel = (cancelHandler: () => void): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#cancelHandlers.push(cancelHandler); + }; + + Object.defineProperty(onCancel, "isResolved", { + get: (): boolean => this.#isResolved, + }); + + Object.defineProperty(onCancel, "isRejected", { + get: (): boolean => this.#isRejected, + }); + + Object.defineProperty(onCancel, "isCancelled", { + get: (): boolean => this.#isCancelled, + }); + + return executor(onResolve, onReject, onCancel as OnCancel); + }); + } + + get [Symbol.toStringTag]() { + return "Cancellable Promise"; + } + + public then( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: any) => TResult2 | PromiseLike) | null + ): Promise { + return this.#promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: any) => TResult | PromiseLike) | null + ): Promise { + return this.#promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + return this.#promise.finally(onFinally); + } + + public cancel(): void { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isCancelled = true; + if (this.#cancelHandlers.length) { + try { + for (const cancelHandler of this.#cancelHandlers) { + cancelHandler(); + } + } catch (error) { + console.warn("Cancellation threw an error", error); + return; + } + } + this.#cancelHandlers.length = 0; + if (this.#reject) this.#reject(new CancelError("Request aborted")); + } + + public get isCancelled(): boolean { + return this.#isCancelled; + } +} + +// DEPRECATED +export abstract class BaseHttpRequest { + constructor(public readonly config: OpenAPIConfig) {} + + public abstract request(options: ApiRequestOptions): CancelablePromise; +} +// ------------------------------end------------------------------ diff --git a/src/common/index.ts b/src/common/index.ts index f6b42c46..3344f81a 100644 --- a/src/common/index.ts +++ b/src/common/index.ts @@ -1,44 +1,23 @@ export * from "./ConductorLogger"; -export * from "./RequestCustomizer"; export * from "./types"; -export { - ConductorClient, - ApiError, - BaseHttpRequest, - CancelablePromise, - CancelError, - EventResourceService, - HealthCheckResourceService, - MetadataResourceService, - SchedulerResourceService, - TaskResourceService, - TokenResourceService, - WorkflowBulkResourceService, - WorkflowResourceService, -} from "./open-api"; - +export type { Client } from "./open-api/client"; export type { - ApiRequestOptions, - ApiResult, - OpenAPIConfig, - OnCancel, Action, + CircuitBreakerTransitionResponse, EventHandler, - ExternalStorageLocation, GenerateTokenRequest, PollData, + ProtoRegistryEntry, RerunWorkflowRequest, Response, SaveScheduleRequest, ScrollableSearchResultWorkflowSummary, - SearchResultTask, SearchResultTaskSummary, - SearchResultWorkflow, SearchResultWorkflowScheduleExecutionModel, - SearchResultWorkflowSummary, + ServiceRegistry, + ServiceMethod, SkipTaskRequest, - StartWorkflow, StartWorkflowRequest, SubWorkflowParams, Task, @@ -47,15 +26,17 @@ export type { TaskExecLog, TaskResult, TaskSummary, + TaskListSearchResultSummary, Workflow, WorkflowSchedule, WorkflowScheduleExecutionModel, + WorkflowScheduleModel, WorkflowStatus, WorkflowSummary, WorkflowTask, - HTScrollableSearchResultHumanTaskEntry, - Terminate, - TimeoutPolicy, + WorkflowDef, + WorkflowRun, + ExtendedWorkflowDef, HumanTaskUser, HumanTaskDefinition, HumanTaskAssignment, @@ -66,3 +47,8 @@ export type { HumanTaskSearch, HumanTaskEntry, } from "./open-api"; + +export type { ExtendedTaskDef, SignalResponse } from "./types"; + +// todo: remove after April 2026 (backward compatibility types) +export * from "./deprecated-types"; diff --git a/src/common/open-api/ConductorClient.ts b/src/common/open-api/ConductorClient.ts deleted file mode 100644 index ccacb393..00000000 --- a/src/common/open-api/ConductorClient.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseHttpRequest } from "./core/BaseHttpRequest"; -import type { OpenAPIConfig } from "./core/OpenAPI"; -import { EventResourceService } from "./services/EventResourceService"; -import { HealthCheckResourceService } from "./services/HealthCheckResourceService"; -import { MetadataResourceService } from "./services/MetadataResourceService"; -import { SchedulerResourceService } from "./services/SchedulerResourceService"; -import { TaskResourceService } from "./services/TaskResourceService"; -import { TokenResourceService } from "./services/TokenResourceService"; -import { WorkflowBulkResourceService } from "./services/WorkflowBulkResourceService"; -import { WorkflowResourceService } from "./services/WorkflowResourceService"; -import { HumanTaskService } from "./services/HumanTaskService"; -import { HumanTaskResourceService } from "./services/HumanTaskResourceService"; -import { ServiceRegistryResourceService } from "./services/ServiceRegistryResourceService"; -import { NodeHttpRequest } from "./core/NodeHttpRequest"; - -type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; - -export class ConductorClient { - public readonly eventResource: EventResourceService; - public readonly healthCheckResource: HealthCheckResourceService; - public readonly metadataResource: MetadataResourceService; - public readonly schedulerResource: SchedulerResourceService; - public readonly taskResource: TaskResourceService; - public readonly tokenResource: TokenResourceService; - public readonly workflowBulkResource: WorkflowBulkResourceService; - public readonly workflowResource: WorkflowResourceService; - public readonly serviceRegistryResource: ServiceRegistryResourceService; - public readonly humanTask: HumanTaskService; - public readonly humanTaskResource: HumanTaskResourceService; - public readonly request: BaseHttpRequest; - - constructor( - config?: Partial, - HttpRequest: HttpRequestConstructor = NodeHttpRequest - ) { - this.request = new HttpRequest({ - BASE: config?.BASE ?? "http://localhost:8080", - VERSION: config?.VERSION ?? "2", - WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, - CREDENTIALS: config?.CREDENTIALS ?? "include", - TOKEN: config?.TOKEN, - USERNAME: config?.USERNAME, - PASSWORD: config?.PASSWORD, - HEADERS: config?.HEADERS, - ENCODE_PATH: config?.ENCODE_PATH, - }); - this.eventResource = new EventResourceService(this.request); - this.healthCheckResource = new HealthCheckResourceService(this.request); - this.metadataResource = new MetadataResourceService(this.request); - this.schedulerResource = new SchedulerResourceService(this.request); - this.taskResource = new TaskResourceService(this.request); - this.tokenResource = new TokenResourceService(this.request); - this.workflowBulkResource = new WorkflowBulkResourceService(this.request); - this.workflowResource = new WorkflowResourceService(this.request); - this.serviceRegistryResource = new ServiceRegistryResourceService(this.request); - this.humanTask = new HumanTaskService(this.request); - this.humanTaskResource = new HumanTaskResourceService(this.request); - } -} diff --git a/src/common/open-api/client.gen.ts b/src/common/open-api/client.gen.ts new file mode 100644 index 00000000..40ab3d96 --- /dev/null +++ b/src/common/open-api/client.gen.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { type ClientOptions, type Config, createClient, createConfig } from './client'; +import type { ClientOptions as ClientOptions2 } from './types.gen'; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = (override?: Config) => Config & T>; + +export const client = createClient(createConfig({ + baseUrl: 'https://sdkdev.orkesconductor.io' +})); diff --git a/src/common/open-api/client/client.gen.ts b/src/common/open-api/client/client.gen.ts new file mode 100644 index 00000000..a439d274 --- /dev/null +++ b/src/common/open-api/client/client.gen.ts @@ -0,0 +1,268 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { createSseClient } from '../core/serverSentEvents.gen'; +import type { HttpMethod } from '../core/types.gen'; +import { getValidRequestBody } from '../core/utils.gen'; +import type { + Client, + Config, + RequestOptions, + ResolvedRequestOptions, +} from './types.gen'; +import { + buildUrl, + createConfig, + createInterceptors, + getParseAs, + mergeConfigs, + mergeHeaders, + setAuthParams, +} from './utils.gen'; + +type ReqInit = Omit & { + body?: any; + headers: ReturnType; +}; + +export const createClient = (config: Config = {}): Client => { + let _config = mergeConfigs(createConfig(), config); + + const getConfig = (): Config => ({ ..._config }); + + const setConfig = (config: Config): Config => { + _config = mergeConfigs(_config, config); + return getConfig(); + }; + + const interceptors = createInterceptors< + Request, + Response, + unknown, + ResolvedRequestOptions + >(); + + const beforeRequest = async (options: RequestOptions) => { + const opts = { + ..._config, + ...options, + fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, + headers: mergeHeaders(_config.headers, options.headers), + serializedBody: undefined, + }; + + if (opts.security) { + await setAuthParams({ + ...opts, + security: opts.security, + }); + } + + if (opts.requestValidator) { + await opts.requestValidator(opts); + } + + if (opts.body !== undefined && opts.bodySerializer) { + opts.serializedBody = opts.bodySerializer(opts.body); + } + + // remove Content-Type header if body is empty to avoid sending invalid requests + if (opts.body === undefined || opts.serializedBody === '') { + opts.headers.delete('Content-Type'); + } + + const url = buildUrl(opts); + + return { opts, url }; + }; + + const request: Client['request'] = async (options) => { + // @ts-expect-error + const { opts, url } = await beforeRequest(options); + const requestInit: ReqInit = { + redirect: 'follow', + ...opts, + body: getValidRequestBody(opts), + }; + + let request = new Request(url, requestInit); + + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts); + } + } + + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = opts.fetch!; + let response = await _fetch(request); + + for (const fn of interceptors.response.fns) { + if (fn) { + response = await fn(response, request, opts); + } + } + + const result = { + request, + response, + }; + + if (response.ok) { + const parseAs = + (opts.parseAs === 'auto' + ? getParseAs(response.headers.get('Content-Type')) + : opts.parseAs) ?? 'json'; + + if ( + response.status === 204 || + response.headers.get('Content-Length') === '0' + ) { + let emptyData: any; + switch (parseAs) { + case 'arrayBuffer': + case 'blob': + case 'text': + emptyData = await response[parseAs](); + break; + case 'formData': + emptyData = new FormData(); + break; + case 'stream': + emptyData = response.body; + break; + case 'json': + default: + emptyData = {}; + break; + } + return opts.responseStyle === 'data' + ? emptyData + : { + data: emptyData, + ...result, + }; + } + + let data: any; + switch (parseAs) { + case 'arrayBuffer': + case 'blob': + case 'formData': + case 'json': + case 'text': + data = await response[parseAs](); + break; + case 'stream': + return opts.responseStyle === 'data' + ? response.body + : { + data: response.body, + ...result, + }; + } + + if (parseAs === 'json') { + if (opts.responseValidator) { + await opts.responseValidator(data); + } + + if (opts.responseTransformer) { + data = await opts.responseTransformer(data); + } + } + + return opts.responseStyle === 'data' + ? data + : { + data, + ...result, + }; + } + + const textError = await response.text(); + let jsonError: unknown; + + try { + jsonError = JSON.parse(textError); + } catch { + // noop + } + + const error = jsonError ?? textError; + let finalError = error; + + for (const fn of interceptors.error.fns) { + if (fn) { + finalError = (await fn(error, response, request, opts)) as string; + } + } + + finalError = finalError || ({} as string); + + if (opts.throwOnError) { + throw finalError; + } + + // TODO: we probably want to return error and improve types + return opts.responseStyle === 'data' + ? undefined + : { + error: finalError, + ...result, + }; + }; + + const makeMethodFn = + (method: Uppercase) => (options: RequestOptions) => + request({ ...options, method }); + + const makeSseFn = + (method: Uppercase) => async (options: RequestOptions) => { + const { opts, url } = await beforeRequest(options); + return createSseClient({ + ...opts, + body: opts.body as BodyInit | null | undefined, + headers: opts.headers as unknown as Record, + method, + onRequest: async (url, init) => { + let request = new Request(url, init); + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts); + } + } + return request; + }, + url, + }); + }; + + return { + buildUrl, + connect: makeMethodFn('CONNECT'), + delete: makeMethodFn('DELETE'), + get: makeMethodFn('GET'), + getConfig, + head: makeMethodFn('HEAD'), + interceptors, + options: makeMethodFn('OPTIONS'), + patch: makeMethodFn('PATCH'), + post: makeMethodFn('POST'), + put: makeMethodFn('PUT'), + request, + setConfig, + sse: { + connect: makeSseFn('CONNECT'), + delete: makeSseFn('DELETE'), + get: makeSseFn('GET'), + head: makeSseFn('HEAD'), + options: makeSseFn('OPTIONS'), + patch: makeSseFn('PATCH'), + post: makeSseFn('POST'), + put: makeSseFn('PUT'), + trace: makeSseFn('TRACE'), + }, + trace: makeMethodFn('TRACE'), + } as Client; +}; diff --git a/src/common/open-api/client/index.ts b/src/common/open-api/client/index.ts new file mode 100644 index 00000000..cbf8dfee --- /dev/null +++ b/src/common/open-api/client/index.ts @@ -0,0 +1,26 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type { Auth } from '../core/auth.gen'; +export type { QuerySerializerOptions } from '../core/bodySerializer.gen'; +export { + formDataBodySerializer, + jsonBodySerializer, + urlSearchParamsBodySerializer, +} from '../core/bodySerializer.gen'; +export { buildClientParams } from '../core/params.gen'; +export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen'; +export { createClient } from './client.gen'; +export type { + Client, + ClientOptions, + Config, + CreateClientConfig, + Options, + OptionsLegacyParser, + RequestOptions, + RequestResult, + ResolvedRequestOptions, + ResponseStyle, + TDataShape, +} from './types.gen'; +export { createConfig, mergeHeaders } from './utils.gen'; diff --git a/src/common/open-api/client/types.gen.ts b/src/common/open-api/client/types.gen.ts new file mode 100644 index 00000000..1a005b51 --- /dev/null +++ b/src/common/open-api/client/types.gen.ts @@ -0,0 +1,268 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth } from '../core/auth.gen'; +import type { + ServerSentEventsOptions, + ServerSentEventsResult, +} from '../core/serverSentEvents.gen'; +import type { + Client as CoreClient, + Config as CoreConfig, +} from '../core/types.gen'; +import type { Middleware } from './utils.gen'; + +export type ResponseStyle = 'data' | 'fields'; + +export interface Config + extends Omit, + CoreConfig { + /** + * Base URL for all requests made by this client. + */ + baseUrl?: T['baseUrl']; + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch; + /** + * Please don't use the Fetch client for Next.js applications. The `next` + * options won't have any effect. + * + * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. + */ + next?: never; + /** + * Return the response data parsed in a specified format. By default, `auto` + * will infer the appropriate method from the `Content-Type` response header. + * You can override this behavior with any of the {@link Body} methods. + * Select `stream` if you don't want to parse response data at all. + * + * @default 'auto' + */ + parseAs?: + | 'arrayBuffer' + | 'auto' + | 'blob' + | 'formData' + | 'json' + | 'stream' + | 'text'; + /** + * Should we return only data or multiple fields (data, error, response, etc.)? + * + * @default 'fields' + */ + responseStyle?: ResponseStyle; + /** + * Throw an error instead of returning it in the response? + * + * @default false + */ + throwOnError?: T['throwOnError']; +} + +export interface RequestOptions< + TData = unknown, + TResponseStyle extends ResponseStyle = 'fields', + ThrowOnError extends boolean = boolean, + Url extends string = string, +> extends Config<{ + responseStyle: TResponseStyle; + throwOnError: ThrowOnError; + }>, + Pick< + ServerSentEventsOptions, + | 'onSseError' + | 'onSseEvent' + | 'sseDefaultRetryDelay' + | 'sseMaxRetryAttempts' + | 'sseMaxRetryDelay' + > { + /** + * Any body that you want to add to your request. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} + */ + body?: unknown; + path?: Record; + query?: Record; + /** + * Security mechanism(s) to use for the request. + */ + security?: ReadonlyArray; + url: Url; +} + +export interface ResolvedRequestOptions< + TResponseStyle extends ResponseStyle = 'fields', + ThrowOnError extends boolean = boolean, + Url extends string = string, +> extends RequestOptions { + serializedBody?: string; +} + +export type RequestResult< + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = boolean, + TResponseStyle extends ResponseStyle = 'fields', +> = ThrowOnError extends true + ? Promise< + TResponseStyle extends 'data' + ? TData extends Record + ? TData[keyof TData] + : TData + : { + data: TData extends Record + ? TData[keyof TData] + : TData; + request: Request; + response: Response; + } + > + : Promise< + TResponseStyle extends 'data' + ? + | (TData extends Record + ? TData[keyof TData] + : TData) + | undefined + : ( + | { + data: TData extends Record + ? TData[keyof TData] + : TData; + error: undefined; + } + | { + data: undefined; + error: TError extends Record + ? TError[keyof TError] + : TError; + } + ) & { + request: Request; + response: Response; + } + >; + +export interface ClientOptions { + baseUrl?: string; + responseStyle?: ResponseStyle; + throwOnError?: boolean; +} + +type MethodFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = 'fields', +>( + options: Omit, 'method'>, +) => RequestResult; + +type SseFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = 'fields', +>( + options: Omit, 'method'>, +) => Promise>; + +type RequestFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = 'fields', +>( + options: Omit, 'method'> & + Pick< + Required>, + 'method' + >, +) => RequestResult; + +type BuildUrlFn = < + TData extends { + body?: unknown; + path?: Record; + query?: Record; + url: string; + }, +>( + options: Pick & Options, +) => string; + +export type Client = CoreClient< + RequestFn, + Config, + MethodFn, + BuildUrlFn, + SseFn +> & { + interceptors: Middleware; +}; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = ( + override?: Config, +) => Config & T>; + +export interface TDataShape { + body?: unknown; + headers?: unknown; + path?: unknown; + query?: unknown; + url: string; +} + +type OmitKeys = Pick>; + +export type Options< + TData extends TDataShape = TDataShape, + ThrowOnError extends boolean = boolean, + TResponse = unknown, + TResponseStyle extends ResponseStyle = 'fields', +> = OmitKeys< + RequestOptions, + 'body' | 'path' | 'query' | 'url' +> & + Omit; + +export type OptionsLegacyParser< + TData = unknown, + ThrowOnError extends boolean = boolean, + TResponseStyle extends ResponseStyle = 'fields', +> = TData extends { body?: any } + ? TData extends { headers?: any } + ? OmitKeys< + RequestOptions, + 'body' | 'headers' | 'url' + > & + TData + : OmitKeys< + RequestOptions, + 'body' | 'url' + > & + TData & + Pick, 'headers'> + : TData extends { headers?: any } + ? OmitKeys< + RequestOptions, + 'headers' | 'url' + > & + TData & + Pick, 'body'> + : OmitKeys, 'url'> & + TData; diff --git a/src/common/open-api/client/utils.gen.ts b/src/common/open-api/client/utils.gen.ts new file mode 100644 index 00000000..b4bcc4d1 --- /dev/null +++ b/src/common/open-api/client/utils.gen.ts @@ -0,0 +1,331 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { getAuthToken } from '../core/auth.gen'; +import type { QuerySerializerOptions } from '../core/bodySerializer.gen'; +import { jsonBodySerializer } from '../core/bodySerializer.gen'; +import { + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from '../core/pathSerializer.gen'; +import { getUrl } from '../core/utils.gen'; +import type { Client, ClientOptions, Config, RequestOptions } from './types.gen'; + +export const createQuerySerializer = ({ + allowReserved, + array, + object, +}: QuerySerializerOptions = {}) => { + const querySerializer = (queryParams: T) => { + const search: string[] = []; + if (queryParams && typeof queryParams === 'object') { + for (const name in queryParams) { + const value = queryParams[name]; + + if (value === undefined || value === null) { + continue; + } + + if (Array.isArray(value)) { + const serializedArray = serializeArrayParam({ + allowReserved, + explode: true, + name, + style: 'form', + value, + ...array, + }); + if (serializedArray) search.push(serializedArray); + } else if (typeof value === 'object') { + const serializedObject = serializeObjectParam({ + allowReserved, + explode: true, + name, + style: 'deepObject', + value: value as Record, + ...object, + }); + if (serializedObject) search.push(serializedObject); + } else { + const serializedPrimitive = serializePrimitiveParam({ + allowReserved, + name, + value: value as string, + }); + if (serializedPrimitive) search.push(serializedPrimitive); + } + } + } + return search.join('&'); + }; + return querySerializer; +}; + +/** + * Infers parseAs value from provided Content-Type header. + */ +export const getParseAs = ( + contentType: string | null, +): Exclude => { + if (!contentType) { + // If no Content-Type header is provided, the best we can do is return the raw response body, + // which is effectively the same as the 'stream' option. + return 'stream'; + } + + const cleanContent = contentType.split(';')[0]?.trim(); + + if (!cleanContent) { + return; + } + + if ( + cleanContent.startsWith('application/json') || + cleanContent.endsWith('+json') + ) { + return 'json'; + } + + if (cleanContent === 'multipart/form-data') { + return 'formData'; + } + + if ( + ['application/', 'audio/', 'image/', 'video/'].some((type) => + cleanContent.startsWith(type), + ) + ) { + return 'blob'; + } + + if (cleanContent.startsWith('text/')) { + return 'text'; + } + + return; +}; + +const checkForExistence = ( + options: Pick & { + headers: Headers; + }, + name?: string, +): boolean => { + if (!name) { + return false; + } + if ( + options.headers.has(name) || + options.query?.[name] || + options.headers.get('Cookie')?.includes(`${name}=`) + ) { + return true; + } + return false; +}; + +export const setAuthParams = async ({ + security, + ...options +}: Pick, 'security'> & + Pick & { + headers: Headers; + }) => { + for (const auth of security) { + if (checkForExistence(options, auth.name)) { + continue; + } + + const token = await getAuthToken(auth, options.auth); + + if (!token) { + continue; + } + + const name = auth.name ?? 'Authorization'; + + switch (auth.in) { + case 'query': + if (!options.query) { + options.query = {}; + } + options.query[name] = token; + break; + case 'cookie': + options.headers.append('Cookie', `${name}=${token}`); + break; + case 'header': + default: + options.headers.set(name, token); + break; + } + } +}; + +export const buildUrl: Client['buildUrl'] = (options) => + getUrl({ + baseUrl: options.baseUrl as string, + path: options.path, + query: options.query, + querySerializer: + typeof options.querySerializer === 'function' + ? options.querySerializer + : createQuerySerializer(options.querySerializer), + url: options.url, + }); + +export const mergeConfigs = (a: Config, b: Config): Config => { + const config = { ...a, ...b }; + if (config.baseUrl?.endsWith('/')) { + config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1); + } + config.headers = mergeHeaders(a.headers, b.headers); + return config; +}; + +const headersEntries = (headers: Headers): Array<[string, string]> => { + const entries: Array<[string, string]> = []; + headers.forEach((value, key) => { + entries.push([key, value]); + }); + return entries; +}; + +export const mergeHeaders = ( + ...headers: Array['headers'] | undefined> +): Headers => { + const mergedHeaders = new Headers(); + for (const header of headers) { + if (!header) { + continue; + } + + const iterator = + header instanceof Headers + ? headersEntries(header) + : Object.entries(header); + + for (const [key, value] of iterator) { + if (value === null) { + mergedHeaders.delete(key); + } else if (Array.isArray(value)) { + for (const v of value) { + mergedHeaders.append(key, v as string); + } + } else if (value !== undefined) { + // assume object headers are meant to be JSON stringified, i.e. their + // content value in OpenAPI specification is 'application/json' + mergedHeaders.set( + key, + typeof value === 'object' ? JSON.stringify(value) : (value as string), + ); + } + } + } + return mergedHeaders; +}; + +type ErrInterceptor = ( + error: Err, + response: Res, + request: Req, + options: Options, +) => Err | Promise; + +type ReqInterceptor = ( + request: Req, + options: Options, +) => Req | Promise; + +type ResInterceptor = ( + response: Res, + request: Req, + options: Options, +) => Res | Promise; + +class Interceptors { + fns: Array = []; + + clear(): void { + this.fns = []; + } + + eject(id: number | Interceptor): void { + const index = this.getInterceptorIndex(id); + if (this.fns[index]) { + this.fns[index] = null; + } + } + + exists(id: number | Interceptor): boolean { + const index = this.getInterceptorIndex(id); + return Boolean(this.fns[index]); + } + + getInterceptorIndex(id: number | Interceptor): number { + if (typeof id === 'number') { + return this.fns[id] ? id : -1; + } + return this.fns.indexOf(id); + } + + update( + id: number | Interceptor, + fn: Interceptor, + ): number | Interceptor | false { + const index = this.getInterceptorIndex(id); + if (this.fns[index]) { + this.fns[index] = fn; + return id; + } + return false; + } + + use(fn: Interceptor): number { + this.fns.push(fn); + return this.fns.length - 1; + } +} + +export interface Middleware { + error: Interceptors>; + request: Interceptors>; + response: Interceptors>; +} + +export const createInterceptors = (): Middleware< + Req, + Res, + Err, + Options +> => ({ + error: new Interceptors>(), + request: new Interceptors>(), + response: new Interceptors>(), +}); + +const defaultQuerySerializer = createQuerySerializer({ + allowReserved: false, + array: { + explode: true, + style: 'form', + }, + object: { + explode: true, + style: 'deepObject', + }, +}); + +const defaultHeaders = { + 'Content-Type': 'application/json', +}; + +export const createConfig = ( + override: Config & T> = {}, +): Config & T> => ({ + ...jsonBodySerializer, + headers: defaultHeaders, + parseAs: 'auto', + querySerializer: defaultQuerySerializer, + ...override, +}); diff --git a/src/common/open-api/core/ApiError.ts b/src/common/open-api/core/ApiError.ts deleted file mode 100644 index 41a9605a..00000000 --- a/src/common/open-api/core/ApiError.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; -import type { ApiResult } from './ApiResult'; - -export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: any; - public readonly request: ApiRequestOptions; - - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); - - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } -} diff --git a/src/common/open-api/core/ApiRequestOptions.ts b/src/common/open-api/core/ApiRequestOptions.ts deleted file mode 100644 index c9350406..00000000 --- a/src/common/open-api/core/ApiRequestOptions.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; -}; diff --git a/src/common/open-api/core/ApiResult.ts b/src/common/open-api/core/ApiResult.ts deleted file mode 100644 index 91f60ae0..00000000 --- a/src/common/open-api/core/ApiResult.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type ApiResult = { - readonly url: string; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly body: any; -}; diff --git a/src/common/open-api/core/BaseHttpRequest.ts b/src/common/open-api/core/BaseHttpRequest.ts deleted file mode 100644 index 489f1d10..00000000 --- a/src/common/open-api/core/BaseHttpRequest.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; -import type { CancelablePromise } from './CancelablePromise'; -import type { OpenAPIConfig } from './OpenAPI'; - -export abstract class BaseHttpRequest { - - constructor(public readonly config: OpenAPIConfig) {} - - public abstract request(options: ApiRequestOptions): CancelablePromise; -} diff --git a/src/common/open-api/core/CancelablePromise.ts b/src/common/open-api/core/CancelablePromise.ts deleted file mode 100644 index 1db49871..00000000 --- a/src/common/open-api/core/CancelablePromise.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export class CancelError extends Error { - - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } -} - -export interface OnCancel { - readonly isResolved: boolean; - readonly isRejected: boolean; - readonly isCancelled: boolean; - - (cancelHandler: () => void): void; -} - -export class CancelablePromise implements Promise { - #isResolved: boolean; - #isRejected: boolean; - #isCancelled: boolean; - readonly #cancelHandlers: (() => void)[]; - readonly #promise: Promise; - #resolve?: (value: T | PromiseLike) => void; - #reject?: (reason?: any) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: any) => void, - onCancel: OnCancel - ) => void - ) { - this.#isResolved = false; - this.#isRejected = false; - this.#isCancelled = false; - this.#cancelHandlers = []; - this.#promise = new Promise((resolve, reject) => { - this.#resolve = resolve; - this.#reject = reject; - - const onResolve = (value: T | PromiseLike): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isResolved = true; - if (this.#resolve) this.#resolve(value); - }; - - const onReject = (reason?: any): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isRejected = true; - if (this.#reject) this.#reject(reason); - }; - - const onCancel = (cancelHandler: () => void): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#cancelHandlers.push(cancelHandler); - }; - - Object.defineProperty(onCancel, 'isResolved', { - get: (): boolean => this.#isResolved, - }); - - Object.defineProperty(onCancel, 'isRejected', { - get: (): boolean => this.#isRejected, - }); - - Object.defineProperty(onCancel, 'isCancelled', { - get: (): boolean => this.#isCancelled, - }); - - return executor(onResolve, onReject, onCancel as OnCancel); - }); - } - - get [Symbol.toStringTag]() { - return "Cancellable Promise"; - } - - public then( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: any) => TResult2 | PromiseLike) | null - ): Promise { - return this.#promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: any) => TResult | PromiseLike) | null - ): Promise { - return this.#promise.catch(onRejected); - } - - public finally(onFinally?: (() => void) | null): Promise { - return this.#promise.finally(onFinally); - } - - public cancel(): void { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isCancelled = true; - if (this.#cancelHandlers.length) { - try { - for (const cancelHandler of this.#cancelHandlers) { - cancelHandler(); - } - } catch (error) { - console.warn('Cancellation threw an error', error); - return; - } - } - this.#cancelHandlers.length = 0; - if (this.#reject) this.#reject(new CancelError('Request aborted')); - } - - public get isCancelled(): boolean { - return this.#isCancelled; - } -} diff --git a/src/common/open-api/core/NodeHttpRequest.ts b/src/common/open-api/core/NodeHttpRequest.ts deleted file mode 100644 index c00e3f85..00000000 --- a/src/common/open-api/core/NodeHttpRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; -import { BaseHttpRequest } from './BaseHttpRequest'; -import type { CancelablePromise } from './CancelablePromise'; -import type { OpenAPIConfig } from './OpenAPI'; -import { request as __request } from './request'; - -export class NodeHttpRequest extends BaseHttpRequest { - - constructor(config: OpenAPIConfig) { - super(config); - } - - /** - * Request method - * @param options The request options from the service - * @returns CancelablePromise - * @throws ApiError - */ - public override request(options: ApiRequestOptions): CancelablePromise { - return __request(this.config, options); - } -} diff --git a/src/common/open-api/core/OpenAPI.ts b/src/common/open-api/core/OpenAPI.ts deleted file mode 100644 index c54cd39c..00000000 --- a/src/common/open-api/core/OpenAPI.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; - -type Resolver = (options: ApiRequestOptions) => Promise; -type Headers = Record; - -export type OpenAPIConfig = { - BASE: string; - VERSION: string; - WITH_CREDENTIALS: boolean; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - HEADERS?: Headers | Resolver | undefined; - ENCODE_PATH?: ((path: string) => string) | undefined; -}; - -export const OpenAPI: OpenAPIConfig = { - BASE: 'http://localhost:8080', - VERSION: '2', - WITH_CREDENTIALS: false, - CREDENTIALS: 'include', - TOKEN: undefined, - USERNAME: undefined, - PASSWORD: undefined, - HEADERS: undefined, - ENCODE_PATH: undefined, -}; diff --git a/src/common/open-api/core/auth.gen.ts b/src/common/open-api/core/auth.gen.ts new file mode 100644 index 00000000..f8a73266 --- /dev/null +++ b/src/common/open-api/core/auth.gen.ts @@ -0,0 +1,42 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type AuthToken = string | undefined; + +export interface Auth { + /** + * Which part of the request do we use to send the auth? + * + * @default 'header' + */ + in?: 'header' | 'query' | 'cookie'; + /** + * Header or query parameter name. + * + * @default 'Authorization' + */ + name?: string; + scheme?: 'basic' | 'bearer'; + type: 'apiKey' | 'http'; +} + +export const getAuthToken = async ( + auth: Auth, + callback: ((auth: Auth) => Promise | AuthToken) | AuthToken, +): Promise => { + const token = + typeof callback === 'function' ? await callback(auth) : callback; + + if (!token) { + return; + } + + if (auth.scheme === 'bearer') { + return `Bearer ${token}`; + } + + if (auth.scheme === 'basic') { + return `Basic ${btoa(token)}`; + } + + return token; +}; diff --git a/src/common/open-api/core/bodySerializer.gen.ts b/src/common/open-api/core/bodySerializer.gen.ts new file mode 100644 index 00000000..49cd8925 --- /dev/null +++ b/src/common/open-api/core/bodySerializer.gen.ts @@ -0,0 +1,92 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { + ArrayStyle, + ObjectStyle, + SerializerOptions, +} from './pathSerializer.gen'; + +export type QuerySerializer = (query: Record) => string; + +export type BodySerializer = (body: any) => any; + +export interface QuerySerializerOptions { + allowReserved?: boolean; + array?: SerializerOptions; + object?: SerializerOptions; +} + +const serializeFormDataPair = ( + data: FormData, + key: string, + value: unknown, +): void => { + if (typeof value === 'string' || value instanceof Blob) { + data.append(key, value); + } else if (value instanceof Date) { + data.append(key, value.toISOString()); + } else { + data.append(key, JSON.stringify(value)); + } +}; + +const serializeUrlSearchParamsPair = ( + data: URLSearchParams, + key: string, + value: unknown, +): void => { + if (typeof value === 'string') { + data.append(key, value); + } else { + data.append(key, JSON.stringify(value)); + } +}; + +export const formDataBodySerializer = { + bodySerializer: | Array>>( + body: T, + ): FormData => { + const data = new FormData(); + + Object.entries(body).forEach(([key, value]) => { + if (value === undefined || value === null) { + return; + } + if (Array.isArray(value)) { + value.forEach((v) => serializeFormDataPair(data, key, v)); + } else { + serializeFormDataPair(data, key, value); + } + }); + + return data; + }, +}; + +export const jsonBodySerializer = { + bodySerializer: (body: T): string => + JSON.stringify(body, (_key, value) => + typeof value === 'bigint' ? value.toString() : value, + ), +}; + +export const urlSearchParamsBodySerializer = { + bodySerializer: | Array>>( + body: T, + ): string => { + const data = new URLSearchParams(); + + Object.entries(body).forEach(([key, value]) => { + if (value === undefined || value === null) { + return; + } + if (Array.isArray(value)) { + value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)); + } else { + serializeUrlSearchParamsPair(data, key, value); + } + }); + + return data.toString(); + }, +}; diff --git a/src/common/open-api/core/params.gen.ts b/src/common/open-api/core/params.gen.ts new file mode 100644 index 00000000..71c88e85 --- /dev/null +++ b/src/common/open-api/core/params.gen.ts @@ -0,0 +1,153 @@ +// This file is auto-generated by @hey-api/openapi-ts + +type Slot = 'body' | 'headers' | 'path' | 'query'; + +export type Field = + | { + in: Exclude; + /** + * Field name. This is the name we want the user to see and use. + */ + key: string; + /** + * Field mapped name. This is the name we want to use in the request. + * If omitted, we use the same value as `key`. + */ + map?: string; + } + | { + in: Extract; + /** + * Key isn't required for bodies. + */ + key?: string; + map?: string; + }; + +export interface Fields { + allowExtra?: Partial>; + args?: ReadonlyArray; +} + +export type FieldsConfig = ReadonlyArray; + +const extraPrefixesMap: Record = { + $body_: 'body', + $headers_: 'headers', + $path_: 'path', + $query_: 'query', +}; +const extraPrefixes = Object.entries(extraPrefixesMap); + +type KeyMap = Map< + string, + { + in: Slot; + map?: string; + } +>; + +const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { + if (!map) { + map = new Map(); + } + + for (const config of fields) { + if ('in' in config) { + if (config.key) { + map.set(config.key, { + in: config.in, + map: config.map, + }); + } + } else if (config.args) { + buildKeyMap(config.args, map); + } + } + + return map; +}; + +interface Params { + body: unknown; + headers: Record; + path: Record; + query: Record; +} + +const stripEmptySlots = (params: Params) => { + for (const [slot, value] of Object.entries(params)) { + if (value && typeof value === 'object' && !Object.keys(value).length) { + delete params[slot as Slot]; + } + } +}; + +export const buildClientParams = ( + args: ReadonlyArray, + fields: FieldsConfig, +) => { + const params: Params = { + body: {}, + headers: {}, + path: {}, + query: {}, + }; + + const map = buildKeyMap(fields); + + let config: FieldsConfig[number] | undefined; + + for (const [index, arg] of args.entries()) { + if (fields[index]) { + config = fields[index]; + } + + if (!config) { + continue; + } + + if ('in' in config) { + if (config.key) { + const field = map.get(config.key)!; + const name = field.map || config.key; + (params[field.in] as Record)[name] = arg; + } else { + params.body = arg; + } + } else { + for (const [key, value] of Object.entries(arg ?? {})) { + const field = map.get(key); + + if (field) { + const name = field.map || key; + (params[field.in] as Record)[name] = value; + } else { + const extra = extraPrefixes.find(([prefix]) => + key.startsWith(prefix), + ); + + if (extra) { + const [prefix, slot] = extra; + (params[slot] as Record)[ + key.slice(prefix.length) + ] = value; + } else { + for (const [slot, allowed] of Object.entries( + config.allowExtra ?? {}, + )) { + if (allowed) { + (params[slot as Slot] as Record)[key] = value; + break; + } + } + } + } + } + } + } + + stripEmptySlots(params); + + return params; +}; diff --git a/src/common/open-api/core/pathSerializer.gen.ts b/src/common/open-api/core/pathSerializer.gen.ts new file mode 100644 index 00000000..8d999310 --- /dev/null +++ b/src/common/open-api/core/pathSerializer.gen.ts @@ -0,0 +1,181 @@ +// This file is auto-generated by @hey-api/openapi-ts + +interface SerializeOptions + extends SerializePrimitiveOptions, + SerializerOptions {} + +interface SerializePrimitiveOptions { + allowReserved?: boolean; + name: string; +} + +export interface SerializerOptions { + /** + * @default true + */ + explode: boolean; + style: T; +} + +export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; +export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; +type MatrixStyle = 'label' | 'matrix' | 'simple'; +export type ObjectStyle = 'form' | 'deepObject'; +type ObjectSeparatorStyle = ObjectStyle | MatrixStyle; + +interface SerializePrimitiveParam extends SerializePrimitiveOptions { + value: string; +} + +export const separatorArrayExplode = (style: ArraySeparatorStyle) => { + switch (style) { + case 'label': + return '.'; + case 'matrix': + return ';'; + case 'simple': + return ','; + default: + return '&'; + } +}; + +export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => { + switch (style) { + case 'form': + return ','; + case 'pipeDelimited': + return '|'; + case 'spaceDelimited': + return '%20'; + default: + return ','; + } +}; + +export const separatorObjectExplode = (style: ObjectSeparatorStyle) => { + switch (style) { + case 'label': + return '.'; + case 'matrix': + return ';'; + case 'simple': + return ','; + default: + return '&'; + } +}; + +export const serializeArrayParam = ({ + allowReserved, + explode, + name, + style, + value, +}: SerializeOptions & { + value: unknown[]; +}) => { + if (!explode) { + const joinedValues = ( + allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) + ).join(separatorArrayNoExplode(style)); + switch (style) { + case 'label': + return `.${joinedValues}`; + case 'matrix': + return `;${name}=${joinedValues}`; + case 'simple': + return joinedValues; + default: + return `${name}=${joinedValues}`; + } + } + + const separator = separatorArrayExplode(style); + const joinedValues = value + .map((v) => { + if (style === 'label' || style === 'simple') { + return allowReserved ? v : encodeURIComponent(v as string); + } + + return serializePrimitiveParam({ + allowReserved, + name, + value: v as string, + }); + }) + .join(separator); + return style === 'label' || style === 'matrix' + ? separator + joinedValues + : joinedValues; +}; + +export const serializePrimitiveParam = ({ + allowReserved, + name, + value, +}: SerializePrimitiveParam) => { + if (value === undefined || value === null) { + return ''; + } + + if (typeof value === 'object') { + throw new Error( + 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.', + ); + } + + return `${name}=${allowReserved ? value : encodeURIComponent(value)}`; +}; + +export const serializeObjectParam = ({ + allowReserved, + explode, + name, + style, + value, + valueOnly, +}: SerializeOptions & { + value: Record | Date; + valueOnly?: boolean; +}) => { + if (value instanceof Date) { + return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`; + } + + if (style !== 'deepObject' && !explode) { + let values: string[] = []; + Object.entries(value).forEach(([key, v]) => { + values = [ + ...values, + key, + allowReserved ? (v as string) : encodeURIComponent(v as string), + ]; + }); + const joinedValues = values.join(','); + switch (style) { + case 'form': + return `${name}=${joinedValues}`; + case 'label': + return `.${joinedValues}`; + case 'matrix': + return `;${name}=${joinedValues}`; + default: + return joinedValues; + } + } + + const separator = separatorObjectExplode(style); + const joinedValues = Object.entries(value) + .map(([key, v]) => + serializePrimitiveParam({ + allowReserved, + name: style === 'deepObject' ? `${name}[${key}]` : key, + value: v as string, + }), + ) + .join(separator); + return style === 'label' || style === 'matrix' + ? separator + joinedValues + : joinedValues; +}; diff --git a/src/common/open-api/core/queryKeySerializer.gen.ts b/src/common/open-api/core/queryKeySerializer.gen.ts new file mode 100644 index 00000000..d3bb6839 --- /dev/null +++ b/src/common/open-api/core/queryKeySerializer.gen.ts @@ -0,0 +1,136 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * JSON-friendly union that mirrors what Pinia Colada can hash. + */ +export type JsonValue = + | null + | string + | number + | boolean + | JsonValue[] + | { [key: string]: JsonValue }; + +/** + * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes. + */ +export const queryKeyJsonReplacer = (_key: string, value: unknown) => { + if ( + value === undefined || + typeof value === 'function' || + typeof value === 'symbol' + ) { + return undefined; + } + if (typeof value === 'bigint') { + return value.toString(); + } + if (value instanceof Date) { + return value.toISOString(); + } + return value; +}; + +/** + * Safely stringifies a value and parses it back into a JsonValue. + */ +export const stringifyToJsonValue = (input: unknown): JsonValue | undefined => { + try { + const json = JSON.stringify(input, queryKeyJsonReplacer); + if (json === undefined) { + return undefined; + } + return JSON.parse(json) as JsonValue; + } catch { + return undefined; + } +}; + +/** + * Detects plain objects (including objects with a null prototype). + */ +const isPlainObject = (value: unknown): value is Record => { + if (value === null || typeof value !== 'object') { + return false; + } + const prototype = Object.getPrototypeOf(value as object); + return prototype === Object.prototype || prototype === null; +}; + +/** + * Turns URLSearchParams into a sorted JSON object for deterministic keys. + */ +const serializeSearchParams = (params: URLSearchParams): JsonValue => { + const entries = Array.from(params.entries()).sort(([a], [b]) => + a.localeCompare(b), + ); + const result: Record = {}; + + for (const [key, value] of entries) { + const existing = result[key]; + if (existing === undefined) { + result[key] = value; + continue; + } + + if (Array.isArray(existing)) { + (existing as string[]).push(value); + } else { + result[key] = [existing, value]; + } + } + + return result; +}; + +/** + * Normalizes any accepted value into a JSON-friendly shape for query keys. + */ +export const serializeQueryKeyValue = ( + value: unknown, +): JsonValue | undefined => { + if (value === null) { + return null; + } + + if ( + typeof value === 'string' || + typeof value === 'number' || + typeof value === 'boolean' + ) { + return value; + } + + if ( + value === undefined || + typeof value === 'function' || + typeof value === 'symbol' + ) { + return undefined; + } + + if (typeof value === 'bigint') { + return value.toString(); + } + + if (value instanceof Date) { + return value.toISOString(); + } + + if (Array.isArray(value)) { + return stringifyToJsonValue(value); + } + + if ( + typeof URLSearchParams !== 'undefined' && + value instanceof URLSearchParams + ) { + return serializeSearchParams(value); + } + + if (isPlainObject(value)) { + return stringifyToJsonValue(value); + } + + return undefined; +}; diff --git a/src/common/open-api/core/request.ts b/src/common/open-api/core/request.ts deleted file mode 100644 index 17d460c5..00000000 --- a/src/common/open-api/core/request.ts +++ /dev/null @@ -1,336 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import { ApiError } from "./ApiError"; -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { ApiResult } from "./ApiResult"; -import { CancelablePromise } from "./CancelablePromise"; -import type { OnCancel } from "./CancelablePromise"; -import type { OpenAPIConfig } from "./OpenAPI"; - -const isDefined = ( - value: T | null | undefined -): value is Exclude => { - return value !== undefined && value !== null; -}; - -const isString = (value: any): value is string => { - return typeof value === "string"; -}; - -const isStringWithValue = (value: any): value is string => { - return isString(value) && value !== ""; -}; - -const isBlob = (value: any): value is Blob => { - return ( - typeof value === "object" && - typeof value.type === "string" && - typeof value.stream === "function" && - typeof value.arrayBuffer === "function" && - typeof value.constructor === "function" && - typeof value.constructor.name === "string" && - /^(Blob|File)$/.test(value.constructor.name) && - /^(Blob|File)$/.test(value[Symbol.toStringTag]) - ); -}; - -const isFormData = (value: any): value is FormData => { - return value instanceof FormData; -}; - -const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString("base64"); - } -}; - -const getQueryString = (params: Record): string => { - const qs: string[] = []; - - const append = (key: string, value: any) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; - - const process = (key: string, value: any) => { - if (isDefined(value)) { - if (Array.isArray(value)) { - value.forEach((v) => { - process(key, v); - }); - } else if (typeof value === "object") { - Object.entries(value).forEach(([k, v]) => { - process(`${key}[${k}]`, v); - }); - } else { - append(key, value); - } - } - }; - - Object.entries(params).forEach(([key, value]) => { - process(key, value); - }); - - if (qs.length > 0) { - return `?${qs.join("&")}`; - } - - return ""; -}; - -const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace("{api-version}", config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = `${config.BASE}${path}`; - if (options.query) { - return `${url}${getQueryString(options.query)}`; - } - return url; -}; - -const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); - - const process = (key: string, value: any) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; - - Object.entries(options.formData) - .filter(([_, value]) => isDefined(value)) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach((v) => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; -}; - -type Resolver = (options: ApiRequestOptions) => Promise; - -const resolve = async ( - options: ApiRequestOptions, - resolver?: T | Resolver -): Promise => { - if (typeof resolver === "function") { - return (resolver as Resolver)(options); - } - return resolver; -}; - -const getHeaders = async ( - config: OpenAPIConfig, - options: ApiRequestOptions -): Promise => { - const token = await resolve(options, config.TOKEN); - const username = await resolve(options, config.USERNAME); - const password = await resolve(options, config.PASSWORD); - const additionalHeaders = await resolve(options, config.HEADERS); - - const headers = Object.entries({ - Accept: "application/json", - ...additionalHeaders, - ...options.headers, - }) - .filter(([_, value]) => isDefined(value)) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record - ); - - if (isStringWithValue(token)) { - headers["X-AUTHORIZATION"] = token; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers["Authorization"] = `Basic ${credentials}`; - } - - if (options.body) { - if (options.mediaType) { - headers["Content-Type"] = options.mediaType; - } else if (isBlob(options.body)) { - headers["Content-Type"] = "application/octet-stream"; - } else if (isString(options.body)) { - headers["Content-Type"] = "text/plain"; - } else if (!isFormData(options.body)) { - headers["Content-Type"] = "application/json"; - } - } - - return new Headers(headers); -}; - -const getRequestBody = (options: ApiRequestOptions): any => { - if (options.body) { - if (options.mediaType?.includes("/json")) { - return JSON.stringify(options.body); - } else if ( - isString(options.body) || - isBlob(options.body) || - isFormData(options.body) - ) { - return options.body as any; - } else { - return JSON.stringify(options.body); - } - } - return undefined; -}; - -export const sendRequest = async ( - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel -): Promise => { - const controller = new AbortController(); - - const request: RequestInit = { - headers, - method: options.method, - body: body ?? formData, - signal: controller.signal as AbortSignal, - }; - - onCancel(() => controller.abort()); - - return await fetch(url, request); -}; - -const getResponseHeader = ( - response: Response, - responseHeader?: string -): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } - } - return undefined; -}; - -const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get("Content-Type"); - if (contentType) { - const isJSON = contentType.toLowerCase().startsWith("application/json"); - if (isJSON) { - return await response.json(); - } else { - return await response.text(); - } - } - } catch (error) { - console.error(error); - } - } - return undefined; -}; - -const catchErrorCodes = ( - options: ApiRequestOptions, - result: ApiResult -): void => { - const errors: Record = { - 400: "Bad Request", - 401: "Unauthorized", - 403: "Forbidden", - 404: "Not Found", - 500: "Internal Server Error", - 502: "Bad Gateway", - 503: "Service Unavailable", - ...options.errors, - }; - - const error = errors[result.status]; - if (error) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - throw new ApiError(options, result, "Generic Error"); - } -}; - -/** - * Request method - * @param config The OpenAPI configuration object - * @param options The request options from the service - * @returns CancelablePromise - * @throws ApiError - */ -export const request = ( - config: OpenAPIConfig, - options: ApiRequestOptions -): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - const response = await sendRequest( - options, - url, - body, - formData, - headers, - onCancel - ); - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader( - response, - options.responseHeader - ); - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); - } - }); -}; diff --git a/src/common/open-api/core/serverSentEvents.gen.ts b/src/common/open-api/core/serverSentEvents.gen.ts new file mode 100644 index 00000000..f8fd78e2 --- /dev/null +++ b/src/common/open-api/core/serverSentEvents.gen.ts @@ -0,0 +1,264 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Config } from './types.gen'; + +export type ServerSentEventsOptions = Omit< + RequestInit, + 'method' +> & + Pick & { + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch; + /** + * Implementing clients can call request interceptors inside this hook. + */ + onRequest?: (url: string, init: RequestInit) => Promise; + /** + * Callback invoked when a network or parsing error occurs during streaming. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param error The error that occurred. + */ + onSseError?: (error: unknown) => void; + /** + * Callback invoked when an event is streamed from the server. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param event Event streamed from the server. + * @returns Nothing (void). + */ + onSseEvent?: (event: StreamEvent) => void; + serializedBody?: RequestInit['body']; + /** + * Default retry delay in milliseconds. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 3000 + */ + sseDefaultRetryDelay?: number; + /** + * Maximum number of retry attempts before giving up. + */ + sseMaxRetryAttempts?: number; + /** + * Maximum retry delay in milliseconds. + * + * Applies only when exponential backoff is used. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 30000 + */ + sseMaxRetryDelay?: number; + /** + * Optional sleep function for retry backoff. + * + * Defaults to using `setTimeout`. + */ + sseSleepFn?: (ms: number) => Promise; + url: string; + }; + +export interface StreamEvent { + data: TData; + event?: string; + id?: string; + retry?: number; +} + +export type ServerSentEventsResult< + TData = unknown, + TReturn = void, + TNext = unknown, +> = { + stream: AsyncGenerator< + TData extends Record ? TData[keyof TData] : TData, + TReturn, + TNext + >; +}; + +export const createSseClient = ({ + onRequest, + onSseError, + onSseEvent, + responseTransformer, + responseValidator, + sseDefaultRetryDelay, + sseMaxRetryAttempts, + sseMaxRetryDelay, + sseSleepFn, + url, + ...options +}: ServerSentEventsOptions): ServerSentEventsResult => { + let lastEventId: string | undefined; + + const sleep = + sseSleepFn ?? + ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms))); + + const createStream = async function* () { + let retryDelay: number = sseDefaultRetryDelay ?? 3000; + let attempt = 0; + const signal = options.signal ?? new AbortController().signal; + + while (true) { + if (signal.aborted) break; + + attempt++; + + const headers = + options.headers instanceof Headers + ? options.headers + : new Headers(options.headers as Record | undefined); + + if (lastEventId !== undefined) { + headers.set('Last-Event-ID', lastEventId); + } + + try { + const requestInit: RequestInit = { + redirect: 'follow', + ...options, + body: options.serializedBody, + headers, + signal, + }; + let request = new Request(url, requestInit); + if (onRequest) { + request = await onRequest(url, requestInit); + } + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = options.fetch ?? globalThis.fetch; + const response = await _fetch(request); + + if (!response.ok) + throw new Error( + `SSE failed: ${response.status} ${response.statusText}`, + ); + + if (!response.body) throw new Error('No body in SSE response'); + + const reader = response.body + .pipeThrough(new TextDecoderStream()) + .getReader(); + + let buffer = ''; + + const abortHandler = () => { + try { + reader.cancel(); + } catch { + // noop + } + }; + + signal.addEventListener('abort', abortHandler); + + try { + while (true) { + const { done, value } = await reader.read(); + if (done) break; + buffer += value; + + const chunks = buffer.split('\n\n'); + buffer = chunks.pop() ?? ''; + + for (const chunk of chunks) { + const lines = chunk.split('\n'); + const dataLines: Array = []; + let eventName: string | undefined; + + for (const line of lines) { + if (line.startsWith('data:')) { + dataLines.push(line.replace(/^data:\s*/, '')); + } else if (line.startsWith('event:')) { + eventName = line.replace(/^event:\s*/, ''); + } else if (line.startsWith('id:')) { + lastEventId = line.replace(/^id:\s*/, ''); + } else if (line.startsWith('retry:')) { + const parsed = Number.parseInt( + line.replace(/^retry:\s*/, ''), + 10, + ); + if (!Number.isNaN(parsed)) { + retryDelay = parsed; + } + } + } + + let data: unknown; + let parsedJson = false; + + if (dataLines.length) { + const rawData = dataLines.join('\n'); + try { + data = JSON.parse(rawData); + parsedJson = true; + } catch { + data = rawData; + } + } + + if (parsedJson) { + if (responseValidator) { + await responseValidator(data); + } + + if (responseTransformer) { + data = await responseTransformer(data); + } + } + + onSseEvent?.({ + data, + event: eventName, + id: lastEventId, + retry: retryDelay, + }); + + if (dataLines.length) { + yield data as any; + } + } + } + } finally { + signal.removeEventListener('abort', abortHandler); + reader.releaseLock(); + } + + break; // exit loop on normal completion + } catch (error) { + // connection failed or aborted; retry after delay + onSseError?.(error); + + if ( + sseMaxRetryAttempts !== undefined && + attempt >= sseMaxRetryAttempts + ) { + break; // stop after firing error + } + + // exponential backoff: double retry each attempt, cap at 30s + const backoff = Math.min( + retryDelay * 2 ** (attempt - 1), + sseMaxRetryDelay ?? 30000, + ); + await sleep(backoff); + } + } + }; + + const stream = createStream(); + + return { stream }; +}; diff --git a/src/common/open-api/core/types.gen.ts b/src/common/open-api/core/types.gen.ts new file mode 100644 index 00000000..643c070c --- /dev/null +++ b/src/common/open-api/core/types.gen.ts @@ -0,0 +1,118 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth, AuthToken } from './auth.gen'; +import type { + BodySerializer, + QuerySerializer, + QuerySerializerOptions, +} from './bodySerializer.gen'; + +export type HttpMethod = + | 'connect' + | 'delete' + | 'get' + | 'head' + | 'options' + | 'patch' + | 'post' + | 'put' + | 'trace'; + +export type Client< + RequestFn = never, + Config = unknown, + MethodFn = never, + BuildUrlFn = never, + SseFn = never, +> = { + /** + * Returns the final request URL. + */ + buildUrl: BuildUrlFn; + getConfig: () => Config; + request: RequestFn; + setConfig: (config: Config) => Config; +} & { + [K in HttpMethod]: MethodFn; +} & ([SseFn] extends [never] + ? { sse?: never } + : { sse: { [K in HttpMethod]: SseFn } }); + +export interface Config { + /** + * Auth token or a function returning auth token. The resolved value will be + * added to the request payload as defined by its `security` array. + */ + auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken; + /** + * A function for serializing request body parameter. By default, + * {@link JSON.stringify()} will be used. + */ + bodySerializer?: BodySerializer | null; + /** + * An object containing any HTTP headers that you want to pre-populate your + * `Headers` object with. + * + * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} + */ + headers?: + | RequestInit['headers'] + | Record< + string, + | string + | number + | boolean + | (string | number | boolean)[] + | null + | undefined + | unknown + >; + /** + * The request method. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} + */ + method?: Uppercase; + /** + * A function for serializing request query parameters. By default, arrays + * will be exploded in form style, objects will be exploded in deepObject + * style, and reserved characters are percent-encoded. + * + * This method will have no effect if the native `paramsSerializer()` Axios + * API function is used. + * + * {@link https://swagger.io/docs/specification/serialization/#query View examples} + */ + querySerializer?: QuerySerializer | QuerySerializerOptions; + /** + * A function validating request data. This is useful if you want to ensure + * the request conforms to the desired shape, so it can be safely sent to + * the server. + */ + requestValidator?: (data: unknown) => Promise; + /** + * A function transforming response data before it's returned. This is useful + * for post-processing data, e.g. converting ISO strings into Date objects. + */ + responseTransformer?: (data: unknown) => Promise; + /** + * A function validating response data. This is useful if you want to ensure + * the response conforms to the desired shape, so it can be safely passed to + * the transformers and returned to the user. + */ + responseValidator?: (data: unknown) => Promise; +} + +type IsExactlyNeverOrNeverUndefined = [T] extends [never] + ? true + : [T] extends [never | undefined] + ? [undefined] extends [T] + ? false + : true + : false; + +export type OmitNever> = { + [K in keyof T as IsExactlyNeverOrNeverUndefined extends true + ? never + : K]: T[K]; +}; diff --git a/src/common/open-api/core/utils.gen.ts b/src/common/open-api/core/utils.gen.ts new file mode 100644 index 00000000..0b5389d0 --- /dev/null +++ b/src/common/open-api/core/utils.gen.ts @@ -0,0 +1,143 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { BodySerializer, QuerySerializer } from './bodySerializer.gen'; +import { + type ArraySeparatorStyle, + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from './pathSerializer.gen'; + +export interface PathSerializer { + path: Record; + url: string; +} + +export const PATH_PARAM_RE = /\{[^{}]+\}/g; + +export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => { + let url = _url; + const matches = _url.match(PATH_PARAM_RE); + if (matches) { + for (const match of matches) { + let explode = false; + let name = match.substring(1, match.length - 1); + let style: ArraySeparatorStyle = 'simple'; + + if (name.endsWith('*')) { + explode = true; + name = name.substring(0, name.length - 1); + } + + if (name.startsWith('.')) { + name = name.substring(1); + style = 'label'; + } else if (name.startsWith(';')) { + name = name.substring(1); + style = 'matrix'; + } + + const value = path[name]; + + if (value === undefined || value === null) { + continue; + } + + if (Array.isArray(value)) { + url = url.replace( + match, + serializeArrayParam({ explode, name, style, value }), + ); + continue; + } + + if (typeof value === 'object') { + url = url.replace( + match, + serializeObjectParam({ + explode, + name, + style, + value: value as Record, + valueOnly: true, + }), + ); + continue; + } + + if (style === 'matrix') { + url = url.replace( + match, + `;${serializePrimitiveParam({ + name, + value: value as string, + })}`, + ); + continue; + } + + const replaceValue = encodeURIComponent( + style === 'label' ? `.${value as string}` : (value as string), + ); + url = url.replace(match, replaceValue); + } + } + return url; +}; + +export const getUrl = ({ + baseUrl, + path, + query, + querySerializer, + url: _url, +}: { + baseUrl?: string; + path?: Record; + query?: Record; + querySerializer: QuerySerializer; + url: string; +}) => { + const pathUrl = _url.startsWith('/') ? _url : `/${_url}`; + let url = (baseUrl ?? '') + pathUrl; + if (path) { + url = defaultPathSerializer({ path, url }); + } + let search = query ? querySerializer(query) : ''; + if (search.startsWith('?')) { + search = search.substring(1); + } + if (search) { + url += `?${search}`; + } + return url; +}; + +export function getValidRequestBody(options: { + body?: unknown; + bodySerializer?: BodySerializer | null; + serializedBody?: unknown; +}) { + const hasBody = options.body !== undefined; + const isSerializedBody = hasBody && options.bodySerializer; + + if (isSerializedBody) { + if ('serializedBody' in options) { + const hasSerializedBody = + options.serializedBody !== undefined && options.serializedBody !== ''; + + return hasSerializedBody ? options.serializedBody : null; + } + + // not all clients implement a serializedBody property (i.e. client-axios) + return options.body !== '' ? options.body : null; + } + + // plain/text body + if (hasBody) { + return options.body; + } + + // no body was provided + return undefined; +} diff --git a/src/common/open-api/index.ts b/src/common/open-api/index.ts index db538442..c352c104 100644 --- a/src/common/open-api/index.ts +++ b/src/common/open-api/index.ts @@ -1,74 +1,4 @@ +// This file is auto-generated by @hey-api/openapi-ts -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export { ConductorClient } from "./ConductorClient"; - -export { ApiError } from "./core/ApiError"; -export { BaseHttpRequest } from "./core/BaseHttpRequest"; -export { CancelablePromise, CancelError } from "./core/CancelablePromise"; -export { OpenAPI } from "./core/OpenAPI"; -export type { OpenAPIConfig } from "./core/OpenAPI"; -export type { ApiRequestOptions } from "./core/ApiRequestOptions"; -export type { ApiResult } from "./core/ApiResult"; - -export type { OnCancel } from "./core/CancelablePromise"; -export type { Action } from "./models/Action"; -export type { BulkResponse } from "./models/BulkResponse"; -export type { EventHandler } from "./models/EventHandler"; -export type { ExternalStorageLocation } from "./models/ExternalStorageLocation"; -export type { GenerateTokenRequest } from "./models/GenerateTokenRequest"; -export type { PollData } from "./models/PollData"; -export type { RerunWorkflowRequest } from "./models/RerunWorkflowRequest"; -export type { Response } from "./models/Response"; -export type { SaveScheduleRequest } from "./models/SaveScheduleRequest"; -export type { ScrollableSearchResultWorkflowSummary } from "./models/ScrollableSearchResultWorkflowSummary"; -export type { SearchResultTask } from "./models/SearchResultTask"; -export type { SearchResultTaskSummary } from "./models/SearchResultTaskSummary"; -export type { SearchResultWorkflow } from "./models/SearchResultWorkflow"; -export type { SearchResultWorkflowScheduleExecutionModel } from "./models/SearchResultWorkflowScheduleExecutionModel"; -export type { SearchResultWorkflowSummary } from "./models/SearchResultWorkflowSummary"; -export type { SkipTaskRequest } from "./models/SkipTaskRequest"; -export type { StartWorkflow } from "./models/StartWorkflow"; -export type { StartWorkflowRequest } from "./models/StartWorkflowRequest"; -export type { SubWorkflowParams } from "./models/SubWorkflowParams"; -export type { Task } from "./models/Task"; -export type { TaskDef } from "./models/TaskDef"; -export type { TaskDetails } from "./models/TaskDetails"; -export type { TaskExecLog } from "./models/TaskExecLog"; -export type { TaskResult } from "./models/TaskResult"; -export type { TaskSummary } from "./models/TaskSummary"; -export type { Workflow } from "./models/Workflow"; -export type { WorkflowDef } from "./models/WorkflowDef"; -export type { WorkflowRun } from "./models/WorkflowRun"; -export type { WorkflowSchedule } from "./models/WorkflowSchedule"; -export type { WorkflowScheduleExecutionModel } from "./models/WorkflowScheduleExecutionModel"; -export type { WorkflowStatus } from "./models/WorkflowStatus"; -export type { WorkflowSummary } from "./models/WorkflowSummary"; -export type { WorkflowTask } from "./models/WorkflowTask"; - -// HUMAN -export type { HTScrollableSearchResultHumanTaskEntry } from "./models/HTScrollableSearchResultHumanTaskEntry"; -export type { HumanTaskUser } from "./models/HumanTaskUser"; -export type { HumanTaskDefinition } from "./models/HumanTaskDefinition"; -export type { HumanTaskAssignment } from "./models/HumanTaskAssignment"; -export type { HumanTaskTrigger } from "./models/HumanTaskTrigger"; -export type { UserFormTemplate } from "./models/UserFormTemplate"; -export type { HumanTaskTemplate } from "./models/HumanTaskTemplate"; -export type { HumanTaskSearchResult } from "./models/HumanTaskSearchResult"; -export type { HumanTaskSearch } from "./models/HumanTaskSearch"; -export type { Terminate } from "./models/Terminate"; -export type { TimeoutPolicy } from "./models/TimeoutPolicy"; -export type { HumanTaskEntry } from "./models/HumanTaskEntry"; - -export { EventResourceService } from "./services/EventResourceService"; -export { HealthCheckResourceService } from "./services/HealthCheckResourceService"; -export { MetadataResourceService } from "./services/MetadataResourceService"; -export { SchedulerResourceService } from "./services/SchedulerResourceService"; -export { TaskResourceService } from "./services/TaskResourceService"; -export { TokenResourceService } from "./services/TokenResourceService"; -export { WorkflowBulkResourceService } from "./services/WorkflowBulkResourceService"; -export { WorkflowResourceService } from "./services/WorkflowResourceService"; -export { HumanTaskResourceService } from "./services/HumanTaskResourceService"; -export { HumanTaskService } from "./services/HumanTaskService"; +export type * from './types.gen'; +export * from './sdk.gen'; diff --git a/src/common/open-api/models/Action.ts b/src/common/open-api/models/Action.ts deleted file mode 100644 index 1d2d311f..00000000 --- a/src/common/open-api/models/Action.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { StartWorkflow } from './StartWorkflow'; -import type { TaskDetails } from './TaskDetails'; - -export type Action = { - action?: 'start_workflow' | 'complete_task' | 'fail_task'; - start_workflow?: StartWorkflow; - complete_task?: TaskDetails; - fail_task?: TaskDetails; - expandInlineJSON?: boolean; -}; - diff --git a/src/common/open-api/models/BulkResponse.ts b/src/common/open-api/models/BulkResponse.ts deleted file mode 100644 index 6e4e7ae3..00000000 --- a/src/common/open-api/models/BulkResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type BulkResponse = { - bulkErrorResults?: Record; - bulkSuccessfulResults?: Array; -}; - diff --git a/src/common/open-api/models/EventHandler.ts b/src/common/open-api/models/EventHandler.ts deleted file mode 100644 index 7c7e995f..00000000 --- a/src/common/open-api/models/EventHandler.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Action } from './Action'; -import type { Tag } from './Tag'; -export type EventHandler = { - actions?: Array; - active?: boolean; - condition?: string; - createdBy?: string; - description?: string; - evaluatorType?: string; - event?: string; - name?: string; - orgId?: string; - tags?: Array; -}; - diff --git a/src/common/open-api/models/ExternalStorageLocation.ts b/src/common/open-api/models/ExternalStorageLocation.ts deleted file mode 100644 index a614bbc0..00000000 --- a/src/common/open-api/models/ExternalStorageLocation.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ExternalStorageLocation = { - uri?: string; - path?: string; -}; - diff --git a/src/common/open-api/models/GenerateTokenRequest.ts b/src/common/open-api/models/GenerateTokenRequest.ts deleted file mode 100644 index 2dc6365a..00000000 --- a/src/common/open-api/models/GenerateTokenRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type GenerateTokenRequest = { - expiration?: number; - keyId: string; - keySecret: string; -}; - diff --git a/src/common/open-api/models/HTScrollableSearchResultHumanTaskEntry.ts b/src/common/open-api/models/HTScrollableSearchResultHumanTaskEntry.ts deleted file mode 100644 index fc4e4b2b..00000000 --- a/src/common/open-api/models/HTScrollableSearchResultHumanTaskEntry.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { HumanTaskEntry } from './HumanTaskEntry'; - -export type HTScrollableSearchResultHumanTaskEntry = { - queryId?: string; - results?: Array; -}; - diff --git a/src/common/open-api/models/HumanTaskAssignment.ts b/src/common/open-api/models/HumanTaskAssignment.ts deleted file mode 100644 index 31052275..00000000 --- a/src/common/open-api/models/HumanTaskAssignment.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { HumanTaskUser } from './HumanTaskUser'; - -export type HumanTaskAssignment = { - assignee?: HumanTaskUser; - slaMinutes?: number; -}; - diff --git a/src/common/open-api/models/HumanTaskDefinition.ts b/src/common/open-api/models/HumanTaskDefinition.ts deleted file mode 100644 index 3a3316e8..00000000 --- a/src/common/open-api/models/HumanTaskDefinition.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { HumanTaskAssignment } from './HumanTaskAssignment'; -import type { HumanTaskTrigger } from './HumanTaskTrigger'; -import type { UserFormTemplate } from './UserFormTemplate'; - -export type HumanTaskDefinition = { - assignmentCompletionStrategy?: 'LEAVE_OPEN' | 'TERMINATE'; - assignments?: Array; - taskTriggers?: Array; - userFormTemplate?: UserFormTemplate; -}; - diff --git a/src/common/open-api/models/HumanTaskEntry.ts b/src/common/open-api/models/HumanTaskEntry.ts deleted file mode 100644 index d9bf71a6..00000000 --- a/src/common/open-api/models/HumanTaskEntry.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { HumanTaskDefinition } from './HumanTaskDefinition'; -import type { HumanTaskUser } from './HumanTaskUser'; - -export type HumanTaskEntry = { - assignee?: HumanTaskUser; - claimant?: HumanTaskUser; - createdBy?: string; - createdOn?: number; - definitionName?: string; - displayName?: string; - humanTaskDef?: HumanTaskDefinition; - input?: Record; - output?: Record; - state?: 'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT' | 'DELETED'; - taskId?: string; - taskRefName?: string; - updatedBy?: string; - updatedOn?: number; - workflowId?: string; - workflowName?: string; -}; - diff --git a/src/common/open-api/models/HumanTaskSearch.ts b/src/common/open-api/models/HumanTaskSearch.ts deleted file mode 100644 index 80405a09..00000000 --- a/src/common/open-api/models/HumanTaskSearch.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { HumanTaskUser } from './HumanTaskUser'; - -export type HumanTaskSearch = { - assignees?: Array; - claimants?: Array; - definitionNames?: Array; - taskOutputQuery?: string; - taskInputQuery?: string; - searchType?: 'ADMIN' | 'INBOX'; - size?: number; - start?: number; - states?: Array<'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT' | 'DELETED'>; - taskRefNames?: Array; - workflowNames?: Array; -}; - diff --git a/src/common/open-api/models/HumanTaskSearchResult.ts b/src/common/open-api/models/HumanTaskSearchResult.ts deleted file mode 100644 index a2ebba35..00000000 --- a/src/common/open-api/models/HumanTaskSearchResult.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { HumanTaskEntry } from './HumanTaskEntry'; - -export type HumanTaskSearchResult = { - results?: Array; - totalHits?: number; -}; - diff --git a/src/common/open-api/models/HumanTaskTemplate.ts b/src/common/open-api/models/HumanTaskTemplate.ts deleted file mode 100644 index 07788d40..00000000 --- a/src/common/open-api/models/HumanTaskTemplate.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type HumanTaskTemplate = { - createdBy?: string; - createdOn?: number; - jsonSchema: Record; - name: string; - templateUI: Record; - updatedBy?: string; - updatedOn?: number; - version: number; -}; - diff --git a/src/common/open-api/models/HumanTaskTrigger.ts b/src/common/open-api/models/HumanTaskTrigger.ts deleted file mode 100644 index 86509266..00000000 --- a/src/common/open-api/models/HumanTaskTrigger.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { StartWorkflowRequest } from './StartWorkflowRequest'; - -export type HumanTaskTrigger = { - startWorkflowRequest?: StartWorkflowRequest; - triggerType?: 'ASSIGNEE_CHANGED' | 'PENDING' | 'IN_PROGRESS' | 'ASSIGNED' | 'COMPLETED' | 'TIMED_OUT'; -}; - diff --git a/src/common/open-api/models/HumanTaskUser.ts b/src/common/open-api/models/HumanTaskUser.ts deleted file mode 100644 index 8d71673b..00000000 --- a/src/common/open-api/models/HumanTaskUser.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type HumanTaskUser = { - user?: string; - userType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP'; -}; - diff --git a/src/common/open-api/models/PollData.ts b/src/common/open-api/models/PollData.ts deleted file mode 100644 index 505f4b47..00000000 --- a/src/common/open-api/models/PollData.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type PollData = { - queueName?: string; - domain?: string; - workerId?: string; - lastPollTime?: number; -}; - diff --git a/src/common/open-api/models/RerunWorkflowRequest.ts b/src/common/open-api/models/RerunWorkflowRequest.ts deleted file mode 100644 index 815fe69a..00000000 --- a/src/common/open-api/models/RerunWorkflowRequest.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type RerunWorkflowRequest = { - reRunFromWorkflowId?: string; - workflowInput?: Record; - reRunFromTaskId?: string; - taskInput?: Record; - correlationId?: string; -}; - diff --git a/src/common/open-api/models/Response.ts b/src/common/open-api/models/Response.ts deleted file mode 100644 index aed13fdd..00000000 --- a/src/common/open-api/models/Response.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Response = Record; diff --git a/src/common/open-api/models/SaveScheduleRequest.ts b/src/common/open-api/models/SaveScheduleRequest.ts deleted file mode 100644 index 63e52077..00000000 --- a/src/common/open-api/models/SaveScheduleRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { StartWorkflowRequest } from './StartWorkflowRequest'; - -export type SaveScheduleRequest = { - name: string; - cronExpression: string; - runCatchupScheduleInstances?: boolean; - paused?: boolean; - startWorkflowRequest?: StartWorkflowRequest; - createdBy?: string; - updatedBy?: string; - scheduleStartTime?: number; - scheduleEndTime?: number; -}; - diff --git a/src/common/open-api/models/ScrollableSearchResultWorkflowSummary.ts b/src/common/open-api/models/ScrollableSearchResultWorkflowSummary.ts deleted file mode 100644 index ab167a1b..00000000 --- a/src/common/open-api/models/ScrollableSearchResultWorkflowSummary.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { WorkflowSummary } from './WorkflowSummary'; - -export type ScrollableSearchResultWorkflowSummary = { - results?: Array; - totalHits?: number; -}; - diff --git a/src/common/open-api/models/SearchResultTask.ts b/src/common/open-api/models/SearchResultTask.ts deleted file mode 100644 index 025db993..00000000 --- a/src/common/open-api/models/SearchResultTask.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { Task } from './Task'; - -export type SearchResultTask = { - totalHits?: number; - results?: Array; -}; - diff --git a/src/common/open-api/models/SearchResultTaskSummary.ts b/src/common/open-api/models/SearchResultTaskSummary.ts deleted file mode 100644 index 53cff015..00000000 --- a/src/common/open-api/models/SearchResultTaskSummary.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { TaskSummary } from './TaskSummary'; - -export type SearchResultTaskSummary = { - totalHits?: number; - results?: Array; -}; - diff --git a/src/common/open-api/models/SearchResultWorkflow.ts b/src/common/open-api/models/SearchResultWorkflow.ts deleted file mode 100644 index 7368125f..00000000 --- a/src/common/open-api/models/SearchResultWorkflow.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { Workflow } from './Workflow'; - -export type SearchResultWorkflow = { - totalHits?: number; - results?: Array; -}; - diff --git a/src/common/open-api/models/SearchResultWorkflowScheduleExecutionModel.ts b/src/common/open-api/models/SearchResultWorkflowScheduleExecutionModel.ts deleted file mode 100644 index 758f5c0f..00000000 --- a/src/common/open-api/models/SearchResultWorkflowScheduleExecutionModel.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { WorkflowScheduleExecutionModel } from './WorkflowScheduleExecutionModel'; - -export type SearchResultWorkflowScheduleExecutionModel = { - totalHits?: number; - results?: Array; -}; - diff --git a/src/common/open-api/models/SearchResultWorkflowSummary.ts b/src/common/open-api/models/SearchResultWorkflowSummary.ts deleted file mode 100644 index cdc270a2..00000000 --- a/src/common/open-api/models/SearchResultWorkflowSummary.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { WorkflowSummary } from './WorkflowSummary'; - -export type SearchResultWorkflowSummary = { - totalHits?: number; - results?: Array; -}; - diff --git a/src/common/open-api/models/ServiceRegistryModels.ts b/src/common/open-api/models/ServiceRegistryModels.ts deleted file mode 100644 index d0abbbc8..00000000 --- a/src/common/open-api/models/ServiceRegistryModels.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -// Service Registry Type enum -export enum ServiceType { - HTTP = 'HTTP', - gRPC = 'gRPC' -} - -// Request Parameter Schema interface -export interface RequestParamSchema { - type: string; - format?: string; - defaultValue?: any; -} - -// Request Parameter interface -export interface RequestParam { - name: string; - type: string; // Query, Header, Path, etc. - required: boolean; - schema?: RequestParamSchema; -} - -// Service Method interface -export interface ServiceMethod { - id?: number; - operationName: string; - methodName: string; - methodType: string; // GET, PUT, POST, UNARY, SERVER_STREAMING etc. - inputType: string; - outputType: string; - requestParams?: RequestParam[]; - exampleInput?: Record; // Sample input request -} - -// Circuit Breaker Configuration interface -export interface OrkesCircuitBreakerConfig { - failureRateThreshold?: number; // Percentage (e.g., 50.0 for 50%) - slidingWindowSize?: number; - minimumNumberOfCalls?: number; - waitDurationInOpenState?: number; // In millisec - permittedNumberOfCallsInHalfOpenState?: number; - slowCallRateThreshold?: number; // Percentage of slow calls - slowCallDurationThreshold?: number; // Defines "slow" call duration in milliSec - automaticTransitionFromOpenToHalfOpenEnabled?: boolean; // Auto transition - maxWaitDurationInHalfOpenState?: number; // Max time in HALF-OPEN state -} - -// Service Registry Configuration interface -export interface ServiceRegistryConfig { - circuitBreakerConfig?: OrkesCircuitBreakerConfig; -} - -// Service Registry interface -export interface ServiceRegistry { - name: string; - type: ServiceType; - serviceURI: string; - methods?: ServiceMethod[]; - requestParams?: RequestParam[]; - config?: ServiceRegistryConfig; -} - -// Circuit Breaker Transition Response interface -export interface CircuitBreakerTransitionResponse { - service: string; - previousState: string; - currentState: string; - transitionTimestamp: number; - message: string; -} - -// Proto Registry Entry interface -export interface ProtoRegistryEntry { - filename: string; - lastUpdated: number; -} \ No newline at end of file diff --git a/src/common/open-api/models/SignalResponse.ts b/src/common/open-api/models/SignalResponse.ts deleted file mode 100644 index 849b7b0c..00000000 --- a/src/common/open-api/models/SignalResponse.ts +++ /dev/null @@ -1,283 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { Task } from './Task'; -import type { Workflow } from './Workflow'; - -/** - * SignalResponse represents a unified response from the signal API - */ -export class SignalResponse { - // ========== COMMON FIELDS IN ALL RESPONSES ========== - - /** Type of response based on return strategy */ - responseType?: string; - - /** ID of the target workflow */ - targetWorkflowId?: string; - - /** Status of the target workflow */ - targetWorkflowStatus?: string; - - /** ID of the workflow */ - workflowId?: string; - - /** Input data for the workflow/task */ - input?: Record; - - /** Output data from the workflow/task */ - output?: Record; - - /** Priority of the workflow */ - priority?: number; - - /** Workflow variables */ - variables?: Record; - - // ========== FIELDS SPECIFIC TO TARGET_WORKFLOW & BLOCKING_WORKFLOW ========== - - /** Array of tasks in the workflow */ - tasks?: Array; - - /** User who created the workflow */ - createdBy?: string; - - /** Timestamp when workflow was created */ - createTime?: number; - - /** Current status of the workflow */ - status?: string; - - /** Timestamp when workflow was last updated */ - updateTime?: number; - - // ========== FIELDS SPECIFIC TO BLOCKING_TASK & BLOCKING_TASK_INPUT ========== - - /** Type of the blocking task */ - taskType?: string; - - /** ID of the blocking task */ - taskId?: string; - - /** Reference name of the blocking task */ - referenceTaskName?: string; - - /** Number of retries for the task */ - retryCount?: number; - - /** Definition name of the task */ - taskDefName?: string; - - /** Type of the workflow containing the task */ - workflowType?: string; - - // ========== CHECK METHODS ========== - - /** - * Returns true if the response contains target workflow details - */ - isTargetWorkflow(): boolean { - return this.responseType === 'TARGET_WORKFLOW'; - } - - /** - * Returns true if the response contains blocking workflow details - */ - isBlockingWorkflow(): boolean { - return this.responseType === 'BLOCKING_WORKFLOW'; - } - - /** - * Returns true if the response contains blocking task details - */ - isBlockingTask(): boolean { - return this.responseType === 'BLOCKING_TASK'; - } - - /** - * Returns true if the response contains blocking task input - */ - isBlockingTaskInput(): boolean { - return this.responseType === 'BLOCKING_TASK_INPUT'; - } - - // ========== EXTRACTION METHODS ========== - - /** - * Extracts workflow details from a SignalResponse - * @throws Error if the response type doesn't contain workflow details - */ - getWorkflow(): Workflow { - if (!this.isTargetWorkflow() && !this.isBlockingWorkflow()) { - throw new Error( - `Response type ${this.responseType} does not contain workflow details` - ); - } - - return { - workflowId: this.workflowId!, - status: this.status!, - tasks: this.tasks || [], - createdBy: this.createdBy, - createTime: this.createTime, - updateTime: this.updateTime, - input: this.input || {}, - output: this.output || {}, - variables: this.variables || {}, - priority: this.priority - } as Workflow; - } - - /** - * Extracts task details from a SignalResponse - * @throws Error if the response type doesn't contain task details - */ - getBlockingTask(): Task { - if (!this.isBlockingTask() && !this.isBlockingTaskInput()) { - throw new Error( - `Response type ${this.responseType} does not contain task details` - ); - } - - return { - taskId: this.taskId!, - taskType: this.taskType!, - taskDefName: this.taskDefName!, - referenceTaskName: this.referenceTaskName!, - retryCount: this.retryCount || 0, - status: this.status, - inputData: this.input || {}, - outputData: this.output || {}, - workflowInstanceId: this.workflowId!, - workflowType: this.workflowType! - } as Task; - } - - /** - * Extracts task input from a SignalResponse - * Only valid for BLOCKING_TASK_INPUT responses - * @throws Error if the response type doesn't contain task input details - */ - getTaskInput(): Record { - if (!this.isBlockingTaskInput()) { - throw new Error( - `Response type ${this.responseType} does not contain task input details` - ); - } - - return this.input || {}; - } - - // ========== UTILITY METHODS ========== - - /** - * Get the workflow ID from the response - */ - getWorkflowId(): string { - return this.workflowId || this.targetWorkflowId || ''; - } - - /** - * Get the target workflow ID from the response - */ - getTargetWorkflowId(): string { - return this.targetWorkflowId || this.workflowId || ''; - } - - /** - * Check if the response has workflow data - */ - hasWorkflowData(): boolean { - return this.isTargetWorkflow() || this.isBlockingWorkflow(); - } - - /** - * Check if the response has task data - */ - hasTaskData(): boolean { - return this.isBlockingTask() || this.isBlockingTaskInput(); - } - - /** - * Get response type as string - */ - getResponseType(): string { - return this.responseType || ''; - } - - /** - * Check if the workflow/task is in a terminal state - */ - isTerminal(): boolean { - const terminalStates = ['COMPLETED', 'FAILED', 'TERMINATED', 'TIMED_OUT']; - return terminalStates.includes(this.status || ''); - } - - /** - * Check if the workflow/task is currently running - */ - isRunning(): boolean { - return this.status === 'RUNNING'; - } - - /** - * Check if the workflow/task is paused - */ - isPaused(): boolean { - return this.status === 'PAUSED'; - } - - /** - * Get a summary of the response for logging - */ - getSummary(): string { - const parts = [ - `type=${this.responseType}`, - `workflowId=${this.workflowId}`, - `status=${this.status}` - ]; - - if (this.hasTaskData()) { - parts.push(`taskId=${this.taskId}`); - parts.push(`taskType=${this.taskType}`); - } - - if (this.hasWorkflowData() && this.tasks) { - parts.push(`tasksCount=${this.tasks.length}`); - } - - return `SignalResponse{${parts.join(', ')}}`; - } - - /** - * Convert to JSON for debugging (excludes large objects) - */ - toDebugJSON(): Record { - return { - responseType: this.responseType, - workflowId: this.workflowId, - targetWorkflowId: this.targetWorkflowId, - targetWorkflowStatus: this.targetWorkflowStatus, - status: this.status, - taskId: this.taskId, - taskType: this.taskType, - referenceTaskName: this.referenceTaskName, - createTime: this.createTime, - updateTime: this.updateTime, - priority: this.priority, - retryCount: this.retryCount, - tasksCount: this.tasks?.length, - hasInput: Boolean(this.input && Object.keys(this.input).length > 0), - hasOutput: Boolean(this.output && Object.keys(this.output).length > 0), - hasVariables: Boolean(this.variables && Object.keys(this.variables).length > 0) - }; - } - - /** - * String representation for debugging - */ - toString(): string { - return this.getSummary(); - } -} \ No newline at end of file diff --git a/src/common/open-api/models/SkipTaskRequest.ts b/src/common/open-api/models/SkipTaskRequest.ts deleted file mode 100644 index 86d5c871..00000000 --- a/src/common/open-api/models/SkipTaskRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type SkipTaskRequest = { - taskInput?: Record; - taskOutput?: Record; -}; - diff --git a/src/common/open-api/models/StartWorkflow.ts b/src/common/open-api/models/StartWorkflow.ts deleted file mode 100644 index b9424a8c..00000000 --- a/src/common/open-api/models/StartWorkflow.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type StartWorkflow = { - name?: string; - version?: number; - correlationId?: string; - input?: Record; - taskToDomain?: Record; -}; - diff --git a/src/common/open-api/models/StartWorkflowRequest.ts b/src/common/open-api/models/StartWorkflowRequest.ts deleted file mode 100644 index 631c55fd..00000000 --- a/src/common/open-api/models/StartWorkflowRequest.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { WorkflowDef } from './WorkflowDef'; - -export type StartWorkflowRequest = { - name: string; - version?: number; - correlationId?: string; - input?: Record; - taskToDomain?: Record; - workflowDef?: WorkflowDef; - externalInputPayloadStoragePath?: string; - idempotencyKey?: string; - idempotencyStrategy?: 'FAIL' | 'RETURN_EXISTING'; - priority?: number; - createdBy?: string; -}; - diff --git a/src/common/open-api/models/SubWorkflowParams.ts b/src/common/open-api/models/SubWorkflowParams.ts deleted file mode 100644 index 124312d7..00000000 --- a/src/common/open-api/models/SubWorkflowParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { WorkflowDef } from './WorkflowDef'; - -export type SubWorkflowParams = { - name: string; - version?: number; - taskToDomain?: Record; - workflowDefinition?: WorkflowDef; - idempotencyKey?: string; - idempotencyStrategy?: 'FAIL' | 'RETURN_EXISTING'; -}; - diff --git a/src/common/open-api/models/Tag.ts b/src/common/open-api/models/Tag.ts deleted file mode 100644 index bd2b65f4..00000000 --- a/src/common/open-api/models/Tag.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Tag = { - key?: string; - /** - * @deprecated - */ - type?: string; - value?: string; -}; diff --git a/src/common/open-api/models/Task.ts b/src/common/open-api/models/Task.ts deleted file mode 100644 index cc37c39f..00000000 --- a/src/common/open-api/models/Task.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { TaskDef } from './TaskDef'; -import type { WorkflowTask } from './WorkflowTask'; - -export type Task = { - taskType?: string; - status?: 'IN_PROGRESS' | 'CANCELED' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'SCHEDULED' | 'TIMED_OUT' | 'SKIPPED'; - inputData?: Record; - referenceTaskName?: string; - retryCount?: number; - seq?: number; - correlationId?: string; - pollCount?: number; - taskDefName?: string; - scheduledTime?: number; - startTime?: number; - endTime?: number; - updateTime?: number; - startDelayInSeconds?: number; - retriedTaskId?: string; - retried?: boolean; - executed?: boolean; - callbackFromWorker?: boolean; - responseTimeoutSeconds?: number; - workflowInstanceId?: string; - workflowType?: string; - taskId?: string; - reasonForIncompletion?: string; - callbackAfterSeconds?: number; - workerId?: string; - outputData?: Record; - workflowTask?: WorkflowTask; - domain?: string; - rateLimitPerFrequency?: number; - rateLimitFrequencyInSeconds?: number; - externalInputPayloadStoragePath?: string; - externalOutputPayloadStoragePath?: string; - workflowPriority?: number; - executionNameSpace?: string; - isolationGroupId?: string; - iteration?: number; - subWorkflowId?: string; - subworkflowChanged?: boolean; - queueWaitTime?: number; - taskDefinition?: TaskDef; - loopOverTask?: boolean; -}; - diff --git a/src/common/open-api/models/TaskDef.ts b/src/common/open-api/models/TaskDef.ts deleted file mode 100644 index 4b9d1a90..00000000 --- a/src/common/open-api/models/TaskDef.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TaskDef = { - ownerApp?: string; - createTime?: number; - updateTime?: number; - createdBy?: string; - updatedBy?: string; - name: string; - description?: string; - retryCount?: number; - timeoutSeconds: number; - inputKeys?: Array; - outputKeys?: Array; - timeoutPolicy?: 'RETRY' | 'TIME_OUT_WF' | 'ALERT_ONLY'; - retryLogic?: 'FIXED' | 'EXPONENTIAL_BACKOFF' | 'LINEAR_BACKOFF'; - retryDelaySeconds?: number; - responseTimeoutSeconds?: number; - concurrentExecLimit?: number; - inputTemplate?: Record; - rateLimitPerFrequency?: number; - rateLimitFrequencyInSeconds?: number; - isolationGroupId?: string; - executionNameSpace?: string; - ownerEmail?: string; - pollTimeoutSeconds?: number; - backoffScaleFactor?: number; -}; - diff --git a/src/common/open-api/models/TaskDetails.ts b/src/common/open-api/models/TaskDetails.ts deleted file mode 100644 index e40a7022..00000000 --- a/src/common/open-api/models/TaskDetails.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TaskDetails = { - workflowId?: string; - taskRefName?: string; - output?: Record; - taskId?: string; -}; - diff --git a/src/common/open-api/models/TaskExecLog.ts b/src/common/open-api/models/TaskExecLog.ts deleted file mode 100644 index 00fea424..00000000 --- a/src/common/open-api/models/TaskExecLog.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TaskExecLog = { - log?: string; - taskId?: string; - createdTime?: number; -}; - diff --git a/src/common/open-api/models/TaskMock.ts b/src/common/open-api/models/TaskMock.ts deleted file mode 100644 index 4e4c1fe5..00000000 --- a/src/common/open-api/models/TaskMock.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type TaskMock = { - executionTime?: number; - output: Record; - queueWaitTime?: number; - status: - | "IN_PROGRESS" - | "FAILED" - | "FAILED_WITH_TERMINAL_ERROR" - | "COMPLETED"; -}; diff --git a/src/common/open-api/models/TaskResult.ts b/src/common/open-api/models/TaskResult.ts deleted file mode 100644 index 1bfa16c2..00000000 --- a/src/common/open-api/models/TaskResult.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { TaskExecLog } from './TaskExecLog'; - -export type TaskResult = { - workflowInstanceId: string; - taskId: string; - reasonForIncompletion?: string; - callbackAfterSeconds?: number; - workerId?: string; - status?: 'IN_PROGRESS' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED'; - outputData?: Record; - logs?: Array; - externalOutputPayloadStoragePath?: string; - subWorkflowId?: string; -}; - diff --git a/src/common/open-api/models/TaskResultStatusEnum.ts b/src/common/open-api/models/TaskResultStatusEnum.ts deleted file mode 100644 index 56e6b0b4..00000000 --- a/src/common/open-api/models/TaskResultStatusEnum.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export enum TaskResultStatusEnum { - IN_PROGRESS = 'IN_PROGRESS', - FAILED = 'FAILED', - FAILED_WITH_TERMINAL_ERROR = 'FAILED_WITH_TERMINAL_ERROR', - COMPLETED = 'COMPLETED' -} \ No newline at end of file diff --git a/src/common/open-api/models/TaskSummary.ts b/src/common/open-api/models/TaskSummary.ts deleted file mode 100644 index 59489907..00000000 --- a/src/common/open-api/models/TaskSummary.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TaskSummary = { - workflowId?: string; - workflowType?: string; - correlationId?: string; - scheduledTime?: string; - startTime?: string; - updateTime?: string; - endTime?: string; - status?: 'IN_PROGRESS' | 'CANCELED' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED' | 'COMPLETED_WITH_ERRORS' | 'SCHEDULED' | 'TIMED_OUT' | 'SKIPPED'; - reasonForIncompletion?: string; - executionTime?: number; - queueWaitTime?: number; - taskDefName?: string; - taskType?: string; - input?: string; - output?: string; - taskId?: string; - externalInputPayloadStoragePath?: string; - externalOutputPayloadStoragePath?: string; - workflowPriority?: number; -}; - diff --git a/src/common/open-api/models/Terminate.ts b/src/common/open-api/models/Terminate.ts deleted file mode 100644 index 8a9813b8..00000000 --- a/src/common/open-api/models/Terminate.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { TimeoutPolicy } from './TimeoutPolicy'; - -export type Terminate = (TimeoutPolicy & { - timeoutSeconds?: number; -}); - diff --git a/src/common/open-api/models/TimeoutPolicy.ts b/src/common/open-api/models/TimeoutPolicy.ts deleted file mode 100644 index 6fb36206..00000000 --- a/src/common/open-api/models/TimeoutPolicy.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TimeoutPolicy = { - type: string; -}; - diff --git a/src/common/open-api/models/UserFormTemplate.ts b/src/common/open-api/models/UserFormTemplate.ts deleted file mode 100644 index a8bb419c..00000000 --- a/src/common/open-api/models/UserFormTemplate.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type UserFormTemplate = { - name?: string; - version?: number; -}; - diff --git a/src/common/open-api/models/Workflow.ts b/src/common/open-api/models/Workflow.ts deleted file mode 100644 index fd336a9e..00000000 --- a/src/common/open-api/models/Workflow.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { Task } from './Task'; -import type { WorkflowDef } from './WorkflowDef'; - -export type Workflow = { - ownerApp?: string; - createTime?: number; - updateTime?: number; - createdBy?: string; - updatedBy?: string; - status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'TERMINATED' | 'PAUSED'; - idempotencyKey?: string; - endTime?: number; - workflowId?: string; - parentWorkflowId?: string; - parentWorkflowTaskId?: string; - tasks?: Array; - input?: Record; - output?: Record; - correlationId?: string; - reRunFromWorkflowId?: string; - reasonForIncompletion?: string; - event?: string; - taskToDomain?: Record; - failedReferenceTaskNames?: Array; - workflowDefinition?: WorkflowDef; - externalInputPayloadStoragePath?: string; - externalOutputPayloadStoragePath?: string; - priority?: number; - variables?: Record; - lastRetriedTime?: number; - startTime?: number; - workflowVersion?: number; - workflowName?: string; -}; - diff --git a/src/common/open-api/models/WorkflowDef.ts b/src/common/open-api/models/WorkflowDef.ts deleted file mode 100644 index bf9de2e7..00000000 --- a/src/common/open-api/models/WorkflowDef.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { WorkflowTask } from './WorkflowTask'; - -export type WorkflowDef = { - ownerApp?: string; - createTime?: number; - updateTime?: number; - createdBy?: string; - updatedBy?: string; - name: string; - description?: string; - version?: number; - tasks: Array; - inputParameters?: Array; - outputParameters?: Record; - failureWorkflow?: string; - schemaVersion?: number; - restartable?: boolean; - workflowStatusListenerEnabled?: boolean; - ownerEmail?: string; - timeoutPolicy?: 'TIME_OUT_WF' | 'ALERT_ONLY'; - timeoutSeconds: number; - variables?: Record; - inputTemplate?: Record; -}; - diff --git a/src/common/open-api/models/WorkflowRun.ts b/src/common/open-api/models/WorkflowRun.ts deleted file mode 100644 index d6de1749..00000000 --- a/src/common/open-api/models/WorkflowRun.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import { Task } from './Task'; - -export type WorkflowRun = { - correlationId?: string; - createTime?: number; - createdBy?: string; - priority?: number; - requestId?: string; - status?: string; - tasks?: Array; - updateTime?: number; - workflowId?: string; - variables?: Record; - input?: Record; - output?: Record; -} \ No newline at end of file diff --git a/src/common/open-api/models/WorkflowSchedule.ts b/src/common/open-api/models/WorkflowSchedule.ts deleted file mode 100644 index 72d978b5..00000000 --- a/src/common/open-api/models/WorkflowSchedule.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { StartWorkflowRequest } from './StartWorkflowRequest'; - -export type WorkflowSchedule = { - name?: string; - cronExpression?: string; - runCatchupScheduleInstances?: boolean; - paused?: boolean; - startWorkflowRequest?: StartWorkflowRequest; - scheduleStartTime?: number; - scheduleEndTime?: number; - createTime?: number; - updatedTime?: number; - createdBy?: string; - updatedBy?: string; -}; - diff --git a/src/common/open-api/models/WorkflowScheduleExecutionModel.ts b/src/common/open-api/models/WorkflowScheduleExecutionModel.ts deleted file mode 100644 index 5d4a0ccf..00000000 --- a/src/common/open-api/models/WorkflowScheduleExecutionModel.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { StartWorkflowRequest } from './StartWorkflowRequest'; - -export type WorkflowScheduleExecutionModel = { - executionId?: string; - scheduleName?: string; - scheduledTime?: number; - executionTime?: number; - workflowName?: string; - workflowId?: string; - reason?: string; - stackTrace?: string; - startWorkflowRequest?: StartWorkflowRequest; - state?: 'POLLED' | 'FAILED' | 'EXECUTED'; -}; - diff --git a/src/common/open-api/models/WorkflowStatus.ts b/src/common/open-api/models/WorkflowStatus.ts deleted file mode 100644 index 18d44cd8..00000000 --- a/src/common/open-api/models/WorkflowStatus.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type WorkflowStatus = { - workflowId?: string; - correlationId?: string; - output?: Record; - variables?: Record; - status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'TERMINATED' | 'PAUSED'; -}; - diff --git a/src/common/open-api/models/WorkflowSummary.ts b/src/common/open-api/models/WorkflowSummary.ts deleted file mode 100644 index 18bca060..00000000 --- a/src/common/open-api/models/WorkflowSummary.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type WorkflowSummary = { - workflowType?: string; - version?: number; - workflowId?: string; - correlationId?: string; - startTime?: string; - updateTime?: string; - endTime?: string; - status?: 'RUNNING' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'TERMINATED' | 'PAUSED'; - input?: string; - output?: string; - reasonForIncompletion?: string; - executionTime?: number; - event?: string; - failedReferenceTaskNames?: string; - externalInputPayloadStoragePath?: string; - externalOutputPayloadStoragePath?: string; - priority?: number; - createdBy?: string; - outputSize?: number; - inputSize?: number; -}; - diff --git a/src/common/open-api/models/WorkflowTask.ts b/src/common/open-api/models/WorkflowTask.ts deleted file mode 100644 index 6d26980a..00000000 --- a/src/common/open-api/models/WorkflowTask.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { SubWorkflowParams } from './SubWorkflowParams'; -import type { TaskDef } from './TaskDef'; - -export type WorkflowTask = { - name: string; - taskReferenceName: string; - description?: string; - inputParameters?: Record; - type?: string; - dynamicTaskNameParam?: string; - /** - * @deprecated - */ - caseValueParam?: string; - /** - * @deprecated - */ - caseExpression?: string; - scriptExpression?: string; - decisionCases?: Record>; - /** - * @deprecated - */ - dynamicForkJoinTasksParam?: string; - dynamicForkTasksParam?: string; - dynamicForkTasksInputParamName?: string; - defaultCase?: Array; - forkTasks?: Array>; - startDelay?: number; - subWorkflowParam?: SubWorkflowParams; - joinOn?: Array; - sink?: string; - optional?: boolean; - taskDefinition?: TaskDef; - rateLimited?: boolean; - defaultExclusiveJoinTask?: Array; - asyncComplete?: boolean; - loopCondition?: string; - loopOver?: Array; - retryCount?: number; - evaluatorType?: string; - expression?: string; - workflowTaskType?: 'SIMPLE' | 'DYNAMIC' | 'FORK_JOIN' | 'FORK_JOIN_DYNAMIC' | 'DECISION' | 'SWITCH' | 'JOIN' | 'DO_WHILE' | 'SUB_WORKFLOW' | 'START_WORKFLOW' | 'EVENT' | 'WAIT' | 'HUMAN' | 'USER_DEFINED' | 'HTTP' | 'LAMBDA' | 'INLINE' | 'EXCLUSIVE_JOIN' | 'TERMINATE' | 'KAFKA_PUBLISH' | 'JSON_JQ_TRANSFORM' | 'SET_VARIABLE'; -}; - diff --git a/src/common/open-api/models/WorkflowTestRequest.ts b/src/common/open-api/models/WorkflowTestRequest.ts deleted file mode 100644 index e35a8286..00000000 --- a/src/common/open-api/models/WorkflowTestRequest.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { TaskMock } from "./TaskMock"; -import type { WorkflowDef } from "./WorkflowDef"; -export type WorkflowTestRequest = { - correlationId?: string; - createdBy?: string; - externalInputPayloadStoragePath?: string; - idempotencyKey?: string; - idempotencyStrategy?: "FAIL" | "RETURN_EXISTING"; - input?: Record>; - name: string; - priority?: number; - subWorkflowTestRequest?: Record; - taskRefToMockOutput?: Record>; - taskToDomain?: Record; - version?: number; - workflowDef?: WorkflowDef; -}; diff --git a/src/common/open-api/sdk.gen.ts b/src/common/open-api/sdk.gen.ts new file mode 100644 index 00000000..a69793f0 --- /dev/null +++ b/src/common/open-api/sdk.gen.ts @@ -0,0 +1,4903 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Client, Options as Options2, TDataShape } from './client'; +import { client } from './client.gen'; +import type { AddEventHandlerData, AddEventHandlerResponses, AddOrUpdateMethodData, AddOrUpdateMethodResponses, AddOrUpdateServiceData, AddOrUpdateServiceResponses, AddRoleToApplicationUserData, AddRoleToApplicationUserResponses, AddTaskTagData, AddTaskTagResponses, AddUsersToGroupData, AddUsersToGroupResponses, AddUserToGroupData, AddUserToGroupResponses, AddWorkflowTagData, AddWorkflowTagResponses, AllData, AllResponses, AllVerboseData, AllVerboseResponses, AssignAndClaimData, AssignAndClaimResponses, AssociatePromptWithIntegrationData, AssociatePromptWithIntegrationResponses, BackPopulateFullTextIndexData, BackPopulateFullTextIndexResponses, BatchPollData, BatchPollResponses, CheckPermissionsData, CheckPermissionsResponses, ClaimTaskData, ClaimTaskResponses, ClearLocalCacheData, ClearLocalCacheResponses, ClearRedisCacheData, ClearRedisCacheResponses, ClearTaskExecutionCacheData, ClearTaskExecutionCacheResponses, CloseCircuitBreakerData, CloseCircuitBreakerResponses, CreateAccessKeyData, CreateAccessKeyResponses, CreateApplicationData, CreateApplicationResponses, CreateData, CreateMessageTemplatesData, CreateMessageTemplatesResponses, CreateOrUpdateEnvVariableData, CreateOrUpdateEnvVariableResponses, CreateResponses, CreateWebhookData, CreateWebhookResponses, DecideData, DecideResponses, Delete1Data, Delete1Responses, DeleteAccessKeyData, DeleteAccessKeyResponses, DeleteApplicationData, DeleteApplicationResponses, DeleteData, DeleteEnvVariableData, DeleteEnvVariableResponses, DeleteGroupData, DeleteGroupResponses, DeleteIntegrationApiData, DeleteIntegrationApiResponses, DeleteIntegrationProviderData, DeleteIntegrationProviderResponses, DeleteMessageTemplate1Data, DeleteMessageTemplate1Responses, DeleteMessageTemplateData, DeleteMessageTemplateResponses, DeleteProtoData, DeleteProtoResponses, DeleteQueueConfigData, DeleteQueueConfigResponses, DeleteResponses, DeleteScheduleData, DeleteScheduleResponses, DeleteSchemaByNameAndVersionData, DeleteSchemaByNameAndVersionResponses, DeleteSchemaByNameData, DeleteSchemaByNameResponses, DeleteSecretData, DeleteSecretResponses, DeleteTagForApplicationData, DeleteTagForApplicationResponses, DeleteTagForEnvVarData, DeleteTagForEnvVarResponses, DeleteTagForEventHandlerData, DeleteTagForEventHandlerResponses, DeleteTagForIntegrationData, DeleteTagForIntegrationProviderData, DeleteTagForIntegrationProviderResponses, DeleteTagForIntegrationResponses, DeleteTagForPromptTemplateData, DeleteTagForPromptTemplateResponses, DeleteTagForScheduleData, DeleteTagForScheduleResponses, DeleteTagForSecretData, DeleteTagForSecretResponses, DeleteTagForUserFormTemplateData, DeleteTagForUserFormTemplateResponses, DeleteTagForWebhookData, DeleteTagForWebhookResponses, DeleteTaskFromHumanTaskRecords1Data, DeleteTaskFromHumanTaskRecords1Responses, DeleteTaskFromHumanTaskRecordsData, DeleteTaskFromHumanTaskRecordsResponses, DeleteTaskTagData, DeleteTaskTagResponses, DeleteTemplateByNameData, DeleteTemplateByNameResponses, DeleteTemplatesByNameAndVersionData, DeleteTemplatesByNameAndVersionResponses, DeleteUserData, DeleteUserResponses, DeleteWebhookData, DeleteWebhookResponses, DeleteWorkflowTagData, DeleteWorkflowTagResponses, DiscoverData, DiscoverResponses, DoCheckData, DoCheckResponses, ExecuteWorkflowAsApiData, ExecuteWorkflowAsApiResponses, ExecuteWorkflowAsGetApiData, ExecuteWorkflowAsGetApiResponses, ExecuteWorkflowData, ExecuteWorkflowResponses, GenerateTokenData, GenerateTokenResponses, Get1Data, Get1Responses, Get2Data, Get2Responses, Get3Data, Get3Responses, GetAccessKeysData, GetAccessKeysResponses, GetAllData, GetAllIntegrationsData, GetAllIntegrationsResponses, GetAllPollDataData, GetAllPollDataResponses, GetAllProtosData, GetAllProtosResponses, GetAllResponses, GetAllSchedulesData, GetAllSchedulesResponses, GetAllSchemasData, GetAllSchemasResponses, GetAllTemplatesData, GetAllTemplatesResponses, GetAllWebhookData, GetAllWebhookResponses, GetAppByAccessKeyIdData, GetAppByAccessKeyIdResponses, GetApplicationData, GetApplicationResponses, GetCircuitBreakerStatusData, GetCircuitBreakerStatusResponses, GetConductorTaskByIdData, GetConductorTaskByIdResponses, GetData, GetEventHandlerByNameData, GetEventHandlerByNameResponses, GetEventHandlersData, GetEventHandlersForEvent1Data, GetEventHandlersForEvent1Responses, GetEventHandlersForEvent2Data, GetEventHandlersForEvent2Responses, GetEventHandlersForEventData, GetEventHandlersForEventResponses, GetEventHandlersResponses, GetEventsData, GetEventsResponses, GetExecutionStatusData, GetExecutionStatusResponses, GetExecutionStatusTaskListData, GetExecutionStatusTaskListResponses, GetGrantedPermissions1Data, GetGrantedPermissions1Responses, GetGrantedPermissionsData, GetGrantedPermissionsResponses, GetGroupData, GetGroupResponses, GetIntegrationApiData, GetIntegrationApiResponses, GetIntegrationApisData, GetIntegrationApisResponses, GetIntegrationAvailableApisData, GetIntegrationAvailableApisResponses, GetIntegrationDefData, GetIntegrationDefResponses, GetIntegrationProviderData, GetIntegrationProviderDefsData, GetIntegrationProviderDefsResponses, GetIntegrationProviderResponses, GetIntegrationProvidersData, GetIntegrationProvidersResponses, GetMessagesData, GetMessagesResponses, GetMessageTemplateData, GetMessageTemplateResponses, GetMessageTemplatesData, GetMessageTemplatesResponses, GetMessageTemplateVersionsData, GetMessageTemplateVersionsResponses, GetNextFewSchedulesData, GetNextFewSchedulesResponses, GetPermissionsData, GetPermissionsResponses, GetPollDataData, GetPollDataResponses, GetPromptsWithIntegrationData, GetPromptsWithIntegrationResponses, GetProtoDataData, GetProtoDataResponses, GetProvidersAndIntegrationsData, GetProvidersAndIntegrationsResponses, GetQueueConfigData, GetQueueConfigResponses, GetQueueNamesData, GetQueueNamesResponses, GetRedisUsageData, GetRedisUsageResponses, GetRegisteredServicesData, GetRegisteredServicesResponses, GetResponses, GetRunningWorkflowData, GetRunningWorkflowResponses, GetScheduleData, GetScheduleResponses, GetSchedulesByTagData, GetSchedulesByTagResponses, GetSchemaByNameAndVersionData, GetSchemaByNameAndVersionResponses, GetSchemaByNameWithLatestVersion1Data, GetSchemaByNameWithLatestVersion1Responses, GetSchemaByNameWithLatestVersionData, GetSchemaByNameWithLatestVersionResponses, GetSecretData, GetSecretResponses, GetServiceData, GetServiceResponses, GetTags1Data, GetTags1Responses, GetTagsData, GetTagsForApplicationData, GetTagsForApplicationResponses, GetTagsForEnvVarData, GetTagsForEnvVarResponses, GetTagsForEventHandlerData, GetTagsForEventHandlerResponses, GetTagsForIntegrationData, GetTagsForIntegrationProviderData, GetTagsForIntegrationProviderResponses, GetTagsForIntegrationResponses, GetTagsForPromptTemplateData, GetTagsForPromptTemplateResponses, GetTagsForScheduleData, GetTagsForScheduleResponses, GetTagsForUserFormTemplateData, GetTagsForUserFormTemplateResponses, GetTagsForWebhookData, GetTagsForWebhookResponses, GetTagsResponses, GetTask1Data, GetTask1Responses, GetTaskData, GetTaskDefData, GetTaskDefResponses, GetTaskDefsData, GetTaskDefsResponses, GetTaskDisplayNamesData, GetTaskDisplayNamesResponses, GetTaskLogsData, GetTaskLogsResponses, GetTaskResponses, GetTaskTagsData, GetTaskTagsResponses, GetTemplateByNameAndVersionData, GetTemplateByNameAndVersionResponses, GetTemplateByTaskIdData, GetTemplateByTaskIdResponses, GetTokenLimitData, GetTokenLimitResponses, GetTokenUsageData, GetTokenUsageResponses, GetUserData, GetUserInfoData, GetUserInfoResponses, GetUserResponses, GetUsersInGroupData, GetUsersInGroupResponses, GetVersionData, GetVersionResponses, GetWebhookData, GetWebhookResponses, GetWorkflowDefsData, GetWorkflowDefsResponses, GetWorkflows1Data, GetWorkflows1Responses, GetWorkflows2Data, GetWorkflows2Responses, GetWorkflowsData, GetWorkflowsResponses, GetWorkflowStatusSummaryData, GetWorkflowStatusSummaryResponses, GetWorkflowTagsData, GetWorkflowTagsResponses, GrantPermissionsData, GrantPermissionsResponses, HandleIncomingEventData, HandleIncomingEventResponses, HandleWebhook1Data, HandleWebhook1Responses, HandleWebhookData, HandleWebhookResponses, JumpToTaskData, JumpToTaskResponses, ListAllSecretNamesData, ListAllSecretNamesResponses, ListApplicationsData, ListApplicationsResponses, ListGroupsData, ListGroupsResponses, ListSecretsThatUserCanGrantAccessToData, ListSecretsThatUserCanGrantAccessToResponses, ListSecretsWithTagsThatUserCanGrantAccessToData, ListSecretsWithTagsThatUserCanGrantAccessToResponses, ListUsersData, ListUsersResponses, LogData, LogResponses, NamesData, NamesResponses, OpenCircuitBreakerData, OpenCircuitBreakerResponses, PauseAllSchedulesData, PauseAllSchedulesResponses, PauseScheduleData, PauseScheduleResponses, PauseSchedulesData, PauseSchedulesResponses, PauseWorkflow1Data, PauseWorkflow1Responses, PauseWorkflowData, PauseWorkflowResponses, PollData2, PollResponses, PutQueueConfigData, PutQueueConfigResponses, PutSecretData, PutSecretResponses, PutTagForApplicationData, PutTagForApplicationResponses, PutTagForEnvVarData, PutTagForEnvVarResponses, PutTagForEventHandlerData, PutTagForEventHandlerResponses, PutTagForIntegrationData, PutTagForIntegrationProviderData, PutTagForIntegrationProviderResponses, PutTagForIntegrationResponses, PutTagForPromptTemplateData, PutTagForPromptTemplateResponses, PutTagForScheduleData, PutTagForScheduleResponses, PutTagForSecretData, PutTagForSecretResponses, PutTagForUserFormTemplateData, PutTagForUserFormTemplateResponses, PutTagForWebhookData, PutTagForWebhookResponses, ReassignTaskData, ReassignTaskResponses, RecordEventStatsData, RecordEventStatsResponses, RegisterIntegrationData, RegisterIntegrationResponses, RegisterTaskDefData, RegisterTaskDefResponses, ReleaseTaskData, ReleaseTaskResponses, RemoveEventHandlerStatusData, RemoveEventHandlerStatusResponses, RemoveMethodData, RemoveMethodResponses, RemovePermissionsData, RemovePermissionsResponses, RemoveRoleFromApplicationUserData, RemoveRoleFromApplicationUserResponses, RemoveServiceData, RemoveServiceResponses, RemoveUserFromGroupData, RemoveUserFromGroupResponses, RemoveUsersFromGroupData, RemoveUsersFromGroupResponses, RequeueAllExecutionRecordsData, RequeueAllExecutionRecordsResponses, RequeuePendingTaskData, RequeuePendingTaskResponses, RequeueSweepData, RequeueSweepResponses, RerunData, RerunResponses, ResetWorkflowData, ResetWorkflowResponses, Restart1Data, Restart1Responses, RestartData, RestartResponses, ResumeAllSchedulesData, ResumeAllSchedulesResponses, ResumeScheduleData, ResumeScheduleResponses, ResumeSchedulesData, ResumeSchedulesResponses, ResumeWorkflow1Data, ResumeWorkflow1Responses, ResumeWorkflowData, ResumeWorkflowResponses, Retry1Data, Retry1Responses, RetryData, RetryResponses, Save1Data, Save1Responses, SaveAllIntegrationsData, SaveAllIntegrationsResponses, SaveData, SaveIntegrationApiData, SaveIntegrationApiResponses, SaveIntegrationProviderData, SaveIntegrationProviderResponses, SaveMessageTemplateData, SaveMessageTemplateResponses, SaveResponses, SaveScheduleData, SaveScheduleResponses, SaveTemplateData, SaveTemplateResponses, SaveTemplatesData, SaveTemplatesResponses, Search1Data, Search1Responses, Search2Data, Search2Responses, SearchData, SearchResponses, SearchV2Data, SearchV2Responses, SecretExistsData, SecretExistsResponses, SetProtoDataData, SetProtoDataResponses, SetTaskTagsData, SetTaskTagsResponses, SetWorkflowTagsData, SetWorkflowTagsResponses, SignalWorkflowTaskASyncData, SignalWorkflowTaskASyncResponses, SignalWorkflowTaskSyncData, SignalWorkflowTaskSyncResponses, Size1Data, Size1Responses, SizeData, SizeResponses, SkipTaskData, SkipTaskFromWorkflowData, SkipTaskFromWorkflowResponses, SkipTaskResponses, StartWorkflow1Data, StartWorkflow1Responses, StartWorkflowAsyncData, StartWorkflowAsyncResponses, StartWorkflowData, StartWorkflowResponses, Terminate1Data, Terminate1Responses, TerminateData, TerminateResponses, TestConnectivityData, TestConnectivityResponses, TestData, TestMessageTemplateData, TestMessageTemplateResponses, TestResponses, TestWorkflowData, TestWorkflowResponses, ToggleAccessKeyStatusData, ToggleAccessKeyStatusResponses, UnregisterTaskDefData, UnregisterTaskDefResponses, UnregisterWorkflowDefData, UnregisterWorkflowDefResponses, UpdateApplicationData, UpdateApplicationResponses, UpdateData, UpdateEventHandlerData, UpdateEventHandlerResponses, UpdateMessageTemplateData, UpdateMessageTemplateResponses, UpdateResponses, UpdateTask1Data, UpdateTask1Responses, UpdateTaskData, UpdateTaskDefData, UpdateTaskDefResponses, UpdateTaskOutputByRefData, UpdateTaskOutputByRefResponses, UpdateTaskOutputData, UpdateTaskOutputResponses, UpdateTaskResponses, UpdateTaskSyncData, UpdateTaskSyncResponses, UpdateTaskV2Data, UpdateTaskV2Responses, UpdateTokenLimitData, UpdateTokenLimitResponses, UpdateWebhookData, UpdateWebhookResponses, UpdateWorkflowAndTaskStateData, UpdateWorkflowAndTaskStateResponses, UpdateWorkflowStateData, UpdateWorkflowStateResponses, UpgradeRunningWorkflowToVersionData, UpgradeRunningWorkflowToVersionResponses, UploadBpmnFileData, UploadBpmnFileResponses, UploadWorkflowsAndTasksDefinitionsToS3Data, UploadWorkflowsAndTasksDefinitionsToS3Responses, UpsertGroupData, UpsertGroupResponses, UpsertUserData, UpsertUserResponses, VerifyAndRepairWorkflowConsistencyData, VerifyAndRepairWorkflowConsistencyResponses, ViewData, ViewResponses } from './types.gen'; + +export type Options = Options2 & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client; + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record; +}; + +export class AdminResource { + /** + * Remove execution cached values for the task + */ + public static clearTaskExecutionCache(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/admin/cache/clear/{taskDefName}', + ...options + }); + } + + /** + * Verify and repair workflow consistency + */ + public static verifyAndRepairWorkflowConsistency(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/admin/consistency/verifyAndRepair/{workflowId}', + ...options + }); + } + + /** + * Get details of redis usage + */ + public static getRedisUsage(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/admin/redisUsage', + ...options + }); + } + + /** + * Queue up all the running workflows for sweep + */ + public static requeueSweep(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/admin/sweep/requeue/{workflowId}', + ...options + }); + } + + /** + * Get the list of pending tasks for a given task type + */ + public static view(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/admin/task/{tasktype}', + ...options + }); + } +} + +export class ApplicationResource { + /** + * Get all applications + */ + public static listApplications(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications', + ...options + }); + } + + /** + * Create an application + */ + public static createApplication(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get application id by access key id + */ + public static getAppByAccessKeyId(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/key/{accessKeyId}', + ...options + }); + } + + /** + * Delete an access key + */ + public static deleteAccessKey(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{applicationId}/accessKeys/{keyId}', + ...options + }); + } + + /** + * Toggle the status of an access key + */ + public static toggleAccessKeyStatus(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{applicationId}/accessKeys/{keyId}/status', + ...options + }); + } + + public static removeRoleFromApplicationUser(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{applicationId}/roles/{role}', + ...options + }); + } + + public static addRoleToApplicationUser(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{applicationId}/roles/{role}', + ...options + }); + } + + /** + * Delete an application + */ + public static deleteApplication(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{id}', + ...options + }); + } + + /** + * Get an application by id + */ + public static getApplication(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{id}', + ...options + }); + } + + /** + * Update an application + */ + public static updateApplication(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get application's access keys + */ + public static getAccessKeys(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{id}/accessKeys', + ...options + }); + } + + /** + * Create an access key for an application + */ + public static createAccessKey(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{id}/accessKeys', + ...options + }); + } + + /** + * Delete a tag for application + */ + public static deleteTagForApplication(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{id}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get tags by application + */ + public static getTagsForApplication(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{id}/tags', + ...options + }); + } + + /** + * Put a tag to application + */ + public static putTagForApplication(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/applications/{id}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class AuthorizationResource { + /** + * Remove user's access over the target + */ + public static removePermissions(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/auth/authorization', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Grant access to a user over the target + */ + public static grantPermissions(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/auth/authorization', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get the access that have been granted over the given object + */ + public static getPermissions(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/auth/authorization/{type}/{id}', + ...options + }); + } +} + +export class EnvironmentResource { + /** + * List all the environment variables + */ + public static getAll(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/environment', + ...options + }); + } + + /** + * Delete an environment variable (requires metadata or admin role) + */ + public static deleteEnvVariable(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/environment/{key}', + ...options + }); + } + + /** + * Get the environment value by key + */ + public static get3(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/environment/{key}', + ...options + }); + } + + /** + * Create or update an environment variable (requires metadata or admin role) + */ + public static createOrUpdateEnvVariable(options: Options) { + return (options.client ?? client).put({ + bodySerializer: null, + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/environment/{key}', + ...options, + headers: { + 'Content-Type': 'text/plain', + ...options.headers + } + }); + } + + /** + * Delete a tag for environment variable name + */ + public static deleteTagForEnvVar(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/environment/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get tags by environment variable name + */ + public static getTagsForEnvVar(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/environment/{name}/tags', + ...options + }); + } + + /** + * Put a tag to environment variable name + */ + public static putTagForEnvVar(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/environment/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class EventResource { + /** + * Get all the event handlers + */ + public static getEventHandlers(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event', + ...options + }); + } + + /** + * Add a new event handler. + */ + public static addEventHandler(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Update an existing event handler. + */ + public static updateEventHandler(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Handle an incoming event + */ + public static handleIncomingEvent(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/handleIncomingEvent', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get event handler by name + */ + public static test(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/handler/', + ...options + }); + } + + /** + * Get event handler by name + */ + public static getEventHandlerByName(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/handler/{name}', + ...options + }); + } + + /** + * Get all queue configs + */ + public static getQueueNames(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/queue/config', + ...options + }); + } + + /** + * Delete queue config by name + */ + public static deleteQueueConfig(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/queue/config/{queueType}/{queueName}', + ...options + }); + } + + /** + * Get queue config by name + */ + public static getQueueConfig(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/queue/config/{queueType}/{queueName}', + ...options + }); + } + + /** + * Create or update queue config by name + * + * @deprecated + */ + public static putQueueConfig(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/queue/config/{queueType}/{queueName}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Test connectivity for a given queue using a workflow with EVENT task and an EventHandler + */ + public static testConnectivity(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/queue/connectivity', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get event handlers for a given event + */ + public static getEventHandlersForEvent(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/{event}', + ...options + }); + } + + /** + * Remove an event handler + */ + public static removeEventHandlerStatus(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/{name}', + ...options + }); + } + + /** + * Delete a tag for event handler + */ + public static deleteTagForEventHandler(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get tags by event handler + */ + public static getTagsForEventHandler(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/{name}/tags', + ...options + }); + } + + /** + * Put a tag to event handler + */ + public static putTagForEventHandler(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class EventExecutionResource { + /** + * Get All active Event Handlers + */ + public static getEventHandlersForEvent1(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/execution', + ...options + }); + } + + /** + * Get event handlers for a given event + */ + public static getEventHandlersForEvent2(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/execution/{eventHandlerName}', + ...options + }); + } +} + +export class EventMessageResource { + /** + * Get all event handlers with statistics + */ + public static getEvents(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/message', + ...options + }); + } + + /** + * Get event messages for a given event + */ + public static getMessages(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/event/message/{event}', + ...options + }); + } +} + +export class GlobalSchemaResource { + /** + * Save schema + */ + public static save1(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/global_schema', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get schema by name with latest version + */ + public static getSchemaByNameWithLatestVersion1(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/global_schema/{name}', + ...options + }); + } +} + +export class GroupResource { + /** + * Get all groups + */ + public static listGroups(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/groups', + ...options + }); + } + + /** + * Get the permissions this group has over workflows and tasks + */ + public static getGrantedPermissions1(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/groups/{groupId}/permissions', + ...options + }); + } + + /** + * Remove users from group + */ + public static removeUsersFromGroup(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/groups/{groupId}/users', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Add users to group + */ + public static addUsersToGroup(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/groups/{groupId}/users', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Remove user from group + */ + public static removeUserFromGroup(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/groups/{groupId}/users/{userId}', + ...options + }); + } + + /** + * Add user to group + */ + public static addUserToGroup(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/groups/{groupId}/users/{userId}', + ...options + }); + } + + /** + * Delete a group + */ + public static deleteGroup(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/groups/{id}', + ...options + }); + } + + /** + * Get a group by id + */ + public static getGroup(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/groups/{id}', + ...options + }); + } + + /** + * Create or update a group + */ + public static upsertGroup(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/groups/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get all users in group + */ + public static getUsersInGroup(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/groups/{id}/users', + ...options + }); + } +} + +export class HumanTask { + /** + * API for backpopulating index data + */ + public static backPopulateFullTextIndex(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/backPopulateFullTextIndex', + ...options + }); + } + + /** + * If the workflow is disconnected from tasks, this API can be used to clean up (in bulk) + */ + public static deleteTaskFromHumanTaskRecords(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/delete', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * If the workflow is disconnected from tasks, this API can be used to clean up + */ + public static deleteTaskFromHumanTaskRecords1(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/delete/{taskId}', + ...options + }); + } + + /** + * Get list of task display names applicable for the user + */ + public static getTaskDisplayNames(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/getTaskDisplayNames', + ...options + }); + } + + /** + * Search human tasks + */ + public static search(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/search', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Update task output, optionally complete + */ + public static updateTaskOutputByRef(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/update/taskRef', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get a task + */ + public static getTask1(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/{taskId}', + ...options + }); + } + + /** + * Claim a task by authenticated Conductor user + */ + public static claimTask(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/{taskId}/claim', + ...options + }); + } + + /** + * Claim a task to an external user + */ + public static assignAndClaim(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/{taskId}/externalUser/{userId}', + ...options + }); + } + + /** + * Reassign a task without completing it + */ + public static reassignTask(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/{taskId}/reassign', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Release a task without completing it + */ + public static releaseTask(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/{taskId}/release', + ...options + }); + } + + /** + * If a task is assigned to a user, this API can be used to skip that assignment and move to the next assignee + */ + public static skipTask(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/{taskId}/skip', + ...options + }); + } + + /** + * Update task output, optionally complete + */ + public static updateTaskOutput(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/{taskId}/update', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * List all user form templates or get templates by name, or a template by name and version + */ + public static getAllTemplates(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template', + ...options + }); + } + + /** + * Save user form template + */ + public static saveTemplate(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Save user form template + */ + public static saveTemplates(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/bulk', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get user form by human task id + */ + public static getTemplateByTaskId(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/{humanTaskId}', + ...options + }); + } + + /** + * Delete all versions of user form template by name + */ + public static deleteTemplateByName(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/{name}', + ...options + }); + } + + /** + * Delete a version of form template by name + */ + public static deleteTemplatesByNameAndVersion(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/{name}/{version}', + ...options + }); + } + + /** + * Get user form template by name and version + */ + public static getTemplateByNameAndVersion(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/{name}/{version}', + ...options + }); + } +} + +export class HumanTaskResource { + /** + * Get Conductor task by id (for human tasks only) + */ + public static getConductorTaskById(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/tasks/{taskId}/conductorTask', + ...options + }); + } +} + +export class UserForm { + /** + * List all user form templates or get templates by name, or a template by name and version + */ + public static getAllTemplates(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template', + ...options + }); + } + + /** + * Save user form template + */ + public static saveTemplate(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Save user form template + */ + public static saveTemplates(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/bulk', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get user form by human task id + */ + public static getTemplateByTaskId(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/{humanTaskId}', + ...options + }); + } + + /** + * Delete all versions of user form template by name + */ + public static deleteTemplateByName(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/{name}', + ...options + }); + } + + /** + * Get user form template by name and version + */ + public static getTemplateByNameAndVersion(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/{name}/{version}', + ...options + }); + } +} + +export class UserFormTemplateResource { + /** + * Delete a tag for template name + */ + public static deleteTagForUserFormTemplate(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get tags by template name + */ + public static getTagsForUserFormTemplate(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/{name}/tags', + ...options + }); + } + + /** + * Put a tag to template name + */ + public static putTagForUserFormTemplate(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/human/template/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class IntegrationResource { + /** + * Get all Integrations + */ + public static getAllIntegrations(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/', + ...options + }); + } + + /** + * Save all Integrations + */ + public static saveAllIntegrations(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get Integrations Providers and Integrations combo + */ + public static getProvidersAndIntegrations(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/all', + ...options + }); + } + + /** + * Get Integration provider definitions + */ + public static getIntegrationProviderDefs(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/def', + ...options + }); + } + + /** + * upsert an integration definition + */ + public static registerIntegration(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/def/register', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get an integration definition + */ + public static getIntegrationDef(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/def/{name}', + ...options + }); + } + + /** + * Record Event Stats + */ + public static recordEventStats(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/eventStats/{type}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get all Integrations Providers + */ + public static getIntegrationProviders(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider', + ...options + }); + } + + /** + * Get the list of prompt templates associated with an integration + */ + public static getPromptsWithIntegration(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{integration_provider}/integration/{integration_name}/prompt', + ...options + }); + } + + /** + * Associate a Prompt Template with an Integration + */ + public static associatePromptWithIntegration(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{integration_provider}/integration/{integration_name}/prompt/{prompt_name}', + ...options + }); + } + + /** + * Delete an Integration Provider + */ + public static deleteIntegrationProvider(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}', + ...options + }); + } + + /** + * Get Integration provider + */ + public static getIntegrationProvider(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}', + ...options + }); + } + + /** + * Create or Update Integration provider + */ + public static saveIntegrationProvider(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get Integrations of an Integration Provider + */ + public static getIntegrationApis(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}/integration', + ...options + }); + } + + /** + * Get Integrations Available for an Integration Provider + */ + public static getIntegrationAvailableApis(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}/integration/all', + ...options + }); + } + + /** + * Delete an Integration + */ + public static deleteIntegrationApi(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}/integration/{integration_name}', + ...options + }); + } + + /** + * Get Integration details + */ + public static getIntegrationApi(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}/integration/{integration_name}', + ...options + }); + } + + /** + * Create or Update Integration + */ + public static saveIntegrationApi(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}/integration/{integration_name}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Delete a tag for Integration + */ + public static deleteTagForIntegration(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}/integration/{integration_name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get tags by Integration + */ + public static getTagsForIntegration(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}/integration/{integration_name}/tags', + ...options + }); + } + + /** + * Put a tag to Integration + */ + public static putTagForIntegration(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}/integration/{integration_name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Delete a tag for Integration Provider + */ + public static deleteTagForIntegrationProvider(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get tags by Integration Provider + */ + public static getTagsForIntegrationProvider(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}/tags', + ...options + }); + } + + /** + * Put a tag to Integration Provider + */ + public static putTagForIntegrationProvider(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/provider/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class Llm { + /** + * Get the Token Limit for an integration + */ + public static getTokenLimit(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/llm/{name}/token', + ...options + }); + } + + /** + * Register Token Limit for an integration + */ + public static updateTokenLimit(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/llm/{name}/token', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get Token Usage by Integration provider + */ + public static getTokenUsage(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/integrations/llm/{name}/token/history', + ...options + }); + } +} + +export class LimitsResource { + public static get2(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/limits', + ...options + }); + } +} + +export class Tags { + /** + * List all tags + */ + public static getTags1(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/tags', + ...options + }); + } + + /** + * Removes the tag of the task + */ + public static deleteTaskTag(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/task/{taskName}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Returns all the tags of the task + */ + public static getTaskTags(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/task/{taskName}/tags', + ...options + }); + } + + /** + * Adds the tag to the task + */ + public static addTaskTag(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/task/{taskName}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Sets (replaces existing) the tags to the task + */ + public static setTaskTags(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/task/{taskName}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Removes the tag of the workflow + */ + public static deleteWorkflowTag(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/workflow/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Returns all the tags of the workflow + */ + public static getWorkflowTags(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/workflow/{name}/tags', + ...options + }); + } + + /** + * Adds the tag to the workflow + */ + public static addWorkflowTag(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/workflow/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Set (replaces all existing) the tags of the workflow + */ + public static setWorkflowTags(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/workflow/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class MetadataResource { + /** + * Gets all task definition + */ + public static getTaskDefs(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/taskdefs', + ...options + }); + } + + /** + * Create or update task definition(s) + */ + public static registerTaskDef(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/taskdefs', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Update an existing task + */ + public static updateTaskDef(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/taskdefs', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Remove a task definition + */ + public static unregisterTaskDef(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/taskdefs/{tasktype}', + ...options + }); + } + + /** + * Gets the task definition + */ + public static getTaskDef(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/taskdefs/{tasktype}', + ...options + }); + } + + /** + * Retrieves all workflow definition along with blueprint + */ + public static getWorkflowDefs(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/workflow', + ...options + }); + } + + /** + * Create a new workflow definition + */ + public static create(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/workflow', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Create or update workflow definition(s) + */ + public static update(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/workflow', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Imports bpmn workflow + */ + public static uploadBpmnFile(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/workflow-importer/import-bpm', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Upload all workflows and tasks definitions to Object storage if configured + */ + public static uploadWorkflowsAndTasksDefinitionsToS3(options?: Options) { + return (options?.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/workflow-task-defs/upload', + ...options + }); + } + + /** + * Retrieves workflow definition along with blueprint + */ + public static get1(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/workflow/{name}', + ...options + }); + } + + /** + * Removes workflow definition. It does not remove workflows associated with the definition. + */ + public static unregisterWorkflowDef(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/workflow/{name}/{version}', + ...options + }); + } +} + +export class WebhooksConfigResource { + public static getAllWebhook(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/webhook', + ...options + }); + } + + public static createWebhook(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/webhook', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + public static deleteWebhook(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/webhook/{id}', + ...options + }); + } + + public static getWebhook(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/webhook/{id}', + ...options + }); + } + + public static updateWebhook(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/webhook/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Delete a tag for webhook id + */ + public static deleteTagForWebhook(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/webhook/{id}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get tags by webhook id + */ + public static getTagsForWebhook(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/webhook/{id}/tags', + ...options + }); + } + + /** + * Put a tag to webhook id + */ + public static putTagForWebhook(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/metadata/webhook/{id}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class PromptResource { + /** + * Get Templates + */ + public static getMessageTemplates(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts', + ...options + }); + } + + /** + * Create message templates in bulk + */ + public static createMessageTemplates(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Test Prompt Template + */ + public static testMessageTemplate(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts/test', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Delete Template + */ + public static deleteMessageTemplate(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts/{name}', + ...options + }); + } + + /** + * Get Template + */ + public static getMessageTemplate(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts/{name}', + ...options + }); + } + + /** + * Create or Update a template + */ + public static saveMessageTemplate(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts/{name}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Create a template + */ + public static updateMessageTemplate(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts/{name}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Delete a tag for Prompt Template + */ + public static deleteTagForPromptTemplate(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get tags by Prompt Template + */ + public static getTagsForPromptTemplate(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts/{name}/tags', + ...options + }); + } + + /** + * Put a tag to Prompt Template + */ + public static putTagForPromptTemplate(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get all versions of a Template + */ + public static getMessageTemplateVersions(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts/{name}/versions', + ...options + }); + } + + /** + * Delete Template + */ + public static deleteMessageTemplate1(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/prompts/{name}/versions/{version}', + ...options + }); + } +} + +export class QueueAdminResource { + /** + * Get Queue Names + */ + public static names(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/queue/', + ...options + }); + } + + /** + * Get the queue length + */ + public static size1(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/queue/size', + ...options + }); + } +} + +export class ServiceRegistryResource { + public static getRegisteredServices(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service', + ...options + }); + } + + public static addOrUpdateService(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + public static getAllProtos(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/protos/{registryName}', + ...options + }); + } + + public static deleteProto(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/protos/{registryName}/{filename}', + ...options + }); + } + + public static getProtoData(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/protos/{registryName}/{filename}', + ...options + }); + } + + public static setProtoData(options: Options) { + return (options.client ?? client).post({ + bodySerializer: null, + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/protos/{registryName}/{filename}', + ...options, + headers: { + 'Content-Type': 'application/octet-stream', + ...options.headers + } + }); + } + + public static removeService(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/{name}', + ...options + }); + } + + public static getService(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/{name}', + ...options + }); + } + + public static closeCircuitBreaker(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/{name}/circuit-breaker/close', + ...options + }); + } + + public static openCircuitBreaker(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/{name}/circuit-breaker/open', + ...options + }); + } + + public static getCircuitBreakerStatus(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/{name}/circuit-breaker/status', + ...options + }); + } + + public static discover(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/{name}/discover', + ...options + }); + } + + public static removeMethod(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/{registryName}/methods', + ...options + }); + } + + public static addOrUpdateMethod(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/registry/service/{registryName}/methods', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class SchedulerResource { + /** + * Pause all scheduling in a single conductor server instance (for debugging only) + */ + public static pauseAllSchedules(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/admin/pause', + ...options + }); + } + + /** + * Requeue all execution records + */ + public static requeueAllExecutionRecords(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/admin/requeue', + ...options + }); + } + + /** + * Resume all scheduling + */ + public static resumeAllSchedules(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/admin/resume', + ...options + }); + } + + /** + * Get list of the next x (default 3, max 5) execution times for a scheduler + */ + public static getNextFewSchedules(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/nextFewSchedules', + ...options + }); + } + + /** + * Get all existing workflow schedules and optionally filter by workflow name + */ + public static getAllSchedules(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/schedules', + ...options + }); + } + + /** + * Create or update a schedule for a specified workflow with a corresponding start workflow request + */ + public static saveSchedule(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/schedules', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get schedules by tag + */ + public static getSchedulesByTag(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/schedules/tags', + ...options + }); + } + + /** + * Deletes an existing workflow schedule by name + */ + public static deleteSchedule(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/schedules/{name}', + ...options + }); + } + + /** + * Get an existing workflow schedule by name + */ + public static getSchedule(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/schedules/{name}', + ...options + }); + } + + /** + * Pauses an existing schedule by name + */ + public static pauseSchedule(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/schedules/{name}/pause', + ...options + }); + } + + /** + * Resume a paused schedule by name + */ + public static resumeSchedule(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/schedules/{name}/resume', + ...options + }); + } + + /** + * Delete a tag for schedule + */ + public static deleteTagForSchedule(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/schedules/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get tags by schedule + */ + public static getTagsForSchedule(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/schedules/{name}/tags', + ...options + }); + } + + /** + * Put a tag to schedule + */ + public static putTagForSchedule(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/schedules/{name}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Search for workflow executions based on payload and other parameters + * + * use sort options as sort=:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. + */ + public static searchV2(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/search/executions', + ...options + }); + } +} + +export class SchedulerBulkResource { + /** + * Pause the list of schedules + */ + public static pauseSchedules(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/bulk/pause', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Resume the list of schedules + */ + public static resumeSchedules(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/scheduler/bulk/resume', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class SchemaResource { + /** + * Get all schemas + */ + public static getAllSchemas(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/schema', + ...options + }); + } + + /** + * Save schema + */ + public static save(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/schema', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Delete all versions of schema by name + */ + public static deleteSchemaByName(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/schema/{name}', + ...options + }); + } + + /** + * Get schema by name with latest version + */ + public static getSchemaByNameWithLatestVersion(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/schema/{name}', + ...options + }); + } + + /** + * Delete a version of schema by name + */ + public static deleteSchemaByNameAndVersion(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/schema/{name}/{version}', + ...options + }); + } + + /** + * Get schema by name and version + */ + public static getSchemaByNameAndVersion(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/schema/{name}/{version}', + ...options + }); + } +} + +export class SecretResource { + /** + * List all secret names user can grant access to + */ + public static listSecretsThatUserCanGrantAccessTo(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets', + ...options + }); + } + + /** + * List all secret names + */ + public static listAllSecretNames(options?: Options) { + return (options?.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets', + ...options + }); + } + + /** + * List all secret names along with tags user can grant access to + */ + public static listSecretsWithTagsThatUserCanGrantAccessTo(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets-v2', + ...options + }); + } + + /** + * Clear local cache + */ + public static clearLocalCache(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets/clearLocalCache', + ...options + }); + } + + /** + * Clear redis cache + */ + public static clearRedisCache(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets/clearRedisCache', + ...options + }); + } + + /** + * Delete a secret value by key + */ + public static deleteSecret(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets/{key}', + ...options + }); + } + + /** + * Get secret value by key + */ + public static getSecret(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets/{key}', + ...options + }); + } + + /** + * Put a secret value by key + */ + public static putSecret(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets/{key}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Check if secret exists + */ + public static secretExists(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets/{key}/exists', + ...options + }); + } + + /** + * Delete tags of the secret + */ + public static deleteTagForSecret(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets/{key}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get tags by secret + */ + public static getTags(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets/{key}/tags', + ...options + }); + } + + /** + * Tag a secret + */ + public static putTagForSecret(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/secrets/{key}/tags', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class TaskResource { + /** + * Update a task + */ + public static updateTask(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Batch poll for a task of a certain type + */ + public static batchPoll(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/poll/batch/{tasktype}', + ...options + }); + } + + /** + * Poll for a task of a certain type + */ + public static poll(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/poll/{tasktype}', + ...options + }); + } + + /** + * Get the details about each queue + */ + public static all(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/queue/all', + ...options + }); + } + + /** + * Get the details about each queue + */ + public static allVerbose(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/queue/all/verbose', + ...options + }); + } + + /** + * Get the last poll data for a given task type + */ + public static getPollData(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/queue/polldata', + ...options + }); + } + + /** + * Get the last poll data for all task types + */ + public static getAllPollData(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/queue/polldata/all', + ...options + }); + } + + /** + * Requeue pending tasks + */ + public static requeuePendingTask(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/queue/requeue/{taskType}', + ...options + }); + } + + /** + * Get Task type queue sizes + */ + public static size(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/queue/sizes', + ...options + }); + } + + /** + * Search for tasks based in payload and other parameters + * + * use sort options as sort=:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC + */ + public static search2(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/search', + ...options + }); + } + + /** + * Update a task + */ + public static updateTaskV2(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/update-v2', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get task by Id + */ + public static getTask(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/{taskId}', + ...options + }); + } + + /** + * Get Task Execution Logs + */ + public static getTaskLogs(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/{taskId}/log', + ...options + }); + } + + /** + * Log Task Execution Details + */ + public static log(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/{taskId}/log', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Update running task in the workflow with given status and output asynchronously + */ + public static signalWorkflowTaskASync(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/{workflowId}/{status}/signal', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Update running task in the workflow with given status and output synchronously and return back updated workflow + */ + public static signalWorkflowTaskSync(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/{workflowId}/{status}/signal/sync', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Update a task By Ref Name. The output data is merged if data from a previous API call already exists. + */ + public static updateTask1(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/{workflowId}/{taskRefName}/{status}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Update a task By Ref Name synchronously. The output data is merged if data from a previous API call already exists. + */ + public static updateTaskSync(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/tasks/{workflowId}/{taskRefName}/{status}/sync', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class TokenResource { + /** + * Generate JWT with the given access key + */ + public static generateToken(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/token', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get the user info from the token + */ + public static getUserInfo(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/token/userInfo', + ...options + }); + } +} + +export class UserResource { + /** + * Get all users + */ + public static listUsers(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/users', + ...options + }); + } + + /** + * Delete a user + */ + public static deleteUser(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/users/{id}', + ...options + }); + } + + /** + * Get a user by id + */ + public static getUser(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/users/{id}', + ...options + }); + } + + /** + * Create or update a user + */ + public static upsertUser(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/users/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Get the permissions this user has over workflows and tasks + */ + public static checkPermissions(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/users/{userId}/checkPermissions', + ...options + }); + } + + /** + * Get the permissions this user has over workflows and tasks + */ + public static getGrantedPermissions(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/users/{userId}/permissions', + ...options + }); + } +} + +export class VersionResource { + /** + * Get the server's version + */ + public static getVersion(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/version', + ...options + }); + } +} + +export class WorkflowResource { + /** + * Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain + */ + public static startWorkflow(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Lists workflows for the given correlation id list and workflow name list + */ + public static getWorkflows1(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/correlated/batch', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Starts the decision task for a workflow + */ + public static decide(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/decide/{workflowId}', + ...options + }); + } + + /** + * Execute a workflow synchronously with input and outputs using get api + * + * @deprecated + */ + public static executeWorkflowAsGetApi(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/execute/{name}', + ...options + }); + } + + /** + * Execute a workflow synchronously with input and outputs + * + * @deprecated + */ + public static executeWorkflowAsApi(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/execute/{name}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Execute a workflow synchronously + */ + public static executeWorkflow(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/execute/{name}/{version}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Retrieve all the running workflows + */ + public static getRunningWorkflow(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/running/{name}', + ...options + }); + } + + /** + * Search for workflow executions based on payload and other parameters + * + * Search for workflow executions based on payload and other parameters. + * The query parameter accepts exact matches using `=` and `IN` on the following fields: `workflowId`, `correlationId`, `taskId`, `workflowType`, `taskType`, and `status`. + * Matches using `=` can be written as `taskType = HTTP`. + * Matches using `IN` are written as `status IN (SCHEDULED, IN_PROGRESS)`. + * The 'startTime' and 'modifiedTime' field uses unix timestamps and accepts queries using `<` and `>`, for example `startTime < 1696143600000`. + * Queries can be combined using `AND`, for example `taskType = HTTP AND status = SCHEDULED`. + * + */ + public static search1(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/search', + ...options + }); + } + + /** + * Start a new workflow asynchronously. Returns the ID of the workflow instance that can be later used for tracking + */ + public static startWorkflowAsync(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/start/{name}/{version}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Test workflow execution using mock data + */ + public static testWorkflow(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/test', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking + */ + public static startWorkflow1(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{name}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Lists workflows for the given correlation id list + */ + public static getWorkflows(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{name}/correlated', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Lists workflows for the given correlation id + */ + public static getWorkflows2(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{name}/correlated/{correlationId}', + ...options + }); + } + + /** + * Terminate workflow execution + */ + public static terminate1(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}', + ...options + }); + } + + /** + * Gets the workflow by workflow (execution) id + */ + public static getExecutionStatus(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}', + ...options + }); + } + + /** + * Jump workflow execution to given task + * + * Jump workflow execution to given task. + */ + public static jumpToTask(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/jump/{taskReferenceName}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Pauses the workflow + */ + public static pauseWorkflow(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/pause', + ...options + }); + } + + /** + * Removes the workflow from the system + */ + public static delete1(options: Options) { + return (options.client ?? client).delete({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/remove', + ...options + }); + } + + /** + * Reruns the workflow from a specific task + */ + public static rerun(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/rerun', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Resets callback times of all non-terminal SIMPLE tasks to 0 + */ + public static resetWorkflow(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/resetcallbacks', + ...options + }); + } + + /** + * Restarts a completed workflow + */ + public static restart(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/restart', + ...options + }); + } + + /** + * Resumes the workflow + */ + public static resumeWorkflow(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/resume', + ...options + }); + } + + /** + * Retries the last failed task + */ + public static retry(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/retry', + ...options + }); + } + + /** + * Skips a given task from a current running workflow + */ + public static skipTaskFromWorkflow(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/skiptask/{taskReferenceName}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Update a workflow state by updating variables or in progress task + * + * Updates the workflow variables, tasks and triggers evaluation. + */ + public static updateWorkflowAndTaskState(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/state', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Gets the workflow by workflow (execution) id + */ + public static getWorkflowStatusSummary(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/status', + ...options + }); + } + + /** + * Gets the workflow tasks by workflow (execution) id + */ + public static getExecutionStatusTaskList(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/tasks', + ...options + }); + } + + /** + * Upgrade running workflow to newer version + * + * Upgrade running workflow to newer version + */ + public static upgradeRunningWorkflowToVersion(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/upgrade', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Update workflow variables + * + * Updates the workflow variables and triggers evaluation. + */ + public static updateWorkflowState(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/{workflowId}/variables', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class WorkflowBulkResource { + /** + * Permanently remove workflows from the system + */ + public static delete(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/bulk/delete', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Pause the list of workflows + */ + public static pauseWorkflow1(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/bulk/pause', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Restart the list of completed workflow + */ + public static restart1(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/bulk/restart', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Resume the list of workflows + */ + public static resumeWorkflow1(options: Options) { + return (options.client ?? client).put({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/bulk/resume', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Retry the last failed task for each workflow from the list + */ + public static retry1(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/bulk/retry', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } + + /** + * Terminate workflows execution + */ + public static terminate(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/api/workflow/bulk/terminate', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} + +export class ContextController { + public static get(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/context.js', + ...options + }); + } +} + +export class HealthCheckResource { + public static doCheck(options?: Options) { + return (options?.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/health', + ...options + }); + } +} + +export class IncomingWebhookResource { + public static handleWebhook1(options: Options) { + return (options.client ?? client).get({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/webhook/{id}', + ...options + }); + } + + public static handleWebhook(options: Options) { + return (options.client ?? client).post({ + security: [ + { + name: 'X-Authorization', + type: 'apiKey' + } + ], + url: '/webhook/{id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } + }); + } +} diff --git a/src/common/open-api/services/EventResourceService.ts b/src/common/open-api/services/EventResourceService.ts deleted file mode 100644 index 4ca07da3..00000000 --- a/src/common/open-api/services/EventResourceService.ts +++ /dev/null @@ -1,241 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { EventHandler } from '../models/EventHandler'; - -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; -import { Tag } from '../models/Tag'; - -export class EventResourceService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get queue config by name - * @param queueType - * @param queueName - * @returns any OK - * @throws ApiError - */ - public getQueueConfig( - queueType: string, - queueName: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/event/queue/config/{queueType}/{queueName}', - path: { - 'queueType': queueType, - 'queueName': queueName, - }, - }); - } - - /** - * Create or update queue config by name - * @param queueType - * @param queueName - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public putQueueConfig( - queueType: string, - queueName: string, - requestBody: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/event/queue/config/{queueType}/{queueName}', - path: { - 'queueType': queueType, - 'queueName': queueName, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Delete queue config by name - * @param queueType - * @param queueName - * @returns any OK - * @throws ApiError - */ - public deleteQueueConfig( - queueType: string, - queueName: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/event/queue/config/{queueType}/{queueName}', - path: { - 'queueType': queueType, - 'queueName': queueName, - }, - }); - } - - /** - * Get all the event handlers - * @returns EventHandler OK - * @throws ApiError - */ - public getEventHandlers(): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/event', - }); - } - - /** - * Update an existing event handler. - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public updateEventHandler( - requestBody: EventHandler, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/event', - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Add a new event handler. - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public addEventHandler( - requestBody: EventHandler, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/event', - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Get all queue configs - * @returns any OK - * @throws ApiError - */ - public getQueueNames(): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/event/queue/config', - }); - } - - /** - * Remove an event handler - * @param name - * @returns any OK - * @throws ApiError - */ - public removeEventHandlerStatus( - name: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/event/{name}', - path: { - 'name': name, - }, - }); - } - - /** - * Get event handlers for a given event - * @param event - * @param activeOnly - * @returns EventHandler OK - * @throws ApiError - */ - public getEventHandlersForEvent( - event: string, - activeOnly: boolean = true, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/event/{event}', - path: { - 'event': event, - }, - query: { - 'activeOnly': activeOnly, - }, - }); - } - - /** - * Delete a tag for event handler - * @param name - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public deleteTagForEventHandler( - name: string, - requestBody: Array, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/event/{name}/tags', - path: { - 'name': name, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Get tags by event handler - * @param name - * @returns Tag OK - * @throws ApiError - */ - public getTagsForEventHandler( - name: string, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/event/{name}/tags', - path: { - 'name': name, - }, - }); - } - - /** - * Put a tag to event handler - * @param name - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public putTagForEventHandler( - name: string, - requestBody: Array, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/event/{name}/tags', - path: { - 'name': name, - }, - body: requestBody, - mediaType: 'application/json', - }); - } -} diff --git a/src/common/open-api/services/HealthCheckResourceService.ts b/src/common/open-api/services/HealthCheckResourceService.ts deleted file mode 100644 index fc718f2e..00000000 --- a/src/common/open-api/services/HealthCheckResourceService.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; - -export class HealthCheckResourceService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns any OK - * @throws ApiError - */ - public doCheck(): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/health', - }); - } - -} diff --git a/src/common/open-api/services/HumanTaskResourceService.ts b/src/common/open-api/services/HumanTaskResourceService.ts deleted file mode 100644 index 2910567b..00000000 --- a/src/common/open-api/services/HumanTaskResourceService.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Task } from '../models/Task'; - -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; - -export class HumanTaskResourceService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get Conductor task by id (for human tasks only) - * @param taskId - * @returns Task OK - * @throws ApiError - */ - public getConductorTaskById( - taskId: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/human/tasks/{taskId}/conductorTask', - path: { - 'taskId': taskId, - }, - }); - } - -} diff --git a/src/common/open-api/services/HumanTaskService.ts b/src/common/open-api/services/HumanTaskService.ts deleted file mode 100644 index 777c0dfc..00000000 --- a/src/common/open-api/services/HumanTaskService.ts +++ /dev/null @@ -1,386 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { HumanTaskAssignment } from '../models/HumanTaskAssignment'; -import type { HumanTaskEntry } from '../models/HumanTaskEntry'; -import type { HumanTaskSearch } from '../models/HumanTaskSearch'; -import type { HumanTaskSearchResult } from '../models/HumanTaskSearchResult'; -import type { HumanTaskTemplate } from '../models/HumanTaskTemplate'; - -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; - -export class HumanTaskService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * If the workflow is disconnected from tasks, this API can be used to clean up (in bulk) - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public deleteTaskFromHumanTaskRecords( - requestBody: Array, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/human/tasks/delete', - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * If the workflow is disconnected from tasks, this API can be used to clean up - * @param taskId - * @returns any OK - * @throws ApiError - */ - public deleteTaskFromHumanTaskRecords1( - taskId: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/human/tasks/delete/{taskId}', - path: { - 'taskId': taskId, - }, - }); - } - - /** - * Search human tasks - * @param requestBody - * @returns HumanTaskSearchResult OK - * @throws ApiError - */ - public search( - requestBody: HumanTaskSearch, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/human/tasks/search', - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Update task output, optionally complete - * @param workflowId - * @param taskRefName - * @param requestBody - * @param complete - * @param iteration Populate this value if your task is in a loop and you want to update a specific iteration. If its not in a loop OR if you want to just update the latest iteration, leave this as empty - * @returns any OK - * @throws ApiError - */ - public updateTaskOutputByRef( - workflowId: string, - taskRefName: string, - requestBody: Record, - complete: boolean = false, - iteration?: Array, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/human/tasks/update/taskRef', - query: { - 'workflowId': workflowId, - 'taskRefName': taskRefName, - 'complete': complete, - 'iteration': iteration, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Get a task - * @param taskId - * @returns HumanTaskEntry OK - * @throws ApiError - */ - public getTask1( - taskId: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/human/tasks/{taskId}', - path: { - 'taskId': taskId, - }, - }); - } - - /** - * Claim a task by authenticated Conductor user - * @param taskId - * @param overrideAssignment - * @returns any OK - * @throws ApiError - */ - public claimTask( - taskId: string, - overrideAssignment: boolean = false, - withTemplate: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/human/tasks/{taskId}/claim', - path: { - 'taskId': taskId, - }, - query: { - 'overrideAssignment': overrideAssignment, - 'withTemplate':withTemplate, - }, - }); - } - - /** - * Claim a task to an external user - * @param taskId - * @param userId - * @param overrideAssignment - * @returns any OK - * @throws ApiError - */ - public assignAndClaim( - taskId: string, - userId: string, - overrideAssignment: boolean = false, - withTemplate: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/human/tasks/{taskId}/externalUser/{userId}', - path: { - 'taskId': taskId, - 'userId': userId, - }, - query: { - 'overrideAssignment': overrideAssignment, - 'withTemplate':withTemplate, - }, - }); - } - - /** - * Release a task without completing it - * @param taskId - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public reassignTask( - taskId: string, - requestBody: Array, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/human/tasks/{taskId}/reassign', - path: { - 'taskId': taskId, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Release a task without completing it - * @param taskId - * @returns any OK - * @throws ApiError - */ - public releaseTask( - taskId: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/human/tasks/{taskId}/release', - path: { - 'taskId': taskId, - }, - }); - } - - /** - * If a task is assigned to a user, this API can be used to skip that assignment and move to the next assignee - * @param taskId - * @param reason - * @returns any OK - * @throws ApiError - */ - public skipTask( - taskId: string, - reason?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/human/tasks/{taskId}/skip', - path: { - 'taskId': taskId, - }, - query: { - 'reason': reason, - }, - }); - } - - /** - * Update task output, optionally complete - * @param taskId - * @param requestBody - * @param complete - * @returns any OK - * @throws ApiError - */ - public updateTaskOutput( - taskId: string, - requestBody: Record, - complete: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/human/tasks/{taskId}/update', - path: { - 'taskId': taskId, - }, - query: { - 'complete': complete, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * List all user form templates or get templates by name, or a template by name and version - * @param name - * @param version - * @returns HumanTaskTemplate OK - * @throws ApiError - */ - public getAllTemplates( - name?: string, - version?: number, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/human/template', - query: { - 'name': name, - 'version': version, - }, - }); - } - - /** - * Save user form template - * @param requestBody - * @param newVersion - * @returns HumanTaskTemplate OK - * @throws ApiError - */ - public saveTemplate( - requestBody: HumanTaskTemplate, - newVersion: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/human/template', - query: { - 'newVersion': newVersion, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Save user form template - * @param requestBody - * @param newVersion - * @returns HumanTaskTemplate OK - * @throws ApiError - */ - public saveTemplates( - requestBody: Array, - newVersion: boolean = false, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'POST', - url: '/human/template/bulk', - query: { - 'newVersion': newVersion, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Delete all versions of user form template by name - * @param name - * @returns any OK - * @throws ApiError - */ - public deleteTemplateByName( - name: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/human/template/{name}', - path: { - 'name': name, - }, - }); - } - - /** - * Delete a version of form template by name - * @param name - * @param version - * @returns any OK - * @throws ApiError - */ - public deleteTemplatesByNameAndVersion( - name: string, - version: number, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/human/template/{name}/{version}', - path: { - 'name': name, - 'version': version, - }, - }); - } - - /** - * Get user form template by name and version - * @param name - * @param version - * @returns HumanTaskTemplate OK - * @throws ApiError - */ - public getTemplateByNameAndVersion( - name: string, - version: number, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/human/template/{name}/{version}', - path: { - 'name': name, - 'version': version, - }, - }); - } - -} diff --git a/src/common/open-api/services/MetadataResourceService.ts b/src/common/open-api/services/MetadataResourceService.ts deleted file mode 100644 index 1692b855..00000000 --- a/src/common/open-api/services/MetadataResourceService.ts +++ /dev/null @@ -1,234 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { TaskDef } from '../models/TaskDef'; -import type { WorkflowDef } from '../models/WorkflowDef'; - -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; - -export class MetadataResourceService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Gets the task definition - * @param tasktype - * @param metadata - * @returns TaskDef OK - * @throws ApiError - */ - public getTaskDef( - tasktype: string, - metadata: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/metadata/taskdefs/{tasktype}', - path: { - 'tasktype': tasktype, - }, - query: { - 'metadata': metadata, - }, - }); - } - - /** - * Remove a task definition - * @param tasktype - * @returns any OK - * @throws ApiError - */ - public unregisterTaskDef( - tasktype: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/metadata/taskdefs/{tasktype}', - path: { - 'tasktype': tasktype, - }, - }); - } - - /** - * Retrieves all workflow definition along with blueprint - * @param access - * @param metadata - * @param tagKey - * @param tagValue - * @returns WorkflowDef OK - * @throws ApiError - */ - public getAllWorkflows( - access: string = 'READ', - metadata: boolean = false, - tagKey?: string, - tagValue?: string, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/metadata/workflow', - query: { - 'access': access, - 'metadata': metadata, - 'tagKey': tagKey, - 'tagValue': tagValue, - }, - }); - } - - /** - * Create or update workflow definition(s) - * @param requestBody - * @param overwrite - * @returns any OK - * @throws ApiError - */ - public update( - requestBody: Array, - overwrite: boolean = true, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/metadata/workflow', - query: { - 'overwrite': overwrite, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Create a new workflow definition - * @param requestBody - * @param overwrite - * @returns any OK - * @throws ApiError - */ - public create( - requestBody: WorkflowDef, - overwrite: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/metadata/workflow', - query: { - 'overwrite': overwrite, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Gets all task definition - * @param access - * @param metadata - * @param tagKey - * @param tagValue - * @returns TaskDef OK - * @throws ApiError - */ - public getTaskDefs( - access: string = 'READ', - metadata: boolean = false, - tagKey?: string, - tagValue?: string, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/metadata/taskdefs', - query: { - 'access': access, - 'metadata': metadata, - 'tagKey': tagKey, - 'tagValue': tagValue, - }, - }); - } - - /** - * Update an existing task - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public updateTaskDef( - requestBody: TaskDef, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/metadata/taskdefs', - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Create or update task definition(s) - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public registerTaskDef( - requestBody: Array, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/metadata/taskdefs', - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Removes workflow definition. It does not remove workflows associated with the definition. - * @param name - * @param version - * @returns any OK - * @throws ApiError - */ - public unregisterWorkflowDef( - name: string, - version: number, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/metadata/workflow/{name}/{version}', - path: { - 'name': name, - 'version': version, - }, - }); - } - - /** - * Retrieves workflow definition along with blueprint - * @param name - * @param version - * @param metadata - * @returns WorkflowDef OK - * @throws ApiError - */ - public get( - name: string, - version?: number, - metadata: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/metadata/workflow/{name}', - path: { - 'name': name, - }, - query: { - 'version': version, - 'metadata': metadata, - }, - }); - } - -} diff --git a/src/common/open-api/services/SchedulerResourceService.ts b/src/common/open-api/services/SchedulerResourceService.ts deleted file mode 100644 index 6d55e093..00000000 --- a/src/common/open-api/services/SchedulerResourceService.ts +++ /dev/null @@ -1,228 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { SaveScheduleRequest } from '../models/SaveScheduleRequest'; -import type { SearchResultWorkflowScheduleExecutionModel } from '../models/SearchResultWorkflowScheduleExecutionModel'; -import type { WorkflowSchedule } from '../models/WorkflowSchedule'; - -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; - -export class SchedulerResourceService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get an existing workflow schedule by name - * @param name - * @returns any OK - * @throws ApiError - */ - public getSchedule( - name: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/scheduler/schedules/{name}', - path: { - 'name': name, - }, - }); - } - - /** - * Deletes an existing workflow schedule by name - * @param name - * @returns any OK - * @throws ApiError - */ - public deleteSchedule( - name: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/scheduler/schedules/{name}', - path: { - 'name': name, - }, - }); - } - - /** - * Get list of the next x (default 3, max 5) execution times for a scheduler - * @param cronExpression - * @param scheduleStartTime - * @param scheduleEndTime - * @param limit - * @returns number OK - * @throws ApiError - */ - public getNextFewSchedules( - cronExpression: string, - scheduleStartTime?: number, - scheduleEndTime?: number, - limit: number = 3, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/scheduler/nextFewSchedules', - query: { - 'cronExpression': cronExpression, - 'scheduleStartTime': scheduleStartTime, - 'scheduleEndTime': scheduleEndTime, - 'limit': limit, - }, - }); - } - - /** - * Pauses an existing schedule by name - * @param name - * @returns any OK - * @throws ApiError - */ - public pauseSchedule( - name: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/scheduler/schedules/{name}/pause', - path: { - 'name': name, - }, - }); - } - - /** - * Pause all scheduling in a single conductor server instance (for debugging only) - * @returns any OK - * @throws ApiError - */ - public pauseAllSchedules(): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/scheduler/admin/pause', - }); - } - - /** - * Resume a paused schedule by name - * @param name - * @returns any OK - * @throws ApiError - */ - public resumeSchedule( - name: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/scheduler/schedules/{name}/resume', - path: { - 'name': name, - }, - }); - } - - /** - * Requeue all execution records - * @returns any OK - * @throws ApiError - */ - public requeueAllExecutionRecords(): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/scheduler/admin/requeue', - }); - } - - /** - * Resume all scheduling - * @returns any OK - * @throws ApiError - */ - public resumeAllSchedules(): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/scheduler/admin/resume', - }); - } - - /** - * Get all existing workflow schedules and optionally filter by workflow name - * @param workflowName - * @returns WorkflowSchedule OK - * @throws ApiError - */ - public getAllSchedules( - workflowName?: string, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/scheduler/schedules', - query: { - 'workflowName': workflowName, - }, - }); - } - - /** - * Create or update a schedule for a specified workflow with a corresponding start workflow request - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public saveSchedule( - requestBody: SaveScheduleRequest, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/scheduler/schedules', - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Test timeout - do not use in production - * @returns any OK - * @throws ApiError - */ - public testTimeout(): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/scheduler/test/timeout', - }); - } - - /** - * Search for workflows based on payload and other parameters - * use sort options as sort=:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - * @param start - * @param size - * @param sort - * @param freeText - * @param query - * @returns SearchResultWorkflowScheduleExecutionModel OK - * @throws ApiError - */ - public searchV21( - start?: number, - size: number = 100, - sort?: string, - freeText: string = '*', - query?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/scheduler/search/executions', - query: { - 'start': start, - 'size': size, - 'sort': sort, - 'freeText': freeText, - 'query': query, - }, - }); - } - -} diff --git a/src/common/open-api/services/ServiceRegistryResourceService.ts b/src/common/open-api/services/ServiceRegistryResourceService.ts deleted file mode 100644 index 8eb2a4ec..00000000 --- a/src/common/open-api/services/ServiceRegistryResourceService.ts +++ /dev/null @@ -1,270 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - - -import type {CancelablePromise} from '../core/CancelablePromise'; -import type {BaseHttpRequest} from '../core/BaseHttpRequest'; -import { - CircuitBreakerTransitionResponse, - ProtoRegistryEntry, - ServiceMethod, - ServiceRegistry -} from "../models/ServiceRegistryModels"; - -export class ServiceRegistryResourceService { - - constructor(public readonly httpRequest: BaseHttpRequest) { - } - - /** - * Retrieve all registered services - * @returns Array List of all registered services - * @throws ApiError - */ - public getRegisteredServices(): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/registry/service', - }); - } - - /** - * Remove a service by name - * @param name The name of the service to remove - * @returns void - * @throws ApiError - */ - public removeService(name: string): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/registry/service/{name}', - path: { - 'name': name, - }, - }); - } - - /** - * Get a service by name - * @param name The name of the service to retrieve - * @returns ServiceRegistryModels The requested service registry - * @throws ApiError - */ - public getService(name: string): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/registry/service/{name}', - path: { - 'name': name, - }, - }); - } - - /** - * Open the circuit breaker for a service - * @param name The name of the service - * @returns CircuitBreakerTransitionResponse Response with circuit breaker status - * @throws ApiError - */ - public openCircuitBreaker(name: string): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/registry/service/{name}/circuit-breaker/open', - path: { - 'name': name, - }, - }); - } - - /** - * Close the circuit breaker for a service - * @param name The name of the service - * @returns CircuitBreakerTransitionResponse Response with circuit breaker status - * @throws ApiError - */ - public closeCircuitBreaker(name: string): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/registry/service/{name}/circuit-breaker/close', - path: { - 'name': name, - }, - }); - } - - /** - * Get circuit breaker status for a service - * @param name The name of the service - * @returns CircuitBreakerTransitionResponse Response with circuit breaker status - * @throws ApiError - */ - public getCircuitBreakerStatus(name: string): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/registry/service/{name}/circuit-breaker/status', - path: { - 'name': name, - }, - }); - } - - /** - * Add or update a service registry - * @param serviceRegistry The service registry to add or update - * @returns void - * @throws ApiError - */ - public addOrUpdateService(serviceRegistry: ServiceRegistry): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/registry/service', - body: serviceRegistry, - mediaType: 'application/json', - }); - } - - /** - * Add or update a service method - * @param registryName The name of the registry - * @param method The service method to add or update - * @returns void - * @throws ApiError - */ - public addOrUpdateServiceMethod(registryName: string, method: ServiceMethod): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/registry/service/{registryName}/methods', - path: { - 'registryName': registryName, - }, - body: method, - mediaType: 'application/json', - }); - } - - /** - * Remove a service method - * @param registryName The name of the registry - * @param serviceName The name of the service - * @param method The name of the method - * @param methodType The type of the method - * @returns void - * @throws ApiError - */ - public removeMethod( - registryName: string, - serviceName: string, - method: string, - methodType: string - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/registry/service/{registryName}/methods', - path: { - 'registryName': registryName, - }, - query: { - 'serviceName': serviceName, - 'method': method, - 'methodType': methodType, - }, - }); - } - - /** - * Get proto data - * @param registryName The name of the registry - * @param filename The name of the proto file - * @returns binary The proto file data - * @throws ApiError - */ - public getProtoData(registryName: string, filename: string): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/registry/service/protos/{registryName}/{filename}', - path: { - 'registryName': registryName, - 'filename': filename, - }, - headers: { - 'Accept': 'application/octet-stream' - } - }); - } - - /** - * Set proto data - * @param registryName The name of the registry - * @param filename The name of the proto file - * @param data The proto file data - * @returns void - * @throws ApiError - */ - public setProtoData(registryName: string, filename: string, data: Blob): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/registry/service/protos/{registryName}/{filename}', - path: { - 'registryName': registryName, - 'filename': filename, - }, - body: data, - mediaType: 'application/octet-stream', - }); - } - - /** - * Delete a proto file - * @param registryName The name of the registry - * @param filename The name of the proto file - * @returns void - * @throws ApiError - */ - public deleteProto(registryName: string, filename: string): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/registry/service/protos/{registryName}/{filename}', - path: { - 'registryName': registryName, - 'filename': filename, - }, - }); - } - - /** - * Get all proto files for a registry - * @param registryName The name of the registry - * @returns Array List of proto registry entries - * @throws ApiError - */ - public getAllProtos(registryName: string): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/registry/service/protos/{registryName}', - path: { - 'registryName': registryName, - }, - }); - } - - /** - * Discover service methods - * @param name The name of the service - * @param create Whether to create the discovered methods (defaults to false) - * @returns Array The discovered service methods - * @throws ApiError - */ - public discover(name: string, create: boolean = false): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/registry/service/{name}/discover', - path: { - 'name': name, - }, - query: { - 'create': create, - }, - }); - } -} diff --git a/src/common/open-api/services/TaskResourceService.ts b/src/common/open-api/services/TaskResourceService.ts deleted file mode 100644 index 66412bd4..00000000 --- a/src/common/open-api/services/TaskResourceService.ts +++ /dev/null @@ -1,449 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type {ExternalStorageLocation} from '../models/ExternalStorageLocation'; -import type {PollData} from '../models/PollData'; -import type {SearchResultTask} from '../models/SearchResultTask'; -import type {SearchResultTaskSummary} from '../models/SearchResultTaskSummary'; -import type {Task} from '../models/Task'; -import type {TaskExecLog} from '../models/TaskExecLog'; -import type {TaskResult} from '../models/TaskResult'; - -import type {CancelablePromise} from '../core/CancelablePromise'; -import type {BaseHttpRequest} from '../core/BaseHttpRequest'; -import {Workflow} from "../models/Workflow"; -import {ReturnStrategy} from "../../types"; -import {SignalResponse} from "../models/SignalResponse"; -import {TaskResultStatusEnum} from "../models/TaskResultStatusEnum"; - -export class TaskResourceService { - - constructor(public readonly httpRequest: BaseHttpRequest) { - } - - /** - * Poll for a task of a certain type - * @param tasktype - * @param workerid - * @param domain - * @returns Task OK - * @throws ApiError - */ - public poll( - tasktype: string, - workerid?: string, - domain?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/poll/{tasktype}', - path: { - 'tasktype': tasktype, - }, - query: { - 'workerid': workerid, - 'domain': domain, - }, - }); - } - - /** - * Get the details about each queue - * @returns number OK - * @throws ApiError - */ - public allVerbose(): CancelablePromise>>> { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/queue/all/verbose', - }); - } - - /** - * Update a task By Ref Name - * @param workflowId - * @param taskRefName - * @param status - * @param requestBody - * @returns string OK - * @throws ApiError - */ - public updateTask( - workflowId: string, - taskRefName: string, - status: 'IN_PROGRESS' | 'FAILED' | 'FAILED_WITH_TERMINAL_ERROR' | 'COMPLETED', - requestBody: Record, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/tasks/{workflowId}/{taskRefName}/{status}', - path: { - 'workflowId': workflowId, - 'taskRefName': taskRefName, - 'status': status, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Get task by Id - * @param taskId - * @returns Task OK - * @throws ApiError - */ - public getTask( - taskId: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/{taskId}', - path: { - 'taskId': taskId, - }, - }); - } - - /** - * Get the details about each queue - * @returns number OK - * @throws ApiError - */ - public all(): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/queue/all', - }); - } - - /** - * Requeue pending tasks - * @param taskType - * @returns string OK - * @throws ApiError - */ - public requeuePendingTask( - taskType: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/tasks/queue/requeue/{taskType}', - path: { - 'taskType': taskType, - }, - }); - } - - /** - * Search for tasks based in payload and other parameters - * use sort options as sort=:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - * @param start - * @param size - * @param sort - * @param freeText - * @param query - * @returns SearchResultTaskSummary OK - * @throws ApiError - */ - public search( - start?: number, - size: number = 100, - sort?: string, - freeText: string = '*', - query?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/search', - query: { - 'start': start, - 'size': size, - 'sort': sort, - 'freeText': freeText, - 'query': query, - }, - }); - } - - /** - * Search for tasks based in payload and other parameters - * use sort options as sort=:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - * @param start - * @param size - * @param sort - * @param freeText - * @param query - * @returns SearchResultTask OK - * @throws ApiError - */ - public searchV22( - start?: number, - size: number = 100, - sort?: string, - freeText: string = '*', - query?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/search-v2', - query: { - 'start': start, - 'size': size, - 'sort': sort, - 'freeText': freeText, - 'query': query, - }, - }); - } - - /** - * Get the last poll data for a given task type - * @param taskType - * @returns PollData OK - * @throws ApiError - */ - public getPollData( - taskType: string, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/queue/polldata', - query: { - 'taskType': taskType, - }, - }); - } - - /** - * Get Task Execution Logs - * @param taskId - * @returns TaskExecLog OK - * @throws ApiError - */ - public getTaskLogs( - taskId: string, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/{taskId}/log', - path: { - 'taskId': taskId, - }, - }); - } - - /** - * Log Task Execution Details - * @param taskId - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public log( - taskId: string, - requestBody: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/tasks/{taskId}/log', - path: { - 'taskId': taskId, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Get the last poll data for all task types - * @returns PollData OK - * @throws ApiError - */ - public getAllPollData(): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/queue/polldata/all', - }); - } - - /** - * Batch poll for a task of a certain type - * @param tasktype - * @param workerid - * @param domain - * @param count - * @param timeout - * @returns Task OK - * @throws ApiError - */ - public batchPoll( - tasktype: string, - workerid?: string, - domain?: string, - count: number = 1, - timeout: number = 100, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/poll/batch/{tasktype}', - path: { - 'tasktype': tasktype, - }, - query: { - 'workerid': workerid, - 'domain': domain, - 'count': count, - 'timeout': timeout, - }, - }); - } - - /** - * Update a task - * @param requestBody - * @returns string OK - * @throws ApiError - */ - public updateTask1( - requestBody: TaskResult, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/tasks', - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Get Task type queue sizes - * @param taskType - * @returns number OK - * @throws ApiError - */ - public size1( - taskType?: Array, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/queue/sizes', - query: { - 'taskType': taskType, - }, - }); - } - - /** - * Get the external uri where the task payload is to be stored - * @param path - * @param operation - * @param payloadType - * @returns ExternalStorageLocation OK - * @throws ApiError - */ - public getExternalStorageLocation1( - path: string, - operation: string, - payloadType: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/tasks/externalstoragelocation', - query: { - 'path': path, - 'operation': operation, - 'payloadType': payloadType, - }, - }); - } - - /** - * Update a task By Ref Name synchronously. The output data is merged if data from a previous API call already exists. - * @param workflowId - * @param taskRefName - * @param status - * @param output - * @param workerId - Optional - * @returns Workflow - * @throws ApiError - */ - public updateTaskSync( - workflowId: string, - taskRefName: string, - status: TaskResultStatusEnum, - output: Record, - workerId?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/tasks/{workflowId}/{taskRefName}/{status}/sync', - path: { - 'workflowId': workflowId, - 'taskRefName': taskRefName, - 'status': status, - }, - query: { - 'workerid': workerId, - }, - body: output, - mediaType: 'application/json', - }); - } - - /** - * Signals a task in a workflow synchronously and returns data based on the specified return strategy - * @param workflowId - Workflow ID of the workflow to be signaled - * @param status - Signal status to be set for the workflow - * @param output - Output for the task - * @param returnStrategy - Optional strategy for what data to return (defaults to TARGET_WORKFLOW) - * @returns SignalResponse with data based on the return strategy - * @throws ApiError - */ - public signal( - workflowId: string, - status: TaskResultStatusEnum, - output: Record, - returnStrategy: ReturnStrategy = ReturnStrategy.TARGET_WORKFLOW, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/tasks/{workflowId}/{status}/signal/sync', - path: { - 'workflowId': workflowId, - 'status': status, - }, - query: { - 'returnStrategy': returnStrategy, - }, - body: output, - mediaType: 'application/json', - }); - } - - /** - * Signals a task in a workflow asynchronously (fire-and-forget) - * @param workflowId - Workflow ID of the workflow to be signaled - * @param status - Signal status to be set for the workflow - * @param output - Output for the task - * @returns Promise - * @throws ApiError - */ - public signalAsync( - workflowId: string, - status: TaskResultStatusEnum, - output: Record, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/tasks/{workflowId}/{status}/signal', - path: { - 'workflowId': workflowId, - 'status': status, - }, - body: output, - mediaType: 'application/json', - }); - } - -} diff --git a/src/common/open-api/services/TokenResourceService.ts b/src/common/open-api/services/TokenResourceService.ts deleted file mode 100644 index d4ae99cf..00000000 --- a/src/common/open-api/services/TokenResourceService.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { GenerateTokenRequest } from '../models/GenerateTokenRequest'; -import type { Response } from '../models/Response'; -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; -export class TokenResourceService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Generate JWT with the given access key - * @param requestBody - * @returns Response OK - * @throws ApiError - */ - public generateToken( - requestBody: GenerateTokenRequest, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/token', - body: requestBody, - mediaType: 'application/json', - }); - } - /** - * Get the user info from the token - * @param claims - * @returns any OK - * @throws ApiError - */ - public getUserInfo( - claims: boolean = false, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/token/userInfo', - query: { - 'claims': claims, - }, - }); - } -} diff --git a/src/common/open-api/services/WorkflowBulkResourceService.ts b/src/common/open-api/services/WorkflowBulkResourceService.ts deleted file mode 100644 index 2f927270..00000000 --- a/src/common/open-api/services/WorkflowBulkResourceService.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { BulkResponse } from '../models/BulkResponse'; - -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; - -export class WorkflowBulkResourceService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Retry the last failed task for each workflow from the list - * @param requestBody - * @returns BulkResponse OK - * @throws ApiError - */ - public retry( - requestBody: Array, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow/bulk/retry', - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Restart the list of completed workflow - * @param requestBody - * @param useLatestDefinitions - * @returns BulkResponse OK - * @throws ApiError - */ - public restart( - requestBody: Array, - useLatestDefinitions: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow/bulk/restart', - query: { - 'useLatestDefinitions': useLatestDefinitions, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Terminate workflows execution - * @param requestBody - * @param reason - * @returns BulkResponse OK - * @throws ApiError - */ - public terminate( - requestBody: Array, - reason?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow/bulk/terminate', - query: { - 'reason': reason, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Resume the list of workflows - * @param requestBody - * @returns BulkResponse OK - * @throws ApiError - */ - public resumeWorkflow( - requestBody: Array, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/workflow/bulk/resume', - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Pause the list of workflows - * @param requestBody - * @returns BulkResponse OK - * @throws ApiError - */ - public pauseWorkflow1( - requestBody: Array, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/workflow/bulk/pause', - body: requestBody, - mediaType: 'application/json', - }); - } - -} diff --git a/src/common/open-api/services/WorkflowResourceService.ts b/src/common/open-api/services/WorkflowResourceService.ts deleted file mode 100644 index e0649182..00000000 --- a/src/common/open-api/services/WorkflowResourceService.ts +++ /dev/null @@ -1,636 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type {ExternalStorageLocation} from '../models/ExternalStorageLocation'; -import type {RerunWorkflowRequest} from '../models/RerunWorkflowRequest'; -import type {ScrollableSearchResultWorkflowSummary} from '../models/ScrollableSearchResultWorkflowSummary'; -import type {SearchResultWorkflow} from '../models/SearchResultWorkflow'; -import type {SearchResultWorkflowSummary} from '../models/SearchResultWorkflowSummary'; -import type {SkipTaskRequest} from '../models/SkipTaskRequest'; -import type {StartWorkflowRequest} from '../models/StartWorkflowRequest'; -import type {Workflow} from '../models/Workflow'; -import type {WorkflowStatus} from '../models/WorkflowStatus'; -import type {WorkflowTestRequest} from '../models/WorkflowTestRequest'; - - -import type {CancelablePromise} from '../core/CancelablePromise'; -import type {BaseHttpRequest} from '../core/BaseHttpRequest'; -import {ReturnStrategy} from "../../types"; -import {SignalResponse} from "../models/SignalResponse"; - -export class WorkflowResourceService { - - constructor(public readonly httpRequest: BaseHttpRequest) { - } - - /** - * Retrieve all the running workflows - * @param name - * @param version - * @param startTime - * @param endTime - * @returns string OK - * @throws ApiError - */ - public getRunningWorkflow( - name: string, - version: number = 1, - startTime?: number, - endTime?: number, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/workflow/running/{name}', - path: { - 'name': name, - }, - query: { - 'version': version, - 'startTime': startTime, - 'endTime': endTime, - }, - }); - } - - /** - * Execute a workflow synchronously - * @param body - * @param name - * @param version - * @param requestId - * @param waitUntilTaskRef - * @param waitForSeconds - Optional, defaults to 10 - * @param consistency - Optional, defaults to "DURABLE" - * @param returnStrategy - Optional, defaults to "TARGET_WORKFLOW" - * @returns SignalResponse - * @throws ApiError - */ - public executeWorkflow( - body: StartWorkflowRequest, - name: string, - version: number, - requestId?: string, - waitUntilTaskRef?: string, - waitForSeconds?: number, - consistency?: string, - returnStrategy?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow/execute/{name}/{version}', - path: { - 'name': name, - 'version': version, - }, - query: { - 'requestId': requestId, - 'waitUntilTaskRef': waitUntilTaskRef, - 'waitForSeconds': waitForSeconds, - 'consistency': consistency, - 'returnStrategy': returnStrategy, - }, - body: body, - mediaType: 'application/json', - }); - } - - /** - * Start a new workflow with StartWorkflowRequest, which allows task to be executed in a domain - * @param requestBody - * @returns string OK - * @throws ApiError - */ - public startWorkflow( - requestBody: StartWorkflowRequest, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow', - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Starts the decision task for a workflow - * @param workflowId - * @returns any OK - * @throws ApiError - */ - public decide( - workflowId: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/workflow/decide/{workflowId}', - path: { - 'workflowId': workflowId, - }, - }); - } - - /** - * Reruns the workflow from a specific task - * @param workflowId - * @param requestBody - * @returns string OK - * @throws ApiError - */ - public rerun( - workflowId: string, - requestBody: RerunWorkflowRequest, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow/{workflowId}/rerun', - path: { - 'workflowId': workflowId, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Search for workflows based on payload and other parameters - * use sort options as sort=:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - * @param start - * @param size - * @param sort - * @param freeText - * @param query - * @returns SearchResultWorkflow OK - * @throws ApiError - */ - public searchV21( - start?: number, - size: number = 100, - sort?: string, - freeText: string = '*', - query?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/workflow/search-v2', - query: { - 'start': start, - 'size': size, - 'sort': sort, - 'freeText': freeText, - 'query': query, - }, - }); - } - - /** - * Pauses the workflow - * @param workflowId - * @returns any OK - * @throws ApiError - */ - public pauseWorkflow( - workflowId: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/workflow/{workflowId}/pause', - path: { - 'workflowId': workflowId, - }, - }); - } - - /** - * Skips a given task from a current running workflow - * @param workflowId - * @param taskReferenceName - * @param requestBody - * @returns any OK - * @throws ApiError - */ - public skipTaskFromWorkflow( - workflowId: string, - taskReferenceName: string, - requestBody?: SkipTaskRequest, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/workflow/{workflowId}/skiptask/{taskReferenceName}', - path: { - 'workflowId': workflowId, - 'taskReferenceName': taskReferenceName, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Lists workflows for the given correlation id list - * @param name - * @param requestBody - * @param includeClosed - * @param includeTasks - * @returns Workflow OK - * @throws ApiError - */ - public getWorkflows( - name: string, - requestBody: Array, - includeClosed: boolean = false, - includeTasks: boolean = false, - ): CancelablePromise>> { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow/{name}/correlated', - path: { - 'name': name, - }, - query: { - 'includeClosed': includeClosed, - 'includeTasks': includeTasks, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Gets the workflow by workflow id - * @param workflowId - * @param includeOutput - * @param includeVariables - * @returns WorkflowStatus OK - * @throws ApiError - */ - public getWorkflowStatusSummary( - workflowId: string, - includeOutput: boolean = false, - includeVariables: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/workflow/{workflowId}/status', - path: { - 'workflowId': workflowId, - }, - query: { - 'includeOutput': includeOutput, - 'includeVariables': includeVariables, - }, - }); - } - - /** - * Lists workflows for the given correlation id - * @param name - * @param correlationId - * @param includeClosed - * @param includeTasks - * @returns Workflow OK - * @throws ApiError - */ - public getWorkflows1( - name: string, - correlationId: string, - includeClosed: boolean = false, - includeTasks: boolean = false, - ): CancelablePromise> { - return this.httpRequest.request({ - method: 'GET', - url: '/workflow/{name}/correlated/{correlationId}', - path: { - 'name': name, - 'correlationId': correlationId, - }, - query: { - 'includeClosed': includeClosed, - 'includeTasks': includeTasks, - }, - }); - } - - /** - * Retries the last failed task - * @param workflowId - * @param resumeSubworkflowTasks - * @returns void - * @throws ApiError - */ - public retry1( - workflowId: string, - resumeSubworkflowTasks: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow/{workflowId}/retry', - path: { - 'workflowId': workflowId, - }, - query: { - 'resumeSubworkflowTasks': resumeSubworkflowTasks, - }, - }); - } - - /** - * Gets the workflow by workflow id - * @param workflowId - * @param includeTasks - * @returns Workflow OK - * @throws ApiError - */ - public getExecutionStatus( - workflowId: string, - includeTasks: boolean = true, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/workflow/{workflowId}', - path: { - 'workflowId': workflowId, - }, - query: { - 'includeTasks': includeTasks, - }, - }); - } - - /** - * Terminate workflow execution - * @param workflowId - * @param reason - * @returns any OK - * @throws ApiError - */ - public terminate1( - workflowId: string, - reason?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/workflow/{workflowId}', - path: { - 'workflowId': workflowId, - }, - query: { - 'reason': reason, - }, - }); - } - - /** - * Resumes the workflow - * @param workflowId - * @returns any OK - * @throws ApiError - */ - public resumeWorkflow( - workflowId: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/workflow/{workflowId}/resume', - path: { - 'workflowId': workflowId, - }, - }); - } - - /** - * Removes the workflow from the system - * @param workflowId - * @param archiveWorkflow - * @returns any OK - * @throws ApiError - */ - public delete( - workflowId: string, - archiveWorkflow: boolean = true, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/workflow/{workflowId}/remove', - path: { - 'workflowId': workflowId, - }, - query: { - 'archiveWorkflow': archiveWorkflow, - }, - }); - } - - /** - * Search for workflows based on task parameters - * use sort options as sort=:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - * @param start - * @param size - * @param sort - * @param freeText - * @param query - * @returns SearchResultWorkflowSummary OK - * @throws ApiError - */ - public searchWorkflowsByTasks( - start?: number, - size: number = 100, - sort?: string, - freeText: string = '*', - query?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/workflow/search-by-tasks', - query: { - 'start': start, - 'size': size, - 'sort': sort, - 'freeText': freeText, - 'query': query, - }, - }); - } - - /** - * Get the uri and path of the external storage where the workflow payload is to be stored - * @param path - * @param operation - * @param payloadType - * @returns ExternalStorageLocation OK - * @throws ApiError - */ - public getExternalStorageLocation( - path: string, - operation: string, - payloadType: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/workflow/externalstoragelocation', - query: { - 'path': path, - 'operation': operation, - 'payloadType': payloadType, - }, - }); - } - - /** - * Start a new workflow. Returns the ID of the workflow instance that can be later used for tracking - * @param name - * @param requestBody - * @param version - * @param correlationId - * @param priority - * @returns string OK - * @throws ApiError - */ - public startWorkflow1( - name: string, - requestBody: Record, - version?: number, - correlationId?: string, - priority?: number, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow/{name}', - path: { - 'name': name, - }, - query: { - 'version': version, - 'correlationId': correlationId, - 'priority': priority, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * Restarts a completed workflow - * @param workflowId - * @param useLatestDefinitions - * @returns void - * @throws ApiError - */ - public restart1( - workflowId: string, - useLatestDefinitions: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow/{workflowId}/restart', - path: { - 'workflowId': workflowId, - }, - query: { - 'useLatestDefinitions': useLatestDefinitions, - }, - }); - } - - /** - * Search for workflows based on payload and other parameters - * use sort options as sort=:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC. - * @param queryId - * @param start - * @param size - * @param sort - * @param freeText - * @param query - * @param skipCache - * @returns ScrollableSearchResultWorkflowSummary OK - * @throws ApiError - */ - public search1( - queryId?: string, - start?: number, - size: number = 100, - sort?: string, - freeText: string = '*', - query?: string, - skipCache: boolean = false, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/workflow/search', - query: { - 'queryId': queryId, - 'start': start, - 'size': size, - 'sort': sort, - 'freeText': freeText, - 'query': query, - 'skipCache': skipCache, - }, - }); - } - - /** - * Search for workflows based on task parameters - * use sort options as sort=:ASC|DESC e.g. sort=name&sort=workflowId:DESC. If order is not specified, defaults to ASC - * @param start - * @param size - * @param sort - * @param freeText - * @param query - * @returns SearchResultWorkflow OK - * @throws ApiError - */ - public searchWorkflowsByTasksV2( - start?: number, - size: number = 100, - sort?: string, - freeText: string = '*', - query?: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/workflow/search-by-tasks-v2', - query: { - 'start': start, - 'size': size, - 'sort': sort, - 'freeText': freeText, - 'query': query, - }, - }); - } - - /** - * Resets callback times of all non-terminal SIMPLE tasks to 0 - * @param workflowId - * @returns void - * @throws ApiError - */ - public resetWorkflow( - workflowId: string, - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow/{workflowId}/resetcallbacks', - path: { - 'workflowId': workflowId, - }, - }); - } - - /** - * Test workflow execution using mock data - * @param requestBody - * @returns Workflow OK - * @throws ApiError - */ - public testWorkflow( - requestBody: WorkflowTestRequest - ): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/workflow/test', - body: requestBody, - mediaType: 'application/json', - }); - } -} diff --git a/src/common/open-api/types.gen.ts b/src/common/open-api/types.gen.ts new file mode 100644 index 00000000..44005b9c --- /dev/null +++ b/src/common/open-api/types.gen.ts @@ -0,0 +1,8528 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type ClientOptions = { + baseUrl: 'https://sdkdev.orkesconductor.io' | (string & {}); +}; + +export type Action = { + action?: 'start_workflow' | 'complete_task' | 'fail_task' | 'terminate_workflow' | 'update_workflow_variables'; + complete_task?: TaskDetails; + expandInlineJSON?: boolean; + fail_task?: TaskDetails; + start_workflow?: StartWorkflowRequest; + terminate_workflow?: TerminateWorkflow; + update_workflow_variables?: UpdateWorkflowVariables; +}; + +export type Any = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: Any; + descriptorForType?: Descriptor; + initializationErrorString?: string; + initialized?: boolean; + parserForType?: ParserAny; + serializedSize?: number; + typeUrl?: string; + typeUrlBytes?: ByteString; + unknownFields?: UnknownFieldSet; + value?: ByteString; +}; + +export type AuthorizationRequest = { + /** + * The set of access which is granted or removed + */ + access: Array<'CREATE' | 'READ' | 'EXECUTE' | 'UPDATE' | 'DELETE'>; + subject: SubjectRef; + target: TargetRef; +}; + +export type BulkResponse = { + bulkErrorResults?: { + [key: string]: string; + }; + bulkSuccessfulResults?: Array<{ + [key: string]: unknown; + }>; +}; + +export type ByteString = { + empty?: boolean; + validUtf8?: boolean; +}; + +export type CacheConfig = { + key?: string; + ttlInSecond?: number; +}; + +export type CircuitBreakerTransitionResponse = { + currentState?: string; + message?: string; + previousState?: string; + service?: string; + transitionTimestamp?: number; +}; + +export type ConductorUser = { + applicationUser?: boolean; + encryptedId?: boolean; + encryptedIdDisplayValue?: string; + groups?: Array; + id?: string; + name?: string; + orkesWorkersApp?: boolean; + roles?: Array; + uuid?: string; +}; + +export type Config = { + circuitBreakerConfig?: OrkesCircuitBreakerConfig; +}; + +export type ConnectivityTestInput = { + input?: { + [key: string]: unknown; + }; + sink: string; +}; + +export type ConnectivityTestResult = { + reason?: string; + successful?: boolean; + workflowId?: string; +}; + +export type CorrelationIdsSearchRequest = { + correlationIds: Array; + workflowNames: Array; +}; + +export type CreateOrUpdateApplicationRequest = { + /** + * Application's name e.g.: Payment Processors + */ + name: string; +}; + +export type Declaration = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: Declaration; + descriptorForType?: Descriptor; + fullName?: string; + fullNameBytes?: ByteString; + initializationErrorString?: string; + initialized?: boolean; + number?: number; + parserForType?: ParserDeclaration; + repeated?: boolean; + reserved?: boolean; + serializedSize?: number; + type?: string; + typeBytes?: ByteString; + unknownFields?: UnknownFieldSet; +}; + +export type DeclarationOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: Message; + descriptorForType?: Descriptor; + fullName?: string; + fullNameBytes?: ByteString; + initializationErrorString?: string; + initialized?: boolean; + number?: number; + repeated?: boolean; + reserved?: boolean; + type?: string; + typeBytes?: ByteString; + unknownFields?: UnknownFieldSet; +}; + +export type Descriptor = { + containingType?: Descriptor; + enumTypes?: Array; + extendable?: boolean; + extensions?: Array; + fields?: Array; + file?: FileDescriptor; + fullName?: string; + index?: number; + name?: string; + nestedTypes?: Array; + oneofs?: Array; + options?: MessageOptions; + proto?: DescriptorProto; + realOneofs?: Array; +}; + +export type DescriptorProto = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: DescriptorProto; + descriptorForType?: Descriptor; + enumTypeCount?: number; + enumTypeList?: Array; + enumTypeOrBuilderList?: Array; + extensionCount?: number; + extensionList?: Array; + extensionOrBuilderList?: Array; + extensionRangeCount?: number; + extensionRangeList?: Array; + extensionRangeOrBuilderList?: Array; + fieldCount?: number; + fieldList?: Array; + fieldOrBuilderList?: Array; + initializationErrorString?: string; + initialized?: boolean; + name?: string; + nameBytes?: ByteString; + nestedTypeCount?: number; + nestedTypeList?: Array; + nestedTypeOrBuilderList?: Array; + oneofDeclCount?: number; + oneofDeclList?: Array; + oneofDeclOrBuilderList?: Array; + options?: MessageOptions; + optionsOrBuilder?: MessageOptionsOrBuilder; + parserForType?: ParserDescriptorProto; + reservedNameCount?: number; + reservedNameList?: Array; + reservedRangeCount?: number; + reservedRangeList?: Array; + reservedRangeOrBuilderList?: Array; + serializedSize?: number; + unknownFields?: UnknownFieldSet; +}; + +export type DescriptorProtoOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: Message; + descriptorForType?: Descriptor; + enumTypeCount?: number; + enumTypeList?: Array; + enumTypeOrBuilderList?: Array; + extensionCount?: number; + extensionList?: Array; + extensionOrBuilderList?: Array; + extensionRangeCount?: number; + extensionRangeList?: Array; + extensionRangeOrBuilderList?: Array; + fieldCount?: number; + fieldList?: Array; + fieldOrBuilderList?: Array; + initializationErrorString?: string; + initialized?: boolean; + name?: string; + nameBytes?: ByteString; + nestedTypeCount?: number; + nestedTypeList?: Array; + oneofDeclCount?: number; + oneofDeclList?: Array; + oneofDeclOrBuilderList?: Array; + options?: MessageOptions; + optionsOrBuilder?: MessageOptionsOrBuilder; + reservedNameCount?: number; + reservedNameList?: Array; + reservedRangeCount?: number; + reservedRangeList?: Array; + reservedRangeOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; +}; + +export type EditionDefault = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: EditionDefault; + descriptorForType?: Descriptor; + edition?: 'EDITION_UNKNOWN' | 'EDITION_PROTO2' | 'EDITION_PROTO3' | 'EDITION_2023' | 'EDITION_1_TEST_ONLY' | 'EDITION_2_TEST_ONLY' | 'EDITION_99997_TEST_ONLY' | 'EDITION_99998_TEST_ONLY' | 'EDITION_99999_TEST_ONLY'; + initializationErrorString?: string; + initialized?: boolean; + parserForType?: ParserEditionDefault; + serializedSize?: number; + unknownFields?: UnknownFieldSet; + value?: string; + valueBytes?: ByteString; +}; + +export type EditionDefaultOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: Message; + descriptorForType?: Descriptor; + edition?: 'EDITION_UNKNOWN' | 'EDITION_PROTO2' | 'EDITION_PROTO3' | 'EDITION_2023' | 'EDITION_1_TEST_ONLY' | 'EDITION_2_TEST_ONLY' | 'EDITION_99997_TEST_ONLY' | 'EDITION_99998_TEST_ONLY' | 'EDITION_99999_TEST_ONLY'; + initializationErrorString?: string; + initialized?: boolean; + unknownFields?: UnknownFieldSet; + value?: string; + valueBytes?: ByteString; +}; + +export type EnumDescriptor = { + closed?: boolean; + containingType?: Descriptor; + file?: FileDescriptor; + fullName?: string; + index?: number; + name?: string; + options?: EnumOptions; + proto?: EnumDescriptorProto; + values?: Array; +}; + +export type EnumDescriptorProto = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: EnumDescriptorProto; + descriptorForType?: Descriptor; + initializationErrorString?: string; + initialized?: boolean; + name?: string; + nameBytes?: ByteString; + options?: EnumOptions; + optionsOrBuilder?: EnumOptionsOrBuilder; + parserForType?: ParserEnumDescriptorProto; + reservedNameCount?: number; + reservedNameList?: Array; + reservedRangeCount?: number; + reservedRangeList?: Array; + reservedRangeOrBuilderList?: Array; + serializedSize?: number; + unknownFields?: UnknownFieldSet; + valueCount?: number; + valueList?: Array; + valueOrBuilderList?: Array; +}; + +export type EnumDescriptorProtoOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: Message; + descriptorForType?: Descriptor; + initializationErrorString?: string; + initialized?: boolean; + name?: string; + nameBytes?: ByteString; + options?: EnumOptions; + optionsOrBuilder?: EnumOptionsOrBuilder; + reservedNameCount?: number; + reservedNameList?: Array; + reservedRangeCount?: number; + reservedRangeList?: Array; + reservedRangeOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; + valueCount?: number; + valueList?: Array; + valueOrBuilderList?: Array; +}; + +export type EnumOptions = { + allFields?: { + [key: string]: unknown; + }; + allFieldsRaw?: { + [key: string]: unknown; + }; + allowAlias?: boolean; + defaultInstanceForType?: EnumOptions; + deprecated?: boolean; + /** + * @deprecated + */ + deprecatedLegacyJsonFieldConflicts?: boolean; + descriptorForType?: Descriptor; + features?: FeatureSet; + featuresOrBuilder?: FeatureSetOrBuilder; + initializationErrorString?: string; + initialized?: boolean; + parserForType?: ParserEnumOptions; + serializedSize?: number; + uninterpretedOptionCount?: number; + uninterpretedOptionList?: Array; + uninterpretedOptionOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; +}; + +export type EnumOptionsOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + allowAlias?: boolean; + defaultInstanceForType?: Message; + deprecated?: boolean; + /** + * @deprecated + */ + deprecatedLegacyJsonFieldConflicts?: boolean; + descriptorForType?: Descriptor; + features?: FeatureSet; + featuresOrBuilder?: FeatureSetOrBuilder; + initializationErrorString?: string; + initialized?: boolean; + uninterpretedOptionCount?: number; + uninterpretedOptionList?: Array; + uninterpretedOptionOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; +}; + +export type EnumReservedRange = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: EnumReservedRange; + descriptorForType?: Descriptor; + end?: number; + initializationErrorString?: string; + initialized?: boolean; + parserForType?: ParserEnumReservedRange; + serializedSize?: number; + start?: number; + unknownFields?: UnknownFieldSet; +}; + +export type EnumReservedRangeOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: Message; + descriptorForType?: Descriptor; + end?: number; + initializationErrorString?: string; + initialized?: boolean; + start?: number; + unknownFields?: UnknownFieldSet; +}; + +export type EnumValueDescriptor = { + file?: FileDescriptor; + fullName?: string; + index?: number; + name?: string; + number?: number; + options?: EnumValueOptions; + proto?: EnumValueDescriptorProto; + type?: EnumDescriptor; +}; + +export type EnumValueDescriptorProto = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: EnumValueDescriptorProto; + descriptorForType?: Descriptor; + initializationErrorString?: string; + initialized?: boolean; + name?: string; + nameBytes?: ByteString; + number?: number; + options?: EnumValueOptions; + optionsOrBuilder?: EnumValueOptionsOrBuilder; + parserForType?: ParserEnumValueDescriptorProto; + serializedSize?: number; + unknownFields?: UnknownFieldSet; +}; + +export type EnumValueDescriptorProtoOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: Message; + descriptorForType?: Descriptor; + initializationErrorString?: string; + initialized?: boolean; + name?: string; + nameBytes?: ByteString; + number?: number; + options?: EnumValueOptions; + optionsOrBuilder?: EnumValueOptionsOrBuilder; + unknownFields?: UnknownFieldSet; +}; + +export type EnumValueOptions = { + allFields?: { + [key: string]: unknown; + }; + allFieldsRaw?: { + [key: string]: unknown; + }; + debugRedact?: boolean; + defaultInstanceForType?: EnumValueOptions; + deprecated?: boolean; + descriptorForType?: Descriptor; + features?: FeatureSet; + featuresOrBuilder?: FeatureSetOrBuilder; + initializationErrorString?: string; + initialized?: boolean; + parserForType?: ParserEnumValueOptions; + serializedSize?: number; + uninterpretedOptionCount?: number; + uninterpretedOptionList?: Array; + uninterpretedOptionOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; +}; + +export type EnumValueOptionsOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + debugRedact?: boolean; + defaultInstanceForType?: Message; + deprecated?: boolean; + descriptorForType?: Descriptor; + features?: FeatureSet; + featuresOrBuilder?: FeatureSetOrBuilder; + initializationErrorString?: string; + initialized?: boolean; + uninterpretedOptionCount?: number; + uninterpretedOptionList?: Array; + uninterpretedOptionOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; +}; + +export type EnvironmentVariable = { + name?: string; + tags?: Array; + value?: string; +}; + +export type EventHandler = { + actions?: Array; + active?: boolean; + condition?: string; + createdBy?: string; + description?: string; + evaluatorType?: string; + event?: string; + name?: string; + orgId?: string; + tags?: Array; +}; + +export type EventLog = { + createdAt?: number; + event?: string; + eventType?: 'SEND' | 'RECEIVE'; + handlerName?: string; + id?: string; + taskId?: string; + workerId?: string; +}; + +export type EventMessage = { + createdAt?: number; + eventExecutions?: Array; + eventTarget?: string; + eventType?: 'WEBHOOK' | 'MESSAGE'; + fullPayload?: { + [key: string]: unknown; + }; + id?: string; + orgId?: string; + payload?: string; + status?: 'RECEIVED' | 'HANDLED' | 'REJECTED'; + statusDescription?: string; +}; + +export type ExtendedConductorApplication = { + createTime?: number; + createdBy?: string; + id?: string; + name?: string; + tags?: Array; + updateTime?: number; + updatedBy?: string; +}; + +export type ExtendedEventExecution = { + action?: 'start_workflow' | 'complete_task' | 'fail_task' | 'terminate_workflow' | 'update_workflow_variables'; + created?: number; + event?: string; + eventHandler?: EventHandler; + fullMessagePayload?: { + [key: string]: unknown; + }; + id?: string; + messageId?: string; + name?: string; + orgId?: string; + output?: { + [key: string]: unknown; + }; + payload?: { + [key: string]: unknown; + }; + status?: 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'SKIPPED'; + statusDescription?: string; +}; + +export type ExtendedSecret = { + name?: string; + tags?: Array; +}; + +export type ExtendedTaskDef = { + backoffScaleFactor?: number; + baseType?: string; + concurrentExecLimit?: number; + createTime?: number; + createdBy?: string; + description?: string; + enforceSchema?: boolean; + executionNameSpace?: string; + inputKeys?: Array; + inputSchema?: SchemaDef; + inputTemplate?: { + [key: string]: unknown; + }; + isolationGroupId?: string; + name: string; + outputKeys?: Array; + outputSchema?: SchemaDef; + overwriteTags?: boolean; + ownerApp?: string; + ownerEmail?: string; + pollTimeoutSeconds?: number; + rateLimitFrequencyInSeconds?: number; + rateLimitPerFrequency?: number; + responseTimeoutSeconds?: number; + retryCount?: number; + retryDelaySeconds?: number; + retryLogic?: 'FIXED' | 'EXPONENTIAL_BACKOFF' | 'LINEAR_BACKOFF'; + tags?: Array; + timeoutPolicy?: 'RETRY' | 'TIME_OUT_WF' | 'ALERT_ONLY'; + timeoutSeconds: number; + totalTimeoutSeconds: number; + updateTime?: number; + updatedBy?: string; +}; + +export type ExtendedWorkflowDef = { + cacheConfig?: CacheConfig; + createTime?: number; + createdBy?: string; + description?: string; + enforceSchema?: boolean; + failureWorkflow?: string; + inputParameters?: Array; + inputSchema?: SchemaDef; + inputTemplate?: { + [key: string]: unknown; + }; + maskedFields?: Array; + metadata?: { + [key: string]: unknown; + }; + name: string; + outputParameters?: { + [key: string]: unknown; + }; + outputSchema?: SchemaDef; + overwriteTags?: boolean; + ownerApp?: string; + ownerEmail?: string; + rateLimitConfig?: RateLimitConfig; + restartable?: boolean; + schemaVersion?: number; + tags?: Array; + tasks: Array; + timeoutPolicy?: 'TIME_OUT_WF' | 'ALERT_ONLY'; + timeoutSeconds: number; + updateTime?: number; + updatedBy?: string; + variables?: { + [key: string]: unknown; + }; + version?: number; + workflowStatusListenerEnabled?: boolean; + workflowStatusListenerSink?: string; +}; + +export type ExtensionRange = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: ExtensionRange; + descriptorForType?: Descriptor; + end?: number; + initializationErrorString?: string; + initialized?: boolean; + options?: ExtensionRangeOptions; + optionsOrBuilder?: ExtensionRangeOptionsOrBuilder; + parserForType?: ParserExtensionRange; + serializedSize?: number; + start?: number; + unknownFields?: UnknownFieldSet; +}; + +export type ExtensionRangeOptions = { + allFields?: { + [key: string]: unknown; + }; + allFieldsRaw?: { + [key: string]: unknown; + }; + declarationCount?: number; + declarationList?: Array; + declarationOrBuilderList?: Array; + defaultInstanceForType?: ExtensionRangeOptions; + descriptorForType?: Descriptor; + features?: FeatureSet; + featuresOrBuilder?: FeatureSetOrBuilder; + initializationErrorString?: string; + initialized?: boolean; + parserForType?: ParserExtensionRangeOptions; + serializedSize?: number; + uninterpretedOptionCount?: number; + uninterpretedOptionList?: Array; + uninterpretedOptionOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; + verification?: 'DECLARATION' | 'UNVERIFIED'; +}; + +export type ExtensionRangeOptionsOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + declarationCount?: number; + declarationList?: Array; + declarationOrBuilderList?: Array; + defaultInstanceForType?: Message; + descriptorForType?: Descriptor; + features?: FeatureSet; + featuresOrBuilder?: FeatureSetOrBuilder; + initializationErrorString?: string; + initialized?: boolean; + uninterpretedOptionCount?: number; + uninterpretedOptionList?: Array; + uninterpretedOptionOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; + verification?: 'DECLARATION' | 'UNVERIFIED'; +}; + +export type ExtensionRangeOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: Message; + descriptorForType?: Descriptor; + end?: number; + initializationErrorString?: string; + initialized?: boolean; + options?: ExtensionRangeOptions; + optionsOrBuilder?: ExtensionRangeOptionsOrBuilder; + start?: number; + unknownFields?: UnknownFieldSet; +}; + +export type FeatureSet = { + allFields?: { + [key: string]: unknown; + }; + allFieldsRaw?: { + [key: string]: unknown; + }; + defaultInstanceForType?: FeatureSet; + descriptorForType?: Descriptor; + enumType?: 'ENUM_TYPE_UNKNOWN' | 'OPEN' | 'CLOSED'; + fieldPresence?: 'FIELD_PRESENCE_UNKNOWN' | 'EXPLICIT' | 'IMPLICIT' | 'LEGACY_REQUIRED'; + initializationErrorString?: string; + initialized?: boolean; + jsonFormat?: 'JSON_FORMAT_UNKNOWN' | 'ALLOW' | 'LEGACY_BEST_EFFORT'; + messageEncoding?: 'MESSAGE_ENCODING_UNKNOWN' | 'LENGTH_PREFIXED' | 'DELIMITED'; + parserForType?: ParserFeatureSet; + repeatedFieldEncoding?: 'REPEATED_FIELD_ENCODING_UNKNOWN' | 'PACKED' | 'EXPANDED'; + serializedSize?: number; + unknownFields?: UnknownFieldSet; + utf8Validation?: 'UTF8_VALIDATION_UNKNOWN' | 'NONE' | 'VERIFY'; +}; + +export type FeatureSetOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: Message; + descriptorForType?: Descriptor; + enumType?: 'ENUM_TYPE_UNKNOWN' | 'OPEN' | 'CLOSED'; + fieldPresence?: 'FIELD_PRESENCE_UNKNOWN' | 'EXPLICIT' | 'IMPLICIT' | 'LEGACY_REQUIRED'; + initializationErrorString?: string; + initialized?: boolean; + jsonFormat?: 'JSON_FORMAT_UNKNOWN' | 'ALLOW' | 'LEGACY_BEST_EFFORT'; + messageEncoding?: 'MESSAGE_ENCODING_UNKNOWN' | 'LENGTH_PREFIXED' | 'DELIMITED'; + repeatedFieldEncoding?: 'REPEATED_FIELD_ENCODING_UNKNOWN' | 'PACKED' | 'EXPANDED'; + unknownFields?: UnknownFieldSet; + utf8Validation?: 'UTF8_VALIDATION_UNKNOWN' | 'NONE' | 'VERIFY'; +}; + +export type FieldDescriptor = { + containingOneof?: OneofDescriptor; + containingType?: Descriptor; + defaultValue?: { + [key: string]: unknown; + }; + enumType?: EnumDescriptor; + extension?: boolean; + extensionScope?: Descriptor; + file?: FileDescriptor; + fullName?: string; + index?: number; + javaType?: 'INT' | 'LONG' | 'FLOAT' | 'DOUBLE' | 'BOOLEAN' | 'STRING' | 'BYTE_STRING' | 'ENUM' | 'MESSAGE'; + jsonName?: string; + liteJavaType?: 'INT' | 'LONG' | 'FLOAT' | 'DOUBLE' | 'BOOLEAN' | 'STRING' | 'BYTE_STRING' | 'ENUM' | 'MESSAGE'; + liteType?: 'DOUBLE' | 'FLOAT' | 'INT64' | 'UINT64' | 'INT32' | 'FIXED64' | 'FIXED32' | 'BOOL' | 'STRING' | 'GROUP' | 'MESSAGE' | 'BYTES' | 'UINT32' | 'ENUM' | 'SFIXED32' | 'SFIXED64' | 'SINT32' | 'SINT64'; + mapField?: boolean; + messageType?: Descriptor; + name?: string; + number?: number; + optional?: boolean; + options?: FieldOptions; + packable?: boolean; + packed?: boolean; + proto?: FieldDescriptorProto; + realContainingOneof?: OneofDescriptor; + repeated?: boolean; + required?: boolean; + type?: 'DOUBLE' | 'FLOAT' | 'INT64' | 'UINT64' | 'INT32' | 'FIXED64' | 'FIXED32' | 'BOOL' | 'STRING' | 'GROUP' | 'MESSAGE' | 'BYTES' | 'UINT32' | 'ENUM' | 'SFIXED32' | 'SFIXED64' | 'SINT32' | 'SINT64'; +}; + +export type FieldDescriptorProto = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: FieldDescriptorProto; + defaultValue?: string; + defaultValueBytes?: ByteString; + descriptorForType?: Descriptor; + extendee?: string; + extendeeBytes?: ByteString; + initializationErrorString?: string; + initialized?: boolean; + jsonName?: string; + jsonNameBytes?: ByteString; + label?: 'LABEL_OPTIONAL' | 'LABEL_REPEATED' | 'LABEL_REQUIRED'; + name?: string; + nameBytes?: ByteString; + number?: number; + oneofIndex?: number; + options?: FieldOptions; + optionsOrBuilder?: FieldOptionsOrBuilder; + parserForType?: ParserFieldDescriptorProto; + proto3Optional?: boolean; + serializedSize?: number; + type?: 'TYPE_DOUBLE' | 'TYPE_FLOAT' | 'TYPE_INT64' | 'TYPE_UINT64' | 'TYPE_INT32' | 'TYPE_FIXED64' | 'TYPE_FIXED32' | 'TYPE_BOOL' | 'TYPE_STRING' | 'TYPE_GROUP' | 'TYPE_MESSAGE' | 'TYPE_BYTES' | 'TYPE_UINT32' | 'TYPE_ENUM' | 'TYPE_SFIXED32' | 'TYPE_SFIXED64' | 'TYPE_SINT32' | 'TYPE_SINT64'; + typeName?: string; + typeNameBytes?: ByteString; + unknownFields?: UnknownFieldSet; +}; + +export type FieldDescriptorProtoOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: Message; + defaultValue?: string; + defaultValueBytes?: ByteString; + descriptorForType?: Descriptor; + extendee?: string; + extendeeBytes?: ByteString; + initializationErrorString?: string; + initialized?: boolean; + jsonName?: string; + jsonNameBytes?: ByteString; + label?: 'LABEL_OPTIONAL' | 'LABEL_REPEATED' | 'LABEL_REQUIRED'; + name?: string; + nameBytes?: ByteString; + number?: number; + oneofIndex?: number; + options?: FieldOptions; + optionsOrBuilder?: FieldOptionsOrBuilder; + proto3Optional?: boolean; + type?: 'TYPE_DOUBLE' | 'TYPE_FLOAT' | 'TYPE_INT64' | 'TYPE_UINT64' | 'TYPE_INT32' | 'TYPE_FIXED64' | 'TYPE_FIXED32' | 'TYPE_BOOL' | 'TYPE_STRING' | 'TYPE_GROUP' | 'TYPE_MESSAGE' | 'TYPE_BYTES' | 'TYPE_UINT32' | 'TYPE_ENUM' | 'TYPE_SFIXED32' | 'TYPE_SFIXED64' | 'TYPE_SINT32' | 'TYPE_SINT64'; + typeName?: string; + typeNameBytes?: ByteString; + unknownFields?: UnknownFieldSet; +}; + +export type FieldOptions = { + allFields?: { + [key: string]: unknown; + }; + allFieldsRaw?: { + [key: string]: unknown; + }; + ctype?: 'STRING' | 'CORD' | 'STRING_PIECE'; + debugRedact?: boolean; + defaultInstanceForType?: FieldOptions; + deprecated?: boolean; + descriptorForType?: Descriptor; + editionDefaultsCount?: number; + editionDefaultsList?: Array; + editionDefaultsOrBuilderList?: Array; + features?: FeatureSet; + featuresOrBuilder?: FeatureSetOrBuilder; + initializationErrorString?: string; + initialized?: boolean; + jstype?: 'JS_NORMAL' | 'JS_STRING' | 'JS_NUMBER'; + lazy?: boolean; + packed?: boolean; + parserForType?: ParserFieldOptions; + retention?: 'RETENTION_UNKNOWN' | 'RETENTION_RUNTIME' | 'RETENTION_SOURCE'; + serializedSize?: number; + targetsCount?: number; + targetsList?: Array<'TARGET_TYPE_UNKNOWN' | 'TARGET_TYPE_FILE' | 'TARGET_TYPE_EXTENSION_RANGE' | 'TARGET_TYPE_MESSAGE' | 'TARGET_TYPE_FIELD' | 'TARGET_TYPE_ONEOF' | 'TARGET_TYPE_ENUM' | 'TARGET_TYPE_ENUM_ENTRY' | 'TARGET_TYPE_SERVICE' | 'TARGET_TYPE_METHOD'>; + uninterpretedOptionCount?: number; + uninterpretedOptionList?: Array; + uninterpretedOptionOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; + unverifiedLazy?: boolean; + weak?: boolean; +}; + +export type FieldOptionsOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + ctype?: 'STRING' | 'CORD' | 'STRING_PIECE'; + debugRedact?: boolean; + defaultInstanceForType?: Message; + deprecated?: boolean; + descriptorForType?: Descriptor; + editionDefaultsCount?: number; + editionDefaultsList?: Array; + editionDefaultsOrBuilderList?: Array; + features?: FeatureSet; + featuresOrBuilder?: FeatureSetOrBuilder; + initializationErrorString?: string; + initialized?: boolean; + jstype?: 'JS_NORMAL' | 'JS_STRING' | 'JS_NUMBER'; + lazy?: boolean; + packed?: boolean; + retention?: 'RETENTION_UNKNOWN' | 'RETENTION_RUNTIME' | 'RETENTION_SOURCE'; + targetsCount?: number; + targetsList?: Array<'TARGET_TYPE_UNKNOWN' | 'TARGET_TYPE_FILE' | 'TARGET_TYPE_EXTENSION_RANGE' | 'TARGET_TYPE_MESSAGE' | 'TARGET_TYPE_FIELD' | 'TARGET_TYPE_ONEOF' | 'TARGET_TYPE_ENUM' | 'TARGET_TYPE_ENUM_ENTRY' | 'TARGET_TYPE_SERVICE' | 'TARGET_TYPE_METHOD'>; + uninterpretedOptionCount?: number; + uninterpretedOptionList?: Array; + uninterpretedOptionOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; + unverifiedLazy?: boolean; + weak?: boolean; +}; + +export type FileDescriptor = { + dependencies?: Array; + edition?: 'EDITION_UNKNOWN' | 'EDITION_PROTO2' | 'EDITION_PROTO3' | 'EDITION_2023' | 'EDITION_1_TEST_ONLY' | 'EDITION_2_TEST_ONLY' | 'EDITION_99997_TEST_ONLY' | 'EDITION_99998_TEST_ONLY' | 'EDITION_99999_TEST_ONLY'; + editionName?: string; + enumTypes?: Array; + extensions?: Array; + file?: FileDescriptor; + fullName?: string; + messageTypes?: Array; + name?: string; + options?: FileOptions; + package?: string; + proto?: FileDescriptorProto; + publicDependencies?: Array; + services?: Array; + /** + * @deprecated + */ + syntax?: 'UNKNOWN' | 'PROTO2' | 'PROTO3' | 'EDITIONS'; +}; + +export type FileDescriptorProto = { + allFields?: { + [key: string]: unknown; + }; + defaultInstanceForType?: FileDescriptorProto; + dependencyCount?: number; + dependencyList?: Array; + descriptorForType?: Descriptor; + edition?: 'EDITION_UNKNOWN' | 'EDITION_PROTO2' | 'EDITION_PROTO3' | 'EDITION_2023' | 'EDITION_1_TEST_ONLY' | 'EDITION_2_TEST_ONLY' | 'EDITION_99997_TEST_ONLY' | 'EDITION_99998_TEST_ONLY' | 'EDITION_99999_TEST_ONLY'; + enumTypeCount?: number; + enumTypeList?: Array; + enumTypeOrBuilderList?: Array; + extensionCount?: number; + extensionList?: Array; + extensionOrBuilderList?: Array; + initializationErrorString?: string; + initialized?: boolean; + messageTypeCount?: number; + messageTypeList?: Array; + messageTypeOrBuilderList?: Array; + name?: string; + nameBytes?: ByteString; + options?: FileOptions; + optionsOrBuilder?: FileOptionsOrBuilder; + package?: string; + packageBytes?: ByteString; + parserForType?: ParserFileDescriptorProto; + publicDependencyCount?: number; + publicDependencyList?: Array; + serializedSize?: number; + serviceCount?: number; + serviceList?: Array; + serviceOrBuilderList?: Array; + sourceCodeInfo?: SourceCodeInfo; + sourceCodeInfoOrBuilder?: SourceCodeInfoOrBuilder; + syntax?: string; + syntaxBytes?: ByteString; + unknownFields?: UnknownFieldSet; + weakDependencyCount?: number; + weakDependencyList?: Array; +}; + +export type FileOptions = { + allFields?: { + [key: string]: unknown; + }; + allFieldsRaw?: { + [key: string]: unknown; + }; + ccEnableArenas?: boolean; + ccGenericServices?: boolean; + csharpNamespace?: string; + csharpNamespaceBytes?: ByteString; + defaultInstanceForType?: FileOptions; + deprecated?: boolean; + descriptorForType?: Descriptor; + features?: FeatureSet; + featuresOrBuilder?: FeatureSetOrBuilder; + goPackage?: string; + goPackageBytes?: ByteString; + initializationErrorString?: string; + initialized?: boolean; + /** + * @deprecated + */ + javaGenerateEqualsAndHash?: boolean; + javaGenericServices?: boolean; + javaMultipleFiles?: boolean; + javaOuterClassname?: string; + javaOuterClassnameBytes?: ByteString; + javaPackage?: string; + javaPackageBytes?: ByteString; + javaStringCheckUtf8?: boolean; + objcClassPrefix?: string; + objcClassPrefixBytes?: ByteString; + optimizeFor?: 'SPEED' | 'CODE_SIZE' | 'LITE_RUNTIME'; + parserForType?: ParserFileOptions; + phpClassPrefix?: string; + phpClassPrefixBytes?: ByteString; + phpGenericServices?: boolean; + phpMetadataNamespace?: string; + phpMetadataNamespaceBytes?: ByteString; + phpNamespace?: string; + phpNamespaceBytes?: ByteString; + pyGenericServices?: boolean; + rubyPackage?: string; + rubyPackageBytes?: ByteString; + serializedSize?: number; + swiftPrefix?: string; + swiftPrefixBytes?: ByteString; + uninterpretedOptionCount?: number; + uninterpretedOptionList?: Array; + uninterpretedOptionOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; +}; + +export type FileOptionsOrBuilder = { + allFields?: { + [key: string]: unknown; + }; + ccEnableArenas?: boolean; + ccGenericServices?: boolean; + csharpNamespace?: string; + csharpNamespaceBytes?: ByteString; + defaultInstanceForType?: Message; + deprecated?: boolean; + descriptorForType?: Descriptor; + features?: FeatureSet; + featuresOrBuilder?: FeatureSetOrBuilder; + goPackage?: string; + goPackageBytes?: ByteString; + initializationErrorString?: string; + initialized?: boolean; + /** + * @deprecated + */ + javaGenerateEqualsAndHash?: boolean; + javaGenericServices?: boolean; + javaMultipleFiles?: boolean; + javaOuterClassname?: string; + javaOuterClassnameBytes?: ByteString; + javaPackage?: string; + javaPackageBytes?: ByteString; + javaStringCheckUtf8?: boolean; + objcClassPrefix?: string; + objcClassPrefixBytes?: ByteString; + optimizeFor?: 'SPEED' | 'CODE_SIZE' | 'LITE_RUNTIME'; + phpClassPrefix?: string; + phpClassPrefixBytes?: ByteString; + phpGenericServices?: boolean; + phpMetadataNamespace?: string; + phpMetadataNamespaceBytes?: ByteString; + phpNamespace?: string; + phpNamespaceBytes?: ByteString; + pyGenericServices?: boolean; + rubyPackage?: string; + rubyPackageBytes?: ByteString; + swiftPrefix?: string; + swiftPrefixBytes?: ByteString; + uninterpretedOptionCount?: number; + uninterpretedOptionList?: Array; + uninterpretedOptionOrBuilderList?: Array; + unknownFields?: UnknownFieldSet; +}; + +export type GenerateTokenRequest = { + expiration?: number; + keyId: string; + keySecret: string; +}; + +export type GrantedAccess = { + access?: Array<'CREATE' | 'READ' | 'EXECUTE' | 'UPDATE' | 'DELETE'>; + tag?: string; + target?: TargetRef; +}; + +export type GrantedAccessResponse = { + grantedAccess?: Array; +}; + +export type Group = { + defaultAccess?: { + [key: string]: Array<'CREATE' | 'READ' | 'EXECUTE' | 'UPDATE' | 'DELETE'>; + }; + description?: string; + id?: string; + roles?: Array; +}; + +export type HandledEventResponse = { + active?: boolean; + event?: string; + name?: string; + numberOfActions?: number; + numberOfMessages?: number; +}; + +export type HumanTaskAssignment = { + assignee?: HumanTaskUser; + slaMinutes?: number; +}; + +export type HumanTaskDefinition = { + assignmentCompletionStrategy?: 'LEAVE_OPEN' | 'TERMINATE'; + assignments?: Array; + displayName?: string; + fullTemplate?: HumanTaskTemplate; + taskTriggers?: Array; + userFormTemplate?: UserFormTemplate; +}; + +export type HumanTaskEntry = { + assignee?: HumanTaskUser; + claimant?: HumanTaskUser; + createdBy?: string; + createdOn?: number; + definitionName?: string; + displayName?: string; + humanTaskDef?: HumanTaskDefinition; + input?: { + [key: string]: unknown; + }; + output?: { + [key: string]: unknown; + }; + ownerApp?: string; + state?: 'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT' | 'DELETED'; + taskId?: string; + taskRefName?: string; + updatedBy?: string; + updatedOn?: number; + workflowId?: string; + workflowName?: string; +}; + +export type HumanTaskSearch = { + assignees?: Array; + claimants?: Array; + definitionNames?: Array; + displayNames?: Array; + fullTextQuery?: string; + searchType?: 'ADMIN' | 'INBOX'; + size?: number; + start?: number; + states?: Array<'PENDING' | 'ASSIGNED' | 'IN_PROGRESS' | 'COMPLETED' | 'TIMED_OUT' | 'DELETED'>; + taskInputQuery?: string; + taskOutputQuery?: string; + taskRefNames?: Array; + updateEndTime?: number; + updateStartTime?: number; + workflowIds?: Array; + workflowNames?: Array; +}; + +export type HumanTaskSearchResult = { + hits?: number; + pageSizeLimit?: number; + results?: Array; + start?: number; + totalHits?: number; +}; + +export type HumanTaskTemplate = { + createTime?: number; + createdBy?: string; + jsonSchema: { + [key: string]: unknown; + }; + name: string; + ownerApp?: string; + tags?: Array; + templateUI: { + [key: string]: unknown; + }; + updateTime?: number; + updatedBy?: string; + version: number; +}; + +export type HumanTaskTrigger = { + startWorkflowRequest?: StartWorkflowRequest; + triggerType?: 'ASSIGNEE_CHANGED' | 'CLAIMANT_CHANGED' | 'PENDING' | 'IN_PROGRESS' | 'ASSIGNED' | 'COMPLETED' | 'TIMED_OUT'; +}; + +export type HumanTaskUser = { + user?: string; + userType?: 'EXTERNAL_USER' | 'EXTERNAL_GROUP' | 'CONDUCTOR_USER' | 'CONDUCTOR_GROUP'; +}; + +export type IncomingBpmnFile = { + fileContent: string; + fileName: string; +}; + +export type Integration = { + apis?: Array; + category?: 'API' | 'AI_MODEL' | 'VECTOR_DB' | 'RELATIONAL_DB' | 'MESSAGE_BROKER' | 'GIT' | 'EMAIL' | 'MCP'; + configuration?: { + [key: string]: unknown; + }; + createTime?: number; + createdBy?: string; + description?: string; + enabled?: boolean; + modelsCount?: number; + name?: string; + ownerApp?: string; + tags?: Array; + type?: string; + updateTime?: number; + updatedBy?: string; +}; + +export type IntegrationApi = { + api?: string; + configuration?: { + [key: string]: unknown; + }; + createTime?: number; + createdBy?: string; + description?: string; + enabled?: boolean; + integrationName?: string; + ownerApp?: string; + tags?: Array; + updateTime?: number; + updatedBy?: string; +}; + +export type IntegrationApiUpdate = { + configuration?: { + [key: string]: unknown; + }; + description?: string; + enabled?: boolean; +}; + +export type IntegrationDef = { + apis?: Array; + category?: 'API' | 'AI_MODEL' | 'VECTOR_DB' | 'RELATIONAL_DB' | 'MESSAGE_BROKER' | 'GIT' | 'EMAIL' | 'MCP'; + categoryLabel?: string; + configuration?: Array; + description?: string; + enabled?: boolean; + iconName?: string; + name?: string; + tags?: Array; + type?: string; +}; + +export type IntegrationDefApi = { + api?: string; + description?: string; + inputSchema?: SchemaDef; + integrationType?: string; + outputSchema?: SchemaDef; +}; + +export type IntegrationDefFormField = { + defaultValue?: string; + description?: string; + fieldName?: 'api_key' | 'user' | 'endpoint' | 'authUrl' | 'environment' | 'projectName' | 'indexName' | 'publisher' | 'password' | 'namespace' | 'batchSize' | 'batchWaitTime' | 'visibilityTimeout' | 'connectionType' | 'connectionPoolSize' | 'consumer' | 'stream' | 'batchPollConsumersCount' | 'consumer_type' | 'region' | 'awsAccountId' | 'externalId' | 'roleArn' | 'protocol' | 'mechanism' | 'port' | 'schemaRegistryUrl' | 'schemaRegistryApiKey' | 'schemaRegistryApiSecret' | 'authenticationType' | 'truststoreAuthenticationType' | 'tls' | 'cipherSuite' | 'pubSubMethod' | 'keyStorePassword' | 'keyStoreLocation' | 'schemaRegistryAuthType' | 'valueSubjectNameStrategy' | 'datasourceURL' | 'jdbcDriver' | 'subscription' | 'serviceAccountCredentials' | 'file' | 'tlsFile' | 'queueManager' | 'groupId' | 'channel' | 'dimensions' | 'distance_metric' | 'indexing_method' | 'inverted_list_count' | 'pullPeriod' | 'pullBatchWaitMillis' | 'completionsPath' | 'betaVersion' | 'version'; + fieldType?: 'DROPDOWN' | 'TEXT' | 'PASSWORD' | 'FILE'; + label?: string; + optional?: boolean; + value?: string; + valueOptions?: Array