mobx-tanstack-query-api 0.0.24 → 0.0.26
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-request-info.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/new-request-info.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG/E,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACf,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,WAAW,CAAC;IACnB,aAAa,EAAE,wBAAwB,CAAC;IACxC,SAAS,EAAE,cAAc,CAAC;IAC1B,gBAAgB,EAAE,mBAAmB,CAAC;IACtC,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAiBD,eAAO,MAAM,kBAAkB,mDAK5B,wBAAwB;;;
|
|
1
|
+
{"version":3,"file":"new-request-info.tmpl.d.ts","sourceRoot":"","sources":["../../../src/codegen/templates/new-request-info.tmpl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG/E,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACf,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,WAAW,CAAC;IACnB,aAAa,EAAE,wBAAwB,CAAC;IACxC,SAAS,EAAE,cAAc,CAAC;IAC1B,gBAAgB,EAAE,mBAAmB,CAAC;IACtC,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAiBD,eAAO,MAAM,kBAAkB,mDAK5B,wBAAwB;;;CAqO1B,CAAC"}
|
|
@@ -69,9 +69,15 @@ export const newRequestInfoTmpl = ({ route, apiParams, importFileParams, utils,
|
|
|
69
69
|
return {
|
|
70
70
|
type: 'static',
|
|
71
71
|
value: param,
|
|
72
|
-
i,
|
|
73
72
|
};
|
|
74
73
|
});
|
|
74
|
+
const dataParamStruct = payload == null
|
|
75
|
+
? null
|
|
76
|
+
: {
|
|
77
|
+
type: 'dynamic',
|
|
78
|
+
key: payload.name,
|
|
79
|
+
param: lastDynamicStructPos++,
|
|
80
|
+
};
|
|
75
81
|
const queryParamStruct = query == null
|
|
76
82
|
? null
|
|
77
83
|
: {
|
|
@@ -164,6 +170,10 @@ new ${importFileParams.endpoint.exportName}<
|
|
|
164
170
|
}
|
|
165
171
|
return `"${struct.value}"`;
|
|
166
172
|
}),
|
|
173
|
+
dataParamStruct &&
|
|
174
|
+
`
|
|
175
|
+
{ name: "${dataParamStruct.key}", param: ${dataParamStruct.param} }
|
|
176
|
+
`,
|
|
167
177
|
queryParamStruct &&
|
|
168
178
|
`{ name: "${queryParamStruct.key}", rest: true }`,
|
|
169
179
|
requestConfigParam &&
|
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@ export class EndpointQuery extends MobxQuery {
|
|
|
50
50
|
static buildOptionsFromInput(endpoint, input) {
|
|
51
51
|
return {
|
|
52
52
|
enabled: !!input,
|
|
53
|
-
queryKey: input ? endpoint.getQueryKey(input) : '__SKIP__',
|
|
53
|
+
queryKey: input ? endpoint.getQueryKey(input) : ['__SKIP__'],
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
buildOptionsFromInput(input) {
|