Skip to content

Commit

Permalink
Upd: Add webhook endpoints
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <[email protected]>
  • Loading branch information
georgepadayatti committed Oct 13, 2023
1 parent 2b2f9aa commit ea2b539
Show file tree
Hide file tree
Showing 16 changed files with 1,240 additions and 1 deletion.
613 changes: 613 additions & 0 deletions openapi/v2023.8.2/bundled.yaml

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions openapi/v2023.8.2/definitions/Webhook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
required:
- payloadUrl
- contentType
- subscribedEvents
- disabled
- secretKey
- skipSslVerification
- timestamp
type: object
properties:
id:
type: string
orgId:
type: string
payloadUrl:
type: string
contentType:
type: string
subscribedEvents:
type: array
items:
type: string
disabled:
type: boolean
secretKey:
type: string
skipSslVerification:
type: boolean
timestamp:
type: string
14 changes: 14 additions & 0 deletions openapi/v2023.8.2/definitions/WebhookEventType.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
type: string
title: WebhookEventType
enum:
- data.update.initiated
- data.update.cancelled
- consent.allowed
- consent.disallowed
- consent.auto_expiry
- org.unsubscribed
- data.delete.initiated
- data.download.initiated
- data.delete.cancelled
- data.download.cancelled
- org.subscribed
35 changes: 34 additions & 1 deletion openapi/v2023.8.2/index.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
components:
schemas:
Webhook:
$ref: "./definitions/Webhook.yaml"
Pagination:
$ref: "./definitions/Pagination.yaml"
DataAgreement:
Expand Down Expand Up @@ -92,7 +94,7 @@ paths:
$ref: ./paths/configCreatePolicy.yaml
/config/policy/{policyId}:
get:
$ref: ./paths/configReadPolicy.yaml
$ref: ./paths/configReadPolicy.yaml
put:
$ref: ./paths/configUpdatePolicy.yaml
delete:
Expand All @@ -103,6 +105,37 @@ paths:
/config/policy/{policyId}/revisions:
get:
$ref: ./paths/configListPolicyRevisions.yaml
/config/webhooks/event-types:
get:
$ref: "./paths/configReadWebhookEventTypes.yaml"
/config/webhooks/payload/content-types:
get:
$ref: "./paths/getWebhookPayloadContentTypes.yaml"
/config/webhook:
post:
$ref: "./paths/configCreateWebhook.yaml"
/config/webhooks:
get:
$ref: "./paths/configListWebhooks.yaml"
/config/webhook/{webhookId}:
get:
$ref: "./paths/configReadWebhook.yaml"
delete:
$ref: "./paths/configDeleteWebhook.yaml"
put:
$ref: "./paths/configUpdateWebhook.yaml"
/config/webhook/{webhookId}/ping:
post:
$ref: "./paths/configPingWebhook.yaml"
/config/webhooks/{webhookId}/deliveries:
get:
$ref: "./paths/configListAllRecentWebhookDeliveries.yaml"
/config/webhooks/{webhookId}/delivery/{deliveryId}:
get:
$ref: "./paths/configReadRecentWebhookDelivery.yaml"
/config/webhooks/{webhookId}/delivery/{deliveryId}/redeliver:
post:
$ref: "./paths/configRedeliverWebhook.yaml"
/onboard/admin/login:
post:
$ref: ./paths/loginOrganisationAdmin.yaml
Expand Down
21 changes: 21 additions & 0 deletions openapi/v2023.8.2/paths/configCreateWebhook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
operationId: configCreateWebhook
summary: CREATE - Create webhook
description: Create webhook
tags:
- config
requestBody:
content:
application/json:
schema:
$ref: "../definitions/Webhook.yaml"
required: true
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: "../definitions/Webhook.yaml"
deprecated: false
security:
- BearerAuth: []
19 changes: 19 additions & 0 deletions openapi/v2023.8.2/paths/configDeleteWebhook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
operationId: configDeleteWebhook
summary: DELETE - Delete webhook
description: Delete webhook
tags:
- config
parameters:
- name: webhookId
in: path
required: true
style: simple
schema:
type: string
responses:
"204":
description: No Content
content: {}
deprecated: false
security:
- BearerAuth: []
51 changes: 51 additions & 0 deletions openapi/v2023.8.2/paths/configListAllRecentWebhookDeliveries.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
operationId: configListAllRecentWebhookDeliveries
summary: Get recent webhook deliveries
description: Get recent webhook deliveries
tags:
- config
parameters:
- name: webhookId
in: path
required: true
style: simple
schema:
type: string
- $ref: "../parameters/offset.yaml"
- $ref: "../parameters/limit.yaml"
- $ref: "../parameters/page.yaml"
responses:
"200":
description: OK
content:
application/json:
schema:
required:
- webhookDeliveries
- pagination
type: object
properties:
webhookDeliveries:
type: array
items:
type: object
properties:
id:
type: string
webhookId:
type: string
responseStatusCode:
type: integer
format: int32
responseStatusStr:
type: string
timestamp:
type: string
status:
type: string
statusDescription:
type: string
pagination:
$ref: "../definitions/Pagination.yaml"
deprecated: false
security:
- BearerAuth: []
34 changes: 34 additions & 0 deletions openapi/v2023.8.2/paths/configListWebhooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
operationId: configListWebhooks
summary: Get all webhooks for an organisation
description: Get all webhooks for an organisation
tags:
- config
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
required:
- ID
- PayloadURL
- Disabled
- TimeStamp
- IsLastDeliverySuccess
type: object
properties:
ID:
type: string
PayloadURL:
type: string
Disabled:
type: boolean
TimeStamp:
type: string
IsLastDeliverySuccess:
type: boolean
deprecated: false
security:
- BearerAuth: []
43 changes: 43 additions & 0 deletions openapi/v2023.8.2/paths/configPingWebhook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
operationId: configPingWebhook
summary: Ping webhook
description: Ping webhook
tags:
- config
parameters:
- name: webhookId
in: path
required: true
style: simple
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
required:
- ResponseStatusCode
- ResponseStatusStr
- ExecutionStartTimeStamp
- ExecutionEndTimeStamp
- Status
- StatusDescription
type: object
properties:
ResponseStatusCode:
type: integer
format: int32
ResponseStatusStr:
type: string
ExecutionStartTimeStamp:
type: string
ExecutionEndTimeStamp:
type: string
Status:
type: string
StatusDescription:
type: string
deprecated: false
security:
- BearerAuth: []
Loading

0 comments on commit ea2b539

Please sign in to comment.