@objectstack/spec 0.1.0 → 0.1.2
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 +134 -121
- package/dist/ai/agent.zod.d.ts +164 -0
- package/dist/ai/agent.zod.d.ts.map +1 -0
- package/dist/ai/agent.zod.js +51 -0
- 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 +60 -0
- package/dist/data/dataset.zod.d.ts.map +1 -0
- package/dist/data/dataset.zod.js +54 -0
- package/dist/data/field.zod.d.ts +1808 -0
- package/dist/data/field.zod.d.ts.map +1 -0
- package/dist/data/field.zod.js +222 -0
- package/dist/data/flow.zod.d.ts +242 -0
- package/dist/data/flow.zod.d.ts.map +1 -0
- package/dist/data/flow.zod.js +77 -0
- package/dist/data/mapping.zod.d.ts +470 -0
- package/dist/data/mapping.zod.d.ts.map +1 -0
- package/dist/data/mapping.zod.js +65 -0
- package/dist/data/object.zod.d.ts +844 -0
- package/dist/data/object.zod.d.ts.map +1 -0
- package/dist/data/object.zod.js +81 -0
- package/dist/data/permission.zod.d.ts +163 -0
- package/dist/data/permission.zod.d.ts.map +1 -0
- package/dist/data/permission.zod.js +62 -0
- package/dist/data/query.zod.d.ts +438 -0
- package/dist/data/query.zod.d.ts.map +1 -0
- package/dist/data/query.zod.js +147 -0
- package/dist/data/sharing.zod.d.ts +63 -0
- package/dist/data/sharing.zod.d.ts.map +1 -0
- package/dist/data/sharing.zod.js +57 -0
- 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 +276 -0
- package/dist/data/validation.zod.d.ts.map +1 -0
- package/dist/data/validation.zod.js +105 -0
- package/dist/data/workflow.zod.d.ts +195 -0
- package/dist/data/workflow.zod.d.ts.map +1 -0
- package/dist/data/workflow.zod.js +64 -0
- package/dist/index.d.ts +41 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -5
- package/dist/system/api.zod.d.ts +294 -0
- package/dist/system/api.zod.d.ts.map +1 -0
- package/dist/system/api.zod.js +56 -0
- package/dist/system/constants/index.d.ts +11 -0
- package/dist/system/constants/index.d.ts.map +1 -0
- package/dist/system/constants/index.js +26 -0
- package/dist/system/constants/paths.d.ts +71 -0
- package/dist/system/constants/paths.d.ts.map +1 -0
- package/dist/system/constants/paths.js +65 -0
- package/dist/system/datasource.zod.d.ts +210 -0
- package/dist/system/datasource.zod.d.ts.map +1 -0
- package/dist/system/datasource.zod.js +90 -0
- 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 +1525 -0
- package/dist/system/driver.zod.d.ts.map +1 -0
- package/dist/system/driver.zod.js +290 -0
- package/dist/system/identity.zod.d.ts +204 -0
- package/dist/system/identity.zod.d.ts.map +1 -0
- package/dist/system/identity.zod.js +68 -0
- package/dist/system/license.zod.d.ts +110 -0
- package/dist/system/license.zod.d.ts.map +1 -0
- package/dist/system/license.zod.js +63 -0
- package/dist/system/manifest.zod.d.ts +397 -0
- package/dist/system/manifest.zod.d.ts.map +1 -0
- package/dist/system/manifest.zod.js +142 -0
- 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 +209 -0
- package/dist/system/policy.zod.d.ts.map +1 -0
- package/dist/system/policy.zod.js +54 -0
- package/dist/system/role.zod.d.ts +34 -0
- package/dist/system/role.zod.d.ts.map +1 -0
- package/dist/system/role.zod.js +25 -0
- package/dist/system/territory.zod.d.ts +91 -0
- package/dist/system/territory.zod.d.ts.map +1 -0
- package/dist/system/territory.zod.js +64 -0
- package/dist/system/translation.zod.d.ts +171 -0
- package/dist/system/translation.zod.d.ts.map +1 -0
- package/dist/system/translation.zod.js +34 -0
- package/dist/system/types/index.d.ts +7 -0
- package/dist/system/types/index.d.ts.map +1 -0
- package/dist/system/types/index.js +22 -0
- package/dist/system/types/plugin.d.ts +113 -0
- package/dist/system/types/plugin.d.ts.map +1 -0
- package/dist/system/types/plugin.js +6 -0
- package/dist/system/webhook.zod.d.ts +106 -0
- package/dist/system/webhook.zod.d.ts.map +1 -0
- package/dist/system/webhook.zod.js +56 -0
- package/dist/ui/action.zod.d.ts +155 -0
- package/dist/ui/action.zod.d.ts.map +1 -0
- package/dist/ui/action.zod.js +54 -0
- package/dist/ui/app.zod.d.ts +405 -0
- package/dist/ui/app.zod.d.ts.map +1 -0
- package/dist/ui/app.zod.js +138 -0
- package/dist/ui/dashboard.zod.d.ts +213 -0
- package/dist/ui/dashboard.zod.d.ts.map +1 -0
- package/dist/ui/dashboard.zod.js +72 -0
- package/dist/ui/page.zod.d.ts +187 -0
- package/dist/ui/page.zod.d.ts.map +1 -0
- package/dist/ui/page.zod.js +48 -0
- package/dist/ui/report.zod.d.ts +233 -0
- package/dist/ui/report.zod.d.ts.map +1 -0
- package/dist/ui/report.zod.js +74 -0
- 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/view.zod.d.ts +887 -0
- package/dist/ui/view.zod.d.ts.map +1 -0
- package/dist/ui/view.zod.js +83 -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/AIKnowledge.json +30 -0
- package/json-schema/AIModelConfig.json +41 -0
- package/json-schema/AITool.json +33 -0
- package/json-schema/Action.json +162 -0
- package/json-schema/ActionParam.json +82 -0
- package/json-schema/Address.json +40 -0
- package/json-schema/Agent.json +140 -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/ApiEndpoint.json +162 -0
- package/json-schema/ApiError.json +27 -0
- package/json-schema/ApiMapping.json +28 -0
- package/json-schema/ApiRoutes.json +41 -0
- package/json-schema/App.json +297 -0
- package/json-schema/AppBranding.json +24 -0
- package/json-schema/AsyncValidation.json +70 -0
- package/json-schema/AuditPolicy.json +31 -0
- package/json-schema/AuthProtocol.json +17 -0
- package/json-schema/AuthProvider.json +171 -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/CalendarConfig.json +28 -0
- package/json-schema/ChartType.json +19 -0
- package/json-schema/ColorPalette.json +83 -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 +117 -0
- package/json-schema/DashboardNavItem.json +42 -0
- package/json-schema/DashboardWidget.json +89 -0
- package/json-schema/Dataset.json +63 -0
- package/json-schema/DatasetMode.json +16 -0
- package/json-schema/Datasource.json +75 -0
- package/json-schema/DatasourceCapabilities.json +36 -0
- package/json-schema/DeleteResponse.json +68 -0
- package/json-schema/Discovery.json +114 -0
- package/json-schema/DriverCapabilities.json +39 -0
- package/json-schema/DriverDefinition.json +66 -0
- package/json-schema/DriverInterface.json +58 -0
- package/json-schema/DriverOptions.json +23 -0
- package/json-schema/DriverType.json +10 -0
- package/json-schema/EmailAlertAction.json +37 -0
- package/json-schema/ExportRequest.json +786 -0
- package/json-schema/Feature.json +51 -0
- package/json-schema/Field.json +290 -0
- package/json-schema/FieldMapping.json +83 -0
- package/json-schema/FieldNode.json +32 -0
- package/json-schema/FieldPermission.json +22 -0
- package/json-schema/FieldType.json +42 -0
- package/json-schema/FieldUpdateAction.json +32 -0
- package/json-schema/FieldWidgetProps.json +327 -0
- package/json-schema/FilterNode.json +52 -0
- package/json-schema/FilterOperator.json +26 -0
- package/json-schema/Flow.json +186 -0
- package/json-schema/FlowEdge.json +37 -0
- package/json-schema/FlowNode.json +65 -0
- package/json-schema/FlowNodeAction.json +24 -0
- package/json-schema/FlowVariable.json +34 -0
- package/json-schema/FormSection.json +42 -0
- package/json-schema/FormView.json +99 -0
- package/json-schema/FormatValidation.json +59 -0
- package/json-schema/GanttConfig.json +32 -0
- package/json-schema/GroupNavItem.json +42 -0
- package/json-schema/HttpMethod.json +16 -0
- package/json-schema/I18nContext.json +12 -0
- package/json-schema/Index.json +30 -0
- package/json-schema/JoinNode.json +455 -0
- package/json-schema/JoinType.json +15 -0
- package/json-schema/KanbanConfig.json +31 -0
- package/json-schema/LDAPConfig.json +39 -0
- package/json-schema/License.json +57 -0
- package/json-schema/ListRecordResponse.json +103 -0
- package/json-schema/ListView.json +153 -0
- package/json-schema/Locale.json +10 -0
- package/json-schema/LocationCoordinates.json +36 -0
- package/json-schema/Logger.json +25 -0
- package/json-schema/LogicOperator.json +14 -0
- package/json-schema/Manifest.json +315 -0
- package/json-schema/Mapping.json +598 -0
- package/json-schema/MenuItem.json +28 -0
- package/json-schema/MetricType.json +14 -0
- package/json-schema/ModificationResult.json +46 -0
- package/json-schema/NavigationItem.json +214 -0
- package/json-schema/NetworkPolicy.json +31 -0
- package/json-schema/OIDCConfig.json +46 -0
- package/json-schema/OWDModel.json +14 -0
- package/json-schema/Object.json +428 -0
- package/json-schema/ObjectCapabilities.json +62 -0
- package/json-schema/ObjectNavItem.json +46 -0
- package/json-schema/ObjectPermission.json +42 -0
- package/json-schema/ObjectQLClient.json +12 -0
- package/json-schema/Page.json +117 -0
- package/json-schema/PageComponent.json +36 -0
- package/json-schema/PageNavItem.json +47 -0
- package/json-schema/PageRegion.json +63 -0
- package/json-schema/PasswordPolicy.json +41 -0
- package/json-schema/PermissionSet.json +96 -0
- package/json-schema/Plan.json +53 -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/Policy.json +138 -0
- package/json-schema/Query.json +456 -0
- package/json-schema/RateLimit.json +26 -0
- package/json-schema/RecordData.json +11 -0
- package/json-schema/Report.json +219 -0
- package/json-schema/ReportChart.json +45 -0
- package/json-schema/ReportColumn.json +35 -0
- package/json-schema/ReportGrouping.json +38 -0
- package/json-schema/ReportType.json +15 -0
- package/json-schema/Role.json +32 -0
- package/json-schema/Router.json +12 -0
- package/json-schema/SAMLConfig.json +44 -0
- package/json-schema/Scheduler.json +12 -0
- package/json-schema/ScopedStorage.json +12 -0
- package/json-schema/ScriptValidation.json +48 -0
- package/json-schema/SelectOption.json +32 -0
- package/json-schema/SessionPolicy.json +27 -0
- package/json-schema/Shadow.json +44 -0
- package/json-schema/SharingLevel.json +13 -0
- package/json-schema/SharingRule.json +58 -0
- package/json-schema/SharingRuleType.json +15 -0
- package/json-schema/SingleRecordResponse.json +69 -0
- package/json-schema/SortNode.json +26 -0
- package/json-schema/Spacing.json +64 -0
- package/json-schema/StateMachineValidation.json +59 -0
- package/json-schema/SystemAPI.json +12 -0
- package/json-schema/Territory.json +77 -0
- package/json-schema/TerritoryModel.json +34 -0
- package/json-schema/TerritoryType.json +15 -0
- package/json-schema/Theme.json +543 -0
- package/json-schema/ThemeMode.json +14 -0
- package/json-schema/TransformType.json +18 -0
- package/json-schema/TranslationBundle.json +78 -0
- package/json-schema/TranslationData.json +75 -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/Typography.json +142 -0
- package/json-schema/UniquenessValidation.json +59 -0
- package/json-schema/UpdateRequest.json +20 -0
- package/json-schema/UrlNavItem.json +51 -0
- package/json-schema/ValidationRule.json +794 -0
- package/json-schema/View.json +500 -0
- package/json-schema/Webhook.json +88 -0
- package/json-schema/WebhookReceiver.json +66 -0
- package/json-schema/WebhookTriggerType.json +16 -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/WorkflowAction.json +84 -0
- package/json-schema/WorkflowRule.json +128 -0
- package/json-schema/WorkflowTriggerType.json +16 -0
- package/json-schema/ZIndex.json +44 -0
- package/package.json +34 -20
- package/dist/examples.d.ts +0 -28
- package/dist/examples.d.ts.map +0 -1
- package/dist/examples.js +0 -250
- package/dist/types/index.d.ts +0 -9
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -8
- package/dist/types/meta/field-type.d.ts +0 -54
- package/dist/types/meta/field-type.d.ts.map +0 -1
- package/dist/types/meta/field-type.js +0 -42
- package/dist/types/meta/index.d.ts +0 -13
- package/dist/types/meta/index.d.ts.map +0 -1
- package/dist/types/meta/index.js +0 -12
- package/dist/types/meta/object-entity.d.ts +0 -246
- package/dist/types/meta/object-entity.d.ts.map +0 -1
- package/dist/types/meta/object-entity.js +0 -9
- package/dist/types/meta/object-field.d.ts +0 -199
- package/dist/types/meta/object-field.d.ts.map +0 -1
- package/dist/types/meta/object-field.js +0 -9
- package/dist/types/meta/object-view.d.ts +0 -430
- package/dist/types/meta/object-view.d.ts.map +0 -1
- package/dist/types/meta/object-view.js +0 -9
- package/src/examples.ts +0 -257
- package/src/index.ts +0 -10
- package/src/types/index.ts +0 -9
- package/src/types/meta/field-type.ts +0 -91
- package/src/types/meta/index.ts +0 -13
- package/src/types/meta/object-entity.ts +0 -265
- package/src/types/meta/object-field.ts +0 -218
- package/src/types/meta/object-view.ts +0 -475
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LicenseSchema = exports.PlanSchema = exports.FeatureSchema = exports.MetricType = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Metric Type Classification
|
|
7
|
+
*/
|
|
8
|
+
exports.MetricType = zod_1.z.enum([
|
|
9
|
+
'boolean', // Feature Flag (Enabled/Disabled)
|
|
10
|
+
'counter', // Usage Count (e.g. API Calls, Records Created) - Accumulates
|
|
11
|
+
'gauge', // Current Level (e.g. Storage Used, Users Active) - Point in time
|
|
12
|
+
]);
|
|
13
|
+
/**
|
|
14
|
+
* Feature/Limit Definition Schema
|
|
15
|
+
* Defines a controllable capability of the system.
|
|
16
|
+
*/
|
|
17
|
+
exports.FeatureSchema = zod_1.z.object({
|
|
18
|
+
code: zod_1.z.string().regex(/^[a-z_][a-z0-9_.]*$/).describe('Feature code (e.g. core.api_access)'),
|
|
19
|
+
label: zod_1.z.string(),
|
|
20
|
+
description: zod_1.z.string().optional(),
|
|
21
|
+
type: exports.MetricType.default('boolean'),
|
|
22
|
+
/** For counters/gauges */
|
|
23
|
+
unit: zod_1.z.enum(['count', 'bytes', 'seconds', 'percent']).optional(),
|
|
24
|
+
/** Dependencies (e.g. 'audit_log' requires 'enterprise_tier') */
|
|
25
|
+
requires: zod_1.z.array(zod_1.z.string()).optional(),
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Subscription Plan Schema
|
|
29
|
+
* Defines a tier of service (e.g. "Free", "Pro", "Enterprise").
|
|
30
|
+
*/
|
|
31
|
+
exports.PlanSchema = zod_1.z.object({
|
|
32
|
+
code: zod_1.z.string().describe('Plan code (e.g. pro_v1)'),
|
|
33
|
+
label: zod_1.z.string(),
|
|
34
|
+
active: zod_1.z.boolean().default(true),
|
|
35
|
+
/** Feature Entitlements */
|
|
36
|
+
features: zod_1.z.array(zod_1.z.string()).describe('List of enabled boolean features'),
|
|
37
|
+
/** Limit Quotas */
|
|
38
|
+
limits: zod_1.z.record(zod_1.z.number()).describe('Map of metric codes to limit values (e.g. { storage_gb: 10 })'),
|
|
39
|
+
/** Pricing (Optional Metadata) */
|
|
40
|
+
currency: zod_1.z.string().default('USD').optional(),
|
|
41
|
+
priceMonthly: zod_1.z.number().optional(),
|
|
42
|
+
priceYearly: zod_1.z.number().optional(),
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* License Schema
|
|
46
|
+
* The actual entitlement object assigned to a Tenant.
|
|
47
|
+
* Often signed as a JWT.
|
|
48
|
+
*/
|
|
49
|
+
exports.LicenseSchema = zod_1.z.object({
|
|
50
|
+
/** Identity */
|
|
51
|
+
tenantId: zod_1.z.string(),
|
|
52
|
+
planCode: zod_1.z.string(),
|
|
53
|
+
/** Validity */
|
|
54
|
+
issuedAt: zod_1.z.string().datetime(),
|
|
55
|
+
expiresAt: zod_1.z.string().datetime().optional(), // Null = Perpetual
|
|
56
|
+
/** Status */
|
|
57
|
+
status: zod_1.z.enum(['active', 'expired', 'suspended', 'trial']),
|
|
58
|
+
/** Overrides (Specific to this tenant, exceeding the plan) */
|
|
59
|
+
customFeatures: zod_1.z.array(zod_1.z.string()).optional(),
|
|
60
|
+
customLimits: zod_1.z.record(zod_1.z.number()).optional(),
|
|
61
|
+
/** Signature */
|
|
62
|
+
signature: zod_1.z.string().optional().describe('Cryptographic signature of the license'),
|
|
63
|
+
});
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for the ObjectStack Manifest.
|
|
4
|
+
* This defines the structure of a package configuration in the ObjectStack ecosystem.
|
|
5
|
+
* All packages (apps, plugins, drivers, modules) must conform to this schema.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ManifestSchema: z.ZodObject<{
|
|
8
|
+
/**
|
|
9
|
+
* Unique package identifier using reverse domain notation.
|
|
10
|
+
* Example: "com.example.crm"
|
|
11
|
+
*/
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
/**
|
|
14
|
+
* Package version following semantic versioning (major.minor.patch).
|
|
15
|
+
* Example: "1.0.0"
|
|
16
|
+
*/
|
|
17
|
+
version: z.ZodString;
|
|
18
|
+
/**
|
|
19
|
+
* Type of the package in the ObjectStack ecosystem.
|
|
20
|
+
* - app: Standalone application
|
|
21
|
+
* - plugin: Extension to ObjectOS
|
|
22
|
+
* - driver: Low-level integration driver
|
|
23
|
+
* - module: Reusable code module
|
|
24
|
+
*/
|
|
25
|
+
type: z.ZodEnum<["app", "plugin", "driver", "module"]>;
|
|
26
|
+
/**
|
|
27
|
+
* Human-readable name of the package.
|
|
28
|
+
*/
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
/**
|
|
31
|
+
* Brief description of the package functionality.
|
|
32
|
+
*/
|
|
33
|
+
description: z.ZodOptional<z.ZodString>;
|
|
34
|
+
/**
|
|
35
|
+
* Array of permission strings that the package requires.
|
|
36
|
+
* Example: ["system.user.read", "system.data.write"]
|
|
37
|
+
*/
|
|
38
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
39
|
+
/**
|
|
40
|
+
* Glob patterns specifying ObjectQL schemas files (typically *.object.yml or *.object.ts).
|
|
41
|
+
* Example: `["./src/objects/*.object.yml"]`
|
|
42
|
+
*/
|
|
43
|
+
objects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
44
|
+
/**
|
|
45
|
+
* Defines system level DataSources.
|
|
46
|
+
*/
|
|
47
|
+
datasources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
48
|
+
/**
|
|
49
|
+
* Package Dependencies.
|
|
50
|
+
* Map of package IDs to version requirements.
|
|
51
|
+
*/
|
|
52
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
53
|
+
/**
|
|
54
|
+
* Plugin Configuration Schema.
|
|
55
|
+
* Defines the settings this plugin exposes to the user.
|
|
56
|
+
* Uses a simplified JSON Schema format.
|
|
57
|
+
*/
|
|
58
|
+
configuration: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
title: z.ZodOptional<z.ZodString>;
|
|
60
|
+
properties: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
61
|
+
type: z.ZodEnum<["string", "number", "boolean", "array", "object"]>;
|
|
62
|
+
default: z.ZodOptional<z.ZodAny>;
|
|
63
|
+
description: z.ZodOptional<z.ZodString>;
|
|
64
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
secret: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
69
|
+
default?: any;
|
|
70
|
+
description?: string | undefined;
|
|
71
|
+
required?: boolean | undefined;
|
|
72
|
+
secret?: boolean | undefined;
|
|
73
|
+
enum?: string[] | undefined;
|
|
74
|
+
}, {
|
|
75
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
76
|
+
default?: any;
|
|
77
|
+
description?: string | undefined;
|
|
78
|
+
required?: boolean | undefined;
|
|
79
|
+
secret?: boolean | undefined;
|
|
80
|
+
enum?: string[] | undefined;
|
|
81
|
+
}>>;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
properties: Record<string, {
|
|
84
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
85
|
+
default?: any;
|
|
86
|
+
description?: string | undefined;
|
|
87
|
+
required?: boolean | undefined;
|
|
88
|
+
secret?: boolean | undefined;
|
|
89
|
+
enum?: string[] | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
title?: string | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
properties: Record<string, {
|
|
94
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
95
|
+
default?: any;
|
|
96
|
+
description?: string | undefined;
|
|
97
|
+
required?: boolean | undefined;
|
|
98
|
+
secret?: boolean | undefined;
|
|
99
|
+
enum?: string[] | undefined;
|
|
100
|
+
}>;
|
|
101
|
+
title?: string | undefined;
|
|
102
|
+
}>>;
|
|
103
|
+
/**
|
|
104
|
+
* Contribution Points (VS Code Style).
|
|
105
|
+
* formalized way to extend the platform capabilities.
|
|
106
|
+
*/
|
|
107
|
+
contributes: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
/**
|
|
109
|
+
* Register new Metadata Kinds (CRDs).
|
|
110
|
+
* Enables the system to parse and validate new file types.
|
|
111
|
+
* Example: Registering a BI plugin to handle *.report.ts
|
|
112
|
+
*/
|
|
113
|
+
kinds: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
globs: z.ZodArray<z.ZodString, "many">;
|
|
116
|
+
description: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, "strip", z.ZodTypeAny, {
|
|
118
|
+
id: string;
|
|
119
|
+
globs: string[];
|
|
120
|
+
description?: string | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
id: string;
|
|
123
|
+
globs: string[];
|
|
124
|
+
description?: string | undefined;
|
|
125
|
+
}>, "many">>;
|
|
126
|
+
/**
|
|
127
|
+
* Register System Hooks.
|
|
128
|
+
* Declares that this plugin listens to specific system events.
|
|
129
|
+
*/
|
|
130
|
+
events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
131
|
+
/**
|
|
132
|
+
* Register UI Menus.
|
|
133
|
+
*/
|
|
134
|
+
menus: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
135
|
+
id: z.ZodString;
|
|
136
|
+
label: z.ZodString;
|
|
137
|
+
command: z.ZodOptional<z.ZodString>;
|
|
138
|
+
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
label: string;
|
|
140
|
+
id: string;
|
|
141
|
+
command?: string | undefined;
|
|
142
|
+
}, {
|
|
143
|
+
label: string;
|
|
144
|
+
id: string;
|
|
145
|
+
command?: string | undefined;
|
|
146
|
+
}>, "many">>>;
|
|
147
|
+
/**
|
|
148
|
+
* Register Custom Themes.
|
|
149
|
+
*/
|
|
150
|
+
themes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
151
|
+
id: z.ZodString;
|
|
152
|
+
label: z.ZodString;
|
|
153
|
+
path: z.ZodString;
|
|
154
|
+
}, "strip", z.ZodTypeAny, {
|
|
155
|
+
path: string;
|
|
156
|
+
label: string;
|
|
157
|
+
id: string;
|
|
158
|
+
}, {
|
|
159
|
+
path: string;
|
|
160
|
+
label: string;
|
|
161
|
+
id: string;
|
|
162
|
+
}>, "many">>;
|
|
163
|
+
/**
|
|
164
|
+
* Register Translations.
|
|
165
|
+
* Path to translation files (e.g. "locales/en.json").
|
|
166
|
+
*/
|
|
167
|
+
translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
168
|
+
locale: z.ZodString;
|
|
169
|
+
path: z.ZodString;
|
|
170
|
+
}, "strip", z.ZodTypeAny, {
|
|
171
|
+
path: string;
|
|
172
|
+
locale: string;
|
|
173
|
+
}, {
|
|
174
|
+
path: string;
|
|
175
|
+
locale: string;
|
|
176
|
+
}>, "many">>;
|
|
177
|
+
/**
|
|
178
|
+
* Register Server Actions.
|
|
179
|
+
* Invocable functions exposed to Flows or API.
|
|
180
|
+
*/
|
|
181
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
182
|
+
name: z.ZodString;
|
|
183
|
+
label: z.ZodOptional<z.ZodString>;
|
|
184
|
+
description: z.ZodOptional<z.ZodString>;
|
|
185
|
+
input: z.ZodOptional<z.ZodAny>;
|
|
186
|
+
output: z.ZodOptional<z.ZodAny>;
|
|
187
|
+
}, "strip", z.ZodTypeAny, {
|
|
188
|
+
name: string;
|
|
189
|
+
label?: string | undefined;
|
|
190
|
+
description?: string | undefined;
|
|
191
|
+
input?: any;
|
|
192
|
+
output?: any;
|
|
193
|
+
}, {
|
|
194
|
+
name: string;
|
|
195
|
+
label?: string | undefined;
|
|
196
|
+
description?: string | undefined;
|
|
197
|
+
input?: any;
|
|
198
|
+
output?: any;
|
|
199
|
+
}>, "many">>;
|
|
200
|
+
}, "strip", z.ZodTypeAny, {
|
|
201
|
+
actions?: {
|
|
202
|
+
name: string;
|
|
203
|
+
label?: string | undefined;
|
|
204
|
+
description?: string | undefined;
|
|
205
|
+
input?: any;
|
|
206
|
+
output?: any;
|
|
207
|
+
}[] | undefined;
|
|
208
|
+
kinds?: {
|
|
209
|
+
id: string;
|
|
210
|
+
globs: string[];
|
|
211
|
+
description?: string | undefined;
|
|
212
|
+
}[] | undefined;
|
|
213
|
+
events?: string[] | undefined;
|
|
214
|
+
menus?: Record<string, {
|
|
215
|
+
label: string;
|
|
216
|
+
id: string;
|
|
217
|
+
command?: string | undefined;
|
|
218
|
+
}[]> | undefined;
|
|
219
|
+
themes?: {
|
|
220
|
+
path: string;
|
|
221
|
+
label: string;
|
|
222
|
+
id: string;
|
|
223
|
+
}[] | undefined;
|
|
224
|
+
translations?: {
|
|
225
|
+
path: string;
|
|
226
|
+
locale: string;
|
|
227
|
+
}[] | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
actions?: {
|
|
230
|
+
name: string;
|
|
231
|
+
label?: string | undefined;
|
|
232
|
+
description?: string | undefined;
|
|
233
|
+
input?: any;
|
|
234
|
+
output?: any;
|
|
235
|
+
}[] | undefined;
|
|
236
|
+
kinds?: {
|
|
237
|
+
id: string;
|
|
238
|
+
globs: string[];
|
|
239
|
+
description?: string | undefined;
|
|
240
|
+
}[] | undefined;
|
|
241
|
+
events?: string[] | undefined;
|
|
242
|
+
menus?: Record<string, {
|
|
243
|
+
label: string;
|
|
244
|
+
id: string;
|
|
245
|
+
command?: string | undefined;
|
|
246
|
+
}[]> | undefined;
|
|
247
|
+
themes?: {
|
|
248
|
+
path: string;
|
|
249
|
+
label: string;
|
|
250
|
+
id: string;
|
|
251
|
+
}[] | undefined;
|
|
252
|
+
translations?: {
|
|
253
|
+
path: string;
|
|
254
|
+
locale: string;
|
|
255
|
+
}[] | undefined;
|
|
256
|
+
}>>;
|
|
257
|
+
/**
|
|
258
|
+
* Initial data seeding configuration.
|
|
259
|
+
* Defines default records to be inserted when the package is installed.
|
|
260
|
+
*/
|
|
261
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
262
|
+
object: z.ZodString;
|
|
263
|
+
records: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
|
|
264
|
+
mode: z.ZodDefault<z.ZodEnum<["upsert", "insert", "ignore"]>>;
|
|
265
|
+
}, "strip", z.ZodTypeAny, {
|
|
266
|
+
object: string;
|
|
267
|
+
mode: "upsert" | "insert" | "ignore";
|
|
268
|
+
records: Record<string, any>[];
|
|
269
|
+
}, {
|
|
270
|
+
object: string;
|
|
271
|
+
records: Record<string, any>[];
|
|
272
|
+
mode?: "upsert" | "insert" | "ignore" | undefined;
|
|
273
|
+
}>, "many">>;
|
|
274
|
+
/**
|
|
275
|
+
* Extension points contributed by this package.
|
|
276
|
+
* Allows packages to extend UI components, add functionality, etc.
|
|
277
|
+
*/
|
|
278
|
+
extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
279
|
+
}, "strip", z.ZodTypeAny, {
|
|
280
|
+
type: "app" | "plugin" | "driver" | "module";
|
|
281
|
+
name: string;
|
|
282
|
+
id: string;
|
|
283
|
+
version: string;
|
|
284
|
+
description?: string | undefined;
|
|
285
|
+
objects?: string[] | undefined;
|
|
286
|
+
data?: {
|
|
287
|
+
object: string;
|
|
288
|
+
mode: "upsert" | "insert" | "ignore";
|
|
289
|
+
records: Record<string, any>[];
|
|
290
|
+
}[] | undefined;
|
|
291
|
+
permissions?: string[] | undefined;
|
|
292
|
+
datasources?: string[] | undefined;
|
|
293
|
+
dependencies?: Record<string, string> | undefined;
|
|
294
|
+
configuration?: {
|
|
295
|
+
properties: Record<string, {
|
|
296
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
297
|
+
default?: any;
|
|
298
|
+
description?: string | undefined;
|
|
299
|
+
required?: boolean | undefined;
|
|
300
|
+
secret?: boolean | undefined;
|
|
301
|
+
enum?: string[] | undefined;
|
|
302
|
+
}>;
|
|
303
|
+
title?: string | undefined;
|
|
304
|
+
} | undefined;
|
|
305
|
+
contributes?: {
|
|
306
|
+
actions?: {
|
|
307
|
+
name: string;
|
|
308
|
+
label?: string | undefined;
|
|
309
|
+
description?: string | undefined;
|
|
310
|
+
input?: any;
|
|
311
|
+
output?: any;
|
|
312
|
+
}[] | undefined;
|
|
313
|
+
kinds?: {
|
|
314
|
+
id: string;
|
|
315
|
+
globs: string[];
|
|
316
|
+
description?: string | undefined;
|
|
317
|
+
}[] | undefined;
|
|
318
|
+
events?: string[] | undefined;
|
|
319
|
+
menus?: Record<string, {
|
|
320
|
+
label: string;
|
|
321
|
+
id: string;
|
|
322
|
+
command?: string | undefined;
|
|
323
|
+
}[]> | undefined;
|
|
324
|
+
themes?: {
|
|
325
|
+
path: string;
|
|
326
|
+
label: string;
|
|
327
|
+
id: string;
|
|
328
|
+
}[] | undefined;
|
|
329
|
+
translations?: {
|
|
330
|
+
path: string;
|
|
331
|
+
locale: string;
|
|
332
|
+
}[] | undefined;
|
|
333
|
+
} | undefined;
|
|
334
|
+
extensions?: Record<string, any> | undefined;
|
|
335
|
+
}, {
|
|
336
|
+
type: "app" | "plugin" | "driver" | "module";
|
|
337
|
+
name: string;
|
|
338
|
+
id: string;
|
|
339
|
+
version: string;
|
|
340
|
+
description?: string | undefined;
|
|
341
|
+
objects?: string[] | undefined;
|
|
342
|
+
data?: {
|
|
343
|
+
object: string;
|
|
344
|
+
records: Record<string, any>[];
|
|
345
|
+
mode?: "upsert" | "insert" | "ignore" | undefined;
|
|
346
|
+
}[] | undefined;
|
|
347
|
+
permissions?: string[] | undefined;
|
|
348
|
+
datasources?: string[] | undefined;
|
|
349
|
+
dependencies?: Record<string, string> | undefined;
|
|
350
|
+
configuration?: {
|
|
351
|
+
properties: Record<string, {
|
|
352
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
353
|
+
default?: any;
|
|
354
|
+
description?: string | undefined;
|
|
355
|
+
required?: boolean | undefined;
|
|
356
|
+
secret?: boolean | undefined;
|
|
357
|
+
enum?: string[] | undefined;
|
|
358
|
+
}>;
|
|
359
|
+
title?: string | undefined;
|
|
360
|
+
} | undefined;
|
|
361
|
+
contributes?: {
|
|
362
|
+
actions?: {
|
|
363
|
+
name: string;
|
|
364
|
+
label?: string | undefined;
|
|
365
|
+
description?: string | undefined;
|
|
366
|
+
input?: any;
|
|
367
|
+
output?: any;
|
|
368
|
+
}[] | undefined;
|
|
369
|
+
kinds?: {
|
|
370
|
+
id: string;
|
|
371
|
+
globs: string[];
|
|
372
|
+
description?: string | undefined;
|
|
373
|
+
}[] | undefined;
|
|
374
|
+
events?: string[] | undefined;
|
|
375
|
+
menus?: Record<string, {
|
|
376
|
+
label: string;
|
|
377
|
+
id: string;
|
|
378
|
+
command?: string | undefined;
|
|
379
|
+
}[]> | undefined;
|
|
380
|
+
themes?: {
|
|
381
|
+
path: string;
|
|
382
|
+
label: string;
|
|
383
|
+
id: string;
|
|
384
|
+
}[] | undefined;
|
|
385
|
+
translations?: {
|
|
386
|
+
path: string;
|
|
387
|
+
locale: string;
|
|
388
|
+
}[] | undefined;
|
|
389
|
+
} | undefined;
|
|
390
|
+
extensions?: Record<string, any> | undefined;
|
|
391
|
+
}>;
|
|
392
|
+
/**
|
|
393
|
+
* TypeScript type inferred from the ManifestSchema.
|
|
394
|
+
* Use this type for type-safe manifest handling in TypeScript code.
|
|
395
|
+
*/
|
|
396
|
+
export type ObjectStackManifest = z.infer<typeof ManifestSchema>;
|
|
397
|
+
//# sourceMappingURL=manifest.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.zod.d.ts","sourceRoot":"","sources":["../../src/system/manifest.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,cAAc;IACzB;;;OAGG;;IAGH;;;OAGG;;IAGH;;;;;;OAMG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaH;;;OAGG;;QAED;;;;WAIG;;;;;;;;;;;;;;QAOH;;;WAGG;;QAGH;;WAEG;;;;;;;;;;;;;;QAOH;;WAEG;;;;;;;;;;;;;;QAOH;;;WAGG;;;;;;;;;;;QAMH;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUL;;;OAGG;;;;;;;;;;;;;;IAOH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ManifestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Schema for the ObjectStack Manifest.
|
|
7
|
+
* This defines the structure of a package configuration in the ObjectStack ecosystem.
|
|
8
|
+
* All packages (apps, plugins, drivers, modules) must conform to this schema.
|
|
9
|
+
*/
|
|
10
|
+
exports.ManifestSchema = zod_1.z.object({
|
|
11
|
+
/**
|
|
12
|
+
* Unique package identifier using reverse domain notation.
|
|
13
|
+
* Example: "com.example.crm"
|
|
14
|
+
*/
|
|
15
|
+
id: zod_1.z.string().describe('Unique package identifier (reverse domain style)'),
|
|
16
|
+
/**
|
|
17
|
+
* Package version following semantic versioning (major.minor.patch).
|
|
18
|
+
* Example: "1.0.0"
|
|
19
|
+
*/
|
|
20
|
+
version: zod_1.z.string().regex(/^\d+\.\d+\.\d+$/).describe('Package version (semantic versioning)'),
|
|
21
|
+
/**
|
|
22
|
+
* Type of the package in the ObjectStack ecosystem.
|
|
23
|
+
* - app: Standalone application
|
|
24
|
+
* - plugin: Extension to ObjectOS
|
|
25
|
+
* - driver: Low-level integration driver
|
|
26
|
+
* - module: Reusable code module
|
|
27
|
+
*/
|
|
28
|
+
type: zod_1.z.enum(['app', 'plugin', 'driver', 'module']).describe('Type of package'),
|
|
29
|
+
/**
|
|
30
|
+
* Human-readable name of the package.
|
|
31
|
+
*/
|
|
32
|
+
name: zod_1.z.string().describe('Human-readable package name'),
|
|
33
|
+
/**
|
|
34
|
+
* Brief description of the package functionality.
|
|
35
|
+
*/
|
|
36
|
+
description: zod_1.z.string().optional().describe('Package description'),
|
|
37
|
+
/**
|
|
38
|
+
* Array of permission strings that the package requires.
|
|
39
|
+
* Example: ["system.user.read", "system.data.write"]
|
|
40
|
+
*/
|
|
41
|
+
permissions: zod_1.z.array(zod_1.z.string()).optional().describe('Array of required permission strings'),
|
|
42
|
+
/**
|
|
43
|
+
* Glob patterns specifying ObjectQL schemas files (typically *.object.yml or *.object.ts).
|
|
44
|
+
* Example: `["./src/objects/*.object.yml"]`
|
|
45
|
+
*/
|
|
46
|
+
objects: zod_1.z.array(zod_1.z.string()).optional().describe('Glob patterns for ObjectQL schemas files'),
|
|
47
|
+
/**
|
|
48
|
+
* Defines system level DataSources.
|
|
49
|
+
*/
|
|
50
|
+
datasources: zod_1.z.array(zod_1.z.string()).optional().describe('Glob patterns for Datasource definitions'),
|
|
51
|
+
/**
|
|
52
|
+
* Package Dependencies.
|
|
53
|
+
* Map of package IDs to version requirements.
|
|
54
|
+
*/
|
|
55
|
+
dependencies: zod_1.z.record(zod_1.z.string()).optional().describe('Package dependencies'),
|
|
56
|
+
/**
|
|
57
|
+
* Plugin Configuration Schema.
|
|
58
|
+
* Defines the settings this plugin exposes to the user.
|
|
59
|
+
* Uses a simplified JSON Schema format.
|
|
60
|
+
*/
|
|
61
|
+
configuration: zod_1.z.object({
|
|
62
|
+
title: zod_1.z.string().optional(),
|
|
63
|
+
properties: zod_1.z.record(zod_1.z.object({
|
|
64
|
+
type: zod_1.z.enum(['string', 'number', 'boolean', 'array', 'object']).describe('Data type of the setting'),
|
|
65
|
+
default: zod_1.z.any().optional().describe('Default value'),
|
|
66
|
+
description: zod_1.z.string().optional().describe('Tooltip description'),
|
|
67
|
+
required: zod_1.z.boolean().optional().describe('Is this setting required?'),
|
|
68
|
+
secret: zod_1.z.boolean().optional().describe('If true, value is encrypted/masked (e.g. API Keys)'),
|
|
69
|
+
enum: zod_1.z.array(zod_1.z.string()).optional().describe('Allowed values for select inputs'),
|
|
70
|
+
})).describe('Map of configuration keys to their definitions')
|
|
71
|
+
}).optional().describe('Plugin configuration settings'),
|
|
72
|
+
/**
|
|
73
|
+
* Contribution Points (VS Code Style).
|
|
74
|
+
* formalized way to extend the platform capabilities.
|
|
75
|
+
*/
|
|
76
|
+
contributes: zod_1.z.object({
|
|
77
|
+
/**
|
|
78
|
+
* Register new Metadata Kinds (CRDs).
|
|
79
|
+
* Enables the system to parse and validate new file types.
|
|
80
|
+
* Example: Registering a BI plugin to handle *.report.ts
|
|
81
|
+
*/
|
|
82
|
+
kinds: zod_1.z.array(zod_1.z.object({
|
|
83
|
+
id: zod_1.z.string().describe('The generic identifier of the kind (e.g., "sys.bi.report")'),
|
|
84
|
+
globs: zod_1.z.array(zod_1.z.string()).describe('File patterns to watch (e.g., ["**/*.report.ts"])'),
|
|
85
|
+
description: zod_1.z.string().optional().describe('Description of what this kind represents'),
|
|
86
|
+
})).optional().describe('New Metadata Types to recognize'),
|
|
87
|
+
/**
|
|
88
|
+
* Register System Hooks.
|
|
89
|
+
* Declares that this plugin listens to specific system events.
|
|
90
|
+
*/
|
|
91
|
+
events: zod_1.z.array(zod_1.z.string()).optional().describe('Events this plugin listens to'),
|
|
92
|
+
/**
|
|
93
|
+
* Register UI Menus.
|
|
94
|
+
*/
|
|
95
|
+
menus: zod_1.z.record(zod_1.z.array(zod_1.z.object({
|
|
96
|
+
id: zod_1.z.string(),
|
|
97
|
+
label: zod_1.z.string(),
|
|
98
|
+
command: zod_1.z.string().optional(),
|
|
99
|
+
}))).optional().describe('UI Menu contributions'),
|
|
100
|
+
/**
|
|
101
|
+
* Register Custom Themes.
|
|
102
|
+
*/
|
|
103
|
+
themes: zod_1.z.array(zod_1.z.object({
|
|
104
|
+
id: zod_1.z.string(),
|
|
105
|
+
label: zod_1.z.string(),
|
|
106
|
+
path: zod_1.z.string(),
|
|
107
|
+
})).optional().describe('Theme contributions'),
|
|
108
|
+
/**
|
|
109
|
+
* Register Translations.
|
|
110
|
+
* Path to translation files (e.g. "locales/en.json").
|
|
111
|
+
*/
|
|
112
|
+
translations: zod_1.z.array(zod_1.z.object({
|
|
113
|
+
locale: zod_1.z.string(),
|
|
114
|
+
path: zod_1.z.string(),
|
|
115
|
+
})).optional().describe('Translation resources'),
|
|
116
|
+
/**
|
|
117
|
+
* Register Server Actions.
|
|
118
|
+
* Invocable functions exposed to Flows or API.
|
|
119
|
+
*/
|
|
120
|
+
actions: zod_1.z.array(zod_1.z.object({
|
|
121
|
+
name: zod_1.z.string().describe('Unique action name'),
|
|
122
|
+
label: zod_1.z.string().optional(),
|
|
123
|
+
description: zod_1.z.string().optional(),
|
|
124
|
+
input: zod_1.z.any().optional().describe('Input validation schema'),
|
|
125
|
+
output: zod_1.z.any().optional().describe('Output schema'),
|
|
126
|
+
})).optional().describe('Exposed server actions'),
|
|
127
|
+
}).optional().describe('Platform contributions'),
|
|
128
|
+
/**
|
|
129
|
+
* Initial data seeding configuration.
|
|
130
|
+
* Defines default records to be inserted when the package is installed.
|
|
131
|
+
*/
|
|
132
|
+
data: zod_1.z.array(zod_1.z.object({
|
|
133
|
+
object: zod_1.z.string().describe('Target Object Name'),
|
|
134
|
+
records: zod_1.z.array(zod_1.z.record(zod_1.z.any())).describe('List of records to insert'),
|
|
135
|
+
mode: zod_1.z.enum(['upsert', 'insert', 'ignore']).default('upsert').describe('Seeding mode')
|
|
136
|
+
})).optional().describe('Initial seed data'),
|
|
137
|
+
/**
|
|
138
|
+
* Extension points contributed by this package.
|
|
139
|
+
* Allows packages to extend UI components, add functionality, etc.
|
|
140
|
+
*/
|
|
141
|
+
extensions: zod_1.z.record(zod_1.z.any()).optional().describe('Extension points and contributions'),
|
|
142
|
+
});
|