@emeryld/rrroutes-openapi 2.3.1 → 2.3.3

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 (67) hide show
  1. package/README.md +21 -10
  2. package/dist/docs/LeafDocsPage.d.ts +3 -23
  3. package/dist/docs/docs.d.ts +4 -7
  4. package/dist/docs/schemaIntrospection.d.ts +4 -13
  5. package/dist/docs/serializer.d.ts +5 -19
  6. package/dist/index.cjs +468 -670
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.ts +30 -105
  9. package/dist/index.mjs +471 -670
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/public/assets/docs.css +1 -1
  12. package/dist/public/assets/docs.js +260 -21
  13. package/dist/web/app.d.ts +1 -8
  14. package/dist/web/main.d.ts +1 -1
  15. package/dist/web/utils/grouping.d.ts +2 -8
  16. package/dist/web/utils/security.d.ts +21 -0
  17. package/dist/web/utils/types.d.ts +17 -0
  18. package/dist/web/v2/AppShell.d.ts +7 -0
  19. package/dist/web/v2/components/JsonInput.d.ts +10 -0
  20. package/dist/web/v2/components/JsonViewer.d.ts +12 -0
  21. package/dist/web/v2/components/MethodBadge.d.ts +4 -0
  22. package/dist/web/v2/components/New/HttpMethodChip.d.ts +7 -0
  23. package/dist/web/v2/components/New/ListToolBar.d.ts +11 -0
  24. package/dist/web/v2/components/New/MethodFiltersChips.d.ts +7 -0
  25. package/dist/web/v2/components/New/RequestStatusChip.d.ts +6 -0
  26. package/dist/web/v2/components/New/SplitPageLayout.d.ts +7 -0
  27. package/dist/web/v2/components/New/StabilityChip.d.ts +7 -0
  28. package/dist/web/v2/components/New/StatusRangeFilter.d.ts +8 -0
  29. package/dist/web/v2/components/RecordItem.d.ts +34 -0
  30. package/dist/web/v2/components/ResizableSidePanel.d.ts +12 -0
  31. package/dist/web/v2/components/SchemaTable.d.ts +5 -0
  32. package/dist/web/v2/components/SectionHeader.d.ts +9 -0
  33. package/dist/web/v2/endpoints/EndpointDetailsPanel.d.ts +5 -0
  34. package/dist/web/v2/endpoints/EndpointList.d.ts +12 -0
  35. package/dist/web/v2/endpoints/EndpointsPage.d.ts +4 -0
  36. package/dist/web/v2/endpoints/endpoints.utils.d.ts +3 -0
  37. package/dist/web/v2/stores/clientStore.d.ts +48 -0
  38. package/dist/web/v2/theme.d.ts +21 -0
  39. package/dist/web/v2/types/types.base.d.ts +30 -0
  40. package/dist/web/v2/types/types.cacheLog.d.ts +165 -0
  41. package/dist/web/v2/types/types.endpoint.d.ts +326 -0
  42. package/dist/web/v2/types/types.log.d.ts +119 -0
  43. package/dist/web/v2/types/types.preset.d.ts +251 -0
  44. package/dist/web/v2/types/types.requestLog.d.ts +264 -0
  45. package/package.json +16 -5
  46. package/dist/docs/presets.d.ts +0 -14
  47. package/dist/web/components/Analytics.d.ts +0 -68
  48. package/dist/web/components/CopyablePre.d.ts +0 -7
  49. package/dist/web/components/EndpointCard.d.ts +0 -10
  50. package/dist/web/components/Filters.d.ts +0 -9
  51. package/dist/web/components/FiltersBar.d.ts +0 -25
  52. package/dist/web/components/HelperEnumInput.d.ts +0 -11
  53. package/dist/web/components/HistoryView.d.ts +0 -7
  54. package/dist/web/components/LogsView.d.ts +0 -1
  55. package/dist/web/components/PlaygroundOverlay.d.ts +0 -94
  56. package/dist/web/components/PresetsView.d.ts +0 -15
  57. package/dist/web/components/RequestLogs.d.ts +0 -10
  58. package/dist/web/components/SchemaTable.d.ts +0 -4
  59. package/dist/web/components/ui/Button.d.ts +0 -8
  60. package/dist/web/components/ui/Clickable.d.ts +0 -7
  61. package/dist/web/components/ui/Tag.d.ts +0 -9
  62. package/dist/web/components/ui/Text.d.ts +0 -8
  63. package/dist/web/components/ui/index.d.ts +0 -4
  64. package/dist/web/historyStore.d.ts +0 -68
  65. package/dist/web/logsStore.d.ts +0 -51
  66. package/dist/web/types.d.ts +0 -5
  67. package/dist/webhooks.d.ts +0 -181
