Skip to content

Commit

Permalink
Deploying to gh-pages from @ 57f7218 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
violog committed Jun 14, 2024
1 parent 20045d6 commit 19a60d2
Show file tree
Hide file tree
Showing 2 changed files with 312 additions and 162 deletions.
265 changes: 170 additions & 95 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@
"description": "Specifies whether to return the referral codes",
"required": false,
"schema": {
"type": "booleand",
"example": true
"type": "boolean"
}
}
],
Expand Down Expand Up @@ -198,78 +197,6 @@
"$ref": "#/components/responses/internalError"
}
}
},
"patch": {
"tags": [
"Points balance"
],
"summary": "Activate points balance",
"description": "Activate inactive balance. Balance is inactive when referred_by field is null.\nnullifier in query must match with id in request body\n",
"operationId": "activatePointsBalance",
"parameters": [
{
"$ref": "#/components/parameters/pathNullifier"
}
],
"requestBody": {
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/CreateBalance"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/Balance"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/invalidParameter"
},
"401": {
"$ref": "#/components/responses/invalidAuth"
},
"404": {
"$ref": "#/components/responses/notFound"
},
"409": {
"description": "Balance already activated",
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/Errors"
}
}
}
},
"500": {
"$ref": "#/components/responses/internalError"
}
}
}
},
"/integrations/rarime-points-svc/v1/public/balances/{nullifier}/verifypassport": {
Expand Down Expand Up @@ -510,6 +437,75 @@
}
}
},
"/integrations/rarime-points-svc/v1/public/event_types": {
"get": {
"tags": [
"Events"
],
"summary": "List event types",
"description": "Returns public configuration of all event types.\nBasically, it is event static metadata (model `EventStaticMeta`)\nfor each event type in the system.\n",
"operationId": "getEventTypes",
"parameters": [
{
"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[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"
}
}
}
},
"/integrations/rarime-points-svc/v1/public/events": {
"get": {
"tags": [
Expand Down Expand Up @@ -548,10 +544,19 @@
"type": "array",
"items": {
"type": "string",
"example": "create_org"
"example": "passport_scan"
}
}
},
{
"in": "query",
"name": "filter[has_expiration]",
"description": "Filter events by type which has or hasn't expiration.",
"required": false,
"schema": {
"type": "boolean"
}
},
{
"in": "query",
"name": "count",
Expand Down Expand Up @@ -798,7 +803,6 @@
"type": "object",
"required": [
"amount",
"is_disabled",
"created_at",
"updated_at",
"level"
Expand Down Expand Up @@ -831,33 +835,22 @@
"description": "Rank of the user in the full leaderboard. Returned only for the single user.",
"example": 294
},
"active_referral_codes": {
"type": "array",
"description": "Referral codes which can be used to build a referral link and send it\nto friends. Returned only for the single user.\n",
"example": [
"zgsScguZ",
"jerUsmac"
],
"items": {
"type": "string"
}
},
"consumed_referral_codes": {
"referral_codes": {
"type": "array",
"description": "Referral codes used by invited users. Returned only for the single user.",
"example": [
"73k3bdYaFWM",
"9csIL7dW65m"
],
"description": "Referral codes. Returned only for the single user.",
"items": {
"type": "string"
"$ref": "#/components/schemas/ReferralCode"
}
},
"level": {
"type": "integer",
"format": "int",
"description": "The level indicates user permissions and features",
"example": 2
},
"is_verified": {
"type": "boolean",
"description": "Whether the user has scanned passport. Returned only for the single user.\n"
}
}
}
Expand Down Expand Up @@ -1084,6 +1077,7 @@
"status",
"created_at",
"updated_at",
"has_expiration",
"meta"
],
"properties": {
Expand All @@ -1106,6 +1100,10 @@
"description": "Unix timestamp of the event status change",
"example": 1706531218
},
"has_expiration": {
"type": "boolean",
"description": "Whether this event may become expired."
},
"meta": {
"$ref": "#/components/schemas/EventMeta"
},
Expand Down Expand Up @@ -1188,7 +1186,7 @@
"description",
"short_description",
"frequency",
"no_auto_open"
"flag"
],
"properties": {
"name": {
Expand Down Expand Up @@ -1245,6 +1243,57 @@
"type": "string",
"description": "Event logo",
"example": "https://logo.com/some_logo.svg"
},
"flag": {
"type": "string",
"description": "Event configuration flag:\n - active: Events can be opened, fulfilled, claimed\n - not_started: Event are not available yet, see `starts_at`\n - expired: Event is not available, as it has already expired, see `expires_at`\n - disabled: Event is disabled in the system\n\nIf event is disabled, it doesn't matter if it's expired or not started:\nit has `disabled` flag.\n",
"enum": [
"active",
"not_started",
"expired",
"disabled"
]
}
}
},
"EventType": {
"allOf": [
{
"$ref": "#/components/schemas/EventTypeKey"
},
{
"type": "object",
"description": "Event type configuration and metadata",
"required": [
"attributes"
],
"properties": {
"attributes": {
"type": "object",
"format": "EventStaticMeta",
"$ref": "#/components/schemas/EventStaticMeta"
}
}
}
]
},
"EventTypeKey": {
"type": "object",
"required": [
"id",
"type"
],
"properties": {
"id": {
"type": "string",
"description": "Event type unique code name",
"example": "passport_scan"
},
"type": {
"type": "string",
"enum": [
"event_type"
]
}
}
},
Expand Down Expand Up @@ -1346,6 +1395,32 @@
}
}
},
"ReferralCode": {
"type": "object",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string",
"description": "Referral code itself, unique identifier",
"example": "bDSCcQB8Hhk"
},
"status": {
"type": "string",
"description": "Status of the code, belonging to this user (referrer):\n 1. active: the code is not used yet by another user (referee)\n 2. banned: the referrer's country (known after scanning passport)\n is not allowed to participate in the referral program\n 3. limited: the limit of reserved tokens in the referrer's country is reached\n 4. awaiting: the code is used by referee who has scanned passport, but the referrer hasn't yet\n 5. rewarded: the code is used, both referee and referrer have scanned passports\n 6. consumed: the code is used by referee who has not scanned passport yet\n\nThe list is sorted by priority. E.g. if the referee has scanned passport,\nbut referrer's country has limit reached, the status would be `limited`.\n",
"enum": [
"active",
"banned",
"limited",
"awaiting",
"rewarded",
"consumed"
]
}
}
},
"VerifyPassport": {
"allOf": [
{
Expand Down
Loading

0 comments on commit 19a60d2

Please sign in to comment.