valorant-api-types
Version:
A collection of documented endpoints and return types for the unofficial Valorant API
121 lines (120 loc) • 4.44 kB
TypeScript
import { z } from 'zod';
export declare const partyJoinByCodeEndpoint: {
readonly name: "Party Join By Code";
readonly description: "Join a party using an invite code";
readonly queryName: "Party_CreateInviteCode";
readonly category: "Party Endpoints";
readonly type: "glz";
readonly method: "POST";
readonly suffix: "parties/v1/players/joinbycode/{code}";
readonly variables: Map<string, z.ZodString>;
readonly riotRequirements: {
readonly token: true;
readonly entitlement: true;
readonly clientPlatform: true;
readonly clientVersion: true;
};
readonly responses: {
readonly '200': z.ZodObject<{
Subject: z.ZodString;
Version: z.ZodNumber;
CurrentPartyID: z.ZodString;
Invites: z.ZodNull;
Requests: z.ZodArray<z.ZodObject<{
ID: z.ZodString;
PartyID: z.ZodString;
RequestedBySubject: z.ZodString;
Subjects: z.ZodArray<z.ZodString, "many">;
CreatedAt: z.ZodEffects<z.ZodString, Date, string>;
RefreshedAt: z.ZodEffects<z.ZodString, Date, string>;
ExpiresIn: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
ID: string;
PartyID: string;
RequestedBySubject: string;
Subjects: string[];
CreatedAt: Date;
RefreshedAt: Date;
ExpiresIn: number;
}, {
ID: string;
PartyID: string;
RequestedBySubject: string;
Subjects: string[];
CreatedAt: string;
RefreshedAt: string;
ExpiresIn: number;
}>, "many">;
PlatformInfo: z.ZodObject<{
platformType: z.ZodLiteral<"PC">;
platformOS: z.ZodLiteral<"Windows">;
platformOSVersion: z.ZodString;
platformChipset: z.ZodLiteral<"Unknown">;
}, "strip", z.ZodTypeAny, {
platformType: "PC";
platformOS: "Windows";
platformOSVersion: string;
platformChipset: "Unknown";
}, {
platformType: "PC";
platformOS: "Windows";
platformOSVersion: string;
platformChipset: "Unknown";
}>;
}, "strip", z.ZodTypeAny, {
Subject: string;
Version: number;
Invites: null;
Requests: {
ID: string;
PartyID: string;
RequestedBySubject: string;
Subjects: string[];
CreatedAt: Date;
RefreshedAt: Date;
ExpiresIn: number;
}[];
CurrentPartyID: string;
PlatformInfo: {
platformType: "PC";
platformOS: "Windows";
platformOSVersion: string;
platformChipset: "Unknown";
};
}, {
Subject: string;
Version: number;
Invites: null;
Requests: {
ID: string;
PartyID: string;
RequestedBySubject: string;
Subjects: string[];
CreatedAt: string;
RefreshedAt: string;
ExpiresIn: number;
}[];
CurrentPartyID: string;
PlatformInfo: {
platformType: "PC";
platformOS: "Windows";
platformOSVersion: string;
platformChipset: "Unknown";
};
}>;
readonly '404': z.ZodObject<{
httpStatus: z.ZodLiteral<404>;
errorCode: z.ZodLiteral<"ERR_MISSING_INVITE_CODE_MAPPING">;
message: z.ZodLiteral<"No PartyID <--> InviteCode mapping found">;
}, "strip", z.ZodTypeAny, {
message: "No PartyID <--> InviteCode mapping found";
httpStatus: 404;
errorCode: "ERR_MISSING_INVITE_CODE_MAPPING";
}, {
message: "No PartyID <--> InviteCode mapping found";
httpStatus: 404;
errorCode: "ERR_MISSING_INVITE_CODE_MAPPING";
}>;
};
};
export type PartyJoinByCodeResponse = z.input<typeof partyJoinByCodeEndpoint.responses['200']>;