-
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 #26 from rarimo/feature/endpoints-changes
Feature: endpoints changes
- Loading branch information
Showing
34 changed files
with
443 additions
and
258 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
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,12 @@ | ||
allOf: | ||
- $ref: '#/components/schemas/EventTypeKey' | ||
- type: object | ||
description: Event type configuration and metadata | ||
required: | ||
- attributes | ||
properties: | ||
attributes: | ||
# helps to both display good doc and generate convenient model | ||
type: object | ||
format: EventStaticMeta | ||
$ref: '#/components/schemas/EventStaticMeta' |
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,12 @@ | ||
type: object | ||
required: | ||
- id | ||
- type | ||
properties: | ||
id: | ||
type: string | ||
description: Event type unique code name | ||
example: passport_scan | ||
type: | ||
type: string | ||
enum: [ event_type ] |
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,30 @@ | ||
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): | ||
1. active: the code is not used yet by another user (referee) | ||
2. banned: the referrer's country (known after scanning passport) | ||
is not allowed to participate in the referral program | ||
3. limited: the limit of reserved tokens in the referrer's country is reached | ||
4. awaiting: the code is used by referee who has scanned passport, but the referrer hasn't yet | ||
5. rewarded: the code is used, both referee and referrer have scanned passports | ||
6. consumed: the code is used by referee who has not scanned passport yet | ||
The list is sorted by priority. E.g. if the referee has scanned passport, | ||
but referrer's country has limit reached, the status would be `limited`. | ||
enum: | ||
- active | ||
- banned | ||
- limited | ||
- awaiting | ||
- rewarded | ||
- consumed |
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
48 changes: 48 additions & 0 deletions
48
docs/spec/paths/integrations@rarime-points-svc@v1@public@event_types.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
get: | ||
tags: | ||
- Events | ||
summary: List event types | ||
description: | | ||
Returns public configuration of all event types. | ||
Basically, it is event static metadata (model `EventStaticMeta`) | ||
for each event type in the system. | ||
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' |
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
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.