typedapi-client-helpers 0.3.1 → 0.3.3

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +0 -1
  2. package/README.md +6 -7
  3. package/dist/cjs/index.js +0 -4
  4. package/dist/cjs/index.js.map +1 -1
  5. package/dist/cjs/utils/handleApiResponse.js +10 -6
  6. package/dist/cjs/utils/handleApiResponse.js.map +1 -1
  7. package/dist/esm/index.js +0 -4
  8. package/dist/esm/index.js.map +1 -1
  9. package/dist/esm/utils/handleApiResponse.js +10 -6
  10. package/dist/esm/utils/handleApiResponse.js.map +1 -1
  11. package/dist/types/index.d.ts +0 -4
  12. package/dist/types/index.d.ts.map +1 -1
  13. package/dist/types/interfaces/ApiResult.d.ts +1 -1
  14. package/dist/types/interfaces/ApiResult.d.ts.map +1 -1
  15. package/dist/types/types/ApiMethodOptions.d.ts +2 -2
  16. package/dist/types/types/ApiMethodOptions.d.ts.map +1 -1
  17. package/dist/types/utils/handleApiResponse.d.ts +1 -0
  18. package/dist/types/utils/handleApiResponse.d.ts.map +1 -1
  19. package/package.json +2 -1
  20. package/scripts/generate-api-minimal.mjs +30 -1
  21. package/scripts/openapi-generator/index.mjs +7 -26
  22. package/scripts/openapi-generator/method-template.mjs +14 -40
  23. package/scripts/openapi-generator/openapi-utils.mjs +411 -411
  24. package/scripts/openapi-generator/schema.mjs +0 -156
  25. package/dist/cjs/types/ApiMethodArguments.js +0 -3
  26. package/dist/cjs/types/ApiMethodArguments.js.map +0 -1
  27. package/dist/cjs/types/HttpResponse.js +0 -3
  28. package/dist/cjs/types/HttpResponse.js.map +0 -1
  29. package/dist/cjs/utils/extractArgsCallbacksAndParams.js +0 -51
  30. package/dist/cjs/utils/extractArgsCallbacksAndParams.js.map +0 -1
  31. package/dist/cjs/utils/extractArgsToastsAndParams.js +0 -49
  32. package/dist/cjs/utils/extractArgsToastsAndParams.js.map +0 -1
  33. package/dist/cjs/utils/wireMapping.js +0 -123
  34. package/dist/cjs/utils/wireMapping.js.map +0 -1
  35. package/dist/esm/types/ApiMethodArguments.js +0 -2
  36. package/dist/esm/types/ApiMethodArguments.js.map +0 -1
  37. package/dist/esm/types/HttpResponse.js +0 -2
  38. package/dist/esm/types/HttpResponse.js.map +0 -1
  39. package/dist/esm/utils/extractArgsCallbacksAndParams.js +0 -48
  40. package/dist/esm/utils/extractArgsCallbacksAndParams.js.map +0 -1
  41. package/dist/esm/utils/extractArgsToastsAndParams.js +0 -46
  42. package/dist/esm/utils/extractArgsToastsAndParams.js.map +0 -1
  43. package/dist/esm/utils/wireMapping.js +0 -119
  44. package/dist/esm/utils/wireMapping.js.map +0 -1
  45. package/dist/types/types/ApiMethodArguments.d.ts +0 -6
  46. package/dist/types/types/ApiMethodArguments.d.ts.map +0 -1
  47. package/dist/types/types/HttpResponse.d.ts +0 -2
  48. package/dist/types/types/HttpResponse.d.ts.map +0 -1
  49. package/dist/types/utils/extractArgsCallbacksAndParams.d.ts +0 -22
  50. package/dist/types/utils/extractArgsCallbacksAndParams.d.ts.map +0 -1
  51. package/dist/types/utils/extractArgsToastsAndParams.d.ts +0 -20
  52. package/dist/types/utils/extractArgsToastsAndParams.d.ts.map +0 -1
  53. package/dist/types/utils/wireMapping.d.ts +0 -30
  54. package/dist/types/utils/wireMapping.d.ts.map +0 -1
