From bc65415985b67d09ddabc101bdacc958137e6bf3 Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Thu, 11 Dec 2025 13:58:00 -0800 Subject: [PATCH] Fix prize spec --- api/swagger/swagger-v1.yaml | 143 ++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) diff --git a/api/swagger/swagger-v1.yaml b/api/swagger/swagger-v1.yaml index 981f78af..7ed326d4 100644 --- a/api/swagger/swagger-v1.yaml +++ b/api/swagger/swagger-v1.yaml @@ -6907,6 +6907,149 @@ components: type: integer description: The reward amount example: 100 + prize_claim_request: + type: object + required: + - signature + - wallet + properties: + signature: + type: string + description: The Solana transaction signature for the 2 YAK payment + example: "5j7s1QjmRKFuDbCWMRVRNibSV2VAAEcNKP6HWU7GwPdXkBZvhz8n4vQl7bBq8tN4Rz9x1Kj3mP5wQ8rT2Y6zA" + wallet: + type: string + description: The wallet address that sent the transaction + example: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC" + prize_claim_response: + type: object + required: + - prize_id + - prize_name + - wallet + properties: + prize_id: + type: string + description: The unique identifier of the prize won + example: "prize_1_yak_airdrop" + prize_name: + type: string + description: The name of the prize won + example: "1 YAK Airdrop" + wallet: + type: string + description: The wallet address that claimed the prize + example: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC" + prize_type: + type: string + description: The type of prize (e.g., "coin_airdrop", "download") + example: "coin_airdrop" + action_data: + type: object + description: Prize-specific action data (e.g., redeem code/URL for coin airdrops, download URL for downloads) + additionalProperties: true + example: + code: "aB3d5F" + url: "/coins/YAK/redeem/aB3d5F" + prize_public: + type: object + required: + - prize_id + - name + - weight + properties: + prize_id: + type: string + description: The unique identifier of the prize + example: "prize_1_yak_airdrop" + name: + type: string + description: The name of the prize + example: "1 YAK Airdrop" + description: + type: string + description: Description of the prize + example: "Win 1 YAK coin airdrop" + weight: + type: integer + description: Weight for random selection (higher = more likely) + example: 1 + metadata: + type: object + description: Sanitized metadata (excludes sensitive URLs) + additionalProperties: true + example: + type: "coin_airdrop" + amount: 1000000000 + prizes_response: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/prize_public' + description: List of active prizes available for claiming + claimed_prize: + type: object + required: + - id + - wallet + - signature + - mint + - amount + - prize_id + - prize_name + - created_at + properties: + id: + type: integer + description: The unique identifier of the claimed prize record + example: 1 + wallet: + type: string + description: The wallet address that claimed the prize + example: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC" + signature: + type: string + description: The transaction signature used to claim the prize + example: "5j7s1QjmRKFuDbCWMRVRNibSV2VAAEcNKP6HWU7GwPdXkBZvhz8n4vQl7bBq8tN4Rz9x1Kj3mP5wQ8rT2Y6zA" + mint: + type: string + description: The coin mint address used for the claim + example: "ZDaUDL4XFdEct7UgeztrFQAptsvh4ZdhyZDZ1RpxYAK" + amount: + type: integer + description: The amount paid to claim the prize (in smallest unit, e.g., lamports) + example: 2000000000 + prize_id: + type: string + description: The unique identifier of the prize won + example: "prize_1_yak_airdrop" + prize_name: + type: string + description: The name of the prize won + example: "1 YAK Airdrop" + prize_type: + type: string + description: The type of prize (e.g., "coin_airdrop", "download") + example: "coin_airdrop" + created_at: + type: string + format: date-time + description: When the prize was claimed + example: "2024-01-15T10:30:00Z" + claimed_prizes_response: + type: object + required: + - data + properties: + data: + type: array + items: + $ref: '#/components/schemas/claimed_prize' + description: List of claimed prizes for the wallet (action_data excluded for security) responses: ParseError: description: When a mask can't be parsed