@kubb/plugin-solid-query 3.16.2 → 3.16.4

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 (39) hide show
  1. package/dist/components-CNM6UaoG.js +320 -0
  2. package/dist/components-CNM6UaoG.js.map +1 -0
  3. package/dist/components-LAcBpjX8.cjs +366 -0
  4. package/dist/components-LAcBpjX8.cjs.map +1 -0
  5. package/dist/components.cjs +4 -19
  6. package/dist/components.d.cts +143 -57
  7. package/dist/components.d.ts +143 -57
  8. package/dist/components.js +3 -3
  9. package/dist/generators-DS71XOIi.cjs +199 -0
  10. package/dist/generators-DS71XOIi.cjs.map +1 -0
  11. package/dist/generators-DU74wsZY.js +194 -0
  12. package/dist/generators-DU74wsZY.js.map +1 -0
  13. package/dist/generators.cjs +3 -12
  14. package/dist/generators.d.cts +5 -7
  15. package/dist/generators.d.ts +5 -7
  16. package/dist/generators.js +4 -4
  17. package/dist/index.cjs +97 -128
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +6 -8
  20. package/dist/index.d.ts +6 -8
  21. package/dist/index.js +97 -122
  22. package/dist/index.js.map +1 -1
  23. package/dist/types-C4Kxe-X1.d.ts +1335 -0
  24. package/dist/types-DULzisVA.d.cts +1335 -0
  25. package/package.json +23 -28
  26. package/dist/chunk-DVQAS6QW.cjs +0 -265
  27. package/dist/chunk-DVQAS6QW.cjs.map +0 -1
  28. package/dist/chunk-IH7LFLIP.cjs +0 -161
  29. package/dist/chunk-IH7LFLIP.cjs.map +0 -1
  30. package/dist/chunk-U7KQKXOC.js +0 -159
  31. package/dist/chunk-U7KQKXOC.js.map +0 -1
  32. package/dist/chunk-XXQM3BYJ.js +0 -261
  33. package/dist/chunk-XXQM3BYJ.js.map +0 -1
  34. package/dist/components.cjs.map +0 -1
  35. package/dist/components.js.map +0 -1
  36. package/dist/generators.cjs.map +0 -1
  37. package/dist/generators.js.map +0 -1
  38. package/dist/types-Cx6RgBxP.d.cts +0 -114
  39. package/dist/types-Cx6RgBxP.d.ts +0 -114
@@ -1,114 +0,0 @@
1
- import { Output, Group, PluginFactoryOptions, ResolveNameParams } from '@kubb/core';
2
- import { Oas, contentType, Operation, HttpMethod } from '@kubb/oas';
3
- import { PluginClient } from '@kubb/plugin-client';
4
- import { Exclude, Include, Override, ResolvePathOptions, OperationSchemas, Generator } from '@kubb/plugin-oas';
5
-
6
- type TransformerProps = {
7
- operation: Operation;
8
- schemas: OperationSchemas;
9
- casing: 'camelcase' | undefined;
10
- };
11
- type Transformer = (props: TransformerProps) => unknown[];
12
- /**
13
- * Customize the queryKey
14
- */
15
- type QueryKey = Transformer;
16
- type Query = {
17
- /**
18
- * Define which HttpMethods can be used for queries
19
- * @default ['get']
20
- */
21
- methods: Array<HttpMethod>;
22
- /**
23
- * Path to the useQuery that will be used to do the useQuery functionality.
24
- * It will be used as `import { useQuery } from '${importPath}'`.
25
- * It allows both relative and absolute path.
26
- * the path will be applied as is, so relative path should be based on the file being generated.
27
- * @default '@tanstack/svelte-query'
28
- */
29
- importPath?: string;
30
- };
31
- type Options = {
32
- /**
33
- * Specify the export location for the files and define the behavior of the output
34
- * @default { path: 'hooks', barrelType: 'named' }
35
- */
36
- output?: Output<Oas>;
37
- /**
38
- * Define which contentType should be used.
39
- * By default, the first JSON valid mediaType will be used
40
- */
41
- contentType?: contentType;
42
- /**
43
- * Group the @tanstack/query hooks based on the provided name.
44
- */
45
- group?: Group;
46
- client?: Pick<PluginClient['options'], 'dataReturnType' | 'importPath' | 'baseURL'>;
47
- /**
48
- * Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
49
- */
50
- exclude?: Array<Exclude>;
51
- /**
52
- * Array containing include parameters to include tags/operations/methods/paths.
53
- */
54
- include?: Array<Include>;
55
- /**
56
- * Array containing override parameters to override `options` based on tags/operations/methods/paths.
57
- */
58
- override?: Array<Override<ResolvedOptions>>;
59
- /**
60
- * How to style your params, by default no casing is applied
61
- * - 'camelcase' will use camelcase for the params names
62
- */
63
- paramsCasing?: 'camelcase';
64
- /**
65
- * How to pass your params
66
- * - 'object' will return the params and pathParams as an object.
67
- * - 'inline' will return the params as comma separated params.
68
- * @default 'inline'
69
- */
70
- paramsType?: 'object' | 'inline';
71
- /**
72
- * How to pass your pathParams.
73
- * - 'object' will return the pathParams as an object.
74
- * - 'inline' will return the pathParams as comma separated params.
75
- * @default 'inline'
76
- */
77
- pathParamsType?: PluginClient['options']['pathParamsType'];
78
- queryKey?: QueryKey;
79
- /**
80
- * Override some useQuery behaviours.
81
- */
82
- query?: Partial<Query> | false;
83
- /**
84
- * Which parser should be used before returning the data to `@tanstack/query`.
85
- * `'zod'` will use `@kubb/plugin-zod` to parse the data.
86
- */
87
- parser?: PluginClient['options']['parser'];
88
- transformers?: {
89
- /**
90
- * Customize the names based on the type that is provided by the plugin.
91
- */
92
- name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
93
- };
94
- /**
95
- * Define some generators next to the solid-query generators
96
- */
97
- generators?: Array<Generator<PluginSolidQuery>>;
98
- };
99
- type ResolvedOptions = {
100
- output: Output<Oas>;
101
- group: Options['group'];
102
- client: Required<Omit<NonNullable<PluginSolidQuery['options']['client']>, 'baseURL'>> & {
103
- baseURL?: string;
104
- };
105
- parser: Required<NonNullable<Options['parser']>>;
106
- paramsCasing: Options['paramsCasing'];
107
- paramsType: NonNullable<Options['paramsType']>;
108
- pathParamsType: NonNullable<Options['pathParamsType']>;
109
- queryKey: QueryKey | undefined;
110
- query: NonNullable<Required<Query>> | false;
111
- };
112
- type PluginSolidQuery = PluginFactoryOptions<'plugin-solid-query', Options, ResolvedOptions, never, ResolvePathOptions>;
113
-
114
- export type { Options as O, PluginSolidQuery as P, Transformer as T };