@rustrak/client 0.22.1 → 0.23.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/README.md +2 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/client.cjs +1 -2
- package/dist/client.d.cts +0 -2
- package/dist/client.d.cts.map +1 -1
- package/dist/client.d.mts +0 -2
- package/dist/client.d.mts.map +1 -1
- package/dist/client.mjs +1 -2
- package/dist/config.d.cts +0 -2
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +0 -2
- package/dist/config.d.mts.map +1 -1
- package/dist/errors.cjs +1 -2
- package/dist/errors.d.cts +0 -2
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.mts +0 -2
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs +1 -2
- package/dist/generated/client/client.gen.cjs +1 -2
- package/dist/generated/client/client.gen.mjs +1 -2
- package/dist/generated/client/types.gen.d.cts +0 -2
- package/dist/generated/client/types.gen.d.cts.map +1 -1
- package/dist/generated/client/types.gen.d.mts +0 -2
- package/dist/generated/client/types.gen.d.mts.map +1 -1
- package/dist/generated/client/utils.gen.cjs +1 -2
- package/dist/generated/client/utils.gen.d.cts +0 -2
- package/dist/generated/client/utils.gen.d.cts.map +1 -1
- package/dist/generated/client/utils.gen.d.mts +0 -2
- package/dist/generated/client/utils.gen.d.mts.map +1 -1
- package/dist/generated/client/utils.gen.mjs +1 -2
- package/dist/generated/client.gen.cjs +1 -2
- package/dist/generated/client.gen.cjs.map +1 -1
- package/dist/generated/client.gen.mjs +1 -2
- package/dist/generated/core/auth.gen.cjs +1 -2
- package/dist/generated/core/auth.gen.d.cts +0 -2
- package/dist/generated/core/auth.gen.d.cts.map +1 -1
- package/dist/generated/core/auth.gen.d.mts +0 -2
- package/dist/generated/core/auth.gen.d.mts.map +1 -1
- package/dist/generated/core/auth.gen.mjs +1 -2
- package/dist/generated/core/bodySerializer.gen.cjs +1 -2
- package/dist/generated/core/bodySerializer.gen.d.cts +0 -2
- package/dist/generated/core/bodySerializer.gen.d.cts.map +1 -1
- package/dist/generated/core/bodySerializer.gen.d.mts +0 -2
- package/dist/generated/core/bodySerializer.gen.d.mts.map +1 -1
- package/dist/generated/core/bodySerializer.gen.mjs +1 -2
- package/dist/generated/core/pathSerializer.gen.cjs +1 -2
- package/dist/generated/core/pathSerializer.gen.d.cts +0 -2
- package/dist/generated/core/pathSerializer.gen.d.cts.map +1 -1
- package/dist/generated/core/pathSerializer.gen.d.mts +0 -2
- package/dist/generated/core/pathSerializer.gen.d.mts.map +1 -1
- package/dist/generated/core/pathSerializer.gen.mjs +1 -2
- package/dist/generated/core/serverSentEvents.gen.cjs +1 -2
- package/dist/generated/core/serverSentEvents.gen.d.cts +0 -2
- package/dist/generated/core/serverSentEvents.gen.d.cts.map +1 -1
- package/dist/generated/core/serverSentEvents.gen.d.mts +0 -2
- package/dist/generated/core/serverSentEvents.gen.d.mts.map +1 -1
- package/dist/generated/core/serverSentEvents.gen.mjs +1 -2
- package/dist/generated/core/types.gen.d.cts +0 -2
- package/dist/generated/core/types.gen.d.cts.map +1 -1
- package/dist/generated/core/types.gen.d.mts +0 -2
- package/dist/generated/core/types.gen.d.mts.map +1 -1
- package/dist/generated/core/utils.gen.cjs +1 -2
- package/dist/generated/core/utils.gen.mjs +1 -2
- package/dist/generated/sdk.gen.cjs +45 -2
- package/dist/generated/sdk.gen.cjs.map +1 -1
- package/dist/generated/sdk.gen.d.cts +3 -3
- package/dist/generated/sdk.gen.d.cts.map +1 -1
- package/dist/generated/sdk.gen.d.mts +3 -3
- package/dist/generated/sdk.gen.d.mts.map +1 -1
- package/dist/generated/sdk.gen.mjs +46 -3
- package/dist/generated/sdk.gen.mjs.map +1 -1
- package/dist/generated/types.gen.d.cts +52 -2
- package/dist/generated/types.gen.d.cts.map +1 -1
- package/dist/generated/types.gen.d.mts +52 -2
- package/dist/generated/types.gen.d.mts.map +1 -1
- package/dist/generated/zod.gen.cjs +54 -10
- package/dist/generated/zod.gen.cjs.map +1 -1
- package/dist/generated/zod.gen.mjs +49 -11
- package/dist/generated/zod.gen.mjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/result.cjs +1 -2
- package/dist/result.d.cts +0 -2
- package/dist/result.d.cts.map +1 -1
- package/dist/result.d.mts +0 -2
- package/dist/result.d.mts.map +1 -1
- package/dist/result.mjs +1 -2
- package/dist/utils/http.cjs +1 -2
- package/dist/utils/http.mjs +1 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -307,8 +307,10 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
307
307
|
| `github.getProjectRepository({ path })` | `GET /api/projects/{project_id}/github` | |
|
|
308
308
|
| `github.installed({ query })` | `GET /api/github/installed` | GitHub sends the browser here after the app is installed on an account. |
|
|
309
309
|
| `github.issue({ path })` | `GET /api/projects/{project_id}/issues/{issue_id}/github` | The issue's links, the commits that may have caused it, and who owns its culprit file. |
|
|
310
|
+
| `github.issueDraft({ path })` | `GET /api/projects/{project_id}/issues/{issue_id}/github/draft` | What creating a GitHub issue sends by default, with the templates applied, for the person to edit first. |
|
|
310
311
|
| `github.linkIssue({ path, body })` | `POST /api/projects/{project_id}/issues/{issue_id}/github/links` | Links an existing GitHub issue or pull request. |
|
|
311
312
|
| `github.manifest({ body })` | `POST /api/github/manifest` | What the dashboard posts to GitHub so GitHub creates an app already configured for this server. |
|
|
313
|
+
| `github.putIssueTemplate({ body })` | `PUT /api/github/issue-template` | The labels, title prefix and body footer every GitHub issue starts with, before a project's own. |
|
|
312
314
|
| `github.putMyLogin({ body })` | `PUT /api/github/me` | |
|
|
313
315
|
| `github.putProjectRepository({ path, body })` | `PUT /api/projects/{project_id}/github` | |
|
|
314
316
|
| `github.repositories({ query })` | `GET /api/github/repositories` | The repositories a project can point at, for whoever may change that project's settings. |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -19,5 +19,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
19
19
|
value: mod,
|
|
20
20
|
enumerable: true
|
|
21
21
|
}) : target, mod));
|
|
22
|
-
//#endregion
|
|
23
22
|
exports.__toESM = __toESM;
|
package/dist/client.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const require_sdk_gen = require("./generated/sdk.gen.cjs");
|
|
|
4
4
|
const require_result = require("./result.cjs");
|
|
5
5
|
const require_http = require("./utils/http.cjs");
|
|
6
6
|
let zod = require("zod");
|
|
7
|
-
|
|
7
|
+
// src/client.ts
|
|
8
8
|
const BINARY = /* @__PURE__ */ new Set(["events.downloadAttachment"]);
|
|
9
9
|
/**
|
|
10
10
|
* Main Rustrak API client. Every method returns a `Result`; nothing throws for
|
|
@@ -82,7 +82,6 @@ function toResult({ data, error, response }) {
|
|
|
82
82
|
});
|
|
83
83
|
throw error;
|
|
84
84
|
}
|
|
85
|
-
//#endregion
|
|
86
85
|
exports.RustrakClient = RustrakClient;
|
|
87
86
|
|
|
88
87
|
//# sourceMappingURL=client.cjs.map
|
package/dist/client.d.cts
CHANGED
|
@@ -2,7 +2,6 @@ import { ClientConfig } from "./config.cjs";
|
|
|
2
2
|
import { RustrakError } from "./errors.cjs";
|
|
3
3
|
import { Rustrak } from "./generated/sdk.gen.cjs";
|
|
4
4
|
import { Result } from "./result.cjs";
|
|
5
|
-
//#region src/client.d.ts
|
|
6
5
|
type Binary = 'events.downloadAttachment';
|
|
7
6
|
type RequestKeys = 'path' | 'query' | 'body' | 'headers' | 'signal';
|
|
8
7
|
type Call<F, Bytes extends boolean> = F extends ((options: infer O) => infer R) ? (...args: {} extends Pick<O, Extract<keyof O, RequestKeys>> ? [options?: Pick<O, Extract<keyof O, RequestKeys>>] : [options: Pick<O, Extract<keyof O, RequestKeys>>]) => Promise<Result<Bytes extends true ? Blob : Data<Awaited<R>>, RustrakError>> : never;
|
|
@@ -14,6 +13,5 @@ type Data<R> = Extract<R, {
|
|
|
14
13
|
type Resource<T, Name extends string> = { readonly [M in keyof T]: Call<T[M], `${Name}.${M & string}` extends Binary ? true : false>; };
|
|
15
14
|
export type RustrakClient = { readonly [R in keyof Rustrak]: Resource<Rustrak[R], R & string>; };
|
|
16
15
|
export declare const RustrakClient: new (config: ClientConfig) => RustrakClient;
|
|
17
|
-
//#endregion
|
|
18
16
|
export {};
|
|
19
17
|
//# sourceMappingURL=client.d.cts.map
|
package/dist/client.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.cts","names":[],"sources":["../src/client.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.cts","names":[],"sources":["../src/client.ts"],"mappings":";;;;KAgBK;KAMA;KAEA,KAAK,GAAG,yBAAyB,YAAW,eAAe,YAAY,SAEnE,iBAAiB,KAAK,GAAG,cAAc,GAAG,iBACxC,UAAU,KAAK,GAAG,cAAc,GAAG,kBACnC,SAAS,KAAK,GAAG,cAAc,GAAG,mBACpC,QACH,OAAO,qBAAqB,OAAO,KAAK,QAAQ,KAAK;KAKtD,KAAK,KACR,QAAQ;EAAK;;EAA8B,YAAY;IAAM;KAE1D,SAAS,GAAG,mCACL,WAAW,IAAI,KACvB,EAAE,OACC,QAAQ,qBAAqB;YAUxB,4BACA,WAAW,UAAU,SAAS,QAAQ,IAAI;qBAkBzC,oBAMX,QAAQ,iBACL"}
|
package/dist/client.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import { ClientConfig } from "./config.mjs";
|
|
|
2
2
|
import { RustrakError } from "./errors.mjs";
|
|
3
3
|
import { Rustrak } from "./generated/sdk.gen.mjs";
|
|
4
4
|
import { Result } from "./result.mjs";
|
|
5
|
-
//#region src/client.d.ts
|
|
6
5
|
type Binary = 'events.downloadAttachment';
|
|
7
6
|
type RequestKeys = 'path' | 'query' | 'body' | 'headers' | 'signal';
|
|
8
7
|
type Call<F, Bytes extends boolean> = F extends ((options: infer O) => infer R) ? (...args: {} extends Pick<O, Extract<keyof O, RequestKeys>> ? [options?: Pick<O, Extract<keyof O, RequestKeys>>] : [options: Pick<O, Extract<keyof O, RequestKeys>>]) => Promise<Result<Bytes extends true ? Blob : Data<Awaited<R>>, RustrakError>> : never;
|
|
@@ -14,6 +13,5 @@ type Data<R> = Extract<R, {
|
|
|
14
13
|
type Resource<T, Name extends string> = { readonly [M in keyof T]: Call<T[M], `${Name}.${M & string}` extends Binary ? true : false>; };
|
|
15
14
|
export type RustrakClient = { readonly [R in keyof Rustrak]: Resource<Rustrak[R], R & string>; };
|
|
16
15
|
export declare const RustrakClient: new (config: ClientConfig) => RustrakClient;
|
|
17
|
-
//#endregion
|
|
18
16
|
export {};
|
|
19
17
|
//# sourceMappingURL=client.d.mts.map
|
package/dist/client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","names":[],"sources":["../src/client.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.mts","names":[],"sources":["../src/client.ts"],"mappings":";;;;KAgBK;KAMA;KAEA,KAAK,GAAG,yBAAyB,YAAW,eAAe,YAAY,SAEnE,iBAAiB,KAAK,GAAG,cAAc,GAAG,iBACxC,UAAU,KAAK,GAAG,cAAc,GAAG,kBACnC,SAAS,KAAK,GAAG,cAAc,GAAG,mBACpC,QACH,OAAO,qBAAqB,OAAO,KAAK,QAAQ,KAAK;KAKtD,KAAK,KACR,QAAQ;EAAK;;EAA8B,YAAY;IAAM;KAE1D,SAAS,GAAG,mCACL,WAAW,IAAI,KACvB,EAAE,OACC,QAAQ,qBAAqB;YAUxB,4BACA,WAAW,UAAU,SAAS,QAAQ,IAAI;qBAkBzC,oBAMX,QAAQ,iBACL"}
|
package/dist/client.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { Rustrak } from "./generated/sdk.gen.mjs";
|
|
|
4
4
|
import { Err, Ok } from "./result.mjs";
|
|
5
5
|
import { createFetch, isTransportFailure, transformHttpError } from "./utils/http.mjs";
|
|
6
6
|
import { ZodError } from "zod";
|
|
7
|
-
|
|
7
|
+
// src/client.ts
|
|
8
8
|
const BINARY = /* @__PURE__ */ new Set(["events.downloadAttachment"]);
|
|
9
9
|
/**
|
|
10
10
|
* Main Rustrak API client. Every method returns a `Result`; nothing throws for
|
|
@@ -82,7 +82,6 @@ function toResult({ data, error, response }) {
|
|
|
82
82
|
});
|
|
83
83
|
throw error;
|
|
84
84
|
}
|
|
85
|
-
//#endregion
|
|
86
85
|
export { RustrakClient };
|
|
87
86
|
|
|
88
87
|
//# sourceMappingURL=client.mjs.map
|
package/dist/config.d.cts
CHANGED
package/dist/config.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.cts","names":[],"sources":["../src/config.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.cts","names":[],"sources":["../src/config.ts"],"mappings":"A,iBAGiB;EAKf;EAOA;EAMA;EAMA;EAKA,UAAU"}
|
package/dist/config.d.mts
CHANGED
package/dist/config.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../src/config.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../src/config.ts"],"mappings":"A,iBAGiB;EAKf;EAOA;EAMA;EAMA;EAKA,UAAU"}
|
package/dist/errors.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/errors.ts
|
|
2
2
|
/**
|
|
3
3
|
* Every `code` a {@link FieldError} may carry, mirroring the `FieldErrorCode`
|
|
4
4
|
* enum in `apps/server/src/error.rs`.
|
|
@@ -42,7 +42,6 @@ const TIMEOUT_ERROR_MESSAGE = "The request timed out.";
|
|
|
42
42
|
function isRetryable(error) {
|
|
43
43
|
return error.kind === "network" || error.kind === "server_error" || error.kind === "rate_limited";
|
|
44
44
|
}
|
|
45
|
-
//#endregion
|
|
46
45
|
exports.FIELD_ERROR_CODES = FIELD_ERROR_CODES;
|
|
47
46
|
exports.NETWORK_ERROR_MESSAGE = NETWORK_ERROR_MESSAGE;
|
|
48
47
|
exports.SERVER_ERROR_MESSAGE = SERVER_ERROR_MESSAGE;
|
package/dist/errors.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/errors.d.ts
|
|
2
1
|
export type RustrakError = {
|
|
3
2
|
readonly kind: 'validation';
|
|
4
3
|
readonly status: number;
|
|
@@ -73,5 +72,4 @@ export declare const SERVER_ERROR_MESSAGE = "The server failed to handle the req
|
|
|
73
72
|
export declare const NETWORK_ERROR_MESSAGE = "The request could not reach the server.";
|
|
74
73
|
export declare const TIMEOUT_ERROR_MESSAGE = "The request timed out.";
|
|
75
74
|
export declare function isRetryable(error: RustrakError): boolean;
|
|
76
|
-
//#endregion
|
|
77
75
|
//# sourceMappingURL=errors.d.cts.map
|
package/dist/errors.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.cts","names":[],"sources":["../src/errors.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.d.cts","names":[],"sources":["../src/errors.ts"],"mappings":"A,YAuBY;WAQG;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WACA,kBAAkB;;WASlB;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WAEA;WACA,kBAAkB;;WAYlB;WACA;WACA;WACA,kBAAkB;;WAMlB;WAAkC;;WAWlC;WACA;WACA;WACA;;WAmBA;WACA;WAEA;;WAQA;WAAmC;;YAGtC,mBAAmB;qBAalB;YAUD,yBAAyB;YAyBzB;WACD;WACA,MAAM;WACN;;qBAOE;qBAQA;qBAGA;wBASG,YAAY,OAAO"}
|
package/dist/errors.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/errors.d.ts
|
|
2
1
|
export type RustrakError = {
|
|
3
2
|
readonly kind: 'validation';
|
|
4
3
|
readonly status: number;
|
|
@@ -73,5 +72,4 @@ export declare const SERVER_ERROR_MESSAGE = "The server failed to handle the req
|
|
|
73
72
|
export declare const NETWORK_ERROR_MESSAGE = "The request could not reach the server.";
|
|
74
73
|
export declare const TIMEOUT_ERROR_MESSAGE = "The request timed out.";
|
|
75
74
|
export declare function isRetryable(error: RustrakError): boolean;
|
|
76
|
-
//#endregion
|
|
77
75
|
//# sourceMappingURL=errors.d.mts.map
|
package/dist/errors.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.mts","names":[],"sources":["../src/errors.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.d.mts","names":[],"sources":["../src/errors.ts"],"mappings":"A,YAuBY;WAQG;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WACA,kBAAkB;;WASlB;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WACA,kBAAkB;;WAIlB;WACA;WACA;WAEA;WACA,kBAAkB;;WAYlB;WACA;WACA;WACA,kBAAkB;;WAMlB;WAAkC;;WAWlC;WACA;WACA;WACA;;WAmBA;WACA;WAEA;;WAQA;WAAmC;;YAGtC,mBAAmB;qBAalB;YAUD,yBAAyB;YAyBzB;WACD;WACA,MAAM;WACN;;qBAOE;qBAQA;qBAGA;wBASG,YAAY,OAAO"}
|
package/dist/errors.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/errors.ts
|
|
2
2
|
/**
|
|
3
3
|
* Every `code` a {@link FieldError} may carry, mirroring the `FieldErrorCode`
|
|
4
4
|
* enum in `apps/server/src/error.rs`.
|
|
@@ -42,7 +42,6 @@ const TIMEOUT_ERROR_MESSAGE = "The request timed out.";
|
|
|
42
42
|
function isRetryable(error) {
|
|
43
43
|
return error.kind === "network" || error.kind === "server_error" || error.kind === "rate_limited";
|
|
44
44
|
}
|
|
45
|
-
//#endregion
|
|
46
45
|
export { FIELD_ERROR_CODES, NETWORK_ERROR_MESSAGE, SERVER_ERROR_MESSAGE, TIMEOUT_ERROR_MESSAGE, isRetryable };
|
|
47
46
|
|
|
48
47
|
//# sourceMappingURL=errors.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_serverSentEvents_gen = require("../core/serverSentEvents.gen.cjs");
|
|
2
2
|
const require_utils_gen = require("../core/utils.gen.cjs");
|
|
3
3
|
const require_utils_gen$1 = require("./utils.gen.cjs");
|
|
4
|
-
|
|
4
|
+
// src/generated/client/client.gen.ts
|
|
5
5
|
const createClient = (config = {}) => {
|
|
6
6
|
let _config = require_utils_gen$1.mergeConfigs(require_utils_gen$1.createConfig(), config);
|
|
7
7
|
const getConfig = () => ({ ..._config });
|
|
@@ -168,7 +168,6 @@ const createClient = (config = {}) => {
|
|
|
168
168
|
trace: makeMethodFn("TRACE")
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
|
-
//#endregion
|
|
172
171
|
exports.createClient = createClient;
|
|
173
172
|
|
|
174
173
|
//# sourceMappingURL=client.gen.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSseClient } from "../core/serverSentEvents.gen.mjs";
|
|
2
2
|
import { getValidRequestBody } from "../core/utils.gen.mjs";
|
|
3
3
|
import { buildUrl, createConfig, createInterceptors, getParseAs, mergeConfigs, mergeHeaders, setAuthParams } from "./utils.gen.mjs";
|
|
4
|
-
|
|
4
|
+
// src/generated/client/client.gen.ts
|
|
5
5
|
const createClient = (config = {}) => {
|
|
6
6
|
let _config = mergeConfigs(createConfig(), config);
|
|
7
7
|
const getConfig = () => ({ ..._config });
|
|
@@ -168,7 +168,6 @@ const createClient = (config = {}) => {
|
|
|
168
168
|
trace: makeMethodFn("TRACE")
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
|
-
//#endregion
|
|
172
171
|
export { createClient };
|
|
173
172
|
|
|
174
173
|
//# sourceMappingURL=client.gen.mjs.map
|
|
@@ -2,7 +2,6 @@ import { Auth } from "../core/auth.gen.cjs";
|
|
|
2
2
|
import { Client as Client$1, Config as Config$1 } from "../core/types.gen.cjs";
|
|
3
3
|
import { ServerSentEventsOptions, ServerSentEventsResult } from "../core/serverSentEvents.gen.cjs";
|
|
4
4
|
import { Middleware } from "./utils.gen.cjs";
|
|
5
|
-
//#region src/generated/client/types.gen.d.ts
|
|
6
5
|
export type ResponseStyle = 'data' | 'fields';
|
|
7
6
|
export interface Config<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
|
|
8
7
|
baseUrl?: T['baseUrl'];
|
|
@@ -66,6 +65,5 @@ export interface TDataShape {
|
|
|
66
65
|
}
|
|
67
66
|
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
68
67
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
69
|
-
//#endregion
|
|
70
68
|
export {};
|
|
71
69
|
//# sourceMappingURL=types.gen.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.gen.d.cts","names":["CoreConfig","CoreClient"],"sources":["../../../src/generated/client/types.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.gen.d.cts","names":["CoreConfig","CoreClient"],"sources":["../../../src/generated/client/types.gen.ts"],"mappings":";;;;YAUY;iBAEK,OAAO,UAAU,gBAAgB,uBACxC,KAAK,6CAA6CA;EAI1D,UAAU;EAOV,eAAe;EAOf;EASA;EAMA,gBAAgB;EAMhB,eAAe;;iBAGA,eACf,iBACA,uBAAuB,0BACvB,wCACA,qCAGE;EACE,eAAe;EACf,cAAc;IAEhB,KACE,wBAAwB;EAa5B;EACA,OAAO;EACP,QAAQ;EAIR,WAAW,cAAc;EACzB,KAAK;;iBAGU,uBACf,uBAAuB,0BACvB,wCACA,qCACQ,wBAAwB,gBAAgB,cAAc;EAC9D,SAAS;EACT;;YAGU,cACV,iBACA,kBACA,wCACA,uBAAuB,4BACrB,4BACA,QACE,gCACI,cAAc,0BACZ,YAAY,SACZ;EAEA,MAAM,cAAc,0BAA0B,YAAY,SAAS;EACnE,SAAS;EACT,UAAU;KAGlB,QACE,iCACK,cAAc,0BAA0B,YAAY,SAAS;EAGxD,MAAM,cAAc,0BAA0B,YAAY,SAAS;EACnE;;EAGA;EACA,OAAO,eAAe,0BAA0B,aAAa,UAAU;;EAI3E,UAAU;EAEV,WAAW;;iBAIN;EACf;EACA,gBAAgB;EAChB;;KAGG,YACH,iBACA,kBACA,sCACA,uBAAuB,0BAEvB,SAAS,KAAK,eAAe,OAAO,gBAAgB,6BACjD,cAAc,OAAO,QAAQ,cAAc;KAE3C,SACH,iBAEA,mBACA,sCACA,uBAAuB,0BAEvB,SAAS,KAAK,sBAAsB,gBAAgB,6BACjD,QAAQ,uBAAuB;KAE/B,aACH,iBACA,kBACA,sCACA,uBAAuB,0BAEvB,SAAS,KAAK,eAAe,OAAO,gBAAgB,2BAClD,KAAK,SAAS,eAAe,OAAO,gBAAgB,8BACnD,cAAc,OAAO,QAAQ,cAAc;KAE3C,cACH;EACE;EACA,OAAO;EACP,QAAQ;EACR;GAGF,SAAS,QAAQ,QAAQ;YAGf,SAASC,SAAW,WAAW,QAAQ,UAAU,YAAY;EACvE,cAAc,WAAW,SAAS,mBAAmB;;iBAetC;EACf;EACA;EACA;EACA;EACA;;KAGG,SAAS,GAAG,KAAK,KAAK,GAAG,cAAc,GAAG;YAEnC,QACV,cAAc,aAAa,YAC3B,wCACA,qBACA,uBAAuB,4BACrB,SACF,eAAe,WAAW,gBAAgB,sDAGxC,mCAAmC,KAAK"}
|
|
@@ -2,7 +2,6 @@ import { Auth } from "../core/auth.gen.mjs";
|
|
|
2
2
|
import { Client as Client$1, Config as Config$1 } from "../core/types.gen.mjs";
|
|
3
3
|
import { ServerSentEventsOptions, ServerSentEventsResult } from "../core/serverSentEvents.gen.mjs";
|
|
4
4
|
import { Middleware } from "./utils.gen.mjs";
|
|
5
|
-
//#region src/generated/client/types.gen.d.ts
|
|
6
5
|
export type ResponseStyle = 'data' | 'fields';
|
|
7
6
|
export interface Config<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
|
|
8
7
|
baseUrl?: T['baseUrl'];
|
|
@@ -66,6 +65,5 @@ export interface TDataShape {
|
|
|
66
65
|
}
|
|
67
66
|
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
68
67
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
69
|
-
//#endregion
|
|
70
68
|
export {};
|
|
71
69
|
//# sourceMappingURL=types.gen.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.gen.d.mts","names":["CoreConfig","CoreClient"],"sources":["../../../src/generated/client/types.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.gen.d.mts","names":["CoreConfig","CoreClient"],"sources":["../../../src/generated/client/types.gen.ts"],"mappings":";;;;YAUY;iBAEK,OAAO,UAAU,gBAAgB,uBACxC,KAAK,6CAA6CA;EAI1D,UAAU;EAOV,eAAe;EAOf;EASA;EAMA,gBAAgB;EAMhB,eAAe;;iBAGA,eACf,iBACA,uBAAuB,0BACvB,wCACA,qCAGE;EACE,eAAe;EACf,cAAc;IAEhB,KACE,wBAAwB;EAa5B;EACA,OAAO;EACP,QAAQ;EAIR,WAAW,cAAc;EACzB,KAAK;;iBAGU,uBACf,uBAAuB,0BACvB,wCACA,qCACQ,wBAAwB,gBAAgB,cAAc;EAC9D,SAAS;EACT;;YAGU,cACV,iBACA,kBACA,wCACA,uBAAuB,4BACrB,4BACA,QACE,gCACI,cAAc,0BACZ,YAAY,SACZ;EAEA,MAAM,cAAc,0BAA0B,YAAY,SAAS;EACnE,SAAS;EACT,UAAU;KAGlB,QACE,iCACK,cAAc,0BAA0B,YAAY,SAAS;EAGxD,MAAM,cAAc,0BAA0B,YAAY,SAAS;EACnE;;EAGA;EACA,OAAO,eAAe,0BAA0B,aAAa,UAAU;;EAI3E,UAAU;EAEV,WAAW;;iBAIN;EACf;EACA,gBAAgB;EAChB;;KAGG,YACH,iBACA,kBACA,sCACA,uBAAuB,0BAEvB,SAAS,KAAK,eAAe,OAAO,gBAAgB,6BACjD,cAAc,OAAO,QAAQ,cAAc;KAE3C,SACH,iBAEA,mBACA,sCACA,uBAAuB,0BAEvB,SAAS,KAAK,sBAAsB,gBAAgB,6BACjD,QAAQ,uBAAuB;KAE/B,aACH,iBACA,kBACA,sCACA,uBAAuB,0BAEvB,SAAS,KAAK,eAAe,OAAO,gBAAgB,2BAClD,KAAK,SAAS,eAAe,OAAO,gBAAgB,8BACnD,cAAc,OAAO,QAAQ,cAAc;KAE3C,cACH;EACE;EACA,OAAO;EACP,QAAQ;EACR;GAGF,SAAS,QAAQ,QAAQ;YAGf,SAASC,SAAW,WAAW,QAAQ,UAAU,YAAY;EACvE,cAAc,WAAW,SAAS,mBAAmB;;iBAetC;EACf;EACA;EACA;EACA;EACA;;KAGG,SAAS,GAAG,KAAK,KAAK,GAAG,cAAc,GAAG;YAEnC,QACV,cAAc,aAAa,YAC3B,wCACA,qBACA,uBAAuB,4BACrB,SACF,eAAe,WAAW,gBAAgB,sDAGxC,mCAAmC,KAAK"}
|
|
@@ -2,7 +2,7 @@ const require_bodySerializer_gen = require("../core/bodySerializer.gen.cjs");
|
|
|
2
2
|
const require_pathSerializer_gen = require("../core/pathSerializer.gen.cjs");
|
|
3
3
|
const require_utils_gen = require("../core/utils.gen.cjs");
|
|
4
4
|
const require_auth_gen = require("../core/auth.gen.cjs");
|
|
5
|
-
|
|
5
|
+
// src/generated/client/utils.gen.ts
|
|
6
6
|
const createQuerySerializer = ({ parameters = {}, ...args } = {}) => {
|
|
7
7
|
const querySerializer = (queryParams) => {
|
|
8
8
|
const search = [];
|
|
@@ -171,7 +171,6 @@ const createConfig = (override = {}) => ({
|
|
|
171
171
|
querySerializer: defaultQuerySerializer,
|
|
172
172
|
...override
|
|
173
173
|
});
|
|
174
|
-
//#endregion
|
|
175
174
|
exports.buildUrl = buildUrl;
|
|
176
175
|
exports.createConfig = createConfig;
|
|
177
176
|
exports.createInterceptors = createInterceptors;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/generated/client/utils.gen.d.ts
|
|
2
1
|
type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res | undefined, request: Req | undefined, options: Options) => Err | Promise<Err>;
|
|
3
2
|
type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
4
3
|
type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
@@ -16,6 +15,5 @@ export interface Middleware<Req, Res, Err, Options> {
|
|
|
16
15
|
request: Interceptors<ReqInterceptor<Req, Options>>;
|
|
17
16
|
response: Interceptors<ResInterceptor<Res, Req, Options>>;
|
|
18
17
|
}
|
|
19
|
-
//#endregion
|
|
20
18
|
export {};
|
|
21
19
|
//# sourceMappingURL=utils.gen.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.gen.d.cts","names":[],"sources":["../../../src/generated/client/utils.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.gen.d.cts","names":[],"sources":["../../../src/generated/client/utils.gen.ts"],"mappings":"A,KAwNK,eAAe,KAAK,KAAK,KAAK,YACjC,OAAO,KAEP,UAAU,iBAEV,SAAS,iBACT,SAAS,YACN,MAAM,QAAQ;KAEd,eAAe,KAAK,YAAY,SAAS,KAAK,SAAS,YAAY,MAAM,QAAQ;KAEjF,eAAe,KAAK,KAAK,YAC5B,UAAU,KACV,SAAS,KACT,SAAS,YACN,MAAM,QAAQ;cAEb,aAAa;EACjB,KAAK,MAAM;EAEX;EAIA,MAAM,aAAa;EAOnB,OAAO,aAAa;EAKpB,oBAAoB,aAAa;EAOjC,OAAO,aAAa,aAAa,IAAI,uBAAuB;EAS5D,IAAI,IAAI;;iBAMO,WAAW,KAAK,KAAK,KAAK;EACzC,OAAO,aAAa,eAAe,KAAK,KAAK,KAAK;EAClD,SAAS,aAAa,eAAe,KAAK;EAC1C,UAAU,aAAa,eAAe,KAAK,KAAK"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/generated/client/utils.gen.d.ts
|
|
2
1
|
type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res | undefined, request: Req | undefined, options: Options) => Err | Promise<Err>;
|
|
3
2
|
type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
4
3
|
type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
@@ -16,6 +15,5 @@ export interface Middleware<Req, Res, Err, Options> {
|
|
|
16
15
|
request: Interceptors<ReqInterceptor<Req, Options>>;
|
|
17
16
|
response: Interceptors<ResInterceptor<Res, Req, Options>>;
|
|
18
17
|
}
|
|
19
|
-
//#endregion
|
|
20
18
|
export {};
|
|
21
19
|
//# sourceMappingURL=utils.gen.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.gen.d.mts","names":[],"sources":["../../../src/generated/client/utils.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.gen.d.mts","names":[],"sources":["../../../src/generated/client/utils.gen.ts"],"mappings":"A,KAwNK,eAAe,KAAK,KAAK,KAAK,YACjC,OAAO,KAEP,UAAU,iBAEV,SAAS,iBACT,SAAS,YACN,MAAM,QAAQ;KAEd,eAAe,KAAK,YAAY,SAAS,KAAK,SAAS,YAAY,MAAM,QAAQ;KAEjF,eAAe,KAAK,KAAK,YAC5B,UAAU,KACV,SAAS,KACT,SAAS,YACN,MAAM,QAAQ;cAEb,aAAa;EACjB,KAAK,MAAM;EAEX;EAIA,MAAM,aAAa;EAOnB,OAAO,aAAa;EAKpB,oBAAoB,aAAa;EAOjC,OAAO,aAAa,aAAa,IAAI,uBAAuB;EAS5D,IAAI,IAAI;;iBAMO,WAAW,KAAK,KAAK,KAAK;EACzC,OAAO,aAAa,eAAe,KAAK,KAAK,KAAK;EAClD,SAAS,aAAa,eAAe,KAAK;EAC1C,UAAU,aAAa,eAAe,KAAK,KAAK"}
|
|
@@ -2,7 +2,7 @@ import { jsonBodySerializer } from "../core/bodySerializer.gen.mjs";
|
|
|
2
2
|
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam } from "../core/pathSerializer.gen.mjs";
|
|
3
3
|
import { getUrl } from "../core/utils.gen.mjs";
|
|
4
4
|
import { getAuthToken } from "../core/auth.gen.mjs";
|
|
5
|
-
|
|
5
|
+
// src/generated/client/utils.gen.ts
|
|
6
6
|
const createQuerySerializer = ({ parameters = {}, ...args } = {}) => {
|
|
7
7
|
const querySerializer = (queryParams) => {
|
|
8
8
|
const search = [];
|
|
@@ -171,7 +171,6 @@ const createConfig = (override = {}) => ({
|
|
|
171
171
|
querySerializer: defaultQuerySerializer,
|
|
172
172
|
...override
|
|
173
173
|
});
|
|
174
|
-
//#endregion
|
|
175
174
|
export { buildUrl, createConfig, createInterceptors, createQuerySerializer, getParseAs, mergeConfigs, mergeHeaders, setAuthParams };
|
|
176
175
|
|
|
177
176
|
//# sourceMappingURL=utils.gen.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const require_utils_gen = require("./client/utils.gen.cjs");
|
|
2
|
-
|
|
2
|
+
// src/generated/client.gen.ts
|
|
3
3
|
const client = require("./client/client.gen.cjs").createClient(require_utils_gen.createConfig({ baseUrl: "/" }));
|
|
4
|
-
//#endregion
|
|
5
4
|
exports.client = client;
|
|
6
5
|
|
|
7
6
|
//# sourceMappingURL=client.gen.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.gen.cjs","names":["createClient","createConfig"],"sources":["../../src/generated/client.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;\n\nexport const client: Client = createClient(createConfig<ClientOptions2>({ baseUrl: '/' }));\n"],"mappings":";;AAeA,MAAa,
|
|
1
|
+
{"version":3,"file":"client.gen.cjs","names":["createClient","createConfig"],"sources":["../../src/generated/client.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport { type Client, type ClientOptions, type Config, createClient, createConfig } from './client/index.js';\nimport type { ClientOptions as ClientOptions2 } from './types.gen.js';\n\n/**\n * The `createClientConfig()` function will be called on client initialization\n * and the returned object will become the client's initial configuration.\n *\n * You may want to initialize your client this way instead of calling\n * `setConfig()`. This is useful for example if you're using Next.js\n * to ensure your client always has the correct values.\n */\nexport type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;\n\nexport const client: Client = createClient(createConfig<ClientOptions2>({ baseUrl: '/' }));\n"],"mappings":";;AAeA,MAAa,S,iCAAiBA,CAAAA,CAAAA,aAAaC,kBAAAA,aAA6B,EAAE,SAAS,IAAI,CAAC,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createConfig } from "./client/utils.gen.mjs";
|
|
2
2
|
import { createClient } from "./client/client.gen.mjs";
|
|
3
|
-
|
|
3
|
+
// src/generated/client.gen.ts
|
|
4
4
|
const client = createClient(createConfig({ baseUrl: "/" }));
|
|
5
|
-
//#endregion
|
|
6
5
|
export { client };
|
|
7
6
|
|
|
8
7
|
//# sourceMappingURL=client.gen.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/generated/core/auth.gen.ts
|
|
2
2
|
const getAuthToken = async (auth, callback) => {
|
|
3
3
|
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
4
4
|
if (!token) return;
|
|
@@ -6,7 +6,6 @@ const getAuthToken = async (auth, callback) => {
|
|
|
6
6
|
if (auth.scheme === "basic") return `Basic ${btoa(token)}`;
|
|
7
7
|
return token;
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
exports.getAuthToken = getAuthToken;
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=auth.gen.cjs.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/generated/core/auth.gen.d.ts
|
|
2
1
|
export type AuthToken = string | undefined;
|
|
3
2
|
export interface Auth {
|
|
4
3
|
in?: 'header' | 'query' | 'cookie';
|
|
@@ -7,5 +6,4 @@ export interface Auth {
|
|
|
7
6
|
scheme?: 'basic' | 'bearer';
|
|
8
7
|
type: 'apiKey' | 'http';
|
|
9
8
|
}
|
|
10
|
-
//#endregion
|
|
11
9
|
//# sourceMappingURL=auth.gen.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.gen.d.cts","names":[],"sources":["../../../src/generated/core/auth.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.gen.d.cts","names":[],"sources":["../../../src/generated/core/auth.gen.ts"],"mappings":"A,YAEY;iBAEK;EAMf;EAOA;EAMA;EACA;EACA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/generated/core/auth.gen.d.ts
|
|
2
1
|
export type AuthToken = string | undefined;
|
|
3
2
|
export interface Auth {
|
|
4
3
|
in?: 'header' | 'query' | 'cookie';
|
|
@@ -7,5 +6,4 @@ export interface Auth {
|
|
|
7
6
|
scheme?: 'basic' | 'bearer';
|
|
8
7
|
type: 'apiKey' | 'http';
|
|
9
8
|
}
|
|
10
|
-
//#endregion
|
|
11
9
|
//# sourceMappingURL=auth.gen.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.gen.d.mts","names":[],"sources":["../../../src/generated/core/auth.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.gen.d.mts","names":[],"sources":["../../../src/generated/core/auth.gen.ts"],"mappings":"A,YAEY;iBAEK;EAMf;EAOA;EAMA;EACA;EACA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/generated/core/auth.gen.ts
|
|
2
2
|
const getAuthToken = async (auth, callback) => {
|
|
3
3
|
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
4
4
|
if (!token) return;
|
|
@@ -6,7 +6,6 @@ const getAuthToken = async (auth, callback) => {
|
|
|
6
6
|
if (auth.scheme === "basic") return `Basic ${btoa(token)}`;
|
|
7
7
|
return token;
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { getAuthToken };
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=auth.gen.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/generated/core/bodySerializer.gen.ts
|
|
2
2
|
const serializeFormDataPair = (data, key, value) => {
|
|
3
3
|
if (typeof value === "string" || value instanceof Blob) data.append(key, value);
|
|
4
4
|
else if (value instanceof Date) data.append(key, value.toISOString());
|
|
@@ -14,7 +14,6 @@ const formDataBodySerializer = { bodySerializer: (body) => {
|
|
|
14
14
|
return data;
|
|
15
15
|
} };
|
|
16
16
|
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
17
|
-
//#endregion
|
|
18
17
|
exports.formDataBodySerializer = formDataBodySerializer;
|
|
19
18
|
exports.jsonBodySerializer = jsonBodySerializer;
|
|
20
19
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ArrayStyle, ObjectStyle, SerializerOptions } from "./pathSerializer.gen.cjs";
|
|
2
|
-
//#region src/generated/core/bodySerializer.gen.d.ts
|
|
3
2
|
export type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
4
3
|
export type BodySerializer = (body: unknown) => unknown;
|
|
5
4
|
type QuerySerializerOptionsObject = {
|
|
@@ -10,6 +9,5 @@ type QuerySerializerOptionsObject = {
|
|
|
10
9
|
export type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
11
10
|
parameters?: Record<string, QuerySerializerOptionsObject>;
|
|
12
11
|
};
|
|
13
|
-
//#endregion
|
|
14
12
|
export {};
|
|
15
13
|
//# sourceMappingURL=bodySerializer.gen.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bodySerializer.gen.d.cts","names":[],"sources":["../../../src/generated/core/bodySerializer.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"bodySerializer.gen.d.cts","names":[],"sources":["../../../src/generated/core/bodySerializer.gen.ts"],"mappings":";YAIY,mBAAmB,OAAO;YAE1B,kBAAkB;KAEzB;EACH;EACA,QAAQ,QAAQ,kBAAkB;EAClC,SAAS,QAAQ,kBAAkB;;YAGzB,yBAAyB;EAKnC,aAAa,eAAe"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ArrayStyle, ObjectStyle, SerializerOptions } from "./pathSerializer.gen.mjs";
|
|
2
|
-
//#region src/generated/core/bodySerializer.gen.d.ts
|
|
3
2
|
export type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
4
3
|
export type BodySerializer = (body: unknown) => unknown;
|
|
5
4
|
type QuerySerializerOptionsObject = {
|
|
@@ -10,6 +9,5 @@ type QuerySerializerOptionsObject = {
|
|
|
10
9
|
export type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
11
10
|
parameters?: Record<string, QuerySerializerOptionsObject>;
|
|
12
11
|
};
|
|
13
|
-
//#endregion
|
|
14
12
|
export {};
|
|
15
13
|
//# sourceMappingURL=bodySerializer.gen.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bodySerializer.gen.d.mts","names":[],"sources":["../../../src/generated/core/bodySerializer.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"bodySerializer.gen.d.mts","names":[],"sources":["../../../src/generated/core/bodySerializer.gen.ts"],"mappings":";YAIY,mBAAmB,OAAO;YAE1B,kBAAkB;KAEzB;EACH;EACA,QAAQ,QAAQ,kBAAkB;EAClC,SAAS,QAAQ,kBAAkB;;YAGzB,yBAAyB;EAKnC,aAAa,eAAe"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/generated/core/bodySerializer.gen.ts
|
|
2
2
|
const serializeFormDataPair = (data, key, value) => {
|
|
3
3
|
if (typeof value === "string" || value instanceof Blob) data.append(key, value);
|
|
4
4
|
else if (value instanceof Date) data.append(key, value.toISOString());
|
|
@@ -14,7 +14,6 @@ const formDataBodySerializer = { bodySerializer: (body) => {
|
|
|
14
14
|
return data;
|
|
15
15
|
} };
|
|
16
16
|
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
17
|
-
//#endregion
|
|
18
17
|
export { formDataBodySerializer, jsonBodySerializer };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=bodySerializer.gen.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/generated/core/pathSerializer.gen.ts
|
|
2
2
|
const separatorArrayExplode = (style) => {
|
|
3
3
|
switch (style) {
|
|
4
4
|
case "label": return ".";
|
|
@@ -76,7 +76,6 @@ const serializeObjectParam = ({ allowReserved, explode, name, style, value, valu
|
|
|
76
76
|
})).join(separator);
|
|
77
77
|
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
78
78
|
};
|
|
79
|
-
//#endregion
|
|
80
79
|
exports.separatorArrayExplode = separatorArrayExplode;
|
|
81
80
|
exports.separatorArrayNoExplode = separatorArrayNoExplode;
|
|
82
81
|
exports.separatorObjectExplode = separatorObjectExplode;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
//#region src/generated/core/pathSerializer.gen.d.ts
|
|
2
1
|
export interface SerializerOptions<T> {
|
|
3
2
|
explode: boolean;
|
|
4
3
|
style: T;
|
|
5
4
|
}
|
|
6
5
|
export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
7
6
|
export type ObjectStyle = 'form' | 'deepObject';
|
|
8
|
-
//#endregion
|
|
9
7
|
//# sourceMappingURL=pathSerializer.gen.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathSerializer.gen.d.cts","names":[],"sources":["../../../src/generated/core/pathSerializer.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"pathSerializer.gen.d.cts","names":[],"sources":["../../../src/generated/core/pathSerializer.gen.ts"],"mappings":"A,iBASiB,kBAAkB;EAIjC;EACA,OAAO;;YAGG;YAGA"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
//#region src/generated/core/pathSerializer.gen.d.ts
|
|
2
1
|
export interface SerializerOptions<T> {
|
|
3
2
|
explode: boolean;
|
|
4
3
|
style: T;
|
|
5
4
|
}
|
|
6
5
|
export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
7
6
|
export type ObjectStyle = 'form' | 'deepObject';
|
|
8
|
-
//#endregion
|
|
9
7
|
//# sourceMappingURL=pathSerializer.gen.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathSerializer.gen.d.mts","names":[],"sources":["../../../src/generated/core/pathSerializer.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"pathSerializer.gen.d.mts","names":[],"sources":["../../../src/generated/core/pathSerializer.gen.ts"],"mappings":"A,iBASiB,kBAAkB;EAIjC;EACA,OAAO;;YAGG;YAGA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/generated/core/pathSerializer.gen.ts
|
|
2
2
|
const separatorArrayExplode = (style) => {
|
|
3
3
|
switch (style) {
|
|
4
4
|
case "label": return ".";
|
|
@@ -76,7 +76,6 @@ const serializeObjectParam = ({ allowReserved, explode, name, style, value, valu
|
|
|
76
76
|
})).join(separator);
|
|
77
77
|
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
78
78
|
};
|
|
79
|
-
//#endregion
|
|
80
79
|
export { separatorArrayExplode, separatorArrayNoExplode, separatorObjectExplode, serializeArrayParam, serializeObjectParam, serializePrimitiveParam };
|
|
81
80
|
|
|
82
81
|
//# sourceMappingURL=pathSerializer.gen.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/generated/core/serverSentEvents.gen.ts
|
|
2
2
|
function createSseClient({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) {
|
|
3
3
|
let lastEventId;
|
|
4
4
|
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
@@ -90,7 +90,6 @@ function createSseClient({ onRequest, onSseError, onSseEvent, responseTransforme
|
|
|
90
90
|
};
|
|
91
91
|
return { stream: createStream() };
|
|
92
92
|
}
|
|
93
|
-
//#endregion
|
|
94
93
|
exports.createSseClient = createSseClient;
|
|
95
94
|
|
|
96
95
|
//# sourceMappingURL=serverSentEvents.gen.cjs.map
|