-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from rarimo/feat/s3-integrations
Add endpoints with s3 integrations. Change docs.
- Loading branch information
Showing
38 changed files
with
892 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ allOf: | |
attributes: | ||
type: object | ||
required: | ||
- status | ||
- name | ||
- surname | ||
- id_num | ||
|
@@ -29,32 +28,48 @@ allOf: | |
description: | | ||
Accepted - the data was saved by the service for further processing | ||
Processed - the data is processed and stored | ||
Read-only. | ||
name: | ||
type: string | ||
example: Hilary | ||
surname: | ||
type: string | ||
example: Cabe | ||
id_num: | ||
type: string | ||
example: "3736297649" | ||
birthday: | ||
type: string | ||
example: 27/6/1988 | ||
citizen: | ||
type: string | ||
example: Georgian | ||
visited: | ||
type: string | ||
example: 18/07/2024 | ||
purpose: | ||
type: string | ||
example: Make documents | ||
country: | ||
type: string | ||
example: Georgia | ||
city: | ||
type: string | ||
example: Kutaisi | ||
address: | ||
type: string | ||
example: Central street, 1 | ||
postal: | ||
type: string | ||
example: "21626" | ||
phone: | ||
type: string | ||
example: "+13165282105" | ||
email: | ||
type: string | ||
type: [email protected] | ||
image: | ||
type: string | ||
description: base64 encoded image with max size 4 MB | ||
description: | | ||
base64 encoded image with max size 4 MB or | ||
URL for S3 storage with image up to 4 mb | ||
example: https://geoforms.nyc3.digitaloceanspaces.com/awesome_phono.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
type: object | ||
required: | ||
- id | ||
- type | ||
properties: | ||
id: | ||
type: string | ||
description: UUID for check form submission status | ||
type: | ||
type: string | ||
enum: [ form ] | ||
enum: [ form, submit_form ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
allOf: | ||
- $ref: '#/components/schemas/FormStatusKey' | ||
- type: object | ||
required: | ||
- attributes | ||
properties: | ||
attributes: | ||
type: object | ||
required: | ||
- status | ||
- created_at | ||
- next_form_at | ||
- until_next_form | ||
properties: | ||
status: | ||
type: string | ||
enum: [ accepted, processed ] | ||
description: | | ||
Accepted - the data was saved by the service for further processing | ||
Processed - the data is processed and stored | ||
created_at: | ||
type: integer | ||
format: int64 | ||
example: 1721392530 | ||
description: Form submission time. Unix time. | ||
processed_at: | ||
type: integer | ||
format: int64 | ||
example: 1721392530 | ||
description: Form processing time. Absent if the status is accepted. Unix time. | ||
next_form_at: | ||
type: integer | ||
format: int64 | ||
example: 1721392530 | ||
description: Time of the next possible form submission. Unix time. | ||
until_next_form: | ||
type: integer | ||
format: int64 | ||
example: 120 | ||
description: Time until the next form submission in seconds. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type: object | ||
required: | ||
- type | ||
properties: | ||
type: | ||
type: string | ||
enum: [ form_status ] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
BearerAuth: | ||
type: http | ||
scheme: bearer | ||
bearerFormat: JWT | ||
type: http | ||
scheme: bearer | ||
bearerFormat: JWT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
post: | ||
tags: | ||
- User form | ||
summary: Submit lightweight user answers | ||
description: | | ||
Send user answers and return their current status. | ||
The image is a link to s3 storage | ||
Only a user with a confirmed passport can send the form ('verified: true' in JWT). | ||
There is a configurable delay before the same user | ||
can submit another form. | ||
operationId: lightweightSubmitForm | ||
security: | ||
- BearerAuth: [] | ||
requestBody: | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: '#/components/schemas/SubmitForm' | ||
responses: | ||
200: | ||
description: "Success" | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/FormStatus' | ||
400: | ||
$ref: '#/components/responses/invalidParameter' | ||
401: | ||
$ref: '#/components/responses/invalidAuth' | ||
429: | ||
description: "It is necessary to wait some time before sending the next form" | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/Errors' | ||
500: | ||
$ref: '#/components/responses/internalError' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
docs/spec/paths/integrations@forms-svc@v1@[email protected]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
get: | ||
tags: | ||
- User form | ||
summary: Get last form status | ||
description: | | ||
Get last form status filled out by the user nullifier. | ||
operationId: getLastFormStatus | ||
parameters: | ||
- $ref: '#/components/parameters/pathNullifier' | ||
security: | ||
- BearerAuth: [] | ||
responses: | ||
200: | ||
description: Success | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: '#/components/schemas/FormStatus' | ||
400: | ||
$ref: '#/components/responses/invalidParameter' | ||
401: | ||
$ref: '#/components/responses/invalidAuth' | ||
404: | ||
$ref: '#/components/responses/notFound' | ||
500: | ||
$ref: '#/components/responses/internalError' |
9 changes: 5 additions & 4 deletions
9
.../integrations@forms-svc@v1@form@{id}.yaml → ...ntegrations@forms-svc@v1@status@{id}.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.