Skip to content

Commit

Permalink
Add webhooks event resource and a few improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido committed Aug 23, 2024
1 parent 1ec6abc commit 8948b09
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 44 deletions.
10 changes: 7 additions & 3 deletions schemas/webhooks/webhook_event.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ properties:
properties:
resource_type:
type: string
enum:
- workflow_run
- workflow_task
description: Indicates the resource affected by this event.
example: workflow_task
action:
Expand All @@ -28,7 +31,8 @@ properties:
type: string
description: The unique identifier of the resource.
status:
type: string
allOf:
- $ref: ../workflow_runs/definitions.yaml#/workflow_run_status
description: The current state of the object, if available.
example: complete
started_at_iso8601:
Expand Down Expand Up @@ -72,11 +76,11 @@ properties:
example: "https://dashboard.onfido.com/results/36a56899-d617-4988-85bf-b76640861bf5"
workflow_id:
type: string
format: uuid #?
format: uuid
description: The unique identifier for the Workflow.
workflow_run_id:
type: string
format: uuid #?
format: uuid
example: 2f152409-d6c4-4711-8750-48517f99a8d6
workflow_version_id:
type: integer
Expand Down
47 changes: 6 additions & 41 deletions schemas/workflow_runs/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,9 @@ workflow_run_shared:
description: Customer-provided user identifier.
link:
type: object
allOf:
- $ref: "#/workflow_run_link"
description: Object for the configuration of the 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
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
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
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
description: The code for the language when the workflow run is acessed using the link.
created_at:
type: string
format: date-time
Expand Down Expand Up @@ -86,15 +63,8 @@ workflow_run_response:
type: string
description: The URL for viewing the Workflow Run results on your Onfido Dashboard.
status:
type: string
enum:
- awaiting_input
- processing
- abandoned
- error
- approved
- review
- declined
allOf:
- $ref: "#/workflow_run_status"
description: The status of the Workflow Run.
output:
type: object
Expand All @@ -106,14 +76,9 @@ workflow_run_response:
type: string
error:
type: object
allOf:
- $ref: "#/workflow_run_error"
description: Error object. Only set when the Workflow Run status is 'error'.
properties:
type:
type: string
description: The type of error.
message:
type: string
description: A textual description of the error.
sdk_token:
type: string
nullable: true
Expand Down

0 comments on commit 8948b09

Please sign in to comment.