Last active
October 18, 2023 12:58
-
-
Save TimoGlastra/57e01bec84afcad0f4b7e57e25a72830 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description: The JSON Schema for a workflow | |
type: object | |
properties: | |
name: | |
description: The name of the workflow | |
type: string | |
maxLength: 50 | |
examples: | |
- My new workflow | |
trigger: | |
description: The trigger for the workflow | |
type: object | |
properties: | |
type: | |
description: The type of the trigger | |
type: string | |
default: api | |
enum: | |
- api | |
- didcommConnectionCompleted | |
- didcommCredentialIssued | |
- didcommPresentationVerified | |
- didcommBasicMessageReceived | |
required: | |
- type | |
additionalProperties: false | |
input: | |
allOf: | |
- type: object | |
properties: | |
type: | |
const: object | |
- "$ref": https://gist.githubusercontent.com/TimoGlastra/57e01bec84afcad0f4b7e57e25a72830/raw/777ef84e343f7aa8517d197a0a3718528ede8a05/workflowInput.yaml | |
actions: | |
description: The actions of the workflow | |
type: array | |
items: | |
"$ref": https://gist.githubusercontent.com/TimoGlastra/57e01bec84afcad0f4b7e57e25a72830/raw/777ef84e343f7aa8517d197a0a3718528ede8a05/workflowAction.yaml | |
uniqueItemProperties: | |
- id | |
required: | |
- name | |
- trigger | |
- actions | |
additionalProperties: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
definitions: | |
variable: | |
type: string | |
description: A variable with a `$` sign. | |
pattern: "^\\$\\.[a-zA-Z0-9_.]*$" | |
oneOf: | |
- type: object | |
title: Create Invitation | |
description: Create a connection invitation to send out of band | |
properties: | |
id: | |
description: With the id you can reference the action in other actions | |
type: string | |
default: createInvitation | |
name: | |
description: Create Invitation | |
const: didcomm/createInvitation@v1 | |
attributes: | |
type: object | |
properties: | |
alias: | |
anyOf: | |
- description: Alias for the connection | |
type: string | |
- "$ref": "#/definitions/variable" | |
label: | |
anyOf: | |
- description: Label for the invitation. Will be shared with the other party. | |
If not provided, the team name will be used. | |
type: string | |
- "$ref": "#/definitions/variable" | |
isReusable: | |
anyOf: | |
- description: Whether multiple connections can be created using the invitation | |
type: boolean | |
- "$ref": "#/definitions/variable" | |
imageUrl: | |
anyOf: | |
- description: URL to an image to be displayed with the invitation | |
type: string | |
- "$ref": "#/definitions/variable" | |
additionalProperties: false | |
required: | |
- id | |
- name | |
additionalProperties: false | |
- type: object | |
title: Create Connection | |
description: Create a single use invitation to send out of band and wait for the | |
connection to be completed | |
properties: | |
id: | |
description: With the id you can reference the action in other actions | |
type: string | |
default: createConnection | |
name: | |
description: Create Connection | |
const: didcomm/createConnection@v1 | |
attributes: | |
type: object | |
properties: | |
alias: | |
anyOf: | |
- description: Alias for the connection | |
type: string | |
- "$ref": "#/definitions/variable" | |
label: | |
anyOf: | |
- description: Label for the invitation. Will be shared with the other party. | |
If not provided, the team name will be used. | |
type: string | |
- "$ref": "#/definitions/variable" | |
imageUrl: | |
anyOf: | |
- description: URL to an image to be displayed with the invitation | |
type: string | |
- "$ref": "#/definitions/variable" | |
additionalProperties: false | |
required: | |
- id | |
- name | |
additionalProperties: false | |
- type: object | |
title: Receive Connection Invitation | |
description: 'Receive a connection invitation and wait for the connection to be | |
completed. Supports both ' | |
properties: | |
id: | |
description: With the id you can reference the action in other actions | |
type: string | |
default: receiveInvitation | |
name: | |
description: Receive Connection Invitation | |
const: didcomm/receiveInvitation@v1 | |
attributes: | |
type: object | |
properties: | |
invitationUrl: | |
anyOf: | |
- description: The invitation encoded as url | |
type: string | |
- "$ref": "#/definitions/variable" | |
alias: | |
anyOf: | |
- description: Alias for the connection | |
type: string | |
- "$ref": "#/definitions/variable" | |
label: | |
anyOf: | |
- description: Label for the invitation. Will be shared with the other party. | |
If not provided, the team name will be used. | |
type: string | |
- "$ref": "#/definitions/variable" | |
imageUrl: | |
anyOf: | |
- description: URL to an image to be displayed with the invitation | |
type: string | |
- "$ref": "#/definitions/variable" | |
required: | |
- invitationUrl | |
additionalProperties: false | |
required: | |
- id | |
- name | |
- attributes | |
additionalProperties: false | |
- type: object | |
title: Send Basic Message | |
description: Send a basic message to an existing connection | |
properties: | |
id: | |
description: With the id you can reference the action in other actions | |
type: string | |
default: sendBasicMessage | |
name: | |
description: Send Basic Message | |
const: didcomm/sendBasicMessage@v1 | |
attributes: | |
type: object | |
properties: | |
connectionId: | |
anyOf: | |
- description: The identifier of the existing connection | |
type: string | |
- "$ref": "#/definitions/variable" | |
message: | |
anyOf: | |
- description: The message to send | |
type: string | |
- "$ref": "#/definitions/variable" | |
parentThreadId: | |
anyOf: | |
- description: The parent thread identifier of the message. If this value | |
is set, it should refer to the threadId of another message that was | |
sent to, or received from the associated connection. | |
type: string | |
- "$ref": "#/definitions/variable" | |
required: | |
- connectionId | |
- message | |
additionalProperties: false | |
required: | |
- id | |
- name | |
- attributes | |
additionalProperties: false | |
- type: object | |
title: Create Schema | |
description: Create a credential schema | |
properties: | |
id: | |
description: With the id you can reference the action in other actions | |
type: string | |
default: createSchema | |
name: | |
description: Create Schema | |
const: anoncreds/createSchema@v1 | |
attributes: | |
type: object | |
properties: | |
name: | |
anyOf: | |
- description: The schema name | |
type: string | |
- "$ref": "#/definitions/variable" | |
version: | |
anyOf: | |
- description: The schema version | |
type: string | |
pattern: "^(\\d+\\.?){1,2}(\\d+)?$" | |
- "$ref": "#/definitions/variable" | |
network: | |
anyOf: | |
- description: The network to use | |
type: string | |
default: cheqd:testnet | |
enum: | |
- cheqd:testnet | |
- cheqd:mainnet | |
- "$ref": "#/definitions/variable" | |
attributeNames: | |
anyOf: | |
- description: The attributes of the schema | |
type: array | |
items: | |
anyOf: | |
- type: string | |
- "$ref": "#/definitions/variable" | |
minItems: 1 | |
- "$ref": "#/definitions/variable" | |
required: | |
- name | |
- version | |
- attributeNames | |
- network | |
additionalProperties: false | |
required: | |
- id | |
- name | |
- attributes | |
additionalProperties: false | |
- type: object | |
title: Create Credential Definition | |
description: Create a credential definition | |
properties: | |
id: | |
description: With the id you can reference the action in other actions | |
type: string | |
default: createCredentialDefinition | |
name: | |
description: Create Credential Definition | |
const: anoncreds/createCredentialDefinition@v1 | |
attributes: | |
type: object | |
properties: | |
schemaId: | |
anyOf: | |
- description: The identifier of the schema | |
type: string | |
- "$ref": "#/definitions/variable" | |
tag: | |
anyOf: | |
- description: Tag of the credential definition | |
type: string | |
- "$ref": "#/definitions/variable" | |
required: | |
- schemaId | |
- tag | |
additionalProperties: false | |
required: | |
- id | |
- name | |
- attributes | |
additionalProperties: false | |
- type: object | |
title: Issue Credential | |
description: Issue a credential | |
properties: | |
id: | |
description: With the id you can reference the action in other actions | |
type: string | |
default: issueCredential | |
name: | |
description: Issue Credential | |
const: didcomm/issueCredential@v1 | |
attributes: | |
type: object | |
properties: | |
connectionId: | |
anyOf: | |
- description: The identifier of the connection | |
type: string | |
- "$ref": "#/definitions/variable" | |
anoncreds: | |
anyOf: | |
- type: object | |
description: Offer for the AnonCreds credential format. | |
properties: | |
attributes: | |
anyOf: | |
- description: The credential attribute values | |
type: object | |
patternProperties: | |
"^.*$": | |
anyOf: | |
- type: | |
- string | |
- number | |
- "$ref": "#/definitions/variable" | |
minProperties: 1 | |
additionalProperties: false | |
- "$ref": "#/definitions/variable" | |
credentialDefinitionId: | |
anyOf: | |
- description: The identifier of the definition | |
type: string | |
- "$ref": "#/definitions/variable" | |
additionalProperties: false | |
required: | |
- attributes | |
- credentialDefinitionId | |
- "$ref": "#/definitions/variable" | |
required: | |
- connectionId | |
- anoncreds | |
additionalProperties: false | |
required: | |
- id | |
- name | |
- attributes | |
additionalProperties: false | |
- type: object | |
title: Request Presentation | |
description: Request a presentation from a connection | |
properties: | |
id: | |
description: With the id you can reference the action in other actions | |
type: string | |
default: requestPresentation | |
name: | |
description: Request Presentation | |
const: didcomm/requestPresentation@v1 | |
attributes: | |
type: object | |
required: | |
- connectionId | |
- anoncreds | |
additionalProperties: false | |
properties: | |
connectionId: | |
anyOf: | |
- description: The identifier of the connection | |
type: string | |
- "$ref": "#/definitions/variable" | |
anoncreds: | |
anyOf: | |
- description: Request for the AnonCreds credential format. | |
type: object | |
required: | |
- name | |
- version | |
additionalProperties: false | |
properties: | |
name: | |
anyOf: | |
- description: The presentation request name | |
type: string | |
- "$ref": "#/definitions/variable" | |
version: | |
anyOf: | |
- description: The presentation request version | |
type: string | |
pattern: "^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)$" | |
- "$ref": "#/definitions/variable" | |
attributes: | |
anyOf: | |
- description: The attributes for the presentation request | |
type: array | |
items: | |
anyOf: | |
- type: object | |
required: | |
- names | |
- restrictions | |
additionalProperties: false | |
properties: | |
names: | |
anyOf: | |
- description: The names of presentation attributes | |
type: array | |
items: | |
anyOf: | |
- type: string | |
- "$ref": "#/definitions/variable" | |
- "$ref": "#/definitions/variable" | |
restrictions: | |
anyOf: | |
- type: array | |
description: The restrictions that apply to the attribute | |
value(s) | |
items: | |
anyOf: | |
- type: object | |
required: | |
- credentialDefinitionId | |
additionalProperties: false | |
properties: | |
credentialDefinitionId: | |
anyOf: | |
- type: string | |
description: The credential definition Id | |
- "$ref": "#/definitions/variable" | |
- "$ref": "#/definitions/variable" | |
- "$ref": "#/definitions/variable" | |
- "$ref": "#/definitions/variable" | |
- "$ref": "#/definitions/variable" | |
predicates: | |
anyOf: | |
- description: The predicates for the presentation request | |
type: array | |
items: | |
anyOf: | |
- type: object | |
required: | |
- name | |
- restrictions | |
- predicateType | |
- predicateValue | |
additionalProperties: false | |
properties: | |
name: | |
anyOf: | |
- description: The name of presentation predicate | |
type: string | |
- "$ref": "#/definitions/variable" | |
predicateType: | |
description: The predicateType | |
enum: | |
- greaterThan | |
- lessThan | |
- greaterThanOrEqualTo | |
- lessThanOrEqualTo | |
predicateValue: | |
anyOf: | |
- description: The predicateValue | |
type: number | |
- "$ref": "#/definitions/variable" | |
restrictions: | |
anyOf: | |
- type: array | |
description: The restrictions that apply to the attribute | |
value(s) | |
items: | |
anyOf: | |
- type: object | |
required: | |
- credentialDefinitionId | |
additionalProperties: false | |
properties: | |
credentialDefinitionId: | |
anyOf: | |
- type: string | |
description: The credential definition Id | |
- "$ref": "#/definitions/variable" | |
- "$ref": "#/definitions/variable" | |
- "$ref": "#/definitions/variable" | |
- "$ref": "#/definitions/variable" | |
- "$ref": "#/definitions/variable" | |
requireNonRevoked: | |
anyOf: | |
- type: boolean | |
description: Whether the credentials should be non-revoked. If a | |
credential is not revocable, this property will not have an effect. | |
Default to false | |
- "$ref": "#/definitions/variable" | |
- "$ref": "#/definitions/variable" | |
required: | |
- id | |
- name | |
- attributes | |
additionalProperties: false | |
- type: object | |
title: General API Call | |
description: Call an external API | |
properties: | |
id: | |
description: With the id you can reference the action in other actions | |
type: string | |
default: fetch | |
name: | |
description: General API Call | |
const: general/fetch@v1 | |
attributes: | |
type: object | |
properties: | |
method: | |
anyOf: | |
- description: The HTTP Method | |
type: string | |
enum: | |
- GET | |
- POST | |
- PUT | |
- PATCH | |
- DELETE | |
- "$ref": "#/definitions/variable" | |
url: | |
anyOf: | |
- description: The URL to call | |
type: string | |
- "$ref": "#/definitions/variable" | |
queryParams: | |
anyOf: | |
- description: The query parameters to add to your request | |
type: object | |
patternProperties: | |
"^.*$": | |
anyOf: | |
- type: string | |
- "$ref": "#/definitions/variable" | |
- "$ref": "#/definitions/variable" | |
headers: | |
anyOf: | |
- description: The API headers that will be set to your request | |
type: object | |
patternProperties: | |
"^.*$": | |
anyOf: | |
- type: string | |
- "$ref": "#/definitions/variable" | |
additionalProperties: false | |
- "$ref": "#/definitions/variable" | |
payload: | |
anyOf: | |
- description: The data to send with your request | |
type: object | |
patternProperties: | |
"^.*$": | |
anyOf: | |
- type: | |
- number | |
- string | |
- boolean | |
- object | |
- array | |
- 'null' | |
- "$ref": "#/definitions/variable" | |
additionalProperties: false | |
- "$ref": "#/definitions/variable" | |
required: | |
- method | |
- url | |
additionalProperties: false | |
required: | |
- id | |
- name | |
- attributes | |
additionalProperties: false | |
- type: object | |
title: Validate JSON | |
description: Validate a JSON structure against a JSON Schema | |
properties: | |
id: | |
description: With the id you can reference the action in other actions | |
type: string | |
default: validateJson | |
name: | |
description: Validate JSON | |
const: general/validateJson@v1 | |
attributes: | |
type: object | |
properties: | |
schema: | |
"$ref": https://json-schema.org/draft-07/schema# | |
data: | |
description: The JSON structure to validate | |
required: | |
- schema | |
- data | |
additionalProperties: false | |
required: | |
- id | |
- name | |
- attributes | |
additionalProperties: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: Workflow Input | |
definitions: | |
schemaArray: | |
type: array | |
minItems: 1 | |
items: | |
"$ref": "#" | |
nonNegativeInteger: | |
type: integer | |
minimum: 0 | |
nonNegativeIntegerDefault0: | |
allOf: | |
- "$ref": "#/definitions/nonNegativeInteger" | |
- default: 0 | |
simpleTypes: | |
enum: | |
- array | |
- boolean | |
- integer | |
- 'null' | |
- number | |
- object | |
- string | |
stringArray: | |
type: array | |
items: | |
type: string | |
uniqueItems: true | |
default: [] | |
type: | |
- object | |
- boolean | |
properties: | |
"$comment": | |
type: string | |
title: | |
type: string | |
description: | |
type: string | |
default: true | |
readOnly: | |
type: boolean | |
default: false | |
writeOnly: | |
type: boolean | |
default: false | |
examples: | |
type: array | |
items: true | |
multipleOf: | |
type: number | |
exclusiveMinimum: 0 | |
maximum: | |
type: number | |
exclusiveMaximum: | |
type: number | |
minimum: | |
type: number | |
exclusiveMinimum: | |
type: number | |
maxLength: | |
"$ref": "#/definitions/nonNegativeInteger" | |
minLength: | |
"$ref": "#/definitions/nonNegativeIntegerDefault0" | |
pattern: | |
type: string | |
format: regex | |
additionalItems: | |
"$ref": "#" | |
items: | |
anyOf: | |
- "$ref": "#" | |
- "$ref": "#/definitions/schemaArray" | |
default: true | |
maxItems: | |
"$ref": "#/definitions/nonNegativeInteger" | |
minItems: | |
"$ref": "#/definitions/nonNegativeIntegerDefault0" | |
uniqueItems: | |
type: boolean | |
default: false | |
contains: | |
"$ref": "#" | |
maxProperties: | |
"$ref": "#/definitions/nonNegativeInteger" | |
minProperties: | |
"$ref": "#/definitions/nonNegativeIntegerDefault0" | |
required: | |
"$ref": "#/definitions/stringArray" | |
additionalProperties: | |
"$ref": "#" | |
definitions: | |
type: object | |
additionalProperties: | |
"$ref": "#" | |
default: {} | |
properties: | |
type: object | |
additionalProperties: | |
"$ref": "#" | |
default: {} | |
patternProperties: | |
type: object | |
additionalProperties: | |
"$ref": "#" | |
propertyNames: | |
format: regex | |
default: {} | |
dependencies: | |
type: object | |
additionalProperties: | |
anyOf: | |
- "$ref": "#" | |
- "$ref": "#/definitions/stringArray" | |
propertyNames: | |
"$ref": "#" | |
const: true | |
enum: | |
type: array | |
items: true | |
minItems: 1 | |
uniqueItems: true | |
type: | |
anyOf: | |
- "$ref": "#/definitions/simpleTypes" | |
- type: array | |
items: | |
"$ref": "#/definitions/simpleTypes" | |
minItems: 1 | |
uniqueItems: true | |
format: | |
type: string | |
contentMediaType: | |
type: string | |
contentEncoding: | |
type: string | |
if: | |
"$ref": "#" | |
then: | |
"$ref": "#" | |
else: | |
"$ref": "#" | |
allOf: | |
"$ref": "#/definitions/schemaArray" | |
anyOf: | |
"$ref": "#/definitions/schemaArray" | |
oneOf: | |
"$ref": "#/definitions/schemaArray" | |
not: | |
"$ref": "#" | |
default: true | |
additionalProperties: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment