Skip to content

Commit 0c40603

Browse files
committed
chore: update snapshots
1 parent 97b2776 commit 0c40603

201 files changed

Lines changed: 2316 additions & 768 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ export const createClient = (config: Config = {}): Client => {
3131

3232
const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();
3333

34-
const beforeRequest = async (options: RequestOptions) => {
34+
const beforeRequest = async <
35+
TData = unknown,
36+
TResponseStyle extends 'data' | 'fields' = 'fields',
37+
ThrowOnError extends boolean = boolean,
38+
Url extends string = string,
39+
>(
40+
options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,
41+
) => {
3542
const opts = {
3643
..._config,
3744
...options,
@@ -60,13 +67,14 @@ export const createClient = (config: Config = {}): Client => {
6067
opts.headers.delete('Content-Type');
6168
}
6269

63-
const url = buildUrl(opts);
70+
const resolvedOpts = opts as typeof opts &
71+
ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;
72+
const url = buildUrl(resolvedOpts);
6473

65-
return { opts, url };
74+
return { opts: resolvedOpts, url };
6675
};
6776

6877
const request: Client['request'] = async (options) => {
69-
// @ts-expect-error
7078
const { opts, url } = await beforeRequest(options);
7179
const requestInit: ReqInit = {
7280
redirect: 'follow',

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ export const createClient = (config: Config = {}): Client => {
3131

3232
const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();
3333

34-
const beforeRequest = async (options: RequestOptions) => {
34+
const beforeRequest = async <
35+
TData = unknown,
36+
TResponseStyle extends 'data' | 'fields' = 'fields',
37+
ThrowOnError extends boolean = boolean,
38+
Url extends string = string,
39+
>(
40+
options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,
41+
) => {
3542
const opts = {
3643
..._config,
3744
...options,
@@ -60,13 +67,14 @@ export const createClient = (config: Config = {}): Client => {
6067
opts.headers.delete('Content-Type');
6168
}
6269

63-
const url = buildUrl(opts);
70+
const resolvedOpts = opts as typeof opts &
71+
ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;
72+
const url = buildUrl(resolvedOpts);
6473

65-
return { opts, url };
74+
return { opts: resolvedOpts, url };
6675
};
6776

6877
const request: Client['request'] = async (options) => {
69-
// @ts-expect-error
7078
const { opts, url } = await beforeRequest(options);
7179
const requestInit: ReqInit = {
7280
redirect: 'follow',

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ export const createClient = (config: Config = {}): Client => {
3131

3232
const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();
3333

34-
const beforeRequest = async (options: RequestOptions) => {
34+
const beforeRequest = async <
35+
TData = unknown,
36+
TResponseStyle extends 'data' | 'fields' = 'fields',
37+
ThrowOnError extends boolean = boolean,
38+
Url extends string = string,
39+
>(
40+
options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,
41+
) => {
3542
const opts = {
3643
..._config,
3744
...options,
@@ -60,13 +67,14 @@ export const createClient = (config: Config = {}): Client => {
6067
opts.headers.delete('Content-Type');
6168
}
6269

63-
const url = buildUrl(opts);
70+
const resolvedOpts = opts as typeof opts &
71+
ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;
72+
const url = buildUrl(resolvedOpts);
6473

65-
return { opts, url };
74+
return { opts: resolvedOpts, url };
6675
};
6776

6877
const request: Client['request'] = async (options) => {
69-
// @ts-expect-error
7078
const { opts, url } = await beforeRequest(options);
7179
const requestInit: ReqInit = {
7280
redirect: 'follow',

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,14 @@ export const createClient = (config: Config = {}): Client => {
9797
return { opts, req, url };
9898
};
9999

100-
const beforeRequest = async (options: RequestOptions) => {
100+
const beforeRequest = async <
101+
TData = unknown,
102+
TResponseStyle extends ResponseStyle = 'fields',
103+
ThrowOnError extends boolean = boolean,
104+
Url extends string = string,
105+
>(
106+
options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,
107+
) => {
101108
const { opts, req, url } = requestOptions(options);
102109

103110
if (opts.security) {
@@ -115,7 +122,6 @@ export const createClient = (config: Config = {}): Client => {
115122
};
116123

117124
const request: Client['request'] = async (options) => {
118-
// @ts-expect-error
119125
const { opts, req: initialReq } = await beforeRequest(options);
120126

121127
let req = initialReq;

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,14 @@ export const createClient = (config: Config = {}): Client => {
9797
return { opts, req, url };
9898
};
9999

100-
const beforeRequest = async (options: RequestOptions) => {
100+
const beforeRequest = async <
101+
TData = unknown,
102+
TResponseStyle extends ResponseStyle = 'fields',
103+
ThrowOnError extends boolean = boolean,
104+
Url extends string = string,
105+
>(
106+
options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,
107+
) => {
101108
const { opts, req, url } = requestOptions(options);
102109

103110
if (opts.security) {
@@ -115,7 +122,6 @@ export const createClient = (config: Config = {}): Client => {
115122
};
116123

117124
const request: Client['request'] = async (options) => {
118-
// @ts-expect-error
119125
const { opts, req: initialReq } = await beforeRequest(options);
120126

121127
let req = initialReq;

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ export const createClient = (config: Config = {}): Client => {
3131

3232
const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();
3333

34-
const beforeRequest = async (options: RequestOptions) => {
34+
const beforeRequest = async <
35+
TData = unknown,
36+
TResponseStyle extends 'data' | 'fields' = 'fields',
37+
ThrowOnError extends boolean = boolean,
38+
Url extends string = string,
39+
>(
40+
options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,
41+
) => {
3542
const opts = {
3643
..._config,
3744
...options,
@@ -60,13 +67,14 @@ export const createClient = (config: Config = {}): Client => {
6067
opts.headers.delete('Content-Type');
6168
}
6269

63-
const url = buildUrl(opts);
70+
const resolvedOpts = opts as typeof opts &
71+
ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;
72+
const url = buildUrl(resolvedOpts);
6473

65-
return { opts, url };
74+
return { opts: resolvedOpts, url };
6675
};
6776

6877
const request: Client['request'] = async (options) => {
69-
// @ts-expect-error
7078
const { opts, url } = await beforeRequest(options);
7179
const requestInit: ReqInit = {
7280
redirect: 'follow',

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ export const createClient = (config: Config = {}): Client => {
3131

3232
const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();
3333

34-
const beforeRequest = async (options: RequestOptions) => {
34+
const beforeRequest = async <
35+
TData = unknown,
36+
TResponseStyle extends 'data' | 'fields' = 'fields',
37+
ThrowOnError extends boolean = boolean,
38+
Url extends string = string,
39+
>(
40+
options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,
41+
) => {
3542
const opts = {
3643
..._config,
3744
...options,
@@ -60,13 +67,14 @@ export const createClient = (config: Config = {}): Client => {
6067
opts.headers.delete('Content-Type');
6168
}
6269

63-
const url = buildUrl(opts);
70+
const resolvedOpts = opts as typeof opts &
71+
ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;
72+
const url = buildUrl(resolvedOpts);
6473

65-
return { opts, url };
74+
return { opts: resolvedOpts, url };
6675
};
6776

6877
const request: Client['request'] = async (options) => {
69-
// @ts-expect-error
7078
const { opts, url } = await beforeRequest(options);
7179
const requestInit: ReqInit = {
7280
redirect: 'follow',

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ export const createClient = (config: Config = {}): Client => {
3131

3232
const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();
3333

34-
const beforeRequest = async (options: RequestOptions) => {
34+
const beforeRequest = async <
35+
TData = unknown,
36+
TResponseStyle extends 'data' | 'fields' = 'fields',
37+
ThrowOnError extends boolean = boolean,
38+
Url extends string = string,
39+
>(
40+
options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,
41+
) => {
3542
const opts = {
3643
..._config,
3744
...options,
@@ -60,13 +67,14 @@ export const createClient = (config: Config = {}): Client => {
6067
opts.headers.delete('Content-Type');
6168
}
6269

63-
const url = buildUrl(opts);
70+
const resolvedOpts = opts as typeof opts &
71+
ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;
72+
const url = buildUrl(resolvedOpts);
6473

65-
return { opts, url };
74+
return { opts: resolvedOpts, url };
6675
};
6776

6877
const request: Client['request'] = async (options) => {
69-
// @ts-expect-error
7078
const { opts, url } = await beforeRequest(options);
7179
const requestInit: ReqInit = {
7280
redirect: 'follow',

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ export const createClient = (config: Config = {}): Client => {
3131

3232
const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();
3333

34-
const beforeRequest = async (options: RequestOptions) => {
34+
const beforeRequest = async <
35+
TData = unknown,
36+
TResponseStyle extends 'data' | 'fields' = 'fields',
37+
ThrowOnError extends boolean = boolean,
38+
Url extends string = string,
39+
>(
40+
options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,
41+
) => {
3542
const opts = {
3643
..._config,
3744
...options,
@@ -60,13 +67,14 @@ export const createClient = (config: Config = {}): Client => {
6067
opts.headers.delete('Content-Type');
6168
}
6269

63-
const url = buildUrl(opts);
70+
const resolvedOpts = opts as typeof opts &
71+
ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;
72+
const url = buildUrl(resolvedOpts);
6473

65-
return { opts, url };
74+
return { opts: resolvedOpts, url };
6675
};
6776

6877
const request: Client['request'] = async (options) => {
69-
// @ts-expect-error
7078
const { opts, url } = await beforeRequest(options);
7179
const requestInit: ReqInit = {
7280
redirect: 'follow',

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ export const createClient = (config: Config = {}): Client => {
3131

3232
const interceptors = createInterceptors<Request, Response, unknown, ResolvedRequestOptions>();
3333

34-
const beforeRequest = async (options: RequestOptions) => {
34+
const beforeRequest = async <
35+
TData = unknown,
36+
TResponseStyle extends 'data' | 'fields' = 'fields',
37+
ThrowOnError extends boolean = boolean,
38+
Url extends string = string,
39+
>(
40+
options: RequestOptions<TData, TResponseStyle, ThrowOnError, Url>,
41+
) => {
3542
const opts = {
3643
..._config,
3744
...options,
@@ -60,13 +67,14 @@ export const createClient = (config: Config = {}): Client => {
6067
opts.headers.delete('Content-Type');
6168
}
6269

63-
const url = buildUrl(opts);
70+
const resolvedOpts = opts as typeof opts &
71+
ResolvedRequestOptions<TResponseStyle, ThrowOnError, Url>;
72+
const url = buildUrl(resolvedOpts);
6473

65-
return { opts, url };
74+
return { opts: resolvedOpts, url };
6675
};
6776

6877
const request: Client['request'] = async (options) => {
69-
// @ts-expect-error
7078
const { opts, url } = await beforeRequest(options);
7179
const requestInit: ReqInit = {
7280
redirect: 'follow',

0 commit comments

Comments
 (0)