Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add delete user, get proof by userID endpoints #3

Merged
merged 8 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/spec/components/parameters/eventIdParam.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
in: query
name: 'event_id'
required: false
description: "Event ID"
example: "2234556494903931186902189494613533900917417361106374681011849132651019822199"
schema:
type: string
format: string

2 changes: 1 addition & 1 deletion docs/spec/components/parameters/pathIDHash.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
in: path
name: 'user_id_hash'
required: true
example: "[email protected]"
example: "0x384734934386483457309437583757364283"
schema:
type: string
fomat: string
16 changes: 16 additions & 0 deletions docs/spec/components/schemas/GetProof.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
allOf:
- $ref: '#/components/schemas/GetProofKey'
- type: object
x-go-is-request: true
required:
- attributes
properties:
attributes:
required:
- proof
properties:
proof:
type: object
format: types.ZKProof
description: |
Query ZK passport verification proof.
12 changes: 12 additions & 0 deletions docs/spec/components/schemas/GetProofKey.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type: object
required:
- id
- type
properties:
id:
type: string
example: "18493889724322d9aba2d93238ae60c2638946737bbe8eaecd6e5efdc0b6f4ff"
type:
type: string
enum:
- get_proof
18 changes: 18 additions & 0 deletions docs/spec/components/schemas/Links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
allOf:
- $ref: '#/components/schemas/LinksKey'
- type: object
x-go-is-request: true
required:
- attributes
properties:
attributes:
required:
- callback_url
- get_proof_params
properties:
callback_url:
type: string
example: "https://example.com/integrations/verificator-svc/public/callback/c15ad8f88949"
get_proof_params:
type: string
example: "https://example.com/integrations/verificator-svc/public/proof-params/c15ad8f88949"
12 changes: 12 additions & 0 deletions docs/spec/components/schemas/LinksKey.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type: object
required:
- id
- type
properties:
id:
type: string
example: "18493889724322d9aba2d93238ae60c2638946737bbe8eaecd6e5efdc0b6f4ff"
type:
type: string
enum:
- verification_link
69 changes: 41 additions & 28 deletions docs/spec/components/schemas/Parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,60 @@ allOf:
attributes:
type: object
required:
- eventID
- eventData
- event_id
- event_data
- selector
- identityCounter
- timestampLowerBound
- timestampUpperBound
- identityCounterLowerBound
- identityCounterUpperBound
- expirationDateLowerBound
- expirationDateUpperBound
- birthDateLowerBound
- birthDateUpperBound
- citizenshipMask
- callbackUrl
- identity_counter
- timestamp_lower_bound
- timestamp_upper_bound
- identity_counter_lower_bound
- identity_counter_upper_bound
- expiration_date_lower_bound
- expiration_date_upper_bound
- birth_date_lower_bound
- birth_date_upper_bound
- citizenship_mask
- callback_url
properties:
eventId:
event_id:
type: string
eventData:
example: "134934934030489134341633902189494613533900917417361106374681011849132651019822199"
event_data:
type: string
example: "0x28906909b4f974d958f10cf00ff182f8942e75fb57caa1083a942350d6d7c930b"
selector:
type: string
identityCounter:
example: "27065"
identity_counter:
type: integer
timestampLowerBound:
example: 0
timestamp_lower_bound:
type: string
timestampUpperBound:
example: "0"
timestamp_upper_bound:
type: string
identityCounterLowerBound:
example: "19000000000"
identity_counter_lower_bound:
type: integer
identityCounterUpperBound:
type: integer
expirationDateLowerBound:
example: 0
identity_counter_upper_bound:
type: integer
example: 1
expiration_date_lower_bound:
type: string
example: "52983525027888"
expiration_date_upper_bound:
type: string
expirationDateUpperBound:
example: "52983525027888"
birth_date_lower_bound:
type: string
birthDateLowerBound:
example: "0x303030303030"
birth_date_upper_bound:
type: string
birthDateUpperBound:
example: "0x303630393032"
citizenship_mask:
type: string
citizenshipMask:
type: string
callbackUrl:
example: "0x554B52"
callback_url:
type: string
example: "https://example.com/integrations/verificator-svc/public/receive-proof/callback/c15ad8f88949"
62 changes: 62 additions & 0 deletions docs/spec/components/schemas/ProofParams.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
allOf:
- $ref: '#/components/schemas/ProofParamsKey'
- type: object
required:
- attributes
properties:
attributes:
type: object
required:
- event_id
- event_data
- selector
- identity_counter
- timestamp_lower_bound
- timestamp_upper_bound
- identity_counter_lower_bound
- identity_counter_upper_bound
- expiration_date_lower_bound
- expiration_date_upper_bound
- birth_date_lower_bound
- birth_date_upper_bound
- citizenship_mask
properties:
event_id:
type: string
example: "134934934030489134341633902189494613533900917417361106374681011849132651019822199"
event_data:
type: string
example: "0x28906909b4f974d958f10cf00ff182f8942e75fb57caa1083a942350d6d7c930b"
selector:
type: string
example: "27065"
identity_counter:
type: integer
example: 0
timestamp_lower_bound:
type: string
example: "0"
timestamp_upper_bound:
type: string
example: "19000000000"
identity_counter_lower_bound:
type: integer
example: 0
identity_counter_upper_bound:
type: integer
example: 1
expiration_date_lower_bound:
type: string
example: "52983525027888"
expiration_date_upper_bound:
type: string
example: "52983525027888"
birth_date_lower_bound:
type: string
example: "0x303030303030"
birth_date_upper_bound:
type: string
example: "0x303630393032"
citizenship_mask:
type: string
example: "0x554B52"
12 changes: 12 additions & 0 deletions docs/spec/components/schemas/ProofParamsKey.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type: object
required:
- id
- type
properties:
id:
type: string
example: "[email protected]"
type:
type: string
enum:
- get_proof_params
25 changes: 25 additions & 0 deletions docs/spec/components/schemas/User.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
allOf:
- $ref: '#/components/schemas/UserKey'
- type: object
x-go-is-request: true
required:
- attributes
properties:
attributes:
required:
- age_lower_bound
- uniqueness
- nationality
properties:
age_lower_bound:
type: integer
example: 18
uniqueness:
type: boolean
example: true
nationality:
type: string
example: "UKR"
event_id:
type: string
example: "2234556494903931186902189494613533900917417361106374681011849132651019822199"
12 changes: 12 additions & 0 deletions docs/spec/components/schemas/UserKey.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type: object
required:
- id
- type
properties:
id:
type: string
example: "[email protected]"
type:
type: string
enum:
- user
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
get:
tags:
- User verification
summary: Get verified proof
description: |
Get verified proof by userID.
operationId: getProof
parameters:
- $ref: '#/components/parameters/idParam'
responses:
200:
description: Success
content:
application/vnd.api+json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/GetProof'
400:
$ref: '#/components/responses/invalidParameter'
404:
$ref: '#/components/responses/notFound'
500:
$ref: '#/components/responses/internalError'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
get:
tags:
- Verification Status
- User verification
summary: Get user verification status
description: |
Get user verification status by UserID.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
post:
tags:
- Receive Proof
summary: Receive Proof by callback
- Proof
summary: Receive Proof by callback(mobile)
description: >-
It receives the proof by callback url
It receives the proof for verification by callback url
operationId: receiveProofByCallback
parameters:
- $ref: '#/components/parameters/pathIDHash'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
get:
tags:
- Verification Parameters
summary: Request user verification parameters
- Proof
summary: Get Proof Parameters(internal)
description: |
Sends a request for user verification with provided parameters.
Get proof parameters for user with provided query parameters(internal, better to use verification links to get proof-parameters).
operationId: getVerificationParameters
parameters:
- $ref: '#/components/parameters/idParam'
- $ref: '#/components/parameters/typeOfVerificationAgeParam'
- $ref: '#/components/parameters/typeOfVerificationUniquenessParam'
- $ref: '#/components/parameters/nationalityParam'
- $ref: '#/components/parameters/eventIdParam'
responses:
200:
description: Success
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
delete:
tags:
- User verification
summary: Delete user
description: |
Delete user by UserID.
operationId: deleteUser
parameters:
- $ref: '#/components/parameters/pathID'
responses:
'204':
description: User deleted
400:
$ref: '#/components/responses/invalidParameter'
404:
$ref: '#/components/responses/notFound'
500:
$ref: '#/components/responses/internalError'
Loading
Loading