Skip to content

Commit

Permalink
Add webhooks event resource, backward compatible only changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido committed Aug 23, 2024
1 parent ab0e671 commit 1ec6abc
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 1 deletion.
64 changes: 63 additions & 1 deletion schemas/webhooks/webhook_event.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ properties:
resource_type:
type: string
description: Indicates the resource affected by this event.
example: workflow_task
action:
type: string
allOf:
- $ref: definitions.yaml#/webhook_event_type
description: The event that triggered this webhook.
example: report.completed
example: workflow_task.completed
object:
type: object
required:
Expand Down Expand Up @@ -46,3 +47,64 @@ properties:
resource:
type: object
description: The resource affected by this event.
properties:
id:
type: string
description: The identifier of the resource.
example: profile_4f4b2
applicant_id:
type: string
format: uuid
description: The unique identifier for the Applicant.
created_at:
type: string
format: date-time
description: The date and time when the resource was created.
example: "2022-12-05T16:41:43Z"
updated_at:
type: string
format: date-time
description: The date and time when the resource was last updated.
example: "2022-12-19T16:41:44Z"
dashboard_url:
type: string
description: The URL for viewing the resource on Onfido Dashboard.
example: "https://dashboard.onfido.com/results/36a56899-d617-4988-85bf-b76640861bf5"
workflow_id:
type: string
format: uuid #?
description: The unique identifier for the Workflow.
workflow_run_id:
type: string
format: uuid #?
example: 2f152409-d6c4-4711-8750-48517f99a8d6
workflow_version_id:
type: integer
description: The identifier for the Workflow version.
example: 0
task_def_id:
$ref: ../tasks/definitions.yaml#/task_def_id
task_def_version:
type: string
nullable: true
description: The task definition version.
input:
type: object
description: Input object with the fields used by the Task execution.
output:
type: object
nullable: true
description: Output object with the fields produced by the Task execution.
reasons:
type: array
description: The reasons the Workflow Run outcome was reached. Configurable when creating the Workflow Version.
link:
type: object
allOf:
- $ref: ../workflow_runs/definitions.yaml#/workflow_run_link
description: Object for the configuration of the Workflow Run link.
error:
type: object
allOf:
- $ref: ../workflow_runs/definitions.yaml#/workflow_run_error
description: Error object that details why a Workflow Run is in Error status.
53 changes: 53 additions & 0 deletions schemas/workflow_runs/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,56 @@ workflow_run_response:
type: string
nullable: true
description: Client token to use when loading this workflow run in the Onfido SDK.

workflow_run_link:
properties:
url:
type: string
description: Link to access the Workflow Run without the need to integrate with Onfido's SDKs.
completed_redirect_url:
type: string
nullable: true
description: When the interactive section of the Workflow Run has completed successfully, the user will be redirected to this URL instead of seeing the default Onfido 'thank you' page.
expired_redirect_url:
type: string
nullable: true
description: When the link has expired, the user will be immediately redirected to this URL instead of seeing the default Onfido error message.
expires_at:
type: string
format: date-time
nullable: true
description: Date and time when the link will expire.
language:
type: string
enum:
- en_US
- de_DE
- es_ES
- fr_FR
- it_IT
- pt_PT
- nl_NL
nullable: true
description: The code for the language when the workflow run is acessed using the link.

workflow_run_status:
properties:
type: string
enum:
- awaiting_input
- processing
- abandoned
- error
- approved
- review
- declined

workflow_run_error:
type: object
properties:
type:
type: string
description: The type of error.
message:
type: string
description: A textual description of the error.

0 comments on commit 1ec6abc

Please sign in to comment.