@objectstack/spec 0.1.1 → 0.2.0
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/README.md +73 -1
- package/dist/api/contract.zod.d.ts +1733 -0
- package/dist/api/contract.zod.d.ts.map +1 -0
- package/dist/api/contract.zod.js +138 -0
- package/dist/data/dataset.zod.d.ts +2 -2
- package/dist/data/field.zod.d.ts +1648 -10
- package/dist/data/field.zod.d.ts.map +1 -1
- package/dist/data/field.zod.js +149 -8
- package/dist/data/filter.zod.d.ts +295 -0
- package/dist/data/filter.zod.d.ts.map +1 -0
- package/dist/data/filter.zod.js +226 -0
- package/dist/data/mapping.zod.d.ts +215 -2
- package/dist/data/mapping.zod.d.ts.map +1 -1
- package/dist/data/object.zod.d.ts +505 -25
- package/dist/data/object.zod.d.ts.map +1 -1
- package/dist/data/object.zod.js +32 -5
- package/dist/data/query.zod.d.ts +349 -0
- package/dist/data/query.zod.d.ts.map +1 -1
- package/dist/data/query.zod.js +77 -1
- package/dist/data/trigger.zod.d.ts +354 -0
- package/dist/data/trigger.zod.d.ts.map +1 -0
- package/dist/data/trigger.zod.js +195 -0
- package/dist/data/validation.zod.d.ts +83 -43
- package/dist/data/validation.zod.d.ts.map +1 -1
- package/dist/data/validation.zod.js +51 -5
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/system/api.zod.d.ts +130 -4
- package/dist/system/api.zod.d.ts.map +1 -1
- package/dist/system/api.zod.js +4 -1
- package/dist/system/auth.zod.d.ts +2287 -0
- package/dist/system/auth.zod.d.ts.map +1 -0
- package/dist/system/auth.zod.js +365 -0
- package/dist/system/datasource.zod.d.ts +193 -30
- package/dist/system/datasource.zod.d.ts.map +1 -1
- package/dist/system/datasource.zod.js +58 -11
- package/dist/system/discovery.zod.d.ts +174 -0
- package/dist/system/discovery.zod.d.ts.map +1 -0
- package/dist/system/discovery.zod.js +53 -0
- package/dist/system/driver.zod.d.ts +1631 -0
- package/dist/system/driver.zod.d.ts.map +1 -0
- package/dist/system/driver.zod.js +337 -0
- package/dist/system/license.zod.d.ts +2 -2
- package/dist/system/manifest.zod.d.ts +323 -52
- package/dist/system/manifest.zod.d.ts.map +1 -1
- package/dist/system/manifest.zod.js +91 -17
- package/dist/system/plugin.zod.d.ts +3516 -0
- package/dist/system/plugin.zod.d.ts.map +1 -0
- package/dist/system/plugin.zod.js +226 -0
- package/dist/system/policy.zod.d.ts +10 -10
- package/dist/system/territory.zod.d.ts +1 -1
- package/dist/system/webhook.zod.d.ts +3 -3
- package/dist/ui/action.zod.d.ts +19 -12
- package/dist/ui/action.zod.d.ts.map +1 -1
- package/dist/ui/action.zod.js +7 -1
- package/dist/ui/app.zod.d.ts +109 -3
- package/dist/ui/app.zod.d.ts.map +1 -1
- package/dist/ui/app.zod.js +13 -2
- package/dist/ui/dashboard.zod.d.ts +19 -13
- package/dist/ui/dashboard.zod.d.ts.map +1 -1
- package/dist/ui/dashboard.zod.js +10 -3
- package/dist/ui/page.zod.d.ts +6 -6
- package/dist/ui/report.zod.d.ts +13 -32
- package/dist/ui/report.zod.d.ts.map +1 -1
- package/dist/ui/report.zod.js +10 -9
- package/dist/ui/theme.zod.d.ts +1221 -0
- package/dist/ui/theme.zod.d.ts.map +1 -0
- package/dist/ui/theme.zod.js +202 -0
- package/dist/ui/widget.zod.d.ts +350 -0
- package/dist/ui/widget.zod.d.ts.map +1 -0
- package/dist/ui/widget.zod.js +66 -0
- package/json-schema/AccountLinkingConfig.json +27 -0
- package/json-schema/Action.json +8 -2
- package/json-schema/ActionParam.json +8 -2
- package/json-schema/Address.json +40 -0
- package/json-schema/AggregationFunction.json +19 -0
- package/json-schema/AggregationNode.json +42 -0
- package/json-schema/Animation.json +56 -0
- package/json-schema/ApiCapabilities.json +28 -0
- package/json-schema/ApiError.json +27 -0
- package/json-schema/ApiRoutes.json +41 -0
- package/json-schema/App.json +13 -2
- package/json-schema/AsyncValidation.json +70 -0
- package/json-schema/AuthConfig.json +606 -0
- package/json-schema/AuthPluginConfig.json +28 -0
- package/json-schema/AuthStrategy.json +17 -0
- package/json-schema/AuthenticationConfig.json +601 -0
- package/json-schema/AuthenticationProvider.json +617 -0
- package/json-schema/BaseResponse.json +63 -0
- package/json-schema/BorderRadius.json +44 -0
- package/json-schema/Breakpoints.json +36 -0
- package/json-schema/BulkRequest.json +29 -0
- package/json-schema/BulkResponse.json +108 -0
- package/json-schema/CSRFConfig.json +31 -0
- package/json-schema/ColorPalette.json +83 -0
- package/json-schema/ComparisonOperator.json +56 -0
- package/json-schema/ConditionalValidation.json +793 -0
- package/json-schema/CreateRequest.json +20 -0
- package/json-schema/CrossFieldValidation.json +56 -0
- package/json-schema/CustomValidator.json +57 -0
- package/json-schema/Dashboard.json +20 -0
- package/json-schema/DashboardWidget.json +20 -0
- package/json-schema/DatabaseAdapter.json +38 -0
- package/json-schema/Datasource.json +25 -23
- package/json-schema/DatasourceCapabilities.json +25 -5
- package/json-schema/DeleteResponse.json +68 -0
- package/json-schema/Discovery.json +114 -0
- package/json-schema/DriverCapabilities.json +69 -0
- package/json-schema/DriverDefinition.json +86 -0
- package/json-schema/DriverInterface.json +88 -0
- package/json-schema/DriverOptions.json +23 -0
- package/json-schema/DriverType.json +1 -18
- package/json-schema/EmailPasswordConfig.json +43 -0
- package/json-schema/EqualityOperator.json +14 -0
- package/json-schema/ExportRequest.json +786 -0
- package/json-schema/Field.json +75 -4
- package/json-schema/FieldOperators.json +108 -0
- package/json-schema/FieldType.json +8 -2
- package/json-schema/FieldWidgetProps.json +327 -0
- package/json-schema/FilterCondition.json +28 -0
- package/json-schema/I18nContext.json +12 -0
- package/json-schema/JoinNode.json +455 -0
- package/json-schema/JoinType.json +15 -0
- package/json-schema/ListRecordResponse.json +103 -0
- package/json-schema/LocationCoordinates.json +36 -0
- package/json-schema/Logger.json +25 -0
- package/json-schema/MagicLinkConfig.json +21 -0
- package/json-schema/Manifest.json +243 -18
- package/json-schema/Mapping.json +328 -0
- package/json-schema/ModificationResult.json +46 -0
- package/json-schema/NormalizedFilter.json +348 -0
- package/json-schema/OAuthProvider.json +66 -0
- package/json-schema/Object.json +103 -6
- package/json-schema/ObjectCapabilities.json +26 -0
- package/json-schema/ObjectQLClient.json +12 -0
- package/json-schema/PasskeyConfig.json +54 -0
- package/json-schema/Plugin.json +20 -0
- package/json-schema/PluginContext.json +91 -0
- package/json-schema/PluginLifecycle.json +11 -0
- package/json-schema/Query.json +328 -0
- package/json-schema/QueryFilter.json +34 -0
- package/json-schema/RangeOperator.json +41 -0
- package/json-schema/RateLimitConfig.json +36 -0
- package/json-schema/RecordData.json +11 -0
- package/json-schema/Report.json +20 -26
- package/json-schema/Router.json +12 -0
- package/json-schema/Scheduler.json +12 -0
- package/json-schema/ScopedStorage.json +12 -0
- package/json-schema/SessionConfig.json +56 -0
- package/json-schema/SetOperator.json +18 -0
- package/json-schema/Shadow.json +44 -0
- package/json-schema/SingleRecordResponse.json +69 -0
- package/json-schema/Spacing.json +64 -0
- package/json-schema/SpecialOperator.json +18 -0
- package/json-schema/StandardAuthProvider.json +622 -0
- package/json-schema/StringOperator.json +21 -0
- package/json-schema/SystemAPI.json +12 -0
- package/json-schema/Theme.json +543 -0
- package/json-schema/ThemeMode.json +14 -0
- package/json-schema/Trigger.json +73 -0
- package/json-schema/TriggerAction.json +14 -0
- package/json-schema/TriggerContext.json +61 -0
- package/json-schema/TriggerTiming.json +13 -0
- package/json-schema/TwoFactorConfig.json +40 -0
- package/json-schema/Typography.json +142 -0
- package/json-schema/UpdateRequest.json +20 -0
- package/json-schema/UserFieldMapping.json +47 -0
- package/json-schema/ValidationRule.json +583 -0
- package/json-schema/WindowFunction.json +24 -0
- package/json-schema/WindowFunctionNode.json +104 -0
- package/json-schema/WindowSpec.json +65 -0
- package/json-schema/ZIndex.json +44 -0
- package/package.json +8 -3
|
@@ -117,120 +117,160 @@ export declare const FormatValidationSchema: z.ZodObject<{
|
|
|
117
117
|
type: "format";
|
|
118
118
|
name: string;
|
|
119
119
|
field: string;
|
|
120
|
+
format?: "email" | "url" | "phone" | "json" | undefined;
|
|
120
121
|
active?: boolean | undefined;
|
|
121
122
|
severity?: "error" | "warning" | "info" | undefined;
|
|
122
|
-
format?: "email" | "url" | "phone" | "json" | undefined;
|
|
123
123
|
regex?: string | undefined;
|
|
124
124
|
}>;
|
|
125
125
|
/**
|
|
126
|
-
*
|
|
126
|
+
* 5. Cross-Field Validation
|
|
127
|
+
* Validates relationships between multiple fields.
|
|
127
128
|
*/
|
|
128
|
-
export declare const
|
|
129
|
+
export declare const CrossFieldValidationSchema: z.ZodObject<{
|
|
129
130
|
name: z.ZodString;
|
|
130
131
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
131
132
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
132
133
|
message: z.ZodString;
|
|
133
134
|
} & {
|
|
134
|
-
type: z.ZodLiteral<"
|
|
135
|
+
type: z.ZodLiteral<"cross_field">;
|
|
135
136
|
condition: z.ZodString;
|
|
137
|
+
fields: z.ZodArray<z.ZodString, "many">;
|
|
136
138
|
}, "strip", z.ZodTypeAny, {
|
|
137
139
|
message: string;
|
|
138
|
-
type: "
|
|
140
|
+
type: "cross_field";
|
|
139
141
|
name: string;
|
|
142
|
+
fields: string[];
|
|
140
143
|
active: boolean;
|
|
141
144
|
severity: "error" | "warning" | "info";
|
|
142
145
|
condition: string;
|
|
143
146
|
}, {
|
|
144
147
|
message: string;
|
|
145
|
-
type: "
|
|
148
|
+
type: "cross_field";
|
|
146
149
|
name: string;
|
|
150
|
+
fields: string[];
|
|
147
151
|
condition: string;
|
|
148
152
|
active?: boolean | undefined;
|
|
149
153
|
severity?: "error" | "warning" | "info" | undefined;
|
|
150
|
-
}
|
|
154
|
+
}>;
|
|
155
|
+
/**
|
|
156
|
+
* 6. Async Validation
|
|
157
|
+
* Remote validation via API call or database query.
|
|
158
|
+
*/
|
|
159
|
+
export declare const AsyncValidationSchema: z.ZodObject<{
|
|
151
160
|
name: z.ZodString;
|
|
152
161
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
153
162
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
154
163
|
message: z.ZodString;
|
|
155
164
|
} & {
|
|
156
|
-
type: z.ZodLiteral<"
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
165
|
+
type: z.ZodLiteral<"async">;
|
|
166
|
+
field: z.ZodString;
|
|
167
|
+
validatorUrl: z.ZodOptional<z.ZodString>;
|
|
168
|
+
validatorFunction: z.ZodOptional<z.ZodString>;
|
|
169
|
+
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
170
|
+
debounce: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
160
172
|
}, "strip", z.ZodTypeAny, {
|
|
161
173
|
message: string;
|
|
162
|
-
type: "
|
|
174
|
+
type: "async";
|
|
163
175
|
name: string;
|
|
164
|
-
|
|
176
|
+
field: string;
|
|
165
177
|
active: boolean;
|
|
166
178
|
severity: "error" | "warning" | "info";
|
|
167
|
-
|
|
168
|
-
|
|
179
|
+
timeout: number;
|
|
180
|
+
params?: Record<string, any> | undefined;
|
|
181
|
+
validatorUrl?: string | undefined;
|
|
182
|
+
validatorFunction?: string | undefined;
|
|
183
|
+
debounce?: number | undefined;
|
|
169
184
|
}, {
|
|
170
185
|
message: string;
|
|
171
|
-
type: "
|
|
186
|
+
type: "async";
|
|
172
187
|
name: string;
|
|
173
|
-
|
|
188
|
+
field: string;
|
|
189
|
+
params?: Record<string, any> | undefined;
|
|
174
190
|
active?: boolean | undefined;
|
|
175
191
|
severity?: "error" | "warning" | "info" | undefined;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
192
|
+
validatorUrl?: string | undefined;
|
|
193
|
+
validatorFunction?: string | undefined;
|
|
194
|
+
timeout?: number | undefined;
|
|
195
|
+
debounce?: number | undefined;
|
|
196
|
+
}>;
|
|
197
|
+
/**
|
|
198
|
+
* 7. Custom Validator Function
|
|
199
|
+
* User-defined validation logic with code reference.
|
|
200
|
+
*/
|
|
201
|
+
export declare const CustomValidatorSchema: z.ZodObject<{
|
|
179
202
|
name: z.ZodString;
|
|
180
203
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
181
204
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
182
205
|
message: z.ZodString;
|
|
183
206
|
} & {
|
|
184
|
-
type: z.ZodLiteral<"
|
|
185
|
-
field: z.ZodString
|
|
186
|
-
|
|
207
|
+
type: z.ZodLiteral<"custom">;
|
|
208
|
+
field: z.ZodOptional<z.ZodString>;
|
|
209
|
+
validatorFunction: z.ZodString;
|
|
210
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
187
211
|
}, "strip", z.ZodTypeAny, {
|
|
188
212
|
message: string;
|
|
189
|
-
type: "
|
|
213
|
+
type: "custom";
|
|
190
214
|
name: string;
|
|
191
|
-
field: string;
|
|
192
215
|
active: boolean;
|
|
193
216
|
severity: "error" | "warning" | "info";
|
|
194
|
-
|
|
217
|
+
validatorFunction: string;
|
|
218
|
+
params?: Record<string, any> | undefined;
|
|
219
|
+
field?: string | undefined;
|
|
195
220
|
}, {
|
|
196
221
|
message: string;
|
|
197
|
-
type: "
|
|
222
|
+
type: "custom";
|
|
198
223
|
name: string;
|
|
199
|
-
|
|
200
|
-
|
|
224
|
+
validatorFunction: string;
|
|
225
|
+
params?: Record<string, any> | undefined;
|
|
226
|
+
field?: string | undefined;
|
|
201
227
|
active?: boolean | undefined;
|
|
202
228
|
severity?: "error" | "warning" | "info" | undefined;
|
|
203
|
-
}
|
|
229
|
+
}>;
|
|
230
|
+
/**
|
|
231
|
+
* Master Validation Rule Schema (forward declared for circular reference)
|
|
232
|
+
*/
|
|
233
|
+
export declare const ValidationRuleSchema: z.ZodType<any>;
|
|
234
|
+
/**
|
|
235
|
+
* 8. Conditional Validation
|
|
236
|
+
* Validation that only applies when a condition is met.
|
|
237
|
+
*/
|
|
238
|
+
export declare const ConditionalValidationSchema: z.ZodObject<{
|
|
204
239
|
name: z.ZodString;
|
|
205
240
|
active: z.ZodDefault<z.ZodBoolean>;
|
|
206
241
|
severity: z.ZodDefault<z.ZodEnum<["error", "warning", "info"]>>;
|
|
207
242
|
message: z.ZodString;
|
|
208
243
|
} & {
|
|
209
|
-
type: z.ZodLiteral<"
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
244
|
+
type: z.ZodLiteral<"conditional">;
|
|
245
|
+
when: z.ZodString;
|
|
246
|
+
then: z.ZodType<any, z.ZodTypeDef, any>;
|
|
247
|
+
otherwise: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
213
248
|
}, "strip", z.ZodTypeAny, {
|
|
214
249
|
message: string;
|
|
215
|
-
type: "
|
|
250
|
+
type: "conditional";
|
|
216
251
|
name: string;
|
|
217
|
-
field: string;
|
|
218
252
|
active: boolean;
|
|
219
253
|
severity: "error" | "warning" | "info";
|
|
220
|
-
|
|
221
|
-
|
|
254
|
+
when: string;
|
|
255
|
+
then?: any;
|
|
256
|
+
otherwise?: any;
|
|
222
257
|
}, {
|
|
223
258
|
message: string;
|
|
224
|
-
type: "
|
|
259
|
+
type: "conditional";
|
|
225
260
|
name: string;
|
|
226
|
-
|
|
261
|
+
when: string;
|
|
227
262
|
active?: boolean | undefined;
|
|
228
263
|
severity?: "error" | "warning" | "info" | undefined;
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
}
|
|
264
|
+
then?: any;
|
|
265
|
+
otherwise?: any;
|
|
266
|
+
}>;
|
|
232
267
|
export type ValidationRule = z.infer<typeof ValidationRuleSchema>;
|
|
233
268
|
export type ScriptValidation = z.infer<typeof ScriptValidationSchema>;
|
|
234
269
|
export type UniquenessValidation = z.infer<typeof UniquenessValidationSchema>;
|
|
235
270
|
export type StateMachineValidation = z.infer<typeof StateMachineValidationSchema>;
|
|
271
|
+
export type FormatValidation = z.infer<typeof FormatValidationSchema>;
|
|
272
|
+
export type CrossFieldValidation = z.infer<typeof CrossFieldValidationSchema>;
|
|
273
|
+
export type AsyncValidation = z.infer<typeof AsyncValidationSchema>;
|
|
274
|
+
export type CustomValidation = z.infer<typeof CustomValidatorSchema>;
|
|
275
|
+
export type ConditionalValidation = z.infer<typeof ConditionalValidationSchema>;
|
|
236
276
|
//# sourceMappingURL=validation.zod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.zod.d.ts","sourceRoot":"","sources":["../../src/data/validation.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKrC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;EAIvC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"validation.zod.d.ts","sourceRoot":"","sources":["../../src/data/validation.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKrC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;EAIvC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;EAIrC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQhC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAW/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKtC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACrE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ValidationRuleSchema = exports.FormatValidationSchema = exports.StateMachineValidationSchema = exports.UniquenessValidationSchema = exports.ScriptValidationSchema = void 0;
|
|
3
|
+
exports.ConditionalValidationSchema = exports.ValidationRuleSchema = exports.CustomValidatorSchema = exports.AsyncValidationSchema = exports.CrossFieldValidationSchema = exports.FormatValidationSchema = exports.StateMachineValidationSchema = exports.UniquenessValidationSchema = exports.ScriptValidationSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
/**
|
|
6
6
|
* Base Validation Rule
|
|
@@ -49,11 +49,57 @@ exports.FormatValidationSchema = BaseValidationSchema.extend({
|
|
|
49
49
|
format: zod_1.z.enum(['email', 'url', 'phone', 'json']).optional(),
|
|
50
50
|
});
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* 5. Cross-Field Validation
|
|
53
|
+
* Validates relationships between multiple fields.
|
|
53
54
|
*/
|
|
54
|
-
exports.
|
|
55
|
+
exports.CrossFieldValidationSchema = BaseValidationSchema.extend({
|
|
56
|
+
type: zod_1.z.literal('cross_field'),
|
|
57
|
+
condition: zod_1.z.string().describe('Formula expression comparing fields (e.g. "end_date > start_date")'),
|
|
58
|
+
fields: zod_1.z.array(zod_1.z.string()).describe('Fields involved in the validation'),
|
|
59
|
+
});
|
|
60
|
+
/**
|
|
61
|
+
* 6. Async Validation
|
|
62
|
+
* Remote validation via API call or database query.
|
|
63
|
+
*/
|
|
64
|
+
exports.AsyncValidationSchema = BaseValidationSchema.extend({
|
|
65
|
+
type: zod_1.z.literal('async'),
|
|
66
|
+
field: zod_1.z.string().describe('Field to validate'),
|
|
67
|
+
validatorUrl: zod_1.z.string().optional().describe('External API endpoint for validation'),
|
|
68
|
+
validatorFunction: zod_1.z.string().optional().describe('Reference to custom validator function'),
|
|
69
|
+
timeout: zod_1.z.number().optional().default(5000).describe('Timeout in milliseconds'),
|
|
70
|
+
debounce: zod_1.z.number().optional().describe('Debounce delay in milliseconds'),
|
|
71
|
+
params: zod_1.z.record(zod_1.z.any()).optional().describe('Additional parameters to pass to validator'),
|
|
72
|
+
});
|
|
73
|
+
/**
|
|
74
|
+
* 7. Custom Validator Function
|
|
75
|
+
* User-defined validation logic with code reference.
|
|
76
|
+
*/
|
|
77
|
+
exports.CustomValidatorSchema = BaseValidationSchema.extend({
|
|
78
|
+
type: zod_1.z.literal('custom'),
|
|
79
|
+
field: zod_1.z.string().optional().describe('Field to validate (optional for record-level validation)'),
|
|
80
|
+
validatorFunction: zod_1.z.string().describe('Function name or reference to custom validator'),
|
|
81
|
+
params: zod_1.z.record(zod_1.z.any()).optional().describe('Additional parameters for the validator'),
|
|
82
|
+
});
|
|
83
|
+
/**
|
|
84
|
+
* Master Validation Rule Schema (forward declared for circular reference)
|
|
85
|
+
*/
|
|
86
|
+
exports.ValidationRuleSchema = zod_1.z.lazy(() => zod_1.z.discriminatedUnion('type', [
|
|
55
87
|
exports.ScriptValidationSchema,
|
|
56
88
|
exports.UniquenessValidationSchema,
|
|
57
89
|
exports.StateMachineValidationSchema,
|
|
58
|
-
exports.FormatValidationSchema
|
|
59
|
-
|
|
90
|
+
exports.FormatValidationSchema,
|
|
91
|
+
exports.CrossFieldValidationSchema,
|
|
92
|
+
exports.AsyncValidationSchema,
|
|
93
|
+
exports.CustomValidatorSchema,
|
|
94
|
+
exports.ConditionalValidationSchema,
|
|
95
|
+
]));
|
|
96
|
+
/**
|
|
97
|
+
* 8. Conditional Validation
|
|
98
|
+
* Validation that only applies when a condition is met.
|
|
99
|
+
*/
|
|
100
|
+
exports.ConditionalValidationSchema = BaseValidationSchema.extend({
|
|
101
|
+
type: zod_1.z.literal('conditional'),
|
|
102
|
+
when: zod_1.z.string().describe('Condition formula (e.g. "type = \'enterprise\'")'),
|
|
103
|
+
then: exports.ValidationRuleSchema.describe('Validation rule to apply when condition is true'),
|
|
104
|
+
otherwise: exports.ValidationRuleSchema.optional().describe('Validation rule to apply when condition is false'),
|
|
105
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,10 @@ export * from './data/workflow.zod';
|
|
|
15
15
|
export * from './data/flow.zod';
|
|
16
16
|
export * from './data/dataset.zod';
|
|
17
17
|
export * from './data/query.zod';
|
|
18
|
+
export * from './data/filter.zod';
|
|
18
19
|
export * from './data/mapping.zod';
|
|
20
|
+
export * from './data/trigger.zod';
|
|
21
|
+
export * from './api/contract.zod';
|
|
19
22
|
export * from './ai/agent.zod';
|
|
20
23
|
export * from './ui/app.zod';
|
|
21
24
|
export * from './ui/view.zod';
|
|
@@ -23,16 +26,23 @@ export * from './ui/dashboard.zod';
|
|
|
23
26
|
export * from './ui/report.zod';
|
|
24
27
|
export * from './ui/action.zod';
|
|
25
28
|
export * from './ui/page.zod';
|
|
29
|
+
export * from './ui/widget.zod';
|
|
30
|
+
export * from './ui/theme.zod';
|
|
26
31
|
export * from './system/manifest.zod';
|
|
27
32
|
export * from './system/datasource.zod';
|
|
28
33
|
export * from './system/api.zod';
|
|
29
34
|
export * from './system/identity.zod';
|
|
35
|
+
export * from './system/auth.zod';
|
|
30
36
|
export * from './system/policy.zod';
|
|
31
37
|
export * from './system/role.zod';
|
|
32
38
|
export * from './system/territory.zod';
|
|
33
39
|
export * from './system/license.zod';
|
|
34
40
|
export * from './system/webhook.zod';
|
|
35
41
|
export * from './system/translation.zod';
|
|
42
|
+
export * from './system/driver.zod';
|
|
36
43
|
export * from './system/constants';
|
|
37
44
|
export * from './system/types';
|
|
45
|
+
export * from './system/discovery.zod';
|
|
46
|
+
export * from './system/plugin.zod';
|
|
47
|
+
export * from './system/driver.zod';
|
|
38
48
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,11 @@ __exportStar(require("./data/workflow.zod"), exports);
|
|
|
32
32
|
__exportStar(require("./data/flow.zod"), exports);
|
|
33
33
|
__exportStar(require("./data/dataset.zod"), exports);
|
|
34
34
|
__exportStar(require("./data/query.zod"), exports);
|
|
35
|
+
__exportStar(require("./data/filter.zod"), exports); // Unified Query DSL
|
|
35
36
|
__exportStar(require("./data/mapping.zod"), exports);
|
|
37
|
+
__exportStar(require("./data/trigger.zod"), exports);
|
|
38
|
+
// API Protocol (Envelopes, Contracts)
|
|
39
|
+
__exportStar(require("./api/contract.zod"), exports);
|
|
36
40
|
// AI Protocol (Agent, RAG)
|
|
37
41
|
__exportStar(require("./ai/agent.zod"), exports);
|
|
38
42
|
// UI Protocol (Layout, Navigation, Interaction)
|
|
@@ -42,16 +46,23 @@ __exportStar(require("./ui/dashboard.zod"), exports);
|
|
|
42
46
|
__exportStar(require("./ui/report.zod"), exports);
|
|
43
47
|
__exportStar(require("./ui/action.zod"), exports);
|
|
44
48
|
__exportStar(require("./ui/page.zod"), exports);
|
|
49
|
+
__exportStar(require("./ui/widget.zod"), exports);
|
|
50
|
+
__exportStar(require("./ui/theme.zod"), exports);
|
|
45
51
|
// System Protocol (Manifest, Runtime, Constants)
|
|
46
52
|
__exportStar(require("./system/manifest.zod"), exports);
|
|
47
53
|
__exportStar(require("./system/datasource.zod"), exports);
|
|
48
54
|
__exportStar(require("./system/api.zod"), exports);
|
|
49
55
|
__exportStar(require("./system/identity.zod"), exports);
|
|
56
|
+
__exportStar(require("./system/auth.zod"), exports);
|
|
50
57
|
__exportStar(require("./system/policy.zod"), exports);
|
|
51
58
|
__exportStar(require("./system/role.zod"), exports);
|
|
52
59
|
__exportStar(require("./system/territory.zod"), exports);
|
|
53
60
|
__exportStar(require("./system/license.zod"), exports);
|
|
54
61
|
__exportStar(require("./system/webhook.zod"), exports);
|
|
55
62
|
__exportStar(require("./system/translation.zod"), exports);
|
|
63
|
+
__exportStar(require("./system/driver.zod"), exports); // Export Driver Protocol
|
|
56
64
|
__exportStar(require("./system/constants"), exports);
|
|
57
65
|
__exportStar(require("./system/types"), exports);
|
|
66
|
+
__exportStar(require("./system/discovery.zod"), exports);
|
|
67
|
+
__exportStar(require("./system/plugin.zod"), exports);
|
|
68
|
+
__exportStar(require("./system/driver.zod"), exports);
|
package/dist/system/api.zod.d.ts
CHANGED
|
@@ -57,10 +57,10 @@ export declare const ApiEndpointSchema: z.ZodObject<{
|
|
|
57
57
|
operation: z.ZodOptional<z.ZodEnum<["find", "get", "create", "update", "delete"]>>;
|
|
58
58
|
}, "strip", z.ZodTypeAny, {
|
|
59
59
|
object?: string | undefined;
|
|
60
|
-
operation?: "find" | "
|
|
60
|
+
operation?: "find" | "get" | "create" | "update" | "delete" | undefined;
|
|
61
61
|
}, {
|
|
62
62
|
object?: string | undefined;
|
|
63
|
-
operation?: "find" | "
|
|
63
|
+
operation?: "find" | "get" | "create" | "update" | "delete" | undefined;
|
|
64
64
|
}>>;
|
|
65
65
|
/** Data Transformation */
|
|
66
66
|
inputMapping: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -116,7 +116,7 @@ export declare const ApiEndpointSchema: z.ZodObject<{
|
|
|
116
116
|
description?: string | undefined;
|
|
117
117
|
objectParams?: {
|
|
118
118
|
object?: string | undefined;
|
|
119
|
-
operation?: "find" | "
|
|
119
|
+
operation?: "find" | "get" | "create" | "update" | "delete" | undefined;
|
|
120
120
|
} | undefined;
|
|
121
121
|
inputMapping?: {
|
|
122
122
|
source: string;
|
|
@@ -144,7 +144,7 @@ export declare const ApiEndpointSchema: z.ZodObject<{
|
|
|
144
144
|
description?: string | undefined;
|
|
145
145
|
objectParams?: {
|
|
146
146
|
object?: string | undefined;
|
|
147
|
-
operation?: "find" | "
|
|
147
|
+
operation?: "find" | "get" | "create" | "update" | "delete" | undefined;
|
|
148
148
|
} | undefined;
|
|
149
149
|
inputMapping?: {
|
|
150
150
|
source: string;
|
|
@@ -164,5 +164,131 @@ export declare const ApiEndpointSchema: z.ZodObject<{
|
|
|
164
164
|
} | undefined;
|
|
165
165
|
cacheTtl?: number | undefined;
|
|
166
166
|
}>;
|
|
167
|
+
export declare const ApiEndpoint: z.ZodObject<{
|
|
168
|
+
/** Identity */
|
|
169
|
+
name: z.ZodString;
|
|
170
|
+
path: z.ZodString;
|
|
171
|
+
method: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>;
|
|
172
|
+
/** Documentation */
|
|
173
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
174
|
+
description: z.ZodOptional<z.ZodString>;
|
|
175
|
+
/** Execution Logic */
|
|
176
|
+
type: z.ZodEnum<["flow", "script", "object_operation", "proxy"]>;
|
|
177
|
+
target: z.ZodString;
|
|
178
|
+
/** Logic Config */
|
|
179
|
+
objectParams: z.ZodOptional<z.ZodObject<{
|
|
180
|
+
object: z.ZodOptional<z.ZodString>;
|
|
181
|
+
operation: z.ZodOptional<z.ZodEnum<["find", "get", "create", "update", "delete"]>>;
|
|
182
|
+
}, "strip", z.ZodTypeAny, {
|
|
183
|
+
object?: string | undefined;
|
|
184
|
+
operation?: "find" | "get" | "create" | "update" | "delete" | undefined;
|
|
185
|
+
}, {
|
|
186
|
+
object?: string | undefined;
|
|
187
|
+
operation?: "find" | "get" | "create" | "update" | "delete" | undefined;
|
|
188
|
+
}>>;
|
|
189
|
+
/** Data Transformation */
|
|
190
|
+
inputMapping: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
191
|
+
source: z.ZodString;
|
|
192
|
+
target: z.ZodString;
|
|
193
|
+
transform: z.ZodOptional<z.ZodString>;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
source: string;
|
|
196
|
+
target: string;
|
|
197
|
+
transform?: string | undefined;
|
|
198
|
+
}, {
|
|
199
|
+
source: string;
|
|
200
|
+
target: string;
|
|
201
|
+
transform?: string | undefined;
|
|
202
|
+
}>, "many">>;
|
|
203
|
+
outputMapping: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
204
|
+
source: z.ZodString;
|
|
205
|
+
target: z.ZodString;
|
|
206
|
+
transform: z.ZodOptional<z.ZodString>;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
source: string;
|
|
209
|
+
target: string;
|
|
210
|
+
transform?: string | undefined;
|
|
211
|
+
}, {
|
|
212
|
+
source: string;
|
|
213
|
+
target: string;
|
|
214
|
+
transform?: string | undefined;
|
|
215
|
+
}>, "many">>;
|
|
216
|
+
/** Policies */
|
|
217
|
+
authRequired: z.ZodDefault<z.ZodBoolean>;
|
|
218
|
+
rateLimit: z.ZodOptional<z.ZodObject<{
|
|
219
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
220
|
+
windowMs: z.ZodDefault<z.ZodNumber>;
|
|
221
|
+
maxRequests: z.ZodDefault<z.ZodNumber>;
|
|
222
|
+
}, "strip", z.ZodTypeAny, {
|
|
223
|
+
enabled: boolean;
|
|
224
|
+
windowMs: number;
|
|
225
|
+
maxRequests: number;
|
|
226
|
+
}, {
|
|
227
|
+
enabled?: boolean | undefined;
|
|
228
|
+
windowMs?: number | undefined;
|
|
229
|
+
maxRequests?: number | undefined;
|
|
230
|
+
}>>;
|
|
231
|
+
cacheTtl: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
path: string;
|
|
234
|
+
type: "script" | "flow" | "object_operation" | "proxy";
|
|
235
|
+
name: string;
|
|
236
|
+
target: string;
|
|
237
|
+
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
238
|
+
authRequired: boolean;
|
|
239
|
+
summary?: string | undefined;
|
|
240
|
+
description?: string | undefined;
|
|
241
|
+
objectParams?: {
|
|
242
|
+
object?: string | undefined;
|
|
243
|
+
operation?: "find" | "get" | "create" | "update" | "delete" | undefined;
|
|
244
|
+
} | undefined;
|
|
245
|
+
inputMapping?: {
|
|
246
|
+
source: string;
|
|
247
|
+
target: string;
|
|
248
|
+
transform?: string | undefined;
|
|
249
|
+
}[] | undefined;
|
|
250
|
+
outputMapping?: {
|
|
251
|
+
source: string;
|
|
252
|
+
target: string;
|
|
253
|
+
transform?: string | undefined;
|
|
254
|
+
}[] | undefined;
|
|
255
|
+
rateLimit?: {
|
|
256
|
+
enabled: boolean;
|
|
257
|
+
windowMs: number;
|
|
258
|
+
maxRequests: number;
|
|
259
|
+
} | undefined;
|
|
260
|
+
cacheTtl?: number | undefined;
|
|
261
|
+
}, {
|
|
262
|
+
path: string;
|
|
263
|
+
type: "script" | "flow" | "object_operation" | "proxy";
|
|
264
|
+
name: string;
|
|
265
|
+
target: string;
|
|
266
|
+
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
267
|
+
summary?: string | undefined;
|
|
268
|
+
description?: string | undefined;
|
|
269
|
+
objectParams?: {
|
|
270
|
+
object?: string | undefined;
|
|
271
|
+
operation?: "find" | "get" | "create" | "update" | "delete" | undefined;
|
|
272
|
+
} | undefined;
|
|
273
|
+
inputMapping?: {
|
|
274
|
+
source: string;
|
|
275
|
+
target: string;
|
|
276
|
+
transform?: string | undefined;
|
|
277
|
+
}[] | undefined;
|
|
278
|
+
outputMapping?: {
|
|
279
|
+
source: string;
|
|
280
|
+
target: string;
|
|
281
|
+
transform?: string | undefined;
|
|
282
|
+
}[] | undefined;
|
|
283
|
+
authRequired?: boolean | undefined;
|
|
284
|
+
rateLimit?: {
|
|
285
|
+
enabled?: boolean | undefined;
|
|
286
|
+
windowMs?: number | undefined;
|
|
287
|
+
maxRequests?: number | undefined;
|
|
288
|
+
} | undefined;
|
|
289
|
+
cacheTtl?: number | undefined;
|
|
290
|
+
}> & {
|
|
291
|
+
create: <T extends z.input<typeof ApiEndpointSchema>>(config: T) => T;
|
|
292
|
+
};
|
|
167
293
|
export type ApiEndpoint = z.infer<typeof ApiEndpointSchema>;
|
|
168
294
|
//# sourceMappingURL=api.zod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.zod.d.ts","sourceRoot":"","sources":["../../src/system/api.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,UAAU,sDAAoD,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;EAI1B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAC5B,eAAe;;;;IAKf,oBAAoB;;;IAIpB,sBAAsB;;;IAItB,mBAAmB;;;;;;;;;;;IAMnB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI1B,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIf,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"api.zod.d.ts","sourceRoot":"","sources":["../../src/system/api.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,UAAU,sDAAoD,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;EAI1B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB;IAC5B,eAAe;;;;IAKf,oBAAoB;;;IAIpB,sBAAsB;;;IAItB,mBAAmB;;;;;;;;;;;IAMnB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI1B,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIf,CAAC;AAEH,eAAO,MAAM,WAAW;IA7BtB,eAAe;;;;IAKf,oBAAoB;;;IAIpB,sBAAsB;;;IAItB,mBAAmB;;;;;;;;;;;IAMnB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;IAI1B,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAON,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,UAAU,CAAC;CAC/D,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
package/dist/system/api.zod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApiEndpointSchema = exports.ApiMappingSchema = exports.RateLimitSchema = exports.HttpMethod = void 0;
|
|
3
|
+
exports.ApiEndpoint = exports.ApiEndpointSchema = exports.ApiMappingSchema = exports.RateLimitSchema = exports.HttpMethod = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
/**
|
|
6
6
|
* HTTP Method Enum
|
|
@@ -51,3 +51,6 @@ exports.ApiEndpointSchema = zod_1.z.object({
|
|
|
51
51
|
rateLimit: exports.RateLimitSchema.optional().describe('Rate limiting policy'),
|
|
52
52
|
cacheTtl: zod_1.z.number().optional().describe('Response cache TTL in seconds'),
|
|
53
53
|
});
|
|
54
|
+
exports.ApiEndpoint = Object.assign(exports.ApiEndpointSchema, {
|
|
55
|
+
create: (config) => config,
|
|
56
|
+
});
|