@@ -1,119 +0,0 @@
1
- function isFile(value) {
2
- return typeof File !== "undefined" && value instanceof File;
3
- }
4
- function isBlob(value) {
5
- return typeof Blob !== "undefined" && value instanceof Blob;
6
- }
7
- function isFormData(value) {
8
- return typeof FormData !== "undefined" && value instanceof FormData;
9
- }
10
- function isMappableObject(value) {
11
- if (typeof value !== "object" || value === null || Array.isArray(value))
12
- return false;
13
- if (value instanceof Date || isFile(value) || isBlob(value) || isFormData(value))
14
- return false;
15
- return true;
16
- }
17
- function resolveSchema(schema, registry) {
18
- let current = schema;
19
- const visited = new Set();
20
- while (current?.kind === "ref") {
21
- if (visited.has(current.ref))
22
- return { kind: "identity" };
23
- visited.add(current.ref);
24
- current = registry[current.ref] ?? { kind: "identity" };
25
- }
26
- return current;
27
- }
28
- function mergeObjectSchemas(schema, registry, visitedRefs = new Set()) {
29
- if (schema.kind === "ref") {
30
- if (visitedRefs.has(schema.ref))
31
- return undefined;
32
- const nextVisited = new Set(visitedRefs);
33
- nextVisited.add(schema.ref);
34
- const resolved = registry[schema.ref];
35
- return resolved ? mergeObjectSchemas(resolved, registry, nextVisited) : undefined;
36
- }
37
- if (schema.kind === "object")
38
- return schema;
39
- if (schema.kind !== "allOf" && schema.kind !== "union")
40
- return undefined;
41
- const properties = {};
42
- let additionalProperties;
43
- let foundObject = false;
44
- for (const part of schema.schemas) {
45
- const objectPart = mergeObjectSchemas(part, registry, visitedRefs);
46
- if (!objectPart)
47
- continue;
48
- foundObject = true;
49
- Object.assign(properties, objectPart.properties ?? {});
50
- if (objectPart.additionalProperties !== undefined) {
51
- additionalProperties = objectPart.additionalProperties;
52
- }
53
- }
54
- return foundObject
55
- ? { kind: "object", properties, ...(additionalProperties !== undefined ? { additionalProperties } : {}) }
56
- : undefined;
57
- }
58
- function mapValue(value, schema, registry, direction, seen) {
59
- if (value === null || value === undefined || !schema)
60
- return value;
61
- const resolved = resolveSchema(schema, registry);
62
- if (!resolved || resolved.kind === "identity")
63
- return value;
64
- if (resolved.kind === "array") {
65
- if (!Array.isArray(value))
66
- return value;
67
- const existing = seen.get(value);
68
- if (existing)
69
- return existing;
70
- const output = [];
71
- seen.set(value, output);
72
- for (const item of value) {
73
- output.push(mapValue(item, resolved.items, registry, direction, seen));
74
- }
75
- return output;
76
- }
77
- if (resolved.kind === "allOf" || resolved.kind === "union") {
78
- const merged = mergeObjectSchemas(resolved, registry);
79
- if (merged)
80
- return mapValue(value, merged, registry, direction, seen);
81
- return value;
82
- }
83
- if (!isMappableObject(value))
84
- return value;
85
- const existing = seen.get(value);
86
- if (existing)
87
- return existing;
88
- const output = {};
89
- seen.set(value, output);
90
- const properties = resolved.properties ?? {};
91
- const byWireName = new Map(Object.entries(properties).map(([localName, property]) => [property.wireName, [localName, property]]));
92
- for (const [inputName, inputValue] of Object.entries(value)) {
93
- const propertyEntry = direction === "toWire"
94
- ? properties[inputName]
95
- ? [inputName, properties[inputName]]
96
- : undefined
97
- : byWireName.get(inputName);
98
- if (propertyEntry) {
99
- const [localName, property] = propertyEntry;
100
- const outputName = direction === "toWire" ? property.wireName : localName;
101
- output[outputName] = mapValue(inputValue, property.schema, registry, direction, seen);
102
- continue;
103
- }
104
- const additionalSchema = resolved.additionalProperties === true
105
- ? undefined
106
- : resolved.additionalProperties;
107
- output[inputName] = mapValue(inputValue, additionalSchema, registry, direction, seen);
108
- }
109
- return output;
110
- }
111
- /** Converts generated lower-first member names to their exact OpenAPI wire names. */
112
- export function toWireValue(value, schema, registry = {}) {
113
- return mapValue(value, schema, registry, "toWire", new WeakMap());
114
- }
115
- /** Converts exact OpenAPI wire names to generated lower-first member names. */
116
- export function fromWireValue(value, schema, registry = {}) {
117
- return mapValue(value, schema, registry, "fromWire", new WeakMap());
118
- }
119
- //# sourceMappingURL=wireMapping.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wireMapping.js","sourceRoot":"","sources":["../../../src/utils/wireMapping.ts"],"names":[],"mappings":"AAsBA,SAAS,MAAM,CAAC,KAAc;IAC5B,OAAO,OAAO,IAAI,KAAK,WAAW,IAAI,KAAK,YAAY,IAAI,CAAC;AAC9D,CAAC;AAED,SAAS,MAAM,CAAC,KAAc;IAC5B,OAAO,OAAO,IAAI,KAAK,WAAW,IAAI,KAAK,YAAY,IAAI,CAAC;AAC9D,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,KAAK,YAAY,QAAQ,CAAC;AACtE,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KA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E,IAAI,CAAC,CAAC;IACxF,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,WAAW,CACzB,KAAQ,EACR,MAA8B,EAC9B,WAA+B,EAAE;IAEjC,OAAO,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,OAAO,EAAE,CAAC,CAAC;AACpE,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,aAAa,CAC3B,KAAQ,EACR,MAA8B,EAC9B,WAA+B,EAAE;IAEjC,OAAO,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,OAAO,EAAE,CAAC,CAAC;AACtE,CAAC"}
@@ -1,6 +0,0 @@
1
- import { RuntimeRequestParams } from "./HttpResponse";
2
- export type ApiMethodArguments<TMethod extends (...args: any[]) => unknown, TRequestParams = RuntimeRequestParams> = Parameters<TMethod> extends [
3
- ...infer Arguments,
4
- TRequestParams?
5
- ] ? Arguments : Parameters<TMethod>;
6
- //# sourceMappingURL=ApiMethodArguments.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiMethodArguments.d.ts","sourceRoot":"","sources":["../../../src/types/ApiMethodArguments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,kBAAkB,CAC5B,OAAO,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,EAC3C,cAAc,GAAG,oBAAoB,IAErC,UAAU,CAAC,OAAO,CAAC,SAAS;IAC1B,GAAG,MAAM,SAAS;IAClB,cAAc,CAAC;CAChB,GACG,SAAS,GACT,UAAU,CAAC,OAAO,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export type { HttpResponse, RequestParams, RuntimeRequestParams, } from "../httpClient";
2
- //# sourceMappingURL=HttpResponse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HttpResponse.d.ts","sourceRoot":"","sources":["../../../src/types/HttpResponse.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,aAAa,EACb,oBAAoB,GACrB,MAAM,eAAe,CAAC"}
@@ -1,22 +0,0 @@
1
- import type { ApiErrorHandler, ApiSuccessHandler } from "../types/ApiCallOptions";
2
- import type { RuntimeRequestParams } from "../types/HttpResponse";
3
- /**
4
- * Extracts wrapper arguments in this order:
5
- *
6
- * 1. Original API arguments
7
- * 2. Optional success callback
8
- * 3. Optional error callback
9
- * 4. Optional request params
10
- */
11
- export declare function extractArgsCallbacksAndParams<TArgs extends unknown[], TResponse, _TError = unknown>(argsWithCallbacks: [
12
- ...TArgs,
13
- ApiSuccessHandler<TResponse>?,
14
- ApiErrorHandler<TResponse>?,
15
- RuntimeRequestParams?
16
- ]): {
17
- args: TArgs;
18
- onSuccess?: ApiSuccessHandler<TResponse>;
19
- onError?: ApiErrorHandler<TResponse>;
20
- params?: RuntimeRequestParams;
21
- };
22
- //# sourceMappingURL=extractArgsCallbacksAndParams.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extractArgsCallbacksAndParams.d.ts","sourceRoot":"","sources":["../../../src/utils/extractArgsCallbacksAndParams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAgBlE;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,SAAS,OAAO,EAAE,EACvB,SAAS,EAGT,OAAO,GAAG,OAAO,EAEjB,iBAAiB,EAAE;IACjB,GAAG,KAAK;IACR,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC7B,eAAe,CAAC,SAAS,CAAC,CAAC;IAC3B,oBAAoB,CAAC;CACtB,GACA;IACD,IAAI,EAAE,KAAK,CAAC;IACZ,SAAS,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B,CAkCA"}
@@ -1,20 +0,0 @@
1
- import type { ApiErrorHandler, ApiSuccessHandler } from "../types/ApiCallOptions";
2
- import type { RuntimeRequestParams } from "../types/HttpResponse";
3
- /**
4
- * Extracts wrapper-only arguments in this order:
5
- * original API arguments, onSuccess, onError, request params.
6
- *
7
- * Kept for backwards compatibility with generated files that used toast-oriented naming.
8
- */
9
- export declare function extractArgsToastsAndParams<TArgs extends readonly unknown[], TResponse>(argsWithCallbacks: [
10
- ...TArgs,
11
- ApiSuccessHandler<TResponse>?,
12
- ApiErrorHandler<TResponse>?,
13
- RuntimeRequestParams?
14
- ]): {
15
- args: TArgs;
16
- onSuccess?: ApiSuccessHandler<TResponse>;
17
- onError?: ApiErrorHandler<TResponse>;
18
- params?: RuntimeRequestParams;
19
- };
20
- //# sourceMappingURL=extractArgsToastsAndParams.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extractArgsToastsAndParams.d.ts","sourceRoot":"","sources":["../../../src/utils/extractArgsToastsAndParams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAgBlE;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,SAAS,SAAS,OAAO,EAAE,EAChC,SAAS,EAET,iBAAiB,EAAE;IACjB,GAAG,KAAK;IACR,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC7B,eAAe,CAAC,SAAS,CAAC,CAAC;IAC3B,oBAAoB,CAAC;CACtB,GACA;IACD,IAAI,EAAE,KAAK,CAAC;IACZ,SAAS,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B,CAkCA"}
@@ -1,30 +0,0 @@
1
- /** Describes how generated TypeScript member names map to OpenAPI wire names. */
2
- export type WireSchema = {
3
- readonly kind: "identity";
4
- } | {
5
- readonly kind: "ref";
6
- readonly ref: string;
7
- } | {
8
- readonly kind: "array";
9
- readonly items?: WireSchema;
10
- } | {
11
- readonly kind: "object";
12
- readonly properties?: Readonly<Record<string, WireProperty>>;
13
- readonly additionalProperties?: true | WireSchema;
14
- } | {
15
- readonly kind: "allOf";
16
- readonly schemas: readonly WireSchema[];
17
- } | {
18
- readonly kind: "union";
19
- readonly schemas: readonly WireSchema[];
20
- };
21
- export type WireProperty = {
22
- readonly wireName: string;
23
- readonly schema?: WireSchema;
24
- };
25
- export type WireSchemaRegistry = Readonly<Record<string, WireSchema>>;
26
- /** Converts generated lower-first member names to their exact OpenAPI wire names. */
27
- export declare function toWireValue<T>(value: T, schema: WireSchema | undefined, registry?: WireSchemaRegistry): unknown;
28
- /** Converts exact OpenAPI wire names to generated lower-first member names. */
29
- export declare function fromWireValue<T>(value: T, schema: WireSchema | undefined, registry?: WireSchemaRegistry): unknown;
30
- //# sourceMappingURL=wireMapping.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wireMapping.d.ts","sourceRoot":"","sources":["../../../src/utils/wireMapping.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,GACvD;IACE,QAAQ,CAAC,IAAI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