@povio/openapi-codegen-cli 3.2.3 → 3.2.4-rc.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/README.md CHANGED
@@ -4,9 +4,11 @@
4
4
 
5
5
  **NOTE:** Version 1+ requires zod v4 and is not compatible with zod v3.
6
6
 
7
- **NOTE:** Version 2+ includes supporting classes/types/components for the generated code as well as auth, therefore it has peerDependencies for @tanstack/react-query, axios, react and zod. @casl/ability and @casl/react are also required if you are generating ACL checks and/or using imports from "@povio/openapi-codegen-cli/acl"!
7
+ **NOTE:** The package includes supporting classes, types, components, and auth utilities. Zod is a required peer dependency. Axios, @tanstack/react-query, react, i18next, @casl/ability, @casl/react, and Vite are optional peers; install the ones used by your chosen features.
8
8
 
9
- Use this tool to generate code (Zod schemas, TypeScript types, API definitions, and React queries) from an OpenAPI v3 specification. API definitions are generated to use a REST client wrapper that utilizes Axios. React queries are generated in alignment with our code standards, without the need for explicit types.
9
+ Axios is required when using the Axios transport (the default) or the `/axios` entry point. Projects using the native transport can omit Axios: generate with `--restClient native` and import `NativeRestClient` from `@povio/openapi-codegen-cli/native`. The root exports remain available for compatibility and support tree-shaking in consumer bundles. For direct runtime imports without bundling, use `/native` and `/errors` to avoid loading the Axios client. The `/axios` entry point is also available for Axios-specific imports. CLI-only usage and the `/generator`, `/tiny`, `/vite`, and `/metro` entry points do not require Axios.
10
+
11
+ Use this tool to generate code (Zod schemas, TypeScript types, API definitions, and React queries) from an OpenAPI v3 specification. API definitions use a REST client wrapper with either Axios or the native transport. React queries are generated in alignment with our code standards, without the need for explicit types.
10
12
 
