diff --git a/sdk/.openapi-generator/FILES b/sdk/.openapi-generator/FILES index 00f417ca..f7bc0bc9 100644 --- a/sdk/.openapi-generator/FILES +++ b/sdk/.openapi-generator/FILES @@ -27,12 +27,16 @@ src/models/BaseResult.ts src/models/Coin.ts src/models/CoinResult.ts src/models/CreateGroupsPayload.ts +src/models/CreateInstagramPayload.ts src/models/CreateLetterPayload.ts src/models/CreateLinkPayload.ts src/models/CreateLotteryPayload.ts src/models/CreateRafflePayload.ts src/models/CreateRandomNumberPayload.ts +src/models/CreateSecretSantaPayload.ts +src/models/CreateSecretSantaPayloadParticipantsInner.ts src/models/CreateShiftsPayload.ts +src/models/CreateTiktokPayload.ts src/models/CreateTournamentPayload.ts src/models/DrawMetadata.ts src/models/DrawReTossPayload.ts @@ -41,6 +45,7 @@ src/models/Groups.ts src/models/GroupsFields.ts src/models/GroupsResult.ts src/models/Instagram.ts +src/models/InstagramFields.ts src/models/InstagramResult.ts src/models/InstagramResultAllOfComment.ts src/models/InstagramResultAllOfValue.ts @@ -68,11 +73,12 @@ src/models/RandomNumber.ts src/models/RandomNumberFields.ts src/models/RandomNumberResult.ts src/models/RedeemPromoCode.ts -src/models/SecretSanta.ts src/models/SecretSantaAdminResponse.ts src/models/SecretSantaAdminResponseParticipantsInner.ts src/models/SecretSantaCreateResponse.ts -src/models/SecretSantaParticipantsInner.ts +src/models/SecretSantaErrorResponse.ts +src/models/SecretSantaErrorResponseBody.ts +src/models/SecretSantaErrorResponseBodyGeneralInner.ts src/models/SecretSantaResendEmail.ts src/models/SecretSantaResendEmailResponse.ts src/models/SecretSantaResult.ts @@ -85,6 +91,7 @@ src/models/ShiftsResultAllOfValue.ts src/models/Spinner.ts src/models/SpinnerResult.ts src/models/Tiktok.ts +src/models/TiktokFields.ts src/models/TiktokResult.ts src/models/TiktokResultAllOfComment.ts src/models/TiktokResultAllOfValue.ts diff --git a/sdk/package-lock.json b/sdk/package-lock.json index 0c09a8cf..13b772a1 100644 --- a/sdk/package-lock.json +++ b/sdk/package-lock.json @@ -12,9 +12,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/sdk/src/apis/InstagramApi.ts b/sdk/src/apis/InstagramApi.ts index 983a5360..7e5f52b3 100644 --- a/sdk/src/apis/InstagramApi.ts +++ b/sdk/src/apis/InstagramApi.ts @@ -15,12 +15,15 @@ import * as runtime from '../runtime'; import type { + CreateInstagramPayload, DrawReTossPayload, DrawTossPayload, Instagram, InstagramResult, } from '../models/index'; import { + CreateInstagramPayloadFromJSON, + CreateInstagramPayloadToJSON, DrawReTossPayloadFromJSON, DrawReTossPayloadToJSON, DrawTossPayloadFromJSON, @@ -32,7 +35,7 @@ import { } from '../models/index'; export interface InstagramCreateRequest { - instagram: Instagram; + createInstagramPayload: CreateInstagramPayload; } export interface InstagramReadRequest { @@ -58,7 +61,7 @@ export interface InstagramTossRequest { export interface InstagramApiInterface { /** * - * @param {Instagram} instagram + * @param {CreateInstagramPayload} createInstagramPayload * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InstagramApiInterface @@ -120,10 +123,10 @@ export class InstagramApi extends runtime.BaseAPI implements InstagramApiInterfa /** */ async instagramCreateRaw(requestParameters: InstagramCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['instagram'] == null) { + if (requestParameters['createInstagramPayload'] == null) { throw new runtime.RequiredError( - 'instagram', - 'Required parameter "instagram" was null or undefined when calling instagramCreate().' + 'createInstagramPayload', + 'Required parameter "createInstagramPayload" was null or undefined when calling instagramCreate().' ); } @@ -138,7 +141,7 @@ export class InstagramApi extends runtime.BaseAPI implements InstagramApiInterfa method: 'POST', headers: headerParameters, query: queryParameters, - body: InstagramToJSON(requestParameters['instagram']), + body: CreateInstagramPayloadToJSON(requestParameters['createInstagramPayload']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => InstagramFromJSON(jsonValue)); diff --git a/sdk/src/apis/SecretSantaApi.ts b/sdk/src/apis/SecretSantaApi.ts index ff6e664a..ed5b6cfe 100644 --- a/sdk/src/apis/SecretSantaApi.ts +++ b/sdk/src/apis/SecretSantaApi.ts @@ -15,20 +15,23 @@ import * as runtime from '../runtime'; import type { - SecretSanta, + CreateSecretSantaPayload, SecretSantaAdminResponse, SecretSantaCreateResponse, + SecretSantaErrorResponse, SecretSantaResendEmail, SecretSantaResendEmailResponse, SecretSantaResult, } from '../models/index'; import { - SecretSantaFromJSON, - SecretSantaToJSON, + CreateSecretSantaPayloadFromJSON, + CreateSecretSantaPayloadToJSON, SecretSantaAdminResponseFromJSON, SecretSantaAdminResponseToJSON, SecretSantaCreateResponseFromJSON, SecretSantaCreateResponseToJSON, + SecretSantaErrorResponseFromJSON, + SecretSantaErrorResponseToJSON, SecretSantaResendEmailFromJSON, SecretSantaResendEmailToJSON, SecretSantaResendEmailResponseFromJSON, @@ -38,7 +41,7 @@ import { } from '../models/index'; export interface SecretSantaCreateRequest { - secretSanta: SecretSanta; + createSecretSantaPayload: CreateSecretSantaPayload; } export interface SecretSantaResultAdminGetRequest { @@ -64,7 +67,7 @@ export interface SecretSantaResultGetRequest { export interface SecretSantaApiInterface { /** * - * @param {SecretSanta} secretSanta + * @param {CreateSecretSantaPayload} createSecretSantaPayload * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SecretSantaApiInterface @@ -126,10 +129,10 @@ export class SecretSantaApi extends runtime.BaseAPI implements SecretSantaApiInt /** */ async secretSantaCreateRaw(requestParameters: SecretSantaCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['secretSanta'] == null) { + if (requestParameters['createSecretSantaPayload'] == null) { throw new runtime.RequiredError( - 'secretSanta', - 'Required parameter "secretSanta" was null or undefined when calling secretSantaCreate().' + 'createSecretSantaPayload', + 'Required parameter "createSecretSantaPayload" was null or undefined when calling secretSantaCreate().' ); } @@ -144,7 +147,7 @@ export class SecretSantaApi extends runtime.BaseAPI implements SecretSantaApiInt method: 'POST', headers: headerParameters, query: queryParameters, - body: SecretSantaToJSON(requestParameters['secretSanta']), + body: CreateSecretSantaPayloadToJSON(requestParameters['createSecretSantaPayload']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => SecretSantaCreateResponseFromJSON(jsonValue)); diff --git a/sdk/src/apis/TiktokApi.ts b/sdk/src/apis/TiktokApi.ts index dbbaed41..63041fe2 100644 --- a/sdk/src/apis/TiktokApi.ts +++ b/sdk/src/apis/TiktokApi.ts @@ -15,12 +15,15 @@ import * as runtime from '../runtime'; import type { + CreateTiktokPayload, DrawReTossPayload, DrawTossPayload, Tiktok, TiktokResult, } from '../models/index'; import { + CreateTiktokPayloadFromJSON, + CreateTiktokPayloadToJSON, DrawReTossPayloadFromJSON, DrawReTossPayloadToJSON, DrawTossPayloadFromJSON, @@ -32,7 +35,7 @@ import { } from '../models/index'; export interface TiktokCreateRequest { - tiktok: Tiktok; + createTiktokPayload: CreateTiktokPayload; } export interface TiktokReadRequest { @@ -58,7 +61,7 @@ export interface TiktokTossRequest { export interface TiktokApiInterface { /** * - * @param {Tiktok} tiktok + * @param {CreateTiktokPayload} createTiktokPayload * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TiktokApiInterface @@ -120,10 +123,10 @@ export class TiktokApi extends runtime.BaseAPI implements TiktokApiInterface { /** */ async tiktokCreateRaw(requestParameters: TiktokCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['tiktok'] == null) { + if (requestParameters['createTiktokPayload'] == null) { throw new runtime.RequiredError( - 'tiktok', - 'Required parameter "tiktok" was null or undefined when calling tiktokCreate().' + 'createTiktokPayload', + 'Required parameter "createTiktokPayload" was null or undefined when calling tiktokCreate().' ); } @@ -138,7 +141,7 @@ export class TiktokApi extends runtime.BaseAPI implements TiktokApiInterface { method: 'POST', headers: headerParameters, query: queryParameters, - body: TiktokToJSON(requestParameters['tiktok']), + body: CreateTiktokPayloadToJSON(requestParameters['createTiktokPayload']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => TiktokFromJSON(jsonValue)); diff --git a/sdk/src/models/CreateInstagramPayload.ts b/sdk/src/models/CreateInstagramPayload.ts new file mode 100644 index 00000000..a24d6aeb --- /dev/null +++ b/sdk/src/models/CreateInstagramPayload.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { BaseFieldsCreate } from './BaseFieldsCreate'; +import { + BaseFieldsCreateFromJSON, + BaseFieldsCreateFromJSONTyped, + BaseFieldsCreateToJSON, +} from './BaseFieldsCreate'; +import type { DrawMetadata } from './DrawMetadata'; +import { + DrawMetadataFromJSON, + DrawMetadataFromJSONTyped, + DrawMetadataToJSON, +} from './DrawMetadata'; +import type { PrizeField } from './PrizeField'; +import { + PrizeFieldFromJSON, + PrizeFieldFromJSONTyped, + PrizeFieldToJSON, +} from './PrizeField'; + +/** + * + * @export + * @interface CreateInstagramPayload + */ +export interface CreateInstagramPayload extends BaseFieldsCreate { + /** + * + * @type {Array} + * @memberof CreateInstagramPayload + */ + prizes: Array; + /** + * + * @type {boolean} + * @memberof CreateInstagramPayload + */ + useLikes: boolean; + /** + * + * @type {number} + * @memberof CreateInstagramPayload + */ + minMentions: number; + /** + * + * @type {string} + * @memberof CreateInstagramPayload + */ + postUrl: string; +} + +/** + * Check if a given object implements the CreateInstagramPayload interface. + */ +export function instanceOfCreateInstagramPayload(value: object): value is CreateInstagramPayload { + if (!('prizes' in value) || value['prizes'] === undefined) return false; + if (!('useLikes' in value) || value['useLikes'] === undefined) return false; + if (!('minMentions' in value) || value['minMentions'] === undefined) return false; + if (!('postUrl' in value) || value['postUrl'] === undefined) return false; + return true; +} + +export function CreateInstagramPayloadFromJSON(json: any): CreateInstagramPayload { + return CreateInstagramPayloadFromJSONTyped(json, false); +} + +export function CreateInstagramPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateInstagramPayload { + if (json == null) { + return json; + } + return { + ...BaseFieldsCreateFromJSONTyped(json, ignoreDiscriminator), + 'prizes': ((json['prizes'] as Array).map(PrizeFieldFromJSON)), + 'useLikes': json['use_likes'], + 'minMentions': json['min_mentions'], + 'postUrl': json['post_url'], + }; +} + +export function CreateInstagramPayloadToJSON(value?: CreateInstagramPayload | null): any { + if (value == null) { + return value; + } + return { + ...BaseFieldsCreateToJSON(value), + 'prizes': ((value['prizes'] as Array).map(PrizeFieldToJSON)), + 'use_likes': value['useLikes'], + 'min_mentions': value['minMentions'], + 'post_url': value['postUrl'], + }; +} + diff --git a/sdk/src/models/CreateSecretSantaPayload.ts b/sdk/src/models/CreateSecretSantaPayload.ts new file mode 100644 index 00000000..6e77b652 --- /dev/null +++ b/sdk/src/models/CreateSecretSantaPayload.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { CreateSecretSantaPayloadParticipantsInner } from './CreateSecretSantaPayloadParticipantsInner'; +import { + CreateSecretSantaPayloadParticipantsInnerFromJSON, + CreateSecretSantaPayloadParticipantsInnerFromJSONTyped, + CreateSecretSantaPayloadParticipantsInnerToJSON, +} from './CreateSecretSantaPayloadParticipantsInner'; + +/** + * + * @export + * @interface CreateSecretSantaPayload + */ +export interface CreateSecretSantaPayload { + /** + * + * @type {string} + * @memberof CreateSecretSantaPayload + */ + language: CreateSecretSantaPayloadLanguageEnum; + /** + * + * @type {Array} + * @memberof CreateSecretSantaPayload + */ + participants: Array; +} + + +/** + * @export + */ +export const CreateSecretSantaPayloadLanguageEnum = { + Es: 'es', + En: 'en' +} as const; +export type CreateSecretSantaPayloadLanguageEnum = typeof CreateSecretSantaPayloadLanguageEnum[keyof typeof CreateSecretSantaPayloadLanguageEnum]; + + +/** + * Check if a given object implements the CreateSecretSantaPayload interface. + */ +export function instanceOfCreateSecretSantaPayload(value: object): value is CreateSecretSantaPayload { + if (!('language' in value) || value['language'] === undefined) return false; + if (!('participants' in value) || value['participants'] === undefined) return false; + return true; +} + +export function CreateSecretSantaPayloadFromJSON(json: any): CreateSecretSantaPayload { + return CreateSecretSantaPayloadFromJSONTyped(json, false); +} + +export function CreateSecretSantaPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSecretSantaPayload { + if (json == null) { + return json; + } + return { + + 'language': json['language'], + 'participants': ((json['participants'] as Array).map(CreateSecretSantaPayloadParticipantsInnerFromJSON)), + }; +} + +export function CreateSecretSantaPayloadToJSON(value?: CreateSecretSantaPayload | null): any { + if (value == null) { + return value; + } + return { + + 'language': value['language'], + 'participants': ((value['participants'] as Array).map(CreateSecretSantaPayloadParticipantsInnerToJSON)), + }; +} + diff --git a/sdk/src/models/CreateSecretSantaPayloadParticipantsInner.ts b/sdk/src/models/CreateSecretSantaPayloadParticipantsInner.ts new file mode 100644 index 00000000..94285820 --- /dev/null +++ b/sdk/src/models/CreateSecretSantaPayloadParticipantsInner.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface CreateSecretSantaPayloadParticipantsInner + */ +export interface CreateSecretSantaPayloadParticipantsInner { + /** + * + * @type {string} + * @memberof CreateSecretSantaPayloadParticipantsInner + */ + name: string; + /** + * + * @type {string} + * @memberof CreateSecretSantaPayloadParticipantsInner + */ + email: string; + /** + * + * @type {Array} + * @memberof CreateSecretSantaPayloadParticipantsInner + */ + exclusions: Array; +} + +/** + * Check if a given object implements the CreateSecretSantaPayloadParticipantsInner interface. + */ +export function instanceOfCreateSecretSantaPayloadParticipantsInner(value: object): value is CreateSecretSantaPayloadParticipantsInner { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('email' in value) || value['email'] === undefined) return false; + if (!('exclusions' in value) || value['exclusions'] === undefined) return false; + return true; +} + +export function CreateSecretSantaPayloadParticipantsInnerFromJSON(json: any): CreateSecretSantaPayloadParticipantsInner { + return CreateSecretSantaPayloadParticipantsInnerFromJSONTyped(json, false); +} + +export function CreateSecretSantaPayloadParticipantsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSecretSantaPayloadParticipantsInner { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'email': json['email'], + 'exclusions': json['exclusions'], + }; +} + +export function CreateSecretSantaPayloadParticipantsInnerToJSON(value?: CreateSecretSantaPayloadParticipantsInner | null): any { + if (value == null) { + return value; + } + return { + + 'name': value['name'], + 'email': value['email'], + 'exclusions': value['exclusions'], + }; +} + diff --git a/sdk/src/models/CreateTiktokPayload.ts b/sdk/src/models/CreateTiktokPayload.ts new file mode 100644 index 00000000..18cff6fb --- /dev/null +++ b/sdk/src/models/CreateTiktokPayload.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { BaseFieldsCreate } from './BaseFieldsCreate'; +import { + BaseFieldsCreateFromJSON, + BaseFieldsCreateFromJSONTyped, + BaseFieldsCreateToJSON, +} from './BaseFieldsCreate'; +import type { DrawMetadata } from './DrawMetadata'; +import { + DrawMetadataFromJSON, + DrawMetadataFromJSONTyped, + DrawMetadataToJSON, +} from './DrawMetadata'; +import type { PrizeField } from './PrizeField'; +import { + PrizeFieldFromJSON, + PrizeFieldFromJSONTyped, + PrizeFieldToJSON, +} from './PrizeField'; + +/** + * + * @export + * @interface CreateTiktokPayload + */ +export interface CreateTiktokPayload extends BaseFieldsCreate { + /** + * + * @type {Array} + * @memberof CreateTiktokPayload + */ + prizes: Array; + /** + * + * @type {number} + * @memberof CreateTiktokPayload + */ + minMentions: number; + /** + * + * @type {string} + * @memberof CreateTiktokPayload + */ + postUrl: string; +} + +/** + * Check if a given object implements the CreateTiktokPayload interface. + */ +export function instanceOfCreateTiktokPayload(value: object): value is CreateTiktokPayload { + if (!('prizes' in value) || value['prizes'] === undefined) return false; + if (!('minMentions' in value) || value['minMentions'] === undefined) return false; + if (!('postUrl' in value) || value['postUrl'] === undefined) return false; + return true; +} + +export function CreateTiktokPayloadFromJSON(json: any): CreateTiktokPayload { + return CreateTiktokPayloadFromJSONTyped(json, false); +} + +export function CreateTiktokPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTiktokPayload { + if (json == null) { + return json; + } + return { + ...BaseFieldsCreateFromJSONTyped(json, ignoreDiscriminator), + 'prizes': ((json['prizes'] as Array).map(PrizeFieldFromJSON)), + 'minMentions': json['min_mentions'], + 'postUrl': json['post_url'], + }; +} + +export function CreateTiktokPayloadToJSON(value?: CreateTiktokPayload | null): any { + if (value == null) { + return value; + } + return { + ...BaseFieldsCreateToJSON(value), + 'prizes': ((value['prizes'] as Array).map(PrizeFieldToJSON)), + 'min_mentions': value['minMentions'], + 'post_url': value['postUrl'], + }; +} + diff --git a/sdk/src/models/DrawReTossPayload.ts b/sdk/src/models/DrawReTossPayload.ts index 098cad8c..b80f9816 100644 --- a/sdk/src/models/DrawReTossPayload.ts +++ b/sdk/src/models/DrawReTossPayload.ts @@ -24,13 +24,14 @@ export interface DrawReTossPayload { * @type {string} * @memberof DrawReTossPayload */ - prizeId?: string; + prizeId: string; } /** * Check if a given object implements the DrawReTossPayload interface. */ export function instanceOfDrawReTossPayload(value: object): value is DrawReTossPayload { + if (!('prizeId' in value) || value['prizeId'] === undefined) return false; return true; } @@ -44,7 +45,7 @@ export function DrawReTossPayloadFromJSONTyped(json: any, ignoreDiscriminator: b } return { - 'prizeId': json['prize_id'] == null ? undefined : json['prize_id'], + 'prizeId': json['prize_id'], }; } diff --git a/sdk/src/models/Instagram.ts b/sdk/src/models/Instagram.ts index 66212aeb..17217167 100644 --- a/sdk/src/models/Instagram.ts +++ b/sdk/src/models/Instagram.ts @@ -31,12 +31,12 @@ import { InstagramResultFromJSONTyped, InstagramResultToJSON, } from './InstagramResult'; -import type { Prize } from './Prize'; +import type { PrizeField } from './PrizeField'; import { - PrizeFromJSON, - PrizeFromJSONTyped, - PrizeToJSON, -} from './Prize'; + PrizeFieldFromJSON, + PrizeFieldFromJSONTyped, + PrizeFieldToJSON, +} from './PrizeField'; /** * @@ -46,10 +46,10 @@ import { export interface Instagram extends BaseDraw { /** * - * @type {Array} + * @type {Array} * @memberof Instagram */ - prizes: Array; + prizes: Array; /** * * @type {boolean} @@ -73,7 +73,7 @@ export interface Instagram extends BaseDraw { * @type {Array} * @memberof Instagram */ - readonly results?: Array; + readonly results: Array; } @@ -86,6 +86,7 @@ export function instanceOfInstagram(value: object): value is Instagram { if (!('useLikes' in value) || value['useLikes'] === undefined) return false; if (!('minMentions' in value) || value['minMentions'] === undefined) return false; if (!('postUrl' in value) || value['postUrl'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; return true; } @@ -99,11 +100,11 @@ export function InstagramFromJSONTyped(json: any, ignoreDiscriminator: boolean): } return { ...BaseDrawFromJSONTyped(json, ignoreDiscriminator), - 'prizes': ((json['prizes'] as Array).map(PrizeFromJSON)), + 'prizes': ((json['prizes'] as Array).map(PrizeFieldFromJSON)), 'useLikes': json['use_likes'], 'minMentions': json['min_mentions'], 'postUrl': json['post_url'], - 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(InstagramResultFromJSON)), + 'results': ((json['results'] as Array).map(InstagramResultFromJSON)), }; } @@ -113,7 +114,7 @@ export function InstagramToJSON(value?: Omit).map(PrizeToJSON)), + 'prizes': ((value['prizes'] as Array).map(PrizeFieldToJSON)), 'use_likes': value['useLikes'], 'min_mentions': value['minMentions'], 'post_url': value['postUrl'], diff --git a/sdk/src/models/InstagramFields.ts b/sdk/src/models/InstagramFields.ts new file mode 100644 index 00000000..618559f8 --- /dev/null +++ b/sdk/src/models/InstagramFields.ts @@ -0,0 +1,95 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PrizeField } from './PrizeField'; +import { + PrizeFieldFromJSON, + PrizeFieldFromJSONTyped, + PrizeFieldToJSON, +} from './PrizeField'; + +/** + * + * @export + * @interface InstagramFields + */ +export interface InstagramFields { + /** + * + * @type {Array} + * @memberof InstagramFields + */ + prizes: Array; + /** + * + * @type {boolean} + * @memberof InstagramFields + */ + useLikes: boolean; + /** + * + * @type {number} + * @memberof InstagramFields + */ + minMentions: number; + /** + * + * @type {string} + * @memberof InstagramFields + */ + postUrl: string; +} + +/** + * Check if a given object implements the InstagramFields interface. + */ +export function instanceOfInstagramFields(value: object): value is InstagramFields { + if (!('prizes' in value) || value['prizes'] === undefined) return false; + if (!('useLikes' in value) || value['useLikes'] === undefined) return false; + if (!('minMentions' in value) || value['minMentions'] === undefined) return false; + if (!('postUrl' in value) || value['postUrl'] === undefined) return false; + return true; +} + +export function InstagramFieldsFromJSON(json: any): InstagramFields { + return InstagramFieldsFromJSONTyped(json, false); +} + +export function InstagramFieldsFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstagramFields { + if (json == null) { + return json; + } + return { + + 'prizes': ((json['prizes'] as Array).map(PrizeFieldFromJSON)), + 'useLikes': json['use_likes'], + 'minMentions': json['min_mentions'], + 'postUrl': json['post_url'], + }; +} + +export function InstagramFieldsToJSON(value?: InstagramFields | null): any { + if (value == null) { + return value; + } + return { + + 'prizes': ((value['prizes'] as Array).map(PrizeFieldToJSON)), + 'use_likes': value['useLikes'], + 'min_mentions': value['minMentions'], + 'post_url': value['postUrl'], + }; +} + diff --git a/sdk/src/models/Lottery.ts b/sdk/src/models/Lottery.ts index f27efa7e..ae0c84a6 100644 --- a/sdk/src/models/Lottery.ts +++ b/sdk/src/models/Lottery.ts @@ -19,18 +19,18 @@ import { DrawMetadataFromJSONTyped, DrawMetadataToJSON, } from './DrawMetadata'; +import type { ParticipantField } from './ParticipantField'; +import { + ParticipantFieldFromJSON, + ParticipantFieldFromJSONTyped, + ParticipantFieldToJSON, +} from './ParticipantField'; import type { BaseDraw } from './BaseDraw'; import { BaseDrawFromJSON, BaseDrawFromJSONTyped, BaseDrawToJSON, } from './BaseDraw'; -import type { Participant } from './Participant'; -import { - ParticipantFromJSON, - ParticipantFromJSONTyped, - ParticipantToJSON, -} from './Participant'; import type { LotteryResult } from './LotteryResult'; import { LotteryResultFromJSON, @@ -46,22 +46,22 @@ import { export interface Lottery extends BaseDraw { /** * - * @type {number} + * @type {Array} * @memberof Lottery */ - numberOfResults?: number; + participants: Array; /** * - * @type {Array} + * @type {number} * @memberof Lottery */ - participants: Array; + numberOfResults?: number; /** * * @type {Array} * @memberof Lottery */ - readonly results?: Array; + readonly results: Array; } @@ -71,6 +71,7 @@ export interface Lottery extends BaseDraw { */ export function instanceOfLottery(value: object): value is Lottery { if (!('participants' in value) || value['participants'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; return true; } @@ -84,9 +85,9 @@ export function LotteryFromJSONTyped(json: any, ignoreDiscriminator: boolean): L } return { ...BaseDrawFromJSONTyped(json, ignoreDiscriminator), + 'participants': ((json['participants'] as Array).map(ParticipantFieldFromJSON)), 'numberOfResults': json['number_of_results'] == null ? undefined : json['number_of_results'], - 'participants': ((json['participants'] as Array).map(ParticipantFromJSON)), - 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(LotteryResultFromJSON)), + 'results': ((json['results'] as Array).map(LotteryResultFromJSON)), }; } @@ -96,8 +97,8 @@ export function LotteryToJSON(value?: Omit).map(ParticipantFieldToJSON)), 'number_of_results': value['numberOfResults'], - 'participants': ((value['participants'] as Array).map(ParticipantToJSON)), }; } diff --git a/sdk/src/models/Raffle.ts b/sdk/src/models/Raffle.ts index 9d6e2c07..f95bce78 100644 --- a/sdk/src/models/Raffle.ts +++ b/sdk/src/models/Raffle.ts @@ -19,30 +19,30 @@ import { DrawMetadataFromJSONTyped, DrawMetadataToJSON, } from './DrawMetadata'; +import type { ParticipantField } from './ParticipantField'; +import { + ParticipantFieldFromJSON, + ParticipantFieldFromJSONTyped, + ParticipantFieldToJSON, +} from './ParticipantField'; import type { BaseDraw } from './BaseDraw'; import { BaseDrawFromJSON, BaseDrawFromJSONTyped, BaseDrawToJSON, } from './BaseDraw'; -import type { Participant } from './Participant'; -import { - ParticipantFromJSON, - ParticipantFromJSONTyped, - ParticipantToJSON, -} from './Participant'; import type { RaffleResult } from './RaffleResult'; import { RaffleResultFromJSON, RaffleResultFromJSONTyped, RaffleResultToJSON, } from './RaffleResult'; -import type { Prize } from './Prize'; +import type { PrizeField } from './PrizeField'; import { - PrizeFromJSON, - PrizeFromJSONTyped, - PrizeToJSON, -} from './Prize'; + PrizeFieldFromJSON, + PrizeFieldFromJSONTyped, + PrizeFieldToJSON, +} from './PrizeField'; /** * @@ -52,22 +52,22 @@ import { export interface Raffle extends BaseDraw { /** * - * @type {Array} + * @type {Array} * @memberof Raffle */ - prizes: Array; + prizes: Array; /** * - * @type {Array} + * @type {Array} * @memberof Raffle */ - participants: Array; + participants: Array; /** * * @type {Array} * @memberof Raffle */ - readonly results?: Array; + readonly results: Array; } @@ -78,6 +78,7 @@ export interface Raffle extends BaseDraw { export function instanceOfRaffle(value: object): value is Raffle { if (!('prizes' in value) || value['prizes'] === undefined) return false; if (!('participants' in value) || value['participants'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; return true; } @@ -91,9 +92,9 @@ export function RaffleFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ra } return { ...BaseDrawFromJSONTyped(json, ignoreDiscriminator), - 'prizes': ((json['prizes'] as Array).map(PrizeFromJSON)), - 'participants': ((json['participants'] as Array).map(ParticipantFromJSON)), - 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(RaffleResultFromJSON)), + 'prizes': ((json['prizes'] as Array).map(PrizeFieldFromJSON)), + 'participants': ((json['participants'] as Array).map(ParticipantFieldFromJSON)), + 'results': ((json['results'] as Array).map(RaffleResultFromJSON)), }; } @@ -103,8 +104,8 @@ export function RaffleToJSON(value?: Omit).map(PrizeToJSON)), - 'participants': ((value['participants'] as Array).map(ParticipantToJSON)), + 'prizes': ((value['prizes'] as Array).map(PrizeFieldToJSON)), + 'participants': ((value['participants'] as Array).map(ParticipantFieldToJSON)), }; } diff --git a/sdk/src/models/SecretSanta.ts b/sdk/src/models/SecretSanta.ts deleted file mode 100644 index 42c0b9ef..00000000 --- a/sdk/src/models/SecretSanta.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * EAS API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { SecretSantaParticipantsInner } from './SecretSantaParticipantsInner'; -import { - SecretSantaParticipantsInnerFromJSON, - SecretSantaParticipantsInnerFromJSONTyped, - SecretSantaParticipantsInnerToJSON, -} from './SecretSantaParticipantsInner'; - -/** - * - * @export - * @interface SecretSanta - */ -export interface SecretSanta { - /** - * - * @type {string} - * @memberof SecretSanta - */ - language?: SecretSantaLanguageEnum; - /** - * - * @type {Array} - * @memberof SecretSanta - */ - participants?: Array; -} - - -/** - * @export - */ -export const SecretSantaLanguageEnum = { - Es: 'es', - En: 'en' -} as const; -export type SecretSantaLanguageEnum = typeof SecretSantaLanguageEnum[keyof typeof SecretSantaLanguageEnum]; - - -/** - * Check if a given object implements the SecretSanta interface. - */ -export function instanceOfSecretSanta(value: object): value is SecretSanta { - return true; -} - -export function SecretSantaFromJSON(json: any): SecretSanta { - return SecretSantaFromJSONTyped(json, false); -} - -export function SecretSantaFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecretSanta { - if (json == null) { - return json; - } - return { - - 'language': json['language'] == null ? undefined : json['language'], - 'participants': json['participants'] == null ? undefined : ((json['participants'] as Array).map(SecretSantaParticipantsInnerFromJSON)), - }; -} - -export function SecretSantaToJSON(value?: SecretSanta | null): any { - if (value == null) { - return value; - } - return { - - 'language': value['language'], - 'participants': value['participants'] == null ? undefined : ((value['participants'] as Array).map(SecretSantaParticipantsInnerToJSON)), - }; -} - diff --git a/sdk/src/models/SecretSantaAdminResponse.ts b/sdk/src/models/SecretSantaAdminResponse.ts index 6f12e062..db5e3e8e 100644 --- a/sdk/src/models/SecretSantaAdminResponse.ts +++ b/sdk/src/models/SecretSantaAdminResponse.ts @@ -31,25 +31,28 @@ export interface SecretSantaAdminResponse { * @type {string} * @memberof SecretSantaAdminResponse */ - id?: string; + id: string; /** * * @type {Date} * @memberof SecretSantaAdminResponse */ - createdAt?: Date; + createdAt: Date; /** * * @type {Array} * @memberof SecretSantaAdminResponse */ - participants?: Array; + participants: Array; } /** * Check if a given object implements the SecretSantaAdminResponse interface. */ export function instanceOfSecretSantaAdminResponse(value: object): value is SecretSantaAdminResponse { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('createdAt' in value) || value['createdAt'] === undefined) return false; + if (!('participants' in value) || value['participants'] === undefined) return false; return true; } @@ -63,9 +66,9 @@ export function SecretSantaAdminResponseFromJSONTyped(json: any, ignoreDiscrimin } return { - 'id': json['id'] == null ? undefined : json['id'], - 'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])), - 'participants': json['participants'] == null ? undefined : ((json['participants'] as Array).map(SecretSantaAdminResponseParticipantsInnerFromJSON)), + 'id': json['id'], + 'createdAt': (new Date(json['created_at'])), + 'participants': ((json['participants'] as Array).map(SecretSantaAdminResponseParticipantsInnerFromJSON)), }; } @@ -76,8 +79,8 @@ export function SecretSantaAdminResponseToJSON(value?: SecretSantaAdminResponse return { 'id': value['id'], - 'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), - 'participants': value['participants'] == null ? undefined : ((value['participants'] as Array).map(SecretSantaAdminResponseParticipantsInnerToJSON)), + 'created_at': ((value['createdAt']).toISOString()), + 'participants': ((value['participants'] as Array).map(SecretSantaAdminResponseParticipantsInnerToJSON)), }; } diff --git a/sdk/src/models/SecretSantaAdminResponseParticipantsInner.ts b/sdk/src/models/SecretSantaAdminResponseParticipantsInner.ts index 1579d715..b1feba2c 100644 --- a/sdk/src/models/SecretSantaAdminResponseParticipantsInner.ts +++ b/sdk/src/models/SecretSantaAdminResponseParticipantsInner.ts @@ -24,25 +24,28 @@ export interface SecretSantaAdminResponseParticipantsInner { * @type {string} * @memberof SecretSantaAdminResponseParticipantsInner */ - id?: string; + id: string; /** * * @type {string} * @memberof SecretSantaAdminResponseParticipantsInner */ - name?: string; + name: string; /** * * @type {boolean} * @memberof SecretSantaAdminResponseParticipantsInner */ - revealed?: boolean; + revealed: boolean; } /** * Check if a given object implements the SecretSantaAdminResponseParticipantsInner interface. */ export function instanceOfSecretSantaAdminResponseParticipantsInner(value: object): value is SecretSantaAdminResponseParticipantsInner { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if (!('revealed' in value) || value['revealed'] === undefined) return false; return true; } @@ -56,9 +59,9 @@ export function SecretSantaAdminResponseParticipantsInnerFromJSONTyped(json: any } return { - 'id': json['id'] == null ? undefined : json['id'], - 'name': json['name'] == null ? undefined : json['name'], - 'revealed': json['revealed'] == null ? undefined : json['revealed'], + 'id': json['id'], + 'name': json['name'], + 'revealed': json['revealed'], }; } diff --git a/sdk/src/models/SecretSantaCreateResponse.ts b/sdk/src/models/SecretSantaCreateResponse.ts index b3a044e9..8edb4996 100644 --- a/sdk/src/models/SecretSantaCreateResponse.ts +++ b/sdk/src/models/SecretSantaCreateResponse.ts @@ -24,13 +24,14 @@ export interface SecretSantaCreateResponse { * @type {string} * @memberof SecretSantaCreateResponse */ - id?: string; + id: string; } /** * Check if a given object implements the SecretSantaCreateResponse interface. */ export function instanceOfSecretSantaCreateResponse(value: object): value is SecretSantaCreateResponse { + if (!('id' in value) || value['id'] === undefined) return false; return true; } @@ -44,7 +45,7 @@ export function SecretSantaCreateResponseFromJSONTyped(json: any, ignoreDiscrimi } return { - 'id': json['id'] == null ? undefined : json['id'], + 'id': json['id'], }; } diff --git a/sdk/src/models/SecretSantaErrorResponse.ts b/sdk/src/models/SecretSantaErrorResponse.ts new file mode 100644 index 00000000..8ad76bec --- /dev/null +++ b/sdk/src/models/SecretSantaErrorResponse.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SecretSantaErrorResponseBody } from './SecretSantaErrorResponseBody'; +import { + SecretSantaErrorResponseBodyFromJSON, + SecretSantaErrorResponseBodyFromJSONTyped, + SecretSantaErrorResponseBodyToJSON, +} from './SecretSantaErrorResponseBody'; + +/** + * + * @export + * @interface SecretSantaErrorResponse + */ +export interface SecretSantaErrorResponse { + /** + * + * @type {SecretSantaErrorResponseBody} + * @memberof SecretSantaErrorResponse + */ + body?: SecretSantaErrorResponseBody; +} + +/** + * Check if a given object implements the SecretSantaErrorResponse interface. + */ +export function instanceOfSecretSantaErrorResponse(value: object): value is SecretSantaErrorResponse { + return true; +} + +export function SecretSantaErrorResponseFromJSON(json: any): SecretSantaErrorResponse { + return SecretSantaErrorResponseFromJSONTyped(json, false); +} + +export function SecretSantaErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecretSantaErrorResponse { + if (json == null) { + return json; + } + return { + + 'body': json['body'] == null ? undefined : SecretSantaErrorResponseBodyFromJSON(json['body']), + }; +} + +export function SecretSantaErrorResponseToJSON(value?: SecretSantaErrorResponse | null): any { + if (value == null) { + return value; + } + return { + + 'body': SecretSantaErrorResponseBodyToJSON(value['body']), + }; +} + diff --git a/sdk/src/models/SecretSantaErrorResponseBody.ts b/sdk/src/models/SecretSantaErrorResponseBody.ts new file mode 100644 index 00000000..e34108a6 --- /dev/null +++ b/sdk/src/models/SecretSantaErrorResponseBody.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SecretSantaErrorResponseBodyGeneralInner } from './SecretSantaErrorResponseBodyGeneralInner'; +import { + SecretSantaErrorResponseBodyGeneralInnerFromJSON, + SecretSantaErrorResponseBodyGeneralInnerFromJSONTyped, + SecretSantaErrorResponseBodyGeneralInnerToJSON, +} from './SecretSantaErrorResponseBodyGeneralInner'; + +/** + * + * @export + * @interface SecretSantaErrorResponseBody + */ +export interface SecretSantaErrorResponseBody { + /** + * + * @type {Array} + * @memberof SecretSantaErrorResponseBody + */ + general?: Array; +} + +/** + * Check if a given object implements the SecretSantaErrorResponseBody interface. + */ +export function instanceOfSecretSantaErrorResponseBody(value: object): value is SecretSantaErrorResponseBody { + return true; +} + +export function SecretSantaErrorResponseBodyFromJSON(json: any): SecretSantaErrorResponseBody { + return SecretSantaErrorResponseBodyFromJSONTyped(json, false); +} + +export function SecretSantaErrorResponseBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecretSantaErrorResponseBody { + if (json == null) { + return json; + } + return { + + 'general': json['general'] == null ? undefined : ((json['general'] as Array).map(SecretSantaErrorResponseBodyGeneralInnerFromJSON)), + }; +} + +export function SecretSantaErrorResponseBodyToJSON(value?: SecretSantaErrorResponseBody | null): any { + if (value == null) { + return value; + } + return { + + 'general': value['general'] == null ? undefined : ((value['general'] as Array).map(SecretSantaErrorResponseBodyGeneralInnerToJSON)), + }; +} + diff --git a/sdk/src/models/SecretSantaErrorResponseBodyGeneralInner.ts b/sdk/src/models/SecretSantaErrorResponseBodyGeneralInner.ts new file mode 100644 index 00000000..bf203ce1 --- /dev/null +++ b/sdk/src/models/SecretSantaErrorResponseBodyGeneralInner.ts @@ -0,0 +1,68 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface SecretSantaErrorResponseBodyGeneralInner + */ +export interface SecretSantaErrorResponseBodyGeneralInner { + /** + * + * @type {string} + * @memberof SecretSantaErrorResponseBodyGeneralInner + */ + message?: string; + /** + * + * @type {string} + * @memberof SecretSantaErrorResponseBodyGeneralInner + */ + code?: string; +} + +/** + * Check if a given object implements the SecretSantaErrorResponseBodyGeneralInner interface. + */ +export function instanceOfSecretSantaErrorResponseBodyGeneralInner(value: object): value is SecretSantaErrorResponseBodyGeneralInner { + return true; +} + +export function SecretSantaErrorResponseBodyGeneralInnerFromJSON(json: any): SecretSantaErrorResponseBodyGeneralInner { + return SecretSantaErrorResponseBodyGeneralInnerFromJSONTyped(json, false); +} + +export function SecretSantaErrorResponseBodyGeneralInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecretSantaErrorResponseBodyGeneralInner { + if (json == null) { + return json; + } + return { + + 'message': json['message'] == null ? undefined : json['message'], + 'code': json['code'] == null ? undefined : json['code'], + }; +} + +export function SecretSantaErrorResponseBodyGeneralInnerToJSON(value?: SecretSantaErrorResponseBodyGeneralInner | null): any { + if (value == null) { + return value; + } + return { + + 'message': value['message'], + 'code': value['code'], + }; +} + diff --git a/sdk/src/models/SecretSantaParticipantsInner.ts b/sdk/src/models/SecretSantaParticipantsInner.ts deleted file mode 100644 index c54c52f4..00000000 --- a/sdk/src/models/SecretSantaParticipantsInner.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * EAS API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface SecretSantaParticipantsInner - */ -export interface SecretSantaParticipantsInner { - /** - * - * @type {string} - * @memberof SecretSantaParticipantsInner - */ - name?: string; - /** - * - * @type {string} - * @memberof SecretSantaParticipantsInner - */ - email?: string; - /** - * - * @type {Array} - * @memberof SecretSantaParticipantsInner - */ - exclusions?: Array; -} - -/** - * Check if a given object implements the SecretSantaParticipantsInner interface. - */ -export function instanceOfSecretSantaParticipantsInner(value: object): value is SecretSantaParticipantsInner { - return true; -} - -export function SecretSantaParticipantsInnerFromJSON(json: any): SecretSantaParticipantsInner { - return SecretSantaParticipantsInnerFromJSONTyped(json, false); -} - -export function SecretSantaParticipantsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecretSantaParticipantsInner { - if (json == null) { - return json; - } - return { - - 'name': json['name'] == null ? undefined : json['name'], - 'email': json['email'] == null ? undefined : json['email'], - 'exclusions': json['exclusions'] == null ? undefined : json['exclusions'], - }; -} - -export function SecretSantaParticipantsInnerToJSON(value?: SecretSantaParticipantsInner | null): any { - if (value == null) { - return value; - } - return { - - 'name': value['name'], - 'email': value['email'], - 'exclusions': value['exclusions'], - }; -} - diff --git a/sdk/src/models/SecretSantaResendEmail.ts b/sdk/src/models/SecretSantaResendEmail.ts index d7e2ea45..3aa413b3 100644 --- a/sdk/src/models/SecretSantaResendEmail.ts +++ b/sdk/src/models/SecretSantaResendEmail.ts @@ -24,13 +24,13 @@ export interface SecretSantaResendEmail { * @type {string} * @memberof SecretSantaResendEmail */ - language?: SecretSantaResendEmailLanguageEnum; + language: SecretSantaResendEmailLanguageEnum; /** * * @type {string} * @memberof SecretSantaResendEmail */ - email?: string; + email: string; } @@ -48,6 +48,8 @@ export type SecretSantaResendEmailLanguageEnum = typeof SecretSantaResendEmailLa * Check if a given object implements the SecretSantaResendEmail interface. */ export function instanceOfSecretSantaResendEmail(value: object): value is SecretSantaResendEmail { + if (!('language' in value) || value['language'] === undefined) return false; + if (!('email' in value) || value['email'] === undefined) return false; return true; } @@ -61,8 +63,8 @@ export function SecretSantaResendEmailFromJSONTyped(json: any, ignoreDiscriminat } return { - 'language': json['language'] == null ? undefined : json['language'], - 'email': json['email'] == null ? undefined : json['email'], + 'language': json['language'], + 'email': json['email'], }; } diff --git a/sdk/src/models/Shifts.ts b/sdk/src/models/Shifts.ts index c8d8b676..47b61bca 100644 --- a/sdk/src/models/Shifts.ts +++ b/sdk/src/models/Shifts.ts @@ -19,6 +19,12 @@ import { DrawMetadataFromJSONTyped, DrawMetadataToJSON, } from './DrawMetadata'; +import type { ParticipantField } from './ParticipantField'; +import { + ParticipantFieldFromJSON, + ParticipantFieldFromJSONTyped, + ParticipantFieldToJSON, +} from './ParticipantField'; import type { BaseDraw } from './BaseDraw'; import { BaseDrawFromJSON, @@ -31,12 +37,6 @@ import { ShiftsResultFromJSONTyped, ShiftsResultToJSON, } from './ShiftsResult'; -import type { Participant } from './Participant'; -import { - ParticipantFromJSON, - ParticipantFromJSONTyped, - ParticipantToJSON, -} from './Participant'; import type { ShiftsInterval } from './ShiftsInterval'; import { ShiftsIntervalFromJSON, @@ -58,16 +58,16 @@ export interface Shifts extends BaseDraw { intervals: Array; /** * - * @type {Array} + * @type {Array} * @memberof Shifts */ - participants: Array; + participants: Array; /** * * @type {Array} * @memberof Shifts */ - readonly results?: Array; + readonly results: Array; } @@ -78,6 +78,7 @@ export interface Shifts extends BaseDraw { export function instanceOfShifts(value: object): value is Shifts { if (!('intervals' in value) || value['intervals'] === undefined) return false; if (!('participants' in value) || value['participants'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; return true; } @@ -92,8 +93,8 @@ export function ShiftsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Sh return { ...BaseDrawFromJSONTyped(json, ignoreDiscriminator), 'intervals': ((json['intervals'] as Array).map(ShiftsIntervalFromJSON)), - 'participants': ((json['participants'] as Array).map(ParticipantFromJSON)), - 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(ShiftsResultFromJSON)), + 'participants': ((json['participants'] as Array).map(ParticipantFieldFromJSON)), + 'results': ((json['results'] as Array).map(ShiftsResultFromJSON)), }; } @@ -104,7 +105,7 @@ export function ShiftsToJSON(value?: Omit).map(ShiftsIntervalToJSON)), - 'participants': ((value['participants'] as Array).map(ParticipantToJSON)), + 'participants': ((value['participants'] as Array).map(ParticipantFieldToJSON)), }; } diff --git a/sdk/src/models/Tiktok.ts b/sdk/src/models/Tiktok.ts index 6f98208b..205a5a93 100644 --- a/sdk/src/models/Tiktok.ts +++ b/sdk/src/models/Tiktok.ts @@ -31,12 +31,12 @@ import { TiktokResultFromJSONTyped, TiktokResultToJSON, } from './TiktokResult'; -import type { Prize } from './Prize'; +import type { PrizeField } from './PrizeField'; import { - PrizeFromJSON, - PrizeFromJSONTyped, - PrizeToJSON, -} from './Prize'; + PrizeFieldFromJSON, + PrizeFieldFromJSONTyped, + PrizeFieldToJSON, +} from './PrizeField'; /** * @@ -46,10 +46,10 @@ import { export interface Tiktok extends BaseDraw { /** * - * @type {Array} + * @type {Array} * @memberof Tiktok */ - prizes: Array; + prizes: Array; /** * * @type {number} @@ -67,7 +67,7 @@ export interface Tiktok extends BaseDraw { * @type {Array} * @memberof Tiktok */ - readonly results?: Array; + readonly results: Array; } @@ -79,6 +79,7 @@ export function instanceOfTiktok(value: object): value is Tiktok { if (!('prizes' in value) || value['prizes'] === undefined) return false; if (!('minMentions' in value) || value['minMentions'] === undefined) return false; if (!('postUrl' in value) || value['postUrl'] === undefined) return false; + if (!('results' in value) || value['results'] === undefined) return false; return true; } @@ -92,10 +93,10 @@ export function TiktokFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ti } return { ...BaseDrawFromJSONTyped(json, ignoreDiscriminator), - 'prizes': ((json['prizes'] as Array).map(PrizeFromJSON)), + 'prizes': ((json['prizes'] as Array).map(PrizeFieldFromJSON)), 'minMentions': json['min_mentions'], 'postUrl': json['post_url'], - 'results': json['results'] == null ? undefined : ((json['results'] as Array).map(TiktokResultFromJSON)), + 'results': ((json['results'] as Array).map(TiktokResultFromJSON)), }; } @@ -105,7 +106,7 @@ export function TiktokToJSON(value?: Omit).map(PrizeToJSON)), + 'prizes': ((value['prizes'] as Array).map(PrizeFieldToJSON)), 'min_mentions': value['minMentions'], 'post_url': value['postUrl'], }; diff --git a/sdk/src/models/TiktokFields.ts b/sdk/src/models/TiktokFields.ts new file mode 100644 index 00000000..a7f3d2ef --- /dev/null +++ b/sdk/src/models/TiktokFields.ts @@ -0,0 +1,86 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { PrizeField } from './PrizeField'; +import { + PrizeFieldFromJSON, + PrizeFieldFromJSONTyped, + PrizeFieldToJSON, +} from './PrizeField'; + +/** + * + * @export + * @interface TiktokFields + */ +export interface TiktokFields { + /** + * + * @type {Array} + * @memberof TiktokFields + */ + prizes: Array; + /** + * + * @type {number} + * @memberof TiktokFields + */ + minMentions: number; + /** + * + * @type {string} + * @memberof TiktokFields + */ + postUrl: string; +} + +/** + * Check if a given object implements the TiktokFields interface. + */ +export function instanceOfTiktokFields(value: object): value is TiktokFields { + if (!('prizes' in value) || value['prizes'] === undefined) return false; + if (!('minMentions' in value) || value['minMentions'] === undefined) return false; + if (!('postUrl' in value) || value['postUrl'] === undefined) return false; + return true; +} + +export function TiktokFieldsFromJSON(json: any): TiktokFields { + return TiktokFieldsFromJSONTyped(json, false); +} + +export function TiktokFieldsFromJSONTyped(json: any, ignoreDiscriminator: boolean): TiktokFields { + if (json == null) { + return json; + } + return { + + 'prizes': ((json['prizes'] as Array).map(PrizeFieldFromJSON)), + 'minMentions': json['min_mentions'], + 'postUrl': json['post_url'], + }; +} + +export function TiktokFieldsToJSON(value?: TiktokFields | null): any { + if (value == null) { + return value; + } + return { + + 'prizes': ((value['prizes'] as Array).map(PrizeFieldToJSON)), + 'min_mentions': value['minMentions'], + 'post_url': value['postUrl'], + }; +} + diff --git a/sdk/src/models/index.ts b/sdk/src/models/index.ts index 04d912d8..32ab6e55 100644 --- a/sdk/src/models/index.ts +++ b/sdk/src/models/index.ts @@ -8,12 +8,16 @@ export * from './BaseResult'; export * from './Coin'; export * from './CoinResult'; export * from './CreateGroupsPayload'; +export * from './CreateInstagramPayload'; export * from './CreateLetterPayload'; export * from './CreateLinkPayload'; export * from './CreateLotteryPayload'; export * from './CreateRafflePayload'; export * from './CreateRandomNumberPayload'; +export * from './CreateSecretSantaPayload'; +export * from './CreateSecretSantaPayloadParticipantsInner'; export * from './CreateShiftsPayload'; +export * from './CreateTiktokPayload'; export * from './CreateTournamentPayload'; export * from './DrawMetadata'; export * from './DrawReTossPayload'; @@ -22,6 +26,7 @@ export * from './Groups'; export * from './GroupsFields'; export * from './GroupsResult'; export * from './Instagram'; +export * from './InstagramFields'; export * from './InstagramResult'; export * from './InstagramResultAllOfComment'; export * from './InstagramResultAllOfValue'; @@ -49,11 +54,12 @@ export * from './RandomNumber'; export * from './RandomNumberFields'; export * from './RandomNumberResult'; export * from './RedeemPromoCode'; -export * from './SecretSanta'; export * from './SecretSantaAdminResponse'; export * from './SecretSantaAdminResponseParticipantsInner'; export * from './SecretSantaCreateResponse'; -export * from './SecretSantaParticipantsInner'; +export * from './SecretSantaErrorResponse'; +export * from './SecretSantaErrorResponseBody'; +export * from './SecretSantaErrorResponseBodyGeneralInner'; export * from './SecretSantaResendEmail'; export * from './SecretSantaResendEmailResponse'; export * from './SecretSantaResult'; @@ -66,6 +72,7 @@ export * from './ShiftsResultAllOfValue'; export * from './Spinner'; export * from './SpinnerResult'; export * from './Tiktok'; +export * from './TiktokFields'; export * from './TiktokResult'; export * from './TiktokResultAllOfComment'; export * from './TiktokResultAllOfValue'; diff --git a/swagger.yaml b/swagger.yaml index 59ffde66..2e0fd860 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -622,7 +622,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SecretSanta' + $ref: '#/components/schemas/CreateSecretSantaPayload' required: true parameters: [] '/secret-santa/{id}/': @@ -635,6 +635,12 @@ paths: application/json: schema: $ref: '#/components/schemas/SecretSantaResult' + '400': + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/SecretSantaErrorResponse' tags: - secret_santa parameters: @@ -814,7 +820,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Tiktok' + $ref: '#/components/schemas/CreateTiktokPayload' required: true parameters: [] '/tiktok/{id}/': @@ -946,303 +952,189 @@ components: schema: $ref: '#/components/schemas/DrawReTossPayload' schemas: - DrawMetadata: - required: - - client - - key - - value - type: object - properties: - client: - type: string - maxLength: 100 - minLength: 1 - key: - type: string - maxLength: 100 - minLength: 1 - value: - type: string - minLength: 1 - BaseObject: - type: object - required: - - id - - created_at - properties: - id: - type: string - readOnly: true - minLength: 1 - created_at: - type: string - format: date-time - readOnly: true - PrizeField: + RandomNumber: allOf: + - $ref: '#/components/schemas/BaseDraw' + - $ref: '#/components/schemas/RandomNumberFields' - type: object required: - - name + - results properties: - name: - type: string - minLength: 1 - url: - type: string - format: uri - maxLength: 200 - minLength: 1 - Prize: + results: + type: array + items: + $ref: '#/components/schemas/RandomNumberResult' + readOnly: true + CreateRandomNumberPayload: allOf: - - $ref: '#/components/schemas/BaseObject' - - $ref: '#/components/schemas/PrizeField' - ParticipantField: + - $ref: '#/components/schemas/BaseFieldsCreate' + - $ref: '#/components/schemas/RandomNumberFields' + RandomNumberFields: allOf: - type: object required: - - name + - range_min + - range_max + - number_of_results + - allow_repeated_results properties: - name: - type: string - minLength: 1 - facebook_id: - type: string - maxLength: 100 - minLength: 1 - Participant: - allOf: - - $ref: '#/components/schemas/BaseObject' - - $ref: '#/components/schemas/ParticipantField' - DrawTossPayload: - type: object - properties: - schedule_date: - type: string - format: date-time - DrawReTossPayload: - type: object - properties: - prize_id: - type: string - minLength: 1 - BaseFields: + range_min: + type: integer + range_max: + type: integer + number_of_results: + type: integer + default: 1 + allow_repeated_results: + type: boolean + default: true + RandomNumberResult: allOf: + - $ref: '#/components/schemas/BaseResult' - type: object - required: - - payments properties: - title: - type: string - minLength: 1 - description: - type: string - minLength: 1 - metadata: - type: array - items: - $ref: '#/components/schemas/DrawMetadata' - payments: + value: + nullable: true type: array items: - type: string - enum: - - CERTIFIED - - ADFREE - - SUPPORT + type: integer - BaseFieldsCreate: + Letter: allOf: + - $ref: '#/components/schemas/BaseDraw' + - $ref: '#/components/schemas/LetterFields' - type: object + required: + - results properties: - title: - type: string - minLength: 1 - description: - type: string - minLength: 1 - metadata: + results: type: array items: - $ref: '#/components/schemas/DrawMetadata' - CreateGroupsPayload: - allOf: - - $ref: '#/components/schemas/BaseFieldsCreate' - - $ref: '#/components/schemas/GroupsFields' + $ref: '#/components/schemas/LetterResult' + readOnly: true CreateLetterPayload: allOf: - $ref: '#/components/schemas/BaseFieldsCreate' - $ref: '#/components/schemas/LetterFields' - CreateRandomNumberPayload: - allOf: - - $ref: '#/components/schemas/BaseFieldsCreate' - - $ref: '#/components/schemas/RandomNumberFields' - CreateTournamentPayload: - allOf: - - $ref: '#/components/schemas/BaseFieldsCreate' - - $ref: '#/components/schemas/TournamentFields' - CreateLinkPayload: - allOf: - - $ref: '#/components/schemas/BaseFieldsCreate' - - $ref: '#/components/schemas/LinkFields' - CreateLotteryPayload: - allOf: - - $ref: '#/components/schemas/BaseFieldsCreate' - - $ref: '#/components/schemas/LotteryFields' - CreateRafflePayload: - allOf: - - $ref: '#/components/schemas/BaseFieldsCreate' - - $ref: '#/components/schemas/RaffleFields' - CreateShiftsPayload: - allOf: - - $ref: '#/components/schemas/BaseFieldsCreate' - - $ref: '#/components/schemas/ShiftsFields' - CreateInstagramPayload: + LetterFields: allOf: - - $ref: '#/components/schemas/BaseFieldsCreate' - - $ref: '#/components/schemas/InstagramFields' - - BaseDraw: + - type: object + required: + - number_of_results + - allow_repeated_results + properties: + number_of_results: + type: integer + default: 1 + allow_repeated_results: + type: boolean + default: true + LetterResult: allOf: - - $ref: '#/components/schemas/BaseObject' - - $ref: '#/components/schemas/BaseFields' + - $ref: '#/components/schemas/BaseResult' - type: object properties: - updated_at: - type: string - format: date-time - readOnly: true - private_id: - type: string - readOnly: true - minLength: 1 - Raffle: + value: + nullable: true + type: array + items: + type: string + + Groups: allOf: - $ref: '#/components/schemas/BaseDraw' + - $ref: '#/components/schemas/GroupsFields' - type: object required: - - prizes - - participants + - results properties: - prizes: - type: array - items: - $ref: '#/components/schemas/Prize' - participants: - type: array - items: - $ref: '#/components/schemas/Participant' results: type: array items: - $ref: '#/components/schemas/RaffleResult' + $ref: '#/components/schemas/GroupsResult' readOnly: true - Lottery: + CreateGroupsPayload: + allOf: + - $ref: '#/components/schemas/BaseFieldsCreate' + - $ref: '#/components/schemas/GroupsFields' + GroupsFields: allOf: - - $ref: '#/components/schemas/BaseDraw' - type: object required: - participants + - number_of_groups properties: - number_of_results: - type: integer - default: 1 participants: type: array items: - $ref: '#/components/schemas/Participant' - results: + $ref: '#/components/schemas/ParticipantField' + number_of_groups: + type: integer + GroupsResult: + allOf: + - $ref: '#/components/schemas/BaseResult' + - type: object + properties: + value: + nullable: true type: array items: - $ref: '#/components/schemas/LotteryResult' - readOnly: true - Instagram: + type: array + items: + $ref: '#/components/schemas/Participant' + + Link: allOf: - $ref: '#/components/schemas/BaseDraw' + - $ref: '#/components/schemas/LinkFields' - type: object required: - - post_url - - prizes - - use_likes - - min_mentions + - results properties: - prizes: - type: array - items: - $ref: '#/components/schemas/Prize' - use_likes: - type: boolean - default: false - min_mentions: - type: integer - default: 0 - post_url: - type: string results: type: array items: - $ref: '#/components/schemas/InstagramResult' + $ref: '#/components/schemas/LinkResult' readOnly: true - Tiktok: + CreateLinkPayload: allOf: - - $ref: '#/components/schemas/BaseDraw' - - type: object - required: - - post_url - - prizes - - min_mentions - properties: - prizes: - type: array - items: - $ref: '#/components/schemas/Prize' - min_mentions: - type: integer - default: 0 - post_url: - type: string - results: - type: array - items: - $ref: '#/components/schemas/TiktokResult' - readOnly: true - Shifts: + - $ref: '#/components/schemas/BaseFieldsCreate' + - $ref: '#/components/schemas/LinkFields' + LinkFields: allOf: - - $ref: '#/components/schemas/BaseDraw' - type: object required: - - intervals - - participants + - items_set1 + - items_set2 properties: - intervals: - type: array - items: - $ref: '#/components/schemas/ShiftsInterval' - participants: + items_set1: type: array items: - $ref: '#/components/schemas/Participant' - results: + type: string + items_set2: type: array items: - $ref: '#/components/schemas/ShiftsResult' - readOnly: true - Groups: + type: string + LinkResult: allOf: - - $ref: '#/components/schemas/BaseDraw' - - $ref: '#/components/schemas/GroupsFields' + - $ref: '#/components/schemas/BaseResult' - type: object - required: - - results properties: - results: + value: + nullable: true type: array items: - $ref: '#/components/schemas/GroupsResult' - readOnly: true - RandomNumber: + type: object + properties: + element1: + type: string + element2: + type: string + + Raffle: allOf: - $ref: '#/components/schemas/BaseDraw' - - $ref: '#/components/schemas/RandomNumberFields' + - $ref: '#/components/schemas/RaffleFields' - type: object required: - results @@ -1250,189 +1142,101 @@ components: results: type: array items: - $ref: '#/components/schemas/RandomNumberResult' + $ref: '#/components/schemas/RaffleResult' readOnly: true - Letter: + CreateRafflePayload: allOf: - - $ref: '#/components/schemas/BaseDraw' - - $ref: '#/components/schemas/LetterFields' - - type: object - required: - - results - properties: - results: - type: array - items: - $ref: '#/components/schemas/LetterResult' - readOnly: true - Tournament: + - $ref: '#/components/schemas/BaseFieldsCreate' + - $ref: '#/components/schemas/RaffleFields' + RaffleFields: allOf: - - $ref: '#/components/schemas/BaseDraw' - - $ref: '#/components/schemas/TournamentFields' - type: object required: - - results + - prizes + - participants properties: - results: + prizes: type: array items: - $ref: '#/components/schemas/TournamentResult' - readOnly: true - Link: - allOf: - - $ref: '#/components/schemas/BaseDraw' - - $ref: '#/components/schemas/LinkFields' - - type: object - required: - - results - properties: - results: + $ref: '#/components/schemas/PrizeField' + participants: type: array items: - $ref: '#/components/schemas/LinkResult' - readOnly: true - Coin: + $ref: '#/components/schemas/ParticipantField' + RaffleResult: allOf: - - $ref: '#/components/schemas/BaseDraw' + - $ref: '#/components/schemas/BaseResult' - type: object properties: - results: + value: + nullable: true type: array items: - $ref: '#/components/schemas/CoinResult' - readOnly: true - Spinner: + type: object + properties: + participant: + $ref: '#/components/schemas/Participant' + prize: + $ref: '#/components/schemas/Prize' + + Lottery: allOf: - $ref: '#/components/schemas/BaseDraw' + - $ref: '#/components/schemas/LotteryFields' - type: object + required: + - results properties: results: type: array items: - $ref: '#/components/schemas/SpinnerResult' + $ref: '#/components/schemas/LotteryResult' readOnly: true - SecretSanta: - type: object - properties: - language: - type: string - enum: - - es - - en - participants: - type: array - items: - maxLength: 500 - minLength: 3 - type: object - properties: - name: - type: string - email: - type: string - exclusions: - type: array - items: - type: string - - LetterFields: - allOf: - - type: object - required: - - number_of_results - - allow_repeated_results - properties: - number_of_results: - type: integer - default: 1 - allow_repeated_results: - type: boolean - default: true - RandomNumberFields: + CreateLotteryPayload: allOf: - - type: object - required: - - range_min - - range_max - - number_of_results - - allow_repeated_results - properties: - range_min: - type: integer - range_max: - type: integer - number_of_results: - type: integer - default: 1 - allow_repeated_results: - type: boolean - default: true - GroupsFields: + - $ref: '#/components/schemas/BaseFieldsCreate' + - $ref: '#/components/schemas/LotteryFields' + LotteryFields: allOf: - type: object required: - participants - - number_of_groups properties: participants: type: array items: $ref: '#/components/schemas/ParticipantField' - number_of_groups: + number_of_results: type: integer - TournamentFields: + default: 1 + LotteryResult: allOf: + - $ref: '#/components/schemas/BaseResult' - type: object - required: - - participants properties: - participants: - type: array - items: - $ref: '#/components/schemas/ParticipantField' - LinkFields: - allOf: - - type: object - required: - - items_set1 - - items_set2 - properties: - items_set1: - type: array - items: - type: string - items_set2: + value: + nullable: true type: array items: - type: string - LotteryFields: + $ref: '#/components/schemas/Participant' + + Shifts: allOf: + - $ref: '#/components/schemas/BaseDraw' + - $ref: '#/components/schemas/ShiftsFields' - type: object required: - - participants + - results properties: - participants: + results: type: array items: - $ref: '#/components/schemas/ParticipantField' - number_of_results: - type: integer - default: 1 - RaffleFields: + $ref: '#/components/schemas/ShiftsResult' + readOnly: true + CreateShiftsPayload: allOf: - - type: object - required: - - prizes - - participants - properties: - prizes: - type: array - items: - $ref: '#/components/schemas/PrizeField' - participants: - type: array - items: - $ref: '#/components/schemas/ParticipantField' + - $ref: '#/components/schemas/BaseFieldsCreate' + - $ref: '#/components/schemas/ShiftsFields' ShiftsFields: allOf: - type: object @@ -1448,44 +1252,7 @@ components: type: array items: $ref: '#/components/schemas/ParticipantField' - InstagramFields: - allOf: - - type: object - required: - - post_url - - prizes - - use_likes - - min_mentions - properties: - prizes: - type: array - items: - $ref: '#/components/schemas/PrizeField' - use_likes: - type: boolean - default: false - min_mentions: - type: integer - default: 0 - post_url: - type: string - - BaseResult: - allOf: - - type: object - required: - - created_at - - schedule_date - properties: - schedule_date: - type: string - format: date-time - nullable: true - created_at: - type: string - format: date-time - readOnly: true - GroupsResult: + ShiftsResult: allOf: - $ref: '#/components/schemas/BaseResult' - type: object @@ -1494,29 +1261,61 @@ components: nullable: true type: array items: - type: array - items: - $ref: '#/components/schemas/Participant' - RandomNumberResult: + type: object + properties: + interval: + type: object + properties: + start_time: + type: string + format: date-time + end_time: + type: string + format: date-time + participants: + type: array + items: + $ref: '#/components/schemas/Participant' + ShiftsInterval: + type: object + required: + - start_time + - end_time + properties: + start_time: + type: string + format: date-time + end_time: + type: string + format: date-time + + Tournament: allOf: - - $ref: '#/components/schemas/BaseResult' + - $ref: '#/components/schemas/BaseDraw' + - $ref: '#/components/schemas/TournamentFields' - type: object + required: + - results properties: - value: - nullable: true + results: type: array items: - type: integer - LetterResult: + $ref: '#/components/schemas/TournamentResult' + readOnly: true + CreateTournamentPayload: + allOf: + - $ref: '#/components/schemas/BaseFieldsCreate' + - $ref: '#/components/schemas/TournamentFields' + TournamentFields: allOf: - - $ref: '#/components/schemas/BaseResult' - type: object + required: + - participants properties: - value: - nullable: true + participants: type: array items: - type: string + $ref: '#/components/schemas/ParticipantField' TournamentResult: allOf: - $ref: '#/components/schemas/BaseResult' @@ -1540,36 +1339,45 @@ components: type: string next_match_id: type: string - LinkResult: + + Instagram: allOf: - - $ref: '#/components/schemas/BaseResult' + - $ref: '#/components/schemas/BaseDraw' + - $ref: '#/components/schemas/InstagramFields' - type: object + required: + - results properties: - value: - nullable: true + results: type: array items: - type: object - properties: - element1: - type: string - element2: - type: string - RaffleResult: + $ref: '#/components/schemas/InstagramResult' + readOnly: true + CreateInstagramPayload: + allOf: + - $ref: '#/components/schemas/BaseFieldsCreate' + - $ref: '#/components/schemas/InstagramFields' + InstagramFields: allOf: - - $ref: '#/components/schemas/BaseResult' - type: object + required: + - post_url + - prizes + - use_likes + - min_mentions properties: - value: - nullable: true + prizes: type: array items: - type: object - properties: - participant: - $ref: '#/components/schemas/Participant' - prize: - $ref: '#/components/schemas/Prize' + $ref: '#/components/schemas/PrizeField' + use_likes: + type: boolean + default: false + min_mentions: + type: integer + default: 0 + post_url: + type: string InstagramResult: allOf: - $ref: '#/components/schemas/BaseResult' @@ -1594,6 +1402,41 @@ components: type: string prize: $ref: '#/components/schemas/Prize' + + Tiktok: + allOf: + - $ref: '#/components/schemas/BaseDraw' + - $ref: '#/components/schemas/TiktokFields' + - type: object + required: + - results + properties: + results: + type: array + items: + $ref: '#/components/schemas/TiktokResult' + readOnly: true + CreateTiktokPayload: + allOf: + - $ref: '#/components/schemas/BaseFieldsCreate' + - $ref: '#/components/schemas/TiktokFields' + TiktokFields: + allOf: + - type: object + required: + - post_url + - prizes + - min_mentions + properties: + prizes: + type: array + items: + $ref: '#/components/schemas/PrizeField' + min_mentions: + type: integer + default: 0 + post_url: + type: string TiktokResult: allOf: - $ref: '#/components/schemas/BaseResult' @@ -1622,7 +1465,18 @@ components: type: string prize: $ref: '#/components/schemas/Prize' - ShiftsResult: + + Coin: + allOf: + - $ref: '#/components/schemas/BaseDraw' + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/CoinResult' + readOnly: true + CoinResult: allOf: - $ref: '#/components/schemas/BaseResult' - type: object @@ -1631,31 +1485,23 @@ components: nullable: true type: array items: - type: object - properties: - interval: - type: object - properties: - start_time: - type: string - format: date-time - end_time: - type: string - format: date-time - participants: - type: array - items: - $ref: '#/components/schemas/Participant' - LotteryResult: + maxLength: 1 + minLength: 1 + type: string + enum: + - HEAD + - TAIL + + Spinner: allOf: - - $ref: '#/components/schemas/BaseResult' + - $ref: '#/components/schemas/BaseDraw' - type: object properties: - value: - nullable: true + results: type: array items: - $ref: '#/components/schemas/Participant' + $ref: '#/components/schemas/SpinnerResult' + readOnly: true SpinnerResult: allOf: - $ref: '#/components/schemas/BaseResult' @@ -1664,21 +1510,73 @@ components: value: nullable: true type: integer - CoinResult: + + PrizeField: allOf: - - $ref: '#/components/schemas/BaseResult' - type: object + required: + - name properties: - value: - nullable: true - type: array - items: - maxLength: 1 - minLength: 1 + name: + type: string + minLength: 1 + url: + type: string + format: uri + maxLength: 200 + minLength: 1 + Prize: + allOf: + - $ref: '#/components/schemas/BaseObject' + - $ref: '#/components/schemas/PrizeField' + ParticipantField: + allOf: + - type: object + required: + - name + properties: + name: + type: string + minLength: 1 + facebook_id: + type: string + maxLength: 100 + minLength: 1 + Participant: + allOf: + - $ref: '#/components/schemas/BaseObject' + - $ref: '#/components/schemas/ParticipantField' + + CreateSecretSantaPayload: + type: object + required: + - language + - participants + properties: + language: + type: string + enum: + - es + - en + participants: + type: array + items: + maxLength: 500 + minLength: 3 + type: object + required: + - name + - email + - exclusions + properties: + name: type: string - enum: - - HEAD - - TAIL + email: + type: string + exclusions: + type: array + items: + type: string SecretSantaResult: type: object properties: @@ -1686,15 +1584,20 @@ components: type: string target: type: string - SecretSantaCreateResponse: type: object + required: + - id properties: id: type: string minLength: 1 SecretSantaAdminResponse: type: object + required: + - id + - created_at + - participants properties: id: type: string @@ -1706,6 +1609,10 @@ components: type: array items: type: object + required: + - id + - name + - revealed properties: id: type: string @@ -1713,6 +1620,41 @@ components: type: string revealed: type: boolean + SecretSantaResendEmail: + type: object + required: + - language + - email + properties: + language: + type: string + enum: + - es + - en + email: + type: string + SecretSantaResendEmailResponse: + type: object + properties: + new_result: + type: string + SecretSantaErrorResponse: + type: object + properties: + body: + type: object + properties: + general: + type: array + items: + type: object + properties: + message: + type: string + code: + type: string + + RedeemPromoCode: type: object required: @@ -1748,30 +1690,117 @@ components: properties: redirect_url: type: string - SecretSantaResendEmail: + + DrawMetadata: + required: + - client + - key + - value type: object properties: - language: + client: type: string - enum: - - es - - en - email: + maxLength: 100 + minLength: 1 + key: type: string - SecretSantaResendEmailResponse: - type: object - properties: - new_result: + maxLength: 100 + minLength: 1 + value: type: string - ShiftsInterval: + minLength: 1 + BaseObject: type: object required: - - start_time - - end_time + - id + - created_at properties: - start_time: + id: + type: string + readOnly: true + minLength: 1 + created_at: type: string format: date-time - end_time: + readOnly: true + BaseFieldsCreate: + allOf: + - type: object + properties: + title: + type: string + minLength: 1 + description: + type: string + minLength: 1 + metadata: + type: array + items: + $ref: '#/components/schemas/DrawMetadata' + BaseDraw: + allOf: + - $ref: '#/components/schemas/BaseObject' + - $ref: '#/components/schemas/BaseFields' + - type: object + properties: + updated_at: + type: string + format: date-time + readOnly: true + private_id: + type: string + readOnly: true + minLength: 1 + BaseResult: + allOf: + - type: object + required: + - created_at + - schedule_date + properties: + schedule_date: + type: string + format: date-time + nullable: true + created_at: + type: string + format: date-time + readOnly: true + DrawTossPayload: + type: object + properties: + schedule_date: type: string format: date-time + DrawReTossPayload: + type: object + required: + - prize_id + properties: + prize_id: + type: string + minLength: 1 + BaseFields: + allOf: + - type: object + required: + - payments + properties: + title: + type: string + minLength: 1 + description: + type: string + minLength: 1 + metadata: + type: array + items: + $ref: '#/components/schemas/DrawMetadata' + payments: + type: array + items: + type: string + enum: + - CERTIFIED + - ADFREE + - SUPPORT