Skip to content

Commit

Permalink
Deploying to gh-pages from @ a83a572 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaptoss committed Jul 10, 2024
1 parent e2559f8 commit 5451c38
Show file tree
Hide file tree
Showing 2 changed files with 265 additions and 17 deletions.
164 changes: 154 additions & 10 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,148 @@
}
}
},
"/integrations/geo-points-svc/v1/public/event_types/qr": {
"get": {
"tags": [
"Event types"
],
"summary": "List QR event types",
"description": "Returns configuration of all event types with QR-code.\nBasically, it is event static metadata (model `EventStaticMeta`)\nfor each event type in the system.\nRequires **admin** role in JWT.\n",
"operationId": "getQREventTypes",
"parameters": [
{
"in": "query",
"name": "count",
"description": "Іpecifies whether to return the number of uses of the event",
"required": false,
"schema": {
"type": "bool",
"example": true
}
},
{
"in": "query",
"name": "filter[name]",
"description": "Filter by type name. Possible values should be hard-coded in the client.",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string",
"example": "passport_scan"
}
}
},
{
"in": "query",
"name": "filter[name][not]",
"description": "Inverted filter by type name: excludes provided values\n",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string",
"example": "referral_specific"
}
}
},
{
"in": "query",
"name": "filter[flag]",
"description": "Filter by configuration flags. Values are disjunctive (OR).",
"required": false,
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"active",
"not_started",
"expired",
"disabled"
]
}
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EventType"
}
}
}
}
}
}
},
"500": {
"$ref": "#/components/responses/internalError"
}
}
},
"post": {
"tags": [
"Event types"
],
"summary": "Create event type",
"description": "Creates a new event type. Requires **admin** role in JWT.\nThe type must not be present in the system.\n",
"operationId": "createEventType",
"requestBody": {
"required": true,
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/EventType"
}
}
}
}
}
},
"responses": {
"204": {
"description": "No content"
},
"400": {
"$ref": "#/components/responses/invalidParameter"
},
"401": {
"$ref": "#/components/responses/invalidAuth"
},
"409": {
"description": "Event type already exists",
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/Errors"
}
}
}
},
"500": {
"$ref": "#/components/responses/internalError"
}
}
}
},
"/integrations/geo-points-svc/v1/public/events": {
"get": {
"tags": [
Expand Down Expand Up @@ -891,16 +1033,6 @@
"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": {
Expand Down Expand Up @@ -1022,6 +1154,12 @@
"$ref": "#/components/schemas/ReferralCode"
}
},
"referred_users_count": {
"type": "integer",
"format": "int",
"description": "Number of invited users",
"example": 13
},
"level": {
"type": "integer",
"format": "int",
Expand Down Expand Up @@ -1430,6 +1568,12 @@
"type": "string",
"description": "Base64-encoded QR code. Must match the code provided in event type.",
"example": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABaElEQVR4AWP4//8/AyUYw"
},
"usage_count": {
"type": "integer",
"format": "int",
"description": "Number of uses. Only available to the administrator.",
"example": 1002
}
}
},
Expand Down
118 changes: 111 additions & 7 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,107 @@ paths:
$ref: '#/components/responses/notFound'
'500':
$ref: '#/components/responses/internalError'
/integrations/geo-points-svc/v1/public/event_types/qr:
get:
tags:
- Event types
summary: List QR event types
description: |
Returns configuration of all event types with QR-code.
Basically, it is event static metadata (model `EventStaticMeta`)
for each event type in the system.
Requires **admin** role in JWT.
operationId: getQREventTypes
parameters:
- in: query
name: count
description: Іpecifies whether to return the number of uses of the event
required: false
schema:
type: bool
example: true
- in: query
name: 'filter[name]'
description: Filter by type name. Possible values should be hard-coded in the client.
required: false
schema:
type: array
items:
type: string
example: passport_scan
- in: query
name: 'filter[name][not]'
description: |
Inverted filter by type name: excludes provided values
required: false
schema:
type: array
items:
type: string
example: referral_specific
- in: query
name: 'filter[flag]'
description: Filter by configuration flags. Values are disjunctive (OR).
required: false
schema:
type: array
items:
type: string
enum:
- active
- not_started
- expired
- disabled
responses:
'200':
description: Success
content:
application/vnd.api+json:
schema:
type: object
required:
- data
properties:
data:
type: array
items:
$ref: '#/components/schemas/EventType'
'500':
$ref: '#/components/responses/internalError'
post:
tags:
- Event types
summary: Create event type
description: |
Creates a new event type. Requires **admin** role in JWT.
The type must not be present in the system.
operationId: createEventType
requestBody:
required: true
content:
application/vnd.api+json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/EventType'
responses:
'204':
description: No content
'400':
$ref: '#/components/responses/invalidParameter'
'401':
$ref: '#/components/responses/invalidAuth'
'409':
description: Event type already exists
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/Errors'
'500':
$ref: '#/components/responses/internalError'
/integrations/geo-points-svc/v1/public/events:
get:
tags:
Expand Down Expand Up @@ -597,13 +698,6 @@ paths:
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:
Expand Down Expand Up @@ -688,6 +782,11 @@ components:
description: Referral codes. Returned only for the single user.
items:
$ref: '#/components/schemas/ReferralCode'
referred_users_count:
type: integer
format: int
description: Number of invited users
example: 13
level:
type: integer
format: int
Expand Down Expand Up @@ -996,6 +1095,11 @@ components:
type: string
description: Base64-encoded QR code. Must match the code provided in event type.
example: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABaElEQVR4AWP4//8/AyUYw
usage_count:
type: integer
format: int
description: Number of uses. Only available to the administrator.
example: 1002
EventType:
allOf:
- $ref: '#/components/schemas/EventTypeKey'
Expand Down

0 comments on commit 5451c38

Please sign in to comment.