Skip to content

Commit 28de63a

Browse files
committed
feat(core): init client-ofetch support in plugin system
1 parent df54ab9 commit 28de63a

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
@@ -129,6 +129,7 @@ export type { Client } from './plugins/@hey-api/client-core/types';
129129
export type { FetchClient } from './plugins/@hey-api/client-fetch';
130130
export type { NextClient } from './plugins/@hey-api/client-next';
131131
export type { NuxtClient } from './plugins/@hey-api/client-nuxt';
132+
export type { OfetchClient } from './plugins/@hey-api/client-ofetch';
132133
export type { ExpressionTransformer } from './plugins/@hey-api/transformers/expressions';
133134
export type { TypeTransformer } from './plugins/@hey-api/transformers/types';
134135
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
@@ -3,11 +3,13 @@ import type { HeyApiClientAxiosPlugin } from '../client-axios';
33
import type { HeyApiClientFetchPlugin } from '../client-fetch';
44
import type { HeyApiClientNextPlugin } from '../client-next';
55
import type { HeyApiClientNuxtPlugin } from '../client-nuxt';
6+
import type { HeyApiClientOfetchPlugin } from '../client-ofetch';
67

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

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)