@@ -0,0 +1,326 @@
1
+ import z, { ZodType } from 'zod';
2
+ export declare const nodeKind: readonly ["object", "string", "number", "boolean", "bigint", "date", "array", "enum", "literal", "union", "record", "tuple", "unknown", "any"];
3
+ export type SerializableSchema = {
4
+ kind: (typeof nodeKind)[number];
5
+ optional?: boolean;
6
+ nullable?: boolean;
7
+ description?: string;
8
+ properties?: Record<string, SerializableSchema>;
9
+ element?: SerializableSchema;
10
+ union?: SerializableSchema[];
11
+ literal?: unknown;
12
+ enumValues?: string[];
13
+ };
14
+ export declare const serializableSchemaSchema: ZodType<SerializableSchema, SerializableSchema>;
15
+ export declare const STABILITIES: readonly ["experimental", "beta", "stable", "deprecated"];
16
+ export declare const endpointSchema: z.ZodObject<{
17
+ id: z.ZodString;
18
+ name: z.ZodString;
19
+ description: z.ZodOptional<z.ZodString>;
20
+ groupId: z.ZodOptional<z.ZodString>;
21
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
+ createdAt: z.ZodNumber;
23
+ updatedAt: z.ZodNumber;
24
+ method: z.ZodEnum<{
25
+ get: "get";
26
+ post: "post";
27
+ put: "put";
28
+ patch: "patch";
29
+ delete: "delete";
30
+ }>;
31
+ path: z.ZodString;
32
+ contract: z.ZodObject<{
33
+ body: z.ZodOptional<z.ZodType<SerializableSchema, SerializableSchema, z.core.$ZodTypeInternals<SerializableSchema, SerializableSchema>>>;
34
+ query: z.ZodOptional<z.ZodType<SerializableSchema, SerializableSchema, z.core.$ZodTypeInternals<SerializableSchema, SerializableSchema>>>;
35
+ output: z.ZodOptional<z.ZodType<SerializableSchema, SerializableSchema, z.core.$ZodTypeInternals<SerializableSchema, SerializableSchema>>>;
36
+ params: z.ZodOptional<z.ZodType<SerializableSchema, SerializableSchema, z.core.$ZodTypeInternals<SerializableSchema, SerializableSchema>>>;
37
+ bodyFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
38
+ name: z.ZodString;
39
+ maxCount: z.ZodNumber;
40
+ }, z.core.$strip>>>;
41
+ }, z.core.$strip>;
42
+ feed: z.ZodOptional<z.ZodBoolean>;
43
+ summary: z.ZodOptional<z.ZodString>;
44
+ stability: z.ZodEnum<{
45
+ deprecated: "deprecated";
46
+ experimental: "experimental";
47
+ beta: "beta";
48
+ stable: "stable";
49
+ }>;
50
+ hidden: z.ZodOptional<z.ZodBoolean>;
51
+ meta: z.ZodRecord<z.ZodString, z.ZodString>;
52
+ }, z.core.$strip>;
53
+ export type Endpoint = z.output<typeof endpointSchema>;
54
+ export declare const endpointFilterSchema: z.ZodObject<{
55
+ beforeDate: z.ZodOptional<z.ZodString>;
56
+ afterDate: z.ZodOptional<z.ZodString>;
57
+ orderBy: z.ZodDefault<z.ZodEnum<{
58
+ timestamp: "timestamp";
59
+ duration: "duration";
60
+ level: "level";
61
+ path: "path";
62
+ }>>;
63
+ orderDirection: z.ZodDefault<z.ZodEnum<{
64
+ asc: "asc";
65
+ desc: "desc";
66
+ }>>;
67
+ searchQuery: z.ZodOptional<z.ZodString>;
68
+ groups: z.ZodOptional<z.ZodArray<z.ZodString>>;
69
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
+ cursor: z.ZodOptional<z.ZodString>;
71
+ methods: z.ZodOptional<z.ZodArray<z.ZodEnum<{
72
+ get: "get";
73
+ post: "post";
74
+ put: "put";
75
+ patch: "patch";
76
+ delete: "delete";
77
+ }>>>;
78
+ path: z.ZodOptional<z.ZodString>;
79
+ stability: z.ZodOptional<z.ZodArray<z.ZodEnum<{
80
+ deprecated: "deprecated";
81
+ experimental: "experimental";
82
+ beta: "beta";
83
+ stable: "stable";
84
+ }>>>;
85
+ }, z.core.$strip>;
86
+ export declare const endpointLeaves: readonly [{
87
+ readonly method: "get";
88
+ readonly path: "endpoints";
89
+ readonly cfg: Readonly<{
90
+ description?: string | undefined;
91
+ tags?: string[] | undefined;
92
+ deprecated?: boolean | undefined;
93
+ queryExtensionSchema: undefined;
94
+ bodyFiles?: import("@emeryld/rrroutes-contract").FileField[] | undefined;
95
+ feed: true;
96
+ summary?: string | undefined;
97
+ docsGroup?: string | undefined;
98
+ stability?: "experimental" | "beta" | "stable" | "deprecated" | undefined;
99
+ docsHidden?: boolean | undefined;
100
+ docsMeta?: Record<string, unknown> | undefined;
101
+ bodySchema: import("@emeryld/rrroutes-contract").RouteSchema<unknown, unknown> | undefined;
102
+ querySchema: import("@emeryld/rrroutes-contract").RouteSchema<{
103
+ orderBy: "timestamp" | "duration" | "level" | "path";
104
+ orderDirection: "asc" | "desc";
105
+ beforeDate?: string | undefined;
106
+ afterDate?: string | undefined;
107
+ searchQuery?: string | undefined;
108
+ groups?: string[] | undefined;
109
+ tags?: string[] | undefined;
110
+ cursor?: string | undefined;
111
+ methods?: ("get" | "post" | "put" | "patch" | "delete")[] | undefined;
112
+ path?: string | undefined;
113
+ stability?: ("deprecated" | "experimental" | "beta" | "stable")[] | undefined;
114
+ }, {
115
+ beforeDate?: string | undefined;
116
+ afterDate?: string | undefined;
117
+ orderBy?: "timestamp" | "duration" | "level" | "path" | undefined;
118
+ orderDirection?: "asc" | "desc" | undefined;
119
+ searchQuery?: string | undefined;
120
+ groups?: string[] | undefined;
121
+ tags?: string[] | undefined;
122
+ cursor?: string | undefined;
123
+ methods?: ("get" | "post" | "put" | "patch" | "delete")[] | undefined;
124
+ path?: string | undefined;
125
+ stability?: ("deprecated" | "experimental" | "beta" | "stable")[] | undefined;
126
+ }>;
127
+ paramsSchema: undefined;
128
+ outputSchema: import("@emeryld/rrroutes-contract").RouteSchema<{
129
+ out: {
130
+ id: string;
131
+ name: string;
132
+ createdAt: number;
133
+ updatedAt: number;
134
+ method: "get" | "post" | "put" | "patch" | "delete";
135
+ path: string;
136
+ contract: {
137
+ body?: SerializableSchema | undefined;
138
+ query?: SerializableSchema | undefined;
139
+ output?: SerializableSchema | undefined;
140
+ params?: SerializableSchema | undefined;
141
+ bodyFiles?: {
142
+ name: string;
143
+ maxCount: number;
144
+ }[] | undefined;
145
+ };
146
+ stability: "deprecated" | "experimental" | "beta" | "stable";
147
+ meta: Record<string, string>;
148
+ description?: string | undefined;
149
+ groupId?: string | undefined;
150
+ tags?: string[] | undefined;
151
+ feed?: boolean | undefined;
152
+ summary?: string | undefined;
153
+ hidden?: boolean | undefined;
154
+ }[];
155
+ meta: {
156
+ totalCount?: number | undefined;
157
+ };
158
+ }, {
159
+ out: {
160
+ id: string;
161
+ name: string;
162
+ createdAt: number;
163
+ updatedAt: number;
164
+ method: "get" | "post" | "put" | "patch" | "delete";
165
+ path: string;
166
+ contract: {
167
+ body?: SerializableSchema | undefined;
168
+ query?: SerializableSchema | undefined;
169
+ output?: SerializableSchema | undefined;
170
+ params?: SerializableSchema | undefined;
171
+ bodyFiles?: {
172
+ name: string;
173
+ maxCount: number;
174
+ }[] | undefined;
175
+ };
176
+ stability: "deprecated" | "experimental" | "beta" | "stable";
177
+ meta: Record<string, string>;
178
+ description?: string | undefined;
179
+ groupId?: string | undefined;
180
+ tags?: string[] | undefined;
181
+ feed?: boolean | undefined;
182
+ summary?: string | undefined;
183
+ hidden?: boolean | undefined;
184
+ }[];
185
+ meta: {
186
+ totalCount?: number | undefined;
187
+ };
188
+ }>;
189
+ outputMetaSchema: import("@emeryld/rrroutes-contract").RouteSchema<{
190
+ totalCount?: number | undefined;
191
+ }, {
192
+ totalCount?: number | undefined;
193
+ }>;
194
+ }>;
195
+ }, import("@emeryld/rrroutes-contract").LeafLowProfile<"get", "endpoints/:endpointId", {
196
+ readonly description?: string | undefined;
197
+ readonly tags?: string[] | undefined;
198
+ readonly deprecated?: boolean | undefined;
199
+ readonly queryExtensionSchema: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> & import("@emeryld/rrroutes-contract").RouteSchema<unknown, unknown>;
200
+ readonly outputMetaSchema: import("@emeryld/rrroutes-contract").RouteSchema<unknown, unknown>;
201
+ readonly bodySchema: import("@emeryld/rrroutes-contract").RouteSchema<unknown, unknown> | undefined;
202
+ readonly querySchema: undefined;
203
+ readonly outputSchema: import("@emeryld/rrroutes-contract").RouteSchema<{
204
+ out: {
205
+ id: string;
206
+ name: string;
207
+ createdAt: number;
208
+ updatedAt: number;
209
+ method: "get" | "post" | "put" | "patch" | "delete";
210
+ path: string;
211
+ contract: {
212
+ body?: SerializableSchema | undefined;
213
+ query?: SerializableSchema | undefined;
214
+ output?: SerializableSchema | undefined;
215
+ params?: SerializableSchema | undefined;
216
+ bodyFiles?: {
217
+ name: string;
218
+ maxCount: number;
219
+ }[] | undefined;
220
+ };
221
+ stability: "deprecated" | "experimental" | "beta" | "stable";
222
+ meta: Record<string, string>;
223
+ requests: {
224
+ id: string;
225
+ name: string;
226
+ createdAt: number;
227
+ updatedAt: number;
228
+ status: number;
229
+ fullUrl: string;
230
+ path: string;
231
+ method: "get" | "post" | "put" | "patch" | "delete";
232
+ durationMs: number;
233
+ description?: string | undefined;
234
+ groupId?: string | undefined;
235
+ tags?: string[] | undefined;
236
+ body?: any;
237
+ query?: Record<string, any> | undefined;
238
+ params?: Record<string, any> | undefined;
239
+ output?: any;
240
+ headers?: Record<string, any> | undefined;
241
+ error?: string | undefined;
242
+ }[];
243
+ volumeTS: {
244
+ timestamp: string;
245
+ count: number;
246
+ }[];
247
+ averageDurationMs: number;
248
+ successRate: number;
249
+ latestErrorRequestIds: string[];
250
+ description?: string | undefined;
251
+ groupId?: string | undefined;
252
+ tags?: string[] | undefined;
253
+ feed?: boolean | undefined;
254
+ summary?: string | undefined;
255
+ hidden?: boolean | undefined;
256
+ };
257
+ meta: unknown;
258
+ }, {
259
+ out: {
260
+ id: string;
261
+ name: string;
262
+ createdAt: number;
263
+ updatedAt: number;
264
+ method: "get" | "post" | "put" | "patch" | "delete";
265
+ path: string;
266
+ contract: {
267
+ body?: SerializableSchema | undefined;
268
+ query?: SerializableSchema | undefined;
269
+ output?: SerializableSchema | undefined;
270
+ params?: SerializableSchema | undefined;
271
+ bodyFiles?: {
272
+ name: string;
273
+ maxCount: number;
274
+ }[] | undefined;
275
+ };
276
+ stability: "deprecated" | "experimental" | "beta" | "stable";
277
+ meta: Record<string, string>;
278
+ requests: {
279
+ id: string;
280
+ name: string;
281
+ createdAt: number;
282
+ updatedAt: number;
283
+ status: number;
284
+ fullUrl: string;
285
+ path: string;
286
+ method: "get" | "post" | "put" | "patch" | "delete";
287
+ durationMs: number;
288
+ description?: string | undefined;
289
+ groupId?: string | undefined;
290
+ tags?: string[] | undefined;
291
+ body?: any;
292
+ query?: Record<string, any> | undefined;
293
+ params?: Record<string, any> | undefined;
294
+ output?: any;
295
+ headers?: Record<string, any> | undefined;
296
+ error?: string | undefined;
297
+ }[];
298
+ volumeTS: {
299
+ timestamp: string;
300
+ count: number;
301
+ }[];
302
+ averageDurationMs: number;
303
+ successRate: number;
304
+ latestErrorRequestIds: string[];
305
+ description?: string | undefined;
306
+ groupId?: string | undefined;
307
+ tags?: string[] | undefined;
308
+ feed?: boolean | undefined;
309
+ summary?: string | undefined;
310
+ hidden?: boolean | undefined;
311
+ };
312
+ meta: unknown;
313
+ }>;
314
+ readonly bodyFiles?: import("@emeryld/rrroutes-contract").FileField[] | undefined;
315
+ readonly feed?: boolean | undefined;
316
+ readonly summary?: string | undefined;
317
+ readonly docsGroup?: string | undefined;
318
+ readonly stability?: "experimental" | "beta" | "stable" | "deprecated" | undefined;
319
+ readonly docsHidden?: boolean | undefined;
320
+ readonly docsMeta?: Record<string, unknown> | undefined;
321
+ paramsSchema: import("@emeryld/rrroutes-contract").RouteSchema<{
322
+ endpointId: string;
323
+ }, {
324
+ endpointId: string;
325
+ }>;
326
+ }>];
@@ -0,0 +1,119 @@
1
+ import z from 'zod';
2
+ export declare const logSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ description: z.ZodOptional<z.ZodString>;
6
+ groupId: z.ZodOptional<z.ZodString>;
7
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
+ createdAt: z.ZodNumber;
9
+ updatedAt: z.ZodNumber;
10
+ level: z.ZodEnum<{
11
+ error: "error";
12
+ info: "info";
13
+ warning: "warning";
14
+ debug: "debug";
15
+ trace: "trace";
16
+ }>;
17
+ meta: z.ZodJSONSchema;
18
+ }, z.core.$strip>;
19
+ export declare const logQuerySchema: z.ZodObject<{
20
+ beforeDate: z.ZodOptional<z.ZodString>;
21
+ afterDate: z.ZodOptional<z.ZodString>;
22
+ orderBy: z.ZodDefault<z.ZodEnum<{
23
+ timestamp: "timestamp";
24
+ duration: "duration";
25
+ level: "level";
26
+ path: "path";
27
+ }>>;
28
+ orderDirection: z.ZodDefault<z.ZodEnum<{
29
+ asc: "asc";
30
+ desc: "desc";
31
+ }>>;
32
+ searchQuery: z.ZodOptional<z.ZodString>;
33
+ groups: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
+ cursor: z.ZodOptional<z.ZodString>;
36
+ level: z.ZodOptional<z.ZodArray<z.ZodEnum<{
37
+ error: "error";
38
+ info: "info";
39
+ warning: "warning";
40
+ debug: "debug";
41
+ trace: "trace";
42
+ }>>>;
43
+ }, z.core.$strip>;
44
+ export declare const logLeaves: readonly [{
45
+ readonly method: "get";
46
+ readonly path: "logs";
47
+ readonly cfg: Readonly<{
48
+ description?: string | undefined;
49
+ tags?: string[] | undefined;
50
+ deprecated?: boolean | undefined;
51
+ queryExtensionSchema: undefined;
52
+ bodyFiles?: import("@emeryld/rrroutes-contract").FileField[] | undefined;
53
+ feed: true;
54
+ summary?: string | undefined;
55
+ docsGroup?: string | undefined;
56
+ stability?: "experimental" | "beta" | "stable" | "deprecated" | undefined;
57
+ docsHidden?: boolean | undefined;
58
+ docsMeta?: Record<string, unknown> | undefined;
59
+ bodySchema: import("@emeryld/rrroutes-contract").RouteSchema<unknown, unknown> | undefined;
60
+ querySchema: import("@emeryld/rrroutes-contract").RouteSchema<{
61
+ orderBy: "timestamp" | "duration" | "level" | "path";
62
+ orderDirection: "asc" | "desc";
63
+ beforeDate?: string | undefined;
64
+ afterDate?: string | undefined;
65
+ searchQuery?: string | undefined;
66
+ groups?: string[] | undefined;
67
+ tags?: string[] | undefined;
68
+ cursor?: string | undefined;
69
+ level?: ("error" | "info" | "warning" | "debug" | "trace")[] | undefined;
70
+ }, {
71
+ beforeDate?: string | undefined;
72
+ afterDate?: string | undefined;
73
+ orderBy?: "timestamp" | "duration" | "level" | "path" | undefined;
74
+ orderDirection?: "asc" | "desc" | undefined;
75
+ searchQuery?: string | undefined;
76
+ groups?: string[] | undefined;
77
+ tags?: string[] | undefined;
78
+ cursor?: string | undefined;
79
+ level?: ("error" | "info" | "warning" | "debug" | "trace")[] | undefined;
80
+ }>;
81
+ paramsSchema: undefined;
82
+ outputSchema: import("@emeryld/rrroutes-contract").RouteSchema<{
83
+ out: {
84
+ id: string;
85
+ name: string;
86
+ createdAt: number;
87
+ updatedAt: number;
88
+ level: "error" | "info" | "warning" | "debug" | "trace";
89
+ meta: z.core.util.JSONType;
90
+ description?: string | undefined;
91
+ groupId?: string | undefined;
92
+ tags?: string[] | undefined;
93
+ }[];
94
+ meta: {
95
+ totalCount?: number | undefined;
96
+ };
97
+ }, {
98
+ out: {
99
+ id: string;
100
+ name: string;
101
+ createdAt: number;
102
+ updatedAt: number;
103
+ level: "error" | "info" | "warning" | "debug" | "trace";
104
+ meta: z.core.util.JSONType;
105
+ description?: string | undefined;
106
+ groupId?: string | undefined;
107
+ tags?: string[] | undefined;
108
+ }[];
109
+ meta: {
110
+ totalCount?: number | undefined;
111
+ };
112
+ }>;
113
+ outputMetaSchema: import("@emeryld/rrroutes-contract").RouteSchema<{
114
+ totalCount?: number | undefined;
115
+ }, {
116
+ totalCount?: number | undefined;
117
+ }>;
118
+ }>;
119
+ }];