@objectstack/spec 0.3.2 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -10
- package/dist/ai/agent.zod.d.ts +12 -12
- package/dist/ai/conversation.zod.d.ts +54 -54
- package/dist/ai/cost.zod.d.ts +135 -135
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +1 -1
- package/dist/ai/model-registry.zod.d.ts +91 -91
- package/dist/ai/nlq.zod.d.ts +72 -72
- package/dist/ai/{workflow-automation.zod.d.ts → orchestration.zod.d.ts} +51 -50
- package/dist/ai/orchestration.zod.d.ts.map +1 -0
- package/dist/ai/{workflow-automation.zod.js → orchestration.zod.js} +26 -25
- package/dist/ai/predictive.zod.d.ts +27 -27
- package/dist/ai/rag-pipeline.zod.d.ts +102 -102
- package/dist/api/contract.zod.d.ts +213 -197
- package/dist/api/contract.zod.d.ts.map +1 -1
- package/dist/{system → api}/discovery.zod.d.ts +26 -26
- package/dist/api/discovery.zod.d.ts.map +1 -0
- package/dist/{system → api}/discovery.zod.js +9 -9
- package/dist/{system/api.zod.d.ts → api/endpoint.zod.d.ts} +53 -57
- package/dist/api/endpoint.zod.d.ts.map +1 -0
- package/dist/{system/api.zod.js → api/endpoint.zod.js} +3 -6
- package/dist/api/index.d.ts +6 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +6 -0
- package/dist/api/odata.zod.d.ts +482 -0
- package/dist/api/odata.zod.d.ts.map +1 -0
- package/dist/api/odata.zod.js +401 -0
- package/dist/{system → api}/realtime.zod.d.ts +4 -4
- package/dist/api/realtime.zod.d.ts.map +1 -0
- package/dist/api/router.zod.d.ts +182 -0
- package/dist/api/router.zod.d.ts.map +1 -0
- package/dist/api/router.zod.js +103 -0
- package/dist/{system/auth.zod.d.ts → auth/config.zod.d.ts} +199 -199
- package/dist/auth/config.zod.d.ts.map +1 -0
- package/dist/{system → auth}/identity.zod.d.ts +8 -8
- package/dist/auth/identity.zod.d.ts.map +1 -0
- package/dist/auth/index.d.ts +8 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +23 -0
- package/dist/{system → auth}/organization.zod.d.ts +7 -7
- package/dist/auth/organization.zod.d.ts.map +1 -0
- package/dist/{system → auth}/policy.zod.d.ts +3 -3
- package/dist/auth/policy.zod.d.ts.map +1 -0
- package/dist/{system/auth-protocol.d.ts → auth/protocol.d.ts} +1 -1
- package/dist/auth/protocol.d.ts.map +1 -0
- package/dist/{system → auth}/role.zod.d.ts +14 -0
- package/dist/auth/role.zod.d.ts.map +1 -0
- package/dist/{system → auth}/role.zod.js +16 -1
- package/dist/auth/scim.zod.d.ts +2732 -0
- package/dist/auth/scim.zod.d.ts.map +1 -0
- package/dist/auth/scim.zod.js +811 -0
- package/dist/automation/approval.zod.d.ts +643 -0
- package/dist/automation/approval.zod.d.ts.map +1 -0
- package/dist/automation/approval.zod.js +84 -0
- package/dist/automation/connector.zod.d.ts +1284 -0
- package/dist/automation/connector.zod.d.ts.map +1 -0
- package/dist/automation/connector.zod.js +500 -0
- package/dist/automation/etl.zod.d.ts +623 -0
- package/dist/automation/etl.zod.d.ts.map +1 -0
- package/dist/automation/etl.zod.js +359 -0
- package/dist/{data → automation}/flow.zod.d.ts +40 -22
- package/dist/automation/flow.zod.d.ts.map +1 -0
- package/dist/{data → automation}/flow.zod.js +6 -1
- package/dist/automation/index.d.ts +8 -0
- package/dist/automation/index.d.ts.map +1 -0
- package/dist/automation/index.js +23 -0
- package/dist/automation/sync.zod.d.ts +854 -0
- package/dist/automation/sync.zod.d.ts.map +1 -0
- package/dist/automation/sync.zod.js +444 -0
- package/dist/{system → automation}/webhook.zod.d.ts +26 -3
- package/dist/automation/webhook.zod.d.ts.map +1 -0
- package/dist/{system → automation}/webhook.zod.js +27 -3
- package/dist/automation/workflow.zod.d.ts +2059 -0
- package/dist/automation/workflow.zod.d.ts.map +1 -0
- package/dist/{data → automation}/workflow.zod.js +40 -2
- package/dist/data/dataset.zod.d.ts +2 -2
- package/dist/data/field.zod.d.ts +779 -219
- package/dist/data/field.zod.d.ts.map +1 -1
- package/dist/data/field.zod.js +128 -16
- package/dist/data/filter.zod.d.ts +167 -30
- package/dist/data/filter.zod.d.ts.map +1 -1
- package/dist/data/filter.zod.js +25 -13
- package/dist/data/hook.zod.d.ts +191 -0
- package/dist/data/hook.zod.d.ts.map +1 -0
- package/dist/data/hook.zod.js +144 -0
- package/dist/data/index.d.ts +4 -17
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/index.js +4 -17
- package/dist/data/mapping.zod.d.ts +117 -93
- package/dist/data/mapping.zod.d.ts.map +1 -1
- package/dist/data/mapping.zod.js +16 -3
- package/dist/data/object.zod.d.ts +485 -131
- package/dist/data/object.zod.d.ts.map +1 -1
- package/dist/data/object.zod.js +87 -42
- package/dist/data/query.zod.d.ts +98 -169
- package/dist/data/query.zod.d.ts.map +1 -1
- package/dist/data/query.zod.js +42 -130
- package/dist/data/validation.zod.d.ts +166 -26
- package/dist/data/validation.zod.d.ts.map +1 -1
- package/dist/data/validation.zod.js +38 -16
- package/dist/hub/composer.zod.d.ts +871 -0
- package/dist/hub/composer.zod.d.ts.map +1 -0
- package/dist/hub/composer.zod.js +111 -0
- package/dist/hub/index.d.ts +6 -0
- package/dist/hub/index.d.ts.map +1 -0
- package/dist/hub/index.js +22 -0
- package/dist/{system → hub}/license.zod.d.ts +13 -9
- package/dist/hub/license.zod.d.ts.map +1 -0
- package/dist/{system → hub}/license.zod.js +5 -3
- package/dist/hub/marketplace.zod.d.ts +191 -0
- package/dist/hub/marketplace.zod.d.ts.map +1 -0
- package/dist/hub/marketplace.zod.js +85 -0
- package/dist/hub/space.zod.d.ts +383 -0
- package/dist/hub/space.zod.d.ts.map +1 -0
- package/dist/hub/space.zod.js +103 -0
- package/dist/{system → hub}/tenant.zod.d.ts +73 -47
- package/dist/hub/tenant.zod.d.ts.map +1 -0
- package/dist/{system → hub}/tenant.zod.js +36 -10
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -5
- package/dist/permission/index.d.ts +14 -0
- package/dist/permission/index.d.ts.map +1 -0
- package/dist/permission/index.js +29 -0
- package/dist/{data → permission}/permission.zod.d.ts +48 -3
- package/dist/permission/permission.zod.d.ts.map +1 -0
- package/dist/{data → permission}/permission.zod.js +26 -2
- package/dist/permission/rls.zod.d.ts +605 -0
- package/dist/permission/rls.zod.d.ts.map +1 -0
- package/dist/permission/rls.zod.js +615 -0
- package/dist/permission/sharing.zod.d.ts +146 -0
- package/dist/permission/sharing.zod.d.ts.map +1 -0
- package/dist/permission/sharing.zod.js +88 -0
- package/dist/{system → permission}/territory.zod.d.ts +13 -0
- package/dist/permission/territory.zod.d.ts.map +1 -0
- package/dist/{system → permission}/territory.zod.js +15 -1
- package/dist/shared/identifiers.zod.d.ts +87 -0
- package/dist/shared/identifiers.zod.d.ts.map +1 -0
- package/dist/shared/identifiers.zod.js +101 -0
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +21 -0
- package/dist/stack.zod.d.ts +19869 -0
- package/dist/stack.zod.d.ts.map +1 -0
- package/dist/stack.zod.js +248 -0
- package/dist/system/audit.zod.d.ts +58 -58
- package/dist/system/context.zod.d.ts +56 -0
- package/dist/system/context.zod.d.ts.map +1 -0
- package/dist/system/context.zod.js +43 -0
- package/dist/system/datasource.zod.d.ts +40 -6
- package/dist/system/datasource.zod.d.ts.map +1 -1
- package/dist/system/datasource.zod.js +17 -13
- package/dist/system/driver/mongo.zod.d.ts +107 -0
- package/dist/system/driver/mongo.zod.d.ts.map +1 -0
- package/dist/system/driver/mongo.zod.js +80 -0
- package/dist/system/driver/postgres.zod.d.ts +134 -0
- package/dist/system/driver/postgres.zod.d.ts.map +1 -0
- package/dist/system/driver/postgres.zod.js +88 -0
- package/dist/system/driver.zod.d.ts +2249 -488
- package/dist/system/driver.zod.d.ts.map +1 -1
- package/dist/system/driver.zod.js +99 -0
- package/dist/system/events.zod.d.ts +8 -5
- package/dist/system/events.zod.d.ts.map +1 -1
- package/dist/system/events.zod.js +5 -1
- package/dist/system/feature.zod.d.ts +131 -0
- package/dist/system/feature.zod.d.ts.map +1 -0
- package/dist/system/feature.zod.js +45 -0
- package/dist/system/index.d.ts +11 -20
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +15 -20
- package/dist/system/job.zod.d.ts +5 -5
- package/dist/system/logger.zod.d.ts +111 -0
- package/dist/system/logger.zod.d.ts.map +1 -0
- package/dist/system/logger.zod.js +75 -0
- package/dist/system/manifest.zod.d.ts +136 -18
- package/dist/system/manifest.zod.d.ts.map +1 -1
- package/dist/system/manifest.zod.js +28 -0
- package/dist/system/plugin.zod.d.ts +598 -318
- package/dist/system/plugin.zod.d.ts.map +1 -1
- package/dist/system/plugin.zod.js +13 -0
- package/dist/system/scoped-storage.zod.d.ts +81 -0
- package/dist/system/scoped-storage.zod.d.ts.map +1 -0
- package/dist/system/scoped-storage.zod.js +66 -0
- package/dist/ui/action.zod.d.ts +42 -17
- package/dist/ui/action.zod.d.ts.map +1 -1
- package/dist/ui/action.zod.js +30 -1
- package/dist/ui/app.zod.d.ts +26 -11
- package/dist/ui/app.zod.d.ts.map +1 -1
- package/dist/ui/app.zod.js +32 -4
- package/dist/ui/block.zod.d.ts +265 -0
- package/dist/ui/block.zod.d.ts.map +1 -0
- package/dist/ui/block.zod.js +90 -0
- package/dist/ui/component.zod.d.ts +265 -0
- package/dist/ui/component.zod.d.ts.map +1 -0
- package/dist/ui/component.zod.js +90 -0
- package/dist/ui/dashboard.zod.d.ts +15 -15
- package/dist/ui/dashboard.zod.d.ts.map +1 -1
- package/dist/ui/dashboard.zod.js +18 -8
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/page.zod.d.ts +23 -5
- package/dist/ui/page.zod.d.ts.map +1 -1
- package/dist/ui/page.zod.js +37 -4
- package/dist/ui/report.zod.d.ts +12 -12
- package/dist/ui/theme.zod.d.ts +42 -42
- package/dist/ui/view.zod.d.ts +302 -290
- package/dist/ui/view.zod.d.ts.map +1 -1
- package/dist/ui/view.zod.js +32 -3
- package/dist/ui/widget.zod.d.ts +730 -29
- package/dist/ui/widget.zod.d.ts.map +1 -1
- package/dist/ui/widget.zod.js +294 -1
- package/json-schema/ai/{AIWorkflowAutomation.json → AIOrchestration.json} +5 -5
- package/json-schema/ai/{AIWorkflowExecutionResult.json → AIOrchestrationExecutionResult.json} +2 -2
- package/json-schema/ai/{AIWorkflowTrigger.json → AIOrchestrationTrigger.json} +2 -2
- package/json-schema/ai/{BatchAIWorkflowExecution.json → BatchAIOrchestrationExecution.json} +3 -3
- package/json-schema/{system → api}/ApiEndpoint.json +3 -1
- package/json-schema/{system → api}/ApiRoutes.json +7 -7
- package/json-schema/{system → api}/Discovery.json +7 -7
- package/json-schema/api/ExportRequest.json +402 -438
- package/json-schema/{system → api}/HttpMethod.json +3 -1
- package/json-schema/api/ODataError.json +65 -0
- package/json-schema/api/ODataFilterFunction.json +39 -0
- package/json-schema/api/ODataFilterOperator.json +24 -0
- package/json-schema/api/ODataMetadata.json +115 -0
- package/json-schema/api/ODataQuery.json +89 -0
- package/json-schema/api/ODataResponse.json +37 -0
- package/json-schema/api/RouteCategory.json +17 -0
- package/json-schema/api/RouteDefinition.json +77 -0
- package/json-schema/api/RouterConfig.json +117 -0
- package/json-schema/{system → auth}/Role.json +3 -2
- package/json-schema/auth/SCIMAddress.json +50 -0
- package/json-schema/auth/SCIMEmail.json +38 -0
- package/json-schema/auth/SCIMEnterpriseUser.json +55 -0
- package/json-schema/auth/SCIMError.json +52 -0
- package/json-schema/auth/SCIMGroup.json +102 -0
- package/json-schema/auth/SCIMGroupReference.json +36 -0
- package/json-schema/auth/SCIMListResponse.json +606 -0
- package/json-schema/auth/SCIMMemberReference.json +36 -0
- package/json-schema/auth/SCIMMeta.json +35 -0
- package/json-schema/auth/SCIMName.json +36 -0
- package/json-schema/auth/SCIMPatchOperation.json +31 -0
- package/json-schema/auth/SCIMPatchRequest.json +56 -0
- package/json-schema/auth/SCIMPhoneNumber.json +40 -0
- package/json-schema/auth/SCIMUser.json +462 -0
- package/json-schema/automation/ApprovalAction.json +35 -0
- package/json-schema/automation/ApprovalActionType.json +15 -0
- package/json-schema/automation/ApprovalProcess.json +326 -0
- package/json-schema/automation/ApprovalStep.json +147 -0
- package/json-schema/automation/ApproverType.json +16 -0
- package/json-schema/automation/AuthField.json +73 -0
- package/json-schema/automation/Authentication.json +159 -0
- package/json-schema/automation/AuthenticationType.json +18 -0
- package/json-schema/automation/ConflictResolution.json +16 -0
- package/json-schema/automation/Connector.json +440 -0
- package/json-schema/automation/ConnectorCategory.json +26 -0
- package/json-schema/automation/ConnectorInstance.json +69 -0
- package/json-schema/automation/ConnectorOperation.json +117 -0
- package/json-schema/automation/ConnectorTrigger.json +54 -0
- package/json-schema/automation/DataDestinationConfig.json +89 -0
- package/json-schema/automation/DataSourceConfig.json +34 -0
- package/json-schema/automation/DataSyncConfig.json +355 -0
- package/json-schema/automation/ETLDestination.json +57 -0
- package/json-schema/automation/ETLEndpointType.json +19 -0
- package/json-schema/automation/ETLPipeline.json +252 -0
- package/json-schema/automation/ETLPipelineRun.json +107 -0
- package/json-schema/automation/ETLRunStatus.json +17 -0
- package/json-schema/automation/ETLSource.json +60 -0
- package/json-schema/{data/LogicOperator.json → automation/ETLSyncMode.json} +5 -5
- package/json-schema/automation/ETLTransformation.json +46 -0
- package/json-schema/automation/ETLTransformationType.json +21 -0
- package/json-schema/automation/FieldMapping.json +36 -0
- package/json-schema/{data → automation}/Flow.json +31 -1
- package/json-schema/{data → automation}/FlowEdge.json +9 -0
- package/json-schema/automation/OAuth2Config.json +43 -0
- package/json-schema/automation/OperationParameter.json +59 -0
- package/json-schema/automation/OperationType.json +17 -0
- package/json-schema/automation/SyncDirection.json +14 -0
- package/json-schema/automation/SyncExecutionResult.json +135 -0
- package/json-schema/automation/SyncExecutionStatus.json +17 -0
- package/json-schema/{data/TriggerTiming.json → automation/SyncMode.json} +5 -4
- package/json-schema/{data/WorkflowRule.json → automation/TimeTrigger.json} +35 -25
- package/json-schema/{system → automation}/Webhook.json +3 -1
- package/json-schema/{system → automation}/WebhookReceiver.json +3 -1
- package/json-schema/automation/WorkflowRule.json +1032 -0
- package/json-schema/data/AggregationNode.json +23 -0
- package/json-schema/data/AsyncValidation.json +49 -2
- package/json-schema/data/ComparisonOperator.json +52 -0
- package/json-schema/data/ConditionalValidation.json +693 -46
- package/json-schema/data/CrossFieldValidation.json +33 -2
- package/json-schema/data/CurrencyConfig.json +35 -0
- package/json-schema/data/CurrencyValue.json +26 -0
- package/json-schema/data/CustomValidator.json +37 -10
- package/json-schema/data/Field.json +92 -4
- package/json-schema/data/FieldOperators.json +78 -0
- package/json-schema/data/FieldReference.json +19 -0
- package/json-schema/data/FieldType.json +12 -2
- package/json-schema/data/FormatValidation.json +33 -2
- package/json-schema/data/Hook.json +95 -0
- package/json-schema/data/HookContext.json +88 -0
- package/json-schema/data/HookEvent.json +29 -0
- package/json-schema/data/Index.json +10 -0
- package/json-schema/data/JSONValidation.json +85 -0
- package/json-schema/data/JoinNode.json +197 -213
- package/json-schema/data/JoinStrategy.json +15 -0
- package/json-schema/data/NormalizedFilter.json +234 -0
- package/json-schema/data/Object.json +1642 -32
- package/json-schema/data/ObjectCapabilities.json +30 -12
- package/json-schema/data/Query.json +246 -262
- package/json-schema/data/RangeOperator.json +26 -0
- package/json-schema/data/ScriptValidation.json +33 -2
- package/json-schema/data/SearchConfig.json +36 -0
- package/json-schema/data/SelectOption.json +4 -2
- package/json-schema/data/StateMachineValidation.json +33 -2
- package/json-schema/data/UniquenessValidation.json +33 -2
- package/json-schema/data/ValidationRule.json +693 -46
- package/json-schema/data/VectorConfig.json +51 -0
- package/json-schema/hub/BillOfMaterials.json +70 -0
- package/json-schema/hub/ComposerRequest.json +86 -0
- package/json-schema/hub/ComposerResponse.json +483 -0
- package/json-schema/hub/ConflictReport.json +53 -0
- package/json-schema/hub/DependencyRequirement.json +36 -0
- package/json-schema/hub/DeploymentTarget.json +38 -0
- package/json-schema/hub/HubSpace.json +279 -0
- package/json-schema/{system → hub}/License.json +11 -3
- package/json-schema/hub/MarketplacePlugin.json +141 -0
- package/json-schema/hub/PluginAuthor.json +26 -0
- package/json-schema/hub/PluginPricing.json +43 -0
- package/json-schema/hub/SpaceSubscription.json +77 -0
- package/json-schema/hub/SubscriptionStatus.json +16 -0
- package/json-schema/{system → hub}/Tenant.json +3 -5
- package/json-schema/permission/CriteriaSharingRule.json +82 -0
- package/json-schema/{data → permission}/OWDModel.json +2 -1
- package/json-schema/{data → permission}/ObjectPermission.json +15 -0
- package/json-schema/permission/OwnerSharingRule.json +102 -0
- package/json-schema/{data → permission}/PermissionSet.json +18 -1
- package/json-schema/permission/RLSConfig.json +59 -0
- package/json-schema/permission/RLSEvaluationResult.json +40 -0
- package/json-schema/{data/TriggerAction.json → permission/RLSOperation.json} +5 -3
- package/json-schema/permission/RLSUserContext.json +51 -0
- package/json-schema/permission/RowLevelSecurityPolicy.json +77 -0
- package/json-schema/permission/ShareRecipientType.json +16 -0
- package/json-schema/{data → permission}/SharingLevel.json +2 -1
- package/json-schema/permission/SharingRule.json +182 -0
- package/json-schema/{data → permission}/SharingRuleType.json +1 -3
- package/json-schema/{system → permission}/Territory.json +3 -1
- package/json-schema/shared/EventName.json +12 -0
- package/json-schema/shared/SnakeCaseIdentifier.json +12 -0
- package/json-schema/shared/SystemIdentifier.json +12 -0
- package/json-schema/system/Datasource.json +35 -0
- package/json-schema/system/DriverCapabilities.json +10 -0
- package/json-schema/system/DriverInterface.json +10 -0
- package/json-schema/system/DriverOptions.json +11 -0
- package/json-schema/system/Event.json +3 -2
- package/json-schema/system/FeatureFlag.json +87 -0
- package/json-schema/system/FeatureStrategy.json +16 -0
- package/json-schema/system/FileMetadata.json +43 -0
- package/json-schema/system/KernelContext.json +62 -0
- package/json-schema/system/LogEntry.json +63 -0
- package/json-schema/system/LogFormat.json +15 -0
- package/json-schema/system/LogLevel.json +17 -0
- package/json-schema/system/LoggerConfig.json +70 -0
- package/json-schema/system/Manifest.json +80 -0
- package/json-schema/system/MongoConfig.json +82 -0
- package/json-schema/system/PluginContext.json +8 -1
- package/json-schema/system/PostgresConfig.json +98 -0
- package/json-schema/system/RuntimeMode.json +16 -0
- package/json-schema/system/ScopedStorageConfig.json +54 -0
- package/json-schema/system/StorageAdapterType.json +17 -0
- package/json-schema/system/StorageScope.json +18 -0
- package/json-schema/ui/Action.json +25 -4
- package/json-schema/ui/ActionParam.json +12 -2
- package/json-schema/ui/App.json +18 -7
- package/json-schema/ui/ChartType.json +9 -1
- package/json-schema/ui/Dashboard.json +9 -1
- package/json-schema/ui/DashboardNavItem.json +3 -1
- package/json-schema/ui/DashboardWidget.json +9 -1
- package/json-schema/ui/FieldWidgetProps.json +92 -4
- package/json-schema/ui/FormView.json +4 -1
- package/json-schema/ui/GroupNavItem.json +3 -1
- package/json-schema/ui/ListView.json +7 -1
- package/json-schema/ui/NavigationItem.json +15 -5
- package/json-schema/ui/ObjectNavItem.json +3 -1
- package/json-schema/ui/Page.json +36 -4
- package/json-schema/ui/PageCardProps.json +32 -0
- package/json-schema/ui/PageComponent.json +33 -3
- package/json-schema/ui/PageComponentType.json +32 -0
- package/json-schema/ui/PageHeaderProps.json +39 -0
- package/json-schema/ui/PageNavItem.json +3 -1
- package/json-schema/ui/PageRegion.json +33 -3
- package/json-schema/ui/PageTabsProps.json +55 -0
- package/json-schema/ui/RecordDetailsProps.json +37 -0
- package/json-schema/ui/RecordHighlightsProps.json +24 -0
- package/json-schema/ui/RecordRelatedListProps.json +39 -0
- package/json-schema/ui/UrlNavItem.json +3 -1
- package/json-schema/ui/View.json +22 -4
- package/json-schema/ui/WidgetEvent.json +42 -0
- package/json-schema/ui/WidgetLifecycle.json +40 -0
- package/json-schema/ui/WidgetManifest.json +262 -0
- package/json-schema/ui/WidgetProperty.json +58 -0
- package/llms.txt +182 -0
- package/package.json +38 -16
- package/prompts/README.md +18 -0
- package/prompts/architecture.md +81 -0
- package/prompts/create-new-project.md +85 -0
- package/prompts/implement-objectai.md +39 -0
- package/prompts/implement-objectos.md +48 -0
- package/prompts/implement-objectql.md +39 -0
- package/prompts/implement-objectui.md +46 -0
- package/prompts/instructions.md +91 -0
- package/dist/ai/workflow-automation.zod.d.ts.map +0 -1
- package/dist/data/flow.zod.d.ts.map +0 -1
- package/dist/data/permission.zod.d.ts.map +0 -1
- package/dist/data/sharing.zod.d.ts +0 -63
- package/dist/data/sharing.zod.d.ts.map +0 -1
- package/dist/data/sharing.zod.js +0 -57
- package/dist/data/trigger.zod.d.ts +0 -354
- package/dist/data/trigger.zod.d.ts.map +0 -1
- package/dist/data/trigger.zod.js +0 -195
- package/dist/data/workflow.zod.d.ts +0 -986
- package/dist/data/workflow.zod.d.ts.map +0 -1
- package/dist/system/api.zod.d.ts.map +0 -1
- package/dist/system/auth-protocol.d.ts.map +0 -1
- package/dist/system/auth.zod.d.ts.map +0 -1
- package/dist/system/discovery.zod.d.ts.map +0 -1
- package/dist/system/identity.zod.d.ts.map +0 -1
- package/dist/system/license.zod.d.ts.map +0 -1
- package/dist/system/organization.zod.d.ts.map +0 -1
- package/dist/system/policy.zod.d.ts.map +0 -1
- package/dist/system/realtime.zod.d.ts.map +0 -1
- package/dist/system/role.zod.d.ts.map +0 -1
- package/dist/system/tenant.zod.d.ts.map +0 -1
- package/dist/system/territory.zod.d.ts.map +0 -1
- package/dist/system/webhook.zod.d.ts.map +0 -1
- package/json-schema/README.md +0 -127
- package/json-schema/data/FieldMapping.json +0 -83
- package/json-schema/data/FilterNode.json +0 -52
- package/json-schema/data/FilterOperator.json +0 -26
- package/json-schema/data/Mapping.json +0 -598
- package/json-schema/data/SharingRule.json +0 -58
- package/json-schema/data/TransformType.json +0 -18
- package/json-schema/data/Trigger.json +0 -73
- package/json-schema/data/TriggerContext.json +0 -61
- /package/dist/{system → api}/realtime.zod.js +0 -0
- /package/dist/{system/auth.zod.js → auth/config.zod.js} +0 -0
- /package/dist/{system → auth}/identity.zod.js +0 -0
- /package/dist/{system → auth}/organization.zod.js +0 -0
- /package/dist/{system → auth}/policy.zod.js +0 -0
- /package/dist/{system/auth-protocol.js → auth/protocol.js} +0 -0
- /package/json-schema/{system → api}/ApiCapabilities.json +0 -0
- /package/json-schema/{system → api}/ApiMapping.json +0 -0
- /package/json-schema/{system → api}/Presence.json +0 -0
- /package/json-schema/{system → api}/PresenceStatus.json +0 -0
- /package/json-schema/{system → api}/RateLimit.json +0 -0
- /package/json-schema/{system → api}/RealtimeAction.json +0 -0
- /package/json-schema/{system → api}/RealtimeEvent.json +0 -0
- /package/json-schema/{system → api}/RealtimeEventType.json +0 -0
- /package/json-schema/{system → api}/Subscription.json +0 -0
- /package/json-schema/{system → api}/SubscriptionEvent.json +0 -0
- /package/json-schema/{system → api}/TransportProtocol.json +0 -0
- /package/json-schema/{system → auth}/Account.json +0 -0
- /package/json-schema/{system → auth}/AccountLinkingConfig.json +0 -0
- /package/json-schema/{system → auth}/AuditPolicy.json +0 -0
- /package/json-schema/{system → auth}/AuthConfig.json +0 -0
- /package/json-schema/{system → auth}/AuthPluginConfig.json +0 -0
- /package/json-schema/{system → auth}/AuthStrategy.json +0 -0
- /package/json-schema/{system → auth}/CSRFConfig.json +0 -0
- /package/json-schema/{system → auth}/DatabaseAdapter.json +0 -0
- /package/json-schema/{system → auth}/DatabaseMapping.json +0 -0
- /package/json-schema/{system → auth}/EmailPasswordConfig.json +0 -0
- /package/json-schema/{system → auth}/EnterpriseAuthConfig.json +0 -0
- /package/json-schema/{system → auth}/Invitation.json +0 -0
- /package/json-schema/{system → auth}/InvitationStatus.json +0 -0
- /package/json-schema/{system → auth}/LDAPConfig.json +0 -0
- /package/json-schema/{system → auth}/MagicLinkConfig.json +0 -0
- /package/json-schema/{system → auth}/Member.json +0 -0
- /package/json-schema/{system → auth}/NetworkPolicy.json +0 -0
- /package/json-schema/{system → auth}/OAuthProvider.json +0 -0
- /package/json-schema/{system → auth}/OIDCConfig.json +0 -0
- /package/json-schema/{system → auth}/Organization.json +0 -0
- /package/json-schema/{system → auth}/PasskeyConfig.json +0 -0
- /package/json-schema/{system → auth}/PasswordPolicy.json +0 -0
- /package/json-schema/{system → auth}/Policy.json +0 -0
- /package/json-schema/{system → auth}/RateLimitConfig.json +0 -0
- /package/json-schema/{system → auth}/SAMLConfig.json +0 -0
- /package/json-schema/{system → auth}/Session.json +0 -0
- /package/json-schema/{system → auth}/SessionConfig.json +0 -0
- /package/json-schema/{system → auth}/SessionPolicy.json +0 -0
- /package/json-schema/{system → auth}/StandardAuthProvider.json +0 -0
- /package/json-schema/{system → auth}/TwoFactorConfig.json +0 -0
- /package/json-schema/{system → auth}/User.json +0 -0
- /package/json-schema/{system → auth}/UserFieldMapping.json +0 -0
- /package/json-schema/{system → auth}/VerificationToken.json +0 -0
- /package/json-schema/{data → automation}/CustomScriptAction.json +0 -0
- /package/json-schema/{data → automation}/EmailAlertAction.json +0 -0
- /package/json-schema/{data → automation}/FieldUpdateAction.json +0 -0
- /package/json-schema/{data → automation}/FlowNode.json +0 -0
- /package/json-schema/{data → automation}/FlowNodeAction.json +0 -0
- /package/json-schema/{data → automation}/FlowVariable.json +0 -0
- /package/json-schema/{data → automation}/HttpCallAction.json +0 -0
- /package/json-schema/{data → automation}/PushNotificationAction.json +0 -0
- /package/json-schema/{data → automation}/SlackMessageAction.json +0 -0
- /package/json-schema/{data → automation}/SmsNotificationAction.json +0 -0
- /package/json-schema/{data → automation}/TaskCreationAction.json +0 -0
- /package/json-schema/{data → automation}/TeamsMessageAction.json +0 -0
- /package/json-schema/{data → automation}/WebhookTriggerAction.json +0 -0
- /package/json-schema/{system → automation}/WebhookTriggerType.json +0 -0
- /package/json-schema/{data → automation}/WorkflowAction.json +0 -0
- /package/json-schema/{data → automation}/WorkflowTriggerType.json +0 -0
- /package/json-schema/{system → hub}/DatabaseLevelIsolationStrategy.json +0 -0
- /package/json-schema/{system → hub}/Feature.json +0 -0
- /package/json-schema/{system → hub}/LevelIsolationStrategySchema.json +0 -0
- /package/json-schema/{system → hub}/MetricType.json +0 -0
- /package/json-schema/{system → hub}/Plan.json +0 -0
- /package/json-schema/{system → hub}/RowLevelIsolationStrategy.json +0 -0
- /package/json-schema/{system → hub}/TenantIsolationConfig.json +0 -0
- /package/json-schema/{system → hub}/TenantIsolationLevel.json +0 -0
- /package/json-schema/{system → hub}/TenantQuota.json +0 -0
- /package/json-schema/{system → hub}/TenantSecurityPolicy.json +0 -0
- /package/json-schema/{data → permission}/FieldPermission.json +0 -0
- /package/json-schema/{system → permission}/TerritoryModel.json +0 -0
- /package/json-schema/{system → permission}/TerritoryType.json +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Organization-Wide Defaults (OWD)
|
|
4
|
+
* The baseline security posture for an object.
|
|
5
|
+
*/
|
|
6
|
+
export declare const OWDModel: z.ZodEnum<["private", "public_read", "public_read_write", "controlled_by_parent"]>;
|
|
7
|
+
/**
|
|
8
|
+
* Sharing Rule Type
|
|
9
|
+
* How is the data shared?
|
|
10
|
+
*/
|
|
11
|
+
export declare const SharingRuleType: z.ZodEnum<["owner", "criteria"]>;
|
|
12
|
+
/**
|
|
13
|
+
* Sharing Level
|
|
14
|
+
* What access is granted?
|
|
15
|
+
*/
|
|
16
|
+
export declare const SharingLevel: z.ZodEnum<["read", "edit", "full"]>;
|
|
17
|
+
/**
|
|
18
|
+
* Recipient Type
|
|
19
|
+
* Who receives the access?
|
|
20
|
+
*/
|
|
21
|
+
export declare const ShareRecipientType: z.ZodEnum<["user", "group", "role", "role_and_subordinates", "guest"]>;
|
|
22
|
+
/**
|
|
23
|
+
* 1. Criteria-Based Sharing Rule
|
|
24
|
+
* Share records that meet specific field criteria.
|
|
25
|
+
*/
|
|
26
|
+
export declare const CriteriaSharingRuleSchema: z.ZodObject<{
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
label: z.ZodOptional<z.ZodString>;
|
|
29
|
+
description: z.ZodOptional<z.ZodString>;
|
|
30
|
+
object: z.ZodString;
|
|
31
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
|
32
|
+
accessLevel: z.ZodDefault<z.ZodEnum<["read", "edit", "full"]>>;
|
|
33
|
+
sharedWith: z.ZodObject<{
|
|
34
|
+
type: z.ZodEnum<["user", "group", "role", "role_and_subordinates", "guest"]>;
|
|
35
|
+
value: z.ZodString;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
value: string;
|
|
38
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
39
|
+
}, {
|
|
40
|
+
value: string;
|
|
41
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
42
|
+
}>;
|
|
43
|
+
} & {
|
|
44
|
+
type: z.ZodLiteral<"criteria">;
|
|
45
|
+
condition: z.ZodString;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
object: string;
|
|
48
|
+
type: "criteria";
|
|
49
|
+
name: string;
|
|
50
|
+
active: boolean;
|
|
51
|
+
condition: string;
|
|
52
|
+
accessLevel: "full" | "read" | "edit";
|
|
53
|
+
sharedWith: {
|
|
54
|
+
value: string;
|
|
55
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
56
|
+
};
|
|
57
|
+
label?: string | undefined;
|
|
58
|
+
description?: string | undefined;
|
|
59
|
+
}, {
|
|
60
|
+
object: string;
|
|
61
|
+
type: "criteria";
|
|
62
|
+
name: string;
|
|
63
|
+
condition: string;
|
|
64
|
+
sharedWith: {
|
|
65
|
+
value: string;
|
|
66
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
67
|
+
};
|
|
68
|
+
label?: string | undefined;
|
|
69
|
+
description?: string | undefined;
|
|
70
|
+
active?: boolean | undefined;
|
|
71
|
+
accessLevel?: "full" | "read" | "edit" | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
/**
|
|
74
|
+
* 2. Owner-Based Sharing Rule
|
|
75
|
+
* Share records owned by a specific group of users.
|
|
76
|
+
*/
|
|
77
|
+
export declare const OwnerSharingRuleSchema: z.ZodObject<{
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
label: z.ZodOptional<z.ZodString>;
|
|
80
|
+
description: z.ZodOptional<z.ZodString>;
|
|
81
|
+
object: z.ZodString;
|
|
82
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
|
83
|
+
accessLevel: z.ZodDefault<z.ZodEnum<["read", "edit", "full"]>>;
|
|
84
|
+
sharedWith: z.ZodObject<{
|
|
85
|
+
type: z.ZodEnum<["user", "group", "role", "role_and_subordinates", "guest"]>;
|
|
86
|
+
value: z.ZodString;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
value: string;
|
|
89
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
90
|
+
}, {
|
|
91
|
+
value: string;
|
|
92
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
93
|
+
}>;
|
|
94
|
+
} & {
|
|
95
|
+
type: z.ZodLiteral<"owner">;
|
|
96
|
+
ownedBy: z.ZodObject<{
|
|
97
|
+
type: z.ZodEnum<["user", "group", "role", "role_and_subordinates", "guest"]>;
|
|
98
|
+
value: z.ZodString;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
value: string;
|
|
101
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
102
|
+
}, {
|
|
103
|
+
value: string;
|
|
104
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
105
|
+
}>;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
object: string;
|
|
108
|
+
type: "owner";
|
|
109
|
+
name: string;
|
|
110
|
+
active: boolean;
|
|
111
|
+
accessLevel: "full" | "read" | "edit";
|
|
112
|
+
sharedWith: {
|
|
113
|
+
value: string;
|
|
114
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
115
|
+
};
|
|
116
|
+
ownedBy: {
|
|
117
|
+
value: string;
|
|
118
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
119
|
+
};
|
|
120
|
+
label?: string | undefined;
|
|
121
|
+
description?: string | undefined;
|
|
122
|
+
}, {
|
|
123
|
+
object: string;
|
|
124
|
+
type: "owner";
|
|
125
|
+
name: string;
|
|
126
|
+
sharedWith: {
|
|
127
|
+
value: string;
|
|
128
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
129
|
+
};
|
|
130
|
+
ownedBy: {
|
|
131
|
+
value: string;
|
|
132
|
+
type: "user" | "group" | "role" | "role_and_subordinates" | "guest";
|
|
133
|
+
};
|
|
134
|
+
label?: string | undefined;
|
|
135
|
+
description?: string | undefined;
|
|
136
|
+
active?: boolean | undefined;
|
|
137
|
+
accessLevel?: "full" | "read" | "edit" | undefined;
|
|
138
|
+
}>;
|
|
139
|
+
/**
|
|
140
|
+
* Master Sharing Rule Schema
|
|
141
|
+
*/
|
|
142
|
+
export declare const SharingRuleSchema: z.ZodType<any>;
|
|
143
|
+
export type SharingRule = z.infer<typeof SharingRuleSchema>;
|
|
144
|
+
export type CriteriaSharingRule = z.infer<typeof CriteriaSharingRuleSchema>;
|
|
145
|
+
export type OwnerSharingRule = z.infer<typeof OwnerSharingRuleSchema>;
|
|
146
|
+
//# sourceMappingURL=sharing.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharing.zod.d.ts","sourceRoot":"","sources":["../../src/permission/sharing.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,QAAQ,oFAKnB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,eAAe,kCAG1B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,YAAY,qCAIvB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB,wEAM7B,CAAC;AA0BH;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGpC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAG3C,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SharingRuleSchema = exports.OwnerSharingRuleSchema = exports.CriteriaSharingRuleSchema = exports.ShareRecipientType = exports.SharingLevel = exports.SharingRuleType = exports.OWDModel = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Organization-Wide Defaults (OWD)
|
|
7
|
+
* The baseline security posture for an object.
|
|
8
|
+
*/
|
|
9
|
+
exports.OWDModel = zod_1.z.enum([
|
|
10
|
+
'private', // Only owner can see
|
|
11
|
+
'public_read', // Everyone can see, owner can edit
|
|
12
|
+
'public_read_write', // Everyone can see and edit
|
|
13
|
+
'controlled_by_parent' // Access derived from parent record (Master-Detail)
|
|
14
|
+
]);
|
|
15
|
+
/**
|
|
16
|
+
* Sharing Rule Type
|
|
17
|
+
* How is the data shared?
|
|
18
|
+
*/
|
|
19
|
+
exports.SharingRuleType = zod_1.z.enum([
|
|
20
|
+
'owner', // Based on record ownership (Role Hierarchy)
|
|
21
|
+
'criteria', // Based on field values (e.g. Status = 'Open')
|
|
22
|
+
]);
|
|
23
|
+
/**
|
|
24
|
+
* Sharing Level
|
|
25
|
+
* What access is granted?
|
|
26
|
+
*/
|
|
27
|
+
exports.SharingLevel = zod_1.z.enum([
|
|
28
|
+
'read', // Read Only
|
|
29
|
+
'edit', // Read / Write
|
|
30
|
+
'full' // Full Access (Transfer, Share, Delete)
|
|
31
|
+
]);
|
|
32
|
+
/**
|
|
33
|
+
* Recipient Type
|
|
34
|
+
* Who receives the access?
|
|
35
|
+
*/
|
|
36
|
+
exports.ShareRecipientType = zod_1.z.enum([
|
|
37
|
+
'user',
|
|
38
|
+
'group',
|
|
39
|
+
'role',
|
|
40
|
+
'role_and_subordinates',
|
|
41
|
+
'guest' // for public sharing
|
|
42
|
+
]);
|
|
43
|
+
/**
|
|
44
|
+
* Base Sharing Rule
|
|
45
|
+
* Common metadata for all sharing strategies.
|
|
46
|
+
*/
|
|
47
|
+
const BaseSharingRuleSchema = zod_1.z.object({
|
|
48
|
+
// Identification
|
|
49
|
+
name: zod_1.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe('Unique rule name (snake_case)'),
|
|
50
|
+
label: zod_1.z.string().optional().describe('Human-readable label'),
|
|
51
|
+
description: zod_1.z.string().optional().describe('Administrative notes'),
|
|
52
|
+
// Scope
|
|
53
|
+
object: zod_1.z.string().describe('Target Object Name'),
|
|
54
|
+
active: zod_1.z.boolean().default(true),
|
|
55
|
+
// Access
|
|
56
|
+
accessLevel: exports.SharingLevel.default('read'),
|
|
57
|
+
// Recipient (Whom to share with)
|
|
58
|
+
sharedWith: zod_1.z.object({
|
|
59
|
+
type: exports.ShareRecipientType,
|
|
60
|
+
value: zod_1.z.string().describe('ID or Code of the User/Group/Role'),
|
|
61
|
+
}).describe('The recipient of the shared access'),
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* 1. Criteria-Based Sharing Rule
|
|
65
|
+
* Share records that meet specific field criteria.
|
|
66
|
+
*/
|
|
67
|
+
exports.CriteriaSharingRuleSchema = BaseSharingRuleSchema.extend({
|
|
68
|
+
type: zod_1.z.literal('criteria'),
|
|
69
|
+
condition: zod_1.z.string().describe('Formula condition (e.g. "department = \'Sales\'")'),
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* 2. Owner-Based Sharing Rule
|
|
73
|
+
* Share records owned by a specific group of users.
|
|
74
|
+
*/
|
|
75
|
+
exports.OwnerSharingRuleSchema = BaseSharingRuleSchema.extend({
|
|
76
|
+
type: zod_1.z.literal('owner'),
|
|
77
|
+
ownedBy: zod_1.z.object({
|
|
78
|
+
type: exports.ShareRecipientType,
|
|
79
|
+
value: zod_1.z.string(),
|
|
80
|
+
}).describe('Source group/role whose records are being shared'),
|
|
81
|
+
});
|
|
82
|
+
/**
|
|
83
|
+
* Master Sharing Rule Schema
|
|
84
|
+
*/
|
|
85
|
+
exports.SharingRuleSchema = zod_1.z.discriminatedUnion('type', [
|
|
86
|
+
exports.CriteriaSharingRuleSchema,
|
|
87
|
+
exports.OwnerSharingRuleSchema
|
|
88
|
+
]);
|
|
@@ -39,6 +39,19 @@ export declare const TerritoryModelSchema: z.ZodObject<{
|
|
|
39
39
|
/**
|
|
40
40
|
* Territory Node Schema
|
|
41
41
|
* A single node in the territory tree.
|
|
42
|
+
*
|
|
43
|
+
* **NAMING CONVENTION:**
|
|
44
|
+
* Territory names are machine identifiers and must be lowercase snake_case.
|
|
45
|
+
*
|
|
46
|
+
* @example Good territory names
|
|
47
|
+
* - 'west_coast'
|
|
48
|
+
* - 'emea_region'
|
|
49
|
+
* - 'healthcare_vertical'
|
|
50
|
+
* - 'strategic_accounts'
|
|
51
|
+
*
|
|
52
|
+
* @example Bad territory names (will be rejected)
|
|
53
|
+
* - 'WestCoast' (PascalCase)
|
|
54
|
+
* - 'West Coast' (spaces)
|
|
42
55
|
*/
|
|
43
56
|
export declare const TerritorySchema: z.ZodObject<{
|
|
44
57
|
/** Identity */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"territory.zod.d.ts","sourceRoot":"","sources":["../../src/permission/territory.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,aAAa,uEAKxB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EAK/B,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe;IAC1B,eAAe;;;IAIf,gBAAgB;;;;IAKhB;;;;OAIG;;IAGH;;;OAGG;;IAGH,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;EAInB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TerritorySchema = exports.TerritoryModelSchema = exports.TerritoryType = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const identifiers_zod_1 = require("../shared/identifiers.zod");
|
|
5
6
|
/**
|
|
6
7
|
* Territory Management Protocol
|
|
7
8
|
* Defines a matrix reporting structure that exists parallel to the Role Hierarchy.
|
|
@@ -37,10 +38,23 @@ exports.TerritoryModelSchema = zod_1.z.object({
|
|
|
37
38
|
/**
|
|
38
39
|
* Territory Node Schema
|
|
39
40
|
* A single node in the territory tree.
|
|
41
|
+
*
|
|
42
|
+
* **NAMING CONVENTION:**
|
|
43
|
+
* Territory names are machine identifiers and must be lowercase snake_case.
|
|
44
|
+
*
|
|
45
|
+
* @example Good territory names
|
|
46
|
+
* - 'west_coast'
|
|
47
|
+
* - 'emea_region'
|
|
48
|
+
* - 'healthcare_vertical'
|
|
49
|
+
* - 'strategic_accounts'
|
|
50
|
+
*
|
|
51
|
+
* @example Bad territory names (will be rejected)
|
|
52
|
+
* - 'WestCoast' (PascalCase)
|
|
53
|
+
* - 'West Coast' (spaces)
|
|
40
54
|
*/
|
|
41
55
|
exports.TerritorySchema = zod_1.z.object({
|
|
42
56
|
/** Identity */
|
|
43
|
-
name:
|
|
57
|
+
name: identifiers_zod_1.SnakeCaseIdentifierSchema.describe('Territory unique name (lowercase snake_case)'),
|
|
44
58
|
label: zod_1.z.string().describe('Territory Label (e.g. "West Coast")'),
|
|
45
59
|
/** Structure */
|
|
46
60
|
modelId: zod_1.z.string().describe('Belongs to which Territory Model'),
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* System Identifier Schema
|
|
4
|
+
*
|
|
5
|
+
* Universal naming convention for all machine identifiers (API Names) in ObjectStack.
|
|
6
|
+
* Enforces lowercase with underscores or dots to ensure:
|
|
7
|
+
* - Cross-platform compatibility (case-insensitive filesystems)
|
|
8
|
+
* - URL-friendliness (no encoding needed)
|
|
9
|
+
* - Database consistency (no collation issues)
|
|
10
|
+
* - Security (no case-sensitivity bugs in permission checks)
|
|
11
|
+
*
|
|
12
|
+
* **Applies to all metadata that acts as a machine identifier:**
|
|
13
|
+
* - Object names (tables/collections)
|
|
14
|
+
* - Field names
|
|
15
|
+
* - Role names
|
|
16
|
+
* - Permission set names
|
|
17
|
+
* - Action/trigger names
|
|
18
|
+
* - Event keys
|
|
19
|
+
* - App IDs
|
|
20
|
+
* - Menu/page IDs
|
|
21
|
+
* - Select option values
|
|
22
|
+
* - Workflow names
|
|
23
|
+
* - Webhook names
|
|
24
|
+
*
|
|
25
|
+
* **Naming Convention Summary:**
|
|
26
|
+
* | Type | Pattern | Example |
|
|
27
|
+
* |------|---------|---------|
|
|
28
|
+
* | Machine ID | snake_case | `crm_account`, `btn_submit`, `role_admin` |
|
|
29
|
+
* | Event keys | dot.notation | `user.login`, `order.created` |
|
|
30
|
+
* | Labels | Any case | `Client Account`, `Submit Form` |
|
|
31
|
+
*
|
|
32
|
+
* @example Valid identifiers
|
|
33
|
+
* - 'account'
|
|
34
|
+
* - 'crm_account'
|
|
35
|
+
* - 'user_profile'
|
|
36
|
+
* - 'order.created' (for events)
|
|
37
|
+
* - 'api_v2_endpoint'
|
|
38
|
+
*
|
|
39
|
+
* @example Invalid identifiers (will be rejected)
|
|
40
|
+
* - 'Account' (uppercase)
|
|
41
|
+
* - 'CrmAccount' (camelCase)
|
|
42
|
+
* - 'crm-account' (kebab-case - use underscore instead)
|
|
43
|
+
* - 'user profile' (spaces)
|
|
44
|
+
*/
|
|
45
|
+
export declare const SystemIdentifierSchema: z.ZodString;
|
|
46
|
+
/**
|
|
47
|
+
* Strict Snake Case Identifier
|
|
48
|
+
*
|
|
49
|
+
* More restrictive than SystemIdentifierSchema - only allows underscores (no dots).
|
|
50
|
+
* Use this for identifiers that should NOT contain dots (e.g., database table/column names).
|
|
51
|
+
*
|
|
52
|
+
* @example Valid
|
|
53
|
+
* - 'account'
|
|
54
|
+
* - 'crm_account'
|
|
55
|
+
* - 'user_profile'
|
|
56
|
+
*
|
|
57
|
+
* @example Invalid
|
|
58
|
+
* - 'user.profile' (dots not allowed)
|
|
59
|
+
* - 'UserProfile' (uppercase)
|
|
60
|
+
*/
|
|
61
|
+
export declare const SnakeCaseIdentifierSchema: z.ZodString;
|
|
62
|
+
/**
|
|
63
|
+
* Event Name Identifier
|
|
64
|
+
*
|
|
65
|
+
* Specialized identifier for event names that encourages dot notation.
|
|
66
|
+
* Used in event-driven systems, message queues, and webhooks.
|
|
67
|
+
*
|
|
68
|
+
* Pattern: `namespace.action` or `entity.event_type`
|
|
69
|
+
*
|
|
70
|
+
* @example Valid
|
|
71
|
+
* - 'user.created'
|
|
72
|
+
* - 'order.paid'
|
|
73
|
+
* - 'user.login_success'
|
|
74
|
+
* - 'alarm.high_cpu'
|
|
75
|
+
*
|
|
76
|
+
* @example Invalid
|
|
77
|
+
* - 'UserCreated' (camelCase)
|
|
78
|
+
* - 'user_created' (should use dots for namespacing)
|
|
79
|
+
*/
|
|
80
|
+
export declare const EventNameSchema: z.ZodString;
|
|
81
|
+
/**
|
|
82
|
+
* Type Exports
|
|
83
|
+
*/
|
|
84
|
+
export type SystemIdentifier = z.infer<typeof SystemIdentifierSchema>;
|
|
85
|
+
export type SnakeCaseIdentifier = z.infer<typeof SnakeCaseIdentifierSchema>;
|
|
86
|
+
export type EventName = z.infer<typeof EventNameSchema>;
|
|
87
|
+
//# sourceMappingURL=identifiers.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identifiers.zod.d.ts","sourceRoot":"","sources":["../../src/shared/identifiers.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,sBAAsB,aAOkC,CAAC;AAEtE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,yBAAyB,aAOgC,CAAC;AAEvE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,aAO2C,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventNameSchema = exports.SnakeCaseIdentifierSchema = exports.SystemIdentifierSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* System Identifier Schema
|
|
7
|
+
*
|
|
8
|
+
* Universal naming convention for all machine identifiers (API Names) in ObjectStack.
|
|
9
|
+
* Enforces lowercase with underscores or dots to ensure:
|
|
10
|
+
* - Cross-platform compatibility (case-insensitive filesystems)
|
|
11
|
+
* - URL-friendliness (no encoding needed)
|
|
12
|
+
* - Database consistency (no collation issues)
|
|
13
|
+
* - Security (no case-sensitivity bugs in permission checks)
|
|
14
|
+
*
|
|
15
|
+
* **Applies to all metadata that acts as a machine identifier:**
|
|
16
|
+
* - Object names (tables/collections)
|
|
17
|
+
* - Field names
|
|
18
|
+
* - Role names
|
|
19
|
+
* - Permission set names
|
|
20
|
+
* - Action/trigger names
|
|
21
|
+
* - Event keys
|
|
22
|
+
* - App IDs
|
|
23
|
+
* - Menu/page IDs
|
|
24
|
+
* - Select option values
|
|
25
|
+
* - Workflow names
|
|
26
|
+
* - Webhook names
|
|
27
|
+
*
|
|
28
|
+
* **Naming Convention Summary:**
|
|
29
|
+
* | Type | Pattern | Example |
|
|
30
|
+
* |------|---------|---------|
|
|
31
|
+
* | Machine ID | snake_case | `crm_account`, `btn_submit`, `role_admin` |
|
|
32
|
+
* | Event keys | dot.notation | `user.login`, `order.created` |
|
|
33
|
+
* | Labels | Any case | `Client Account`, `Submit Form` |
|
|
34
|
+
*
|
|
35
|
+
* @example Valid identifiers
|
|
36
|
+
* - 'account'
|
|
37
|
+
* - 'crm_account'
|
|
38
|
+
* - 'user_profile'
|
|
39
|
+
* - 'order.created' (for events)
|
|
40
|
+
* - 'api_v2_endpoint'
|
|
41
|
+
*
|
|
42
|
+
* @example Invalid identifiers (will be rejected)
|
|
43
|
+
* - 'Account' (uppercase)
|
|
44
|
+
* - 'CrmAccount' (camelCase)
|
|
45
|
+
* - 'crm-account' (kebab-case - use underscore instead)
|
|
46
|
+
* - 'user profile' (spaces)
|
|
47
|
+
*/
|
|
48
|
+
exports.SystemIdentifierSchema = zod_1.z
|
|
49
|
+
.string()
|
|
50
|
+
.min(2, { message: 'System identifier must be at least 2 characters' })
|
|
51
|
+
.regex(/^[a-z][a-z0-9_.]*$/, {
|
|
52
|
+
message: 'System identifier must be lowercase, starting with a letter, and may contain letters, numbers, underscores, or dots (e.g., "user_profile" or "order.created")',
|
|
53
|
+
})
|
|
54
|
+
.describe('System identifier (lowercase with underscores or dots)');
|
|
55
|
+
/**
|
|
56
|
+
* Strict Snake Case Identifier
|
|
57
|
+
*
|
|
58
|
+
* More restrictive than SystemIdentifierSchema - only allows underscores (no dots).
|
|
59
|
+
* Use this for identifiers that should NOT contain dots (e.g., database table/column names).
|
|
60
|
+
*
|
|
61
|
+
* @example Valid
|
|
62
|
+
* - 'account'
|
|
63
|
+
* - 'crm_account'
|
|
64
|
+
* - 'user_profile'
|
|
65
|
+
*
|
|
66
|
+
* @example Invalid
|
|
67
|
+
* - 'user.profile' (dots not allowed)
|
|
68
|
+
* - 'UserProfile' (uppercase)
|
|
69
|
+
*/
|
|
70
|
+
exports.SnakeCaseIdentifierSchema = zod_1.z
|
|
71
|
+
.string()
|
|
72
|
+
.min(2, { message: 'Identifier must be at least 2 characters' })
|
|
73
|
+
.regex(/^[a-z][a-z0-9_]*$/, {
|
|
74
|
+
message: 'Identifier must be lowercase snake_case, starting with a letter, and may contain only letters, numbers, and underscores (e.g., "user_profile")',
|
|
75
|
+
})
|
|
76
|
+
.describe('Snake case identifier (lowercase with underscores only)');
|
|
77
|
+
/**
|
|
78
|
+
* Event Name Identifier
|
|
79
|
+
*
|
|
80
|
+
* Specialized identifier for event names that encourages dot notation.
|
|
81
|
+
* Used in event-driven systems, message queues, and webhooks.
|
|
82
|
+
*
|
|
83
|
+
* Pattern: `namespace.action` or `entity.event_type`
|
|
84
|
+
*
|
|
85
|
+
* @example Valid
|
|
86
|
+
* - 'user.created'
|
|
87
|
+
* - 'order.paid'
|
|
88
|
+
* - 'user.login_success'
|
|
89
|
+
* - 'alarm.high_cpu'
|
|
90
|
+
*
|
|
91
|
+
* @example Invalid
|
|
92
|
+
* - 'UserCreated' (camelCase)
|
|
93
|
+
* - 'user_created' (should use dots for namespacing)
|
|
94
|
+
*/
|
|
95
|
+
exports.EventNameSchema = zod_1.z
|
|
96
|
+
.string()
|
|
97
|
+
.min(3, { message: 'Event name must be at least 3 characters' })
|
|
98
|
+
.regex(/^[a-z][a-z0-9_.]*$/, {
|
|
99
|
+
message: 'Event name must be lowercase with dots for namespacing (e.g., "user.created", "order.paid")',
|
|
100
|
+
})
|
|
101
|
+
.describe('Event name (lowercase with dot notation for namespacing)');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared Schemas and Utilities
|
|
4
|
+
* Common schemas used across multiple modules
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
__exportStar(require("./identifiers.zod"), exports);
|