@bitstack/ng-query-codegen-openapi 0.0.31-alpha.7 → 0.0.31-alpha.9

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/lib/bin/cli.mjs CHANGED
@@ -69,7 +69,7 @@ ${u}}`}}else n.additionalProperties?r=`Record<string, ${n.additionalProperties==
69
69
  * ${i.summary}
70
70
  */
71
71
  ${i.operationName}Query(args: IRestFulEndpointsQueryReturn<${i.argTypeName}>): Observable<QueryState<${i.responseTypeName}>> {
72
- return this.ntkQuery.query<${i.responseTypeName}, ${i.isVoidArg?"void":`IRestFulEndpointsQueryReturn<${i.argTypeName}>`}>({
72
+ return this.ntkQuery.query<${i.responseTypeName}, ${i.isVoidArg?"{}":`IRestFulEndpointsQueryReturn<${i.argTypeName}>`}>({
73
73
  queryKey: [ECacheTagTypes.${i.queryKeyName}${i.isVoidArg?"":", args.variables"}],
74
74
  queryFn: () => {
75
75
  return this.apiService.${i.operationName}(args);
@@ -85,7 +85,7 @@ ${u}}`}}else n.additionalProperties?r=`Record<string, ${n.additionalProperties==
85
85
  variables: ${i.isVoidArg?"void":i.argTypeName};
86
86
  fetchOptions?: RequestOptions;
87
87
  }, HttpErrorResponse> {
88
- return this.ntkQuery.mutation<${i.responseTypeName}, ${i.isVoidArg?"void":`IRestFulEndpointsQueryReturn<${i.argTypeName}>`}, HttpErrorResponse>({
88
+ return this.ntkQuery.mutation<${i.responseTypeName}, ${i.isVoidArg?"{}":`IRestFulEndpointsQueryReturn<${i.argTypeName}>`}, HttpErrorResponse>({
89
89
  endpointName: '${i.operationName}',
90
90
  mutationFn: (args) => {
91
91
  return this.apiService.${i.operationName}(args);
@@ -99,7 +99,7 @@ ${u}}`}}else n.additionalProperties?r=`Record<string, ${n.additionalProperties==
99
99
  trigger: (args: IRestFulEndpointsQueryReturn<${i.argTypeName}>, options?: { skipCache?: boolean }) => Observable<${i.responseTypeName}>
100
100
  } {
101
101
  return {
102
- trigger: (${i.isVoidArg?"":"args, "}options = {}) => {
102
+ trigger: (args, options = {}) => {
103
103
  const { skipCache = true } = options;
104
104
  if (!skipCache) {
105
105
  const cachedResult = this.ntkQuery.getQueryCache<${i.responseTypeName}>([ECacheTagTypes.${i.queryKeyName}${i.isVoidArg?"":", args.variables"}]);