@povio/openapi-codegen-cli 0.13.4 → 0.13.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/openapi-codegen-cli",
3
- "version": "0.13.4",
3
+ "version": "0.13.6",
4
4
  "main": "./dist/index.js",
5
5
  "bin": {
6
6
  "openapi-codegen": "./dist/sh.js"
@@ -0,0 +1 @@
1
+ checkAcl({{importedAbilityFunctionName endpoint}}({{#if generateAclCheckParams}}{ {{#each (abilityConditionsTypes endpoint) as | propertyType |}}{{propertyType.name}}, {{/each}} } {{/if}}));
@@ -8,7 +8,7 @@ export const {{infiniteQueryName endpoint}} = <TData>({{#if (endpointParams endp
8
8
  return {{infiniteQueryHook}}({
9
9
  queryKey: keys.{{endpointName endpoint}}Infinite({{#if (endpointParams endpoint)}}{{{endpointArgs endpoint excludePageParam=true}}}{{/if}}),
10
10
  queryFn: ({ pageParam }) => {{#if hasQueryFnBody}}{ {{/if}}
11
- {{#if hasAclCheck}}checkAcl({{genAclCheckParams endpoint}});{{/if}}
11
+ {{#if hasAclCheck}}{{{genAclCheckCall endpoint}}}{{/if}}
12
12
  {{#if hasQueryFnBody}}return {{/if}}{{importedEndpointName endpoint}}({{{endpointArgs endpoint replacePageParam=true}}}{{#if hasAxiosRequestConfig}}, {{axiosRequestConfigName}}{{/if}})
13
13
  {{#if hasQueryFnBody}} }{{/if}},
14
14
  initialPageParam: 1,
@@ -9,7 +9,7 @@ export const {{queryName endpoint mutation=true}} = (options?: AppMutationOption
9
9
 
10
10
  return {{queryHook}}({
11
11
  mutationFn: {{#if endpoint.mediaUpload}}async {{/if}}({{#if (endpointParams endpoint includeFileParam=true)}} { {{{endpointArgs endpoint includeFileParam=true}}} } {{/if}}) => {{#if hasMutationFnBody}} { {{/if}}
12
- {{#if hasAclCheck}}checkAcl({{genAclCheckParams endpoint}});{{/if}}
12
+ {{#if hasAclCheck}}{{{genAclCheckCall endpoint}}}{{/if}}
13
13
  {{#if endpoint.mediaUpload}}const uploadInstructions = await {{importedEndpointName endpoint}}({{{endpointArgs endpoint}}}{{#if hasAxiosRequestConfig}}{{#if (endpointArgs endpoint)}}, {{/if}}{{axiosRequestConfigName}}{{/if}});
14
14
 
15
15
  if (file && uploadInstructions.url) {
@@ -8,7 +8,7 @@ export const {{queryName endpoint}} = <TData>({{#if (endpointParams endpoint)}}{
8
8
  return {{queryHook}}({
9
9
  queryKey: keys.{{endpointName endpoint}}({{#if (endpointParams endpoint)}}{{{endpointArgs endpoint}}}{{/if}}),
10
10
  queryFn: {{#if hasQueryFn}}() => {{#if hasQueryFnBody}}{ {{/if}}
11
- {{#if hasAclCheck}}checkAcl({{genAclCheckParams endpoint}});{{/if}}
11
+ {{#if hasAclCheck}}{{{genAclCheckCall endpoint}}}{{/if}}
12
12
  {{#if hasQueryFnBody}}return {{/if}}{{importedEndpointName endpoint}}({{{endpointArgs endpoint}}}{{#if hasAxiosRequestConfig}}{{#if (endpointArgs endpoint)}}, {{/if}}{{axiosRequestConfigName}}{{/if}}){{else}}{{importedEndpointName endpoint}}{{/if}}
13
13
  {{#if hasQueryFnBody}} }{{/if}},
14
14
  ...options,
@@ -26,6 +26,10 @@
26
26
  {{#each endpointsImports as | endpointsImport |}}
27
27
  {{{genImport endpointsImport}}}
28
28
  {{/each}}
29
+ {{! Acl import }}
30
+ {{#each aclImports as | aclImport |}}
31
+ {{{genImport aclImport}}}
32
+ {{/each}}
29
33
 
30
34
  {{#if includeNamespace}}
31
35
  export namespace {{namespace}} {
@@ -1 +0,0 @@
1
- {{#if generateAclCheckParams}}{ {{#each (abilityConditionsTypes endpoint) as | propertyType |}}{{propertyType.name}}, {{/each}} } {{/if}}