@medusajs/framework 1.0.0-rc-20241001083650 → 1.0.0-rc-20241003153304

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. package/dist/config/types.d.ts +1 -1
  2. package/dist/container.d.ts +2 -8
  3. package/dist/container.d.ts.map +1 -1
  4. package/dist/container.js.map +1 -1
  5. package/dist/http/index.d.ts +7 -0
  6. package/dist/http/index.d.ts.map +1 -1
  7. package/dist/http/index.js +7 -0
  8. package/dist/http/index.js.map +1 -1
  9. package/dist/http/middlewares/apply-default-filters.d.ts +3 -0
  10. package/dist/http/middlewares/apply-default-filters.d.ts.map +1 -0
  11. package/dist/http/middlewares/apply-default-filters.js +32 -0
  12. package/dist/http/middlewares/apply-default-filters.js.map +1 -0
  13. package/dist/http/middlewares/apply-params-as-filters.d.ts +5 -0
  14. package/dist/http/middlewares/apply-params-as-filters.d.ts.map +1 -0
  15. package/dist/http/middlewares/apply-params-as-filters.js +14 -0
  16. package/dist/http/middlewares/apply-params-as-filters.js.map +1 -0
  17. package/dist/http/middlewares/clear-filters-by-key.d.ts +3 -0
  18. package/dist/http/middlewares/clear-filters-by-key.d.ts.map +1 -0
  19. package/dist/http/middlewares/clear-filters-by-key.js +12 -0
  20. package/dist/http/middlewares/clear-filters-by-key.js.map +1 -0
  21. package/dist/http/middlewares/ensure-publishable-api-key.d.ts +3 -0
  22. package/dist/http/middlewares/ensure-publishable-api-key.d.ts.map +1 -0
  23. package/dist/http/middlewares/ensure-publishable-api-key.js +49 -0
  24. package/dist/http/middlewares/ensure-publishable-api-key.js.map +1 -0
  25. package/dist/http/middlewares/error-handler.d.ts.map +1 -1
  26. package/dist/http/middlewares/error-handler.js.map +1 -1
  27. package/dist/http/middlewares/index.d.ts +4 -0
  28. package/dist/http/middlewares/index.d.ts.map +1 -1
  29. package/dist/http/middlewares/index.js +4 -0
  30. package/dist/http/middlewares/index.js.map +1 -1
  31. package/dist/http/middlewares/set-context.d.ts +3 -0
  32. package/dist/http/middlewares/set-context.d.ts.map +1 -0
  33. package/dist/http/middlewares/set-context.js +18 -0
  34. package/dist/http/middlewares/set-context.js.map +1 -0
  35. package/dist/http/router.d.ts +4 -0
  36. package/dist/http/router.d.ts.map +1 -1
  37. package/dist/http/router.js +14 -0
  38. package/dist/http/router.js.map +1 -1
  39. package/dist/http/types.d.ts +1 -10
  40. package/dist/http/types.d.ts.map +1 -1
  41. package/dist/http/types.js.map +1 -1
  42. package/dist/http/utils/get-query-config.d.ts +38 -0
  43. package/dist/http/utils/get-query-config.d.ts.map +1 -0
  44. package/dist/http/utils/get-query-config.js +163 -0
  45. package/dist/http/utils/get-query-config.js.map +1 -0
  46. package/dist/http/utils/http-compression.d.ts +5 -0
  47. package/dist/http/utils/http-compression.d.ts.map +1 -0
  48. package/dist/http/utils/http-compression.js +33 -0
  49. package/dist/http/utils/http-compression.js.map +1 -0
  50. package/dist/http/utils/maybe-apply-link-filter.d.ts +8 -0
  51. package/dist/http/utils/maybe-apply-link-filter.d.ts.map +1 -0
  52. package/dist/http/utils/maybe-apply-link-filter.js +71 -0
  53. package/dist/http/utils/maybe-apply-link-filter.js.map +1 -0
  54. package/dist/http/utils/refetch-entities.d.ts +5 -0
  55. package/dist/http/utils/refetch-entities.d.ts.map +1 -0
  56. package/dist/http/utils/refetch-entities.js +29 -0
  57. package/dist/http/utils/refetch-entities.js.map +1 -0
  58. package/dist/http/utils/unless-path.d.ts +9 -0
  59. package/dist/http/utils/unless-path.d.ts.map +1 -0
  60. package/dist/http/utils/unless-path.js +19 -0
  61. package/dist/http/utils/unless-path.js.map +1 -0
  62. package/dist/http/utils/validate-body.d.ts +5 -0
  63. package/dist/http/utils/validate-body.d.ts.map +1 -0
  64. package/dist/http/utils/validate-body.js +23 -0
  65. package/dist/http/utils/validate-body.js.map +1 -0
  66. package/dist/http/utils/validate-query.d.ts +6 -0
  67. package/dist/http/utils/validate-query.d.ts.map +1 -0
  68. package/dist/http/utils/validate-query.js +69 -0
  69. package/dist/http/utils/validate-query.js.map +1 -0
  70. package/dist/index.d.ts +1 -0
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +1 -0
  73. package/dist/index.js.map +1 -1
  74. package/dist/jobs/index.d.ts +1 -1
  75. package/dist/medusa-app-loader.d.ts +3 -2
  76. package/dist/medusa-app-loader.d.ts.map +1 -1
  77. package/dist/medusa-app-loader.js.map +1 -1
  78. package/dist/mikro-orm-cli/bin.d.ts +14 -0
  79. package/dist/mikro-orm-cli/bin.d.ts.map +1 -0
  80. package/dist/mikro-orm-cli/bin.js +54 -0
  81. package/dist/mikro-orm-cli/bin.js.map +1 -0
  82. package/dist/zod/index.d.ts +2 -0
  83. package/dist/zod/index.d.ts.map +1 -0
  84. package/dist/zod/index.js +18 -0
  85. package/dist/zod/index.js.map +1 -0
  86. package/dist/zod/zod-helpers.d.ts +3 -0
  87. package/dist/zod/zod-helpers.d.ts.map +1 -0
  88. package/dist/zod/zod-helpers.js +95 -0
  89. package/dist/zod/zod-helpers.js.map +1 -0
  90. package/package.json +19 -10
  91. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -735,7 +735,7 @@ export type ProjectConfigOptions = {
735
735
  *
736
736
  * The configurations for your Medusa application are in `medusa-config.js` located in the root of your Medusa project. The configurations include configurations for database, modules, and more.
737
737
  *
738
- * `medusa-config.js` exports the value returned by the `defineConfig` utility function imported from `@medusajs/utils`.
738
+ * `medusa-config.js` exports the value returned by the `defineConfig` utility function imported from `@medusajs/framework/utils`.
739
739
  *
740
740
  * `defineConfig` accepts as a parameter an object with the following properties:
741
741
  *
@@ -1,16 +1,10 @@
1
1
  import { AwilixContainer, ResolveOptions } from "awilix";
2
- import { TransformObjectMethodToAsync } from "@medusajs/types";
3
- /**
4
- * The following interface acts as a bucket that other modules or the
5
- * utils package can fill using declaration merging
6
- */
7
- export interface ModuleImplementations {
8
- }
2
+ import { ModuleImplementations } from "@medusajs/types";
9
3
  /**
10
4
  * The Medusa Container extends [Awilix](https://github.com/jeffijoe/awilix) to
11
5
  * provide dependency injection functionalities.
12
6
  */
13
- export type MedusaContainer<Cradle extends object = TransformObjectMethodToAsync<ModuleImplementations>> = Omit<AwilixContainer, "resolve"> & {
7
+ export type MedusaContainer<Cradle extends object = ModuleImplementations> = Omit<AwilixContainer, "resolve"> & {
14
8
  resolve<K extends keyof Cradle>(key: K, resolveOptions?: ResolveOptions): Cradle[K];
15
9
  resolve<T>(key: string, resolveOptions?: ResolveOptions): T;
16
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../src/container.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,qBAAqB;CAAG;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,MAAM,SAAS,MAAM,GAAG,4BAA4B,CAAC,qBAAqB,CAAC,IACrG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IACjC,OAAO,CAAC,CAAC,SAAS,MAAM,MAAM,EAC5B,GAAG,EAAE,CAAC,EACN,cAAc,CAAC,EAAE,cAAc,GAC9B,MAAM,CAAC,CAAC,CAAC,CAAA;IACZ,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,CAAC,CAAA;IAE3D;;OAEG;IACH,WAAW,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,KAAK,eAAe,CAAA;IAClE;;OAEG;IACH,WAAW,EAAE,MAAM,eAAe,CAAA;CACnC,CAAA;AAEH,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,SAAS,2CAA0B,CAAA"}
1
+ {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../src/container.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAEvD;;;GAGG;AAEH,MAAM,MAAM,eAAe,CAAC,MAAM,SAAS,MAAM,GAAG,qBAAqB,IACvE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IACjC,OAAO,CAAC,CAAC,SAAS,MAAM,MAAM,EAC5B,GAAG,EAAE,CAAC,EACN,cAAc,CAAC,EAAE,cAAc,GAC9B,MAAM,CAAC,CAAC,CAAC,CAAA;IACZ,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,CAAC,CAAA;IAE3D;;OAEG;IACH,WAAW,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,KAAK,eAAe,CAAA;IAClE;;OAEG;IACH,WAAW,EAAE,MAAM,eAAe,CAAA;CACnC,CAAA;AAEH,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,SAAS,2CAA0B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"container.js","sourceRoot":"","sources":["../src/container.ts"],"names":[],"mappings":";;;AAAA,2CAAuD;AAoC1C,QAAA,SAAS,GAAG,IAAA,6BAAqB,GAAE,CAAA"}
1
+ {"version":3,"file":"container.js","sourceRoot":"","sources":["../src/container.ts"],"names":[],"mappings":";;;AAAA,2CAAuD;AA+B1C,QAAA,SAAS,GAAG,IAAA,6BAAqB,GAAE,CAAA"}
@@ -2,5 +2,12 @@ export * from "./express-loader";
2
2
  export * from "./router";
3
3
  export * from "./types";
4
4
  export * from "./middlewares";
5
+ export * from "./utils/http-compression";
6
+ export * from "./utils/validate-body";
7
+ export * from "./utils/validate-query";
8
+ export * from "./utils/get-query-config";
5
9
  export * from "./utils/define-middlewares";
10
+ export * from "./utils/maybe-apply-link-filter";
11
+ export * from "./utils/refetch-entities";
12
+ export * from "./utils/unless-path";
6
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,4BAA4B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA"}
@@ -18,5 +18,12 @@ __exportStar(require("./express-loader"), exports);
18
18
  __exportStar(require("./router"), exports);
19
19
  __exportStar(require("./types"), exports);
20
20
  __exportStar(require("./middlewares"), exports);
21
+ __exportStar(require("./utils/http-compression"), exports);
22
+ __exportStar(require("./utils/validate-body"), exports);
23
+ __exportStar(require("./utils/validate-query"), exports);
24
+ __exportStar(require("./utils/get-query-config"), exports);
21
25
  __exportStar(require("./utils/define-middlewares"), exports);
26
+ __exportStar(require("./utils/maybe-apply-link-filter"), exports);
27
+ __exportStar(require("./utils/refetch-entities"), exports);
28
+ __exportStar(require("./utils/unless-path"), exports);
22
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,2CAAwB;AACxB,0CAAuB;AACvB,gDAA6B;AAC7B,6DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/http/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,2CAAwB;AACxB,0CAAuB;AACvB,gDAA6B;AAC7B,2DAAwC;AACxC,wDAAqC;AACrC,yDAAsC;AACtC,2DAAwC;AACxC,6DAA0C;AAC1C,kEAA+C;AAC/C,2DAAwC;AACxC,sDAAmC"}
@@ -0,0 +1,3 @@
1
+ import { MedusaNextFunction, MedusaRequest } from "../types";
2
+ export declare function applyDefaultFilters<TFilter extends object>(filtersToApply: TFilter): (req: MedusaRequest, _: any, next: MedusaNextFunction) => Promise<void>;
3
+ //# sourceMappingURL=apply-default-filters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-default-filters.d.ts","sourceRoot":"","sources":["../../../src/http/middlewares/apply-default-filters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE5D,wBAAgB,mBAAmB,CAAC,OAAO,SAAS,MAAM,EACxD,cAAc,EAAE,OAAO,SAEJ,aAAa,gBAAW,kBAAkB,mBA8B9D"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.applyDefaultFilters = applyDefaultFilters;
4
+ const utils_1 = require("@medusajs/utils");
5
+ function applyDefaultFilters(filtersToApply) {
6
+ return async (req, _, next) => {
7
+ for (const [filter, filterValue] of Object.entries(filtersToApply)) {
8
+ let valueToApply = filterValue;
9
+ // If certain manipulations need to be done on a middleware level, we can provide a simple
10
+ // function that mutates the data based on any custom requirement
11
+ if (typeof filterValue === "function") {
12
+ // pass the actual filterable fields so that the function can mutate the original object.
13
+ // Currently we only need it to delete filter keys from the request filter object, but this could
14
+ // be used for other purposes. If we can't find other purposes, we can refactor to accept an array
15
+ // of strings to delete after filters have been applied.
16
+ valueToApply = filterValue(req.filterableFields, req.remoteQueryConfig.fields);
17
+ }
18
+ // If the value to apply is an object, we add it to any existing filters thats already applied
19
+ if ((0, utils_1.isObject)(valueToApply)) {
20
+ req.filterableFields[filter] = {
21
+ ...(req.filterableFields[filter] || {}),
22
+ ...valueToApply,
23
+ };
24
+ }
25
+ else if ((0, utils_1.isPresent)(valueToApply)) {
26
+ req.filterableFields[filter] = valueToApply;
27
+ }
28
+ }
29
+ return next();
30
+ };
31
+ }
32
+ //# sourceMappingURL=apply-default-filters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-default-filters.js","sourceRoot":"","sources":["../../../src/http/middlewares/apply-default-filters.ts"],"names":[],"mappings":";;AAGA,kDAiCC;AApCD,2CAAqD;AAGrD,SAAgB,mBAAmB,CACjC,cAAuB;IAEvB,OAAO,KAAK,EAAE,GAAkB,EAAE,CAAC,EAAE,IAAwB,EAAE,EAAE;QAC/D,KAAK,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;YACnE,IAAI,YAAY,GAAG,WAAW,CAAA;YAE9B,0FAA0F;YAC1F,iEAAiE;YACjE,IAAI,OAAO,WAAW,KAAK,UAAU,EAAE,CAAC;gBACtC,yFAAyF;gBACzF,iGAAiG;gBACjG,kGAAkG;gBAClG,wDAAwD;gBACxD,YAAY,GAAG,WAAW,CACxB,GAAG,CAAC,gBAAgB,EACpB,GAAG,CAAC,iBAAiB,CAAC,MAAM,CAC7B,CAAA;YACH,CAAC;YAED,8FAA8F;YAC9F,IAAI,IAAA,gBAAQ,EAAC,YAAY,CAAC,EAAE,CAAC;gBAC3B,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC,GAAG;oBAC7B,GAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;oBACvC,GAAG,YAAY;iBAChB,CAAA;YACH,CAAC;iBAAM,IAAI,IAAA,iBAAS,EAAC,YAAY,CAAC,EAAE,CAAC;gBACnC,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC,GAAG,YAAY,CAAA;YAC7C,CAAC;QACH,CAAC;QAED,OAAO,IAAI,EAAE,CAAA;IACf,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { MedusaNextFunction, MedusaRequest } from "../types";
2
+ export declare function applyParamsAsFilters(mappings: {
3
+ [param: string]: string;
4
+ }): (req: MedusaRequest, _: any, next: MedusaNextFunction) => Promise<void>;
5
+ //# sourceMappingURL=apply-params-as-filters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-params-as-filters.d.ts","sourceRoot":"","sources":["../../../src/http/middlewares/apply-params-as-filters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE5D,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,SACrD,aAAa,gBAAW,kBAAkB,mBAS9D"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.applyParamsAsFilters = applyParamsAsFilters;
4
+ function applyParamsAsFilters(mappings) {
5
+ return async (req, _, next) => {
6
+ for (const [param, paramValue] of Object.entries(req.params)) {
7
+ if (mappings[param]) {
8
+ req.filterableFields[mappings[param]] = paramValue;
9
+ }
10
+ }
11
+ return next();
12
+ };
13
+ }
14
+ //# sourceMappingURL=apply-params-as-filters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-params-as-filters.js","sourceRoot":"","sources":["../../../src/http/middlewares/apply-params-as-filters.ts"],"names":[],"mappings":";;AAEA,oDAUC;AAVD,SAAgB,oBAAoB,CAAC,QAAqC;IACxE,OAAO,KAAK,EAAE,GAAkB,EAAE,CAAC,EAAE,IAAwB,EAAE,EAAE;QAC/D,KAAK,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7D,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBACpB,GAAG,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAA;YACpD,CAAC;QACH,CAAC;QAED,OAAO,IAAI,EAAE,CAAA;IACf,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { MedusaNextFunction, MedusaRequest } from "../types";
2
+ export declare function clearFiltersByKey(keys: string[]): (req: MedusaRequest, _: any, next: MedusaNextFunction) => Promise<void>;
3
+ //# sourceMappingURL=clear-filters-by-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clear-filters-by-key.d.ts","sourceRoot":"","sources":["../../../src/http/middlewares/clear-filters-by-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE5D,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,SAC3B,aAAa,gBAAW,kBAAkB,mBAO9D"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clearFiltersByKey = clearFiltersByKey;
4
+ function clearFiltersByKey(keys) {
5
+ return async (req, _, next) => {
6
+ keys.forEach((key) => {
7
+ delete req.filterableFields[key];
8
+ });
9
+ return next();
10
+ };
11
+ }
12
+ //# sourceMappingURL=clear-filters-by-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clear-filters-by-key.js","sourceRoot":"","sources":["../../../src/http/middlewares/clear-filters-by-key.ts"],"names":[],"mappings":";;AAEA,8CAQC;AARD,SAAgB,iBAAiB,CAAC,IAAc;IAC9C,OAAO,KAAK,EAAE,GAAkB,EAAE,CAAC,EAAE,IAAwB,EAAE,EAAE;QAC/D,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,OAAO,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAA;QAClC,CAAC,CAAC,CAAA;QAEF,OAAO,IAAI,EAAE,CAAA;IACf,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { MedusaNextFunction, MedusaResponse, MedusaStoreRequest } from "../../http";
2
+ export declare function ensurePublishableApiKeyMiddleware(req: MedusaStoreRequest, _res: MedusaResponse, next: MedusaNextFunction): Promise<void>;
3
+ //# sourceMappingURL=ensure-publishable-api-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure-publishable-api-key.d.ts","sourceRoot":"","sources":["../../../src/http/middlewares/ensure-publishable-api-key.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EACnB,MAAM,YAAY,CAAA;AAEnB,wBAAsB,iCAAiC,CACrD,GAAG,EAAE,kBAAkB,EACvB,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,kBAAkB,iBA2DzB"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ensurePublishableApiKeyMiddleware = ensurePublishableApiKeyMiddleware;
4
+ const utils_1 = require("@medusajs/utils");
5
+ async function ensurePublishableApiKeyMiddleware(req, _res, next) {
6
+ const publishableApiKey = req.get(utils_1.PUBLISHABLE_KEY_HEADER);
7
+ if (!(0, utils_1.isPresent)(publishableApiKey)) {
8
+ try {
9
+ throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_ALLOWED, `Publishable API key required in the request header: ${utils_1.PUBLISHABLE_KEY_HEADER}. You can manage your keys in settings in the dashboard.`);
10
+ }
11
+ catch (e) {
12
+ return next(e);
13
+ }
14
+ }
15
+ let apiKey;
16
+ const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
17
+ try {
18
+ const { data } = await query.graph({
19
+ entity: "api_key",
20
+ fields: ["id", "token", "sales_channels_link.sales_channel_id"],
21
+ filters: {
22
+ token: publishableApiKey,
23
+ type: utils_1.ApiKeyType.PUBLISHABLE,
24
+ $or: [
25
+ { revoked_at: { $eq: null } },
26
+ { revoked_at: { $gt: new Date() } },
27
+ ],
28
+ },
29
+ }, { throwIfKeyNotFound: true });
30
+ apiKey = data[0];
31
+ }
32
+ catch (e) {
33
+ return next(e);
34
+ }
35
+ if (!apiKey) {
36
+ try {
37
+ throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_ALLOWED, `A valid publishable key is required to proceed with the request`);
38
+ }
39
+ catch (e) {
40
+ return next(e);
41
+ }
42
+ }
43
+ req.publishable_key_context = {
44
+ key: apiKey.token,
45
+ sales_channel_ids: apiKey.sales_channels_link.map((link) => link.sales_channel_id),
46
+ };
47
+ return next();
48
+ }
49
+ //# sourceMappingURL=ensure-publishable-api-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure-publishable-api-key.js","sourceRoot":"","sources":["../../../src/http/middlewares/ensure-publishable-api-key.ts"],"names":[],"mappings":";;AAaA,8EA8DC;AA3ED,2CAMwB;AAOjB,KAAK,UAAU,iCAAiC,CACrD,GAAuB,EACvB,IAAoB,EACpB,IAAwB;IAExB,MAAM,iBAAiB,GAAG,GAAG,CAAC,GAAG,CAAC,8BAAsB,CAAC,CAAA;IAEzD,IAAI,CAAC,IAAA,iBAAS,EAAC,iBAAiB,CAAC,EAAE,CAAC;QAClC,IAAI,CAAC;YACH,MAAM,IAAI,mBAAW,CACnB,mBAAW,CAAC,KAAK,CAAC,WAAW,EAC7B,uDAAuD,8BAAsB,0DAA0D,CACxI,CAAA;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,IAAI,CAAC,CAAC,CAAC,CAAA;QAChB,CAAC;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-1 +1 @@
1
- {"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../../src/http/middlewares/error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEhD,OAAO,EAA6B,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAExE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAWxC,wBAAgB,YAAY,UAEnB,WAAW,OACX,aAAa,OACb,QAAQ,QACP,YAAY,UA8DrB;AAED;;;;;;;;;;;;;;;;;GAiBG"}
1
+ {"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../../src/http/middlewares/error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEhD,OAAO,EAA6B,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAExE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAUxC,wBAAgB,YAAY,UAEnB,WAAW,OACX,aAAa,OACb,QAAQ,QACP,YAAY,UA4DrB;AAED;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1 +1 @@
1
- {"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../../src/http/middlewares/error-handler.ts"],"names":[],"mappings":";;AAeA,oCAmEC;AAhFD,2CAAwE;AACxE,+DAAuD;AAIvD,MAAM,qBAAqB,GAAG,iCAAiC,CAAA;AAC/D,MAAM,mBAAmB,GAAG,gCAAgC,CAAA;AAC5D,MAAM,uBAAuB,GAAG,4BAA4B,CAAA;AAE5D,MAAM,SAAS,GAAG,WAAW,CAAA;AAC7B,MAAM,qBAAqB,GAAG,uBAAuB,CAAA;AACrD,MAAM,mBAAmB,GAAG,qBAAqB,CAAA;AAEjD,SAAgB,YAAY;IAC1B,OAAO,CACL,GAAgB,EAChB,GAAkB,EAClB,GAAa,EACb,IAAkB,EAClB,EAAE;QACF,MAAM,MAAM,GAAmB,GAAG,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CAAC,gBAAgB,CAAC;YACxC,KAAK,mBAAW,CAAC,KAAK,CAAC,gBAAgB;gBACrC,MAAK;YACP;gBACE,MAAM,CAAC,IAAI,GAAG,eAAe,CAAA;gBAC7B,MAAM,CAAC,OAAO,GAAG,4BAA4B,CAAA;gBAC7C,MAAM,CAAC,IAAI,GAAG,eAAe,CAAA;gBAC7B,MAAK;QACT,CAAC;QAED,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,4 +1,8 @@
1
1
  export * from "./authenticate-middleware";
2
2
  export * from "./error-handler";
3
3
  export * from "./exception-formatter";
4
+ export * from "./apply-default-filters";
5
+ export * from "./apply-params-as-filters";
6
+ export * from "./clear-filters-by-key";
7
+ export * from "./set-context";
4
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/http/middlewares/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/http/middlewares/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,eAAe,CAAA"}
@@ -17,4 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./authenticate-middleware"), exports);
18
18
  __exportStar(require("./error-handler"), exports);
19
19
  __exportStar(require("./exception-formatter"), exports);
20
+ __exportStar(require("./apply-default-filters"), exports);
21
+ __exportStar(require("./apply-params-as-filters"), exports);
22
+ __exportStar(require("./clear-filters-by-key"), exports);
23
+ __exportStar(require("./set-context"), exports);
20
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/http/middlewares/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAAyC;AACzC,kDAA+B;AAC/B,wDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/http/middlewares/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAAyC;AACzC,kDAA+B;AAC/B,wDAAqC;AACrC,0DAAuC;AACvC,4DAAyC;AACzC,yDAAsC;AACtC,gDAA6B"}
@@ -0,0 +1,3 @@
1
+ import { MedusaNextFunction, MedusaRequest } from "../types";
2
+ export declare function setContext(context: Record<string, any>): (req: MedusaRequest, _: any, next: MedusaNextFunction) => Promise<void>;
3
+ //# sourceMappingURL=set-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-context.d.ts","sourceRoot":"","sources":["../../../src/http/middlewares/set-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE5D,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,SAClC,aAAa,gBAAW,kBAAkB,mBAiB9D"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setContext = setContext;
4
+ function setContext(context) {
5
+ return async (req, _, next) => {
6
+ const ctx = { ...(req.context || {}) };
7
+ for (const [contextKey, contextValue] of Object.entries(context || {})) {
8
+ let valueToApply = contextValue;
9
+ if (typeof contextValue === "function") {
10
+ valueToApply = await contextValue(req, ctx);
11
+ }
12
+ ctx[contextKey] = valueToApply;
13
+ }
14
+ req.context = ctx;
15
+ return next();
16
+ };
17
+ }
18
+ //# sourceMappingURL=set-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-context.js","sourceRoot":"","sources":["../../../src/http/middlewares/set-context.ts"],"names":[],"mappings":";;AAEA,gCAkBC;AAlBD,SAAgB,UAAU,CAAC,OAA4B;IACrD,OAAO,KAAK,EAAE,GAAkB,EAAE,CAAC,EAAE,IAAwB,EAAE,EAAE;QAC/D,MAAM,GAAG,GAAwB,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,CAAA;QAE3D,KAAK,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;YACvE,IAAI,YAAY,GAAG,YAAY,CAAA;YAE/B,IAAI,OAAO,YAAY,KAAK,UAAU,EAAE,CAAC;gBACvC,YAAY,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;YAC7C,CAAC;YAED,GAAG,CAAC,UAAU,CAAC,GAAG,YAAY,CAAA;QAChC,CAAC;QAED,GAAG,CAAC,OAAO,GAAG,GAAG,CAAA;QAEjB,OAAO,IAAI,EAAE,CAAA;IACf,CAAC,CAAA;AACH,CAAC"}
@@ -60,6 +60,10 @@ export declare class ApiRoutesLoader {
60
60
  * Apply the most specific body parser middleware to the router
61
61
  */
62
62
  applyBodyParserMiddleware(path: string, method: RouteVerb): void;
63
+ /**
64
+ * Applies middleware that checks if a valid publishable key is set on store request
65
+ */
66
+ applyStorePublishableKeyMiddleware(route: string): void;
63
67
  /**
64
68
  * Applies the route middleware on a route. Encapsulates the logic
65
69
  * needed to pass the middleware via the trace calls
@@ -1 +1 @@
1
- {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/http/router.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,OAAO,EAEZ,cAAc,EAIf,MAAM,SAAS,CAAA;AAKhB,OAAO,EAAgB,QAAQ,EAAgB,MAAM,eAAe,CAAA;AACpE,OAAO,EAKL,kBAAkB,EA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AAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAC7B;IAMK,IAAI;CAiBX"}
@@ -24,6 +24,7 @@ const path_1 = require("path");
24
24
  const config_1 = require("../config");
25
25
  const logger_1 = require("../logger");
26
26
  const middlewares_1 = require("./middlewares");
27
+ const ensure_publishable_api_key_1 = require("./middlewares/ensure-publishable-api-key");
27
28
  const types_1 = require("./types");
28
29
  const log = ({ activityId, message, }) => {
29
30
  if (activityId) {
@@ -433,6 +434,16 @@ class ApiRoutesLoader {
433
434
  }
434
435
  return;
435
436
  }
437
+ /**
438
+ * Applies middleware that checks if a valid publishable key is set on store request
439
+ */
440
+ applyStorePublishableKeyMiddleware(route) {
441
+ let middleware = ensure_publishable_api_key_1.ensurePublishableApiKeyMiddleware;
442
+ if (ApiRoutesLoader.traceMiddleware) {
443
+ middleware = ApiRoutesLoader.traceMiddleware(middleware, { route: route });
444
+ }
445
+ __classPrivateFieldGet(this, _ApiRoutesLoader_router, "f").use(route, middleware);
446
+ }
436
447
  /**
437
448
  * Applies the route middleware on a route. Encapsulates the logic
438
449
  * needed to pass the middleware via the trace calls
@@ -489,6 +500,9 @@ class ApiRoutesLoader {
489
500
  credentials: true,
490
501
  }));
491
502
  }
503
+ if (config.routeType === "store") {
504
+ this.applyStorePublishableKeyMiddleware(descriptor.route);
505
+ }
492
506
  // We only apply the auth middleware to store routes to populate the auth context. For actual authentication, users can just reapply the middleware.
493
507
  if (!config.optedOutOfAuth && config.routeType === "store") {
494
508
  this.applyAuthMiddleware(descriptor.route, "customer", ["bearer", "session"], {
@@ -1 +1 @@
1
- {"version":3,"file":"router.js","sourceRoot":"","sources":["../../src/http/router.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAMwB;AACxB,gDAAuB;AACvB,qCAOgB;AAChB,0CAAqC;AACrC,+BAAgD;AAChD,sCAAyC;AACzC,sCAAkC;AAClC,+CAAoE;AACpE,mCAcgB;AAEhB,MAAM,GAAG,GAAG,CAAC,EACX,U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AAE,CAAA;QACvB,uBAAA,IAAI,gDAAgC,SAAS,MAAA,CAAA;IAC/C,CAAC;CACF;AAvtBD,0CAutBC;;AAED,MAAa,YAAY;IAmBvB,YAAY,EACV,GAAG,EACH,UAAU,EACV,SAAS,GAKV;QA1BD;;;WAGG;QACM,oCAAa;QAEtB;;;WAGG;QACM,2CAAoB;QAE7B;;;WAGG;QACM,0CAA6B;QAWpC,uBAAA,IAAI,qBAAQ,GAAG,MAAA,CAAA;QACf,uBAAA,IAAI,4BAAe,UAAU,MAAA,CAAA;QAC7B,uBAAA,IAAI,2BAAc,SAAS,MAAA,CAAA;IAC7B,CAAC;IAED,KAAK,CAAC,IAAI;QACR,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,CAAC,uBAAA,IAAI,+BAAW,CAAC;YACzD,CAAC,CAAC,uBAAA,IAAI,+BAAW;YACjB,CAAC,CAAC,CAAC,uBAAA,IAAI,+BAAW,CAAC,CAAA;QAErB,MAAM,QAAQ,GAAG,oBAAoB,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE;YAC7D,MAAM,eAAe,GAAG,IAAI,eAAe,CAAC;gBAC1C,GAAG,EAAE,uBAAA,IAAI,yBAAK;gBACd,UAAU,EAAE,uBAAA,IAAI,gCAAY;gBAC5B,SAAS,EAAE,UAAU;aACtB,CAAC,CAAA;YAEF,MAAM,eAAe,CAAC,IAAI,EAAE,CAAA;QAC9B,CAAC,CAAC,CAAA;QAEF,MAAM,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAA;IAC5B,CAAC;CACF;AAlDD,oCAkDC"}
@@ -1,16 +1,7 @@
1
1
  import type { NextFunction, Request, Response } from "express";
2
2
  import { ZodObject } from "zod";
3
- import { MedusaPricingContext, RequestQueryFields } from "@medusajs/types";
3
+ import { FindConfig, MedusaPricingContext, RequestQueryFields } from "@medusajs/types";
4
4
  import { MedusaContainer } from "../container";
5
- export interface FindConfig<Entity> {
6
- select?: (keyof Entity)[];
7
- skip?: number;
8
- take?: number;
9
- relations?: string[];
10
- order?: {
11
- [K: string]: "ASC" | "DESC";
12
- };
13
- }
14
5
  /**
15
6
  * List of all the supported HTTP methods
16
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/http/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAE/B,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,MAAM,WAAW,UAAU,CAAC,MAAM;IAChC,MAAM,CAAC,EAAE,CAAC,MAAM,MAAM,CAAC,EAAE,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,KAAK,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;KAAE,CAAA;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,uEAQf,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AACrD,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,CAAA;AAEtD,KAAK,gBAAgB,GAAG,CAAC,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,cAAc,KAAK,IAAI,CAAA;AAEzE,MAAM,MAAM,iBAAiB,GAAG,CAC9B,GAAG,EAAE,aAAa,EAClB,GAAG,EAAE,cAAc,KAChB,OAAO,CAAC,IAAI,CAAC,CAAA;AAElB,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,CAAA;AAE/D,MA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C1B,KAAK;IACL,MAAM;IACN,KAAK;IACL,OAAO;IACP,QAAQ;IACR,SAAS;IACT,MAAM;CACE,CAAA"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/http/types.ts"],"names":[],"mappings":";;;AAUA;;GAEG;AACU,QAAA,YAAY,GAAG;IAC1B,KAAK;IACL,MAAM;IACN,KAAK;IACL,OAAO;IACP,QAAQ;IACR,SAAS;IACT,MAAM;CACE,CAAA"}
@@ -0,0 +1,38 @@
1
+ import { RequestQueryFields, FindConfig, QueryConfig } from "@medusajs/types";
2
+ export declare function pickByConfig<TModel>(obj: TModel | TModel[], config: FindConfig<TModel>): Partial<TModel> | Partial<TModel>[];
3
+ export declare function prepareListQuery<T extends RequestQueryFields, TEntity>(validated: T, queryConfig?: QueryConfig<TEntity>): {
4
+ listConfig: {
5
+ select: string[] | undefined;
6
+ relations: string[];
7
+ skip: number;
8
+ take: number;
9
+ order: {
10
+ [k: symbol]: "DESC" | "ASC";
11
+ } | undefined;
12
+ };
13
+ remoteQueryConfig: {
14
+ fields: string[];
15
+ pagination: {
16
+ skip: number;
17
+ take: number;
18
+ order: {
19
+ [k: symbol]: "DESC" | "ASC";
20
+ } | undefined;
21
+ } | {
22
+ skip?: undefined;
23
+ take?: undefined;
24
+ order?: undefined;
25
+ };
26
+ };
27
+ };
28
+ export declare function prepareRetrieveQuery<T extends RequestQueryFields, TEntity>(validated: T, queryConfig?: QueryConfig<TEntity>): {
29
+ retrieveConfig: {
30
+ select: string[] | undefined;
31
+ relations: string[];
32
+ };
33
+ remoteQueryConfig: {
34
+ fields: string[];
35
+ pagination: {};
36
+ };
37
+ };
38
+ //# sourceMappingURL=get-query-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-query-config.d.ts","sourceRoot":"","sources":["../../../src/http/utils/get-query-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAS7E,wBAAgB,YAAY,CAAC,MAAM,EACjC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EACtB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,GACzB,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,CAWrC;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,kBAAkB,EAAE,OAAO,EACpE,SAAS,EAAE,CAAC,EACZ,WAAW,GAAE,WAAW,CAAC,OAAO,CAAM;;;;;;;;;;;;;;;;;;;;;;;;EAsLvC;AAED,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,kBAAkB,EAAE,OAAO,EACxE,SAAS,EAAE,CAAC,EACZ,WAAW,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC;;;;;;;;;EAiBnC"}