mock-config-server 3.5.0 → 3.6.1

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 (75) hide show
  1. package/README.md +2 -0
  2. package/dist/bin/bin.js +3 -3
  3. package/dist/bin/build.js +5 -5
  4. package/dist/bin/cli.js +18 -18
  5. package/dist/bin/helpers/createTemplate.js +4 -4
  6. package/dist/bin/helpers/getValidationMessageFromPath.js +2 -2
  7. package/dist/bin/helpers/isOnlyRequestedDataResolvingPropertyExists.js +3 -3
  8. package/dist/bin/helpers/resolveConfigFile.js +3 -3
  9. package/dist/bin/helpers/resolveExportsFromSourceCode.js +1 -1
  10. package/dist/bin/init.js +36 -36
  11. package/dist/bin/run.js +6 -6
  12. package/dist/bin/validateMockServerConfig/corsSchema/corsSchema.d.ts +2 -2
  13. package/dist/bin/validateMockServerConfig/corsSchema/corsSchema.js +6 -6
  14. package/dist/bin/validateMockServerConfig/graphqlConfigSchema/graphqlConfigSchema.d.ts +82 -72
  15. package/dist/bin/validateMockServerConfig/graphqlConfigSchema/graphqlConfigSchema.js +4 -4
  16. package/dist/bin/validateMockServerConfig/graphqlConfigSchema/routeConfigSchema/routeConfigSchema.d.ts +25 -21
  17. package/dist/bin/validateMockServerConfig/graphqlConfigSchema/routeConfigSchema/routeConfigSchema.js +3 -5
  18. package/dist/bin/validateMockServerConfig/queueSchema/queueSchema.d.ts +2 -2
  19. package/dist/bin/validateMockServerConfig/queueSchema/queueSchema.js +1 -1
  20. package/dist/bin/validateMockServerConfig/restConfigSchema/restConfigSchema.d.ts +270 -240
  21. package/dist/bin/validateMockServerConfig/restConfigSchema/restConfigSchema.js +6 -6
  22. package/dist/bin/validateMockServerConfig/restConfigSchema/routeConfigSchema/routeConfigSchema.d.ts +33 -28
  23. package/dist/bin/validateMockServerConfig/restConfigSchema/routeConfigSchema/routeConfigSchema.js +7 -9
  24. package/dist/bin/validateMockServerConfig/utils/entitiesSchema/entitiesSchema.d.ts +4 -8
  25. package/dist/bin/validateMockServerConfig/utils/entitiesSchema/entitiesSchema.js +11 -11
  26. package/dist/bin/validateMockServerConfig/utils/requiredPropertiesSchema/requiredPropertiesSchema.d.ts +1 -1
  27. package/dist/bin/validateMockServerConfig/utils/sharedSchema/sharedSchema.js +2 -2
  28. package/dist/bin/validateMockServerConfig/validateApiMockServerConfig.js +3 -3
  29. package/dist/bin/validateMockServerConfig/validateMockServerConfig.js +1 -1
  30. package/dist/src/core/database/createDatabaseRoutes/createDatabaseRoutes.js +3 -3
  31. package/dist/src/core/database/createDatabaseRoutes/helpers/array/createNewId/createNewId.js +1 -1
  32. package/dist/src/core/database/createDatabaseRoutes/helpers/createNestedDatabaseRoutes/createNestedDatabaseRoutes.js +15 -13
  33. package/dist/src/core/database/createDatabaseRoutes/helpers/createShallowDatabaseRoutes/createShallowDatabaseRoutes.js +15 -13
  34. package/dist/src/core/database/createDatabaseRoutes/helpers/filter/filter.js +19 -13
  35. package/dist/src/core/database/createDatabaseRoutes/helpers/search/search.js +3 -3
  36. package/dist/src/core/database/createDatabaseRoutes/helpers/sort/sort.js +5 -5
  37. package/dist/src/core/database/createDatabaseRoutes/helpers/splitDatabaseByNesting/splitDatabaseByNesting.js +1 -1
  38. package/dist/src/core/database/createDatabaseRoutes/storages/File/FileStorage.js +1 -1
  39. package/dist/src/core/database/createDatabaseRoutes/storages/File/FileWriter.js +1 -1
  40. package/dist/src/core/graphql/createGraphQLRoutes/createGraphQLRoutes.js +24 -19
  41. package/dist/src/core/graphql/createGraphQLRoutes/helpers/prepareGraphQLRequestConfigs/prepareGraphQLRequestConfigs.js +1 -1
  42. package/dist/src/core/middlewares/cookieParseMiddleware/helpers/parseCookie/parseCookie.js +3 -3
  43. package/dist/src/core/middlewares/corsMiddleware/corsMiddleware.js +8 -8
  44. package/dist/src/core/middlewares/corsMiddleware/helpers/getAllowedOrigins/getAllowedOrigins.js +2 -2
  45. package/dist/src/core/middlewares/destroyerMiddleware/destroyerMiddleware.js +2 -2
  46. package/dist/src/core/middlewares/errorMiddleware/errorMiddleware.js +1 -1
  47. package/dist/src/core/middlewares/noCorsMiddleware/noCorsMiddleware.js +7 -7
  48. package/dist/src/core/middlewares/notFoundMiddleware/helpers/getGraphqlUrlSuggestions/getGraphqlUrlSuggestions.js +1 -1
  49. package/dist/src/core/middlewares/notFoundMiddleware/helpers/getRestUrlSuggestions/getRestUrlSuggestions.js +2 -2
  50. package/dist/src/core/middlewares/notFoundMiddleware/helpers/getRestUrlSuggestions/helpers/getActualRestUrlMeaningfulString/getActualRestUrlMeaningfulString.js +1 -1
  51. package/dist/src/core/middlewares/notFoundMiddleware/helpers/getRestUrlSuggestions/helpers/getPatternRestUrlMeaningfulString/getPatternRestUrlMeaningfulString.js +1 -1
  52. package/dist/src/core/middlewares/notFoundMiddleware/notFoundMiddleware.js +7 -7
  53. package/dist/src/core/middlewares/requestInterceptorMiddleware/requestInterceptorMiddleware.js +1 -1
  54. package/dist/src/core/middlewares/staticMiddleware/staticMiddleware.js +2 -2
  55. package/dist/src/core/rest/createRestRoutes/createRestRoutes.js +19 -14
  56. package/dist/src/core/rest/createRestRoutes/helpers/prepareRestRequestConfigs/prepareRestRequestConfigs.js +26 -2
  57. package/dist/src/server/createDatabaseMockServer/createDatabaseMockServer.js +6 -6
  58. package/dist/src/server/createGraphQLMockServer/createGraphQLMockServer.js +6 -6
  59. package/dist/src/server/createMockServer/createMockServer.js +8 -8
  60. package/dist/src/server/createRestMockServer/createRestMockServer.js +6 -6
  61. package/dist/src/utils/constants/checkModes.js +18 -18
  62. package/dist/src/utils/constants/default.js +4 -4
  63. package/dist/src/utils/helpers/config/resolveEntityValues/resolveEntityValues.js +20 -20
  64. package/dist/src/utils/helpers/entities/convertToEntityDescriptor/convertToEntityDescriptor.js +1 -1
  65. package/dist/src/utils/helpers/entities/isEntityDescriptor/isEntityDescriptor.js +1 -1
  66. package/dist/src/utils/helpers/graphql/getGraphQLInput/getGraphQLInput.js +3 -3
  67. package/dist/src/utils/helpers/graphql/parseQuery/parseQuery.js +1 -1
  68. package/dist/src/utils/helpers/isPlainObject/isPlainObject.js +1 -1
  69. package/dist/src/utils/helpers/url/convertWin32PathToUnix/convertWin32PathToUnix.js +1 -1
  70. package/dist/src/utils/helpers/url/getUrlParts/getUrlParts.js +1 -1
  71. package/dist/src/utils/helpers/url/removeLeadingAndTrailingSlashes/removeLeadingAndTrailingSlashes.js +1 -1
  72. package/dist/src/utils/helpers/url/urlJoin/urlJoin.js +1 -1
  73. package/dist/src/utils/types/graphql.d.ts +1 -1
  74. package/dist/src/utils/types/rest.d.ts +1 -1
  75. package/package.json +21 -23