11
13
  The tool partially leverages code from [openapi-zod-client](https://github.com/astahmer/openapi-zod-client) repository.
12
14
 
@@ -33,7 +35,7 @@ The CLI supports TypeScript configuration files to simplify command execution an
33
35
  Create an `openapi-codegen.config.ts` file:
34
36
 
35
37
  ```typescript
36
- import { OpenAPICodegenConfig } from "@povio/openapi-codegen-cli";
38
+ import type { OpenAPICodegenConfig } from "@povio/openapi-codegen-cli";
37
39
 
38
40
  const config: OpenAPICodegenConfig = {
39
41
  input: "http://localhost:4000/docs-json/",
@@ -210,7 +212,7 @@ directly in query callbacks, error boundaries, or their own normalization layer.
210
212
  In order to add interceptors to the used REST client, you must create your own instance of a RestClient and pass your implemented interceptors into the constructor. Make sure to set `restClientImportPath` in your openapi generation configuration too.
211
213
 
212
214
  ```ts
213
- import { RestInterceptor } from "@povio/openapi-codegen-cli";
215
+ import { RestInterceptor } from "@povio/openapi-codegen-cli/axios";
214
216
 
215
217
  import { ACCESS_TOKEN_KEY } from "@/config/jwt.config";
216
218
 
@@ -227,7 +229,7 @@ export const AuthorizationHeaderInterceptor = new RestInterceptor((client) => {
227
229
  ```
228
230
 
229
231
  ```ts
230
- import { RestClient } from "@povio/openapi-codegen-cli";
232
+ import { RestClient } from "@povio/openapi-codegen-cli/axios";
231
233
 
232
234
  import { AuthorizationHeaderInterceptor } from "@/clients/rest/interceptors/authorization-header.interceptor";
233
235
  import { AppConfig } from "@/config/app.config";
@@ -256,7 +258,8 @@ export default config;
256
258
  Set `mutationDefaultOnError: true` in codegen config (or pass `--mutationDefaultOnError`) to let generated mutation hooks fall back to `OpenApiQueryConfig.Provider` when a mutation call does not define its own `onError`.
257
259
 
258
260
  ```tsx
259
- import { ErrorHandler, OpenApiQueryConfig } from "@povio/openapi-codegen-cli";
261
+ import { ErrorHandler } from "@povio/openapi-codegen-cli/errors";
262
+ import { OpenApiQueryConfig } from "@povio/openapi-codegen-cli/query";
260
263
 
261
264
  <OpenApiQueryConfig.Provider
262
265
  onError={(error) => {
@@ -282,7 +285,7 @@ Use `OpenApiQueryConfig.Provider` to allow generated GET query hooks to return i
282
285
  Set `workspaceContext` to a list of param names in codegen config (or pass `--workspaceContext officeId,projectId`) and wrap your app subtree with `OpenApiWorkspaceContext.Provider` if generated hooks frequently repeat workspace-scoped params.
283
286
 
284
287
  ```tsx
285
- import { OpenApiWorkspaceContext } from "@povio/openapi-codegen-cli";
288
+ import { OpenApiWorkspaceContext } from "@povio/openapi-codegen-cli/config";
286
289
  // openapi-codegen.config.ts -> { workspaceContext: ["officeId", "projectId"] }
287
290
 
288
291
  <OpenApiWorkspaceContext.Provider values={{ officeId: "office_123" }}>
@@ -554,3 +557,22 @@ export class JSONDto {
554
557
  nested: NestedDto;
555
558
  }
556
559
  ```
560
+
561
+ ### Runtime import paths
562
+
563
+ Use package subpaths for runtime imports. Pure `import type` imports may use the package root.
564
+
565
+ | Runtime exports | Subpath |
566
+ | --- | --- |
567
+ | `AuthContext`, `AuthGuard` | `/auth` |
568
+ | `AbilityContext`, `useAclCheck`, `Can`, `createAclGuard` | `/acl` |
569
+ | `ErrorHandler`, `SharedErrorHandler`, `ApplicationException`, `DomainErrorRegistry` | `/errors` |
570
+ | `useMutationEffects`, `OpenApiQueryConfig` | `/query` |
571
+ | `OpenApiRouter`, `OpenApiWorkspaceContext`, `useWorkspaceContext`, translation configuration | `/config` |
572
+ | `ZodExtended` | `/zod` |
573
+ | `HttpError`, transport types | `/rest` |
574
+ | `NativeRestClient` | `/native` |
575
+ | `RestClient`, `RestInterceptor` (Axios transport) | `/axios` |
576
+
577
+ For example: `import { AuthContext, AuthGuard } from "@povio/openapi-codegen-cli/auth"`.
578
+ Custom application helpers should import error helpers from `/errors`, `AbilityContext` from `/acl`, and mutation effects from `/query`.
package/dist/acl.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as SharedErrorHandler } from "./error-handling-BeydPL7s.mjs";
1
+ import { i as SharedErrorHandler } from "./error-handling-uS0DgYUR.mjs";
2
2
  import { t as OpenApiRouter } from "./router.context-EPlMBk3G.mjs";
3
3
  import { t as AuthContext } from "./auth.context-COWO6ssl.mjs";
4
4
  import { createContext, useCallback, useMemo } from "react";
package/dist/axios.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as RestClient, t as RestInterceptor } from "./rest-interceptor-D5NCNTm1.mjs";
1
+ import { n as RestClient, t as RestInterceptor } from "./rest-interceptor-Dm9DFErh.mjs";
2
2
  export { RestClient, RestInterceptor };
@@ -37,8 +37,8 @@ let RestUtils;
37
37
  return null;
38
38
  };
39
39
  _RestUtils.extractContentDispositionFilename = (headers) => {
40
- const contentDisposition = headers["content-disposition"];
41
- return contentDisposition ? /filename=["']?([^"';]+)/i.exec(contentDisposition)?.[1] : void 0;
40
+ const contentDisposition = headers instanceof Headers ? headers.get("content-disposition") : headers["content-disposition"];
41
+ return typeof contentDisposition === "string" ? /filename=["']?([^"';]+)/i.exec(contentDisposition)?.[1] : void 0;
42
42
  };
43
43
  })(RestUtils || (RestUtils = {}));
44
44
  //#endregion
package/dist/errors.d.mts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { a as ErrorHandler, c as SharedErrorHandler, i as ErrorEntry, n as DomainErrorEntry, o as ErrorHandlerOptions, r as DomainErrorRegistry, s as GeneralErrorCodes, t as ApplicationException } from "./error-handling-LPEPQV1V.mjs";
2
- import { t as RestUtils } from "./rest.utils-rezWAIYL.mjs";
2
+ import { t as RestUtils } from "./rest.utils-DpiFIdhF.mjs";
3
3
  export { ApplicationException, type DomainErrorEntry, DomainErrorRegistry, type ErrorEntry, ErrorHandler, type ErrorHandlerOptions, type GeneralErrorCodes, RestUtils, SharedErrorHandler };
package/dist/errors.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as RestUtils, i as SharedErrorHandler, n as DomainErrorRegistry, r as ErrorHandler, t as ApplicationException } from "./error-handling-BeydPL7s.mjs";
1
+ import { a as RestUtils, i as SharedErrorHandler, n as DomainErrorRegistry, r as ErrorHandler, t as ApplicationException } from "./error-handling-uS0DgYUR.mjs";
2
2
  export { ApplicationException, DomainErrorRegistry, ErrorHandler, RestUtils, SharedErrorHandler };
@@ -367,6 +367,7 @@ const getNamespaceName = ({ type, tag, options }) => `${capitalize(tag)}${option
367
367
  //#endregion
368
368
  //#region src/generators/const/package.const.ts
369
369
  const PACKAGE_IMPORT_PATH = "@povio/openapi-codegen-cli";
370
+ const AXIOS_PACKAGE_IMPORT_PATH = `${PACKAGE_IMPORT_PATH}/axios`;
370
371
  const NATIVE_PACKAGE_IMPORT_PATH = `${PACKAGE_IMPORT_PATH}/native`;
371
372
  const REST_PACKAGE_IMPORT_PATH = `${PACKAGE_IMPORT_PATH}/rest`;
372
373
  const QUERY_PACKAGE_IMPORT_PATH = `${PACKAGE_IMPORT_PATH}/query`;
@@ -978,7 +979,7 @@ function getQueryModulesImportPath(options) {
978
979
  return `${getImportPath(options)}${QUERY_MODULES_FILE.fileName}`;
979
980
  }
980
981
  function getQueryTypesImportPath(options) {
981
- return options.queryTypesImportPath;
982
+ return options.queryTypesImportPath === "@povio/openapi-codegen-cli" ? QUERY_PACKAGE_IMPORT_PATH : options.queryTypesImportPath;
982
983
  }
983
984
  //#endregion
984
985
  //#region src/generators/utils/ts.utils.ts
@@ -1524,7 +1525,7 @@ function generateFilesFromNativeOpenAPI(source, yaml, options) {
1524
1525
  if (!options.modelsOnly) {
1525
1526
  if (options.acl && nativeData.renderedShared.appAcl) files.push(outputFile(options, "acl/app.ability.ts", nativeData.renderedShared.appAcl));
1526
1527
  if (options.mutationEffects && nativeData.renderedShared.queryModules) files.push(outputFile(options, "queryModules.ts", nativeData.renderedShared.queryModules));
1527
- if (!options.restClientImportPath) files.push(outputFile(options, "app-rest-client.ts", `import { ${options.restClient === "native" ? "NativeRestClient" : "RestClient"} } from "@povio/openapi-codegen-cli${options.restClient === "native" ? "/native" : ""}";\n\nexport const AppRestClient = new ${options.restClient === "native" ? "NativeRestClient" : "RestClient"}({\n config: {\n baseURL: "${nativeData.baseUrl}"\n },\n});\n`));
1528
+ if (!options.restClientImportPath) files.push(outputFile(options, "app-rest-client.ts", `import { ${options.restClient === "native" ? "NativeRestClient" : "RestClient"} } from "@povio/openapi-codegen-cli${options.restClient === "native" ? "/native" : "/axios"}";\n\nexport const AppRestClient = new ${options.restClient === "native" ? "NativeRestClient" : "RestClient"}({\n config: {\n baseURL: "${nativeData.baseUrl}"\n },\n});\n`));
1528
1529
  if (nativeData.renderedShared.domainErrors) files.push(outputFile(options, "domain-errors.ts", nativeData.renderedShared.domainErrors));
1529
1530
  }
1530
1531
  return files;
@@ -1574,7 +1575,7 @@ async function runGenerate({ fileConfig, params, formatGeneratedFile, profiler =
1574
1575
  const nativeFiles = generateFilesFromNativeOpenAPI(nativeInput.source, nativeInput.yaml, config);
1575
1576
  if (nativeFiles) return nativeFiles;
1576
1577
  }
1577
- const { generateCodeFromOpenAPIDoc } = await import("./generateCodeFromOpenAPIDoc-C1L8i0qt.mjs").then((n) => n.n);
1578
+ const { generateCodeFromOpenAPIDoc } = await import("./generateCodeFromOpenAPIDoc-eP5cooBd.mjs").then((n) => n.n);
1578
1579
  return generateCodeFromOpenAPIDoc(openApiDoc, config, profiler, {
1579
1580
  source: nativeInput.source,
1580
1581
  yaml: nativeInput.yaml
@@ -1662,4 +1663,4 @@ function getGenerateStats(filesData, config) {
1662
1663
  };
1663
1664
  }
1664
1665
  //#endregion
1665
- export { getImportedAbilityFunctionName as $, isPrimitiveType as $t, getEndpointsImports as A, NATIVE_RESPONSE_TYPE as An, APP_REST_CLIENT_NAME as At, getPrefetchInfiniteQueryName as B, getMostCommonAdjacentCombinationSplit as Bn, PACKAGE_IMPORT_PATH as Bt, getAppRestClientImportPath as C, ZOD_IMPORT as Cn, getParamZodSchemaName as Ct, getTagFileName as D, AXIOS_REQUEST_CONFIG_TYPE as Dn, isEnumZodSchema as Dt, getQueryTypesImportPath as E, AXIOS_REQUEST_CONFIG_NAME as En, getZodSchemaOperationName as Et, mergeImports as F, isTagIncluded as Fn, QUERY_MODULE_ENUM as Ft, getAbilityConditionType as G, getParameterEnumNames as Gt, getQueryName as H, removeWord as Hn, getNamespaceName as Ht, getImportedInfiniteQueryName as I, shouldInlineEndpointsForTag as In, QUERY_OPTIONS_TYPES as It, getAbilityFunctionName as J, isErrorStatus as Jt, getAbilityConditionsTypes as K, getSchemaNameByRef as Kt, getImportedQueryName as L, camelToSpaceSeparated as Ln, ZOD_EXTENDED as Lt, getInfiniteQueriesImports as M, formatTag as Mn, DOMAIN_ERRORS_FILE as Mt, getModelsImports as N, getEndpointTag as Nn, MUTATION_EFFECTS as Nt, getTagImportPath as O, BODY_PARAMETER_NAME as On, isNamedZodSchema as Ot, getQueriesImports as P, getOperationTag as Pn, QUERY_MODULES_FILE as Pt, getAppAbilitiesType as Q, isPathExcluded as Qt, getInfiniteQueryName as R, capitalize as Rn, CONFIG_PACKAGE_IMPORT_PATH as Rt, getTsTypeBase as S, VOID_SCHEMA as Sn, getEnumZodSchemaName as St, getQueryModulesImportPath as T, AXIOS_IMPORT as Tn, getZodSchemaName as Tt, getQueryOptionsName as U, snakeToCamel as Un, autocorrectRef as Ut, getPrefetchQueryName as V, kebabToCamel as Vn, REST_PACKAGE_IMPORT_PATH as Vt, getAbilityAction as W, Profiler as Wn, escapeControlCharacters as Wt, getAbilitySubjectTypes as X, isMediaTypeAllowed as Xt, getAbilitySubject as Y, isMainResponseStatus as Yt, getAclData as Z, isParamMediaTypeAllowed as Zt, hasEndpointConfig as _, INT_SCHEMA as _n, isReadAllEndpoint as _t, resolveConfig as a, wrapWithQuotesIfNeeded as an, getZodSchemaInferedTypeName as at, requiresBody as b, URL_SCHEMA as bn, invalidVariableNameCharactersToCamel as bt, getDestructuredVariables as c, isReferenceObject as cn, getSchemaDescriptions as ct, isQuery as d, ALLOWED_PATH_IN as dn, DEFAULT_GENERATE_OPTIONS as dt, isSortingParameterObject as en, hasAbilityConditions as et, getEndpointBody as f, ANY_SCHEMA as fn, getPathSegments as ft, getImportedEndpointName as g, ENUM_SCHEMA as gn, isPathSegmentParam as gt, getEndpointPath as h, EMAIL_SCHEMA as hn, isDeleteEndpoint as ht, shouldUseNativeCodegen as i, unwrapQuotesIfNeeded as in, getZodSchemaDescription as it, getImportPath as j, getRequestConfigTypeName as jn, BUILDERS_UTILS as jt, getAclImports as k, JSON_APPLICATION_FORMAT as kn, APP_REST_CLIENT_FILE as kt, isInfiniteQuery as l, isSchemaObject as ln, iterateSchema as lt, getEndpointName as m, DATETIME_SCHEMA as mn, isCreateEndpoint as mt, runGenerate as n, pathToVariableName as nn, getImportedZodSchemaInferedTypeName as nt, getOutputFileName as o, inferRequiredSchema as on, getZodSchemaPropertyDescriptions as ot, getEndpointConfig as p, BLOB_SCHEMA as pn, isBulkDeleteEndpoint as pt, getAbilityDescription as q, getSchemaRef as qt, compileNativeData as r, replaceHyphenatedPath as rn, getImportedZodSchemaName as rt, pick as s, isArraySchemaObject as sn, getZodSchemaType as st, getOpenApiDoc as t, pathParamToVariableName as tn, renderAclCheckCall as tt, isMutation as u, ALLOWED_METHODS as un, getUniqueArray as ut, mapEndpointParamsToFunctionParams as v, NUMBER_SCHEMA as vn, isReadEndpoint as vt, getFileNameWithExtension as w, AXIOS_DEFAULT_IMPORT_NAME as wn, getResponseZodSchemaName as wt, getSchemaTsMetaType as x, UUID_SCHEMA as xn, getBodyZodSchemaName as xt, renderMediaUploadMutationBody as y, STRING_SCHEMA as yn, isUpdateEndpoint as yt, getInfiniteQueryOptionsName as z, decapitalize as zn, NATIVE_PACKAGE_IMPORT_PATH as zt };
1666
+ export { getImportedAbilityFunctionName as $, isPrimitiveType as $t, getEndpointsImports as A, NATIVE_RESPONSE_TYPE as An, APP_REST_CLIENT_NAME as At, getPrefetchInfiniteQueryName as B, getMostCommonAdjacentCombinationSplit as Bn, NATIVE_PACKAGE_IMPORT_PATH as Bt, getAppRestClientImportPath as C, ZOD_IMPORT as Cn, getParamZodSchemaName as Ct, getTagFileName as D, AXIOS_REQUEST_CONFIG_TYPE as Dn, isEnumZodSchema as Dt, getQueryTypesImportPath as E, AXIOS_REQUEST_CONFIG_NAME as En, getZodSchemaOperationName as Et, mergeImports as F, isTagIncluded as Fn, QUERY_MODULE_ENUM as Ft, getAbilityConditionType as G, getParameterEnumNames as Gt, getQueryName as H, removeWord as Hn, getNamespaceName as Ht, getImportedInfiniteQueryName as I, shouldInlineEndpointsForTag as In, QUERY_OPTIONS_TYPES as It, getAbilityFunctionName as J, isErrorStatus as Jt, getAbilityConditionsTypes as K, getSchemaNameByRef as Kt, getImportedQueryName as L, camelToSpaceSeparated as Ln, ZOD_EXTENDED as Lt, getInfiniteQueriesImports as M, formatTag as Mn, DOMAIN_ERRORS_FILE as Mt, getModelsImports as N, getEndpointTag as Nn, MUTATION_EFFECTS as Nt, getTagImportPath as O, BODY_PARAMETER_NAME as On, isNamedZodSchema as Ot, getQueriesImports as P, getOperationTag as Pn, QUERY_MODULES_FILE as Pt, getAppAbilitiesType as Q, isPathExcluded as Qt, getInfiniteQueryName as R, capitalize as Rn, AXIOS_PACKAGE_IMPORT_PATH as Rt, getTsTypeBase as S, VOID_SCHEMA as Sn, getEnumZodSchemaName as St, getQueryModulesImportPath as T, AXIOS_IMPORT as Tn, getZodSchemaName as Tt, getQueryOptionsName as U, snakeToCamel as Un, autocorrectRef as Ut, getPrefetchQueryName as V, kebabToCamel as Vn, REST_PACKAGE_IMPORT_PATH as Vt, getAbilityAction as W, Profiler as Wn, escapeControlCharacters as Wt, getAbilitySubjectTypes as X, isMediaTypeAllowed as Xt, getAbilitySubject as Y, isMainResponseStatus as Yt, getAclData as Z, isParamMediaTypeAllowed as Zt, hasEndpointConfig as _, INT_SCHEMA as _n, isReadAllEndpoint as _t, resolveConfig as a, wrapWithQuotesIfNeeded as an, getZodSchemaInferedTypeName as at, requiresBody as b, URL_SCHEMA as bn, invalidVariableNameCharactersToCamel as bt, getDestructuredVariables as c, isReferenceObject as cn, getSchemaDescriptions as ct, isQuery as d, ALLOWED_PATH_IN as dn, DEFAULT_GENERATE_OPTIONS as dt, isSortingParameterObject as en, hasAbilityConditions as et, getEndpointBody as f, ANY_SCHEMA as fn, getPathSegments as ft, getImportedEndpointName as g, ENUM_SCHEMA as gn, isPathSegmentParam as gt, getEndpointPath as h, EMAIL_SCHEMA as hn, isDeleteEndpoint as ht, shouldUseNativeCodegen as i, unwrapQuotesIfNeeded as in, getZodSchemaDescription as it, getImportPath as j, getRequestConfigTypeName as jn, BUILDERS_UTILS as jt, getAclImports as k, JSON_APPLICATION_FORMAT as kn, APP_REST_CLIENT_FILE as kt, isInfiniteQuery as l, isSchemaObject as ln, iterateSchema as lt, getEndpointName as m, DATETIME_SCHEMA as mn, isCreateEndpoint as mt, runGenerate as n, pathToVariableName as nn, getImportedZodSchemaInferedTypeName as nt, getOutputFileName as o, inferRequiredSchema as on, getZodSchemaPropertyDescriptions as ot, getEndpointConfig as p, BLOB_SCHEMA as pn, isBulkDeleteEndpoint as pt, getAbilityDescription as q, getSchemaRef as qt, compileNativeData as r, replaceHyphenatedPath as rn, getImportedZodSchemaName as rt, pick as s, isArraySchemaObject as sn, getZodSchemaType as st, getOpenApiDoc as t, pathParamToVariableName as tn, renderAclCheckCall as tt, isMutation as u, ALLOWED_METHODS as un, getUniqueArray as ut, mapEndpointParamsToFunctionParams as v, NUMBER_SCHEMA as vn, isReadEndpoint as vt, getFileNameWithExtension as w, AXIOS_DEFAULT_IMPORT_NAME as wn, getResponseZodSchemaName as wt, getSchemaTsMetaType as x, UUID_SCHEMA as xn, getBodyZodSchemaName as xt, renderMediaUploadMutationBody as y, STRING_SCHEMA as yn, isUpdateEndpoint as yt, getInfiniteQueryOptionsName as z, decapitalize as zn, CONFIG_PACKAGE_IMPORT_PATH as zt };
@@ -33,6 +33,7 @@ node_path = __toESM(node_path, 1);
33
33
  let openapi_types = require("openapi-types");
34
34
  //#region src/generators/const/package.const.ts
35
35
  const PACKAGE_IMPORT_PATH = "@povio/openapi-codegen-cli";
36
+ const AXIOS_PACKAGE_IMPORT_PATH = `${PACKAGE_IMPORT_PATH}/axios`;
36
37
  const NATIVE_PACKAGE_IMPORT_PATH = `${PACKAGE_IMPORT_PATH}/native`;
37
38
  const REST_PACKAGE_IMPORT_PATH = `${PACKAGE_IMPORT_PATH}/rest`;
38
39
  const QUERY_PACKAGE_IMPORT_PATH = `${PACKAGE_IMPORT_PATH}/query`;
@@ -1356,7 +1357,7 @@ function getQueryModulesImportPath(options) {
1356
1357
  return `${getImportPath(options)}${QUERY_MODULES_FILE.fileName}`;
1357
1358
  }
1358
1359
  function getQueryTypesImportPath(options) {
1359
- return options.queryTypesImportPath;
1360
+ return options.queryTypesImportPath === "@povio/openapi-codegen-cli" ? QUERY_PACKAGE_IMPORT_PATH : options.queryTypesImportPath;
1360
1361
  }
1361
1362
  //#endregion
1362
1363
  Object.defineProperty(exports, "ALLOWED_METHODS", {
@@ -1401,6 +1402,12 @@ Object.defineProperty(exports, "AXIOS_IMPORT", {
1401
1402
  return AXIOS_IMPORT;
1402
1403
  }
1403
1404
  });
1405
+ Object.defineProperty(exports, "AXIOS_PACKAGE_IMPORT_PATH", {
1406
+ enumerable: true,
1407
+ get: function() {
1408
+ return AXIOS_PACKAGE_IMPORT_PATH;
1409
+ }
1410
+ });
1404
1411
  Object.defineProperty(exports, "AXIOS_REQUEST_CONFIG_NAME", {
1405
1412
  enumerable: true,
1406
1413
  get: function() {
@@ -1503,12 +1510,6 @@ Object.defineProperty(exports, "NUMBER_SCHEMA", {
1503
1510
  return NUMBER_SCHEMA;
1504
1511
  }
1505
1512
  });
1506
- Object.defineProperty(exports, "PACKAGE_IMPORT_PATH", {
1507
- enumerable: true,
1508
- get: function() {
1509
- return PACKAGE_IMPORT_PATH;
1510
- }
1511
- });
1512
1513
  Object.defineProperty(exports, "Profiler", {
1513
1514
  enumerable: true,
1514
1515
  get: function() {
@@ -1,5 +1,5 @@
1
- import { r as getZodSchemaRefs, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-BeEB6M3K.mjs";
2
- import { $ as getImportedAbilityFunctionName, A as getEndpointsImports, An as NATIVE_RESPONSE_TYPE, At as APP_REST_CLIENT_NAME, B as getPrefetchInfiniteQueryName, Bt as PACKAGE_IMPORT_PATH, C as getAppRestClientImportPath, Cn as ZOD_IMPORT, D as getTagFileName, Dn as AXIOS_REQUEST_CONFIG_TYPE, Dt as isEnumZodSchema, E as getQueryTypesImportPath, En as AXIOS_REQUEST_CONFIG_NAME, F as mergeImports, Ft as QUERY_MODULE_ENUM, G as getAbilityConditionType, H as getQueryName, Ht as getNamespaceName, I as getImportedInfiniteQueryName, In as shouldInlineEndpointsForTag, It as QUERY_OPTIONS_TYPES, J as getAbilityFunctionName, K as getAbilityConditionsTypes, L as getImportedQueryName, Ln as camelToSpaceSeparated, Lt as ZOD_EXTENDED, M as getInfiniteQueriesImports, Mt as DOMAIN_ERRORS_FILE, N as getModelsImports, Nn as getEndpointTag, Nt as MUTATION_EFFECTS, O as getTagImportPath, Ot as isNamedZodSchema, P as getQueriesImports, Pt as QUERY_MODULES_FILE, Q as getAppAbilitiesType, R as getInfiniteQueryName, Rn as capitalize, Rt as CONFIG_PACKAGE_IMPORT_PATH, T as getQueryModulesImportPath, Tn as AXIOS_IMPORT, U as getQueryOptionsName, V as getPrefetchQueryName, Vn as kebabToCamel, Vt as REST_PACKAGE_IMPORT_PATH, W as getAbilityAction, Wn as Profiler, X as getAbilitySubjectTypes, Y as getAbilitySubject, Z as getAclData, Zt as isParamMediaTypeAllowed, _ as hasEndpointConfig, _t as isReadAllEndpoint, an as wrapWithQuotesIfNeeded, at as getZodSchemaInferedTypeName, b as requiresBody, bt as invalidVariableNameCharactersToCamel, c as getDestructuredVariables, cn as isReferenceObject, ct as getSchemaDescriptions, d as isQuery, dt as DEFAULT_GENERATE_OPTIONS, et as hasAbilityConditions, f as getEndpointBody, fn as ANY_SCHEMA, ft as getPathSegments, g as getImportedEndpointName, gt as isPathSegmentParam, h as getEndpointPath, ht as isDeleteEndpoint, i as shouldUseNativeCodegen, it as getZodSchemaDescription, j as getImportPath, jn as getRequestConfigTypeName, jt as BUILDERS_UTILS, k as getAclImports, kn as JSON_APPLICATION_FORMAT, kt as APP_REST_CLIENT_FILE, l as isInfiniteQuery, ln as isSchemaObject, m as getEndpointName, mt as isCreateEndpoint, nt as getImportedZodSchemaInferedTypeName, o as getOutputFileName, ot as getZodSchemaPropertyDescriptions, p as getEndpointConfig, pt as isBulkDeleteEndpoint, q as getAbilityDescription, r as compileNativeData, rt as getImportedZodSchemaName, st as getZodSchemaType, tt as renderAclCheckCall, u as isMutation, ut as getUniqueArray, v as mapEndpointParamsToFunctionParams, vt as isReadEndpoint, w as getFileNameWithExtension, wn as AXIOS_DEFAULT_IMPORT_NAME, y as renderMediaUploadMutationBody, yt as isUpdateEndpoint, z as getInfiniteQueryOptionsName, zt as NATIVE_PACKAGE_IMPORT_PATH } from "./generate.runner-Cdv3h6-o.mjs";
1
+ import { r as getZodSchemaRefs, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-Cya5Q-2W.mjs";
2
+ import { $ as getImportedAbilityFunctionName, A as getEndpointsImports, An as NATIVE_RESPONSE_TYPE, At as APP_REST_CLIENT_NAME, B as getPrefetchInfiniteQueryName, Bt as NATIVE_PACKAGE_IMPORT_PATH, C as getAppRestClientImportPath, Cn as ZOD_IMPORT, D as getTagFileName, Dn as AXIOS_REQUEST_CONFIG_TYPE, Dt as isEnumZodSchema, E as getQueryTypesImportPath, En as AXIOS_REQUEST_CONFIG_NAME, F as mergeImports, Ft as QUERY_MODULE_ENUM, G as getAbilityConditionType, H as getQueryName, Ht as getNamespaceName, I as getImportedInfiniteQueryName, In as shouldInlineEndpointsForTag, It as QUERY_OPTIONS_TYPES, J as getAbilityFunctionName, K as getAbilityConditionsTypes, L as getImportedQueryName, Ln as camelToSpaceSeparated, Lt as ZOD_EXTENDED, M as getInfiniteQueriesImports, Mt as DOMAIN_ERRORS_FILE, N as getModelsImports, Nn as getEndpointTag, Nt as MUTATION_EFFECTS, O as getTagImportPath, Ot as isNamedZodSchema, P as getQueriesImports, Pt as QUERY_MODULES_FILE, Q as getAppAbilitiesType, R as getInfiniteQueryName, Rn as capitalize, Rt as AXIOS_PACKAGE_IMPORT_PATH, T as getQueryModulesImportPath, Tn as AXIOS_IMPORT, U as getQueryOptionsName, V as getPrefetchQueryName, Vn as kebabToCamel, Vt as REST_PACKAGE_IMPORT_PATH, W as getAbilityAction, Wn as Profiler, X as getAbilitySubjectTypes, Y as getAbilitySubject, Z as getAclData, Zt as isParamMediaTypeAllowed, _ as hasEndpointConfig, _t as isReadAllEndpoint, an as wrapWithQuotesIfNeeded, at as getZodSchemaInferedTypeName, b as requiresBody, bt as invalidVariableNameCharactersToCamel, c as getDestructuredVariables, cn as isReferenceObject, ct as getSchemaDescriptions, d as isQuery, dt as DEFAULT_GENERATE_OPTIONS, et as hasAbilityConditions, f as getEndpointBody, fn as ANY_SCHEMA, ft as getPathSegments, g as getImportedEndpointName, gt as isPathSegmentParam, h as getEndpointPath, ht as isDeleteEndpoint, i as shouldUseNativeCodegen, it as getZodSchemaDescription, j as getImportPath, jn as getRequestConfigTypeName, jt as BUILDERS_UTILS, k as getAclImports, kn as JSON_APPLICATION_FORMAT, kt as APP_REST_CLIENT_FILE, l as isInfiniteQuery, ln as isSchemaObject, m as getEndpointName, mt as isCreateEndpoint, nt as getImportedZodSchemaInferedTypeName, o as getOutputFileName, ot as getZodSchemaPropertyDescriptions, p as getEndpointConfig, pt as isBulkDeleteEndpoint, q as getAbilityDescription, r as compileNativeData, rt as getImportedZodSchemaName, st as getZodSchemaType, tt as renderAclCheckCall, u as isMutation, ut as getUniqueArray, v as mapEndpointParamsToFunctionParams, vt as isReadEndpoint, w as getFileNameWithExtension, wn as AXIOS_DEFAULT_IMPORT_NAME, y as renderMediaUploadMutationBody, yt as isUpdateEndpoint, z as getInfiniteQueryOptionsName, zt as CONFIG_PACKAGE_IMPORT_PATH } from "./generate.runner-C3n76bDK.mjs";
3
3
  import "node:module";
4
4
  //#region \0rolldown/runtime.js
5
5
  var __defProp = Object.defineProperty;
@@ -1722,7 +1722,7 @@ function renderInfiniteQuery({ resolver, endpoint, inlineEndpoints }) {
1722
1722
  //#region src/generators/generate/generateAppRestClient.ts
1723
1723
  function generateAppRestClient(resolver) {
1724
1724
  const clientName = resolver.options.restClient === "native" ? "NativeRestClient" : "RestClient";
1725
- return `import { ${clientName} } from "${resolver.options.restClient === "native" ? NATIVE_PACKAGE_IMPORT_PATH : PACKAGE_IMPORT_PATH}";
1725
+ return `import { ${clientName} } from "${resolver.options.restClient === "native" ? NATIVE_PACKAGE_IMPORT_PATH : AXIOS_PACKAGE_IMPORT_PATH}";
1726
1726
 
1727
1727
  export const ${APP_REST_CLIENT_NAME} = new ${clientName}({
1728
1728
  config: {
@@ -1,4 +1,4 @@
1
- const require_generate_utils = require("./generate.utils-3gEG3cUe.cjs");
1
+ const require_generate_utils = require("./generate.utils-wn-hR9hY.cjs");
2
2
  //#region src/generators/const/acl.const.ts
3
3
  const ACL_APP_ABILITY_FILE = {
4
4
  fileName: "acl/app.ability",
@@ -3705,7 +3705,7 @@ function renderInfiniteQuery({ resolver, endpoint, inlineEndpoints }) {
3705
3705
  //#region src/generators/generate/generateAppRestClient.ts
3706
3706
  function generateAppRestClient(resolver) {
3707
3707
  const clientName = resolver.options.restClient === "native" ? "NativeRestClient" : "RestClient";
3708
- return `import { ${clientName} } from "${resolver.options.restClient === "native" ? require_generate_utils.NATIVE_PACKAGE_IMPORT_PATH : require_generate_utils.PACKAGE_IMPORT_PATH}";
3708
+ return `import { ${clientName} } from "${resolver.options.restClient === "native" ? require_generate_utils.NATIVE_PACKAGE_IMPORT_PATH : require_generate_utils.AXIOS_PACKAGE_IMPORT_PATH}";
3709
3709
 
3710
3710
  export const ${require_generate_utils.APP_REST_CLIENT_NAME} = new ${clientName}({
3711
3711
  config: {
@@ -1,6 +1,6 @@
1
- import { t as generateCodeFromOpenAPIDoc } from "./generateCodeFromOpenAPIDoc-C1L8i0qt.mjs";
2
- import { t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-BeEB6M3K.mjs";
3
- import { H as getQueryName, Ht as getNamespaceName, Mn as formatTag, O as getTagImportPath, S as getTsTypeBase, Xt as isMediaTypeAllowed, Zt as isParamMediaTypeAllowed, bt as invalidVariableNameCharactersToCamel, d as isQuery, dt as DEFAULT_GENERATE_OPTIONS, t as getOpenApiDoc, u as isMutation, x as getSchemaTsMetaType } from "./generate.runner-Cdv3h6-o.mjs";
1
+ import { t as generateCodeFromOpenAPIDoc } from "./generateCodeFromOpenAPIDoc-eP5cooBd.mjs";
2
+ import { t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-Cya5Q-2W.mjs";
3
+ import { H as getQueryName, Ht as getNamespaceName, Mn as formatTag, O as getTagImportPath, S as getTsTypeBase, Xt as isMediaTypeAllowed, Zt as isParamMediaTypeAllowed, bt as invalidVariableNameCharactersToCamel, d as isQuery, dt as DEFAULT_GENERATE_OPTIONS, t as getOpenApiDoc, u as isMutation, x as getSchemaTsMetaType } from "./generate.runner-C3n76bDK.mjs";
4
4
  //#region src/generators/core/getMetadataFromOpenAPIDoc.ts
5
5
  async function getMetadataFromOpenAPIDoc(openApiDoc, options) {
6
6
  const { resolver, data } = await getDataFromOpenAPIDoc(openApiDoc, options);
@@ -1,4 +1,4 @@
1
- import { $t as isPrimitiveType, Bn as getMostCommonAdjacentCombinationSplit, Ct as getParamZodSchemaName, Et as getZodSchemaOperationName, Fn as isTagIncluded, Gt as getParameterEnumNames, Hn as removeWord, Ht as getNamespaceName, Jt as isErrorStatus, Kt as getSchemaNameByRef, Mn as formatTag, Nn as getEndpointTag, On as BODY_PARAMETER_NAME, Ot as isNamedZodSchema, Pn as getOperationTag, Qt as isPathExcluded, Rn as capitalize, Sn as VOID_SCHEMA, St as getEnumZodSchemaName, Tt as getZodSchemaName, Un as snakeToCamel, Ut as autocorrectRef, Wn as Profiler, Wt as escapeControlCharacters, Xt as isMediaTypeAllowed, Yt as isMainResponseStatus, Zt as isParamMediaTypeAllowed, _n as INT_SCHEMA, an as wrapWithQuotesIfNeeded, bn as URL_SCHEMA, bt as invalidVariableNameCharactersToCamel, cn as isReferenceObject, d as isQuery, dn as ALLOWED_PATH_IN, en as isSortingParameterObject, fn as ANY_SCHEMA, gn as ENUM_SCHEMA, hn as EMAIL_SCHEMA, in as unwrapQuotesIfNeeded, kn as JSON_APPLICATION_FORMAT, ln as isSchemaObject, lt as iterateSchema, mn as DATETIME_SCHEMA, nn as pathToVariableName, on as inferRequiredSchema, pn as BLOB_SCHEMA, qt as getSchemaRef, rn as replaceHyphenatedPath, s as pick, sn as isArraySchemaObject, tn as pathParamToVariableName, un as ALLOWED_METHODS, ut as getUniqueArray, vn as NUMBER_SCHEMA, wt as getResponseZodSchemaName, xn as UUID_SCHEMA, xt as getBodyZodSchemaName, yn as STRING_SCHEMA, zn as decapitalize } from "./generate.runner-Cdv3h6-o.mjs";
1
+ import { $t as isPrimitiveType, Bn as getMostCommonAdjacentCombinationSplit, Ct as getParamZodSchemaName, Et as getZodSchemaOperationName, Fn as isTagIncluded, Gt as getParameterEnumNames, Hn as removeWord, Ht as getNamespaceName, Jt as isErrorStatus, Kt as getSchemaNameByRef, Mn as formatTag, Nn as getEndpointTag, On as BODY_PARAMETER_NAME, Ot as isNamedZodSchema, Pn as getOperationTag, Qt as isPathExcluded, Rn as capitalize, Sn as VOID_SCHEMA, St as getEnumZodSchemaName, Tt as getZodSchemaName, Un as snakeToCamel, Ut as autocorrectRef, Wn as Profiler, Wt as escapeControlCharacters, Xt as isMediaTypeAllowed, Yt as isMainResponseStatus, Zt as isParamMediaTypeAllowed, _n as INT_SCHEMA, an as wrapWithQuotesIfNeeded, bn as URL_SCHEMA, bt as invalidVariableNameCharactersToCamel, cn as isReferenceObject, d as isQuery, dn as ALLOWED_PATH_IN, en as isSortingParameterObject, fn as ANY_SCHEMA, gn as ENUM_SCHEMA, hn as EMAIL_SCHEMA, in as unwrapQuotesIfNeeded, kn as JSON_APPLICATION_FORMAT, ln as isSchemaObject, lt as iterateSchema, mn as DATETIME_SCHEMA, nn as pathToVariableName, on as inferRequiredSchema, pn as BLOB_SCHEMA, qt as getSchemaRef, rn as replaceHyphenatedPath, s as pick, sn as isArraySchemaObject, tn as pathParamToVariableName, un as ALLOWED_METHODS, ut as getUniqueArray, vn as NUMBER_SCHEMA, wt as getResponseZodSchemaName, xn as UUID_SCHEMA, xt as getBodyZodSchemaName, yn as STRING_SCHEMA, zn as decapitalize } from "./generate.runner-C3n76bDK.mjs";
2
2
  //#region src/generators/const/validation.const.ts
3
3
  const HTTP_STATUS_CODES = {
4
4
  "100": "Continue",
package/dist/index.d.mts CHANGED
@@ -4,7 +4,7 @@ import { n as AuthGuardProps, r as AuthContext, t as AuthGuard } from "./AuthGua
4
4
  import { a as RestClient, i as Response, n as RequestConfig, o as RestInterceptor, r as RequestInfo, t as RestClient$1 } from "./rest-client-CQyFvqYC.mjs";
5
5
  import { n as useWorkspaceContext, r as OpenApiRouter, t as OpenApiWorkspaceContext } from "./workspace.context-isVY9ves.mjs";
6
6
  import { i as QueryModule, n as InvalidationMapFunc, r as OpenApiQueryConfig, t as InvalidationMap } from "./queryConfig.context-CRJOgf19.mjs";
7
- import { t as RestUtils } from "./rest.utils-rezWAIYL.mjs";
7
+ import { t as RestUtils } from "./rest.utils-DpiFIdhF.mjs";
8
8
  import { t as OpenAPICodegenConfig } from "./config-DgrOddSC.mjs";
9
9
  import { d as TransportResponse, l as TransportRequest, n as HttpError, p as UploadProgress, u as TransportRequestConfig } from "./rest-transport.types-DM5-qyOJ.mjs";
10
10
  import { n as NativeRestInterceptor, r as NativeRestClient, t as NativeInterceptor } from "./native-rest-interceptor-PgziZt1f.mjs";
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { i as resources, n as ns, t as configureTranslations } from "./i18n-D-FesqFb.mjs";
2
- import { a as RestUtils, i as SharedErrorHandler, n as DomainErrorRegistry, r as ErrorHandler, t as ApplicationException } from "./error-handling-BeydPL7s.mjs";
2
+ import { a as RestUtils, i as SharedErrorHandler, n as DomainErrorRegistry, r as ErrorHandler, t as ApplicationException } from "./error-handling-uS0DgYUR.mjs";
3
3
  import { t as HttpError } from "./rest-transport.types-DxitRtsB.mjs";
4
- import { n as RestClient, t as RestInterceptor } from "./rest-interceptor-D5NCNTm1.mjs";
4
+ import { n as RestClient, t as RestInterceptor } from "./rest-interceptor-Dm9DFErh.mjs";
5
5
  import { n as NativeRestClient, t as NativeRestInterceptor } from "./native-rest-interceptor-Np4Ov54n.mjs";
6
6
  import { t as OpenApiQueryConfig } from "./queryConfig.context-CldQ5YL9.mjs";
7
7
  import { t as useMutationEffects } from "./useMutationEffects-PB1fvKWM.mjs";
package/dist/metro.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_generate_utils = require("./generate.utils-3gEG3cUe.cjs");
2
+ const require_generate_utils = require("./generate.utils-wn-hR9hY.cjs");
3
3
  let fs = require("fs");
4
4
  fs = require_generate_utils.__toESM(fs, 1);
5
5
  let path = require("path");
@@ -52,7 +52,7 @@ function generateFilesFromNativeOpenAPI(source, yaml, options) {
52
52
  if (!options.modelsOnly) {
53
53
  if (options.acl && nativeData.renderedShared.appAcl) files.push(outputFile(options, "acl/app.ability.ts", nativeData.renderedShared.appAcl));
54
54
  if (options.mutationEffects && nativeData.renderedShared.queryModules) files.push(outputFile(options, "queryModules.ts", nativeData.renderedShared.queryModules));
55
- if (!options.restClientImportPath) files.push(outputFile(options, "app-rest-client.ts", `import { ${options.restClient === "native" ? "NativeRestClient" : "RestClient"} } from "@povio/openapi-codegen-cli${options.restClient === "native" ? "/native" : ""}";\n\nexport const AppRestClient = new ${options.restClient === "native" ? "NativeRestClient" : "RestClient"}({\n config: {\n baseURL: "${nativeData.baseUrl}"\n },\n});\n`));
55
+ if (!options.restClientImportPath) files.push(outputFile(options, "app-rest-client.ts", `import { ${options.restClient === "native" ? "NativeRestClient" : "RestClient"} } from "@povio/openapi-codegen-cli${options.restClient === "native" ? "/native" : "/axios"}";\n\nexport const AppRestClient = new ${options.restClient === "native" ? "NativeRestClient" : "RestClient"}({\n config: {\n baseURL: "${nativeData.baseUrl}"\n },\n});\n`));
56
56
  if (nativeData.renderedShared.domainErrors) files.push(outputFile(options, "domain-errors.ts", nativeData.renderedShared.domainErrors));
57
57
  }
58
58
  return files;
@@ -102,7 +102,7 @@ async function runGenerate({ fileConfig, params, formatGeneratedFile, profiler =
102
102
  const nativeFiles = generateFilesFromNativeOpenAPI(nativeInput.source, nativeInput.yaml, config);
103
103
  if (nativeFiles) return nativeFiles;
104
104
  }
105
- const { generateCodeFromOpenAPIDoc } = await Promise.resolve().then(() => require("./generateCodeFromOpenAPIDoc-D7670R9U.cjs"));
105
+ const { generateCodeFromOpenAPIDoc } = await Promise.resolve().then(() => require("./generateCodeFromOpenAPIDoc-ejdqJZ2M.cjs"));
106
106
  return generateCodeFromOpenAPIDoc(openApiDoc, config, profiler, {
107
107
  source: nativeInput.source,
108
108
  yaml: nativeInput.yaml
package/dist/metro.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-QIabSZVk.mjs";
1
+ import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-kQNEh1Mb.mjs";
2
2
  import { i as normalizeWatchFolders, r as isTinyOpenApiFakeMode, t as createTinyOpenApiSourceRunner } from "./openapi-source.runner-DPUNTduQ.mjs";
3
3
  import fs from "fs";
4
4
  import path from "path";
@@ -1,4 +1,4 @@
1
- import { Wn as Profiler, n as runGenerate } from "./generate.runner-Cdv3h6-o.mjs";
1
+ import { Wn as Profiler, n as runGenerate } from "./generate.runner-C3n76bDK.mjs";
2
2
  import path from "path";
3
3
  //#region src/plugins/openapi-codegen.runner.ts
4
4
  function createOpenApiCodegenRunner(config, options = {}) {
@@ -1,4 +1,4 @@
1
- import { i as SharedErrorHandler } from "./error-handling-BeydPL7s.mjs";
1
+ import { i as SharedErrorHandler } from "./error-handling-uS0DgYUR.mjs";
2
2
  import axios from "axios";
3
3
  import { z } from "zod";
4
4
  //#region src/lib/rest/rest-client.ts
@@ -0,0 +1,9 @@
1
+ //#region src/lib/rest/rest.utils.d.ts
2
+ declare namespace RestUtils {
3
+ const extractServerResponseCode: (e: unknown) => string | number | null;
4
+ const doesServerErrorMessageContain: (e: unknown, text: string) => boolean;
5
+ const extractServerErrorMessage: (e: unknown) => string | null;
6
+ const extractContentDispositionFilename: (headers: Headers | Record<string, unknown>) => string | undefined;
7
+ }
8
+ //#endregion
9
+ export { RestUtils as t };
package/dist/sh.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bun
2
- import { i as VALIDATION_ERROR_TYPE_TITLE, n as groupByType, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-BeEB6M3K.mjs";
3
- import { D as getTagFileName, Wn as Profiler, a as resolveConfig, n as runGenerate, o as getOutputFileName, t as getOpenApiDoc } from "./generate.runner-Cdv3h6-o.mjs";
2
+ import { i as VALIDATION_ERROR_TYPE_TITLE, n as groupByType, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-Cya5Q-2W.mjs";
3
+ import { D as getTagFileName, Wn as Profiler, a as resolveConfig, n as runGenerate, o as getOutputFileName, t as getOpenApiDoc } from "./generate.runner-C3n76bDK.mjs";
4
4
  import yargs from "yargs";
5
5
  import { hideBin } from "yargs/helpers";
6
6
  import { styleText } from "node:util";
@@ -31,7 +31,7 @@ function logBanner(message) {
31
31
  * Fetch the version from package.json
32
32
  */
33
33
  function getVersion() {
34
- return "3.2.3";
34
+ return "3.2.4-rc.1";
35
35
  }
36
36
  //#endregion
37
37
  //#region src/helpers/yargs.helper.ts
package/dist/vite.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-QIabSZVk.mjs";
1
+ import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-kQNEh1Mb.mjs";
2
2
  import { i as normalizeWatchFolders, r as isTinyOpenApiFakeMode, t as createTinyOpenApiSourceRunner } from "./openapi-source.runner-DPUNTduQ.mjs";
3
3
  import path from "path";
4
4
  //#region src/vite/openapi-codegen.plugin.ts
package/dist/zod.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as SharedErrorHandler } from "./error-handling-BeydPL7s.mjs";
1
+ import { i as SharedErrorHandler } from "./error-handling-uS0DgYUR.mjs";
2
2
  import { z } from "zod";
3
3
  //#region src/zod.ts
4
4
  let ZodExtended;
package/package.json CHANGED
@@ -187,5 +187,5 @@
187
187
  "node": ">= 18"
188
188
  },
189
189
  "packageManager": "bun@1.4.1",
190
- "version": "3.2.3"
190
+ "version": "3.2.4-rc.1"
191
191
  }
@@ -1,10 +0,0 @@
1
- import { AxiosError, AxiosResponseHeaders } from "axios";
2
- //#region src/lib/rest/rest.utils.d.ts
3
- declare namespace RestUtils {
4
- const extractServerResponseCode: (e: unknown) => string | number | null;
5
- const doesServerErrorMessageContain: (e: AxiosError, text: string) => boolean;
6
- const extractServerErrorMessage: (e: unknown) => string | null;
7
- const extractContentDispositionFilename: (headers: AxiosResponseHeaders) => string | undefined;
8
- }
9
- //#endregion
10
- export { RestUtils as t };