@epilot/automation-client
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -12,52 +12,43 @@ /* eslint-disable */ | ||
namespace Schemas { | ||
export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerWebhookAction | CreateDocumentAction | SendEmailAction | AutomationAction; | ||
/** | ||
* example: | ||
* [ | ||
* { | ||
* "step_name": "Lead Sales", | ||
* "user_ids": [ | ||
* 10010729 | ||
* ] | ||
* }, | ||
* { | ||
* "step_name": "Operations", | ||
* "user_ids": [ | ||
* 10010728, | ||
* 10010729 | ||
* ] | ||
* } | ||
* ] | ||
*/ | ||
export interface AssignUsersToStep { | ||
step_name?: string; | ||
user_ids?: number[]; | ||
} | ||
export interface AutomationAction { | ||
id?: AutomationActionId; | ||
/** | ||
* example: | ||
* Create Contact | ||
*/ | ||
name?: string; | ||
/** | ||
* example: | ||
* entity_mapping | ||
*/ | ||
type?: string; | ||
config?: { | ||
[name: string]: any; | ||
}; | ||
execution_status?: ExecutionStatus; | ||
started_at?: string; | ||
updated_at?: string; | ||
/** | ||
* example: | ||
* { | ||
* "target_schema": "contact", | ||
* "mapping_attributes": [ | ||
* { | ||
* "target": "email", | ||
* "mode": "upsert_match", | ||
* "source": "billing_contact.email" | ||
* }, | ||
* { | ||
* "target": "first_name", | ||
* "mode": "copy_if_exists", | ||
* "source": "billing_contact.first_name" | ||
* }, | ||
* { | ||
* "target": "last_name", | ||
* "mode": "copy_if_exists", | ||
* "source": "billing_contact.last_name" | ||
* }, | ||
* { | ||
* "target": "addresses", | ||
* "mode": "append_if_exists", | ||
* "source": "billing_contact", | ||
* "value_json": "{\n \"street_name\": \"{{billing_contact.street_name}}\",\n \"street_number\": \"{{billing_contact.street_number}}\",\n \"city\": \"{{billing_contact.city}}\",\n \"postal_code\": \"{{billing_contact.postal_code}}\",\n \"country\": \"{{billing_contact.country}}\",\n}" | ||
* }, | ||
* { | ||
* "target": "addresses", | ||
* "mode": "append_if_exists", | ||
* "source": "delivery_contact", | ||
* "value_json": "{\n \"street_name\": \"{{delivery_contact.street_name}}\",\n \"street_number\": \"{{delivery_contact.street_number}}\",\n \"city\": \"{{delivery_contact.city}}\",\n \"postal_code\": \"{{delivery_contact.postal_code}}\",\n \"country\": \"{{delivery_contact.country}}\",\n}" | ||
* } | ||
* ] | ||
* } | ||
* Flag indicating whether the action was created automatically or manually | ||
*/ | ||
config?: { | ||
created_automatically?: boolean; | ||
outputs?: { | ||
[name: string]: any; | ||
}; | ||
error_output?: ErrorOutput; | ||
} | ||
@@ -69,113 +60,253 @@ /** | ||
export type AutomationActionId = string; | ||
export interface AutomationDefinition { | ||
id?: AutomationDefinitionId; | ||
export interface AutomationExecution { | ||
id: AutomationExecutionId; | ||
/** | ||
* example: | ||
* Handle contact form | ||
* success | ||
*/ | ||
definition_name?: string; | ||
triggers?: { | ||
on: "entity_create" | "entity_update" | "entity_delete" | "journey_submit" | "frontend_submit"; | ||
/** | ||
* example: | ||
* { | ||
* "entity_schema": "contact" | ||
* } | ||
*/ | ||
config: { | ||
[name: string]: any; | ||
}; | ||
}[]; | ||
execution_status?: ExecutionStatus; | ||
entity_id: EntityId; | ||
org_id: OrganizationId; | ||
flow_id: AutomationFlowId; | ||
/** | ||
* schemas this automation is available for | ||
* example: | ||
* Handle contact form | ||
*/ | ||
schemas?: string[]; | ||
actions?: AutomationAction[]; | ||
flow_name?: string; | ||
created_at?: string; // date-time | ||
updated_at?: string; // date-time | ||
current_action_id?: AutomationActionId; | ||
actions: AnyAction[]; | ||
} | ||
/** | ||
* example: | ||
* 7791b04a-16d2-44a2-9af9-2d59c25c512f | ||
* 9baf184f-bc81-4128-bca3-d974c90a12c4 | ||
*/ | ||
export type AutomationDefinitionId = string; | ||
export interface AutomationExecution { | ||
id?: AutomationExecutionId; | ||
export type AutomationExecutionId = string; | ||
export interface AutomationFlow { | ||
id?: AutomationFlowId; | ||
/** | ||
* example: | ||
* success | ||
* Handle contact form | ||
*/ | ||
status?: "pending" | "in_progress" | "success" | "failed" | "cancelled"; | ||
entity_id?: EntityId; | ||
definition_id?: AutomationDefinitionId; | ||
flow_name?: string; | ||
/** | ||
* Number of automation executions that ran | ||
* example: | ||
* 7 | ||
*/ | ||
runs?: number; | ||
triggers?: (FrontendSubmitTrigger | JourneySubmitTrigger | EntityOperationTrigger)[]; | ||
trigger_conditions?: TriggerCondition[]; | ||
/** | ||
* The entity schema | ||
* example: | ||
* submission | ||
*/ | ||
entity_schema?: string; | ||
actions?: AnyAction[]; | ||
created_at?: string; // date-time | ||
updated_at?: string; // date-time | ||
current_action?: AutomationActionId; | ||
actions?: { | ||
status?: "pending" | "in_progress" | "success" | "failed"; | ||
} | ||
/** | ||
* example: | ||
* 7791b04a-16d2-44a2-9af9-2d59c25c512f | ||
*/ | ||
export type AutomationFlowId = string; | ||
export type Comparison = "equals" | "any_of" | "not_empty" | "is_empty"; | ||
/** | ||
* example: | ||
* { | ||
* "id": "08g988-ojt2jtaga-292h-8978gsaga", | ||
* "name": "Create Document", | ||
* "type": "create-document", | ||
* "config": { | ||
* "template_id": { | ||
* "type": "string", | ||
* "example": "112b08ba-789c-42f2-9940-43b302f641e8\"" | ||
* }, | ||
* "filename": { | ||
* "type": "string", | ||
* "example": "newsletter.pdf\"" | ||
* } | ||
* } | ||
* } | ||
*/ | ||
export interface CreateDocumentAction { | ||
id?: AutomationActionId; | ||
name?: string; | ||
type?: string; | ||
config?: CreateDocumentConfig; | ||
execution_status?: ExecutionStatus; | ||
started_at?: string; | ||
updated_at?: string; | ||
/** | ||
* Flag indicating whether the action was created automatically or manually | ||
*/ | ||
created_automatically?: boolean; | ||
outputs?: { | ||
[name: string]: any; | ||
}; | ||
error_output?: ErrorOutput; | ||
} | ||
export interface CreateDocumentConfig { | ||
template_id?: string; | ||
filename?: string; | ||
} | ||
/** | ||
* example: | ||
* e3d3ebac-baab-4395-abf4-50b5bf1f8b74 | ||
*/ | ||
export type EntityId = string; | ||
export interface EntityOperationTrigger { | ||
type: "entity_operation"; | ||
configuration: { | ||
/** | ||
* example: | ||
* { | ||
* "affected_entities": "cbbf0e83-0f37-4a0c-9801-93877ec0b2c2" | ||
* } | ||
* 210738fe-e1e6-446e-aaef-cce462d7d813 | ||
*/ | ||
outputs?: { | ||
[name: string]: any; | ||
}; | ||
id?: AutomationActionId; | ||
source_id?: string; | ||
/** | ||
* example: | ||
* Create Contact | ||
* submission | ||
*/ | ||
name?: string; | ||
schema?: string; | ||
operations?: ("createEntity" | "updateEntity" | "deleteEntity")[]; | ||
}; | ||
} | ||
export type ErrorCode = "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "INTERNAL_ERROR" | "EMAIL_TEMPLATE_MISSING_DATA_ERROR"; | ||
export interface ErrorOutput { | ||
error_code: ErrorCode; | ||
error_reason: string; | ||
} | ||
export type ExecutionStatus = "pending" | "in_progress" | "success" | "failed" | "cancelled"; | ||
export interface FrontendSubmitTrigger { | ||
type: "frontend_submission"; | ||
configuration: { | ||
/** | ||
* example: | ||
* entity_mapping | ||
* 99 | ||
*/ | ||
type?: string; | ||
/** | ||
* example: | ||
* { | ||
* "target_schema": "contact", | ||
* "mapping_attributes": [ | ||
* { | ||
* "target": "email", | ||
* "mode": "upsert_match", | ||
* "source": "billing_contact.email" | ||
* }, | ||
* { | ||
* "target": "first_name", | ||
* "mode": "copy_if_exists", | ||
* "source": "billing_contact.first_name" | ||
* }, | ||
* { | ||
* "target": "last_name", | ||
* "mode": "copy_if_exists", | ||
* "source": "billing_contact.last_name" | ||
* }, | ||
* { | ||
* "target": "addresses", | ||
* "mode": "append_if_exists", | ||
* "source": "billing_contact", | ||
* "value_json": "{\n \"street_name\": \"{{billing_contact.street_name}}\",\n \"street_number\": \"{{billing_contact.street_number}}\",\n \"city\": \"{{billing_contact.city}}\",\n \"postal_code\": \"{{billing_contact.postal_code}}\",\n \"country\": \"{{billing_contact.country}}\",\n}" | ||
* }, | ||
* { | ||
* "target": "addresses", | ||
* "mode": "append_if_exists", | ||
* "source": "delivery_contact", | ||
* "value_json": "{\n \"street_name\": \"{{delivery_contact.street_name}}\",\n \"street_number\": \"{{delivery_contact.street_number}}\",\n \"city\": \"{{delivery_contact.city}}\",\n \"postal_code\": \"{{delivery_contact.postal_code}}\",\n \"country\": \"{{delivery_contact.country}}\",\n}" | ||
* } | ||
* ] | ||
* } | ||
*/ | ||
config?: { | ||
[name: string]: any; | ||
}; | ||
}[]; | ||
source_id?: string; | ||
}; | ||
} | ||
export interface GetExecutionsResp { | ||
total: number; | ||
results: AutomationExecution[]; | ||
} | ||
export interface JourneySubmitTrigger { | ||
type: "journey_submission"; | ||
configuration: { | ||
source_id: string; // uuid | ||
}; | ||
} | ||
/** | ||
* example: | ||
* 9baf184f-bc81-4128-bca3-d974c90a12c4 | ||
* { | ||
* "id": "2520gja-2sgmsaga-0asg-822jgal", | ||
* "name": "Map Entity", | ||
* "type": "map-entity", | ||
* "config": { | ||
* "target_schema": "contact", | ||
* "target_unique": [ | ||
* "email.email" | ||
* ], | ||
* "mapping_attributes": [ | ||
* { | ||
* "target": "email", | ||
* "mode": "append_if_exists", | ||
* "source": "billing_contact", | ||
* "value_json": "{\n \"email\": \"billing_contact.email\"\n}" | ||
* }, | ||
* { | ||
* "target": "_tags", | ||
* "mode": "set_value", | ||
* "value": [ | ||
* "primary", | ||
* "payer" | ||
* ] | ||
* }, | ||
* { | ||
* "target": "first_name", | ||
* "mode": "copy_if_exists", | ||
* "source": "billing_contact.first_name" | ||
* }, | ||
* { | ||
* "target": "last_name", | ||
* "mode": "copy_if_exists", | ||
* "source": "billing_contact.last_name" | ||
* }, | ||
* { | ||
* "target": "contact_type", | ||
* "mode": "set_value", | ||
* "value": "customer" | ||
* }, | ||
* { | ||
* "target": "addresses", | ||
* "mode": "append_if_exists", | ||
* "source": "billing_contact", | ||
* "value_json": "{\n \"street_name\": \"billing_contact.street_name\",\n \"street_number\": \"billing_contact.street_number\",\n \"city\": \"billing_contact.city\",\n \"postal_code\": \"billing_contact.postal_code\",\n \"country\": \"billing_contact.country\",\n \"_tags\": [\"billing\", \"primary\"]\n}" | ||
* }, | ||
* { | ||
* "target": "addresses", | ||
* "mode": "append_if_exists", | ||
* "source": "delivery_contact", | ||
* "value_json": "{\n \"street_name\": \"delivery_contact.street_name\",\n \"street_number\": \"delivery_contact.street_number\",\n \"city\": \"delivery_contact.city\",\n \"postal_code\": \"delivery_contact.postal_code\",\n \"country\": \"delivery_contact.country\",\n \"_tags\": [\"delivery\", \"secondary\"]\n}" | ||
* } | ||
* ] | ||
* } | ||
* } | ||
*/ | ||
export type AutomationExecutionId = string; | ||
export interface MapEntityAction { | ||
id?: AutomationActionId; | ||
name?: string; | ||
type?: string; | ||
config?: MapEntityActionConfig; | ||
execution_status?: ExecutionStatus; | ||
started_at?: string; | ||
updated_at?: string; | ||
/** | ||
* Flag indicating whether the action was created automatically or manually | ||
*/ | ||
created_automatically?: boolean; | ||
outputs?: { | ||
[name: string]: any; | ||
}; | ||
error_output?: ErrorOutput; | ||
} | ||
export interface MapEntityActionConfig { | ||
target_schema?: string; | ||
target_unique?: string[]; | ||
mapping_attributes?: MappingAttribute[]; | ||
relation_attributes?: RelationAttribute[]; | ||
} | ||
export interface MappingAttribute { | ||
/** | ||
* JSON like target path for the attribute. Eg. last_name | ||
*/ | ||
target: string; | ||
/** | ||
* - copy_if_exists - it replaces the target attribute with the source value | ||
* - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. | ||
* - set_value - it sets a value to a predefined value. Must be used together with value property. | ||
* | ||
*/ | ||
mode: "copy_if_exists" | "append_if_exists" | "set_value"; | ||
/** | ||
* JSON source path for the value to be extracted from. Eg: steps[1].['Product Info'].price | ||
* | ||
*/ | ||
source: string; | ||
/** | ||
* To be provided only when mapping json objects into a target attribute. Eg array of addresses. | ||
* | ||
*/ | ||
value_json?: string; | ||
/** | ||
* Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any. | ||
* | ||
*/ | ||
value?: { | ||
}; | ||
} | ||
/** | ||
@@ -185,3 +316,173 @@ * example: | ||
*/ | ||
export type EntityId = string; | ||
export type OrganizationId = string; | ||
export interface RelationAttribute { | ||
target: string; | ||
target_tags: string[]; | ||
related_to: { | ||
schema: string; | ||
tag: string; | ||
}; | ||
mode: "append" | "set"; | ||
} | ||
export interface SearchAutomationsResp { | ||
total: number; | ||
results: AutomationFlow; | ||
} | ||
/** | ||
* example: | ||
* { | ||
* "id": "25jga0-gkasl26-0asg-908sgaj2", | ||
* "name": "Send Email", | ||
* "type": "send-email", | ||
* "config": { | ||
* "email_template_id": "gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2", | ||
* "language_code": "de" | ||
* } | ||
* } | ||
*/ | ||
export interface SendEmailAction { | ||
id?: AutomationActionId; | ||
name?: string; | ||
type?: string; | ||
config?: SendEmailActionConfig; | ||
execution_status?: ExecutionStatus; | ||
started_at?: string; | ||
updated_at?: string; | ||
/** | ||
* Flag indicating whether the action was created automatically or manually | ||
*/ | ||
created_automatically?: boolean; | ||
outputs?: { | ||
[name: string]: any; | ||
}; | ||
error_output?: ErrorOutput; | ||
} | ||
export interface SendEmailActionConfig { | ||
email_template_id?: string; | ||
language_code?: "de" | "en"; | ||
} | ||
export interface StartExecutionRequest { | ||
entity_id?: EntityId; | ||
flow_id?: AutomationFlowId; | ||
} | ||
/** | ||
* example: | ||
* { | ||
* "source": "billing_contact.email", | ||
* "comparison": "exists" | ||
* } | ||
*/ | ||
export interface TriggerCondition { | ||
source: string; | ||
comparison: Comparison; | ||
value?: string | number | string[] | number[]; | ||
} | ||
/** | ||
* example: | ||
* { | ||
* "id": "2520gja-2sgmsaga-0asg-822jgal", | ||
* "name": "Trigger Webhook", | ||
* "type": "trigger-webhook", | ||
* "config": { | ||
* "entity_sources": [ | ||
* "contact", | ||
* "account" | ||
* ], | ||
* "target_webhook_id": "25jg9ag2ga" | ||
* } | ||
* } | ||
*/ | ||
export interface TriggerWebhookAction { | ||
id?: AutomationActionId; | ||
name?: string; | ||
type?: string; | ||
config?: TriggerWebhookActionConfig; | ||
execution_status?: ExecutionStatus; | ||
started_at?: string; | ||
updated_at?: string; | ||
/** | ||
* Flag indicating whether the action was created automatically or manually | ||
*/ | ||
created_automatically?: boolean; | ||
outputs?: { | ||
[name: string]: any; | ||
}; | ||
error_output?: ErrorOutput; | ||
} | ||
export interface TriggerWebhookActionConfig { | ||
entity_sources?: string[]; | ||
target_webhook_id?: string; | ||
} | ||
/** | ||
* example: | ||
* { | ||
* "id": "08g988-ojt2jtaga-292h-8978gsaga", | ||
* "name": "Trigger Workflow", | ||
* "type": "trigger-workflow", | ||
* "config": { | ||
* "target_workflow": "mfptvUMH", | ||
* "conditions": [ | ||
* { | ||
* "schema": "ivy-opportunity", | ||
* "source": "customer.type", | ||
* "comparison": "equals", | ||
* "value": "PRIVATE" | ||
* } | ||
* ], | ||
* "assign_steps": [ | ||
* { | ||
* "step_name": "Lead Sales", | ||
* "user_ids": [ | ||
* 10010729 | ||
* ] | ||
* }, | ||
* { | ||
* "step_name": "Operations", | ||
* "user_ids": [ | ||
* 10010728, | ||
* 10010729 | ||
* ] | ||
* } | ||
* ] | ||
* } | ||
* } | ||
*/ | ||
export interface TriggerWorkflowAction { | ||
id?: AutomationActionId; | ||
name?: string; | ||
type?: string; | ||
config?: TriggerWorkflowConfig; | ||
execution_status?: ExecutionStatus; | ||
started_at?: string; | ||
updated_at?: string; | ||
/** | ||
* Flag indicating whether the action was created automatically or manually | ||
*/ | ||
created_automatically?: boolean; | ||
outputs?: { | ||
[name: string]: any; | ||
}; | ||
error_output?: ErrorOutput; | ||
} | ||
/** | ||
* example: | ||
* { | ||
* "schema": "contact", | ||
* "source": "billing_contact.email", | ||
* "comparison": "exists", | ||
* "value": "test@epilot.cloud" | ||
* } | ||
*/ | ||
export interface TriggerWorkflowCondition { | ||
source: string; | ||
comparison: Comparison; | ||
value?: string | number | string[] | number[]; | ||
schema: string; | ||
} | ||
export interface TriggerWorkflowConfig { | ||
target_workflow?: string; | ||
conditions?: TriggerWorkflowCondition[]; | ||
assignees?: string[]; | ||
assign_steps?: AssignUsersToStep[]; | ||
} | ||
} | ||
@@ -201,30 +502,19 @@ } | ||
} | ||
namespace CreateAutomation { | ||
export type RequestBody = Components.Schemas.AutomationDefinition; | ||
namespace CreateFlow { | ||
export type RequestBody = Components.Schemas.AutomationFlow; | ||
namespace Responses { | ||
export type $201 = Components.Schemas.AutomationDefinition; | ||
export type $201 = Components.Schemas.AutomationFlow; | ||
} | ||
} | ||
namespace DeleteAutomation { | ||
namespace DeleteFlow { | ||
namespace Parameters { | ||
export type DefinitionId = Components.Schemas.AutomationDefinitionId; | ||
export type FlowId = Components.Schemas.AutomationFlowId; | ||
} | ||
export interface PathParameters { | ||
definition_id: Parameters.DefinitionId; | ||
flow_id: Parameters.FlowId; | ||
} | ||
namespace Responses { | ||
export type $200 = Components.Schemas.AutomationDefinition; | ||
export type $200 = Components.Schemas.AutomationFlow; | ||
} | ||
} | ||
namespace GetAutomation { | ||
namespace Parameters { | ||
export type DefinitionId = Components.Schemas.AutomationDefinitionId; | ||
} | ||
export interface PathParameters { | ||
definition_id: Parameters.DefinitionId; | ||
} | ||
namespace Responses { | ||
export type $200 = Components.Schemas.AutomationDefinition; | ||
} | ||
} | ||
namespace GetExecution { | ||
@@ -253,19 +543,30 @@ namespace Parameters { | ||
namespace Responses { | ||
export type $200 = Components.Schemas.AutomationExecution[]; | ||
export type $200 = Components.Schemas.GetExecutionsResp; | ||
} | ||
} | ||
namespace PutAutomation { | ||
namespace GetFlow { | ||
namespace Parameters { | ||
export type DefinitionId = Components.Schemas.AutomationDefinitionId; | ||
export type FlowId = Components.Schemas.AutomationFlowId; | ||
} | ||
export interface PathParameters { | ||
definition_id: Parameters.DefinitionId; | ||
flow_id: Parameters.FlowId; | ||
} | ||
export type RequestBody = Components.Schemas.AutomationDefinition; | ||
namespace Responses { | ||
export type $201 = Components.Schemas.AutomationDefinition; | ||
export type $200 = Components.Schemas.AutomationFlow; | ||
} | ||
} | ||
namespace SearchAutomations { | ||
namespace PutFlow { | ||
namespace Parameters { | ||
export type FlowId = Components.Schemas.AutomationFlowId; | ||
} | ||
export interface PathParameters { | ||
flow_id: Parameters.FlowId; | ||
} | ||
export type RequestBody = Components.Schemas.AutomationFlow; | ||
namespace Responses { | ||
export type $200 = Components.Schemas.AutomationFlow; | ||
} | ||
} | ||
namespace SearchFlows { | ||
namespace Parameters { | ||
export type From = number; | ||
@@ -278,2 +579,7 @@ /** | ||
export type Size = number; | ||
/** | ||
* example: | ||
* 600945fe-212e-4b97-acf7-391d64648384 | ||
*/ | ||
export type TriggerSourceId = string; | ||
} | ||
@@ -284,19 +590,10 @@ export interface QueryParameters { | ||
from?: Parameters.From; | ||
trigger_source_id?: Parameters.TriggerSourceId; | ||
} | ||
namespace Responses { | ||
export interface $200 { | ||
/** | ||
* example: | ||
* 1 | ||
*/ | ||
total?: number; | ||
results?: Components.Schemas.AutomationDefinition[]; | ||
} | ||
export type $200 = Components.Schemas.SearchAutomationsResp; | ||
} | ||
} | ||
namespace StartExecution { | ||
export interface RequestBody { | ||
entity_id?: Components.Schemas.EntityId; | ||
definition_id?: Components.Schemas.AutomationDefinitionId; | ||
} | ||
export type RequestBody = Components.Schemas.StartExecutionRequest; | ||
namespace Responses { | ||
@@ -310,51 +607,51 @@ export type $201 = Components.Schemas.AutomationExecution; | ||
/** | ||
* searchAutomations - searchAutomations | ||
* searchFlows - searchFlows | ||
* | ||
* Search available automation definitions | ||
* Search available automation flows | ||
*/ | ||
'searchAutomations'( | ||
parameters?: Parameters<Paths.SearchAutomations.QueryParameters> | null, | ||
'searchFlows'( | ||
parameters?: Parameters<Paths.SearchFlows.QueryParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.SearchAutomations.Responses.$200> | ||
): OperationResponse<Paths.SearchFlows.Responses.$200> | ||
/** | ||
* createAutomation - createAutomation | ||
* createFlow - createFlow | ||
* | ||
* Create new automation definition | ||
* Create new automation flow | ||
*/ | ||
'createAutomation'( | ||
'createFlow'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreateAutomation.RequestBody, | ||
data?: Paths.CreateFlow.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreateAutomation.Responses.$201> | ||
): OperationResponse<Paths.CreateFlow.Responses.$201> | ||
/** | ||
* getAutomation - getAutomation | ||
* getFlow - getFlow | ||
* | ||
* List available automation definitions | ||
* List available automation flows | ||
*/ | ||
'getAutomation'( | ||
parameters?: Parameters<Paths.GetAutomation.PathParameters> | null, | ||
'getFlow'( | ||
parameters?: Parameters<Paths.GetFlow.PathParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.GetAutomation.Responses.$200> | ||
): OperationResponse<Paths.GetFlow.Responses.$200> | ||
/** | ||
* putAutomation - putAutomation | ||
* putFlow - putFlow | ||
* | ||
* Update automation definition by id | ||
* Update automation flow by id | ||
*/ | ||
'putAutomation'( | ||
parameters?: Parameters<Paths.PutAutomation.PathParameters> | null, | ||
data?: Paths.PutAutomation.RequestBody, | ||
'putFlow'( | ||
parameters?: Parameters<Paths.PutFlow.PathParameters> | null, | ||
data?: Paths.PutFlow.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.PutAutomation.Responses.$201> | ||
): OperationResponse<Paths.PutFlow.Responses.$200> | ||
/** | ||
* deleteAutomation - deleteAutomation | ||
* deleteFlow - deleteFlow | ||
* | ||
* Update automation definition by id | ||
* Update automation flow by id | ||
*/ | ||
'deleteAutomation'( | ||
parameters?: Parameters<Paths.DeleteAutomation.PathParameters> | null, | ||
'deleteFlow'( | ||
parameters?: Parameters<Paths.DeleteFlow.PathParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.DeleteAutomation.Responses.$200> | ||
): OperationResponse<Paths.DeleteFlow.Responses.$200> | ||
/** | ||
@@ -400,58 +697,68 @@ * getExecutions - getExecutions | ||
): OperationResponse<Paths.CancelExecution.Responses.$200> | ||
/** | ||
* retriggerAction - retriggerAction | ||
* | ||
* Retrigger a specific automation execution action | ||
*/ | ||
'retriggerAction'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<any> | ||
} | ||
export interface PathsDictionary { | ||
['/v1/automation/definitions']: { | ||
['/v1/automation/flows']: { | ||
/** | ||
* searchAutomations - searchAutomations | ||
* searchFlows - searchFlows | ||
* | ||
* Search available automation definitions | ||
* Search available automation flows | ||
*/ | ||
'get'( | ||
parameters?: Parameters<Paths.SearchAutomations.QueryParameters> | null, | ||
parameters?: Parameters<Paths.SearchFlows.QueryParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.SearchAutomations.Responses.$200> | ||
): OperationResponse<Paths.SearchFlows.Responses.$200> | ||
/** | ||
* createAutomation - createAutomation | ||
* createFlow - createFlow | ||
* | ||
* Create new automation definition | ||
* Create new automation flow | ||
*/ | ||
'post'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: Paths.CreateAutomation.RequestBody, | ||
data?: Paths.CreateFlow.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.CreateAutomation.Responses.$201> | ||
): OperationResponse<Paths.CreateFlow.Responses.$201> | ||
} | ||
['/v1/automation/definitions/{definition_id}']: { | ||
['/v1/automation/flows/{flow_id}']: { | ||
/** | ||
* getAutomation - getAutomation | ||
* getFlow - getFlow | ||
* | ||
* List available automation definitions | ||
* List available automation flows | ||
*/ | ||
'get'( | ||
parameters?: Parameters<Paths.GetAutomation.PathParameters> | null, | ||
parameters?: Parameters<Paths.GetFlow.PathParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.GetAutomation.Responses.$200> | ||
): OperationResponse<Paths.GetFlow.Responses.$200> | ||
/** | ||
* putAutomation - putAutomation | ||
* putFlow - putFlow | ||
* | ||
* Update automation definition by id | ||
* Update automation flow by id | ||
*/ | ||
'put'( | ||
parameters?: Parameters<Paths.PutAutomation.PathParameters> | null, | ||
data?: Paths.PutAutomation.RequestBody, | ||
parameters?: Parameters<Paths.PutFlow.PathParameters> | null, | ||
data?: Paths.PutFlow.RequestBody, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.PutAutomation.Responses.$201> | ||
): OperationResponse<Paths.PutFlow.Responses.$200> | ||
/** | ||
* deleteAutomation - deleteAutomation | ||
* deleteFlow - deleteFlow | ||
* | ||
* Update automation definition by id | ||
* Update automation flow by id | ||
*/ | ||
'delete'( | ||
parameters?: Parameters<Paths.DeleteAutomation.PathParameters> | null, | ||
parameters?: Parameters<Paths.DeleteFlow.PathParameters> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<Paths.DeleteAutomation.Responses.$200> | ||
): OperationResponse<Paths.DeleteFlow.Responses.$200> | ||
} | ||
@@ -502,4 +809,16 @@ ['/v1/automation/executions']: { | ||
} | ||
['/v1/automation/executions/{execution_id}/{action_id}/retrigger']: { | ||
/** | ||
* retriggerAction - retriggerAction | ||
* | ||
* Retrigger a specific automation execution action | ||
*/ | ||
'post'( | ||
parameters?: Parameters<UnknownParamsObject> | null, | ||
data?: any, | ||
config?: AxiosRequestConfig | ||
): OperationResponse<any> | ||
} | ||
} | ||
export type Client = OpenAPIClient<OperationMethods, PathsDictionary> |
{ | ||
"name": "@epilot/automation-client", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "API Client for epilot automation API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
274066
10
1657
1