riotapi-fetch-typed 1.2.3-dev → 1.2.5-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/index.d.mts +43 -41
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{openapi-BkMGeXC5.d.mts → openapi-0zuiC6dA.d.mts} +3796 -1866
- package/dist/openapi-0zuiC6dA.d.mts.map +1 -0
- package/package.json +14 -15
- package/dist/index.cjs +0 -134
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -11244
- package/dist/index.d.cts.map +0 -1
- package/dist/openapi-BkMGeXC5.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ const { response, data, error } = await riotFetch(
|
|
|
35
35
|
`/riot/account/v1/accounts/by-puuid/${puuid}`,
|
|
36
36
|
{
|
|
37
37
|
region: "europe", // type-safe
|
|
38
|
-
}
|
|
38
|
+
},
|
|
39
39
|
);
|
|
40
40
|
|
|
41
41
|
if (!error) {
|
|
@@ -76,13 +76,13 @@ try {
|
|
|
76
76
|
Install it using your package manager:
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
$ npm install
|
|
80
|
-
# or
|
|
81
|
-
$ pnpm install riot-games-fetch-typed
|
|
79
|
+
$ npm install riotapi-fetch-typed
|
|
82
80
|
# or
|
|
83
|
-
$
|
|
81
|
+
$ pnpm install riotapi-fetch-typed
|
|
84
82
|
# or
|
|
85
|
-
$
|
|
83
|
+
$ yarn install riotapi-fetch-typed
|
|
84
|
+
|
|
85
|
+
$ bun install riotapi-fetch-typed
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
## Autocomplete related issues
|
package/dist/index.d.mts
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { a as webhooks, i as paths, n as components, r as operations, t as $defs } from "./openapi-
|
|
2
|
-
|
|
1
|
+
import { a as webhooks, i as paths, n as components, r as operations, t as $defs } from "./openapi-0zuiC6dA.mjs";
|
|
3
2
|
//#region src/index.d.ts
|
|
4
3
|
/** Every possible API path, based on the OpenAPI document */
|
|
5
|
-
type Paths = keyof paths;
|
|
4
|
+
export type Paths = keyof paths;
|
|
6
5
|
/**
|
|
7
6
|
* Type util that replaces all occurences of curly brackets pairs in a string literal type to string placeholders,
|
|
8
7
|
* resulting in a template literal type. For that it recursively tests the string for curly bracket pairs.
|
|
9
8
|
*
|
|
10
9
|
* @example TemplatifyPath<'summoner/{summonerName}/ranked'> -> `summoner/${string}/ranked`
|
|
11
10
|
*/
|
|
12
|
-
type TemplatifyPathRecursive<Path extends string> = Path extends `${infer Start}/{${string}}${infer End}` ? `${Start}/${string}${TemplatifyPathRecursive<End>}` : Path;
|
|
11
|
+
export type TemplatifyPathRecursive<Path extends string> = Path extends `${infer Start}/{${string}}${infer End}` ? `${Start}/${string}${TemplatifyPathRecursive<End>}` : Path;
|
|
13
12
|
/** Every possible API path, but templatified */
|
|
14
|
-
type TemplatePaths = TemplatifyPathRecursive<Paths>;
|
|
13
|
+
export type TemplatePaths = TemplatifyPathRecursive<Paths>;
|
|
15
14
|
/** Splits a Path by `/` into an array */
|
|
16
|
-
type SplitPathRecursive<Path extends string> = Path extends `${infer Head}/${infer Tail}` ? [Head, ...SplitPathRecursive<Tail>] : [Path];
|
|
17
|
-
type SplitPath<Path extends string> = Path extends `${infer A}/${infer B}/${infer C}/${infer D}/${infer E}/${infer F}/${infer G}/${infer H}/${infer I}` ? [A, B, C, D, E, F, G, H, I] : Path extends `${infer A}/${infer B}/${infer C}/${infer D}/${infer E}/${infer F}/${infer G}/${infer H}` ? [A, B, C, D, E, F, G, H] : Path extends `${infer A}/${infer B}/${infer C}/${infer D}/${infer E}/${infer F}/${infer G}` ? [A, B, C, D, E, F, G] : Path extends `${infer A}/${infer B}/${infer C}/${infer D}/${infer E}/${infer F}` ? [A, B, C, D, E, F] : Path extends `${infer A}/${infer B}/${infer C}/${infer D}/${infer E}` ? [A, B, C, D, E] : Path extends `${infer A}/${infer B}/${infer C}/${infer D}` ? [A, B, C, D] : Path extends `${infer A}/${infer B}/${infer C}` ? [A, B, C] : Path extends `${infer A}/${infer B}` ? [A, B] : [Path];
|
|
15
|
+
export type SplitPathRecursive<Path extends string> = Path extends `${infer Head}/${infer Tail}` ? [Head, ...SplitPathRecursive<Tail>] : [Path];
|
|
16
|
+
export type SplitPath<Path extends string> = Path extends `${infer A}/${infer B}/${infer C}/${infer D}/${infer E}/${infer F}/${infer G}/${infer H}/${infer I}` ? [A, B, C, D, E, F, G, H, I] : Path extends `${infer A}/${infer B}/${infer C}/${infer D}/${infer E}/${infer F}/${infer G}/${infer H}` ? [A, B, C, D, E, F, G, H] : Path extends `${infer A}/${infer B}/${infer C}/${infer D}/${infer E}/${infer F}/${infer G}` ? [A, B, C, D, E, F, G] : Path extends `${infer A}/${infer B}/${infer C}/${infer D}/${infer E}/${infer F}` ? [A, B, C, D, E, F] : Path extends `${infer A}/${infer B}/${infer C}/${infer D}/${infer E}` ? [A, B, C, D, E] : Path extends `${infer A}/${infer B}/${infer C}/${infer D}` ? [A, B, C, D] : Path extends `${infer A}/${infer B}/${infer C}` ? [A, B, C] : Path extends `${infer A}/${infer B}` ? [A, B] : [Path];
|
|
18
17
|
/**
|
|
19
18
|
* Compares two splitted paths.
|
|
20
19
|
*
|
|
21
20
|
* Type is true if both splitted paths have the same length and every segment of Concrete extends its corresponding segment Template
|
|
22
21
|
* */
|
|
23
|
-
type MatchSegmentsRecursive<Template extends string[], Concrete extends string[]> = Template extends [infer TemplateSegment, ...infer TemplateRest] ? Concrete extends [infer ConcreteSegment, ...infer ConcreteRest] ? ConcreteSegment extends TemplateSegment ? TemplateRest extends string[] ? ConcreteRest extends string[] ? MatchSegmentsRecursive<TemplateRest, ConcreteRest> : never : never : false : Concrete extends [] ? Template extends [] ? true : false : false : Template extends [] ? Concrete extends [] ? true : false : false;
|
|
24
|
-
type MatchSegments<T extends [string?, string?, string?, string?, string?, string?, string?, string?, string?], C extends [string?, string?, string?, string?, string?, string?, string?, string?, string?]> = T['length'] extends C['length'] ? (C[0] extends T[0] ? C[1] extends T[1] ? C[2] extends T[2] ? C[3] extends T[3] ? C[4] extends T[4] ? C[5] extends T[5] ? C[6] extends T[6] ? C[7] extends T[7] ? C[8] extends T[8] ? true : false : false : false : false : false : false : false : false : false) : false;
|
|
22
|
+
export type MatchSegmentsRecursive<Template extends string[], Concrete extends string[]> = Template extends [infer TemplateSegment, ...infer TemplateRest] ? Concrete extends [infer ConcreteSegment, ...infer ConcreteRest] ? ConcreteSegment extends TemplateSegment ? TemplateRest extends string[] ? ConcreteRest extends string[] ? MatchSegmentsRecursive<TemplateRest, ConcreteRest> : never : never : false : Concrete extends [] ? Template extends [] ? true : false : false : Template extends [] ? Concrete extends [] ? true : false : false;
|
|
23
|
+
export type MatchSegments<T extends [string?, string?, string?, string?, string?, string?, string?, string?, string?], C extends [string?, string?, string?, string?, string?, string?, string?, string?, string?]> = T['length'] extends C['length'] ? (C[0] extends T[0] ? C[1] extends T[1] ? C[2] extends T[2] ? C[3] extends T[3] ? C[4] extends T[4] ? C[5] extends T[5] ? C[6] extends T[6] ? C[7] extends T[7] ? C[8] extends T[8] ? true : false : false : false : false : false : false : false : false : false) : false;
|
|
25
24
|
/**
|
|
26
25
|
* Gives all API Paths that matches the path. Basically the reverse operation of TemplatifyPath
|
|
27
26
|
*
|
|
@@ -31,23 +30,23 @@ type MatchSegments<T extends [string?, string?, string?, string?, string?, strin
|
|
|
31
30
|
* @example ResolveTemplatePath<`/riot/account/v1/accounts/by-riot-id/gameName/gameTag`>
|
|
32
31
|
* -> "/riot/account/v1/accounts/by-riot-id/{gameName}/{tagLine}"
|
|
33
32
|
*/
|
|
34
|
-
type ResolveTemplatePath<Path extends TemplatePaths> = { [P in Paths]: MatchSegments<SplitPath<TemplatifyPathRecursive<P>>, SplitPath<Path>> extends true ? P : never }[Paths];
|
|
35
|
-
type HTTPMethods = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace';
|
|
33
|
+
export type ResolveTemplatePath<Path extends TemplatePaths> = { [P in Paths]: MatchSegments<SplitPath<TemplatifyPathRecursive<P>>, SplitPath<Path>> extends true ? P : never; }[Paths];
|
|
34
|
+
export type HTTPMethods = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace';
|
|
36
35
|
/**
|
|
37
36
|
* Get all available methods for a specific API path
|
|
38
37
|
*/
|
|
39
|
-
type Methods<Path extends Paths> = Exclude<keyof { [K in keyof paths[Path] as paths[Path][K] extends undefined ? never : K]: paths[Path][K] }, 'parameters'>;
|
|
38
|
+
export type Methods<Path extends Paths> = Exclude<keyof { [K in keyof paths[Path] as paths[Path][K] extends undefined ? never : K]: paths[Path][K]; }, 'parameters'>;
|
|
40
39
|
/** Get all possible responses for a specific API path and method */
|
|
41
|
-
type GetResponses<Path extends Paths, Method extends Methods<Path>> = paths[Path][Method] extends {
|
|
40
|
+
export type GetResponses<Path extends Paths, Method extends Methods<Path>> = paths[Path][Method] extends {
|
|
42
41
|
responses: infer Responses;
|
|
43
42
|
} ? Responses : never;
|
|
44
43
|
/** Get the response body for a specific API path, method and status code */
|
|
45
|
-
type GetResponseBody<Path extends Paths, Method extends Methods<Path>, StatusCode extends number> = GetResponses<Path, Method> extends Record<StatusCode, {
|
|
44
|
+
export type GetResponseBody<Path extends Paths, Method extends Methods<Path>, StatusCode extends number> = GetResponses<Path, Method> extends Record<StatusCode, {
|
|
46
45
|
content?: {
|
|
47
46
|
'application/json': infer Body;
|
|
48
47
|
};
|
|
49
48
|
}> ? Body : never;
|
|
50
|
-
type GetRequestBody<Path extends Paths, Method extends Methods<Path>> = paths[Path][Method] extends {
|
|
49
|
+
export type GetRequestBody<Path extends Paths, Method extends Methods<Path>> = paths[Path][Method] extends {
|
|
51
50
|
requestBody?: never;
|
|
52
51
|
} ? {
|
|
53
52
|
body?: never;
|
|
@@ -69,25 +68,25 @@ type GetRequestBody<Path extends Paths, Method extends Methods<Path>> = paths[Pa
|
|
|
69
68
|
body?: U;
|
|
70
69
|
} : unknown;
|
|
71
70
|
/** Get the query parameters for a specific API path and method */
|
|
72
|
-
type GetQuery<Path extends Paths, Method extends Methods<Path>> = Pick<paths[Path][Method]['parameters'], 'query'>;
|
|
71
|
+
export type GetQuery<Path extends Paths, Method extends Methods<Path>> = Pick<paths[Path][Method]['parameters'], 'query'>;
|
|
73
72
|
/** Regions for /riot/account/ endpoints */
|
|
74
|
-
type AccountRegion = 'americas' | 'asia' | 'europe';
|
|
73
|
+
export type AccountRegion = 'americas' | 'asia' | 'europe';
|
|
75
74
|
/** Regions for some lol and tft endpoints */
|
|
76
|
-
type LolRegion = 'br1' | 'eun1' | 'euw1' | 'jp1' | 'kr' | 'la1' | 'la2' | 'me1' | 'na1' | 'oc1' | 'ph2' | 'ru' | 'sg2' | 'th2' | 'tr1' | 'tw2' | 'vn2';
|
|
75
|
+
export type LolRegion = 'br1' | 'eun1' | 'euw1' | 'jp1' | 'kr' | 'la1' | 'la2' | 'me1' | 'na1' | 'oc1' | 'ph2' | 'ru' | 'sg2' | 'th2' | 'tr1' | 'tw2' | 'vn2';
|
|
77
76
|
/** Regions for lol and tft matches endpoints */
|
|
78
|
-
type MatchRegion = 'americas' | 'asia' | 'europe' | 'sea';
|
|
77
|
+
export type MatchRegion = 'americas' | 'asia' | 'europe' | 'sea';
|
|
79
78
|
/** Regions for /lor/ endpoints */
|
|
80
|
-
type LorRegion = 'americas' | 'europe' | 'sea';
|
|
79
|
+
export type LorRegion = 'americas' | 'europe' | 'sea';
|
|
81
80
|
/** Regions for /val/ endpoints */
|
|
82
|
-
type ValorantRegion = 'ap' | 'br' | 'eu' | 'latam' | 'na' | 'esports' | 'kr';
|
|
81
|
+
export type ValorantRegion = 'ap' | 'br' | 'eu' | 'latam' | 'na' | 'esports' | 'kr';
|
|
83
82
|
/** Get the relevant subdomains, depending on the endpoint */
|
|
84
|
-
type GetSubdomain<Path extends TemplatePaths> = Path extends `/riot/account/${string}` ? AccountRegion : Path extends `/lol/champion-mastery/${string}` ? LolRegion : Path extends `/lol/platform/${string}` ? LolRegion : Path extends `/lol/clash/${string}` ? LolRegion : Path extends `/lol/league-exp/${string}` ? LolRegion : Path extends `/lol/league/${string}` ? LolRegion : Path extends `/lol/challenges/${string}` ? LolRegion : Path extends `/lol/rso-match/${string}` ? MatchRegion : Path extends `/lol/status/${string}` ? LolRegion : Path extends `/lor/deck/${string}` ? LorRegion : Path extends `/lor/inventory/${string}` ? LorRegion : Path extends `/lor/match/${string}` ? LorRegion | 'apac' : Path extends `/lor/ranked/${string}` ? LorRegion : Path extends `/lor/status/${string}` ? LorRegion : Path extends `/lol/match/${string}` ? MatchRegion : Path extends `/lol/spectator/${string}` ? LolRegion : Path extends `/fulfillment/${string}` ? LolRegion : Path extends `/lol/summoner/${string}` ? LolRegion : Path extends `/tft/league/${string}` ? LolRegion : Path extends `/tft/match/${string}` ? MatchRegion | 'esports' | 'esportseu' : Path extends `/tft/status/${string}` ? LolRegion : Path extends `/tft/summoner/${string}` ? LolRegion : Path extends `/lol/tournament-stub/${string}` ? 'americas' : Path extends `/lol/tournament/${string}` ? LolRegion | MatchRegion : Path extends `/val/match/console/${string}` ? ValorantRegion : Path extends `/val/console/ranked/${string}` ? ValorantRegion : Path extends `/val/content/${string}` ? ValorantRegion : Path extends `/val/match/${string}` ? ValorantRegion : Path extends `/val/ranked/${string}` ? ValorantRegion : Path extends `/val/status/${string}` ? Exclude<ValorantRegion, 'esports'> : never;
|
|
83
|
+
export type GetSubdomain<Path extends TemplatePaths> = Path extends `/riot/account/${string}` ? AccountRegion : Path extends `/lol/champion-mastery/${string}` ? LolRegion : Path extends `/lol/platform/${string}` ? LolRegion : Path extends `/lol/clash/${string}` ? LolRegion : Path extends `/lol/league-exp/${string}` ? LolRegion : Path extends `/lol/league/${string}` ? LolRegion : Path extends `/lol/challenges/${string}` ? LolRegion : Path extends `/lol/rso-match/${string}` ? MatchRegion : Path extends `/lol/status/${string}` ? LolRegion : Path extends `/lor/deck/${string}` ? LorRegion : Path extends `/lor/inventory/${string}` ? LorRegion : Path extends `/lor/match/${string}` ? LorRegion | 'apac' : Path extends `/lor/ranked/${string}` ? LorRegion : Path extends `/lor/status/${string}` ? LorRegion : Path extends `/lol/match/${string}` ? MatchRegion : Path extends `/lol/spectator/${string}` ? LolRegion : Path extends `/fulfillment/${string}` ? LolRegion : Path extends `/lol/summoner/${string}` ? LolRegion : Path extends `/tft/league/${string}` ? LolRegion : Path extends `/tft/match/${string}` ? MatchRegion | 'esports' | 'esportseu' : Path extends `/tft/status/${string}` ? LolRegion : Path extends `/tft/summoner/${string}` ? LolRegion : Path extends `/lol/tournament-stub/${string}` ? 'americas' : Path extends `/lol/tournament/${string}` ? LolRegion | MatchRegion : Path extends `/val/match/console/${string}` ? ValorantRegion : Path extends `/val/console/ranked/${string}` ? ValorantRegion : Path extends `/val/content/${string}` ? ValorantRegion : Path extends `/val/match/${string}` ? ValorantRegion : Path extends `/val/ranked/${string}` ? ValorantRegion : Path extends `/val/status/${string}` ? Exclude<ValorantRegion, 'esports'> : never;
|
|
85
84
|
/** Typical structure for a RiotError json object. */
|
|
86
|
-
type RiotErrorData = components['schemas']['Error'];
|
|
85
|
+
export type RiotErrorData = components['schemas']['Error'];
|
|
87
86
|
/**
|
|
88
87
|
* Error Class for a 4xx/5xx response code in a fetch to the Riot API
|
|
89
88
|
*/
|
|
90
|
-
declare class RiotError extends Error {
|
|
89
|
+
export declare class RiotError extends Error {
|
|
91
90
|
constructor(message: string, statusCode: number, data?: RiotErrorData);
|
|
92
91
|
statusCode: number;
|
|
93
92
|
data: RiotErrorData | undefined;
|
|
@@ -100,16 +99,24 @@ declare class RiotError extends Error {
|
|
|
100
99
|
* @template ThrowOnError Wether createRiotFetch is configured to throw on http errors or not
|
|
101
100
|
* @template error response.ok, used for type narrowing
|
|
102
101
|
*/
|
|
103
|
-
type RiotFetchReturn<Path extends TemplatePaths, ChosenMethod extends Methods<ResolveTemplatePath<Path>>, ThrowOnError extends boolean, error extends boolean> = ThrowOnError extends true ? error extends false ? {
|
|
104
|
-
/** The response object of the fetch */
|
|
102
|
+
export type RiotFetchReturn<Path extends TemplatePaths, ChosenMethod extends Methods<ResolveTemplatePath<Path>>, ThrowOnError extends boolean, error extends boolean> = ThrowOnError extends true ? error extends false ? {
|
|
103
|
+
/** The response object of the fetch */
|
|
104
|
+
response: Response;
|
|
105
|
+
/** Typed result of response.json() */
|
|
105
106
|
data: GetResponseBody<ResolveTemplatePath<Path>, ChosenMethod, 200>;
|
|
106
107
|
} : never : error extends false ? {
|
|
107
|
-
/** The response object of the fetch */
|
|
108
|
-
|
|
108
|
+
/** The response object of the fetch */
|
|
109
|
+
response: Response;
|
|
110
|
+
/** Typed result of response.json() or eventual error data */
|
|
111
|
+
data: GetResponseBody<ResolveTemplatePath<Path>, ChosenMethod, 200>;
|
|
112
|
+
/** Wether the fetch errored */
|
|
109
113
|
error: false;
|
|
110
114
|
} : {
|
|
111
|
-
/** The response object of the fetch */
|
|
112
|
-
|
|
115
|
+
/** The response object of the fetch */
|
|
116
|
+
response: Response;
|
|
117
|
+
/** Typed result of response.json() or eventual error data */
|
|
118
|
+
data: RiotErrorData | undefined;
|
|
119
|
+
/** Wether the fetch errored */
|
|
113
120
|
error: true;
|
|
114
121
|
};
|
|
115
122
|
/**
|
|
@@ -117,7 +124,7 @@ type RiotFetchReturn<Path extends TemplatePaths, ChosenMethod extends Methods<Re
|
|
|
117
124
|
* @template FetchOptions Options the fetch function can accept
|
|
118
125
|
* @template ThrowOnError We set throwOnResponseError as a generic literal boolean, so that we can better type it
|
|
119
126
|
*/
|
|
120
|
-
interface CreateRiotFetchOptions<FetchOptions, ThrowOnError extends boolean> {
|
|
127
|
+
export interface CreateRiotFetchOptions<FetchOptions, ThrowOnError extends boolean> {
|
|
121
128
|
/** The Api Key obtained from Riot Games */
|
|
122
129
|
apiKey: string;
|
|
123
130
|
/** fetch function that gets called (default: `undici.fetch`) */
|
|
@@ -133,7 +140,7 @@ interface CreateRiotFetchOptions<FetchOptions, ThrowOnError extends boolean> {
|
|
|
133
140
|
/**
|
|
134
141
|
* Basic Fetch Options that are essential for the functioning of createRiotFetch
|
|
135
142
|
*/
|
|
136
|
-
interface BaseFetchOptions {
|
|
143
|
+
export interface BaseFetchOptions {
|
|
137
144
|
method?: HTTPMethods;
|
|
138
145
|
headers?: Headers;
|
|
139
146
|
}
|
|
@@ -144,18 +151,13 @@ interface BaseFetchOptions {
|
|
|
144
151
|
* @param defaultOptions Options that get passed to the fetch function by default
|
|
145
152
|
* @returns A fetch function to get fetch the Riot Games API type-safe
|
|
146
153
|
*/
|
|
147
|
-
declare function createRiotFetch<FetchOptions extends BaseFetchOptions & Record<string, unknown>, ThrowOnError extends boolean = false>({
|
|
148
|
-
apiKey,
|
|
149
|
-
fetchFn,
|
|
150
|
-
baseUrl,
|
|
151
|
-
throwOnResponseError
|
|
152
|
-
}: CreateRiotFetchOptions<FetchOptions & {
|
|
154
|
+
export declare function createRiotFetch<FetchOptions extends BaseFetchOptions & Record<string, unknown>, ThrowOnError extends boolean = false>({ apiKey, fetchFn, baseUrl, throwOnResponseError }: CreateRiotFetchOptions<FetchOptions & {
|
|
153
155
|
body?: BodyInit;
|
|
154
|
-
}, ThrowOnError>, defaultOptions?: FetchOptions): <Path extends TemplatePaths, UsableMethods extends Methods<ResolveTemplatePath<Path>>, ChosenMethod extends UsableMethods | undefined =
|
|
156
|
+
}, ThrowOnError>, defaultOptions?: FetchOptions): <Path extends TemplatePaths, UsableMethods extends Methods<ResolveTemplatePath<Path>>, ChosenMethod extends UsableMethods | undefined = 'get' extends UsableMethods ? 'get' : UsableMethods>(request: Path, options: FetchOptions & {
|
|
155
157
|
region: GetSubdomain<ResolveTemplatePath<Path>>;
|
|
156
158
|
method?: UsableMethods;
|
|
157
159
|
} & GetRequestBody<ResolveTemplatePath<Path>, Extract<ChosenMethod, HTTPMethods>> & GetQuery<ResolveTemplatePath<Path>, Extract<ChosenMethod, HTTPMethods>>) => Promise<RiotFetchReturn<Path, Extract<ChosenMethod, HTTPMethods>, ThrowOnError, true> | RiotFetchReturn<Path, Extract<ChosenMethod, HTTPMethods>, ThrowOnError, false>>;
|
|
158
|
-
declare const Queues: {
|
|
160
|
+
export declare const Queues: {
|
|
159
161
|
readonly CUSTOM: 0;
|
|
160
162
|
readonly HEXAKILL: 75;
|
|
161
163
|
readonly URF: readonly [76, 1900];
|
|
@@ -192,5 +194,5 @@ declare const Queues: {
|
|
|
192
194
|
readonly TUTORIAL: readonly [2000, 2010, 2020];
|
|
193
195
|
};
|
|
194
196
|
//#endregion
|
|
195
|
-
export { $defs,
|
|
197
|
+
export { $defs, components, operations, paths, webhooks };
|
|
196
198
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;YAMY,cAAc;;;;;;;YAQd,wBAAwB,uBACnC,sBAAsB,0BAA0B,WAC1C,kBAAkB,wBAAwB,SAC7C;;YAIQ,gBAAgB,wBAAwB;;YAGxC,mBAAmB,uBAAuB,sBAAsB,cAAc,UACtF,SAAS,mBAAmB,UAC5B;YAEQ,UAAU,uBACrB,sBAAsB,WAAW,WAAW,WAAW,WAAW,WAAW,WAAW,WAAW,WAAW,OAC1G,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,KACzB,sBAAsB,WAAW,WAAW,WAAW,WAAW,WAAW,WAAW,WAAW,OACjG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,KACtB,sBAAsB,WAAW,WAAW,WAAW,WAAW,WAAW,WAAW,OACtF,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,KACnB,sBAAsB,WAAW,WAAW,WAAW,WAAW,WAAW,OAC3E,GAAG,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cAAc,gBAChE,SAAS,oBAAoB,OAAO,QAAQ,cAAc,kBAC3D,QACH,gBAAgB,MAAM,QAAQ,cAAc,cAAc,sBACxD,gBAAgB,MAAM,QAAQ,cAAc,cAAc;qBA6ChD;WACZ;WACA;WACA;WACA;WACA;aACC;aACA;aACA;;WAED;WACA;WACA;WACA;WACA;WACA;WACA;aACC;aACA;aACA;aACA;;WAED;aACC;aACA;aACA;aACA;;WAED;WACA;WACA;WACA;WACA;WACA;WACA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as webhooks, i as paths, n as components, r as operations, t as $defs } from "./openapi-
|
|
1
|
+
import { a as webhooks, i as paths, n as components, r as operations, t as $defs } from "./openapi-0zuiC6dA.d.mts";
|
|
2
2
|
//#region src/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* Error Class for a 4xx/5xx response code in a fetch to the Riot API
|