@ahoo-wang/wow-client 9.2.0-rc.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/LICENSE +201 -0
- package/README.md +291 -0
- package/README.zh-CN.md +267 -0
- package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.cjs +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.es.js +9 -0
- package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.cjs +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.es.js +6 -0
- package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateParam.cjs +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateParam.es.js +8 -0
- package/dist/client/bindMethods.cjs +2 -0
- package/dist/client/bindMethods.cjs.map +1 -0
- package/dist/client/bindMethods.d.cts +13 -0
- package/dist/client/bindMethods.d.ts +13 -0
- package/dist/client/bindMethods.es.js +19 -0
- package/dist/client/bindMethods.es.js.map +1 -0
- package/dist/client/command/commandClient.cjs +2 -0
- package/dist/client/command/commandClient.cjs.map +1 -0
- package/dist/client/command/commandClient.d.cts +67 -0
- package/dist/client/command/commandClient.d.ts +67 -0
- package/dist/client/command/commandClient.es.js +38 -0
- package/dist/client/command/commandClient.es.js.map +1 -0
- package/dist/client/command/commandHeaders.cjs +2 -0
- package/dist/client/command/commandHeaders.cjs.map +1 -0
- package/dist/client/command/commandHeaders.d.cts +75 -0
- package/dist/client/command/commandHeaders.d.ts +75 -0
- package/dist/client/command/commandHeaders.es.js +31 -0
- package/dist/client/command/commandHeaders.es.js.map +1 -0
- package/dist/client/command/commandRequest.cjs +2 -0
- package/dist/client/command/commandRequest.cjs.map +1 -0
- package/dist/client/command/commandRequest.d.cts +180 -0
- package/dist/client/command/commandRequest.d.ts +180 -0
- package/dist/client/command/commandRequest.es.js +31 -0
- package/dist/client/command/commandRequest.es.js.map +1 -0
- package/dist/client/command/commandResult.d.cts +15 -0
- package/dist/client/command/commandResult.d.ts +15 -0
- package/dist/client/command/index.d.cts +5 -0
- package/dist/client/command/index.d.ts +5 -0
- package/dist/client/command/types.d.cts +71 -0
- package/dist/client/command/types.d.ts +71 -0
- package/dist/client/metadata/index.d.cts +2 -0
- package/dist/client/metadata/index.d.ts +2 -0
- package/dist/client/metadata/wowMetadata.d.cts +48 -0
- package/dist/client/metadata/wowMetadata.d.ts +48 -0
- package/dist/client/metadata/wowMetadataClient.cjs +2 -0
- package/dist/client/metadata/wowMetadataClient.cjs.map +1 -0
- package/dist/client/metadata/wowMetadataClient.d.cts +23 -0
- package/dist/client/metadata/wowMetadataClient.d.ts +23 -0
- package/dist/client/metadata/wowMetadataClient.es.js +25 -0
- package/dist/client/metadata/wowMetadataClient.es.js.map +1 -0
- package/dist/client/query/descriptor/descriptorEndpoints.cjs +2 -0
- package/dist/client/query/descriptor/descriptorEndpoints.cjs.map +1 -0
- package/dist/client/query/descriptor/descriptorEndpoints.d.cts +29 -0
- package/dist/client/query/descriptor/descriptorEndpoints.d.ts +29 -0
- package/dist/client/query/descriptor/descriptorEndpoints.es.js +69 -0
- package/dist/client/query/descriptor/descriptorEndpoints.es.js.map +1 -0
- package/dist/client/query/descriptor/endpointPaths.cjs +2 -0
- package/dist/client/query/descriptor/endpointPaths.cjs.map +1 -0
- package/dist/client/query/descriptor/endpointPaths.d.cts +4 -0
- package/dist/client/query/descriptor/endpointPaths.d.ts +4 -0
- package/dist/client/query/descriptor/endpointPaths.es.js +9 -0
- package/dist/client/query/descriptor/endpointPaths.es.js.map +1 -0
- package/dist/client/query/descriptor/index.d.cts +2 -0
- package/dist/client/query/descriptor/index.d.ts +2 -0
- package/dist/client/query/descriptor/queryDescriptorApi.d.cts +58 -0
- package/dist/client/query/descriptor/queryDescriptorApi.d.ts +58 -0
- package/dist/client/query/descriptor/queryDescriptorClient.cjs +2 -0
- package/dist/client/query/descriptor/queryDescriptorClient.cjs.map +1 -0
- package/dist/client/query/descriptor/queryDescriptorClient.d.cts +61 -0
- package/dist/client/query/descriptor/queryDescriptorClient.d.ts +61 -0
- package/dist/client/query/descriptor/queryDescriptorClient.es.js +20 -0
- package/dist/client/query/descriptor/queryDescriptorClient.es.js.map +1 -0
- package/dist/client/query/event/domainEventStream.cjs +2 -0
- package/dist/client/query/event/domainEventStream.cjs.map +1 -0
- package/dist/client/query/event/domainEventStream.d.cts +105 -0
- package/dist/client/query/event/domainEventStream.d.ts +105 -0
- package/dist/client/query/event/domainEventStream.es.js +23 -0
- package/dist/client/query/event/domainEventStream.es.js.map +1 -0
- package/dist/client/query/event/endpointPaths.cjs +2 -0
- package/dist/client/query/event/endpointPaths.cjs.map +1 -0
- package/dist/client/query/event/endpointPaths.d.cts +8 -0
- package/dist/client/query/event/endpointPaths.d.ts +8 -0
- package/dist/client/query/event/endpointPaths.es.js +13 -0
- package/dist/client/query/event/endpointPaths.es.js.map +1 -0
- package/dist/client/query/event/eventStreamQueryApi.d.cts +29 -0
- package/dist/client/query/event/eventStreamQueryApi.d.ts +29 -0
- package/dist/client/query/event/eventStreamQueryClient.cjs +2 -0
- package/dist/client/query/event/eventStreamQueryClient.cjs.map +1 -0
- package/dist/client/query/event/eventStreamQueryClient.d.cts +190 -0
- package/dist/client/query/event/eventStreamQueryClient.d.ts +190 -0
- package/dist/client/query/event/eventStreamQueryClient.es.js +160 -0
- package/dist/client/query/event/eventStreamQueryClient.es.js.map +1 -0
- package/dist/client/query/event/index.d.cts +3 -0
- package/dist/client/query/event/index.d.ts +3 -0
- package/dist/client/query/factory.cjs +2 -0
- package/dist/client/query/factory.cjs.map +1 -0
- package/dist/client/query/factory.d.cts +165 -0
- package/dist/client/query/factory.d.ts +165 -0
- package/dist/client/query/factory.es.js +45 -0
- package/dist/client/query/factory.es.js.map +1 -0
- package/dist/client/query/index.d.cts +6 -0
- package/dist/client/query/index.d.ts +6 -0
- package/dist/client/query/queryApi.d.cts +68 -0
- package/dist/client/query/queryApi.d.ts +68 -0
- package/dist/client/query/requests.d.cts +24 -0
- package/dist/client/query/requests.d.ts +24 -0
- package/dist/client/query/snapshot/endpointPaths.cjs +2 -0
- package/dist/client/query/snapshot/endpointPaths.cjs.map +1 -0
- package/dist/client/query/snapshot/endpointPaths.d.cts +12 -0
- package/dist/client/query/snapshot/endpointPaths.d.ts +12 -0
- package/dist/client/query/snapshot/endpointPaths.es.js +17 -0
- package/dist/client/query/snapshot/endpointPaths.es.js.map +1 -0
- package/dist/client/query/snapshot/index.d.cts +3 -0
- package/dist/client/query/snapshot/index.d.ts +3 -0
- package/dist/client/query/snapshot/snapshot.cjs +2 -0
- package/dist/client/query/snapshot/snapshot.cjs.map +1 -0
- package/dist/client/query/snapshot/snapshot.d.cts +51 -0
- package/dist/client/query/snapshot/snapshot.d.ts +51 -0
- package/dist/client/query/snapshot/snapshot.es.js +20 -0
- package/dist/client/query/snapshot/snapshot.es.js.map +1 -0
- package/dist/client/query/snapshot/snapshotQueryApi.d.cts +101 -0
- package/dist/client/query/snapshot/snapshotQueryApi.d.ts +101 -0
- package/dist/client/query/snapshot/snapshotQueryClient.cjs +2 -0
- package/dist/client/query/snapshot/snapshotQueryClient.cjs.map +1 -0
- package/dist/client/query/snapshot/snapshotQueryClient.d.cts +369 -0
- package/dist/client/query/snapshot/snapshotQueryClient.d.ts +369 -0
- package/dist/client/query/snapshot/snapshotQueryClient.es.js +239 -0
- package/dist/client/query/snapshot/snapshotQueryClient.es.js.map +1 -0
- package/dist/client/query/state/endpointPaths.cjs +2 -0
- package/dist/client/query/state/endpointPaths.cjs.map +1 -0
- package/dist/client/query/state/endpointPaths.d.cts +10 -0
- package/dist/client/query/state/endpointPaths.d.ts +10 -0
- package/dist/client/query/state/endpointPaths.es.js +14 -0
- package/dist/client/query/state/endpointPaths.es.js.map +1 -0
- package/dist/client/query/state/index.d.cts +4 -0
- package/dist/client/query/state/index.d.ts +4 -0
- package/dist/client/query/state/loadOwnerStateAggregateApi.d.cts +36 -0
- package/dist/client/query/state/loadOwnerStateAggregateApi.d.ts +36 -0
- package/dist/client/query/state/loadOwnerStateAggregateClient.cjs +2 -0
- package/dist/client/query/state/loadOwnerStateAggregateClient.cjs.map +1 -0
- package/dist/client/query/state/loadOwnerStateAggregateClient.d.cts +58 -0
- package/dist/client/query/state/loadOwnerStateAggregateClient.d.ts +58 -0
- package/dist/client/query/state/loadOwnerStateAggregateClient.es.js +56 -0
- package/dist/client/query/state/loadOwnerStateAggregateClient.es.js.map +1 -0
- package/dist/client/query/state/loadStateAggregateApi.d.cts +37 -0
- package/dist/client/query/state/loadStateAggregateApi.d.ts +37 -0
- package/dist/client/query/state/loadStateAggregateClient.cjs +2 -0
- package/dist/client/query/state/loadStateAggregateClient.cjs.map +1 -0
- package/dist/client/query/state/loadStateAggregateClient.d.cts +62 -0
- package/dist/client/query/state/loadStateAggregateClient.d.ts +62 -0
- package/dist/client/query/state/loadStateAggregateClient.es.js +65 -0
- package/dist/client/query/state/loadStateAggregateClient.es.js.map +1 -0
- package/dist/client/routing.cjs +2 -0
- package/dist/client/routing.cjs.map +1 -0
- package/dist/client/routing.d.cts +47 -0
- package/dist/client/routing.d.ts +47 -0
- package/dist/client/routing.es.js +8 -0
- package/dist/client/routing.es.js.map +1 -0
- package/dist/dsl/aggregation/admit.cjs +2 -0
- package/dist/dsl/aggregation/admit.cjs.map +1 -0
- package/dist/dsl/aggregation/admit.d.cts +6 -0
- package/dist/dsl/aggregation/admit.d.ts +6 -0
- package/dist/dsl/aggregation/admit.es.js +142 -0
- package/dist/dsl/aggregation/admit.es.js.map +1 -0
- package/dist/dsl/aggregation/builders.cjs +2 -0
- package/dist/dsl/aggregation/builders.cjs.map +1 -0
- package/dist/dsl/aggregation/builders.d.cts +309 -0
- package/dist/dsl/aggregation/builders.d.ts +309 -0
- package/dist/dsl/aggregation/builders.es.js +188 -0
- package/dist/dsl/aggregation/builders.es.js.map +1 -0
- package/dist/dsl/aggregation/derived.cjs +2 -0
- package/dist/dsl/aggregation/derived.cjs.map +1 -0
- package/dist/dsl/aggregation/derived.d.cts +33 -0
- package/dist/dsl/aggregation/derived.d.ts +33 -0
- package/dist/dsl/aggregation/derived.es.js +31 -0
- package/dist/dsl/aggregation/derived.es.js.map +1 -0
- package/dist/dsl/aggregation/expressionTrees.cjs +2 -0
- package/dist/dsl/aggregation/expressionTrees.cjs.map +1 -0
- package/dist/dsl/aggregation/expressionTrees.d.cts +10 -0
- package/dist/dsl/aggregation/expressionTrees.d.ts +10 -0
- package/dist/dsl/aggregation/expressionTrees.es.js +44 -0
- package/dist/dsl/aggregation/expressionTrees.es.js.map +1 -0
- package/dist/dsl/aggregation/having.cjs +2 -0
- package/dist/dsl/aggregation/having.cjs.map +1 -0
- package/dist/dsl/aggregation/having.d.cts +94 -0
- package/dist/dsl/aggregation/having.d.ts +94 -0
- package/dist/dsl/aggregation/having.es.js +62 -0
- package/dist/dsl/aggregation/having.es.js.map +1 -0
- package/dist/dsl/aggregation/index.d.cts +4 -0
- package/dist/dsl/aggregation/index.d.ts +4 -0
- package/dist/dsl/aggregation/sort.cjs +2 -0
- package/dist/dsl/aggregation/sort.cjs.map +1 -0
- package/dist/dsl/aggregation/sort.d.cts +7 -0
- package/dist/dsl/aggregation/sort.d.ts +7 -0
- package/dist/dsl/aggregation/sort.es.js +10 -0
- package/dist/dsl/aggregation/sort.es.js.map +1 -0
- package/dist/dsl/aggregation/types.cjs +2 -0
- package/dist/dsl/aggregation/types.cjs.map +1 -0
- package/dist/dsl/aggregation/types.d.cts +608 -0
- package/dist/dsl/aggregation/types.d.ts +608 -0
- package/dist/dsl/aggregation/types.es.js +37 -0
- package/dist/dsl/aggregation/types.es.js.map +1 -0
- package/dist/dsl/cursorQuery.cjs +2 -0
- package/dist/dsl/cursorQuery.cjs.map +1 -0
- package/dist/dsl/cursorQuery.d.cts +69 -0
- package/dist/dsl/cursorQuery.d.ts +69 -0
- package/dist/dsl/cursorQuery.es.js +19 -0
- package/dist/dsl/cursorQuery.es.js.map +1 -0
- package/dist/dsl/deletionState.cjs +2 -0
- package/dist/dsl/deletionState.cjs.map +1 -0
- package/dist/dsl/deletionState.d.cts +19 -0
- package/dist/dsl/deletionState.d.ts +19 -0
- package/dist/dsl/deletionState.es.js +8 -0
- package/dist/dsl/deletionState.es.js.map +1 -0
- package/dist/dsl/descriptor.cjs +2 -0
- package/dist/dsl/descriptor.cjs.map +1 -0
- package/dist/dsl/descriptor.d.cts +629 -0
- package/dist/dsl/descriptor.d.ts +629 -0
- package/dist/dsl/descriptor.es.js +37 -0
- package/dist/dsl/descriptor.es.js.map +1 -0
- package/dist/dsl/documents.d.cts +8 -0
- package/dist/dsl/documents.d.ts +8 -0
- package/dist/dsl/field.cjs +2 -0
- package/dist/dsl/field.cjs.map +1 -0
- package/dist/dsl/field.d.cts +2 -0
- package/dist/dsl/field.d.ts +2 -0
- package/dist/dsl/field.es.js +10 -0
- package/dist/dsl/field.es.js.map +1 -0
- package/dist/dsl/filter/builders.cjs +2 -0
- package/dist/dsl/filter/builders.cjs.map +1 -0
- package/dist/dsl/filter/builders.d.cts +962 -0
- package/dist/dsl/filter/builders.d.ts +962 -0
- package/dist/dsl/filter/builders.es.js +289 -0
- package/dist/dsl/filter/builders.es.js.map +1 -0
- package/dist/dsl/filter/datePattern.cjs +2 -0
- package/dist/dsl/filter/datePattern.cjs.map +1 -0
- package/dist/dsl/filter/datePattern.d.cts +8 -0
- package/dist/dsl/filter/datePattern.d.ts +8 -0
- package/dist/dsl/filter/datePattern.es.js +100 -0
- package/dist/dsl/filter/datePattern.es.js.map +1 -0
- package/dist/dsl/filter/index.d.cts +3 -0
- package/dist/dsl/filter/index.d.ts +3 -0
- package/dist/dsl/filter/operator.cjs +2 -0
- package/dist/dsl/filter/operator.cjs.map +1 -0
- package/dist/dsl/filter/operator.d.cts +113 -0
- package/dist/dsl/filter/operator.d.ts +113 -0
- package/dist/dsl/filter/operator.es.js +14 -0
- package/dist/dsl/filter/operator.es.js.map +1 -0
- package/dist/dsl/filter/scope.cjs +2 -0
- package/dist/dsl/filter/scope.cjs.map +1 -0
- package/dist/dsl/filter/scope.d.cts +15 -0
- package/dist/dsl/filter/scope.d.ts +15 -0
- package/dist/dsl/filter/scope.es.js +32 -0
- package/dist/dsl/filter/scope.es.js.map +1 -0
- package/dist/dsl/filter/types.d.cts +274 -0
- package/dist/dsl/filter/types.d.ts +274 -0
- package/dist/dsl/filter/validate.cjs +2 -0
- package/dist/dsl/filter/validate.cjs.map +1 -0
- package/dist/dsl/filter/validate.d.cts +18 -0
- package/dist/dsl/filter/validate.d.ts +18 -0
- package/dist/dsl/filter/validate.es.js +56 -0
- package/dist/dsl/filter/validate.es.js.map +1 -0
- package/dist/dsl/pagination.cjs +2 -0
- package/dist/dsl/pagination.cjs.map +1 -0
- package/dist/dsl/pagination.d.cts +28 -0
- package/dist/dsl/pagination.d.ts +28 -0
- package/dist/dsl/pagination.es.js +15 -0
- package/dist/dsl/pagination.es.js.map +1 -0
- package/dist/dsl/projection.cjs +2 -0
- package/dist/dsl/projection.cjs.map +1 -0
- package/dist/dsl/projection.d.cts +27 -0
- package/dist/dsl/projection.d.ts +27 -0
- package/dist/dsl/projection.es.js +12 -0
- package/dist/dsl/projection.es.js.map +1 -0
- package/dist/dsl/queryable.cjs +2 -0
- package/dist/dsl/queryable.cjs.map +1 -0
- package/dist/dsl/queryable.d.cts +101 -0
- package/dist/dsl/queryable.d.ts +101 -0
- package/dist/dsl/queryable.es.js +40 -0
- package/dist/dsl/queryable.es.js.map +1 -0
- package/dist/dsl/sort.cjs +2 -0
- package/dist/dsl/sort.cjs.map +1 -0
- package/dist/dsl/sort.d.cts +33 -0
- package/dist/dsl/sort.d.ts +33 -0
- package/dist/dsl/sort.es.js +21 -0
- package/dist/dsl/sort.es.js.map +1 -0
- package/dist/dsl.cjs +1 -0
- package/dist/dsl.d.cts +23 -0
- package/dist/dsl.d.ts +23 -0
- package/dist/dsl.es.js +14 -0
- package/dist/error/errorInfo.cjs +2 -0
- package/dist/error/errorInfo.cjs.map +1 -0
- package/dist/error/errorInfo.d.cts +139 -0
- package/dist/error/errorInfo.d.ts +139 -0
- package/dist/error/errorInfo.es.js +32 -0
- package/dist/error/errorInfo.es.js.map +1 -0
- package/dist/error/headers.cjs +2 -0
- package/dist/error/headers.cjs.map +1 -0
- package/dist/error/headers.d.cts +38 -0
- package/dist/error/headers.d.ts +38 -0
- package/dist/error/headers.es.js +10 -0
- package/dist/error/headers.es.js.map +1 -0
- package/dist/error/index.d.cts +21 -0
- package/dist/error/index.d.ts +21 -0
- package/dist/error/queryErrorCodes.cjs +2 -0
- package/dist/error/queryErrorCodes.cjs.map +1 -0
- package/dist/error/queryErrorCodes.d.cts +199 -0
- package/dist/error/queryErrorCodes.d.ts +199 -0
- package/dist/error/queryErrorCodes.es.js +53 -0
- package/dist/error/queryErrorCodes.es.js.map +1 -0
- package/dist/error/wowError.cjs +2 -0
- package/dist/error/wowError.cjs.map +1 -0
- package/dist/error/wowError.d.cts +99 -0
- package/dist/error/wowError.d.ts +99 -0
- package/dist/error/wowError.es.js +53 -0
- package/dist/error/wowError.es.js.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +17 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.es.js +34 -0
- package/dist/legacy/condition.cjs +2 -0
- package/dist/legacy/condition.cjs.map +1 -0
- package/dist/legacy/condition.d.cts +517 -0
- package/dist/legacy/condition.d.ts +517 -0
- package/dist/legacy/condition.es.js +338 -0
- package/dist/legacy/condition.es.js.map +1 -0
- package/dist/legacy/index.d.cts +16 -0
- package/dist/legacy/index.d.ts +16 -0
- package/dist/legacy/locale/en_US.cjs +2 -0
- package/dist/legacy/locale/en_US.cjs.map +1 -0
- package/dist/legacy/locale/en_US.d.cts +7 -0
- package/dist/legacy/locale/en_US.d.ts +7 -0
- package/dist/legacy/locale/en_US.es.js +50 -0
- package/dist/legacy/locale/en_US.es.js.map +1 -0
- package/dist/legacy/locale/operatorLocale.d.cts +10 -0
- package/dist/legacy/locale/operatorLocale.d.ts +10 -0
- package/dist/legacy/locale/zh_CN.cjs +2 -0
- package/dist/legacy/locale/zh_CN.cjs.map +1 -0
- package/dist/legacy/locale/zh_CN.d.cts +7 -0
- package/dist/legacy/locale/zh_CN.d.ts +7 -0
- package/dist/legacy/locale/zh_CN.es.js +50 -0
- package/dist/legacy/locale/zh_CN.es.js.map +1 -0
- package/dist/legacy/operator.cjs +2 -0
- package/dist/legacy/operator.cjs.map +1 -0
- package/dist/legacy/operator.d.cts +218 -0
- package/dist/legacy/operator.d.ts +218 -0
- package/dist/legacy/operator.es.js +25 -0
- package/dist/legacy/operator.es.js.map +1 -0
- package/dist/legacy/queryable.cjs +2 -0
- package/dist/legacy/queryable.cjs.map +1 -0
- package/dist/legacy/queryable.d.cts +61 -0
- package/dist/legacy/queryable.d.ts +61 -0
- package/dist/legacy/queryable.es.js +34 -0
- package/dist/legacy/queryable.es.js.map +1 -0
- package/dist/legacy.cjs +1 -0
- package/dist/legacy.es.js +6 -0
- package/dist/model/abac.cjs +2 -0
- package/dist/model/abac.cjs.map +1 -0
- package/dist/model/abac.d.cts +33 -0
- package/dist/model/abac.d.ts +33 -0
- package/dist/model/abac.es.js +6 -0
- package/dist/model/abac.es.js.map +1 -0
- package/dist/model/bi.cjs +2 -0
- package/dist/model/bi.cjs.map +1 -0
- package/dist/model/bi.d.cts +12 -0
- package/dist/model/bi.d.ts +12 -0
- package/dist/model/bi.es.js +8 -0
- package/dist/model/bi.es.js.map +1 -0
- package/dist/model/command.cjs +2 -0
- package/dist/model/command.cjs.map +1 -0
- package/dist/model/command.d.cts +137 -0
- package/dist/model/command.d.ts +137 -0
- package/dist/model/command.es.js +8 -0
- package/dist/model/command.es.js.map +1 -0
- package/dist/model/common.d.cts +19 -0
- package/dist/model/common.d.ts +19 -0
- package/dist/model/function.cjs +2 -0
- package/dist/model/function.cjs.map +1 -0
- package/dist/model/function.d.cts +41 -0
- package/dist/model/function.d.ts +41 -0
- package/dist/model/function.es.js +8 -0
- package/dist/model/function.es.js.map +1 -0
- package/dist/model/index.d.cts +22 -0
- package/dist/model/index.d.ts +22 -0
- package/dist/model/messaging.d.cts +5 -0
- package/dist/model/messaging.d.ts +5 -0
- package/dist/model/modeling.d.cts +145 -0
- package/dist/model/modeling.d.ts +145 -0
- package/dist/model/naming.d.cts +27 -0
- package/dist/model/naming.d.ts +27 -0
- package/dist/transport/endpoints.cjs +2 -0
- package/dist/transport/endpoints.cjs.map +1 -0
- package/dist/transport/endpoints.d.cts +79 -0
- package/dist/transport/endpoints.d.ts +79 -0
- package/dist/transport/endpoints.es.js +14 -0
- package/dist/transport/endpoints.es.js.map +1 -0
- package/dist/transport/eventStreams.cjs +2 -0
- package/dist/transport/eventStreams.cjs.map +1 -0
- package/dist/transport/eventStreams.d.cts +23 -0
- package/dist/transport/eventStreams.d.ts +23 -0
- package/dist/transport/eventStreams.es.js +22 -0
- package/dist/transport/eventStreams.es.js.map +1 -0
- package/dist/transport/index.d.cts +1 -0
- package/dist/transport/index.d.ts +1 -0
- package/package.json +110 -0
|
@@ -0,0 +1,629 @@
|
|
|
1
|
+
import { AggregationDatePart, AggregationDateUnit, DateDiffUnit, AggregationFunction, AggregationGroupType, AggregationMetricType } from './aggregation/types.js';
|
|
2
|
+
import { DeletionState } from './deletionState.js';
|
|
3
|
+
import { FilterOperator, SearchMode, TimeUnit } from './filter/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* The query models Wow names in a descriptor's `model`. The set is open: a
|
|
6
|
+
* server may register a model of its own, so a descriptor's `model` is a
|
|
7
|
+
* {@link QueryModel}.
|
|
8
|
+
*/
|
|
9
|
+
export declare const QueryModels: Readonly<{
|
|
10
|
+
/** The snapshot query model: `{aggregate}/snapshot/*`. */
|
|
11
|
+
readonly SNAPSHOT: "SNAPSHOT";
|
|
12
|
+
/** The event stream query model: `{aggregate}/event/*`. */
|
|
13
|
+
readonly EVENT_STREAM: "EVENT_STREAM";
|
|
14
|
+
}>;
|
|
15
|
+
/** A query model's name: one of {@link QueryModels}, or one a server added. */
|
|
16
|
+
export type QueryModel = (typeof QueryModels)[keyof typeof QueryModels] | (string & {});
|
|
17
|
+
/**
|
|
18
|
+
* The value types Wow names in a field's `types`. The set is open, like
|
|
19
|
+
* {@link QueryModels}.
|
|
20
|
+
*/
|
|
21
|
+
export declare const QueryValueTypes: Readonly<{
|
|
22
|
+
/** A JSON string. */
|
|
23
|
+
readonly STRING: "STRING";
|
|
24
|
+
/** A whole number. */
|
|
25
|
+
readonly INTEGER: "INTEGER";
|
|
26
|
+
/** A number with a fraction. */
|
|
27
|
+
readonly DECIMAL: "DECIMAL";
|
|
28
|
+
/** `true` or `false`. */
|
|
29
|
+
readonly BOOLEAN: "BOOLEAN";
|
|
30
|
+
/** A JSON object. */
|
|
31
|
+
readonly OBJECT: "OBJECT";
|
|
32
|
+
}>;
|
|
33
|
+
/** A field's value type: one of {@link QueryValueTypes}, or one a server added. */
|
|
34
|
+
export type QueryValueType = (typeof QueryValueTypes)[keyof typeof QueryValueTypes] | (string & {});
|
|
35
|
+
/** The structural shape of a field's value, sent as its `kind`. */
|
|
36
|
+
export declare enum QueryValueKind {
|
|
37
|
+
/** Wow could not tell. */
|
|
38
|
+
UNKNOWN = "UNKNOWN",
|
|
39
|
+
/** Always `null`. */
|
|
40
|
+
NULL = "NULL",
|
|
41
|
+
/** A single string, number or boolean. */
|
|
42
|
+
SCALAR = "SCALAR",
|
|
43
|
+
/** An object. */
|
|
44
|
+
OBJECT = "OBJECT",
|
|
45
|
+
/** An array. */
|
|
46
|
+
ARRAY = "ARRAY",
|
|
47
|
+
/** One of several of the above. */
|
|
48
|
+
UNION = "UNION"
|
|
49
|
+
}
|
|
50
|
+
/** The ways a model can be read page by page, listed in `record.paging`. */
|
|
51
|
+
export declare enum PagingMode {
|
|
52
|
+
/** `list` and `listStream`: the first `limit` rows. */
|
|
53
|
+
LIST = "LIST",
|
|
54
|
+
/** `paged`: numbered pages with a total. */
|
|
55
|
+
PAGED = "PAGED",
|
|
56
|
+
/** `cursor`: forward-only pages after the last row seen. */
|
|
57
|
+
CURSOR = "CURSOR"
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The system roles Wow names in a field's `role`: the system fields a root
|
|
61
|
+
* operator targets, and the model's times. The set is open, like
|
|
62
|
+
* {@link QueryModels}.
|
|
63
|
+
*/
|
|
64
|
+
export declare const QueryFieldRoles: Readonly<{
|
|
65
|
+
/** The record's own identity, `record.identity`. */
|
|
66
|
+
readonly IDENTITY: "IDENTITY";
|
|
67
|
+
/** The aggregate id. */
|
|
68
|
+
readonly AGGREGATE_ID: "AGGREGATE_ID";
|
|
69
|
+
/** The tenant id. */
|
|
70
|
+
readonly TENANT_ID: "TENANT_ID";
|
|
71
|
+
/** The owner id. */
|
|
72
|
+
readonly OWNER_ID: "OWNER_ID";
|
|
73
|
+
/** The space id. */
|
|
74
|
+
readonly SPACE_ID: "SPACE_ID";
|
|
75
|
+
/** Whether the aggregate is deleted. */
|
|
76
|
+
readonly DELETED: "DELETED";
|
|
77
|
+
/**
|
|
78
|
+
* When the record's events happened: a snapshot's last event
|
|
79
|
+
* (`eventTime`), an event stream's events (`createTime`). `FIRST` and
|
|
80
|
+
* `LAST` order by it when they name no `orderBy`. Wow 9.2 and later.
|
|
81
|
+
*/
|
|
82
|
+
readonly EVENT_TIME: "EVENT_TIME";
|
|
83
|
+
/**
|
|
84
|
+
* When a snapshot's aggregate got its first event, i.e. was created
|
|
85
|
+
* (`firstEventTime`). Wow 9.2 and later.
|
|
86
|
+
*/
|
|
87
|
+
readonly FIRST_EVENT_TIME: "FIRST_EVENT_TIME";
|
|
88
|
+
}>;
|
|
89
|
+
/** A system field's role: one of {@link QueryFieldRoles}, or one a server added. */
|
|
90
|
+
export type QueryFieldRole = (typeof QueryFieldRoles)[keyof typeof QueryFieldRoles] | (string & {});
|
|
91
|
+
/**
|
|
92
|
+
* The combination rules Wow names in a descriptor's `constraints`: rules
|
|
93
|
+
* that no single capability shows. The set is open, like {@link QueryModels}.
|
|
94
|
+
*/
|
|
95
|
+
export declare const QueryConstraintTypes: Readonly<{
|
|
96
|
+
/**
|
|
97
|
+
* A cursor's sort always ends with the identity field; the server appends
|
|
98
|
+
* it (the constraint's `appended`) when the sort does not.
|
|
99
|
+
*/
|
|
100
|
+
readonly CURSOR_UNIQUE_SORT: "CURSOR_UNIQUE_SORT";
|
|
101
|
+
/** A count or paged query must not match every record. */
|
|
102
|
+
readonly COUNT_REQUIRES_FILTER: "COUNT_REQUIRES_FILTER";
|
|
103
|
+
/** `STARTS_WITH` needs a non-empty, case-sensitive prefix. */
|
|
104
|
+
readonly STARTS_WITH_REQUIRES_PREFIX: "STARTS_WITH_REQUIRES_PREFIX";
|
|
105
|
+
/**
|
|
106
|
+
* A sort names at most one of the constraint's `fields`: they are
|
|
107
|
+
* array-valued and the storage cannot order by two independent arrays.
|
|
108
|
+
* Fields on one array path, one nested in the other, may still combine.
|
|
109
|
+
* A sort that breaks it is refused with `PARALLEL_ARRAY_SORT`.
|
|
110
|
+
*/
|
|
111
|
+
readonly PARALLEL_ARRAY_SORT: "PARALLEL_ARRAY_SORT";
|
|
112
|
+
/**
|
|
113
|
+
* On the constraint's `fields`, a stored `null` or empty array cannot be
|
|
114
|
+
* told from a missing field: `EXISTS` does not match it, `NOT_EXISTS` and
|
|
115
|
+
* `IS_NULL` do, and `IS_EMPTY` also matches a missing or `null` field. A
|
|
116
|
+
* presence filter on such a field answers "has a non-empty value", not
|
|
117
|
+
* "has the key"; say so to a user who writes one.
|
|
118
|
+
*/
|
|
119
|
+
readonly NULL_OR_EMPTY_AS_MISSING: "NULL_OR_EMPTY_AS_MISSING";
|
|
120
|
+
/**
|
|
121
|
+
* Model-wide, without `fields`: `EQ` and `NE` take only a scalar operand,
|
|
122
|
+
* because the storage cannot compare a whole array. Match an array
|
|
123
|
+
* field's elements instead (`IN`, `CONTAINS_ALL`, `ELEMENT_MATCH`); an `EQ` or
|
|
124
|
+
* `NE` with an array operand is refused with `ARRAY_EQUALITY`.
|
|
125
|
+
*/
|
|
126
|
+
readonly ARRAY_EQUALITY: "ARRAY_EQUALITY";
|
|
127
|
+
}>;
|
|
128
|
+
/** A constraint's type: one of {@link QueryConstraintTypes}, or one a server added. */
|
|
129
|
+
export type QueryConstraintType = (typeof QueryConstraintTypes)[keyof typeof QueryConstraintTypes] | (string & {});
|
|
130
|
+
/** A field that holds a calendar date. */
|
|
131
|
+
export interface TemporalDate {
|
|
132
|
+
/** The discriminator. */
|
|
133
|
+
type: 'TEMPORAL_DATE';
|
|
134
|
+
}
|
|
135
|
+
/** A field that holds a number of time units since the epoch. */
|
|
136
|
+
export interface TemporalEpoch {
|
|
137
|
+
/** The discriminator. */
|
|
138
|
+
type: 'TEMPORAL_EPOCH';
|
|
139
|
+
/** The unit the number counts; milliseconds when absent. */
|
|
140
|
+
timeUnit?: TimeUnit;
|
|
141
|
+
}
|
|
142
|
+
/** A field that holds a time written as text in a `java.time` pattern. */
|
|
143
|
+
export interface TemporalFormatted {
|
|
144
|
+
/** The discriminator. */
|
|
145
|
+
type: 'TEMPORAL_FORMATTED';
|
|
146
|
+
/** The `java.time` pattern, such as `yyyy-MM-dd`. */
|
|
147
|
+
pattern: string;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* A number field meant as a fixed-point decimal with `scale` fraction
|
|
151
|
+
* digits: format and total it at that precision. Declared on the model
|
|
152
|
+
* (`@QueryDecimal`), never inferred. Wow 9.2 and later.
|
|
153
|
+
*/
|
|
154
|
+
export interface NumericDecimal {
|
|
155
|
+
/** The discriminator. */
|
|
156
|
+
type: 'DECIMAL';
|
|
157
|
+
/** The number of digits after the decimal point, 0 or more. */
|
|
158
|
+
scale: number;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* A number field meant as an amount of money, in exactly one of a fixed
|
|
162
|
+
* ISO 4217 `currency` or the currency held by the sibling string field
|
|
163
|
+
* `currencyField` (a property of the same object or element). `scale` is
|
|
164
|
+
* always sent: with a fixed currency the server resolves an omitted one to
|
|
165
|
+
* that currency's standard fraction digits (2 for CNY, 0 for JPY).
|
|
166
|
+
* Amounts in different currencies must not be totalled together. Declared
|
|
167
|
+
* on the model (`@QueryMoney`), never inferred. Wow 9.2 and later.
|
|
168
|
+
*/
|
|
169
|
+
export type NumericMoney = {
|
|
170
|
+
/** The discriminator. */
|
|
171
|
+
type: 'MONEY';
|
|
172
|
+
/** The number of digits after the decimal point, 0 or more. */
|
|
173
|
+
scale: number;
|
|
174
|
+
} & ({
|
|
175
|
+
/** The fixed ISO 4217 currency code, such as `CNY`. */
|
|
176
|
+
currency: string;
|
|
177
|
+
currencyField?: undefined;
|
|
178
|
+
} | {
|
|
179
|
+
currency?: undefined;
|
|
180
|
+
/** The sibling property that holds each value's currency code. */
|
|
181
|
+
currencyField: string;
|
|
182
|
+
});
|
|
183
|
+
/**
|
|
184
|
+
* A number field that is a length of time counted in `timeUnit`, such as a
|
|
185
|
+
* timeout in seconds: format it as a duration. Declared on the model
|
|
186
|
+
* (`@QueryDuration`), never inferred. Wow 9.2 and later.
|
|
187
|
+
*/
|
|
188
|
+
export interface DurationSemantic {
|
|
189
|
+
/** The discriminator. */
|
|
190
|
+
type: 'DURATION';
|
|
191
|
+
/** The unit the number counts; always sent. */
|
|
192
|
+
timeUnit: TimeUnit;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* A field whose value is the id of an aggregate, to look it up and link to
|
|
196
|
+
* it: either a fixed aggregate, `contextName` and `aggregateName`, or per
|
|
197
|
+
* record the aggregate the sibling string fields `contextNameField` and
|
|
198
|
+
* `aggregateNameField` name (as in an `AggregateId`). The id is always the
|
|
199
|
+
* aggregate's own. Declared on the model (`@QueryReference`), or inferred
|
|
200
|
+
* for an `AggregateId`. Wow 9.2 and later.
|
|
201
|
+
*/
|
|
202
|
+
export type ReferenceSemantic = {
|
|
203
|
+
/** The discriminator. */
|
|
204
|
+
type: 'REFERENCE';
|
|
205
|
+
} & ({
|
|
206
|
+
/** The referenced aggregate's bounded context. */
|
|
207
|
+
contextName: string;
|
|
208
|
+
/** The referenced aggregate's name. */
|
|
209
|
+
aggregateName: string;
|
|
210
|
+
contextNameField?: undefined;
|
|
211
|
+
aggregateNameField?: undefined;
|
|
212
|
+
} | {
|
|
213
|
+
contextName?: undefined;
|
|
214
|
+
aggregateName?: undefined;
|
|
215
|
+
/** The sibling property that holds each value's bounded context. */
|
|
216
|
+
contextNameField: string;
|
|
217
|
+
/** The sibling property that holds each value's aggregate name. */
|
|
218
|
+
aggregateNameField: string;
|
|
219
|
+
});
|
|
220
|
+
/**
|
|
221
|
+
* What a field's value means beyond its type, sent as its `semantic`: one
|
|
222
|
+
* of the three temporal kinds, which the relative time filters (`TODAY`,
|
|
223
|
+
* `RECENT_DAYS`, …) and date histograms need; one of the two numeric
|
|
224
|
+
* formats, which say how a number is read and displayed; a duration; or a
|
|
225
|
+
* reference to an aggregate. A field has one; an array field's is its
|
|
226
|
+
* items'.
|
|
227
|
+
*
|
|
228
|
+
* The union grows in minor releases, as the server learns a semantic, and a
|
|
229
|
+
* server newer than this client may send a `type` not listed here. The
|
|
230
|
+
* descriptor is read as JSON, not parsed, so it arrives as it is: keep a
|
|
231
|
+
* `default` branch in a `switch` over `type`, and treat a `type` you do not
|
|
232
|
+
* know as no semantic at all. The union stays closed so that narrowing on
|
|
233
|
+
* `type` still works.
|
|
234
|
+
*/
|
|
235
|
+
export type QuerySemanticType = TemporalDate | TemporalEpoch | TemporalFormatted | NumericDecimal | NumericMoney | DurationSemantic | ReferenceSemantic;
|
|
236
|
+
/** One declared value of an enum field, with its description when it has one. */
|
|
237
|
+
export interface EnumValueDescriptor {
|
|
238
|
+
/** The value as it is stored and filtered by. */
|
|
239
|
+
value: unknown;
|
|
240
|
+
/**
|
|
241
|
+
* What the value means, when the model describes it: set by the `enum`
|
|
242
|
+
* entry of the model's declaration file.
|
|
243
|
+
*/
|
|
244
|
+
description?: string;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* How much Wow protects a sensitive field's raw value, sent as its
|
|
248
|
+
* `sensitivity.level`. Both levels mask the value in every query result;
|
|
249
|
+
* they differ in what a query may do with the raw value.
|
|
250
|
+
*/
|
|
251
|
+
export declare enum SensitivityLevel {
|
|
252
|
+
/**
|
|
253
|
+
* Masked in results. Filters and paged sorts still compare the raw value,
|
|
254
|
+
* unless the server turned that off; grouping, `ANY`, field metrics,
|
|
255
|
+
* arithmetic references and cursor sorts are refused.
|
|
256
|
+
*/
|
|
257
|
+
DISPLAY = "DISPLAY",
|
|
258
|
+
/**
|
|
259
|
+
* Masked in results and never compared: no filter, sort, search, grouping
|
|
260
|
+
* or metric may name it.
|
|
261
|
+
*/
|
|
262
|
+
CONFIDENTIAL = "CONFIDENTIAL"
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Why a field is deprecated. The field can still be queried, but new
|
|
266
|
+
* queries and view definitions should avoid it.
|
|
267
|
+
*/
|
|
268
|
+
export interface QueryDeprecation {
|
|
269
|
+
/** Why, or what to use instead; absent when the declaration gave no reason. */
|
|
270
|
+
message?: string;
|
|
271
|
+
}
|
|
272
|
+
/** How a sensitive field is protected. */
|
|
273
|
+
export interface SensitivityDescriptor {
|
|
274
|
+
/** How much its raw value is protected. */
|
|
275
|
+
level: SensitivityLevel;
|
|
276
|
+
/**
|
|
277
|
+
* Whether filters and paged sorts may still compare its raw value: `false`
|
|
278
|
+
* for {@link SensitivityLevel.CONFIDENTIAL}, and for
|
|
279
|
+
* {@link SensitivityLevel.DISPLAY} when the server turned comparison off.
|
|
280
|
+
* A field that is not comparable lists no filter operators, has
|
|
281
|
+
* `sort.paged` `false` and is left out of `record.search`; naming it in a
|
|
282
|
+
* filter, sort or search is refused with `PROTECTED_COMPARISON`.
|
|
283
|
+
*/
|
|
284
|
+
comparable: boolean;
|
|
285
|
+
}
|
|
286
|
+
/** The filter operators a field admits. */
|
|
287
|
+
export interface FieldFilterDescriptor {
|
|
288
|
+
/**
|
|
289
|
+
* Each operator admitted on this field when used alone; empty when none,
|
|
290
|
+
* as for a sensitive field that is not comparable.
|
|
291
|
+
*/
|
|
292
|
+
operators: FilterOperator[];
|
|
293
|
+
}
|
|
294
|
+
/** Where a field may appear in a sort. */
|
|
295
|
+
export interface FieldSortDescriptor {
|
|
296
|
+
/** In the sort of a list or paged query; never for a field that is not comparable. */
|
|
297
|
+
paged: boolean;
|
|
298
|
+
/** In the sort of a cursor query. */
|
|
299
|
+
cursor: boolean;
|
|
300
|
+
}
|
|
301
|
+
/** How a field may be used in an aggregation. */
|
|
302
|
+
export interface FieldAggregateDescriptor {
|
|
303
|
+
/**
|
|
304
|
+
* The group types it may be grouped by; a time field lists both
|
|
305
|
+
* `DATE_HISTOGRAM` and `DATE_PART`.
|
|
306
|
+
*/
|
|
307
|
+
groups: (AggregationGroupType | (string & {}))[];
|
|
308
|
+
/** Whether a terms group on it may set `missingKey`. */
|
|
309
|
+
missingKey: boolean;
|
|
310
|
+
/** The numeric functions (`SUM`, `AVG`, …) it may feed. */
|
|
311
|
+
functions: (AggregationFunction | (string & {}))[];
|
|
312
|
+
/** Whether it may feed a `DISTINCT_COUNT` metric. */
|
|
313
|
+
distinctCount: boolean;
|
|
314
|
+
/** Whether it may feed a `PERCENTILE` metric. */
|
|
315
|
+
percentile: boolean;
|
|
316
|
+
/** Whether it may feed an `ANY` metric. */
|
|
317
|
+
any: boolean;
|
|
318
|
+
/** Whether a `FIRST` or `LAST` metric may read its value. */
|
|
319
|
+
firstLast: boolean;
|
|
320
|
+
/** Whether it may appear in an arithmetic expression. */
|
|
321
|
+
expressionInput: boolean;
|
|
322
|
+
/** Whether a metric's filter may name it. */
|
|
323
|
+
inMetricFilter: boolean;
|
|
324
|
+
}
|
|
325
|
+
/** One queryable field, by the logical path a query names it with. */
|
|
326
|
+
export interface FieldDescriptor {
|
|
327
|
+
/** The logical path, such as `state.items.productId`. */
|
|
328
|
+
path: string;
|
|
329
|
+
/** The system role of a system field; absent on ordinary fields. */
|
|
330
|
+
role?: QueryFieldRole;
|
|
331
|
+
/** The value types it holds. */
|
|
332
|
+
types: QueryValueType[];
|
|
333
|
+
/** The structural shape of its value. */
|
|
334
|
+
kind: QueryValueKind;
|
|
335
|
+
/** Whether it may be `null`. */
|
|
336
|
+
nullable: boolean;
|
|
337
|
+
/** What its value means beyond its type; absent when nothing more. */
|
|
338
|
+
semantic?: QuerySemanticType;
|
|
339
|
+
/** Its declared values; never listed for a protected field. */
|
|
340
|
+
enum?: EnumValueDescriptor[];
|
|
341
|
+
/** Its description, when the model gives one. */
|
|
342
|
+
description?: string;
|
|
343
|
+
/** How it is protected; absent when it is not sensitive. */
|
|
344
|
+
sensitivity?: SensitivityDescriptor;
|
|
345
|
+
/** Whether a projection may select it. */
|
|
346
|
+
project: boolean;
|
|
347
|
+
/** The filter operators it admits. */
|
|
348
|
+
filter: FieldFilterDescriptor;
|
|
349
|
+
/** Where it may be sorted by. */
|
|
350
|
+
sort: FieldSortDescriptor;
|
|
351
|
+
/** How it may be aggregated; absent when it cannot be at all. */
|
|
352
|
+
aggregate?: FieldAggregateDescriptor;
|
|
353
|
+
/**
|
|
354
|
+
* The element (array field) it lives in, by path; absent at the record
|
|
355
|
+
* level. A filter on it goes inside `ELEMENT_MATCH` on that element.
|
|
356
|
+
*/
|
|
357
|
+
scope?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Set when the field is deprecated: still queryable, but new queries
|
|
360
|
+
* should avoid it. An object, so it is truthy even without a message.
|
|
361
|
+
*/
|
|
362
|
+
deprecated?: QueryDeprecation;
|
|
363
|
+
/**
|
|
364
|
+
* Other paths a query may name this field by, sorted; empty when none.
|
|
365
|
+
* The server replaces an alias with `path` before it checks and runs a
|
|
366
|
+
* query, so results, projections and errors use `path`, and an alias is
|
|
367
|
+
* never listed as a field of its own. A variant's field lists them
|
|
368
|
+
* relative to the element, like its `path`.
|
|
369
|
+
*/
|
|
370
|
+
aliases: string[];
|
|
371
|
+
}
|
|
372
|
+
/** An array field whose elements can be filtered or aggregated one by one. */
|
|
373
|
+
export interface ElementDescriptor {
|
|
374
|
+
/** The array field's logical path. */
|
|
375
|
+
path: string;
|
|
376
|
+
/** Whether `ELEMENT_MATCH` may filter its elements. */
|
|
377
|
+
filter: boolean;
|
|
378
|
+
/** Whether an aggregation may run over its elements. */
|
|
379
|
+
aggregate: boolean;
|
|
380
|
+
/**
|
|
381
|
+
* Full-text search on its fields: a `SEARCH` that names them, relative
|
|
382
|
+
* to the element, inside an `ELEMENT_MATCH` on it. Absent when the
|
|
383
|
+
* storage can search none of them, as on MongoDB.
|
|
384
|
+
*/
|
|
385
|
+
search?: SearchDescriptor;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* The fields under a map's dynamic keys, written with `{key}` in place of
|
|
389
|
+
* the key: any key matches, except those in `excludedKeys`. Each pattern
|
|
390
|
+
* has one entry, resolved as the server resolves a concrete key: a pattern
|
|
391
|
+
* whose values are arrays is one `ARRAY` entry, its items implicit.
|
|
392
|
+
*/
|
|
393
|
+
export interface DynamicFieldDescriptor {
|
|
394
|
+
/** The path pattern, such as `state.attributes.{key}`. */
|
|
395
|
+
pattern: string;
|
|
396
|
+
/** The value types they hold. */
|
|
397
|
+
types: QueryValueType[];
|
|
398
|
+
/** The structural shape of their values. */
|
|
399
|
+
kind: QueryValueKind;
|
|
400
|
+
/** The filter operators they admit. */
|
|
401
|
+
filter: FieldFilterDescriptor;
|
|
402
|
+
/**
|
|
403
|
+
* The map's keys that are declared as fields of their own and so are not
|
|
404
|
+
* covered by this pattern; absent when there are none. For
|
|
405
|
+
* `state.attributes.{key}` with `state.attributes.color` declared, it is
|
|
406
|
+
* `['color']`: a filter on `state.attributes.color` takes that field's
|
|
407
|
+
* entry in `fields`, with its own operators, not this pattern's.
|
|
408
|
+
*/
|
|
409
|
+
excludedKeys?: string[];
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Full-text search in one scope: the record's (`record.search`) or an
|
|
413
|
+
* element's (`elements[].search`).
|
|
414
|
+
*/
|
|
415
|
+
export interface SearchDescriptor {
|
|
416
|
+
/**
|
|
417
|
+
* For the record, the modes of a model-wide `SEARCH` (without fields);
|
|
418
|
+
* empty when one of its fields is not comparable, since a search across
|
|
419
|
+
* the model would match that field. For an element, the modes every
|
|
420
|
+
* listed field accepts.
|
|
421
|
+
*/
|
|
422
|
+
modes: SearchMode[];
|
|
423
|
+
/**
|
|
424
|
+
* The fields a `SEARCH` may name, by full logical path; never one that is
|
|
425
|
+
* not comparable. For the record, only record-level fields, never one
|
|
426
|
+
* inside an element; for an element, its own fields, which the query
|
|
427
|
+
* writes relative to the element.
|
|
428
|
+
*/
|
|
429
|
+
fields: string[];
|
|
430
|
+
}
|
|
431
|
+
/** What holds for the model's records as a whole. */
|
|
432
|
+
export interface RecordDescriptor {
|
|
433
|
+
/** The logical path of the field that identifies a record. */
|
|
434
|
+
identity: string;
|
|
435
|
+
/** The ways the model can be read page by page. */
|
|
436
|
+
paging: PagingMode[];
|
|
437
|
+
/** The deletion scope a query without one gets; absent when the model has none. */
|
|
438
|
+
defaultScope?: DeletionState;
|
|
439
|
+
/**
|
|
440
|
+
* Operators that name no field of their own: the system-field ones, such
|
|
441
|
+
* as `ID` or `TENANT_ID`, and `EXPRESSION`, whose expression names its
|
|
442
|
+
* fields, where the server allows expensive operators.
|
|
443
|
+
*/
|
|
444
|
+
rootOperators: FilterOperator[];
|
|
445
|
+
/** Model-wide full-text search; absent when the model offers none. */
|
|
446
|
+
search?: SearchDescriptor;
|
|
447
|
+
}
|
|
448
|
+
/** The fixed limits of an aggregation query. */
|
|
449
|
+
export interface AggregationLimitsDescriptor {
|
|
450
|
+
/** Most groups in `groupBy`. */
|
|
451
|
+
maxGroups: number;
|
|
452
|
+
/** Most metrics. */
|
|
453
|
+
maxMetrics: number;
|
|
454
|
+
/** Most elements an aggregation runs over. */
|
|
455
|
+
maxElements: number;
|
|
456
|
+
/** Largest `limit` on the result rows. */
|
|
457
|
+
maxLimit: number;
|
|
458
|
+
/** Deepest arithmetic expression. */
|
|
459
|
+
maxExpressionDepth: number;
|
|
460
|
+
/** Most nodes in one arithmetic expression. */
|
|
461
|
+
maxExpressionNodes: number;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* The effective limits of the entry the descriptor was read from: the
|
|
465
|
+
* protocol's and the entry's budget, whichever is smaller. `null` is
|
|
466
|
+
* unlimited.
|
|
467
|
+
*/
|
|
468
|
+
export interface LimitsDescriptor {
|
|
469
|
+
/** Largest `limit` of a list query. */
|
|
470
|
+
maxListSize: number | null;
|
|
471
|
+
/** The `limit` a list query without one gets. */
|
|
472
|
+
defaultListSize: number | null;
|
|
473
|
+
/** Largest page `size` of a paged or cursor query. */
|
|
474
|
+
maxPageSize: number | null;
|
|
475
|
+
/** How far a paged query may reach: page index times size. */
|
|
476
|
+
maxPageWindow: number | null;
|
|
477
|
+
/** Most nodes in one filter. */
|
|
478
|
+
maxFilterNodes: number | null;
|
|
479
|
+
/** Most values in one filter, `IN` lists included. */
|
|
480
|
+
maxFilterValues: number | null;
|
|
481
|
+
/** Most fields in one sort. */
|
|
482
|
+
maxSortFields: number;
|
|
483
|
+
/** The limits of an aggregation query. */
|
|
484
|
+
aggregation: AggregationLimitsDescriptor;
|
|
485
|
+
}
|
|
486
|
+
/** The metrics a `having` clause may test. */
|
|
487
|
+
export interface HavingDescriptor {
|
|
488
|
+
/** The metric types it may name; never `ANY`, `FIRST` or `LAST`. */
|
|
489
|
+
metrics: (AggregationMetricType | (string & {}))[];
|
|
490
|
+
}
|
|
491
|
+
/** What an aggregation's result rows may be sorted by. */
|
|
492
|
+
export interface AnalysisSortDescriptor {
|
|
493
|
+
/** By a group. */
|
|
494
|
+
groups: boolean;
|
|
495
|
+
/** By a metric. */
|
|
496
|
+
metrics: boolean;
|
|
497
|
+
}
|
|
498
|
+
/** The aggregation features the model offers. */
|
|
499
|
+
export interface AnalysisDescriptor {
|
|
500
|
+
/** The metric types it admits. */
|
|
501
|
+
metrics: (AggregationMetricType | (string & {}))[];
|
|
502
|
+
/**
|
|
503
|
+
* The metric types among `metrics` whose results this backend estimates
|
|
504
|
+
* rather than computes exactly, such as `PERCENTILE` on MongoDB, or
|
|
505
|
+
* `DISTINCT_COUNT` and `PERCENTILE` on Elasticsearch; empty when every
|
|
506
|
+
* result is exact. The set is open, like `metrics`: label a result of a
|
|
507
|
+
* listed type as approximate.
|
|
508
|
+
*/
|
|
509
|
+
approximate: (AggregationMetricType | (string & {}))[];
|
|
510
|
+
/**
|
|
511
|
+
* Whether computed expressions (arithmetic and `DATE_DIFF`) may feed
|
|
512
|
+
* metrics and TERMS / HISTOGRAM groups, and be compared by an `EXPRESSION`
|
|
513
|
+
* filter. A `DATE_DIFF` operand is any field whose `aggregate.groups`
|
|
514
|
+
* lists `DATE_HISTOGRAM`.
|
|
515
|
+
*/
|
|
516
|
+
expressions: boolean;
|
|
517
|
+
/** What `having` may test. */
|
|
518
|
+
having: HavingDescriptor;
|
|
519
|
+
/** What result rows may be sorted by. */
|
|
520
|
+
sort: AnalysisSortDescriptor;
|
|
521
|
+
/**
|
|
522
|
+
* Whether a date histogram or a date part group may fill its empty
|
|
523
|
+
* buckets (`dense`).
|
|
524
|
+
*/
|
|
525
|
+
dense: boolean;
|
|
526
|
+
/** The calendar units a `DATE_HISTOGRAM` group may bucket by. */
|
|
527
|
+
dateUnits: AggregationDateUnit[];
|
|
528
|
+
/** The calendar parts a `DATE_PART` group may group by. */
|
|
529
|
+
dateParts: AggregationDatePart[];
|
|
530
|
+
/** The units a `DATE_DIFF` may measure in; empty when `expressions` is `false`. */
|
|
531
|
+
dateDiffUnits: DateDiffUnit[];
|
|
532
|
+
/**
|
|
533
|
+
* The field `FIRST` and `LAST` order by when they name no `orderBy`, at
|
|
534
|
+
* the record level: the model's event time. Absent when the model has no
|
|
535
|
+
* event time or the storage offers no `FIRST` / `LAST`. An explicit
|
|
536
|
+
* `orderBy` may be any single-valued field whose `sort.paged` is `true` in
|
|
537
|
+
* the metric's scope.
|
|
538
|
+
*/
|
|
539
|
+
firstLastOrderBy?: string;
|
|
540
|
+
}
|
|
541
|
+
/** A rule about combinations that no single capability shows. */
|
|
542
|
+
export interface ConstraintDescriptor {
|
|
543
|
+
/** Which rule; see {@link QueryConstraintTypes}. */
|
|
544
|
+
type: QueryConstraintType;
|
|
545
|
+
/** For `CURSOR_UNIQUE_SORT`, the field the server appends to the sort. */
|
|
546
|
+
appended?: string;
|
|
547
|
+
/**
|
|
548
|
+
* The fields the rule is about, when it names several: for
|
|
549
|
+
* `PARALLEL_ARRAY_SORT`, the array fields a sort may name only one of;
|
|
550
|
+
* for `NULL_OR_EMPTY_AS_MISSING`, the fields whose `null` or empty value
|
|
551
|
+
* reads as missing.
|
|
552
|
+
*/
|
|
553
|
+
fields?: string[];
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* One variant of an element: the value of its discriminator and the fields
|
|
557
|
+
* that variant has. For an event stream, one event type and its payload
|
|
558
|
+
* fields.
|
|
559
|
+
*/
|
|
560
|
+
export interface VariantDescriptor {
|
|
561
|
+
/** The discriminator's value, such as the event's `bodyType`. */
|
|
562
|
+
value: string;
|
|
563
|
+
/**
|
|
564
|
+
* The variant's fields, by paths relative to the element, such as
|
|
565
|
+
* `body.added.productId` inside `body`. Each field states the variant's
|
|
566
|
+
* own types; its operators, sorts and aggregation are those of the shared
|
|
567
|
+
* logical path, which admission checks. A field's `scope` is relative to
|
|
568
|
+
* the element too, and absent for a field directly in it.
|
|
569
|
+
*/
|
|
570
|
+
fields: FieldDescriptor[];
|
|
571
|
+
/** What the variant means, when the model describes it. */
|
|
572
|
+
description?: string;
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* An element of every record whose fields differ by variant: an event
|
|
576
|
+
* stream record's `body` holds events whose payload fields depend on
|
|
577
|
+
* `bodyType`. A condition on one variant's field goes inside an
|
|
578
|
+
* `ELEMENT_MATCH` on `element`, together with a condition on the
|
|
579
|
+
* `discriminator`, so both hold for the same element.
|
|
580
|
+
*/
|
|
581
|
+
export interface VariantsDescriptor {
|
|
582
|
+
/** The element's logical path, such as `body`. */
|
|
583
|
+
element: string;
|
|
584
|
+
/** The element-relative field that names each element's variant, such as `bodyType`. */
|
|
585
|
+
discriminator: string;
|
|
586
|
+
/** Each variant, sorted by `value`. */
|
|
587
|
+
values: VariantDescriptor[];
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* How a query model can be queried over HTTP: the answer
|
|
591
|
+
* `GET {aggregate}/snapshot/schema` and `GET {aggregate}/event/schema` give.
|
|
592
|
+
* Read it with `QueryDescriptorClient`.
|
|
593
|
+
*
|
|
594
|
+
* The contract: every operator, sort, paging mode, group and function it
|
|
595
|
+
* lists is admitted when used on its own, and anything it does not list is
|
|
596
|
+
* rejected; `constraints` names the rules about combinations. A value, a
|
|
597
|
+
* scope or a policy can still reject a query, with a
|
|
598
|
+
* `QueryViolation`. It exposes no storage names and does not depend on
|
|
599
|
+
* the caller, so it can be cached: `version` is a hash of its content and is
|
|
600
|
+
* also the response's ETag.
|
|
601
|
+
*/
|
|
602
|
+
export interface QueryModelDescriptor {
|
|
603
|
+
/** The query model it describes. */
|
|
604
|
+
model: QueryModel;
|
|
605
|
+
/** `sha256:` and the hash of its content; also the ETag, quoted. */
|
|
606
|
+
version: string;
|
|
607
|
+
/** The server's default time zone, used when a request names none. */
|
|
608
|
+
timeZone: string;
|
|
609
|
+
/** What holds for the records as a whole. */
|
|
610
|
+
record: RecordDescriptor;
|
|
611
|
+
/** The entry's effective limits. */
|
|
612
|
+
limits: LimitsDescriptor;
|
|
613
|
+
/** The aggregation features. */
|
|
614
|
+
analysis: AnalysisDescriptor;
|
|
615
|
+
/** Every queryable field, those inside elements included (see `scope`). */
|
|
616
|
+
fields: FieldDescriptor[];
|
|
617
|
+
/** The array fields whose elements can be queried one by one. */
|
|
618
|
+
elements: ElementDescriptor[];
|
|
619
|
+
/** Fields under dynamic map keys. */
|
|
620
|
+
dynamic: DynamicFieldDescriptor[];
|
|
621
|
+
/** The rules about combinations. */
|
|
622
|
+
constraints: ConstraintDescriptor[];
|
|
623
|
+
/**
|
|
624
|
+
* The variants of an element whose fields differ by a discriminator, such
|
|
625
|
+
* as an event stream's event types; absent when the model has none, as a
|
|
626
|
+
* snapshot model never does.
|
|
627
|
+
*/
|
|
628
|
+
variants?: VariantsDescriptor;
|
|
629
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/dsl/descriptor.ts
|
|
2
|
+
var e = Object.freeze({
|
|
3
|
+
SNAPSHOT: "SNAPSHOT",
|
|
4
|
+
EVENT_STREAM: "EVENT_STREAM"
|
|
5
|
+
}), t = Object.freeze({
|
|
6
|
+
STRING: "STRING",
|
|
7
|
+
INTEGER: "INTEGER",
|
|
8
|
+
DECIMAL: "DECIMAL",
|
|
9
|
+
BOOLEAN: "BOOLEAN",
|
|
10
|
+
OBJECT: "OBJECT"
|
|
11
|
+
}), n = /* @__PURE__ */ function(e) {
|
|
12
|
+
return e.UNKNOWN = "UNKNOWN", e.NULL = "NULL", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.ARRAY = "ARRAY", e.UNION = "UNION", e;
|
|
13
|
+
}({}), r = /* @__PURE__ */ function(e) {
|
|
14
|
+
return e.LIST = "LIST", e.PAGED = "PAGED", e.CURSOR = "CURSOR", e;
|
|
15
|
+
}({}), i = Object.freeze({
|
|
16
|
+
IDENTITY: "IDENTITY",
|
|
17
|
+
AGGREGATE_ID: "AGGREGATE_ID",
|
|
18
|
+
TENANT_ID: "TENANT_ID",
|
|
19
|
+
OWNER_ID: "OWNER_ID",
|
|
20
|
+
SPACE_ID: "SPACE_ID",
|
|
21
|
+
DELETED: "DELETED",
|
|
22
|
+
EVENT_TIME: "EVENT_TIME",
|
|
23
|
+
FIRST_EVENT_TIME: "FIRST_EVENT_TIME"
|
|
24
|
+
}), a = Object.freeze({
|
|
25
|
+
CURSOR_UNIQUE_SORT: "CURSOR_UNIQUE_SORT",
|
|
26
|
+
COUNT_REQUIRES_FILTER: "COUNT_REQUIRES_FILTER",
|
|
27
|
+
STARTS_WITH_REQUIRES_PREFIX: "STARTS_WITH_REQUIRES_PREFIX",
|
|
28
|
+
PARALLEL_ARRAY_SORT: "PARALLEL_ARRAY_SORT",
|
|
29
|
+
NULL_OR_EMPTY_AS_MISSING: "NULL_OR_EMPTY_AS_MISSING",
|
|
30
|
+
ARRAY_EQUALITY: "ARRAY_EQUALITY"
|
|
31
|
+
}), o = /* @__PURE__ */ function(e) {
|
|
32
|
+
return e.DISPLAY = "DISPLAY", e.CONFIDENTIAL = "CONFIDENTIAL", e;
|
|
33
|
+
}({});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { r as PagingMode, a as QueryConstraintTypes, i as QueryFieldRoles, e as QueryModels, n as QueryValueKind, t as QueryValueTypes, o as SensitivityLevel };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=descriptor.es.js.map
|