Skip to content

Commit

Permalink
Deploying to gh-pages from @ 829ac2f 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
violog committed Jul 3, 2024
1 parent 91cf998 commit 5e6a56d
Show file tree
Hide file tree
Showing 2 changed files with 285 additions and 49 deletions.
194 changes: 169 additions & 25 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
],
"properties": {
"data": {
"$ref": "#/components/schemas/PassportEventState"
"$ref": "#/components/schemas/EventClaimingState"
}
}
}
Expand Down Expand Up @@ -344,7 +344,7 @@
],
"properties": {
"data": {
"$ref": "#/components/schemas/PassportEventState"
"$ref": "#/components/schemas/EventClaimingState"
}
}
}
Expand Down Expand Up @@ -723,6 +723,97 @@
}
}
}
},
"/integrations/geo-points-svc/v1/public/events/{id}/qrcode": {
"patch": {
"tags": [
"Events"
],
"summary": "Fulfill QR code event",
"description": "Fulfill QR code event",
"operationId": "fulfillQREvent",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "string",
"example": "059c81dd-2a54-44a8-8142-c15ad8f88949"
}
},
{
"in": "header",
"name": "Signature",
"description": "Signature of the request",
"required": true,
"schema": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/FulfillQREvent"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EventClaimingState"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/invalidParameter"
},
"401": {
"$ref": "#/components/responses/invalidAuth"
},
"403": {
"description": "This event type was disabled and cannot be fulfilled",
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/Errors"
}
}
}
},
"404": {
"$ref": "#/components/responses/notFound"
},
"500": {
"$ref": "#/components/responses/internalError"
}
}
}
}
},
"components": {
Expand Down Expand Up @@ -880,8 +971,7 @@
"type": {
"type": "string",
"enum": [
"create_balance",
"update_balance"
"create_balance"
]
}
}
Expand Down Expand Up @@ -1009,6 +1099,55 @@
}
]
},
"EventClaimingState": {
"allOf": [
{
"$ref": "#/components/schemas/EventClaimingStateKey"
},
{
"type": "object",
"required": [
"attributes"
],
"properties": {
"attributes": {
"required": [
"claimed"
],
"type": "object",
"properties": {
"claimed": {
"type": "bool",
"example": true,
"description": "If passport scan event was automatically claimed"
}
}
}
}
}
]
},
"EventClaimingStateKey": {
"type": "object",
"required": [
"id",
"type"
],
"properties": {
"id": {
"type": "string",
"description": "Nullifier of the points owner",
"example": "0x123...abc",
"pattern": "^0x[0-9a-fA-F]{64}$"
},
"type": {
"type": "string",
"enum": [
"event_claiming_state"
]
}
}
},
"EventKey": {
"type": "object",
"required": [
Expand Down Expand Up @@ -1124,6 +1263,11 @@
"expired",
"disabled"
]
},
"qr_code_value": {
"type": "string",
"description": "Base64-encoded QR code. Must match the code provided in event type.",
"example": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABaElEQVR4AWP4//8/AyUYw"
}
}
},
Expand Down Expand Up @@ -1168,10 +1312,10 @@
}
}
},
"JoinProgram": {
"FulfillQREvent": {
"allOf": [
{
"$ref": "#/components/schemas/JoinProgramKey"
"$ref": "#/components/schemas/FulfillQREventKey"
},
{
"type": "object",
Expand All @@ -1181,22 +1325,23 @@
],
"properties": {
"attributes": {
"type": "object",
"required": [
"country"
"qr_code"
],
"type": "object",
"properties": {
"country": {
"qr_code": {
"type": "string",
"example": "5589842"
"description": "Base64-encoded QR code",
"example": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABaElEQVR4AWP4//8/AyUYw"
}
}
}
}
}
]
},
"JoinProgramKey": {
"FulfillQREventKey": {
"type": "object",
"required": [
"id",
Expand All @@ -1205,47 +1350,46 @@
"properties": {
"id": {
"type": "string",
"description": "Nullifier of the points owner",
"example": "0x123...abc",
"pattern": "^0x[0-9a-fA-F]{64}$"
"description": "Event ID",
"example": "059c81dd-2a54-44a8-8142-c15ad8f88949"
},
"type": {
"type": "string",
"enum": [
"join_program"
"fulfill_qr_event"
]
}
}
},
"PassportEventState": {
"JoinProgram": {
"allOf": [
{
"$ref": "#/components/schemas/PassportEventStateKey"
"$ref": "#/components/schemas/JoinProgramKey"
},
{
"type": "object",
"x-go-is-request": true,
"required": [
"attributes"
],
"properties": {
"attributes": {
"type": "object",
"required": [
"claimed"
"country"
],
"type": "object",
"properties": {
"claimed": {
"type": "bool",
"example": true,
"description": "If passport scan event was automatically claimed"
"country": {
"type": "string",
"example": "5589842"
}
}
}
}
}
]
},
"PassportEventStateKey": {
"JoinProgramKey": {
"type": "object",
"required": [
"id",
Expand All @@ -1261,7 +1405,7 @@
"type": {
"type": "string",
"enum": [
"passport_event_state"
"join_program"
]
}
}
Expand Down
Loading

0 comments on commit 5e6a56d

Please sign in to comment.