oak-domain 5.1.36 → 6.1.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 +5 -1
- package/es/actions/action.d.ts +16 -0
- package/es/actions/action.js +13 -0
- package/es/base-app-domain/ActionAuth/Schema.d.ts +19 -0
- package/es/base-app-domain/ActionAuth/Schema.js +1 -0
- package/es/base-app-domain/ActionAuth/Storage.d.ts +3 -0
- package/es/base-app-domain/ActionAuth/Storage.js +36 -0
- package/es/base-app-domain/ActionAuth/_baseSchema.d.ts +46 -0
- package/es/base-app-domain/ActionDefDict.d.ts +12 -0
- package/es/base-app-domain/ActionDefDict.js +10 -0
- package/es/base-app-domain/EntityDict.d.ts +754 -0
- package/es/base-app-domain/I18n/Schema.d.ts +19 -0
- package/es/base-app-domain/I18n/Schema.js +1 -0
- package/es/base-app-domain/I18n/Storage.d.ts +3 -0
- package/es/base-app-domain/I18n/Storage.js +55 -0
- package/es/base-app-domain/I18n/_baseSchema.d.ts +51 -0
- package/es/base-app-domain/LocalizedContent/Schema.d.ts +19 -0
- package/es/base-app-domain/LocalizedContent/Schema.js +1 -0
- package/es/base-app-domain/LocalizedContent/Storage.d.ts +3 -0
- package/es/base-app-domain/LocalizedContent/Storage.js +75 -0
- package/es/base-app-domain/LocalizedContent/Style.d.ts +3 -0
- package/es/base-app-domain/LocalizedContent/Style.js +12 -0
- package/es/base-app-domain/LocalizedContent/_baseSchema.d.ts +58 -0
- package/es/base-app-domain/LocalizedContent/_baseSchema.js +1 -0
- package/es/base-app-domain/Log/Action.d.ts +6 -0
- package/es/base-app-domain/Log/Action.js +2 -0
- package/es/base-app-domain/Log/Schema.d.ts +19 -0
- package/es/base-app-domain/Log/Schema.js +1 -0
- package/es/base-app-domain/Log/Storage.d.ts +3 -0
- package/es/base-app-domain/Log/Storage.js +26 -0
- package/es/base-app-domain/Log/Style.d.ts +3 -0
- package/es/base-app-domain/Log/Style.js +6 -0
- package/es/base-app-domain/Log/_baseSchema.d.ts +44 -0
- package/es/base-app-domain/Log/_baseSchema.js +1 -0
- package/es/base-app-domain/Modi/Action.d.ts +10 -0
- package/es/base-app-domain/Modi/Action.js +11 -0
- package/es/base-app-domain/Modi/Schema.d.ts +19 -0
- package/es/base-app-domain/Modi/Schema.js +1 -0
- package/es/base-app-domain/Modi/Storage.d.ts +3 -0
- package/es/base-app-domain/Modi/Storage.js +61 -0
- package/es/base-app-domain/Modi/Style.d.ts +3 -0
- package/es/base-app-domain/Modi/Style.js +13 -0
- package/es/base-app-domain/Modi/_baseSchema.d.ts +61 -0
- package/es/base-app-domain/Modi/_baseSchema.js +1 -0
- package/es/base-app-domain/ModiEntity/Schema.d.ts +19 -0
- package/es/base-app-domain/ModiEntity/Schema.js +1 -0
- package/es/base-app-domain/ModiEntity/Storage.d.ts +3 -0
- package/es/base-app-domain/ModiEntity/Storage.js +26 -0
- package/es/base-app-domain/ModiEntity/_baseSchema.d.ts +45 -0
- package/es/base-app-domain/ModiEntity/_baseSchema.js +1 -0
- package/es/base-app-domain/Oper/Action.d.ts +12 -0
- package/es/base-app-domain/Oper/Action.js +11 -0
- package/es/base-app-domain/Oper/Schema.d.ts +19 -0
- package/es/base-app-domain/Oper/Schema.js +1 -0
- package/es/base-app-domain/Oper/Storage.d.ts +3 -0
- package/es/base-app-domain/Oper/Storage.js +64 -0
- package/es/base-app-domain/Oper/Style.d.ts +3 -0
- package/es/base-app-domain/Oper/Style.js +12 -0
- package/es/base-app-domain/Oper/_baseSchema.d.ts +69 -0
- package/es/base-app-domain/Oper/_baseSchema.js +1 -0
- package/es/base-app-domain/OperEntity/Schema.d.ts +19 -0
- package/es/base-app-domain/OperEntity/Schema.js +1 -0
- package/es/base-app-domain/OperEntity/Storage.d.ts +3 -0
- package/es/base-app-domain/OperEntity/Storage.js +26 -0
- package/es/base-app-domain/OperEntity/_baseSchema.d.ts +45 -0
- package/es/base-app-domain/OperEntity/_baseSchema.js +1 -0
- package/es/base-app-domain/Path/Schema.d.ts +19 -0
- package/es/base-app-domain/Path/Schema.js +1 -0
- package/es/base-app-domain/Path/Storage.d.ts +3 -0
- package/es/base-app-domain/Path/Storage.js +56 -0
- package/es/base-app-domain/Path/_baseSchema.d.ts +52 -0
- package/es/base-app-domain/Path/_baseSchema.js +1 -0
- package/es/base-app-domain/Relation/Schema.d.ts +19 -0
- package/es/base-app-domain/Relation/Schema.js +1 -0
- package/es/base-app-domain/Relation/Storage.d.ts +3 -0
- package/es/base-app-domain/Relation/Storage.js +51 -0
- package/es/base-app-domain/Relation/_baseSchema.d.ts +48 -0
- package/es/base-app-domain/Relation/_baseSchema.js +1 -0
- package/es/base-app-domain/Relation.d.ts +2 -0
- package/es/base-app-domain/Relation.js +1 -0
- package/es/base-app-domain/RelationAuth/Schema.d.ts +19 -0
- package/es/base-app-domain/RelationAuth/Schema.js +1 -0
- package/es/base-app-domain/RelationAuth/Storage.d.ts +3 -0
- package/es/base-app-domain/RelationAuth/Storage.js +41 -0
- package/es/base-app-domain/RelationAuth/_baseSchema.d.ts +44 -0
- package/es/base-app-domain/RelationAuth/_baseSchema.js +1 -0
- package/es/base-app-domain/RelationId.d.ts +1 -0
- package/es/base-app-domain/RelationId.js +1 -0
- package/es/base-app-domain/Storage.d.ts +3 -0
- package/es/base-app-domain/Storage.js +32 -0
- package/es/base-app-domain/StyleDict.d.ts +3 -0
- package/es/base-app-domain/StyleDict.js +12 -0
- package/es/base-app-domain/User/Action.d.ts +11 -0
- package/es/base-app-domain/User/Action.js +9 -0
- package/es/base-app-domain/User/Schema.d.ts +19 -0
- package/es/base-app-domain/User/Schema.js +1 -0
- package/es/base-app-domain/User/Storage.d.ts +3 -0
- package/es/base-app-domain/User/Storage.js +30 -0
- package/es/base-app-domain/User/Style.d.ts +3 -0
- package/es/base-app-domain/User/Style.js +11 -0
- package/es/base-app-domain/User/_baseSchema.d.ts +54 -0
- package/es/base-app-domain/User/_baseSchema.js +1 -0
- package/es/base-app-domain/UserEntityClaim/Schema.d.ts +19 -0
- package/es/base-app-domain/UserEntityClaim/Schema.js +1 -0
- package/es/base-app-domain/UserEntityClaim/Storage.d.ts +3 -0
- package/es/base-app-domain/UserEntityClaim/Storage.js +34 -0
- package/es/base-app-domain/UserEntityClaim/_baseSchema.d.ts +53 -0
- package/es/base-app-domain/UserEntityClaim/_baseSchema.js +1 -0
- package/es/base-app-domain/UserEntityGrant/Schema.d.ts +19 -0
- package/es/base-app-domain/UserEntityGrant/Schema.js +1 -0
- package/es/base-app-domain/UserEntityGrant/Storage.d.ts +3 -0
- package/es/base-app-domain/UserEntityGrant/Storage.js +22 -0
- package/es/base-app-domain/UserEntityGrant/_baseSchema.d.ts +46 -0
- package/es/base-app-domain/UserEntityGrant/_baseSchema.js +1 -0
- package/es/base-app-domain/UserRelation/Schema.d.ts +19 -0
- package/es/base-app-domain/UserRelation/Schema.js +1 -0
- package/es/base-app-domain/UserRelation/Storage.d.ts +3 -0
- package/es/base-app-domain/UserRelation/Storage.js +53 -0
- package/es/base-app-domain/UserRelation/_baseSchema.d.ts +49 -0
- package/es/base-app-domain/UserRelation/_baseSchema.js +1 -0
- package/es/base-app-domain/index.d.ts +5 -0
- package/es/base-app-domain/index.js +5 -0
- package/es/compiler/customChecks/asyncContext.d.ts +123 -0
- package/es/compiler/customChecks/asyncContext.js +844 -0
- package/es/compiler/customChecks/i18n.d.ts +90 -0
- package/es/compiler/customChecks/i18n.js +606 -0
- package/es/compiler/customChecks/ignoreComments.d.ts +15 -0
- package/es/compiler/customChecks/ignoreComments.js +123 -0
- package/es/compiler/customChecks/index.d.ts +3 -0
- package/es/compiler/customChecks/index.js +3 -0
- package/es/compiler/customChecks/jsxChecker.d.ts +22 -0
- package/es/compiler/customChecks/jsxChecker.js +111 -0
- package/es/compiler/customChecks/runner.d.ts +6 -0
- package/es/compiler/customChecks/runner.js +252 -0
- package/es/compiler/customChecks/types.d.ts +131 -0
- package/es/compiler/customChecks/types.js +16 -0
- package/es/compiler/customChecks/utils.d.ts +82 -0
- package/es/compiler/customChecks/utils.js +312 -0
- package/es/compiler/dependencyBuilder.d.ts +36 -0
- package/es/compiler/dependencyBuilder.js +1258 -0
- package/es/compiler/entities.d.ts +2 -0
- package/es/compiler/entities.js +4 -0
- package/es/compiler/entityDescEnum.d.ts +5 -0
- package/es/compiler/entityDescEnum.js +443 -0
- package/es/compiler/entitySource.d.ts +28 -0
- package/es/compiler/entitySource.js +521 -0
- package/es/compiler/env.d.ts +18 -0
- package/es/compiler/env.js +41 -0
- package/es/compiler/identifier.d.ts +9 -0
- package/es/compiler/identifier.js +155 -0
- package/es/compiler/localeBuilder.d.ts +39 -0
- package/es/compiler/localeBuilder.js +272 -0
- package/es/compiler/routerBuilder.d.ts +37 -0
- package/es/compiler/routerBuilder.js +852 -0
- package/{lib/compiler/schemalBuilder.d.ts → es/compiler/schemaBuilder.d.ts} +53 -5
- package/es/compiler/schemaBuilder.js +7046 -0
- package/es/compiler/tscBuilder.d.ts +47 -0
- package/es/compiler/tscBuilder.js +1179 -0
- package/es/compiler/uiBuilder.d.ts +1 -0
- package/es/compiler/uiBuilder.js +3 -0
- package/es/context/BackendRuntimeContext.d.ts +34 -0
- package/es/context/BackendRuntimeContext.js +74 -0
- package/es/context/ContextComposer.d.ts +93 -0
- package/es/context/ContextComposer.js +353 -0
- package/es/context/SerializedData.d.ts +10 -0
- package/es/context/SerializedData.js +1 -0
- package/es/data/i18n.d.ts +3 -0
- package/es/data/i18n.js +3 -0
- package/es/data/i18n.json +86 -0
- package/es/entities/ActionAuth.d.ts +10 -0
- package/{src/entities/ActionAuth.ts → es/entities/ActionAuth.js} +11 -14
- package/es/entities/I18n.d.ts +9 -0
- package/{src/entities/I18n.ts → es/entities/I18n.js} +13 -13
- package/es/entities/LocalizedContent.d.ts +22 -0
- package/es/entities/LocalizedContent.js +101 -0
- package/es/entities/Log.d.ts +11 -0
- package/{src/entities/Log.ts → es/entities/Log.js} +20 -16
- package/es/entities/Modi.d.ts +11 -0
- package/{src/entities/Modi.ts → es/entities/Modi.js} +28 -25
- package/es/entities/ModiEntity.d.ts +8 -0
- package/es/entities/ModiEntity.js +25 -0
- package/es/entities/Oper.d.ts +21 -0
- package/{src/entities/Oper.ts → es/entities/Oper.js} +28 -29
- package/es/entities/OperEntity.d.ts +8 -0
- package/es/entities/OperEntity.js +25 -0
- package/es/entities/Path.d.ts +9 -0
- package/{src/entities/Path.ts → es/entities/Path.js} +13 -13
- package/es/entities/Relation.d.ts +8 -0
- package/{src/entities/Relation.ts → es/entities/Relation.js} +43 -43
- package/es/entities/RelationAuth.d.ts +8 -0
- package/{src/entities/RelationAuth.ts → es/entities/RelationAuth.js} +11 -14
- package/es/entities/User.d.ts +18 -0
- package/{src/entities/User.ts → es/entities/User.js} +23 -29
- package/es/entities/UserEntityClaim.d.ts +13 -0
- package/es/entities/UserEntityClaim.js +26 -0
- package/es/entities/UserEntityGrant.d.ts +9 -0
- package/es/entities/UserEntityGrant.js +22 -0
- package/es/entities/UserRelation.d.ts +10 -0
- package/{src/entities/UserRelation.ts → es/entities/UserRelation.js} +46 -50
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/store/AsyncRowStore.d.ts +75 -0
- package/es/store/AsyncRowStore.js +211 -0
- package/es/store/CascadeStore.d.ts +123 -0
- package/es/store/CascadeStore.js +1894 -0
- package/es/store/IntrinsicCheckers.d.ts +5 -0
- package/es/store/IntrinsicCheckers.js +398 -0
- package/es/store/IntrinsicLogics.d.ts +9 -0
- package/es/store/IntrinsicLogics.js +41 -0
- package/es/store/RelationAuth.d.ts +115 -0
- package/es/store/RelationAuth.js +1340 -0
- package/es/store/SyncRowStore.d.ts +30 -0
- package/es/store/SyncRowStore.js +45 -0
- package/es/store/TriggerExecutor.d.ts +52 -0
- package/es/store/TriggerExecutor.js +650 -0
- package/es/store/checker.d.ts +26 -0
- package/es/store/checker.js +510 -0
- package/es/store/filter.d.ts +133 -0
- package/es/store/filter.js +1692 -0
- package/es/store/modi.d.ts +13 -0
- package/es/store/modi.js +247 -0
- package/es/store/projection.d.ts +2 -0
- package/es/store/projection.js +12 -0
- package/es/store/relation.d.ts +51 -0
- package/es/store/relation.js +108 -0
- package/es/store/triggers.d.ts +6 -0
- package/es/store/triggers.js +403 -0
- package/es/timers/oper.d.ts +18 -0
- package/es/timers/oper.js +60 -0
- package/es/timers/vaccum.d.ts +20 -0
- package/es/timers/vaccum.js +106 -0
- package/es/types/Action.d.ts +20 -0
- package/es/types/Action.js +1 -0
- package/es/types/AppLoader.d.ts +17 -0
- package/es/types/AppLoader.js +6 -0
- package/es/types/Aspect.d.ts +14 -0
- package/es/types/Aspect.js +3 -0
- package/es/types/Auth.d.ts +59 -0
- package/es/types/Auth.js +1 -0
- package/es/types/Cluster.d.ts +6 -0
- package/es/types/Cluster.js +1 -0
- package/es/types/Configuration.d.ts +102 -0
- package/es/types/Configuration.js +1 -0
- package/es/types/Connector.d.ts +107 -0
- package/es/types/Connector.js +1 -0
- package/es/types/Context.d.ts +7 -0
- package/es/types/Context.js +2 -0
- package/es/types/DataType.d.ts +25 -0
- package/es/types/DataType.js +3 -0
- package/es/types/Demand.d.ts +124 -0
- package/es/types/Demand.js +6 -0
- package/es/types/Endpoint.d.ts +45 -0
- package/es/types/Endpoint.js +3 -0
- package/es/types/Entity.d.ts +234 -0
- package/es/types/Entity.js +35 -0
- package/es/types/EntityDesc.d.ts +57 -0
- package/es/types/EntityDesc.js +3 -0
- package/es/types/Environment.d.ts +110 -0
- package/es/types/Environment.js +1 -0
- package/es/types/Exception.d.ts +222 -0
- package/es/types/Exception.js +586 -0
- package/es/types/Expression.d.ts +177 -0
- package/es/types/Expression.js +413 -0
- package/es/types/Geo.d.ts +18 -0
- package/es/types/Geo.js +1 -0
- package/es/types/Locale.d.ts +39 -0
- package/es/types/Locale.js +13 -0
- package/es/types/Logger.d.ts +6 -0
- package/es/types/Logger.js +2 -0
- package/es/types/OakPackage.d.ts +29 -0
- package/es/types/OakPackage.js +30 -0
- package/es/types/Polyfill.d.ts +24 -0
- package/es/types/Polyfill.js +1 -0
- package/es/types/Port.d.ts +20 -0
- package/es/types/Port.js +1 -0
- package/es/types/RowStore.d.ts +21 -0
- package/es/types/RowStore.js +16 -0
- package/es/types/Storage.d.ts +69 -0
- package/es/types/Storage.js +12 -0
- package/es/types/Style.d.ts +40 -0
- package/es/types/Style.js +1 -0
- package/es/types/Sync.d.ts +93 -0
- package/es/types/Sync.js +8 -0
- package/es/types/Timer.d.ts +47 -0
- package/es/types/Timer.js +1 -0
- package/es/types/Trigger.d.ts +755 -0
- package/es/types/Trigger.js +58 -0
- package/es/types/Txn.d.ts +2 -0
- package/es/types/Txn.js +2 -0
- package/es/types/Watcher.d.ts +42 -0
- package/es/types/Watcher.js +4 -0
- package/es/types/index.d.ts +28 -0
- package/es/types/index.js +28 -0
- package/es/types/schema/DataTypes.d.ts +34 -0
- package/es/types/schema/DataTypes.js +2 -0
- package/es/utils/SimpleConnector.d.ts +116 -0
- package/es/utils/SimpleConnector.js +554 -0
- package/es/utils/assert.d.ts +5 -0
- package/es/utils/assert.js +5 -0
- package/es/utils/concurrent.d.ts +15 -0
- package/es/utils/concurrent.js +58 -0
- package/es/utils/date.d.ts +1 -0
- package/es/utils/date.js +13 -0
- package/es/utils/decimal.d.ts +26 -0
- package/es/utils/decimal.js +87 -0
- package/es/utils/dependency-analyzer.d.ts +1 -0
- package/es/utils/dependency-analyzer.js +277 -0
- package/es/utils/domain.d.ts +18 -0
- package/es/utils/domain.js +69 -0
- package/es/utils/executor.d.ts +5 -0
- package/es/utils/executor.js +18 -0
- package/es/utils/fetch/index.d.ts +1 -0
- package/es/utils/fetch/index.js +3 -0
- package/es/utils/fetch/index.mp.d.ts +3 -0
- package/es/utils/fetch/index.mp.js +280 -0
- package/es/utils/fetch/index.native.d.ts +1 -0
- package/es/utils/fetch/index.native.js +3 -0
- package/es/utils/fetch/index.web.d.ts +1 -0
- package/es/utils/fetch/index.web.js +3 -0
- package/es/utils/fetch/shared.d.ts +6 -0
- package/es/utils/fetch/shared.js +23 -0
- package/es/utils/geo.d.ts +34 -0
- package/es/utils/geo.js +138 -0
- package/es/utils/glob.d.ts +30 -0
- package/es/utils/glob.js +276 -0
- package/es/utils/localizedContent.d.ts +11 -0
- package/es/utils/localizedContent.js +346 -0
- package/es/utils/lodash.d.ts +1 -0
- package/es/utils/lodash.js +1 -0
- package/es/utils/mask.d.ts +5 -0
- package/es/utils/mask.js +28 -0
- package/es/utils/module/combine.common.d.ts +15 -0
- package/es/utils/module/combine.common.js +23 -0
- package/es/utils/module/combine.d.ts +1 -0
- package/es/utils/module/combine.dev.d.ts +17 -0
- package/es/utils/module/combine.dev.js +51 -0
- package/es/utils/module/combine.js +1 -0
- package/es/utils/module/combine.prod.d.ts +8 -0
- package/es/utils/module/combine.prod.js +4 -0
- package/es/utils/module/combine.server.d.ts +17 -0
- package/es/utils/module/combine.server.js +51 -0
- package/es/utils/money.d.ts +6 -0
- package/es/utils/money.js +55 -0
- package/es/utils/operationResult.d.ts +2 -0
- package/es/utils/operationResult.js +15 -0
- package/es/utils/projection.d.ts +5 -0
- package/es/utils/projection.js +30 -0
- package/es/utils/random/random.d.ts +1 -0
- package/es/utils/random/random.js +15 -0
- package/es/utils/random/random.mp.d.ts +1 -0
- package/es/utils/random/random.mp.js +10 -0
- package/es/utils/random/random.native.d.ts +1 -0
- package/es/utils/random/random.native.js +9 -0
- package/es/utils/random/random.web.d.ts +1 -0
- package/es/utils/random/random.web.js +7 -0
- package/es/utils/relationPath.d.ts +44 -0
- package/es/utils/relationPath.js +266 -0
- package/es/utils/row.d.ts +20 -0
- package/es/utils/row.js +69 -0
- package/es/utils/sseEndpoint.d.ts +41 -0
- package/es/utils/sseEndpoint.js +151 -0
- package/es/utils/string.d.ts +28 -0
- package/es/utils/string.js +60 -0
- package/es/utils/toolkit.d.ts +28 -0
- package/es/utils/toolkit.js +220 -0
- package/es/utils/url/index.d.ts +4 -0
- package/es/utils/url/index.js +4 -0
- package/es/utils/url/index.mp.d.ts +16 -0
- package/es/utils/url/index.mp.js +4 -0
- package/es/utils/url/index.native.d.ts +25 -0
- package/es/utils/url/index.native.js +5 -0
- package/es/utils/url/index.web.d.ts +25 -0
- package/es/utils/url/index.web.js +5 -0
- package/es/utils/url/lightweight.d.ts +65 -0
- package/es/utils/url/lightweight.js +530 -0
- package/es/utils/url/urlObject.d.ts +16 -0
- package/es/utils/url/urlObject.js +1 -0
- package/es/utils/uuid.d.ts +19 -0
- package/es/utils/uuid.js +219 -0
- package/es/utils/validate/id.d.ts +5 -0
- package/es/utils/validate/id.js +28 -0
- package/es/utils/validate/index.d.ts +4 -0
- package/es/utils/validate/index.js +4 -0
- package/es/utils/validate/mobile.d.ts +6 -0
- package/es/utils/validate/mobile.js +49 -0
- package/es/utils/validate/nationality.d.ts +14 -0
- package/es/utils/validate/nationality.data.d.ts +9 -0
- package/es/utils/validate/nationality.data.js +257 -0
- package/es/utils/validate/nationality.js +64 -0
- package/es/utils/validate/passport.d.ts +3 -0
- package/es/utils/validate/passport.js +19 -0
- package/es/utils/validator.d.ts +32 -0
- package/es/utils/validator.js +111 -0
- package/es/utils/version.d.ts +14 -0
- package/es/utils/version.js +30 -0
- package/lib/actions/action.d.ts +1 -1
- package/lib/base-app-domain/ActionAuth/Storage.js +5 -5
- package/lib/base-app-domain/EntityDict.d.ts +27 -0
- package/lib/base-app-domain/I18n/Storage.js +5 -5
- package/lib/base-app-domain/LocalizedContent/Schema.d.ts +19 -0
- package/lib/base-app-domain/LocalizedContent/Schema.js +4 -0
- package/lib/base-app-domain/LocalizedContent/Storage.d.ts +3 -0
- package/lib/base-app-domain/LocalizedContent/Storage.js +78 -0
- package/lib/base-app-domain/LocalizedContent/Style.d.ts +3 -0
- package/lib/base-app-domain/LocalizedContent/Style.js +15 -0
- package/lib/base-app-domain/LocalizedContent/_baseSchema.d.ts +58 -0
- package/lib/base-app-domain/Log/Style.js +3 -3
- package/lib/base-app-domain/Modi/Storage.js +4 -4
- package/lib/base-app-domain/Modi/Style.js +5 -5
- package/lib/base-app-domain/Oper/Storage.js +5 -5
- package/lib/base-app-domain/Oper/Style.js +6 -6
- package/lib/base-app-domain/Path/Storage.js +7 -7
- package/lib/base-app-domain/Relation/Storage.js +6 -6
- package/lib/base-app-domain/RelationAuth/Storage.js +7 -7
- package/lib/base-app-domain/Storage.js +26 -24
- package/lib/base-app-domain/StyleDict.js +10 -8
- package/lib/base-app-domain/User/Style.js +5 -5
- package/lib/base-app-domain/UserRelation/Storage.js +8 -8
- package/lib/compiler/customChecks/asyncContext.d.ts +123 -0
- package/lib/compiler/customChecks/asyncContext.js +849 -0
- package/lib/compiler/customChecks/i18n.d.ts +90 -0
- package/lib/compiler/customChecks/i18n.js +611 -0
- package/lib/compiler/customChecks/ignoreComments.d.ts +15 -0
- package/lib/compiler/customChecks/ignoreComments.js +128 -0
- package/lib/compiler/customChecks/index.d.ts +3 -0
- package/lib/compiler/customChecks/index.js +10 -0
- package/lib/compiler/customChecks/jsxChecker.d.ts +22 -0
- package/lib/compiler/customChecks/jsxChecker.js +116 -0
- package/lib/compiler/customChecks/runner.d.ts +6 -0
- package/lib/compiler/customChecks/runner.js +256 -0
- package/lib/compiler/customChecks/types.d.ts +131 -0
- package/lib/compiler/customChecks/types.js +20 -0
- package/lib/compiler/customChecks/utils.d.ts +82 -0
- package/lib/compiler/customChecks/utils.js +332 -0
- package/lib/compiler/dependencyBuilder.d.ts +19 -0
- package/lib/compiler/dependencyBuilder.js +505 -265
- package/lib/compiler/entityDescEnum.d.ts +5 -0
- package/lib/compiler/entityDescEnum.js +450 -0
- package/lib/compiler/entitySource.d.ts +28 -0
- package/lib/compiler/entitySource.js +529 -0
- package/lib/compiler/env.d.ts +5 -0
- package/lib/compiler/env.js +17 -4
- package/lib/compiler/localeBuilder.d.ts +15 -3
- package/lib/compiler/localeBuilder.js +146 -104
- package/lib/compiler/routerBuilder.d.ts +37 -1
- package/lib/compiler/routerBuilder.js +689 -104
- package/lib/compiler/schemaBuilder.d.ts +97 -0
- package/lib/compiler/{schemalBuilder.js → schemaBuilder.js} +1898 -696
- package/lib/compiler/tscBuilder.d.ts +38 -63
- package/lib/compiler/tscBuilder.js +959 -3070
- package/lib/context/BackendRuntimeContext.d.ts +34 -0
- package/lib/context/BackendRuntimeContext.js +78 -0
- package/lib/context/ContextComposer.d.ts +93 -0
- package/lib/context/ContextComposer.js +361 -0
- package/lib/context/SerializedData.d.ts +10 -0
- package/lib/context/SerializedData.js +2 -0
- package/lib/data/i18n.d.ts +1 -1
- package/lib/data/i18n.js +1 -44
- package/lib/data/i18n.json +86 -0
- package/lib/entities/ActionAuth.d.ts +3 -3
- package/lib/entities/ActionAuth.js +8 -0
- package/lib/entities/I18n.d.ts +2 -2
- package/lib/entities/I18n.js +10 -0
- package/lib/entities/LocalizedContent.d.ts +22 -0
- package/lib/entities/LocalizedContent.js +104 -0
- package/lib/entities/Log.d.ts +3 -3
- package/lib/entities/Log.js +18 -0
- package/lib/entities/Modi.d.ts +2 -2
- package/lib/entities/Modi.js +24 -0
- package/lib/entities/ModiEntity.d.ts +3 -3
- package/lib/entities/ModiEntity.js +8 -0
- package/lib/entities/Oper.d.ts +5 -5
- package/lib/entities/Oper.js +25 -0
- package/lib/entities/OperEntity.d.ts +3 -3
- package/lib/entities/OperEntity.js +8 -0
- package/lib/entities/Path.d.ts +2 -2
- package/lib/entities/Path.js +10 -0
- package/lib/entities/Relation.d.ts +2 -2
- package/lib/entities/Relation.js +9 -0
- package/lib/entities/RelationAuth.d.ts +3 -3
- package/lib/entities/RelationAuth.js +8 -0
- package/lib/entities/User.d.ts +4 -4
- package/lib/entities/User.js +19 -0
- package/lib/entities/UserEntityClaim.d.ts +6 -6
- package/lib/entities/UserEntityClaim.js +10 -0
- package/lib/entities/UserEntityGrant.d.ts +2 -2
- package/lib/entities/UserEntityGrant.js +8 -0
- package/lib/entities/UserRelation.d.ts +4 -4
- package/lib/entities/UserRelation.js +9 -0
- package/lib/index.js +0 -1
- package/lib/store/AsyncRowStore.d.ts +2 -2
- package/lib/store/AsyncRowStore.js +6 -7
- package/lib/store/CascadeStore.d.ts +5 -3
- package/lib/store/CascadeStore.js +101 -70
- package/lib/store/IntrinsicCheckers.d.ts +1 -1
- package/lib/store/IntrinsicCheckers.js +14 -15
- package/lib/store/IntrinsicLogics.d.ts +1 -1
- package/lib/store/RelationAuth.js +42 -43
- package/lib/store/SyncRowStore.d.ts +1 -1
- package/lib/store/SyncRowStore.js +4 -5
- package/lib/store/TriggerExecutor.d.ts +6 -4
- package/lib/store/TriggerExecutor.js +47 -31
- package/lib/store/checker.d.ts +2 -2
- package/lib/store/checker.js +55 -20
- package/lib/store/filter.d.ts +3 -3
- package/lib/store/filter.js +47 -48
- package/lib/store/modi.d.ts +5 -5
- package/lib/store/modi.js +5 -6
- package/lib/store/projection.d.ts +1 -1
- package/lib/store/relation.js +4 -5
- package/lib/store/triggers.d.ts +4 -4
- package/lib/store/triggers.js +13 -14
- package/lib/testException.d.ts +1 -0
- package/lib/testException.js +11 -0
- package/lib/timers/oper.d.ts +3 -3
- package/lib/timers/vaccum.d.ts +3 -3
- package/lib/types/Action.d.ts +1 -1
- package/lib/types/AppLoader.d.ts +1 -1
- package/lib/types/Aspect.d.ts +1 -1
- package/lib/types/Auth.d.ts +2 -2
- package/lib/types/Configuration.d.ts +7 -6
- package/lib/types/Connector.d.ts +47 -1
- package/lib/types/DataType.d.ts +2 -2
- package/lib/types/Demand.d.ts +40 -6
- package/lib/types/Endpoint.d.ts +17 -1
- package/lib/types/Entity.d.ts +21 -4
- package/lib/types/Entity.js +27 -0
- package/lib/types/EntityDesc.d.ts +34 -9
- package/lib/types/EntityDesc.js +4 -0
- package/lib/types/Environment.d.ts +17 -0
- package/lib/types/Exception.d.ts +1 -1
- package/lib/types/Exception.js +2 -2
- package/lib/types/Expression.d.ts +13 -2
- package/lib/types/Expression.js +40 -5
- package/lib/types/Locale.d.ts +18 -4
- package/lib/types/Locale.js +14 -0
- package/lib/types/OakPackage.d.ts +29 -0
- package/lib/types/OakPackage.js +36 -0
- package/lib/types/Port.d.ts +1 -1
- package/lib/types/RowStore.d.ts +9 -7
- package/lib/types/Storage.d.ts +11 -3
- package/lib/types/Storage.js +13 -0
- package/lib/types/Style.d.ts +2 -2
- package/lib/types/Sync.d.ts +3 -3
- package/lib/types/Timer.d.ts +14 -2
- package/lib/types/Trigger.d.ts +2 -7
- package/lib/types/Trigger.js +2 -7
- package/lib/types/Watcher.d.ts +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/utils/SimpleConnector.d.ts +31 -5
- package/lib/utils/SimpleConnector.js +305 -28
- package/lib/utils/concurrent.js +4 -5
- package/lib/utils/decimal.d.ts +26 -0
- package/lib/utils/decimal.js +112 -0
- package/lib/utils/dependency-analyzer.d.ts +1 -0
- package/lib/utils/dependency-analyzer.js +281 -0
- package/lib/utils/fetch/index.d.ts +1 -0
- package/lib/utils/fetch/index.js +6 -0
- package/lib/utils/fetch/index.mp.d.ts +3 -0
- package/lib/utils/fetch/index.mp.js +285 -0
- package/lib/utils/fetch/index.native.d.ts +1 -0
- package/lib/utils/fetch/index.native.js +6 -0
- package/lib/utils/fetch/index.web.d.ts +1 -0
- package/lib/utils/fetch/index.web.js +6 -0
- package/lib/utils/fetch/shared.d.ts +6 -0
- package/lib/utils/fetch/shared.js +28 -0
- package/lib/utils/localizedContent.d.ts +11 -0
- package/lib/utils/localizedContent.js +352 -0
- package/lib/utils/lodash.d.ts +1 -33
- package/lib/utils/lodash.js +1 -72
- package/lib/utils/module/combine.common.d.ts +3 -3
- package/lib/utils/module/combine.common.js +6 -7
- package/lib/utils/module/combine.dev.d.ts +2 -2
- package/lib/utils/module/combine.dev.js +19 -19
- package/lib/utils/module/combine.prod.d.ts +1 -1
- package/lib/utils/module/combine.server.d.ts +2 -2
- package/lib/utils/module/combine.server.js +19 -19
- package/lib/utils/money.d.ts +2 -2
- package/lib/utils/money.js +2 -2
- package/lib/utils/operationResult.js +4 -4
- package/lib/utils/projection.d.ts +3 -3
- package/lib/utils/relationPath.d.ts +1 -1
- package/lib/utils/relationPath.js +10 -11
- package/lib/utils/row.d.ts +3 -3
- package/lib/utils/row.js +4 -5
- package/lib/utils/sseEndpoint.d.ts +41 -0
- package/lib/utils/sseEndpoint.js +156 -0
- package/lib/utils/toolkit.d.ts +28 -0
- package/lib/utils/toolkit.js +253 -0
- package/lib/utils/url/index.d.ts +1 -3
- package/lib/utils/url/index.js +3 -1
- package/lib/utils/url/index.mp.d.ts +16 -3
- package/lib/utils/url/index.mp.js +6 -4
- package/lib/utils/url/index.native.d.ts +13 -1
- package/lib/utils/url/index.native.js +5 -1
- package/lib/utils/url/index.web.d.ts +13 -1
- package/lib/utils/url/index.web.js +5 -1
- package/lib/utils/url/lightweight.d.ts +65 -0
- package/lib/utils/url/lightweight.js +535 -0
- package/lib/utils/url/urlObject.d.ts +16 -0
- package/lib/utils/url/urlObject.js +2 -0
- package/lib/utils/url/whatwg-url/lib/URL-impl.d.ts +8 -15
- package/lib/utils/url/whatwg-url/lib/infra.js +5 -4
- package/lib/utils/url/whatwg-url/lib/urlencoded.d.ts +3 -1
- package/lib/utils/url/whatwg-url/lib/utils.d.ts +1 -1
- package/lib/utils/validate/id.d.ts +5 -0
- package/lib/utils/validate/id.js +35 -0
- package/lib/utils/validate/index.d.ts +4 -0
- package/lib/utils/validate/index.js +7 -0
- package/lib/utils/validate/mobile.d.ts +6 -0
- package/lib/utils/validate/mobile.js +57 -0
- package/lib/utils/validate/nationality.d.ts +14 -0
- package/lib/utils/validate/nationality.data.d.ts +9 -0
- package/lib/utils/validate/nationality.data.js +260 -0
- package/lib/utils/validate/nationality.js +76 -0
- package/lib/utils/validate/passport.d.ts +3 -0
- package/lib/utils/validate/passport.js +24 -0
- package/lib/utils/validator.d.ts +10 -8
- package/lib/utils/validator.js +38 -42
- package/package.json +30 -11
- package/lib/utils/url/whatwg-url/index.d.ts +0 -3
- package/lib/utils/url/whatwg-url/index.js +0 -16
- package/lib/utils/url/whatwg-url/lib/URL-impl.js +0 -175
- package/lib/utils/url/whatwg-url/lib/URL.js +0 -298
- package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.d.ts +0 -19
- package/lib/utils/url/whatwg-url/lib/URLSearchParams-impl.js +0 -126
- package/lib/utils/url/whatwg-url/lib/URLSearchParams.js +0 -426
- package/lib/utils/url/whatwg-url/lib/infra.d.ts +0 -12
- package/lib/utils/url/whatwg-url/lib/url-state-machine.d.ts +0 -24
- package/lib/utils/url/whatwg-url/lib/url-state-machine.js +0 -1238
- package/lib/utils/url/whatwg-url/lib/urlencoded.js +0 -162
- package/lib/utils/url/whatwg-url/lib/utils.js +0 -101
- package/src/entities/ModiEntity.ts +0 -26
- package/src/entities/OperEntity.ts +0 -27
- package/src/entities/UserEntityClaim.ts +0 -30
- package/src/entities/UserEntityGrant.ts +0 -24
- /package/{lib/store/diffSchema.d.ts → es/base-app-domain/ActionAuth/_baseSchema.js} +0 -0
- /package/{lib/utils/url/whatwg-url/lib/URL.d.ts → es/base-app-domain/EntityDict.js} +0 -0
- /package/{lib/utils/url/whatwg-url/lib/URLSearchParams.d.ts → es/base-app-domain/I18n/_baseSchema.js} +0 -0
- /package/lib/{store/diffSchema.js → base-app-domain/LocalizedContent/_baseSchema.js} +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* ============================================================================
|
|
2
|
+
* 优先级常量定义
|
|
3
|
+
*
|
|
4
|
+
* 触发器按优先级从小到大依次执行,数值越小越先执行。
|
|
5
|
+
* 合理设置优先级可以控制触发器的执行顺序,确保数据处理的正确性。
|
|
6
|
+
* ============================================================================ */
|
|
7
|
+
/**
|
|
8
|
+
* 触发器最小优先级(最先执行)
|
|
9
|
+
* 用于需要最早执行的触发器,如数据预处理
|
|
10
|
+
*/
|
|
11
|
+
export const TRIGGER_MIN_PRIORITY = 1;
|
|
12
|
+
/**
|
|
13
|
+
* 触发器默认优先级
|
|
14
|
+
* 未指定优先级时使用此值
|
|
15
|
+
*/
|
|
16
|
+
export const TRIGGER_DEFAULT_PRIORITY = 50;
|
|
17
|
+
/**
|
|
18
|
+
* Checker(检查器)的最大优先级
|
|
19
|
+
* Checker 优先级范围是 51-99,在所有普通触发器之后执行
|
|
20
|
+
* 这确保了数据校验在数据处理完成后进行
|
|
21
|
+
*/
|
|
22
|
+
export const CHECKER_MAX_PRIORITY = 99;
|
|
23
|
+
/**
|
|
24
|
+
* 不同类型 Checker 的默认优先级映射
|
|
25
|
+
*
|
|
26
|
+
* 执行顺序(从先到后):
|
|
27
|
+
* 1. logicalData (31) - 逻辑数据检查,可修改 data 中的值
|
|
28
|
+
* 2. logical (33) - 纯逻辑检查
|
|
29
|
+
* 3. row (51) - 行级检查,检查数据库中已存在的行
|
|
30
|
+
* 4. relation (56) - 关系检查,检查关联数据
|
|
31
|
+
* 5. data (61) - 数据完整性检查
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* // logicalData 类型可以自动填充默认值
|
|
35
|
+
* // logical 类型进行业务逻辑校验
|
|
36
|
+
* // row 类型检查当前行状态是否允许操作
|
|
37
|
+
*/
|
|
38
|
+
export const CHECKER_PRIORITY_MAP = {
|
|
39
|
+
logicalData: 31,
|
|
40
|
+
logical: 33,
|
|
41
|
+
row: 51,
|
|
42
|
+
data: 61,
|
|
43
|
+
relation: 56
|
|
44
|
+
};
|
|
45
|
+
;
|
|
46
|
+
;
|
|
47
|
+
;
|
|
48
|
+
;
|
|
49
|
+
;
|
|
50
|
+
;
|
|
51
|
+
;
|
|
52
|
+
;
|
|
53
|
+
;
|
|
54
|
+
;
|
|
55
|
+
;
|
|
56
|
+
;
|
|
57
|
+
;
|
|
58
|
+
;
|
package/es/types/Txn.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReadOnlyAction } from "../actions/action";
|
|
2
|
+
import { AsyncContext } from "../store/AsyncRowStore";
|
|
3
|
+
import { EntityDict, OperationResult } from "./Entity";
|
|
4
|
+
import { EntityDict as BaseEntityDict } from "../base-app-domain";
|
|
5
|
+
type ActionData<ED extends EntityDict & BaseEntityDict, T extends keyof ED> = ED[T]['Update']['data'] | ED[T]['Remove']['data'];
|
|
6
|
+
export interface BBWatcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED> {
|
|
7
|
+
type?: 'base';
|
|
8
|
+
name: string;
|
|
9
|
+
entity: T;
|
|
10
|
+
filter: ED[T]['Filter'] | (() => ED[T]['Filter']);
|
|
11
|
+
action: Omit<ED[T]['Action'], 'create' | ReadOnlyAction>;
|
|
12
|
+
actionData: ActionData<ED, T> | (() => Promise<ActionData<ED, T>>);
|
|
13
|
+
singleton?: true;
|
|
14
|
+
lazy?: true;
|
|
15
|
+
exclusive?: true;
|
|
16
|
+
}
|
|
17
|
+
export interface WBWatcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> {
|
|
18
|
+
type?: 'base';
|
|
19
|
+
name: string;
|
|
20
|
+
entity: T;
|
|
21
|
+
filter: ED[T]['Filter'] | (() => Promise<ED[T]['Filter']>);
|
|
22
|
+
projection: ED[T]['Projection'] | (() => Promise<ED[T]['Projection']>);
|
|
23
|
+
fn: (context: Cxt, data: Partial<ED[T]['Schema']>[]) => Promise<OperationResult<ED>>;
|
|
24
|
+
forUpdate?: true;
|
|
25
|
+
singleton?: true;
|
|
26
|
+
lazy?: true;
|
|
27
|
+
exclusive?: true;
|
|
28
|
+
}
|
|
29
|
+
export interface WBFreeWatcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> {
|
|
30
|
+
type: 'free';
|
|
31
|
+
name: string;
|
|
32
|
+
entity: T;
|
|
33
|
+
filter: ED[T]['Filter'] | (() => Promise<ED[T]['Filter']>);
|
|
34
|
+
projection: ED[T]['Projection'] | (() => Promise<ED[T]['Projection']>);
|
|
35
|
+
fn: (builder: () => Promise<Cxt>, data: Partial<ED[T]['Schema']>[]) => Promise<OperationResult<ED>>;
|
|
36
|
+
forUpdate?: true;
|
|
37
|
+
singleton?: true;
|
|
38
|
+
lazy?: true;
|
|
39
|
+
exclusive?: true;
|
|
40
|
+
}
|
|
41
|
+
export type Watcher<ED extends EntityDict & BaseEntityDict, T extends keyof ED, Cxt extends AsyncContext<ED>> = BBWatcher<ED, T> | WBWatcher<ED, T, Cxt> | WBFreeWatcher<ED, T, Cxt>;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * from './Action';
|
|
2
|
+
export * from './Aspect';
|
|
3
|
+
export * from './Auth';
|
|
4
|
+
export * from './Context';
|
|
5
|
+
export * from './DataType';
|
|
6
|
+
export * from './Demand';
|
|
7
|
+
export * from './Entity';
|
|
8
|
+
export * from './Expression';
|
|
9
|
+
export * from './Geo';
|
|
10
|
+
export * from './Logger';
|
|
11
|
+
export * from './Polyfill';
|
|
12
|
+
export * from './RowStore';
|
|
13
|
+
export * from './Storage';
|
|
14
|
+
export * from './Trigger';
|
|
15
|
+
export * from './Exception';
|
|
16
|
+
export * from './Watcher';
|
|
17
|
+
export * from './AppLoader';
|
|
18
|
+
export * from './Connector';
|
|
19
|
+
export * from './Timer';
|
|
20
|
+
export * from './Port';
|
|
21
|
+
export * from './Endpoint';
|
|
22
|
+
export * from './Style';
|
|
23
|
+
export * from './EntityDesc';
|
|
24
|
+
export * from './Environment';
|
|
25
|
+
export * from './Locale';
|
|
26
|
+
export * from './Cluster';
|
|
27
|
+
export * from './Sync';
|
|
28
|
+
export * from './OakPackage';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * from './Action';
|
|
2
|
+
export * from './Aspect';
|
|
3
|
+
export * from './Auth';
|
|
4
|
+
export * from './Context';
|
|
5
|
+
export * from './DataType';
|
|
6
|
+
export * from './Demand';
|
|
7
|
+
export * from './Entity';
|
|
8
|
+
export * from './Expression';
|
|
9
|
+
export * from './Geo';
|
|
10
|
+
export * from './Logger';
|
|
11
|
+
export * from './Polyfill';
|
|
12
|
+
export * from './RowStore';
|
|
13
|
+
export * from './Storage';
|
|
14
|
+
export * from './Trigger';
|
|
15
|
+
export * from './Exception';
|
|
16
|
+
export * from './Watcher';
|
|
17
|
+
export * from './AppLoader';
|
|
18
|
+
export * from './Connector';
|
|
19
|
+
export * from './Timer';
|
|
20
|
+
export * from './Port';
|
|
21
|
+
export * from './Endpoint';
|
|
22
|
+
export * from './Style';
|
|
23
|
+
export * from './EntityDesc';
|
|
24
|
+
export * from './Environment';
|
|
25
|
+
export * from './Locale';
|
|
26
|
+
export * from './Cluster';
|
|
27
|
+
export * from './Sync';
|
|
28
|
+
export * from './OakPackage';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Column types used for @PrimaryGeneratedColumn() decorator.
|
|
3
|
+
*/
|
|
4
|
+
export type PrimaryGeneratedColumnType = "int" | "int2" | "int4" | "int8" | "integer" | "tinyint" | "smallint" | "mediumint" | "bigint" | "dec" | "decimal" | "smalldecimal" | "fixed" | "numeric" | "number";
|
|
5
|
+
/**
|
|
6
|
+
* Column types where spatial properties are used.
|
|
7
|
+
*/
|
|
8
|
+
export type SpatialColumnType = "geometry" | "geography" | "st_geometry" | "st_point";
|
|
9
|
+
/**
|
|
10
|
+
* Column types where precision and scale properties are used.
|
|
11
|
+
*/
|
|
12
|
+
export type WithPrecisionColumnType = "float" | "double" | "dec" | "decimal" | "smalldecimal" | "fixed" | "numeric" | "real" | "double precision" | "number" | "datetime" | "datetime2" | "datetimeoffset" | "time" | "time with time zone" | "time without time zone" | "timestamp" | "timestamp without time zone" | "timestamp with time zone" | "timestamp with local time zone";
|
|
13
|
+
/**
|
|
14
|
+
* Column types where column length is used.
|
|
15
|
+
*/
|
|
16
|
+
export type WithLengthColumnType = "character varying" | "varying character" | "char varying" | "nvarchar" | "national varchar" | "character" | "native character" | "varchar" | "char" | "nchar" | "national char" | "varchar2" | "nvarchar2" | "alphanum" | "shorttext" | "raw" | "binary" | "varbinary" | "string";
|
|
17
|
+
export type WithWidthColumnType = "tinyint" | "smallint" | "mediumint" | "int" | "bigint";
|
|
18
|
+
/**
|
|
19
|
+
* All other regular column types.
|
|
20
|
+
*/
|
|
21
|
+
export type SimpleColumnType = "simple-array" | "simple-json" | "simple-enum" | "int2" | "integer" | "int4" | "int8" | "int64" | "unsigned big int" | "float" | "float4" | "float8" | "smallmoney" | "money" | "boolean" | "bool" | "tinyblob" | "tinytext" | "mediumblob" | "mediumtext" | "blob" | "text" | "ntext" | "citext" | "hstore" | "longblob" | "longtext" | "alphanum" | "shorttext" | "bytes" | "bytea" | "long" | "raw" | "long raw" | "bfile" | "clob" | "nclob" | "image" | "timetz" | "timestamptz" | "timestamp with local time zone" | "smalldatetime" | "date" | "interval year to month" | "interval day to second" | "interval" | "year" | "seconddate" | "point" | "line" | "lseg" | "box" | "circle" | "path" | "polygon" | "geography" | "geometry" | "linestring" | "multipoint" | "multilinestring" | "multipolygon" | "geometrycollection" | "st_geometry" | "st_point" | "int4range" | "int8range" | "numrange" | "tsrange" | "tstzrange" | "daterange" | "enum" | "set" | "cidr" | "inet" | "macaddr" | "bit" | "bit varying" | "varbit" | "tsvector" | "tsquery" | "uuid" | "xml" | "json" | "jsonb" | "varbinary" | "hierarchyid" | "sql_variant" | "rowid" | "urowid" | "uniqueidentifier" | "rowversion" | "array" | "cube" | "ltree" | "object" | "array" | "function" | "sequence";
|
|
22
|
+
/**
|
|
23
|
+
* Any column type column can be.
|
|
24
|
+
*/
|
|
25
|
+
export type DataType = WithPrecisionColumnType | WithLengthColumnType | WithWidthColumnType | SpatialColumnType | SimpleColumnType;
|
|
26
|
+
export interface DataTypeParams {
|
|
27
|
+
length?: number;
|
|
28
|
+
width?: number;
|
|
29
|
+
precision?: number;
|
|
30
|
+
scale?: number;
|
|
31
|
+
signed?: boolean;
|
|
32
|
+
max?: number;
|
|
33
|
+
min?: number;
|
|
34
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { IncomingHttpHeaders } from "http";
|
|
2
|
+
import { SyncContext } from "../store/SyncRowStore";
|
|
3
|
+
import { Connector, EndpointRequestOptions, EndpointResponse, EndpointStreamResponse, EntityDict, OakException, OpRecord, SSEEndpointClient, SSEEndpointRequestOptions } from "../types";
|
|
4
|
+
import { EntityDict as BaseEntityDict } from "../base-app-domain";
|
|
5
|
+
import { AccessConfiguration } from "../types/Configuration";
|
|
6
|
+
export declare function makeServerUrl(configuration: AccessConfiguration): string;
|
|
7
|
+
export default class SimpleConnector<ED extends EntityDict & BaseEntityDict, FrontCxt extends SyncContext<ED>> implements Connector<ED, FrontCxt> {
|
|
8
|
+
static ASPECT_ROUTER: string;
|
|
9
|
+
static BRIDGE_ROUTER: string;
|
|
10
|
+
static SUBSCRIBE_PATH: string;
|
|
11
|
+
static SOCKET_PATH: string;
|
|
12
|
+
static SOCKET_POINT_ROUTER: string;
|
|
13
|
+
static ENDPOINT_ROUTER: string;
|
|
14
|
+
private serverUrl;
|
|
15
|
+
private serverAspectUrl;
|
|
16
|
+
private serverBridgeUrl;
|
|
17
|
+
private serverSubscribePointUrl;
|
|
18
|
+
private configuration;
|
|
19
|
+
private makeException;
|
|
20
|
+
private timeout;
|
|
21
|
+
private clockDriftDuration;
|
|
22
|
+
private getVersion;
|
|
23
|
+
constructor(configuration: AccessConfiguration, makeException: (exceptionData: any) => OakException<ED>, getVersion?: () => string);
|
|
24
|
+
getCorsHeader(): string[];
|
|
25
|
+
protected makeHeadersAndBody(name: string, data: any, context?: FrontCxt): Promise<{
|
|
26
|
+
headers: {
|
|
27
|
+
'oak-cxt': string;
|
|
28
|
+
'oak-aspect': string;
|
|
29
|
+
'oak-version': string;
|
|
30
|
+
'oak-platform': string;
|
|
31
|
+
};
|
|
32
|
+
body: FormData;
|
|
33
|
+
} | {
|
|
34
|
+
headers: Record<string, string>;
|
|
35
|
+
body: string;
|
|
36
|
+
}>;
|
|
37
|
+
protected parseAspectResult(response: Response): Promise<{
|
|
38
|
+
result: any;
|
|
39
|
+
opRecords: any;
|
|
40
|
+
message: string | undefined;
|
|
41
|
+
} | {
|
|
42
|
+
result: ReadableStream<Uint8Array<ArrayBuffer>> | null;
|
|
43
|
+
message: string | undefined;
|
|
44
|
+
opRecords?: undefined;
|
|
45
|
+
}>;
|
|
46
|
+
callAspect(name: string, params: any, context?: FrontCxt): Promise<{
|
|
47
|
+
result: any;
|
|
48
|
+
opRecords: any;
|
|
49
|
+
message: string | undefined;
|
|
50
|
+
} | {
|
|
51
|
+
result: ReadableStream<Uint8Array<ArrayBuffer>> | null;
|
|
52
|
+
message: string | undefined;
|
|
53
|
+
opRecords?: undefined;
|
|
54
|
+
}>;
|
|
55
|
+
getRouter(): string;
|
|
56
|
+
getSocketPath(): string;
|
|
57
|
+
getSocketPointRouter(): string;
|
|
58
|
+
getSocketPoint(): Promise<{
|
|
59
|
+
path: any;
|
|
60
|
+
subscribeUrl: any;
|
|
61
|
+
socketUrl: any;
|
|
62
|
+
scope: any;
|
|
63
|
+
}>;
|
|
64
|
+
getEndpointRouter(): string;
|
|
65
|
+
makeEndpointUrl(path: string): string;
|
|
66
|
+
protected makeEndpointHeadersAndBody(options?: EndpointRequestOptions<FrontCxt>, aspectName?: string): Promise<{
|
|
67
|
+
headers: Record<string, string>;
|
|
68
|
+
body?: BodyInit | null;
|
|
69
|
+
}>;
|
|
70
|
+
protected buildEndpointUrl(path: string, options?: EndpointRequestOptions<FrontCxt>): string;
|
|
71
|
+
protected makeSSEEndpointHeadersAndBody(path: string, options?: SSEEndpointRequestOptions<FrontCxt>): Promise<{
|
|
72
|
+
headers: Record<string, string>;
|
|
73
|
+
body?: BodyInit | null;
|
|
74
|
+
}>;
|
|
75
|
+
protected createSSEClient<T>(stream: ReadableStream<Uint8Array>): SSEEndpointClient<T>;
|
|
76
|
+
protected parseEndpointResponse(response: Response): Promise<EndpointResponse<ED> | EndpointStreamResponse>;
|
|
77
|
+
callEndpoint(path: string, options?: EndpointRequestOptions<FrontCxt>): Promise<EndpointResponse<ED>>;
|
|
78
|
+
openEndpointStream(path: string, options?: EndpointRequestOptions<FrontCxt>): Promise<EndpointStreamResponse>;
|
|
79
|
+
callSSEEndpoint<T = any>(path: string, options?: SSEEndpointRequestOptions<FrontCxt>): Promise<SSEEndpointClient<T>>;
|
|
80
|
+
serializeSSEEndpointResult(result: any, headers: IncomingHttpHeaders, body: any, rawMessage?: string): Promise<{
|
|
81
|
+
body: any;
|
|
82
|
+
headers: {
|
|
83
|
+
'Content-Type': string;
|
|
84
|
+
'Cache-Control': string;
|
|
85
|
+
Connection: string;
|
|
86
|
+
'oak-message': string | undefined;
|
|
87
|
+
};
|
|
88
|
+
}>;
|
|
89
|
+
parseRequest(headers: IncomingHttpHeaders, body?: any, files?: any): {
|
|
90
|
+
contextString: string | undefined;
|
|
91
|
+
aspectName: string;
|
|
92
|
+
data: any;
|
|
93
|
+
};
|
|
94
|
+
serializeResult(result: any, opRecords: OpRecord<ED>[], headers: IncomingHttpHeaders, body: any, rawMessage?: string): Promise<{
|
|
95
|
+
body: any;
|
|
96
|
+
headers?: Record<string, any> | undefined;
|
|
97
|
+
}>;
|
|
98
|
+
serializeException(exception: OakException<ED>, headers: IncomingHttpHeaders, body: any): {
|
|
99
|
+
body: {
|
|
100
|
+
exception: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
getBridgeRouter(): string;
|
|
104
|
+
/**
|
|
105
|
+
* 通过本地服务器桥接访问外部资源的url
|
|
106
|
+
* @param url
|
|
107
|
+
* @param headers
|
|
108
|
+
*/
|
|
109
|
+
makeBridgeUrl(url: string, headers?: Record<string, string>): string;
|
|
110
|
+
parseBridgeRequestQuery(urlParams: string): {
|
|
111
|
+
url: string;
|
|
112
|
+
headers?: Record<string, string> | undefined;
|
|
113
|
+
};
|
|
114
|
+
getFullData(): Promise<{}>;
|
|
115
|
+
private fetchWithTimeout;
|
|
116
|
+
}
|