Skip to content

Commit ea0088a

Browse files
brolnickijmrlubos
authored andcommitted
feat(core): init client-ofetch support in plugin system
1 parent 7023a42 commit ea0088a

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

packages/openapi-ts/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export type { Client } from './plugins/@hey-api/client-core/types';
131131
export type { FetchClient } from './plugins/@hey-api/client-fetch';
132132
export type { NextClient } from './plugins/@hey-api/client-next';
133133
export type { NuxtClient } from './plugins/@hey-api/client-nuxt';
134+
export type { OfetchClient } from './plugins/@hey-api/client-ofetch';
134135
export type { ExpressionTransformer } from './plugins/@hey-api/transformers/expressions';
135136
export type { TypeTransformer } from './plugins/@hey-api/transformers/types';
136137
export { definePluginConfig } from './plugins/shared/utils/config';

packages/openapi-ts/src/plugins/@hey-api/client-core/types.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import type { HeyApiClientAxiosPlugin } from '../client-axios';
44
import type { HeyApiClientFetchPlugin } from '../client-fetch';
55
import type { HeyApiClientNextPlugin } from '../client-next';
66
import type { HeyApiClientNuxtPlugin } from '../client-nuxt';
7+
import type { HeyApiClientOfetchPlugin } from '../client-ofetch';
78

89
export interface PluginHandler {
910
(...args: Parameters<HeyApiClientAngularPlugin['Handler']>): void;
1011
(...args: Parameters<HeyApiClientAxiosPlugin['Handler']>): void;
1112
(...args: Parameters<HeyApiClientFetchPlugin['Handler']>): void;
13+
(...args: Parameters<HeyApiClientOfetchPlugin['Handler']>): void;
1214
(...args: Parameters<HeyApiClientNextPlugin['Handler']>): void;
1315
(...args: Parameters<HeyApiClientNuxtPlugin['Handler']>): void;
1416
}

packages/openapi-ts/src/plugins/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import type { HeyApiClientNextPlugin } from './@hey-api/client-next';
1010
import { defaultConfig as heyApiClientNext } from './@hey-api/client-next';
1111
import type { HeyApiClientNuxtPlugin } from './@hey-api/client-nuxt';
1212
import { defaultConfig as heyApiClientNuxt } from './@hey-api/client-nuxt';
13+
import type { HeyApiClientOfetchPlugin } from './@hey-api/client-ofetch';
14+
import { defaultConfig as heyApiClientOfetch } from './@hey-api/client-ofetch';
1315
import type { HeyApiClientLegacyAngularPlugin } from './@hey-api/legacy-angular';
1416
import { defaultConfig as heyApiLegacyAngular } from './@hey-api/legacy-angular';
1517
import type { HeyApiClientLegacyAxiosPlugin } from './@hey-api/legacy-axios';
@@ -55,6 +57,7 @@ export interface PluginConfigMap {
5557
'@hey-api/client-fetch': HeyApiClientFetchPlugin['Types'];
5658
'@hey-api/client-next': HeyApiClientNextPlugin['Types'];
5759
'@hey-api/client-nuxt': HeyApiClientNuxtPlugin['Types'];
60+
'@hey-api/client-ofetch': HeyApiClientOfetchPlugin['Types'];
5861
'@hey-api/schemas': HeyApiSchemasPlugin['Types'];
5962
'@hey-api/sdk': HeyApiSdkPlugin['Types'];
6063
'@hey-api/transformers': HeyApiTransformersPlugin['Types'];
@@ -84,6 +87,7 @@ export const defaultPluginConfigs: {
8487
'@hey-api/client-fetch': heyApiClientFetch,
8588
'@hey-api/client-next': heyApiClientNext,
8689
'@hey-api/client-nuxt': heyApiClientNuxt,
90+
'@hey-api/client-ofetch': heyApiClientOfetch,
8791
'@hey-api/schemas': heyApiSchemas,
8892
'@hey-api/sdk': heyApiSdk,
8993
'@hey-api/transformers': heyApiTransformers,

packages/openapi-ts/src/plugins/types.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export type PluginClientNames =
1212
| '@hey-api/client-fetch'
1313
| '@hey-api/client-next'
1414
| '@hey-api/client-nuxt'
15+
| '@hey-api/client-ofetch'
1516
| 'legacy/angular'
1617
| 'legacy/axios'
1718
| 'legacy/fetch'

0 commit comments

Comments
 (0)