···11+# Angular
22+33+This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.15.
44+55+## Development server
66+77+To start a local development server, run:
88+99+```bash
1010+ng serve
1111+```
1212+1313+Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
1414+1515+## Code scaffolding
1616+1717+Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
1818+1919+```bash
2020+ng generate component component-name
2121+```
2222+2323+For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
2424+2525+```bash
2626+ng generate --help
2727+```
2828+2929+## Building
3030+3131+To build the project run:
3232+3333+```bash
3434+ng build
3535+```
3636+3737+This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
3838+3939+## Running unit tests
4040+4141+To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
4242+4343+```bash
4444+ng test
4545+```
4646+4747+## Running end-to-end tests
4848+4949+For end-to-end (e2e) testing, run:
5050+5151+```bash
5252+ng e2e
5353+```
5454+5555+Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
5656+5757+## Additional Resources
5858+5959+For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
···11+// This file is auto-generated by @hey-api/openapi-ts
22+33+import {
44+ type ClientOptions as DefaultClientOptions,
55+ type Config,
66+ createClient,
77+ createConfig,
88+} from './client';
99+import type { ClientOptions } from './types.gen';
1010+1111+/**
1212+ * The `createClientConfig()` function will be called on client initialization
1313+ * and the returned object will become the client's initial configuration.
1414+ *
1515+ * You may want to initialize your client this way instead of calling
1616+ * `setConfig()`. This is useful for example if you're using Next.js
1717+ * to ensure your client always has the correct values.
1818+ */
1919+export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> =
2020+ (
2121+ override?: Config<DefaultClientOptions & T>,
2222+ ) => Config<Required<DefaultClientOptions> & T>;
2323+2424+export const client = createClient(
2525+ createConfig<ClientOptions>({
2626+ baseUrl: 'https://petstore3.swagger.io/api/v3',
2727+ }),
2828+);
···11+// This file is auto-generated by @hey-api/openapi-ts
22+33+import type { Auth, AuthToken } from './auth.gen';
44+import type {
55+ BodySerializer,
66+ QuerySerializer,
77+ QuerySerializerOptions,
88+} from './bodySerializer.gen';
99+1010+export interface Client<
1111+ RequestFn = never,
1212+ Config = unknown,
1313+ MethodFn = never,
1414+ BuildUrlFn = never,
1515+> {
1616+ /**
1717+ * Returns the final request URL.
1818+ */
1919+ buildUrl: BuildUrlFn;
2020+ connect: MethodFn;
2121+ delete: MethodFn;
2222+ get: MethodFn;
2323+ getConfig: () => Config;
2424+ head: MethodFn;
2525+ options: MethodFn;
2626+ patch: MethodFn;
2727+ post: MethodFn;
2828+ put: MethodFn;
2929+ request: RequestFn;
3030+ setConfig: (config: Config) => Config;
3131+ trace: MethodFn;
3232+}
3333+3434+export interface Config {
3535+ /**
3636+ * Auth token or a function returning auth token. The resolved value will be
3737+ * added to the request payload as defined by its `security` array.
3838+ */
3939+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
4040+ /**
4141+ * A function for serializing request body parameter. By default,
4242+ * {@link JSON.stringify()} will be used.
4343+ */
4444+ bodySerializer?: BodySerializer | null;
4545+ /**
4646+ * An object containing any HTTP headers that you want to pre-populate your
4747+ * `Headers` object with.
4848+ *
4949+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
5050+ */
5151+ headers?:
5252+ | RequestInit['headers']
5353+ | Record<
5454+ string,
5555+ | string
5656+ | number
5757+ | boolean
5858+ | (string | number | boolean)[]
5959+ | null
6060+ | undefined
6161+ | unknown
6262+ >;
6363+ /**
6464+ * The request method.
6565+ *
6666+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
6767+ */
6868+ method?:
6969+ | 'CONNECT'
7070+ | 'DELETE'
7171+ | 'GET'
7272+ | 'HEAD'
7373+ | 'OPTIONS'
7474+ | 'PATCH'
7575+ | 'POST'
7676+ | 'PUT'
7777+ | 'TRACE';
7878+ /**
7979+ * A function for serializing request query parameters. By default, arrays
8080+ * will be exploded in form style, objects will be exploded in deepObject
8181+ * style, and reserved characters are percent-encoded.
8282+ *
8383+ * This method will have no effect if the native `paramsSerializer()` Axios
8484+ * API function is used.
8585+ *
8686+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
8787+ */
8888+ querySerializer?: QuerySerializer | QuerySerializerOptions;
8989+ /**
9090+ * A function validating request data. This is useful if you want to ensure
9191+ * the request conforms to the desired shape, so it can be safely sent to
9292+ * the server.
9393+ */
9494+ requestValidator?: (data: unknown) => Promise<unknown>;
9595+ /**
9696+ * A function transforming response data before it's returned. This is useful
9797+ * for post-processing data, e.g. converting ISO strings into Date objects.
9898+ */
9999+ responseTransformer?: (data: unknown) => Promise<unknown>;
100100+ /**
101101+ * A function validating response data. This is useful if you want to ensure
102102+ * the response conforms to the desired shape, so it can be safely passed to
103103+ * the transformers and returned to the user.
104104+ */
105105+ responseValidator?: (data: unknown) => Promise<unknown>;
106106+}
107107+108108+type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]
109109+ ? true
110110+ : [T] extends [never | undefined]
111111+ ? [undefined] extends [T]
112112+ ? false
113113+ : true
114114+ : false;
115115+116116+export type OmitNever<T extends Record<string, unknown>> = {
117117+ [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true
118118+ ? never
119119+ : K]: T[K];
120120+};
+3
examples/openapi-ts-angular/src/client/index.ts
···11+// This file is auto-generated by @hey-api/openapi-ts
22+export * from './sdk.gen';
33+export * from './types.gen';
···11+import type { HeyApiClientAngularPlugin } from '../client-angular';
12import type { HeyApiClientAxiosPlugin } from '../client-axios';
23import type { HeyApiClientFetchPlugin } from '../client-fetch';
34import type { HeyApiClientNextPlugin } from '../client-next';
45import type { HeyApiClientNuxtPlugin } from '../client-nuxt';
5667export type PluginHandler =
88+ | HeyApiClientAngularPlugin['Handler']
79 | HeyApiClientAxiosPlugin['Handler']
810 | HeyApiClientFetchPlugin['Handler']
911 | HeyApiClientNextPlugin['Handler']