api.graphql•8.94 kB
scalar JSONSchema
scalar JSON
scalar JSONata
scalar DateTime
scalar Upload
interface BaseConfig {
id: ID!
version: String
createdAt: DateTime
updatedAt: DateTime
}
union ConfigType = ApiConfig | ExtractConfig | TransformConfig | Workflow
type ApiConfig implements BaseConfig {
# BaseConfig
id: ID!
version: String
createdAt: DateTime
updatedAt: DateTime
# Specific implementation
urlHost: String
urlPath: String
instruction: String
method: HttpMethod
queryParams: JSON
headers: JSON
body: String
documentationUrl: String
responseSchema: JSONSchema
responseMapping: JSONata
authentication: AuthType
pagination: Pagination
dataPath: String
}
type ExtractConfig implements BaseConfig {
# BaseConfig
id: ID!
version: String
createdAt: DateTime
updatedAt: DateTime
# Specific implementation
urlHost: String
urlPath: String
queryParams: JSON
instruction: String
method: HttpMethod
headers: JSON
body: String
documentationUrl: String
decompressionMethod: DecompressionMethod
authentication: AuthType
fileType: FileType
dataPath: String
}
type TransformConfig implements BaseConfig {
# BaseConfig
id: ID!
version: String
createdAt: DateTime
updatedAt: DateTime
# Specific implementation
instruction: String
responseSchema: JSONSchema
responseMapping: JSONata
}
type RunResult {
id: ID!
success: Boolean!
data: JSON
headers: JSON
statusCode: Int
error: String
startedAt: DateTime!
completedAt: DateTime!
config: ConfigType
}
type Pagination {
type: PaginationType!
pageSize: String
cursorPath: String
stopCondition: String
}
type RunList {
items: [RunResult!]!
total: Int!
}
type ApiList {
items: [ApiConfig!]!
total: Int!
}
type TransformList {
items: [TransformConfig!]!
total: Int!
}
type ExtractList {
items: [ExtractConfig!]!
total: Int!
}
type WorkflowList {
items: [Workflow!]!
total: Int!
}
type IntegrationList {
items: [Integration!]!
total: Int!
}
enum AuthType {
NONE
HEADER
QUERY_PARAM
OAUTH2
}
enum DecompressionMethod {
GZIP
DEFLATE
NONE
AUTO
ZIP
}
enum HttpMethod {
GET
POST
PUT
DELETE
PATCH
HEAD
OPTIONS
}
enum CacheMode {
ENABLED
READONLY
WRITEONLY
DISABLED
}
enum PaginationType {
OFFSET_BASED
PAGE_BASED
CURSOR_BASED
DISABLED
}
enum FileType {
CSV
JSON
XML
RAW
AUTO
}
enum LogLevel {
DEBUG
INFO
WARN
ERROR
}
enum UpsertMode {
CREATE
UPDATE
UPSERT
}
input PaginationInput {
type: PaginationType!
pageSize: String
cursorPath: String
stopCondition: String
}
input ApiInput {
id: ID!
urlHost: String
urlPath: String
instruction: String
queryParams: JSON
method: HttpMethod
headers: JSON
body: String
documentationUrl: String
responseSchema: JSONSchema
responseMapping: JSONata
authentication: AuthType
pagination: PaginationInput
dataPath: String
version: String
}
input ExtractInput {
id: ID!
urlHost: String
urlPath: String
queryParams: JSON
instruction: String
method: HttpMethod
headers: JSON
body: String
documentationUrl: String
decompressionMethod: DecompressionMethod
fileType: FileType
authentication: AuthType
dataPath: String
version: String
}
input TransformInput {
id: ID!
instruction: String
responseSchema: JSONSchema
responseMapping: JSONata
version: String
}
input RequestOptions {
selfHealing: SelfHealingMode
cacheMode: CacheMode
timeout: Int
retries: Int
retryDelay: Int
webhookUrl: String
testMode: Boolean
}
enum SelfHealingMode {
ENABLED
TRANSFORM_ONLY
REQUEST_ONLY
DISABLED
}
input ApiInputRequest @oneOf {
endpoint: ApiInput
id: ID
}
input ExtractInputRequest @oneOf {
endpoint: ExtractInput
file: Upload
id: ID
}
input TransformInputRequest @oneOf {
endpoint: TransformInput
id: ID
}
input WorkflowInputRequest @oneOf {
workflow: WorkflowInput
id: ID
}
input IntegrationInput {
id: ID!
name: String
urlHost: String
urlPath: String
credentials: JSON
documentationUrl: String
documentation: String
documentationPending: Boolean
specificInstructions: String
documentationKeywords: [String!]
}
type Log {
id: ID!
message: String!
level: LogLevel!
timestamp: DateTime!
runId: ID
}
type SuggestedIntegration {
reason: String!
integration: Integration!
}
type Query {
listRuns(limit: Int = 10, offset: Int = 0, configId: ID): RunList!
listApis(limit: Int = 10, offset: Int = 0): ApiList!
listTransforms(limit: Int = 10, offset: Int = 0): TransformList!
listExtracts(limit: Int = 10, offset: Int = 0): ExtractList!
listWorkflows(limit: Int = 10, offset: Int = 0): WorkflowList!
listIntegrations(limit: Int = 10, offset: Int = 0): IntegrationList!
findRelevantIntegrations(instruction: String): [SuggestedIntegration!]
getRun(id: ID!): RunResult
getApi(id: ID!): ApiConfig
getTransform(id: ID!): TransformConfig
getExtract(id: ID!): ExtractConfig
getWorkflow(id: ID!): Workflow
getIntegration(id: ID!): Integration
generateSchema(instruction: String!, responseData: String): JSONSchema!
generateInstructions(integrations: [IntegrationInput!]!): [String!]!
getTenantInfo: TenantInfo
listWorkflowSchedules(workflowId: String!): [WorkflowSchedule!]!
}
type TenantInfo {
email: String
emailEntrySkipped: Boolean!
}
type ExecutionStep {
id: String!
apiConfig: ApiConfig!
integrationId: ID
executionMode: String # DIRECT | LOOP
loopSelector: JSONata
loopMaxIters: Int
inputMapping: JSONata
responseMapping: JSONata
}
input ExecutionStepInput {
id: String!
apiConfig: ApiInput!
integrationId: ID
executionMode: String # DIRECT | LOOP
loopSelector: JSONata
loopMaxIters: Int
inputMapping: JSONata
responseMapping: JSONata
}
type Workflow implements BaseConfig {
# BaseConfig
id: ID!
version: String
createdAt: DateTime
updatedAt: DateTime
# Specific implementation
steps: [ExecutionStep!]
integrationIds: [ID]
instruction: String
finalTransform: JSONata
responseSchema: JSONSchema
inputSchema: JSONSchema
originalResponseSchema: JSONSchema
}
type WorkflowStepResult {
stepId: String!
success: Boolean!
rawData: JSON
transformedData: JSON
error: String
}
type WorkflowResult {
id: ID!
success: Boolean!
data: JSON
error: String
startedAt: DateTime!
completedAt: DateTime!
config: Workflow
stepResults: [WorkflowStepResult!]
}
type WorkflowSchedule {
id: ID!
workflowId: String!
cronExpression: String!
timezone: String!
enabled: Boolean!
payload: JSON
options: JSON
lastRunAt: DateTime
nextRunAt: DateTime!
createdAt: DateTime!
updatedAt: DateTime!
}
input WorkflowInput {
id: String!
steps: [ExecutionStepInput!]
integrationIds: [ID!]
finalTransform: JSONata
inputSchema: JSONSchema
responseSchema: JSONSchema
version: String
instruction: String
}
input WorkflowScheduleInput {
id: ID
workflowId: ID
cronExpression: String
timezone: String
enabled: Boolean
payload: JSON
options: JSON
}
type Mutation {
setTenantInfo(email: String, emailEntrySkipped: Boolean): TenantInfo!
call(
input: ApiInputRequest!
payload: JSON
credentials: JSON
options: RequestOptions
): RunResult!
extract(
input: ExtractInputRequest!
payload: JSON
credentials: JSON
options: RequestOptions
): RunResult!
transform(
input: TransformInputRequest!
data: JSON!
options: RequestOptions
): RunResult!
executeWorkflow(
input: WorkflowInputRequest!
payload: JSON
credentials: JSON
options: RequestOptions
): WorkflowResult!
buildWorkflow(
instruction: String!
payload: JSON
integrationIds: [ID!]
responseSchema: JSONSchema
): Workflow!
upsertWorkflow(id: ID!, input: JSON!): Workflow!
deleteWorkflow(id: ID!): Boolean!
upsertWorkflowSchedule(schedule: WorkflowScheduleInput!): WorkflowSchedule!
deleteWorkflowSchedule(id: ID!): Boolean!
upsertApi(id: ID!, input: JSON!): ApiConfig!
deleteApi(id: ID!): Boolean!
updateApiConfigId(oldId: ID!, newId: ID!): ApiConfig!
upsertExtraction(id: ID!, input: JSON!): ExtractConfig!
deleteExtraction(id: ID!): Boolean!
upsertTransformation(id: ID!, input: JSON!): TransformConfig!
deleteTransformation(id: ID!): Boolean!
upsertIntegration(
input: IntegrationInput!
mode: UpsertMode = UPSERT
): Integration!
deleteIntegration(id: ID!): Boolean!
}
type Subscription {
logs: Log!
}
type Integration {
id: ID!
name: String
type: String
urlHost: String
urlPath: String
credentials: JSON
documentationUrl: String
documentation: String
documentationPending: Boolean
openApiUrl: String
openApiSchema: String
specificInstructions: String
documentationKeywords: [String!]
icon: String
version: String
createdAt: DateTime
updatedAt: DateTime
}