Skip to content

Commit

Permalink
Upd: add individual, 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 17, 2023
1 parent f334887 commit 2705077
Show file tree
Hide file tree
Showing 23 changed files with 714 additions and 754 deletions.
776 changes: 372 additions & 404 deletions openapi/v2023.8.2/bundled.yaml

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions openapi/v2023.8.2/definitions/Individual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ type: object
title: Individual
description: "Shallowly models an Individual which may reference some instance in an external system (registration system, functional ID, foundational ID etc). An Individual instance of this model is not to be mistaken with a unique natural individual. It is up to the system owner to decide if this record permits mapping to a natural individual and/or if a single Individual row can map to several consent agreements."
x-not-in-database: false

required:
- id
properties:

id:
type: string
format: ""
Expand All @@ -23,10 +19,10 @@ properties:
type: string
format: ""
example: ""
description: "External id type specifier. A string. For instance \"email\" or \"foundational id\". Can be used in later queries."
description: 'External id type specifier. A string. For instance "email" or "foundational id". Can be used in later queries.'

identityProviderId:
type: string
format: ""
example: ""
description: "This could be an FK, but for now we do not have a mapping of identity providers. IDBB may have more requirements."
description: "This could be an FK, but for now we do not have a mapping of identity providers. IDBB may have more requirements."
56 changes: 9 additions & 47 deletions openapi/v2023.8.2/definitions/IndividualExtras.yaml
Original file line number Diff line number Diff line change
@@ -1,58 +1,20 @@
type: object
title: IndividualExtras
required:
- name
- email
- phone
properties:
name:
type: string
description: "Name of the individual"
iamId:
type: string
description: "Create a user in keycloak and save the `id` as `iamId`"
email:
type: string
description: "Email Id"
phone:
type: string
imageId:
type: string
imageUrl:
type: string
lastVisit:
type: string
orgs:
type: array
items:
required:
- id
- name
- location
- type
- typeId
- eulaAccepted
type: object
properties:
id:
type: string
name:
type: string
location:
type: string
type:
type: string
typeId:
type: string
eulaAccepted:
type: boolean
apiKey:
type: string
roles:
type: array
items:
required:
- roleId
- orgId
type: object
properties:
roleId:
type: integer
format: int32
orgId:
type: string
incompleteProfile:
type: boolean
description: "Phone"

1 change: 1 addition & 0 deletions openapi/v2023.8.2/definitions/Webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ required:
- skipSslVerification
- timestamp
type: object
title: Webhook
properties:
id:
type: string
Expand Down
25 changes: 25 additions & 0 deletions openapi/v2023.8.2/definitions/WebhookDelivery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
type: object
title: WebhookDelivery
properties:
id:
type: string
description: "Webhook delivery Id"
webhookId:
type: string
description: "Webhook Id"
responseStatusCode:
type: integer
format: int32
description: "Response status code"
responseStatusStr:
type: string
description: "Response status string"
timestamp:
type: string
description: "Response timestamp"
status:
type: string
description: "Webhook delivery status"
statusDescription:
type: string
description: "Webhook delivery status description"
29 changes: 29 additions & 0 deletions openapi/v2023.8.2/definitions/WebhookPing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
type: object
title: WebhookPing
required:
- responseStatusCode
- responseStatusStr
- executionStartTimeStamp
- executionEndTimeStamp
- status
- statusDescription
properties:
responseStatusCode:
type: integer
format: int32
description: "Response status code"
responseStatusStr:
type: string
description: "Response status string"
executionStartTimestamp:
type: string
description: "Execution start timestamp"
executionEndTimestamp:
type: string
description: "Execution end timestamp"
status:
type: string
description: "Status of webhook"
statusDescription:
type: string
description: "Status description"
31 changes: 22 additions & 9 deletions openapi/v2023.8.2/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,25 +127,32 @@ paths:
/config/policy/{policyId}/revisions:
get:
$ref: ./paths/configListPolicyRevisions.yaml
/config/webhooks/event-types:
/config/individual:
post:
$ref: ./paths/configCreateIndividual.yaml
/config/individual/{individualId}:
get:
$ref: "./paths/configReadWebhookEventTypes.yaml"
/config/webhooks/payload/content-types:
$ref: ./paths/configReadIndividual.yaml
put:
$ref: ./paths/configUpdateIndividual.yaml
delete:
$ref: ./paths/configDeleteIndividual.yaml
/config/individuals:
get:
$ref: "./paths/getWebhookPayloadContentTypes.yaml"
$ref: ./paths/configListIndividuals.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"
delete:
$ref: "./paths/configDeleteWebhook.yaml"
/config/webhooks:
get:
$ref: "./paths/configListWebhooks.yaml"
/config/webhook/{webhookId}/ping:
post:
$ref: "./paths/configPingWebhook.yaml"
Expand All @@ -158,6 +165,12 @@ paths:
/config/webhooks/{webhookId}/delivery/{deliveryId}/redeliver:
post:
$ref: "./paths/configRedeliverWebhook.yaml"
/config/webhooks/event-types:
get:
$ref: "./paths/configReadWebhookEventTypes.yaml"
/config/webhooks/payload/content-types:
get:
$ref: "./paths/getWebhookPayloadContentTypes.yaml"
/onboard/admin/login:
post:
$ref: ./paths/loginOrganisationAdmin.yaml
Expand Down
44 changes: 44 additions & 0 deletions openapi/v2023.8.2/paths/configCreateIndividual.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
tags:
- config
summary: "CREATE - Create an individual"
operationId: "configCreatePolicy"
description: "CREATE - Creates an Individual in the Consent system"
parameters: []
x-specification-usecase: ""
x-specification-scenario: ""
x-specification-pii-or-sensitive: "True"
x-specification-crudl-model: "Individual"
responses:
"200":
description: ""

