schemantic 0.1.0 → 0.2.1
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/CHANGELOG.md +70 -3
- package/README.md +17 -14
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +24 -14
- package/dist/cli/index.js.map +1 -1
- package/dist/core/schemantic.d.ts.map +1 -1
- package/dist/core/schemantic.js +61 -13
- package/dist/core/schemantic.js.map +1 -1
- package/dist/generators/api-client-generator.d.ts.map +1 -1
- package/dist/generators/api-client-generator.js +24 -4
- package/dist/generators/api-client-generator.js.map +1 -1
- package/dist/generators/hook-generator.d.ts.map +1 -1
- package/dist/generators/hook-generator.js +56 -6
- package/dist/generators/hook-generator.js.map +1 -1
- package/dist/lib/api/api-client.d.ts +71 -0
- package/dist/lib/api/api-client.d.ts.map +1 -0
- package/dist/lib/api/api-client.js +238 -0
- package/dist/lib/api/api-client.js.map +1 -0
- package/dist/lib/api/barrel.d.ts +4 -0
- package/dist/lib/api/barrel.d.ts.map +1 -0
- package/dist/lib/api/barrel.js +26 -0
- package/dist/lib/api/barrel.js.map +1 -0
- package/dist/lib/api/hooks.d.ts +36 -0
- package/dist/lib/api/hooks.d.ts.map +1 -0
- package/dist/lib/api/hooks.js +120 -0
- package/dist/lib/api/hooks.js.map +1 -0
- package/dist/lib/api/index.d.ts +4 -0
- package/dist/lib/api/index.d.ts.map +1 -0
- package/dist/lib/api/index.js +8 -0
- package/dist/lib/api/index.js.map +1 -0
- package/dist/lib/api/types.d.ts +366 -0
- package/dist/lib/api/types.d.ts.map +1 -0
- package/dist/lib/api/types.js +315 -0
- package/dist/lib/api/types.js.map +1 -0
- package/dist/plugins/branded-types.js +1 -1
- package/dist/plugins/builtin.d.ts.map +1 -1
- package/dist/plugins/builtin.js +13 -6
- package/dist/plugins/builtin.js.map +1 -1
- package/dist/plugins/performance-monitoring.js +1 -1
- package/dist/plugins/request-deduplication.js +1 -1
- package/dist/plugins/zod-validation.d.ts +2 -1
- package/dist/plugins/zod-validation.d.ts.map +1 -1
- package/dist/plugins/zod-validation.js +66 -30
- package/dist/plugins/zod-validation.js.map +1 -1
- package/docs/CONFIGURATION.md +4 -4
- package/docs/FASTAPI_TUTORIAL.md +1497 -1497
- package/docs/PLUGINS.md +4 -0
- package/docs/PLUGIN_DEVELOPMENT.md +720 -720
- package/package.json +11 -6
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.validateResponse = exports.validateRequest = exports.ApiClientError = exports.ImageManipulationApiClient = void 0;
|
|
18
|
+
// Barrel exports for schemantic generated code
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
20
|
+
var api_client_1 = require("./api-client");
|
|
21
|
+
Object.defineProperty(exports, "ImageManipulationApiClient", { enumerable: true, get: function () { return api_client_1.ImageManipulationApiClient; } });
|
|
22
|
+
Object.defineProperty(exports, "ApiClientError", { enumerable: true, get: function () { return api_client_1.ApiClientError; } });
|
|
23
|
+
Object.defineProperty(exports, "validateRequest", { enumerable: true, get: function () { return api_client_1.validateRequest; } });
|
|
24
|
+
Object.defineProperty(exports, "validateResponse", { enumerable: true, get: function () { return api_client_1.validateResponse; } });
|
|
25
|
+
__exportStar(require("./hooks"), exports);
|
|
26
|
+
//# sourceMappingURL=barrel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"barrel.js","sourceRoot":"","sources":["../../../src/lib/api/barrel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA+C;AAC/C,0CAAwB;AACxB,2CAA6G;AAApG,wHAAA,0BAA0B,OAAA;AAAE,4GAAA,cAAc,OAAA;AAAE,6GAAA,eAAe,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AACtF,0CAAwB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ImageManipulationApiClient } from './api-client';
|
|
2
|
+
export declare function createApiHooks(client: ImageManipulationApiClient): {
|
|
3
|
+
useHealthCheckHealthGetQuery: (requestInit?: RequestInit) => {
|
|
4
|
+
data: any;
|
|
5
|
+
error: any;
|
|
6
|
+
loading: any;
|
|
7
|
+
refetch: any;
|
|
8
|
+
};
|
|
9
|
+
useConvertImageConvertPostMutation: () => {
|
|
10
|
+
mutate: any;
|
|
11
|
+
data: any;
|
|
12
|
+
error: any;
|
|
13
|
+
loading: any;
|
|
14
|
+
reset: any;
|
|
15
|
+
};
|
|
16
|
+
useBatchConvertImagesConvertBatchPostMutation: () => {
|
|
17
|
+
mutate: any;
|
|
18
|
+
data: any;
|
|
19
|
+
error: any;
|
|
20
|
+
loading: any;
|
|
21
|
+
reset: any;
|
|
22
|
+
};
|
|
23
|
+
useListFormatsConvertFormatsGetQuery: (requestInit?: RequestInit) => {
|
|
24
|
+
data: any;
|
|
25
|
+
error: any;
|
|
26
|
+
loading: any;
|
|
27
|
+
refetch: any;
|
|
28
|
+
};
|
|
29
|
+
useRootGetQuery: (requestInit?: RequestInit) => {
|
|
30
|
+
data: any;
|
|
31
|
+
error: any;
|
|
32
|
+
loading: any;
|
|
33
|
+
refetch: any;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/lib/api/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAkB,MAAM,cAAc,CAAC;AAE1E,wBAAgB,cAAc,CAAC,MAAM,EAAE,0BAA0B;iDACX,WAAW;;;;;;;;;;;;;;;;;;;;yDA6CH,WAAW;;;;;;oCAehC,WAAW;;;;;;EAgBnD"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createApiHooks = createApiHooks;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function createApiHooks(client) {
|
|
6
|
+
function useHealthCheckHealthGetQuery(requestInit) {
|
|
7
|
+
const [data, setData] = (0, react_1.useState)(undefined);
|
|
8
|
+
const [error, setError] = (0, react_1.useState)(undefined);
|
|
9
|
+
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
10
|
+
const fetcher = (0, react_1.useCallback)(async () => {
|
|
11
|
+
setLoading(true);
|
|
12
|
+
setError(undefined);
|
|
13
|
+
try {
|
|
14
|
+
const result = await client.healthCheckHealthGet(requestInit);
|
|
15
|
+
setData(result);
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
setError(e);
|
|
19
|
+
}
|
|
20
|
+
finally {
|
|
21
|
+
setLoading(false);
|
|
22
|
+
}
|
|
23
|
+
}, [client, requestInit]);
|
|
24
|
+
(0, react_1.useEffect)(() => { void fetcher(); }, [fetcher]);
|
|
25
|
+
const refetch = (0, react_1.useCallback)(fetcher, [fetcher]);
|
|
26
|
+
return { data, error, loading, refetch };
|
|
27
|
+
}
|
|
28
|
+
function useConvertImageConvertPostMutation() {
|
|
29
|
+
const [data, setData] = (0, react_1.useState)(undefined);
|
|
30
|
+
const [error, setError] = (0, react_1.useState)(undefined);
|
|
31
|
+
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
32
|
+
const mutate = (0, react_1.useCallback)(async (payload, requestInit) => {
|
|
33
|
+
setLoading(true);
|
|
34
|
+
setError(undefined);
|
|
35
|
+
try {
|
|
36
|
+
const result = await client.convertImageConvertPost(payload.body, requestInit);
|
|
37
|
+
setData(result);
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
setError(e);
|
|
42
|
+
throw e;
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
setLoading(false);
|
|
46
|
+
}
|
|
47
|
+
}, [client]);
|
|
48
|
+
const reset = (0, react_1.useCallback)(() => { setData(undefined); setError(undefined); setLoading(false); }, []);
|
|
49
|
+
return { mutate, data, error, loading, reset };
|
|
50
|
+
}
|
|
51
|
+
function useBatchConvertImagesConvertBatchPostMutation() {
|
|
52
|
+
const [data, setData] = (0, react_1.useState)(undefined);
|
|
53
|
+
const [error, setError] = (0, react_1.useState)(undefined);
|
|
54
|
+
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
55
|
+
const mutate = (0, react_1.useCallback)(async (payload, requestInit) => {
|
|
56
|
+
setLoading(true);
|
|
57
|
+
setError(undefined);
|
|
58
|
+
try {
|
|
59
|
+
const result = await client.batchConvertImagesConvertBatchPost(payload.body, requestInit);
|
|
60
|
+
setData(result);
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
setError(e);
|
|
65
|
+
throw e;
|
|
66
|
+
}
|
|
67
|
+
finally {
|
|
68
|
+
setLoading(false);
|
|
69
|
+
}
|
|
70
|
+
}, [client]);
|
|
71
|
+
const reset = (0, react_1.useCallback)(() => { setData(undefined); setError(undefined); setLoading(false); }, []);
|
|
72
|
+
return { mutate, data, error, loading, reset };
|
|
73
|
+
}
|
|
74
|
+
function useListFormatsConvertFormatsGetQuery(requestInit) {
|
|
75
|
+
const [data, setData] = (0, react_1.useState)(undefined);
|
|
76
|
+
const [error, setError] = (0, react_1.useState)(undefined);
|
|
77
|
+
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
78
|
+
const fetcher = (0, react_1.useCallback)(async () => {
|
|
79
|
+
setLoading(true);
|
|
80
|
+
setError(undefined);
|
|
81
|
+
try {
|
|
82
|
+
const result = await client.listFormatsConvertFormatsGet(requestInit);
|
|
83
|
+
setData(result);
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
setError(e);
|
|
87
|
+
}
|
|
88
|
+
finally {
|
|
89
|
+
setLoading(false);
|
|
90
|
+
}
|
|
91
|
+
}, [client, requestInit]);
|
|
92
|
+
(0, react_1.useEffect)(() => { void fetcher(); }, [fetcher]);
|
|
93
|
+
const refetch = (0, react_1.useCallback)(fetcher, [fetcher]);
|
|
94
|
+
return { data, error, loading, refetch };
|
|
95
|
+
}
|
|
96
|
+
function useRootGetQuery(requestInit) {
|
|
97
|
+
const [data, setData] = (0, react_1.useState)(undefined);
|
|
98
|
+
const [error, setError] = (0, react_1.useState)(undefined);
|
|
99
|
+
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
100
|
+
const fetcher = (0, react_1.useCallback)(async () => {
|
|
101
|
+
setLoading(true);
|
|
102
|
+
setError(undefined);
|
|
103
|
+
try {
|
|
104
|
+
const result = await client.rootGet(requestInit);
|
|
105
|
+
setData(result);
|
|
106
|
+
}
|
|
107
|
+
catch (e) {
|
|
108
|
+
setError(e);
|
|
109
|
+
}
|
|
110
|
+
finally {
|
|
111
|
+
setLoading(false);
|
|
112
|
+
}
|
|
113
|
+
}, [client, requestInit]);
|
|
114
|
+
(0, react_1.useEffect)(() => { void fetcher(); }, [fetcher]);
|
|
115
|
+
const refetch = (0, react_1.useCallback)(fetcher, [fetcher]);
|
|
116
|
+
return { data, error, loading, refetch };
|
|
117
|
+
}
|
|
118
|
+
return { useHealthCheckHealthGetQuery, useConvertImageConvertPostMutation, useBatchConvertImagesConvertBatchPostMutation, useListFormatsConvertFormatsGetQuery, useRootGetQuery };
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/lib/api/hooks.ts"],"names":[],"mappings":";;AAIA,wCA6EC;AAhFD,iCAA0E;AAG1E,SAAgB,cAAc,CAAC,MAAkC;IAC/D,SAAS,4BAA4B,CAAC,WAAyB;QAC7D,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAA6B,SAAS,CAAC,CAAC;QACxE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAA6B,SAAS,CAAC,CAAC;QAC1E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;QAC9C,MAAM,OAAO,GAAG,IAAA,mBAAW,EAAC,KAAK,IAAI,EAAE;YACrC,UAAU,CAAC,IAAI,CAAC,CAAC;YAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC;gBAC9D,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBAAC,QAAQ,CAAC,CAAmB,CAAC,CAAC;YAAC,CAAC;oBAAS,CAAC;gBAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAAC,CAAC;QAC/E,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;QAC1B,IAAA,iBAAS,EAAC,GAAG,EAAE,GAAG,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,IAAA,mBAAW,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,SAAS,CAAC,CAAC;QAC1E,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;QAC9C,MAAM,OAAO,GAAG,IAAA,mBAAW,EAAC,KAAK,IAAI,EAAE;YACrC,UAAU,CAAC,IAAI,CAAC,CAAC;YAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;gBACjD,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBAAC,QAAQ,CAAC,CAAmB,CAAC,CAAC;YAAC,CAAC;oBAAS,CAAC;gBAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAAC,CAAC;QAC/E,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;QAC1B,IAAA,iBAAS,EAAC,GAAG,EAAE,GAAG,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,IAAA,mBAAW,EAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;QAChD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC3C,CAAC;IACD,OAAO,EAAE,4BAA4B,EAAE,kCAAkC,EAAE,6CAA6C,EAAE,oCAAoC,EAAE,eAAe,EAAE,CAAC;AACpL,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { BodyBatchConvertImagesConvertBatchPost, BrandedBodyBatchConvertImagesConvertBatchPost, BodyBatchConvertImagesConvertBatchPostSchema, validateBodyBatchConvertImagesConvertBatchPost, parseBodyBatchConvertImagesConvertBatchPost, isBodyBatchConvertImagesConvertBatchPost, BodyConvertImageConvertPost, BrandedBodyConvertImageConvertPost, BodyConvertImageConvertPostSchema, validateBodyConvertImageConvertPost, parseBodyConvertImageConvertPost, isBodyConvertImageConvertPost, HTTPValidationError, BrandedHTTPValidationError, HTTPValidationErrorSchema, validateHTTPValidationError, parseHTTPValidationError, isHTTPValidationError, HealthResponse, BrandedHealthResponse, HealthResponseSchema, validateHealthResponse, parseHealthResponse, isHealthResponse, ImageFormat, ImageFormatValues, BrandedImageFormat, ImageFormatSchema, validateImageFormat, parseImageFormat, isImageFormat, ValidationError, BrandedValidationError, ValidationErrorSchema, validateValidationError, parseValidationError, isValidationError } from './types';
|
|
2
|
+
export { ImageManipulationApiClient } from './api-client';
|
|
3
|
+
export { createApiHooks } from './hooks';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/api/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sCAAsC,EAAE,6CAA6C,EAAE,4CAA4C,EAAE,8CAA8C,EAAE,2CAA2C,EAAE,wCAAwC,EAAE,2BAA2B,EAAE,kCAAkC,EAAE,iCAAiC,EAAE,mCAAmC,EAAE,gCAAgC,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,cAAc,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACzgC,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createApiHooks = exports.ImageManipulationApiClient = void 0;
|
|
4
|
+
var api_client_1 = require("./api-client");
|
|
5
|
+
Object.defineProperty(exports, "ImageManipulationApiClient", { enumerable: true, get: function () { return api_client_1.ImageManipulationApiClient; } });
|
|
6
|
+
var hooks_1 = require("./hooks");
|
|
7
|
+
Object.defineProperty(exports, "createApiHooks", { enumerable: true, get: function () { return hooks_1.createApiHooks; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/api/index.ts"],"names":[],"mappings":";;;AACA,2CAA0D;AAAjD,wHAAA,0BAA0B,OAAA;AACnC,iCAAyC;AAAhC,uGAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Supported image formats with their canonical extensions.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ImageFormat {
|
|
6
|
+
PNG = "png",
|
|
7
|
+
JPEG = "jpeg",
|
|
8
|
+
JPG = "jpg",
|
|
9
|
+
WEBP = "webp",
|
|
10
|
+
AVIF = "avif",
|
|
11
|
+
TIFF = "tiff",
|
|
12
|
+
TIF = "tif",
|
|
13
|
+
ICO = "ico",
|
|
14
|
+
HEIC = "heic",
|
|
15
|
+
HEIF = "heif",
|
|
16
|
+
BMP = "bmp",
|
|
17
|
+
SVG = "svg"
|
|
18
|
+
}
|
|
19
|
+
export type ImageFormatValues = "png" | "jpeg" | "jpg" | "webp" | "avif" | "tiff" | "tif" | "ico" | "heic" | "heif" | "bmp" | "svg";
|
|
20
|
+
/**
|
|
21
|
+
* Zod validation schema for ImageFormat
|
|
22
|
+
*/
|
|
23
|
+
export declare const ImageFormatSchema: z.ZodEnum<{
|
|
24
|
+
png: "png";
|
|
25
|
+
jpeg: "jpeg";
|
|
26
|
+
jpg: "jpg";
|
|
27
|
+
webp: "webp";
|
|
28
|
+
avif: "avif";
|
|
29
|
+
tiff: "tiff";
|
|
30
|
+
tif: "tif";
|
|
31
|
+
ico: "ico";
|
|
32
|
+
heic: "heic";
|
|
33
|
+
heif: "heif";
|
|
34
|
+
bmp: "bmp";
|
|
35
|
+
svg: "svg";
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Validate ImageFormat data with detailed error reporting
|
|
39
|
+
*/
|
|
40
|
+
export declare function validateImageFormat(data: unknown): {
|
|
41
|
+
success: true;
|
|
42
|
+
data: ImageFormat;
|
|
43
|
+
} | {
|
|
44
|
+
success: false;
|
|
45
|
+
errors: string[];
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Parse ImageFormat data with exception on validation failure
|
|
49
|
+
*/
|
|
50
|
+
export declare function parseImageFormat(data: unknown): ImageFormat;
|
|
51
|
+
/**
|
|
52
|
+
* Branded type for ImageFormat with compile-time guarantees
|
|
53
|
+
*/
|
|
54
|
+
export type BrandedImageFormat = ImageFormat & {
|
|
55
|
+
__brand: 'ImageFormat';
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Create a branded ImageFormat instance
|
|
59
|
+
*/
|
|
60
|
+
export declare function createBrandedImageFormat(data: ImageFormat): BrandedImageFormat;
|
|
61
|
+
/**
|
|
62
|
+
* Runtime type guard for ImageFormat
|
|
63
|
+
*/
|
|
64
|
+
export declare function isImageFormat(value: unknown): value is ImageFormat;
|
|
65
|
+
/**
|
|
66
|
+
* Type definition for Body_batch_convert_images_convert_batch_post
|
|
67
|
+
*/
|
|
68
|
+
export interface BodyBatchConvertImagesConvertBatchPost {
|
|
69
|
+
/**
|
|
70
|
+
* Image files to convert
|
|
71
|
+
*/
|
|
72
|
+
files: string[];
|
|
73
|
+
targetFormat: ImageFormat;
|
|
74
|
+
/**
|
|
75
|
+
* Quality (1-100) for lossy formats
|
|
76
|
+
*/
|
|
77
|
+
quality?: number | null | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Preserve original filenames
|
|
80
|
+
*/
|
|
81
|
+
preserveNames?: boolean | undefined;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Zod validation schema for BodyBatchConvertImagesConvertBatchPost
|
|
85
|
+
*/
|
|
86
|
+
export declare const BodyBatchConvertImagesConvertBatchPostSchema: z.ZodPipe<z.ZodObject<{
|
|
87
|
+
files: z.ZodArray<z.ZodString>;
|
|
88
|
+
target_format: z.ZodEnum<{
|
|
89
|
+
png: "png";
|
|
90
|
+
jpeg: "jpeg";
|
|
91
|
+
jpg: "jpg";
|
|
92
|
+
webp: "webp";
|
|
93
|
+
avif: "avif";
|
|
94
|
+
tiff: "tiff";
|
|
95
|
+
tif: "tif";
|
|
96
|
+
ico: "ico";
|
|
97
|
+
heic: "heic";
|
|
98
|
+
heif: "heif";
|
|
99
|
+
bmp: "bmp";
|
|
100
|
+
svg: "svg";
|
|
101
|
+
}>;
|
|
102
|
+
quality: z.ZodOptional<z.ZodUnknown>;
|
|
103
|
+
preserve_names: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
105
|
+
targetFormat: unknown;
|
|
106
|
+
preserveNames: unknown;
|
|
107
|
+
}, {
|
|
108
|
+
files: string[];
|
|
109
|
+
target_format: "png" | "jpeg" | "jpg" | "webp" | "avif" | "tiff" | "tif" | "ico" | "heic" | "heif" | "bmp" | "svg";
|
|
110
|
+
quality?: unknown;
|
|
111
|
+
preserve_names?: boolean | undefined;
|
|
112
|
+
}>>;
|
|
113
|
+
/**
|
|
114
|
+
* Validate BodyBatchConvertImagesConvertBatchPost data with detailed error reporting
|
|
115
|
+
*/
|
|
116
|
+
export declare function validateBodyBatchConvertImagesConvertBatchPost(data: unknown): {
|
|
117
|
+
success: true;
|
|
118
|
+
data: BodyBatchConvertImagesConvertBatchPost;
|
|
119
|
+
} | {
|
|
120
|
+
success: false;
|
|
121
|
+
errors: string[];
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Parse BodyBatchConvertImagesConvertBatchPost data with exception on validation failure
|
|
125
|
+
*/
|
|
126
|
+
export declare function parseBodyBatchConvertImagesConvertBatchPost(data: unknown): BodyBatchConvertImagesConvertBatchPost;
|
|
127
|
+
/**
|
|
128
|
+
* Branded type for BodyBatchConvertImagesConvertBatchPost with compile-time guarantees
|
|
129
|
+
*/
|
|
130
|
+
export type BrandedBodyBatchConvertImagesConvertBatchPost = BodyBatchConvertImagesConvertBatchPost & {
|
|
131
|
+
__brand: 'BodyBatchConvertImagesConvertBatchPost';
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Create a branded BodyBatchConvertImagesConvertBatchPost instance
|
|
135
|
+
*/
|
|
136
|
+
export declare function createBrandedBodyBatchConvertImagesConvertBatchPost(data: BodyBatchConvertImagesConvertBatchPost): BrandedBodyBatchConvertImagesConvertBatchPost;
|
|
137
|
+
/**
|
|
138
|
+
* Runtime type guard for BodyBatchConvertImagesConvertBatchPost
|
|
139
|
+
*/
|
|
140
|
+
export declare function isBodyBatchConvertImagesConvertBatchPost(value: unknown): value is BodyBatchConvertImagesConvertBatchPost;
|
|
141
|
+
/**
|
|
142
|
+
* Type definition for Body_convert_image_convert__post
|
|
143
|
+
*/
|
|
144
|
+
export interface BodyConvertImageConvertPost {
|
|
145
|
+
/**
|
|
146
|
+
* Image file to convert
|
|
147
|
+
*/
|
|
148
|
+
file: string;
|
|
149
|
+
targetFormat: ImageFormat;
|
|
150
|
+
/**
|
|
151
|
+
* Quality (1-100) for lossy formats
|
|
152
|
+
*/
|
|
153
|
+
quality?: number | null | undefined;
|
|
154
|
+
/**
|
|
155
|
+
* Target width in pixels
|
|
156
|
+
*/
|
|
157
|
+
width?: number | null | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* Target height in pixels
|
|
160
|
+
*/
|
|
161
|
+
height?: number | null | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* DPI for SVG-to-raster conversion
|
|
164
|
+
*/
|
|
165
|
+
dpi?: number | null | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* Scale factor for SVG-to-raster
|
|
168
|
+
*/
|
|
169
|
+
scale?: number | null | undefined;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Zod validation schema for BodyConvertImageConvertPost
|
|
173
|
+
*/
|
|
174
|
+
export declare const BodyConvertImageConvertPostSchema: z.ZodPipe<z.ZodObject<{
|
|
175
|
+
file: z.ZodString;
|
|
176
|
+
target_format: z.ZodEnum<{
|
|
177
|
+
png: "png";
|
|
178
|
+
jpeg: "jpeg";
|
|
179
|
+
jpg: "jpg";
|
|
180
|
+
webp: "webp";
|
|
181
|
+
avif: "avif";
|
|
182
|
+
tiff: "tiff";
|
|
183
|
+
tif: "tif";
|
|
184
|
+
ico: "ico";
|
|
185
|
+
heic: "heic";
|
|
186
|
+
heif: "heif";
|
|
187
|
+
bmp: "bmp";
|
|
188
|
+
svg: "svg";
|
|
189
|
+
}>;
|
|
190
|
+
quality: z.ZodOptional<z.ZodUnknown>;
|
|
191
|
+
width: z.ZodOptional<z.ZodUnknown>;
|
|
192
|
+
height: z.ZodOptional<z.ZodUnknown>;
|
|
193
|
+
dpi: z.ZodOptional<z.ZodUnknown>;
|
|
194
|
+
scale: z.ZodOptional<z.ZodUnknown>;
|
|
195
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
196
|
+
targetFormat: unknown;
|
|
197
|
+
}, {
|
|
198
|
+
file: string;
|
|
199
|
+
target_format: "png" | "jpeg" | "jpg" | "webp" | "avif" | "tiff" | "tif" | "ico" | "heic" | "heif" | "bmp" | "svg";
|
|
200
|
+
quality?: unknown;
|
|
201
|
+
width?: unknown;
|
|
202
|
+
height?: unknown;
|
|
203
|
+
dpi?: unknown;
|
|
204
|
+
scale?: unknown;
|
|
205
|
+
}>>;
|
|
206
|
+
/**
|
|
207
|
+
* Validate BodyConvertImageConvertPost data with detailed error reporting
|
|
208
|
+
*/
|
|
209
|
+
export declare function validateBodyConvertImageConvertPost(data: unknown): {
|
|
210
|
+
success: true;
|
|
211
|
+
data: BodyConvertImageConvertPost;
|
|
212
|
+
} | {
|
|
213
|
+
success: false;
|
|
214
|
+
errors: string[];
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Parse BodyConvertImageConvertPost data with exception on validation failure
|
|
218
|
+
*/
|
|
219
|
+
export declare function parseBodyConvertImageConvertPost(data: unknown): BodyConvertImageConvertPost;
|
|
220
|
+
/**
|
|
221
|
+
* Branded type for BodyConvertImageConvertPost with compile-time guarantees
|
|
222
|
+
*/
|
|
223
|
+
export type BrandedBodyConvertImageConvertPost = BodyConvertImageConvertPost & {
|
|
224
|
+
__brand: 'BodyConvertImageConvertPost';
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Create a branded BodyConvertImageConvertPost instance
|
|
228
|
+
*/
|
|
229
|
+
export declare function createBrandedBodyConvertImageConvertPost(data: BodyConvertImageConvertPost): BrandedBodyConvertImageConvertPost;
|
|
230
|
+
/**
|
|
231
|
+
* Runtime type guard for BodyConvertImageConvertPost
|
|
232
|
+
*/
|
|
233
|
+
export declare function isBodyConvertImageConvertPost(value: unknown): value is BodyConvertImageConvertPost;
|
|
234
|
+
/**
|
|
235
|
+
* Type definition for ValidationError
|
|
236
|
+
*/
|
|
237
|
+
export interface ValidationError {
|
|
238
|
+
loc: string | number[];
|
|
239
|
+
msg: string;
|
|
240
|
+
type: string;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Zod validation schema for ValidationError
|
|
244
|
+
*/
|
|
245
|
+
export declare const ValidationErrorSchema: z.ZodObject<{
|
|
246
|
+
loc: z.ZodArray<z.ZodUnknown>;
|
|
247
|
+
msg: z.ZodString;
|
|
248
|
+
type: z.ZodString;
|
|
249
|
+
}, z.core.$strict>;
|
|
250
|
+
/**
|
|
251
|
+
* Validate ValidationError data with detailed error reporting
|
|
252
|
+
*/
|
|
253
|
+
export declare function validateValidationError(data: unknown): {
|
|
254
|
+
success: true;
|
|
255
|
+
data: ValidationError;
|
|
256
|
+
} | {
|
|
257
|
+
success: false;
|
|
258
|
+
errors: string[];
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* Parse ValidationError data with exception on validation failure
|
|
262
|
+
*/
|
|
263
|
+
export declare function parseValidationError(data: unknown): ValidationError;
|
|
264
|
+
/**
|
|
265
|
+
* Branded type for ValidationError with compile-time guarantees
|
|
266
|
+
*/
|
|
267
|
+
export type BrandedValidationError = ValidationError & {
|
|
268
|
+
__brand: 'ValidationError';
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* Create a branded ValidationError instance
|
|
272
|
+
*/
|
|
273
|
+
export declare function createBrandedValidationError(data: ValidationError): BrandedValidationError;
|
|
274
|
+
/**
|
|
275
|
+
* Runtime type guard for ValidationError
|
|
276
|
+
*/
|
|
277
|
+
export declare function isValidationError(value: unknown): value is ValidationError;
|
|
278
|
+
/**
|
|
279
|
+
* Type definition for HTTPValidationError
|
|
280
|
+
*/
|
|
281
|
+
export interface HTTPValidationError {
|
|
282
|
+
detail?: ValidationError[] | undefined;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Zod validation schema for HTTPValidationError
|
|
286
|
+
*/
|
|
287
|
+
export declare const HTTPValidationErrorSchema: z.ZodObject<{
|
|
288
|
+
detail: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
289
|
+
loc: z.ZodArray<z.ZodUnknown>;
|
|
290
|
+
msg: z.ZodString;
|
|
291
|
+
type: z.ZodString;
|
|
292
|
+
}, z.core.$strict>>>;
|
|
293
|
+
}, z.core.$strict>;
|
|
294
|
+
/**
|
|
295
|
+
* Validate HTTPValidationError data with detailed error reporting
|
|
296
|
+
*/
|
|
297
|
+
export declare function validateHTTPValidationError(data: unknown): {
|
|
298
|
+
success: true;
|
|
299
|
+
data: HTTPValidationError;
|
|
300
|
+
} | {
|
|
301
|
+
success: false;
|
|
302
|
+
errors: string[];
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* Parse HTTPValidationError data with exception on validation failure
|
|
306
|
+
*/
|
|
307
|
+
export declare function parseHTTPValidationError(data: unknown): HTTPValidationError;
|
|
308
|
+
/**
|
|
309
|
+
* Branded type for HTTPValidationError with compile-time guarantees
|
|
310
|
+
*/
|
|
311
|
+
export type BrandedHTTPValidationError = HTTPValidationError & {
|
|
312
|
+
__brand: 'HTTPValidationError';
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* Create a branded HTTPValidationError instance
|
|
316
|
+
*/
|
|
317
|
+
export declare function createBrandedHTTPValidationError(data: HTTPValidationError): BrandedHTTPValidationError;
|
|
318
|
+
/**
|
|
319
|
+
* Runtime type guard for HTTPValidationError
|
|
320
|
+
*/
|
|
321
|
+
export declare function isHTTPValidationError(value: unknown): value is HTTPValidationError;
|
|
322
|
+
/**
|
|
323
|
+
* Health check response schema.
|
|
324
|
+
*/
|
|
325
|
+
export interface HealthResponse {
|
|
326
|
+
status: string;
|
|
327
|
+
version: string;
|
|
328
|
+
environment: string;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Zod validation schema for HealthResponse
|
|
332
|
+
*/
|
|
333
|
+
export declare const HealthResponseSchema: z.ZodObject<{
|
|
334
|
+
status: z.ZodString;
|
|
335
|
+
version: z.ZodString;
|
|
336
|
+
environment: z.ZodString;
|
|
337
|
+
}, z.core.$strict>;
|
|
338
|
+
/**
|
|
339
|
+
* Validate HealthResponse data with detailed error reporting
|
|
340
|
+
*/
|
|
341
|
+
export declare function validateHealthResponse(data: unknown): {
|
|
342
|
+
success: true;
|
|
343
|
+
data: HealthResponse;
|
|
344
|
+
} | {
|
|
345
|
+
success: false;
|
|
346
|
+
errors: string[];
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* Parse HealthResponse data with exception on validation failure
|
|
350
|
+
*/
|
|
351
|
+
export declare function parseHealthResponse(data: unknown): HealthResponse;
|
|
352
|
+
/**
|
|
353
|
+
* Branded type for HealthResponse with compile-time guarantees
|
|
354
|
+
*/
|
|
355
|
+
export type BrandedHealthResponse = HealthResponse & {
|
|
356
|
+
__brand: 'HealthResponse';
|
|
357
|
+
};
|
|
358
|
+
/**
|
|
359
|
+
* Create a branded HealthResponse instance
|
|
360
|
+
*/
|
|
361
|
+
export declare function createBrandedHealthResponse(data: HealthResponse): BrandedHealthResponse;
|
|
362
|
+
/**
|
|
363
|
+
* Runtime type guard for HealthResponse
|
|
364
|
+
*/
|
|
365
|
+
export declare function isHealthResponse(value: unknown): value is HealthResponse;
|
|
366
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,GAAG,QAAQ;CACZ;AACD,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AAGpI;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;EAAqG,CAAC;AAEpI;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAA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