@povio/openapi-codegen-cli 1.1.1 → 1.2.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.
Files changed (46) hide show
  1. package/README.md +4 -0
  2. package/dist/commands/generate.d.ts +1 -1
  3. package/dist/generators/const/buildConfigs.const.d.ts +1 -0
  4. package/dist/generators/const/deps.const.d.ts +6 -9
  5. package/dist/generators/const/endpoints.const.d.ts +1 -0
  6. package/dist/generators/const/openapi.const.d.ts +1 -1
  7. package/dist/generators/const/queries.const.d.ts +0 -8
  8. package/dist/generators/const/zod.const.d.ts +1 -0
  9. package/dist/generators/core/SchemaResolver.class.d.ts +1 -1
  10. package/dist/generators/core/endpoints/getEndpointsFromOpenAPIDoc.d.ts +1 -1
  11. package/dist/generators/core/endpoints/getEndpointsFromOpenAPIDoc.test.d.ts +1 -0
  12. package/dist/generators/core/getMetadataFromOpenAPIDoc.test.d.ts +1 -0
  13. package/dist/generators/core/openapi/getOpenAPISchemaComplexity.test.d.ts +1 -0
  14. package/dist/generators/core/openapi/getOpenAPISchemaDependencyGraph.test.d.ts +1 -0
  15. package/dist/generators/core/zod/getZodSchema.test.d.ts +1 -0
  16. package/dist/generators/generate/generateConfigs.d.ts +2 -0
  17. package/dist/generators/types/builder-config.d.ts +49 -0
  18. package/dist/generators/types/endpoint.d.ts +3 -0
  19. package/dist/generators/types/generate.d.ts +3 -2
  20. package/dist/generators/types/options.d.ts +21 -3
  21. package/dist/generators/utils/endpoint.utils.d.ts +12 -0
  22. package/dist/generators/utils/endpoint.utils.test.d.ts +1 -0
  23. package/dist/generators/utils/generate/generate.configs.utils.d.ts +15 -0
  24. package/dist/generators/utils/generate/generate.endpoints.utils.d.ts +3 -4
  25. package/dist/generators/utils/generate/generate.imports.utils.d.ts +10 -0
  26. package/dist/generators/utils/generate/generate.imports.utils.test.d.ts +1 -0
  27. package/dist/generators/utils/generate/generate.query.utils.d.ts +3 -0
  28. package/dist/generators/utils/generate/generate.utils.d.ts +0 -5
  29. package/dist/generators/utils/generate/generate.zod.utils.d.ts +1 -1
  30. package/dist/generators/utils/hbs/hbs.query.utils.d.ts +2 -1
  31. package/dist/generators/utils/js.utils.test.d.ts +1 -0
  32. package/dist/generators/utils/namespace.utils.d.ts +7 -0
  33. package/dist/generators/utils/object.utils.test.d.ts +1 -0
  34. package/dist/generators/utils/openapi-schema.utils.d.ts +2 -2
  35. package/dist/generators/utils/openapi.utils.test.d.ts +1 -0
  36. package/dist/generators/utils/operation.utils.test.d.ts +1 -0
  37. package/dist/generators/utils/query.utils.d.ts +2 -1
  38. package/dist/generators/utils/string.utils.test.d.ts +1 -0
  39. package/dist/generators/utils/tag.utils.d.ts +2 -0
  40. package/dist/index.js +47 -47
  41. package/dist/sh.js +180 -180
  42. package/dist/tsconfig.tsbuildinfo +1 -0
  43. package/package.json +1 -1
  44. package/src/generators/templates/configs.hbs +79 -0
  45. package/src/generators/templates/partials/columns-config.hbs +11 -0
  46. package/src/generators/templates/partials/inputs-config.hbs +10 -0
package/README.md CHANGED
@@ -70,6 +70,7 @@ yarn openapi-codegen generate --config my-config.ts
70
70
  #### Generate command (generates Zod schemas, API definitions and React queries)