@@ -1,38 +1,35 @@
1
1
  import { z } from 'zod';
2
2
  export declare const graphqlConfigSchema: z.ZodObject<{
3
3
  baseUrl: z.ZodOptional<z.ZodString>;
4
- configs: z.ZodArray<z.ZodUnion<[z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<{
5
- query: z.ZodOptional<z.ZodString>;
4
+ configs: z.ZodArray<z.ZodUnion<[z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<z.objectUtil.extendShape<{
6
5
  operationName: z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>;
6
+ query: z.ZodOptional<z.ZodString>;
7
+ }, {
7
8
  operationType: z.ZodEnum<["query", "mutation"]>;
8
- routes: z.ZodArray<z.ZodUnion<[z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<{
9
- data: z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>, z.ZodAny]>;
9
+ routes: z.ZodArray<z.ZodUnion<[z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<z.objectUtil.extendShape<{
10
10
  settings: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
11
+ data: z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>, z.ZodAny]>;
12
+ }, {
11
13
  entities: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
12
14
  interceptors: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
13
- }, "strict", z.ZodTypeAny, {
15
+ }>, "strict", z.ZodTypeAny, {
14
16
  data?: any;
15
- settings?: any;
16
- entities?: any;
17
17
  interceptors?: any;
18
+ entities?: any;
19
+ settings?: any;
18
20
  }, {
19
21
  data?: any;
20
- settings?: unknown;
21
- entities?: unknown;
22
22
  interceptors?: unknown;
23
- }>>, z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<{
24
- queue: z.ZodArray<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodType<{
25
- time?: number | undefined;
26
- data?: any;
27
- }, z.ZodTypeDef, {
28
- time?: number | undefined;
29
- data?: any;
30
- }>>, "many">;
31
- settings: z.ZodObject<{
23
+ entities?: unknown;
24
+ settings?: unknown;
25
+ }>>, z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<z.objectUtil.extendShape<{
26
+ settings: z.ZodObject<z.objectUtil.extendShape<{
27
+ polling: z.ZodOptional<z.ZodBoolean>;
32
28
  status: z.ZodOptional<z.ZodNumber>;
33
29
  delay: z.ZodOptional<z.ZodNumber>;
30
+ }, {
34
31
  polling: z.ZodLiteral<true>;
35
- }, "strict", z.ZodTypeAny, {
32
+ }>, "strict", z.ZodTypeAny, {
36
33
  polling: true;
37
34
  status?: number | undefined;
38
35
  delay?: number | undefined;
@@ -41,20 +38,28 @@ export declare const graphqlConfigSchema: z.ZodObject<{
41
38
  status?: number | undefined;
42
39
  delay?: number | undefined;
43
40
  }>;
41
+ queue: z.ZodArray<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodType<{
42
+ data?: any;
43
+ time?: number | undefined;
44
+ }, z.ZodTypeDef, {
45
+ data?: any;
46
+ time?: number | undefined;
47
+ }>>, "many">;
48
+ }, {
44
49
  entities: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
45
50
  interceptors: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
46
- }, "strict", z.ZodTypeAny, {
51
+ }>, "strict", z.ZodTypeAny, {
47
52
  queue: {
48
- time?: number | undefined;
49
53
  data?: any;
54
+ time?: number | undefined;
50
55
  }[];
51
56
  settings: {
52
57
  polling: true;
53
58
  status?: number | undefined;
54
59
  delay?: number | undefined;
55
60
  };
56
- entities?: any;
57
61
  interceptors?: any;
62
+ entities?: any;
58
63
  }, {
59
64
  queue: unknown[];
60
65
  settings: {
@@ -62,71 +67,68 @@ export declare const graphqlConfigSchema: z.ZodObject<{
62
67
  status?: number | undefined;
63
68
  delay?: number | undefined;
64
69
  };
65
- entities?: unknown;
66
70
  interceptors?: unknown;
71
+ entities?: unknown;
67
72
  }>>]>, "many">;
68
73
  interceptors: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
69
- }, "strict", z.ZodTypeAny, {
74
+ }>, "strict", z.ZodTypeAny, {
70
75
  routes: ({
71
76
  data?: any;
72
- settings?: any;
73
- entities?: any;
74
77
  interceptors?: any;
78
+ entities?: any;
79
+ settings?: any;
75
80
  } | {
76
81
  queue: {
77
- time?: number | undefined;
78
82
  data?: any;
83
+ time?: number | undefined;
79
84
  }[];
80
85
  settings: {
81
86
  polling: true;
82
87
  status?: number | undefined;
83
88
  delay?: number | undefined;
84
89
  };
85
- entities?: any;
86
90
  interceptors?: any;
91
+ entities?: any;
87
92
  })[];
88
- operationName: (string | RegExp) & (string | RegExp | undefined);
93
+ operationName: string | RegExp;
89
94
  operationType: "query" | "mutation";
90
95
  query?: string | undefined;
91
96
  interceptors?: any;
92
97
  }, {
93
98
  routes: unknown[];
94
- operationName: (string | RegExp) & (string | RegExp | undefined);
99
+ operationName: string | RegExp;
95
100
  operationType: "query" | "mutation";
96
101
  query?: string | undefined;
97
102
  interceptors?: unknown;
98
- }>>, z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<{
99
- query: z.ZodString;
103
+ }>>, z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<z.objectUtil.extendShape<{
100
104
  operationName: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>>;
105
+ query: z.ZodString;
106
+ }, {
101
107
  operationType: z.ZodEnum<["query", "mutation"]>;
102
- routes: z.ZodArray<z.ZodUnion<[z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<{
103
- data: z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>, z.ZodAny]>;
108
+ routes: z.ZodArray<z.ZodUnion<[z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<z.objectUtil.extendShape<{
104
109
  settings: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
110
+ data: z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>, z.ZodAny]>;
111
+ }, {
105
112
  entities: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
106
113
  interceptors: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
107
- }, "strict", z.ZodTypeAny, {
114
+ }>, "strict", z.ZodTypeAny, {
108
115
  data?: any;
109
- settings?: any;
110
- entities?: any;
111
116
  interceptors?: any;
117
+ entities?: any;
118
+ settings?: any;
112
119
  }, {
113
120
  data?: any;
114
- settings?: unknown;
115
- entities?: unknown;
116
121
  interceptors?: unknown;
117
- }>>, z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<{
118
- queue: z.ZodArray<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodType<{
119
- time?: number | undefined;
120
- data?: any;
121
- }, z.ZodTypeDef, {
122
- time?: number | undefined;
123
- data?: any;
124
- }>>, "many">;
125
- settings: z.ZodObject<{
122
+ entities?: unknown;
123
+ settings?: unknown;
124
+ }>>, z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<z.objectUtil.extendShape<{
125
+ settings: z.ZodObject<z.objectUtil.extendShape<{
126
+ polling: z.ZodOptional<z.ZodBoolean>;
126
127
  status: z.ZodOptional<z.ZodNumber>;
127
128
  delay: z.ZodOptional<z.ZodNumber>;
129
+ }, {
128
130
  polling: z.ZodLiteral<true>;
129
- }, "strict", z.ZodTypeAny, {
131
+ }>, "strict", z.ZodTypeAny, {
130
132
  polling: true;
131
133
  status?: number | undefined;
132
134
  delay?: number | undefined;
@@ -135,20 +137,28 @@ export declare const graphqlConfigSchema: z.ZodObject<{
135
137
  status?: number | undefined;
136
138
  delay?: number | undefined;
137
139
  }>;
140
+ queue: z.ZodArray<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodType<{
141
+ data?: any;
142
+ time?: number | undefined;
143
+ }, z.ZodTypeDef, {
144
+ data?: any;
145
+ time?: number | undefined;
146
+ }>>, "many">;
147
+ }, {
138
148
  entities: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
139
149
  interceptors: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
140
- }, "strict", z.ZodTypeAny, {
150
+ }>, "strict", z.ZodTypeAny, {
141
151
  queue: {
142
- time?: number | undefined;
143
152
  data?: any;
153
+ time?: number | undefined;
144
154
  }[];
145
155
  settings: {
146
156
  polling: true;
147
157
  status?: number | undefined;
148
158
  delay?: number | undefined;
149
159
  };
150
- entities?: any;
151
160
  interceptors?: any;
161
+ entities?: any;
152
162
  }, {
153
163
  queue: unknown[];
154
164
  settings: {
@@ -156,62 +166,62 @@ export declare const graphqlConfigSchema: z.ZodObject<{
156
166
  status?: number | undefined;
157
167
  delay?: number | undefined;
158
168
  };
159
- entities?: unknown;
160
169
  interceptors?: unknown;
170
+ entities?: unknown;
161
171
  }>>]>, "many">;
162
172
  interceptors: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
163
- }, "strict", z.ZodTypeAny, {
173
+ }>, "strict", z.ZodTypeAny, {
164
174
  query: string;
165
175
  routes: ({
166
176
  data?: any;
167
- settings?: any;
168
- entities?: any;
169
177
  interceptors?: any;
178
+ entities?: any;
179
+ settings?: any;
170
180
  } | {
171
181
  queue: {
172
- time?: number | undefined;
173
182
  data?: any;
183
+ time?: number | undefined;
174
184
  }[];
175
185
  settings: {
176
186
  polling: true;
177
187
  status?: number | undefined;
178
188
  delay?: number | undefined;
179
189
  };
180
- entities?: any;
181
190
  interceptors?: any;
191
+ entities?: any;
182
192
  })[];
183
193
  operationType: "query" | "mutation";
184
- operationName?: string | RegExp | undefined;
185
194
  interceptors?: any;
195
+ operationName?: string | RegExp | undefined;
186
196
  }, {
187
197
  query: string;
188
198
  routes: unknown[];
189
199
  operationType: "query" | "mutation";
190
- operationName?: string | RegExp | undefined;
191
200
  interceptors?: unknown;
201
+ operationName?: string | RegExp | undefined;
192
202
  }>>]>, "many">;
193
203
  interceptors: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
194
204
  }, "strict", z.ZodTypeAny, {
195
205
  configs: ({
196
206
  routes: ({
197
207
  data?: any;
198
- settings?: any;
199
- entities?: any;
200
208
  interceptors?: any;
209
+ entities?: any;
210
+ settings?: any;
201
211
  } | {
202
212
  queue: {
203
- time?: number | undefined;
204
213
  data?: any;
214
+ time?: number | undefined;
205
215
  }[];
206
216
  settings: {
207
217
  polling: true;
208
218
  status?: number | undefined;
209
219
  delay?: number | undefined;
210
220
  };
211
- entities?: any;
212
221
  interceptors?: any;
222
+ entities?: any;
213
223
  })[];
214
- operationName: (string | RegExp) & (string | RegExp | undefined);
224
+ operationName: string | RegExp;
215
225
  operationType: "query" | "mutation";
216
226
  query?: string | undefined;
217
227
  interceptors?: any;
@@ -219,30 +229,30 @@ export declare const graphqlConfigSchema: z.ZodObject<{
219
229
  query: string;
220
230
  routes: ({
221
231
  data?: any;
222
- settings?: any;
223
- entities?: any;
224
232
  interceptors?: any;
233
+ entities?: any;
234
+ settings?: any;
225
235
  } | {
226
236
  queue: {
227
- time?: number | undefined;
228
237
  data?: any;
238
+ time?: number | undefined;
229
239
  }[];
230
240
  settings: {
231
241
  polling: true;
232
242
  status?: number | undefined;
233
243
  delay?: number | undefined;
234
244
  };
235
- entities?: any;
236
245
  interceptors?: any;
246
+ entities?: any;
237
247
  })[];
238
248
  operationType: "query" | "mutation";
239
- operationName?: string | RegExp | undefined;
240
249
  interceptors?: any;
250
+ operationName?: string | RegExp | undefined;
241
251
  })[];
242
- baseUrl?: string | undefined;
243
252
  interceptors?: any;
253
+ baseUrl?: string | undefined;
244
254
  }, {
245
255
  configs: unknown[];
246
- baseUrl?: string | undefined;
247
256
  interceptors?: unknown;
257
+ baseUrl?: string | undefined;
248
258
  }>;
@@ -16,8 +16,8 @@ const _utils = require("../utils");
16
16
  const _routeConfigSchema = require("./routeConfigSchema/routeConfigSchema");
17
17
  const baseRequestConfigSchema = _zod.z.strictObject({
18
18
  operationType: _zod.z.enum([
19
- "query",
20
- "mutation"
19
+ 'query',
20
+ 'mutation'
21
21
  ]),
22
22
  routes: _zod.z.array(_routeConfigSchema.routeConfigSchema),
23
23
  interceptors: (0, _utils.plainObjectSchema)(_interceptorsSchema.interceptorsSchema).optional()
@@ -37,8 +37,8 @@ const queryRequestConfigSchema = _zod.z.strictObject({
37
37
  query: _zod.z.string()
38
38
  }).merge(baseRequestConfigSchema);
39
39
  const requestConfigSchema = _zod.z.union([
40
- _zod.z.custom((value)=>(0, _helpers.isPlainObject)(value) && "operationName" in value).pipe(operationNameRequestConfigSchema),
41
- _zod.z.custom((value)=>(0, _helpers.isPlainObject)(value) && "query" in value).pipe(queryRequestConfigSchema)
40
+ _zod.z.custom((value)=>(0, _helpers.isPlainObject)(value) && 'operationName' in value).pipe(operationNameRequestConfigSchema),
41
+ _zod.z.custom((value)=>(0, _helpers.isPlainObject)(value) && 'query' in value).pipe(queryRequestConfigSchema)
42
42
  ]);
43
43
  const graphqlConfigSchema = _zod.z.strictObject({
44
44
  baseUrl: _baseUrlSchema.baseUrlSchema.optional(),
@@ -1,32 +1,28 @@
1
1
  import { z } from 'zod';
2
- export declare const routeConfigSchema: z.ZodUnion<[z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<{
3
- data: z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>, z.ZodAny]>;
2
+ export declare const routeConfigSchema: z.ZodUnion<[z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<z.objectUtil.extendShape<{
4
3
  settings: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
4
+ data: z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>, z.ZodAny]>;
5
+ }, {
5
6
  entities: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
6
7
  interceptors: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
7
- }, "strict", z.ZodTypeAny, {
8
+ }>, "strict", z.ZodTypeAny, {
8
9
  data?: any;
9
- settings?: any;
10
- entities?: any;
11
10
  interceptors?: any;
11
+ entities?: any;
12
+ settings?: any;
12
13
  }, {
13
14
  data?: any;
14
- settings?: unknown;
15
- entities?: unknown;
16
15
  interceptors?: unknown;
17
- }>>, z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<{
18
- queue: z.ZodArray<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodType<{
19
- time?: number | undefined;
20
- data?: any;
21
- }, z.ZodTypeDef, {
22
- time?: number | undefined;
23
- data?: any;
24
- }>>, "many">;
25
- settings: z.ZodObject<{
16
+ entities?: unknown;
17
+ settings?: unknown;
18
+ }>>, z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodObject<z.objectUtil.extendShape<{
19
+ settings: z.ZodObject<z.objectUtil.extendShape<{
20
+ polling: z.ZodOptional<z.ZodBoolean>;
26
21
  status: z.ZodOptional<z.ZodNumber>;
27
22
  delay: z.ZodOptional<z.ZodNumber>;
23
+ }, {
28
24
  polling: z.ZodLiteral<true>;
29
- }, "strict", z.ZodTypeAny, {
25
+ }>, "strict", z.ZodTypeAny, {
30
26
  polling: true;
31
27
  status?: number | undefined;
32
28
  delay?: number | undefined;
@@ -35,20 +31,28 @@ export declare const routeConfigSchema: z.ZodUnion<[z.ZodPipeline<z.ZodType<unkn
35
31
  status?: number | undefined;
36
32
  delay?: number | undefined;
37
33
  }>;
34
+ queue: z.ZodArray<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodType<{
35
+ data?: any;
36
+ time?: number | undefined;
37
+ }, z.ZodTypeDef, {
38
+ data?: any;
39
+ time?: number | undefined;
40
+ }>>, "many">;
41
+ }, {
38
42
  entities: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
39
43
  interceptors: z.ZodOptional<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeAny>>;
40
- }, "strict", z.ZodTypeAny, {
44
+ }>, "strict", z.ZodTypeAny, {
41
45
  queue: {
42
- time?: number | undefined;
43
46
  data?: any;
47
+ time?: number | undefined;
44
48
  }[];
45
49
  settings: {
46
50
  polling: true;
47
51
  status?: number | undefined;
48
52
  delay?: number | undefined;
49
53
  };
50
- entities?: any;
51
54
  interceptors?: any;
55
+ entities?: any;
52
56
  }, {
53
57
  queue: unknown[];
54
58
  settings: {
@@ -56,6 +60,6 @@ export declare const routeConfigSchema: z.ZodUnion<[z.ZodPipeline<z.ZodType<unkn
56
60
  status?: number | undefined;
57
61
  delay?: number | undefined;
58
62
  };
59
- entities?: unknown;
60
63
  interceptors?: unknown;
64
+ entities?: unknown;
61
65
  }>>]>;
@@ -22,9 +22,7 @@ const baseRouteConfigSchema = _zod.z.strictObject({
22
22
  query: _utils.mappedEntitySchema.optional(),
23
23
  variables: _utils.plainEntitySchema.optional()
24
24
  })).optional(),
25
- interceptors: (0, _utils.plainObjectSchema)(_interceptorsSchema.interceptorsSchema.pick({
26
- response: true
27
- })).optional()
25
+ interceptors: (0, _utils.plainObjectSchema)(_interceptorsSchema.interceptorsSchema).optional()
28
26
  });
29
27
  const dataRouteConfigSchema = _zod.z.strictObject({
30
28
  settings: (0, _utils.plainObjectSchema)(_settingsSchema.settingsSchema.extend({
@@ -42,6 +40,6 @@ const queueRouteConfigSchema = _zod.z.strictObject({
42
40
  queue: _queueSchema.queueSchema
43
41
  }).merge(baseRouteConfigSchema);
44
42
  const routeConfigSchema = _zod.z.union([
45
- _zod.z.custom((value)=>(0, _helpers.isPlainObject)(value) && (0, _helpers1.isOnlyRequestedDataResolvingPropertyExists)(value, "data")).pipe(dataRouteConfigSchema),
46
- _zod.z.custom((value)=>(0, _helpers.isPlainObject)(value) && (0, _helpers1.isOnlyRequestedDataResolvingPropertyExists)(value, "queue")).pipe(queueRouteConfigSchema)
43
+ _zod.z.custom((value)=>(0, _helpers.isPlainObject)(value) && (0, _helpers1.isOnlyRequestedDataResolvingPropertyExists)(value, 'data')).pipe(dataRouteConfigSchema),
44
+ _zod.z.custom((value)=>(0, _helpers.isPlainObject)(value) && (0, _helpers1.isOnlyRequestedDataResolvingPropertyExists)(value, 'queue')).pipe(queueRouteConfigSchema)
47
45
  ]);
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const queueSchema: z.ZodArray<z.ZodPipeline<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodType<{
3
- time?: number | undefined;
4
3
  data?: any;
5
- }, z.ZodTypeDef, {
6
4
  time?: number | undefined;
5
+ }, z.ZodTypeDef, {
7
6
  data?: any;
7
+ time?: number | undefined;
8
8
  }>>, "many">;
@@ -17,5 +17,5 @@ const queueSchema = _zod.z.array((0, _utils.requiredPropertiesSchema)(_zod.z.str
17
17
  _zod.z.any()
18
18
  ])
19
19
  }), [
20
- "data"
20
+ 'data'
21
21
  ]));