content:
application/json:
schema:
type: object
properties:
individual:
allOf:
- $ref: "../definitions/Individual.yaml"
- $ref: "../definitions/IndividualExtras.yaml"
description: An object of type Individual

"400":
description: bad input parameter
security:
- BearerAuth: []

requestBody:
content:
application/json:
schema:
type: object
properties:
individual:
allOf:
- $ref: "../definitions/Individual.yaml"
- $ref: "../definitions/IndividualExtras.yaml"
description: An object of type Individual

required:
- individual
10 changes: 8 additions & 2 deletions openapi/v2023.8.2/paths/configCreateWebhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ requestBody:
content:
application/json:
schema:
$ref: "../definitions/Webhook.yaml"
type: object
properties:
webhook:
$ref: "../definitions/Webhook.yaml"
required: true
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: "../definitions/Webhook.yaml"
type: object
properties:
webhook:
$ref: "../definitions/Webhook.yaml"
deprecated: false
security:
- BearerAuth: []
35 changes: 35 additions & 0 deletions openapi/v2023.8.2/paths/configDeleteIndividual.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
tags:
- config
summary: "DELETE - Delete an individual"
operationId: "configDeleteIndividual"
description: "DELETE - entirely removes an individual from the system and cascades necessary actions to related DataAgreementRecord objects"
parameters:
- in: path
name: "individualId"
description: "Unique ID of an object"
required: true
schema:
type: string

x-specification-usecase: ""
x-specification-scenario: ""
x-specification-pii-or-sensitive: "True"
x-specification-crudl-model: "Individual"
responses:
"200":
description: ""

content:
application/json:
schema:
type: object
properties:
individual:
allOf:
- $ref: "../definitions/Individual.yaml"
- $ref: "../definitions/IndividualExtras.yaml"

"400":
description: bad input parameter
security:
- BearerAuth: []
12 changes: 9 additions & 3 deletions openapi/v2023.8.2/paths/configDeleteWebhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ parameters:
schema:
type: string
responses:
"204":
description: No Content
content: {}
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
webhook:
$ref: "../definitions/Webhook.yaml"
deprecated: false
security:
- BearerAuth: []
22 changes: 4 additions & 18 deletions openapi/v2023.8.2/paths/configListAllRecentWebhookDeliveries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,11 @@ responses:
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
oneOf:
- $ref: "../definitions/WebhookDelivery.yaml"
description: WebhookDelivery
pagination:
$ref: "../definitions/Pagination.yaml"
deprecated: false
security:
- BearerAuth: []
- BearerAuth: []
Loading

0 comments on commit 2705077

Please sign in to comment.