71
71
 
72
72
  ```sh
73
+ --config Path to TS config file (default: 'openapi-codegen.config.ts')
73
74
  --input Path/URL to OpenAPI JSON/YAML document
74
75
  --output Output directory path (default: 'output')
75
76
  --prettier Format the generated code using Prettier (default: true)
@@ -97,6 +98,8 @@ yarn openapi-codegen generate --config my-config.ts
97
98
  --acl Generate ACL related files (default: true)
98
99
  --checkAcl Add ACL check to queries (default: true)
99
100
 
101
+ --builderConfigs Generate configs for builders (default: false)
102
+
100
103
  --standalone Generate any missing supporting classes/types, e.g., REST client class, React Query type extensions, etc. (default: false)
101
104
  --baseUrl (Requires `--standalone`) Base URL for the REST client; falls back to the OpenAPI spec if not provided
102
105
  ```
@@ -104,6 +107,7 @@ yarn openapi-codegen generate --config my-config.ts
104
107
  #### Check command (checks if OpenAPI spec is compliant)
105
108
 
106
109
  ```sh
110
+ --config Path to TS config file (default: 'openapi-codegen.config.ts')
107
111
  --input Path/URL to OpenAPI/Swagger document as JSON/YAML
108
112
  --verbose Show log messages during execution
109
113
 
@@ -4,5 +4,5 @@ export type GenerateParams = {
4
4
  excludeTags?: string;
5
5
  prettier?: boolean;
6
6
  verbose?: boolean;
7
- } & Partial<Pick<GenerateOptions, "input" | "output" | "tsNamespaces" | "tsPath" | "splitByTags" | "defaultTag" | "removeOperationPrefixEndingWith" | "importPath" | "extractEnums" | "acl" | "checkAcl" | "standalone" | "baseUrl" | "replaceOptionalWithNullish" | "infiniteQueries" | "axiosRequestConfig" | "mutationEffects" | "parseRequestParams">>;
7
+ } & Partial<Pick<GenerateOptions, "input" | "output" | "tsNamespaces" | "tsPath" | "splitByTags" | "defaultTag" | "removeOperationPrefixEndingWith" | "importPath" | "extractEnums" | "acl" | "checkAcl" | "standalone" | "baseUrl" | "replaceOptionalWithNullish" | "infiniteQueries" | "axiosRequestConfig" | "mutationEffects" | "parseRequestParams" | "builderConfigs">>;
8
8
  export declare function generate({ prettier, verbose, config: configParam, ...params }: GenerateParams): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare const BUILD_CONFIG_SUFFIX = "config";
@@ -6,20 +6,17 @@ export declare const QUERY_OPTIONS_TYPES: {
6
6
  mutation: string;
7
7
  };
8
8
  export declare const TEMPLATE_DATA_FILE_PATH = "src/data";
9
- export declare const TEMPLATE_DATA_TS_PATH = "@/data";
10
- export declare const TEMPLATE_IMPORTS: {
11
- appRestClient: string;
12
- queryTypes: string;
13
- errorHandling: string;
14
- abilityContext: string;
15
- };
16
9
  export declare const ERROR_HANDLERS: {
17
10
  ErrorHandler: string;
18
11
  SharedErrorHandler: string;
19
12
  };
20
- export declare const ERROR_HANDLING_IMPORT: Import;
13
+ export declare const ERROR_HANDLING_IMPORT: Omit<Import, "from">;
21
14
  export declare const ABILITY_CONTEXT = "AbilityContext";
22
- export declare const ABILITY_CONTEXT_IMPORT: Import;
15
+ export declare const ABILITY_CONTEXT_IMPORT: Omit<Import, "from">;
16
+ export declare const BUILDERS_UTILS: {
17
+ dynamicInputs: string;
18
+ dynamicColumns: string;
19
+ };
23
20
  export declare enum StandaloneAssetEnum {
24
21
  ReactQueryTypes = "reactQueryTypes",
25
22
  RestClient = "restClient",
@@ -1,4 +1,5 @@
1
1
  import { Import } from "src/generators/types/generate";
2
+ export declare const JSON_APPLICATION_FORMAT = "application/json";
2
3
  export declare const DEFAULT_HEADERS: {
3
4
  "Content-Type": string;
4
5
  Accept: string;
@@ -4,4 +4,4 @@ export declare const ALLOWED_PARAM_MEDIA_TYPES: string[];
4
4
  export declare const ALLOWED_PATH_IN: string[];
5
5
  export declare const ALLOWED_METHODS: OpenAPIV3.HttpMethods[];
6
6
  export declare const PRIMITIVE_TYPE_LIST: string[];
7
- export declare const COMPOSITE_KEYWORDS: ("required" | "type" | "default" | "title" | "pattern" | "description" | "externalDocs" | "deprecated" | "enum" | "nullable" | "format" | "multipleOf" | "maximum" | "exclusiveMaximum" | "minimum" | "exclusiveMinimum" | "maxLength" | "minLength" | "additionalProperties" | "maxItems" | "minItems" | "uniqueItems" | "maxProperties" | "minProperties" | "properties" | "allOf" | "oneOf" | "anyOf" | "not" | "discriminator" | "readOnly" | "writeOnly" | "xml" | "example")[];
7
+ export declare const COMPOSITE_KEYWORDS: ("type" | "title" | "description" | "format" | "default" | "multipleOf" | "maximum" | "exclusiveMaximum" | "minimum" | "exclusiveMinimum" | "maxLength" | "minLength" | "pattern" | "additionalProperties" | "maxItems" | "minItems" | "uniqueItems" | "maxProperties" | "minProperties" | "required" | "enum" | "properties" | "allOf" | "oneOf" | "anyOf" | "not" | "nullable" | "discriminator" | "readOnly" | "writeOnly" | "xml" | "externalDocs" | "example" | "deprecated")[];
@@ -5,12 +5,4 @@ export declare const QUERY_HOOKS: {
5
5
  mutation: string;
6
6
  };
7
7
  export declare const QUERY_IMPORT: Import;
8
- export declare const INFINITE_QUERY_PARAMS: {
9
- pageParamName: string;
10
- };
11
- export declare const INFINITE_QUERY_RESPONSE_PARAMS: {
12
- pageParamName: string;
13
- totalItemsName: string;
14
- limitParamName: string;
15
- };
16
8
  export declare const QUERIES_MODULE_NAME = "moduleName";
@@ -6,6 +6,7 @@ export declare const PARAM_SCHEMA_SUFFIX = "Param";
6
6
  export declare const RESPONSE_SCHEMA_SUFFIX = "Response";
7
7
  export declare const ERROR_RESPONSE_SCHEMA_SUFFIX = "ErrorResponse";
8
8
  export declare const VOID_SCHEMA = "z.void()";
9
+ export declare const ANY_SCHEMA = "z.any()";
9
10
  export declare const BLOB_SCHEMA = "z.instanceof(Blob)";
10
11
  export declare const ENUM_SCHEMA = "z.enum";
11
12
  export declare const INT_SCHEMA = "z.int()";
@@ -62,7 +62,7 @@ export declare class SchemaResolver {
62
62
  isSchemaCircular(ref: string): boolean;
63
63
  getCircularSchemaChain(ref: string, currentRef?: string, chain?: never[], visited?: string[]): string[];
64
64
  getBaseUrl(): string;
65
- getZodSchemaObj(zodSchemaName: string): OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject | undefined;
65
+ getZodSchemaObj(zodSchemaName: string): OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject | undefined;
66
66
  private getSchemaDataByRef;
67
67
  private getExtractedEnumZodSchemaDataByName;
68
68
  private initialize;
@@ -1,3 +1,3 @@
1
- import { Endpoint } from "src/generators/types/endpoint";
2
1
  import { SchemaResolver } from "src/generators/core/SchemaResolver.class";
2
+ import { Endpoint } from "src/generators/types/endpoint";
3
3
  export declare function getEndpointsFromOpenAPIDoc(resolver: SchemaResolver): Endpoint[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { GenerateTypeParams } from "src/generators/types/generate";
2
+ export declare function generateConfigs(generateTypeParams: GenerateTypeParams): string | undefined;
@@ -0,0 +1,49 @@
1
+ export interface DynamicInputsConfig {
2
+ schema: string;
3
+ options: {
4
+ inputs: Record<string, boolean>;
5
+ };
6
+ }
7
+ export interface DynamicColumnsConfig {
8
+ schema: string;
9
+ options: {
10
+ columns: Record<string, boolean>;
11
+ sortable?: string;
12
+ };
13
+ }
14
+ export interface BuilderConfig {
15
+ name: string;
16
+ title: string;
17
+ readAll: {
18
+ acl?: string;
19
+ schema: string;
20
+ paginated: string;
21
+ infinite: string;
22
+ filters?: DynamicInputsConfig;
23
+ columns?: DynamicColumnsConfig;
24
+ };
25
+ read?: {
26
+ acl?: string;
27
+ schema: string;
28
+ query: string;
29
+ };
30
+ create?: {
31
+ acl?: string;
32
+ mutation: string;
33
+ inputDefs?: DynamicInputsConfig;
34
+ };
35
+ update?: {
36
+ acl?: string;
37
+ mutation: string;
38
+ inputDefs?: DynamicInputsConfig;
39
+ };
40
+ delete?: {
41
+ acl?: string;
42
+ mutation: string;
43
+ };
44
+ bulkDelete?: {
45
+ acl?: string;
46
+ mutation: string;
47
+ inputDefs?: DynamicInputsConfig;
48
+ };
49
+ }
@@ -44,4 +44,7 @@ export interface Endpoint {
44
44
  mediaUpload?: boolean;
45
45
  mediaDownload?: boolean;
46
46
  }
47
+ export interface ExtendedEndpoint extends Endpoint {
48
+ pathSegments: string[];
49
+ }
47
50
  export {};
@@ -20,7 +20,8 @@ export declare enum GenerateType {
20
20
  Models = "models",
21
21
  Endpoints = "endpoints",
22
22
  Queries = "queries",
23
- Acl = "acl"
23
+ Acl = "acl",
24
+ Configs = "configs"
24
25
  }
25
26
  export type GenerateData = Map<string, {
26
27
  endpoints: Endpoint[];
@@ -29,7 +30,7 @@ export type GenerateData = Map<string, {
29
30
  export interface GenerateTypeParams {
30
31
  resolver: SchemaResolver;
31
32
  data: GenerateData;
32
- tag?: string;
33
+ tag: string;
33
34
  }
34
35
  export interface GenerateFileData {
35
36
  fileName: string;
@@ -19,15 +19,32 @@ interface EndpointsGenerateOptions {
19
19
  interface QueriesGenerateOptions {
20
20
  queryTypesImportPath: string;
21
21
  axiosRequestConfig?: boolean;
22
- infiniteQueries?: boolean;
23
22
  mutationEffects?: boolean;
24
23
  }
25
- interface ACLOptions {
24
+ interface InfiniteQueriesGenerateOptions {
25
+ infiniteQueries?: boolean;
26
+ infiniteQueryParamNames: {
27
+ page: string;
28
+ };
29
+ infiniteQueryResponseParamNames: {
30
+ page: string;
31
+ totalItems: string;
32
+ limit: string;
33
+ };
34
+ }
35
+ interface ACLGenerateOptions {
26
36
  acl: boolean;
27
37
  checkAcl?: boolean;
28
38
  abilityContextImportPath: string;
29
39
  abilityContextGenericAppAbilities: boolean;
30
40
  }
41
+ interface BuilderConfigsGenerateOptions {
42
+ builderConfigs?: boolean;
43
+ filterParamName: string;
44
+ dataResponseParamNames: string[];
45
+ dynamicInputsImportPath: string;
46
+ dynamicColumnsImportPath: string;
47
+ }
31
48
  interface GenerateConfig {
32
49
  outputFileNameSuffix: string;
33
50
  namespaceSuffix: string;
@@ -47,5 +64,6 @@ interface BaseGenerateOptions {
47
64
  standalone: boolean;
48
65
  baseUrl: string;
49
66
  }
50
- export type GenerateOptions = BaseGenerateOptions & ZodGenerateOptions & EndpointsGenerateOptions & QueriesGenerateOptions & ACLOptions;
67
+ export interface GenerateOptions extends BaseGenerateOptions, ZodGenerateOptions, EndpointsGenerateOptions, QueriesGenerateOptions, InfiniteQueriesGenerateOptions, ACLGenerateOptions, BuilderConfigsGenerateOptions {
68
+ }
51
69
  export {};
@@ -0,0 +1,12 @@
1
+ import { Endpoint, ExtendedEndpoint } from "src/generators/types/endpoint";
2
+ import { GenerateOptions } from "src/generators/types/options";
3
+ export declare const isGetEndpoint: (endpoint: Endpoint) => boolean;
4
+ export declare const isPaginatedGetEndpoint: (endpoint: Endpoint, options: GenerateOptions) => boolean;
5
+ export declare const isReadAllEndpoint: (endpoint: ExtendedEndpoint, options: GenerateOptions) => boolean;
6
+ export declare const isReadEndpoint: (endpoint: ExtendedEndpoint, readAllEndpoint: ExtendedEndpoint) => boolean | undefined;
7
+ export declare const isCreateEndpoint: (endpoint: ExtendedEndpoint, readAllEndpoint: ExtendedEndpoint) => boolean;
8
+ export declare const isUpdateEndpoint: (endpoint: ExtendedEndpoint, readAllEndpoint: ExtendedEndpoint) => boolean | undefined;
9
+ export declare const isDeleteEndpoint: (endpoint: ExtendedEndpoint, readAllEndpoint: ExtendedEndpoint) => boolean | undefined;
10
+ export declare const isBulkDeleteEndpoint: (endpoint: ExtendedEndpoint, readAllEndpoint: ExtendedEndpoint) => boolean;
11
+ export declare const getPathSegments: (path: string) => string[];
12
+ export declare const isPathSegmentParam: (pathSegment?: string) => boolean | undefined;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ import { BuilderConfig } from "src/generators/types/builder-config";
2
+ import { GenerateTypeParams } from "src/generators/types/generate";
3
+ export declare function getBuilderConfigs({ data, tag, resolver }: GenerateTypeParams): {
4
+ configs: never[];
5
+ hasZodImport?: undefined;
6
+ modelsImports?: undefined;
7
+ queriesImports?: undefined;
8
+ aclImports?: undefined;
9
+ } | {
10
+ configs: BuilderConfig[];
11
+ hasZodImport: boolean;
12
+ modelsImports: import("src/generators/types/generate").Import[];
13
+ queriesImports: import("src/generators/types/generate").Import[];
14
+ aclImports: import("src/generators/types/generate").Import[];
15
+ };
@@ -1,14 +1,13 @@
1
1
  import { OpenAPIV3 } from "openapi-types";
2
2
  import { SchemaResolver } from "src/generators/core/SchemaResolver.class";
3
- import { GenerateOptions } from "src/generators/types/options";
4
3
  import { Endpoint } from "src/generators/types/endpoint";
4
+ import { GenerateOptions } from "src/generators/types/options";
5
5
  export declare const getEndpointName: (endpoint: Endpoint) => string;
6
6
  export declare function getImportedEndpointName(endpoint: Endpoint, options: GenerateOptions): string;
7
7
  export declare const requiresBody: (endpoint: Endpoint) => boolean;
8
8
  export declare const getEndpointBody: (endpoint: Endpoint) => import("src/generators/types/endpoint").EndpointParameter | undefined;
9
9
  export declare const hasEndpointConfig: (endpoint: Endpoint, resolver: SchemaResolver) => boolean | undefined;
10
10
  export declare const getEndpointPath: (endpoint: Endpoint) => string;
11
- export declare function getEndpointTag(endpoint: Endpoint, options: GenerateOptions): string;
12
11
  export declare function mapEndpointParamsToFunctionParams(resolver: SchemaResolver, endpoint: Endpoint, options?: {
13
12
  excludeBodyParam?: boolean;
14
13
  excludePageParam?: boolean;
@@ -20,7 +19,7 @@ export declare function mapEndpointParamsToFunctionParams(resolver: SchemaResolv
20
19
  name: string;
21
20
  required: boolean;
22
21
  type: string;
23
- paramType: "Body" | "Query" | "Header" | "Path";
22
+ paramType: "Query" | "Body" | "Header" | "Path";
24
23
  parameterObject: import("../../types/openapi").ParameterObject | undefined;
25
24
  bodyObject: OpenAPIV3.RequestBodyObject | undefined;
26
25
  }[];
@@ -30,7 +29,7 @@ export declare function getEndpointConfig(endpoint: Endpoint): {
30
29
  name: string;
31
30
  value: string;
32
31
  description?: string | undefined;
33
- type: "Body" | "Query" | "Header" | "Path";
32
+ type: "Query" | "Body" | "Header" | "Path";
34
33
  zodSchema: string;
35
34
  parameterObject?: import("../../types/openapi").ParameterObject | undefined;
36
35
  parameterSortingEnumSchemaName?: string | undefined;
@@ -13,6 +13,16 @@ export declare function getEndpointsImports({ tag, endpoints, options, }: {
13
13
  endpoints: Endpoint[];
14
14
  options: GenerateOptions;
15
15
  }): Import[];
16
+ export declare function getQueriesImports({ tag, endpoints, options, }: {
17
+ tag: string;
18
+ endpoints: Endpoint[];
19
+ options: GenerateOptions;
20
+ }): Import[];
21
+ export declare function getInfiniteQueriesImports({ tag, endpoints, options, }: {
22
+ tag: string;
23
+ endpoints: Endpoint[];
24
+ options: GenerateOptions;
25
+ }): Import[];
16
26
  export declare function getAclImports({ tag, endpoints, options, }: {
17
27
  tag: string;
18
28
  endpoints: Endpoint[];
@@ -1,3 +1,6 @@
1
1
  import { Endpoint } from "src/generators/types/endpoint";
2
+ import { GenerateOptions } from "src/generators/types/options";
2
3
  export declare const getQueryName: (endpoint: Endpoint, mutation?: boolean) => string;
3
4
  export declare const getInfiniteQueryName: (endpoint: Endpoint) => string;
5
+ export declare const getImportedQueryName: (endpoint: Endpoint, options: GenerateOptions) => string;
6
+ export declare const getImportedInfiniteQueryName: (endpoint: Endpoint, options: GenerateOptions) => string;
@@ -9,11 +9,6 @@ declare function getTagFileNameWithoutExtension({ type, tag, options, includeTag
9
9
  }): string;
10
10
  export declare function getTagImportPath(...args: Parameters<typeof getTagFileNameWithoutExtension>): string;
11
11
  export declare function getTagFileName(...args: Parameters<typeof getTagFileNameWithoutExtension>): string;
12
- export declare const getNamespaceName: ({ type, tag, options, }: {
13
- type: GenerateType;
14
- tag: string;
15
- options: GenerateOptions;
16
- }) => string;
17
12
  export declare function getAppRestClientImportPath(options: GenerateOptions): string;
18
13
  export declare function getQueryTypesImportPath(options: GenerateOptions): string;
19
14
  export declare function getQueryModulesImportPath(options: GenerateOptions): string;
@@ -5,7 +5,7 @@ import { GenerateOptions } from "src/generators/types/options";
5
5
  export declare const getZodSchemaInferedTypeName: (zodSchemaName: string, options: GenerateOptions) => string;
6
6
  export declare const getImportedZodSchemaName: (resolver: SchemaResolver, zodSchemaName: string) => string;
7
7
  export declare const getImportedZodSchemaInferedTypeName: (resolver: SchemaResolver, zodSchemaName: string, currentTag?: string) => string;
8
- export declare function getZodSchemaType(data: GenerateZodSchemaData): OpenAPIV3.NonArraySchemaObjectType | "array" | "enum";
8
+ export declare function getZodSchemaType(data: GenerateZodSchemaData): "enum" | "array" | OpenAPIV3.NonArraySchemaObjectType;
9
9
  export declare function getZodSchemaDescription(data: GenerateZodSchemaData): string | undefined;
10
10
  export declare function getZodSchemaPropertyDescriptions(resolver: SchemaResolver, data: GenerateZodSchemaData, tag: string): never[] | Record<string, {
11
11
  type: string;
@@ -1 +1,2 @@
1
- export declare function registerQueryHbsHelpers(): void;
1
+ import { SchemaResolver } from "src/generators/core/SchemaResolver.class";
2
+ export declare function registerQueryHbsHelpers(resolver: SchemaResolver): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import { GenerateType } from "src/generators/types/generate";
2
+ import { GenerateOptions } from "src/generators/types/options";
3
+ export declare const getNamespaceName: ({ type, tag, options, }: {
4
+ type: GenerateType;
5
+ tag: string;
6
+ options: GenerateOptions;
7
+ }) => string;
@@ -0,0 +1 @@
1
+ export {};
@@ -3,10 +3,10 @@ export declare function isReferenceObject(obj: unknown): obj is OpenAPIV3.Refere
3
3
  export declare function isSchemaObject(schema: OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject): schema is OpenAPIV3.SchemaObject;
4
4
  export declare function isArraySchemaObject(schema: OpenAPIV3.SchemaObject): schema is OpenAPIV3.ArraySchemaObject;
5
5
  export declare function inferRequiredSchema(schema: OpenAPIV3.SchemaObject): {
6
- noRequiredOnlyAllof: (OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject)[];
6
+ noRequiredOnlyAllof: (OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject)[];
7
7
  composedRequiredSchema: {
8
8
  properties: {
9
- [propertyName: string]: OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject;
9
+ [propertyName: string]: OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject;
10
10
  };
11
11
  type: "object";
12
12
  required: string[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { SchemaResolver } from "src/generators/core/SchemaResolver.class";
2
2
  import { Endpoint } from "src/generators/types/endpoint";
3
+ import { GenerateOptions } from "src/generators/types/options";
3
4
  export declare const isQuery: (endpoint: Endpoint) => boolean;
4
5
  export declare const isMutation: (endpoint: Endpoint) => boolean;
5
- export declare const isInfiniteQuery: (endpoint: Endpoint, infiniteQueryParams?: string[]) => boolean;
6
+ export declare const isInfiniteQuery: (endpoint: Endpoint, options: GenerateOptions) => boolean;
6
7
  export declare const getDestructuredVariables: (resolver: SchemaResolver, endpoint: Endpoint, updateQueryEndpoints: Endpoint[]) => string[];
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,7 @@
1
+ import { Endpoint } from "src/generators/types/endpoint";
1
2
  import { OperationObject } from "src/generators/types/openapi";
2
3
  import { GenerateOptions } from "src/generators/types/options";
3
4
  export declare function formatTag(tag: string): string;
4
5
  export declare function getOperationTag(operation: OperationObject, options: GenerateOptions): string;
6
+ export declare function getEndpointTag(endpoint: Endpoint, options: GenerateOptions): string;
5
7
  export declare function isTagExcluded(tag: string, options: GenerateOptions): boolean;