@vibexp/api-client 0.1.0
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/LICENSE +21 -0
- package/README.md +93 -0
- package/dist/axios/client/client.gen.d.ts +2 -0
- package/dist/axios/client/client.gen.js +130 -0
- package/dist/axios/client/index.d.ts +10 -0
- package/dist/axios/client/index.js +6 -0
- package/dist/axios/client/types.gen.d.ts +87 -0
- package/dist/axios/client/types.gen.js +2 -0
- package/dist/axios/client/utils.gen.d.ts +14 -0
- package/dist/axios/client/utils.gen.js +168 -0
- package/dist/axios/client.gen.d.ts +12 -0
- package/dist/axios/client.gen.js +3 -0
- package/dist/axios/core/auth.gen.d.ts +25 -0
- package/dist/axios/core/auth.gen.js +14 -0
- package/dist/axios/core/bodySerializer.gen.d.ts +25 -0
- package/dist/axios/core/bodySerializer.gen.js +57 -0
- package/dist/axios/core/params.gen.d.ts +43 -0
- package/dist/axios/core/params.gen.js +100 -0
- package/dist/axios/core/pathSerializer.gen.d.ts +33 -0
- package/dist/axios/core/pathSerializer.gen.js +106 -0
- package/dist/axios/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/axios/core/queryKeySerializer.gen.js +92 -0
- package/dist/axios/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/axios/core/serverSentEvents.gen.js +132 -0
- package/dist/axios/core/types.gen.d.ts +83 -0
- package/dist/axios/core/types.gen.js +2 -0
- package/dist/axios/core/utils.gen.d.ts +19 -0
- package/dist/axios/core/utils.gen.js +87 -0
- package/dist/axios/index.d.ts +2 -0
- package/dist/axios/index.js +2 -0
- package/dist/axios/sdk.gen.d.ts +1391 -0
- package/dist/axios/sdk.gen.js +3600 -0
- package/dist/axios/types.gen.d.ts +11043 -0
- package/dist/axios/types.gen.js +2 -0
- package/dist/axios-entry.d.ts +2 -0
- package/dist/axios-entry.js +6 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +17 -0
- package/dist/schema.d.ts +18671 -0
- package/dist/schema.js +5 -0
- package/package.json +51 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Public surface of the `./axios` subpath. The generated barrel
|
|
2
|
+
// (src/axios/index.ts) exports the SDK functions and types but NOT the
|
|
3
|
+
// shared client instance, which consumers need for setConfig (baseURL,
|
|
4
|
+
// auth headers). Re-export both from one stable entrypoint.
|
|
5
|
+
export * from "./axios/index.js";
|
|
6
|
+
export { client } from "./axios/client.gen.js";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ClientOptions } from "openapi-fetch";
|
|
2
|
+
import type { paths } from "./schema.js";
|
|
3
|
+
export type { components, operations, paths } from "./schema.js";
|
|
4
|
+
/** Default REST API origin. Empty means same-origin / relative requests; override via `baseUrl`. */
|
|
5
|
+
export declare const PRODUCTION_BASE_URL = "";
|
|
6
|
+
/**
|
|
7
|
+
* Create a typed VibeXP API client.
|
|
8
|
+
*
|
|
9
|
+
* Defaults to a same-origin (relative) base URL; pass `baseUrl` to point
|
|
10
|
+
* elsewhere (e.g. http://localhost:8080 in development). All other
|
|
11
|
+
* openapi-fetch options (headers, fetch, querySerializer, …) pass through
|
|
12
|
+
* unchanged.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createApiClient(options?: ClientOptions): import("openapi-fetch").Client<paths, `${string}/${string}`>;
|
|
15
|
+
export default createApiClient;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Main entrypoint: zero-runtime typed fetch client (openapi-fetch) over the
|
|
2
|
+
// generated `paths` types. The axios SDK lives at the `./axios` subpath.
|
|
3
|
+
import createClient from "openapi-fetch";
|
|
4
|
+
/** Default REST API origin. Empty means same-origin / relative requests; override via `baseUrl`. */
|
|
5
|
+
export const PRODUCTION_BASE_URL = "";
|
|
6
|
+
/**
|
|
7
|
+
* Create a typed VibeXP API client.
|
|
8
|
+
*
|
|
9
|
+
* Defaults to a same-origin (relative) base URL; pass `baseUrl` to point
|
|
10
|
+
* elsewhere (e.g. http://localhost:8080 in development). All other
|
|
11
|
+
* openapi-fetch options (headers, fetch, querySerializer, …) pass through
|
|
12
|
+
* unchanged.
|
|
13
|
+
*/
|
|
14
|
+
export function createApiClient(options) {
|
|
15
|
+
return createClient({ baseUrl: PRODUCTION_BASE_URL, ...options });
|
|
16
|
+
}
|
|
17
|
+
export default createApiClient;
|