@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,608 @@
|
|
|
1
|
+
import { ElementFilterExpression, FilterExpression, QueryField, ExpressionFilter } from '../filter/index.js';
|
|
2
|
+
import { FieldSort } from '../sort.js';
|
|
3
|
+
/** The kind of an {@link AggregationGroup}, sent as its `type`. */
|
|
4
|
+
export declare enum AggregationGroupType {
|
|
5
|
+
/** One group per distinct value; {@link aggregation.terms}. */
|
|
6
|
+
TERMS = "TERMS",
|
|
7
|
+
/** Number buckets of equal width; {@link aggregation.histogram}. */
|
|
8
|
+
HISTOGRAM = "HISTOGRAM",
|
|
9
|
+
/** Calendar buckets of a time field; {@link aggregation.dateHistogram}. */
|
|
10
|
+
DATE_HISTOGRAM = "DATE_HISTOGRAM",
|
|
11
|
+
/**
|
|
12
|
+
* One calendar part of a time field, such as the weekday or the hour;
|
|
13
|
+
* {@link aggregation.datePart}. Wow 9.2 and later.
|
|
14
|
+
*/
|
|
15
|
+
DATE_PART = "DATE_PART"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The kind of an {@link AggregationMetric}, sent as its `type`. Wow 8.12
|
|
19
|
+
* knows `COUNT` and `NUMERIC`, Wow 9.0 adds `ANY`, and the other three need
|
|
20
|
+
* Wow 9.1.
|
|
21
|
+
*/
|
|
22
|
+
export declare enum AggregationMetricType {
|
|
23
|
+
/** The number of rows; {@link aggregation.count}. */
|
|
24
|
+
COUNT = "COUNT",
|
|
25
|
+
/**
|
|
26
|
+
* An {@link AggregationFunction} of an expression; {@link aggregation.sum}
|
|
27
|
+
* and its siblings.
|
|
28
|
+
*/
|
|
29
|
+
NUMERIC = "NUMERIC",
|
|
30
|
+
/** Any one value of a field; {@link aggregation.any}. Wow 9.0 and later. */
|
|
31
|
+
ANY = "ANY",
|
|
32
|
+
/**
|
|
33
|
+
* The number of distinct values; {@link aggregation.distinctCount}. Wow 9.1
|
|
34
|
+
* and later.
|
|
35
|
+
*/
|
|
36
|
+
DISTINCT_COUNT = "DISTINCT_COUNT",
|
|
37
|
+
/**
|
|
38
|
+
* A percentile of an expression; {@link aggregation.percentile}. Wow 9.1
|
|
39
|
+
* and later.
|
|
40
|
+
*/
|
|
41
|
+
PERCENTILE = "PERCENTILE",
|
|
42
|
+
/**
|
|
43
|
+
* Arithmetic over other metrics; {@link aggregation.derived}. Wow 9.1 and
|
|
44
|
+
* later.
|
|
45
|
+
*/
|
|
46
|
+
DERIVED = "DERIVED",
|
|
47
|
+
/**
|
|
48
|
+
* A field's value on the group's earliest record; {@link aggregation.first}.
|
|
49
|
+
* Wow 9.2 and later.
|
|
50
|
+
*/
|
|
51
|
+
FIRST = "FIRST",
|
|
52
|
+
/**
|
|
53
|
+
* A field's value on the group's latest record; {@link aggregation.last}.
|
|
54
|
+
* Wow 9.2 and later.
|
|
55
|
+
*/
|
|
56
|
+
LAST = "LAST"
|
|
57
|
+
}
|
|
58
|
+
/** The kind of an {@link AggregationExpression} node, sent as its `type`. */
|
|
59
|
+
export declare enum AggregationExpressionType {
|
|
60
|
+
/** The value of a field; {@link aggregation.field}. */
|
|
61
|
+
FIELD = "FIELD",
|
|
62
|
+
/** A number; {@link aggregation.constant}. */
|
|
63
|
+
CONSTANT = "CONSTANT",
|
|
64
|
+
/** Two operands and an {@link AggregationExpressionOperator}. */
|
|
65
|
+
BINARY = "BINARY",
|
|
66
|
+
/**
|
|
67
|
+
* The time elapsed between two time fields; {@link aggregation.dateDiff}.
|
|
68
|
+
* Wow 9.2 and later.
|
|
69
|
+
*/
|
|
70
|
+
DATE_DIFF = "DATE_DIFF"
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The unit a `DATE_DIFF` measures elapsed time in. Each has a fixed length:
|
|
74
|
+
* a `DAY` is exactly 24 hours, and months and years, whose length depends on
|
|
75
|
+
* a calendar and a time zone, are not offered.
|
|
76
|
+
*/
|
|
77
|
+
export declare enum DateDiffUnit {
|
|
78
|
+
SECOND = "SECOND",
|
|
79
|
+
MINUTE = "MINUTE",
|
|
80
|
+
HOUR = "HOUR",
|
|
81
|
+
DAY = "DAY"
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The arithmetic of a `BINARY` node, in an {@link AggregationExpression} or a
|
|
85
|
+
* {@link DerivedExpression}.
|
|
86
|
+
*/
|
|
87
|
+
export declare enum AggregationExpressionOperator {
|
|
88
|
+
/** `left + right` */
|
|
89
|
+
ADD = "ADD",
|
|
90
|
+
/** `left - right` */
|
|
91
|
+
SUBTRACT = "SUBTRACT",
|
|
92
|
+
/** `left * right` */
|
|
93
|
+
MULTIPLY = "MULTIPLY",
|
|
94
|
+
/** `left / right` */
|
|
95
|
+
DIVIDE = "DIVIDE"
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The calendar unit of a `DATE_HISTOGRAM` bucket, cut in the group's
|
|
99
|
+
* `timeZone`.
|
|
100
|
+
*/
|
|
101
|
+
export declare enum AggregationDateUnit {
|
|
102
|
+
YEAR = "YEAR",
|
|
103
|
+
QUARTER = "QUARTER",
|
|
104
|
+
MONTH = "MONTH",
|
|
105
|
+
WEEK = "WEEK",
|
|
106
|
+
DAY = "DAY",
|
|
107
|
+
HOUR = "HOUR",
|
|
108
|
+
MINUTE = "MINUTE",
|
|
109
|
+
SECOND = "SECOND"
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The calendar part a `DATE_PART` group takes of each instant, read in the
|
|
113
|
+
* group's `timeZone`. Its keys are integers from a fixed domain, so records
|
|
114
|
+
* from different days, weeks or years fall into one bucket.
|
|
115
|
+
*/
|
|
116
|
+
export declare enum AggregationDatePart {
|
|
117
|
+
/** The ISO weekday: 1 is Monday, 7 is Sunday. */
|
|
118
|
+
DAY_OF_WEEK = "DAY_OF_WEEK",
|
|
119
|
+
/**
|
|
120
|
+
* The day of the month, 1 to 31; days 29 to 31 exist only in the months
|
|
121
|
+
* that have them.
|
|
122
|
+
*/
|
|
123
|
+
DAY_OF_MONTH = "DAY_OF_MONTH",
|
|
124
|
+
/** The hour on the wall clock of the group's `timeZone`, 0 to 23. */
|
|
125
|
+
HOUR_OF_DAY = "HOUR_OF_DAY",
|
|
126
|
+
/** The month of the year, 1 (January) to 12. */
|
|
127
|
+
MONTH_OF_YEAR = "MONTH_OF_YEAR"
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* What a `NUMERIC` metric computes over its expression; each has a builder,
|
|
131
|
+
* {@link aggregation.sum} through {@link aggregation.variance}.
|
|
132
|
+
*/
|
|
133
|
+
export declare enum AggregationFunction {
|
|
134
|
+
/** The sum */
|
|
135
|
+
SUM = "SUM",
|
|
136
|
+
/** The average */
|
|
137
|
+
AVG = "AVG",
|
|
138
|
+
/** The least value */
|
|
139
|
+
MIN = "MIN",
|
|
140
|
+
/** The greatest value */
|
|
141
|
+
MAX = "MAX",
|
|
142
|
+
/** The standard deviation */
|
|
143
|
+
STDDEV = "STDDEV",
|
|
144
|
+
/** The variance */
|
|
145
|
+
VARIANCE = "VARIANCE"
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* An array field whose elements the query aggregates over instead of the
|
|
149
|
+
* root documents; build it with {@link aggregation.element}. A query takes at
|
|
150
|
+
* most `AGGREGATION_LIMITS.MAX_ELEMENTS` of them.
|
|
151
|
+
*/
|
|
152
|
+
export interface AggregationElement {
|
|
153
|
+
/** The array field, a query field path. */
|
|
154
|
+
path: QueryField;
|
|
155
|
+
/**
|
|
156
|
+
* Keeps only the elements that match; no root filters and no search, but
|
|
157
|
+
* an `EXPRESSION` filter may compare an element's computed value.
|
|
158
|
+
*/
|
|
159
|
+
filter?: ElementFilterExpression | ExpressionFilter;
|
|
160
|
+
}
|
|
161
|
+
/** What every {@link AggregationGroup} has. */
|
|
162
|
+
interface AggregationGroupBase<FIELDS extends string = string> {
|
|
163
|
+
/** The field the rows are grouped by. */
|
|
164
|
+
field: QueryField<FIELDS>;
|
|
165
|
+
/** The name of the group's column in the result rows. */
|
|
166
|
+
alias: string;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* What a TERMS or HISTOGRAM group groups by: a field, or a computed
|
|
170
|
+
* expression in its place (Wow 9.2 and later), never both. An expression
|
|
171
|
+
* input is an expensive computation the server admits only where
|
|
172
|
+
* `analysis.expressions` is `true`.
|
|
173
|
+
*/
|
|
174
|
+
export type AggregationGroupInput<FIELDS extends string = string> = {
|
|
175
|
+
/** The field the rows are grouped by. */
|
|
176
|
+
field: QueryField<FIELDS>;
|
|
177
|
+
expression?: undefined;
|
|
178
|
+
} | {
|
|
179
|
+
field?: undefined;
|
|
180
|
+
/** The per-row value the rows are grouped by, such as a `DATE_DIFF`. */
|
|
181
|
+
expression: AggregationExpression<FIELDS>;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* One group per distinct value of a field, or of an expression;
|
|
185
|
+
* {@link aggregation.terms}. `missingKey` needs a field.
|
|
186
|
+
*/
|
|
187
|
+
export type TermsAggregationGroup<FIELDS extends string = string> = {
|
|
188
|
+
type: AggregationGroupType.TERMS;
|
|
189
|
+
/** The name of the group's column in the result rows. */
|
|
190
|
+
alias: string;
|
|
191
|
+
/** The key the rows without a value are grouped under. Wow 9.1 and later. */
|
|
192
|
+
missingKey?: string;
|
|
193
|
+
} & AggregationGroupInput<FIELDS>;
|
|
194
|
+
/**
|
|
195
|
+
* Buckets of equal width over a number field, or over an expression;
|
|
196
|
+
* {@link aggregation.histogram}.
|
|
197
|
+
*/
|
|
198
|
+
export type HistogramAggregationGroup<FIELDS extends string = string> = {
|
|
199
|
+
type: AggregationGroupType.HISTOGRAM;
|
|
200
|
+
/** The name of the group's column in the result rows. */
|
|
201
|
+
alias: string;
|
|
202
|
+
/** The width of each bucket, greater than 0. */
|
|
203
|
+
interval: number;
|
|
204
|
+
} & AggregationGroupInput<FIELDS>;
|
|
205
|
+
/**
|
|
206
|
+
* Calendar buckets over a time field in epoch milliseconds;
|
|
207
|
+
* {@link aggregation.dateHistogram}.
|
|
208
|
+
*/
|
|
209
|
+
export interface DateHistogramAggregationGroup<FIELDS extends string = string> extends AggregationGroupBase<FIELDS> {
|
|
210
|
+
type: AggregationGroupType.DATE_HISTOGRAM;
|
|
211
|
+
/** The calendar unit of each bucket. */
|
|
212
|
+
unit: AggregationDateUnit;
|
|
213
|
+
/** The IANA zone the buckets are cut in; `UTC` when absent. */
|
|
214
|
+
timeZone?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Whether the server fills in the empty buckets of the range. Wow 9.1 and
|
|
217
|
+
* later, and only when this is the query's only group.
|
|
218
|
+
*/
|
|
219
|
+
dense?: boolean;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* One calendar part of a time field in epoch milliseconds, such as the
|
|
223
|
+
* weekday or the hour; {@link aggregation.datePart}. Its keys in the result
|
|
224
|
+
* rows are integers from the part's domain, such as 1 (Monday) to 7 (Sunday)
|
|
225
|
+
* for `DAY_OF_WEEK`. Wow 9.2 and later.
|
|
226
|
+
*/
|
|
227
|
+
export interface DatePartAggregationGroup<FIELDS extends string = string> extends AggregationGroupBase<FIELDS> {
|
|
228
|
+
type: AggregationGroupType.DATE_PART;
|
|
229
|
+
/** The calendar part each row is grouped by. */
|
|
230
|
+
part: AggregationDatePart;
|
|
231
|
+
/** The IANA zone the part is read in; `UTC` when absent. */
|
|
232
|
+
timeZone?: string;
|
|
233
|
+
/**
|
|
234
|
+
* Whether the server returns every key of the part's domain, filling a
|
|
235
|
+
* key with no records with each metric's empty value. Only when this is
|
|
236
|
+
* the query's only group.
|
|
237
|
+
*/
|
|
238
|
+
dense?: boolean;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* One dimension of an {@link AggregationQuery}'s `groupBy`: each result row
|
|
242
|
+
* is one combination of the groups' keys.
|
|
243
|
+
*/
|
|
244
|
+
export type AggregationGroup<FIELDS extends string = string> = TermsAggregationGroup<FIELDS> | HistogramAggregationGroup<FIELDS> | DateHistogramAggregationGroup<FIELDS> | DatePartAggregationGroup<FIELDS>;
|
|
245
|
+
/** The value of a field, as an operand; {@link aggregation.field}. */
|
|
246
|
+
export interface FieldAggregationExpression<FIELDS extends string = string> {
|
|
247
|
+
type: AggregationExpressionType.FIELD;
|
|
248
|
+
/** The field, a query field path. */
|
|
249
|
+
field: QueryField<FIELDS>;
|
|
250
|
+
}
|
|
251
|
+
/** A number, as an operand; {@link aggregation.constant}. */
|
|
252
|
+
export interface ConstantAggregationExpression {
|
|
253
|
+
type: AggregationExpressionType.CONSTANT;
|
|
254
|
+
/** A finite number. */
|
|
255
|
+
value: number;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* `left operator right`; {@link aggregation.add}, {@link aggregation.subtract},
|
|
259
|
+
* {@link aggregation.multiply}, {@link aggregation.divide}.
|
|
260
|
+
*/
|
|
261
|
+
export interface BinaryAggregationExpression<FIELDS extends string = string> {
|
|
262
|
+
type: AggregationExpressionType.BINARY;
|
|
263
|
+
/** The arithmetic. */
|
|
264
|
+
operator: AggregationExpressionOperator;
|
|
265
|
+
/** The left operand. */
|
|
266
|
+
left: AggregationExpression<FIELDS>;
|
|
267
|
+
/** The right operand. */
|
|
268
|
+
right: AggregationExpression<FIELDS>;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* The time from the instant in `from` to the instant in `to`, `to − from`,
|
|
272
|
+
* in `unit`, as a signed decimal: negative when `to` is earlier, and no
|
|
273
|
+
* value when either is absent. Both are single-valued time fields (their
|
|
274
|
+
* `aggregate.groups` list `DATE_HISTOGRAM`), each read in its own encoding;
|
|
275
|
+
* {@link aggregation.dateDiff}. Wow 9.2 and later.
|
|
276
|
+
*/
|
|
277
|
+
export interface DateDiffAggregationExpression<FIELDS extends string = string> {
|
|
278
|
+
type: AggregationExpressionType.DATE_DIFF;
|
|
279
|
+
/** The earlier instant, when the difference is positive. */
|
|
280
|
+
from: QueryField<FIELDS>;
|
|
281
|
+
/** The later instant, when the difference is positive. */
|
|
282
|
+
to: QueryField<FIELDS>;
|
|
283
|
+
/** The unit the difference is measured in. */
|
|
284
|
+
unit: DateDiffUnit;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Per-row arithmetic over fields, time differences and numbers, which a
|
|
288
|
+
* metric aggregates, a TERMS or HISTOGRAM group groups by, and an
|
|
289
|
+
* `EXPRESSION` filter compares. A tree at most
|
|
290
|
+
* `AGGREGATION_LIMITS.MAX_EXPRESSION_DEPTH` deep and `MAX_EXPRESSION_NODES`
|
|
291
|
+
* large, counted over a query's metrics together and over each group or
|
|
292
|
+
* filter on its own.
|
|
293
|
+
*/
|
|
294
|
+
export type AggregationExpression<FIELDS extends string = string> = FieldAggregationExpression<FIELDS> | ConstantAggregationExpression | BinaryAggregationExpression<FIELDS> | DateDiffAggregationExpression<FIELDS>;
|
|
295
|
+
/** The number of rows in each group; {@link aggregation.count}. */
|
|
296
|
+
export interface CountAggregationMetric<FIELDS extends string = string> {
|
|
297
|
+
/** Counts only the rows that match. Wow 9.1 and later. */
|
|
298
|
+
filter?: FilterExpression<FIELDS>;
|
|
299
|
+
type: AggregationMetricType.COUNT;
|
|
300
|
+
/** The name of the metric's column in the result rows. */
|
|
301
|
+
alias: string;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* An {@link AggregationFunction} of an expression; {@link aggregation.sum},
|
|
305
|
+
* `avg`, `min`, `max`, `stddev`, `variance`.
|
|
306
|
+
*/
|
|
307
|
+
export interface NumericAggregationMetric<FIELDS extends string = string> {
|
|
308
|
+
/** Aggregates only the rows that match. Wow 9.1 and later. */
|
|
309
|
+
filter?: FilterExpression<FIELDS>;
|
|
310
|
+
type: AggregationMetricType.NUMERIC;
|
|
311
|
+
/** What is computed. */
|
|
312
|
+
function: AggregationFunction;
|
|
313
|
+
/** The per-row value it is computed over. */
|
|
314
|
+
expression: AggregationExpression<FIELDS>;
|
|
315
|
+
/** The name of the metric's column in the result rows. */
|
|
316
|
+
alias: string;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Any one value of a field within each group, of any type;
|
|
320
|
+
* {@link aggregation.any}. Wow 9.0 and later. Neither a derived metric nor
|
|
321
|
+
* `having` may refer to it.
|
|
322
|
+
*/
|
|
323
|
+
export interface AnyAggregationMetric<FIELDS extends string = string> {
|
|
324
|
+
/** Aggregates only the rows that match. Wow 9.1 and later. */
|
|
325
|
+
filter?: FilterExpression<FIELDS>;
|
|
326
|
+
type: AggregationMetricType.ANY;
|
|
327
|
+
/** The field whose value is taken. */
|
|
328
|
+
field: QueryField<FIELDS>;
|
|
329
|
+
/** The name of the metric's column in the result rows. */
|
|
330
|
+
alias: string;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* A field's value on the earliest (`FIRST`) or latest (`LAST`) record of
|
|
334
|
+
* each group, ordered by `orderBy`; {@link aggregation.first} and
|
|
335
|
+
* {@link aggregation.last}. Wow 9.2 and later.
|
|
336
|
+
*
|
|
337
|
+
* The value comes back in the field's own type, not as a number, and is
|
|
338
|
+
* `null` when no record of the group has both a value and an `orderBy`
|
|
339
|
+
* position. Without `orderBy` the server orders by the model's event time,
|
|
340
|
+
* the field the descriptor names as `analysis.firstLastOrderBy`. Records
|
|
341
|
+
* tied on `orderBy` may yield any one of their values. Like `ANY`, neither a
|
|
342
|
+
* derived metric nor `having` may refer to it.
|
|
343
|
+
*/
|
|
344
|
+
export interface EdgeAggregationMetric<FIELDS extends string = string> {
|
|
345
|
+
type: AggregationMetricType.FIRST | AggregationMetricType.LAST;
|
|
346
|
+
/** The single-valued field whose value is taken. */
|
|
347
|
+
field: QueryField<FIELDS>;
|
|
348
|
+
/**
|
|
349
|
+
* The single-valued, sortable field that orders the records; the model's
|
|
350
|
+
* event time when absent.
|
|
351
|
+
*/
|
|
352
|
+
orderBy?: QueryField<FIELDS>;
|
|
353
|
+
/** The name of the metric's column in the result rows. */
|
|
354
|
+
alias: string;
|
|
355
|
+
/** Aggregates only the rows that match. */
|
|
356
|
+
filter?: FilterExpression<FIELDS>;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* The number of distinct values of an expression;
|
|
360
|
+
* {@link aggregation.distinctCount}. Wow 9.1 and later.
|
|
361
|
+
*/
|
|
362
|
+
export interface DistinctCountAggregationMetric<FIELDS extends string = string> {
|
|
363
|
+
type: AggregationMetricType.DISTINCT_COUNT;
|
|
364
|
+
/** The per-row value whose distinct values are counted. */
|
|
365
|
+
expression: AggregationExpression<FIELDS>;
|
|
366
|
+
/** The name of the metric's column in the result rows. */
|
|
367
|
+
alias: string;
|
|
368
|
+
/** Aggregates only the rows that match. */
|
|
369
|
+
filter?: FilterExpression<FIELDS>;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* A percentile of an expression; {@link aggregation.percentile}. Wow 9.1 and
|
|
373
|
+
* later.
|
|
374
|
+
*/
|
|
375
|
+
export interface PercentileAggregationMetric<FIELDS extends string = string> {
|
|
376
|
+
type: AggregationMetricType.PERCENTILE;
|
|
377
|
+
/** The per-row value the percentile is taken over. */
|
|
378
|
+
expression: AggregationExpression<FIELDS>;
|
|
379
|
+
/** Which percentile, within (0, 100). */
|
|
380
|
+
percentile: number;
|
|
381
|
+
/** The name of the metric's column in the result rows. */
|
|
382
|
+
alias: string;
|
|
383
|
+
/** Aggregates only the rows that match. */
|
|
384
|
+
filter?: FilterExpression<FIELDS>;
|
|
385
|
+
}
|
|
386
|
+
/** The kind of a {@link DerivedExpression} node, sent as its `type`. */
|
|
387
|
+
export declare enum DerivedExpressionType {
|
|
388
|
+
/** The value of another metric of the row, by its alias. */
|
|
389
|
+
METRIC_REF = "METRIC_REF",
|
|
390
|
+
/** A number. */
|
|
391
|
+
CONSTANT = "CONSTANT",
|
|
392
|
+
/** Two operands and an {@link AggregationExpressionOperator}. */
|
|
393
|
+
BINARY = "BINARY"
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Post-aggregation arithmetic; references must name earlier metrics that are
|
|
397
|
+
* not `ANY`, `FIRST` or `LAST`.
|
|
398
|
+
*/
|
|
399
|
+
export type DerivedExpression = {
|
|
400
|
+
type: DerivedExpressionType.METRIC_REF;
|
|
401
|
+
metric: string;
|
|
402
|
+
} | {
|
|
403
|
+
type: DerivedExpressionType.CONSTANT;
|
|
404
|
+
value: number;
|
|
405
|
+
} | {
|
|
406
|
+
type: DerivedExpressionType.BINARY;
|
|
407
|
+
operator: AggregationExpressionOperator;
|
|
408
|
+
left: DerivedExpression;
|
|
409
|
+
right: DerivedExpression;
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* A metric computed from metrics declared before it in the same query, after
|
|
413
|
+
* aggregation; {@link aggregation.derived}. Wow 9.1 and later.
|
|
414
|
+
*/
|
|
415
|
+
export interface DerivedAggregationMetric {
|
|
416
|
+
type: AggregationMetricType.DERIVED;
|
|
417
|
+
/** The arithmetic over the other metrics. */
|
|
418
|
+
expression: DerivedExpression;
|
|
419
|
+
/** The name of the metric's column in the result rows. */
|
|
420
|
+
alias: string;
|
|
421
|
+
}
|
|
422
|
+
/** The kind of a {@link HavingExpression} node, sent as its `type`. */
|
|
423
|
+
export declare enum HavingExpressionType {
|
|
424
|
+
/** A metric compared with a number; `aggregation.having.eq` … `lte`. */
|
|
425
|
+
CONDITION = "CONDITION",
|
|
426
|
+
/** A metric within bounds, inclusive; `aggregation.having.between`. */
|
|
427
|
+
BETWEEN = "BETWEEN",
|
|
428
|
+
/** A metric equal to one of the numbers; `aggregation.having.isIn`. */
|
|
429
|
+
IN = "IN",
|
|
430
|
+
/**
|
|
431
|
+
* A metric without a value, or with one when `negated`;
|
|
432
|
+
* `aggregation.having.isNull`, `isNotNull`.
|
|
433
|
+
*/
|
|
434
|
+
IS_NULL = "IS_NULL",
|
|
435
|
+
/** All operands hold; `aggregation.having.and`. */
|
|
436
|
+
AND = "AND",
|
|
437
|
+
/** At least one operand holds; `aggregation.having.or`. */
|
|
438
|
+
OR = "OR"
|
|
439
|
+
}
|
|
440
|
+
/** The comparison of a `CONDITION` in a {@link HavingExpression}. */
|
|
441
|
+
export declare enum ComparisonOperator {
|
|
442
|
+
/** `=` */
|
|
443
|
+
EQ = "EQ",
|
|
444
|
+
/** `≠` */
|
|
445
|
+
NE = "NE",
|
|
446
|
+
/** `>` */
|
|
447
|
+
GT = "GT",
|
|
448
|
+
/** `≥` */
|
|
449
|
+
GTE = "GTE",
|
|
450
|
+
/** `<` */
|
|
451
|
+
LT = "LT",
|
|
452
|
+
/** `≤` */
|
|
453
|
+
LTE = "LTE"
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Filters grouped results by metric aliases, before sorting/limit; never an
|
|
457
|
+
* `ANY`, `FIRST` or `LAST` metric.
|
|
458
|
+
*/
|
|
459
|
+
export type HavingExpression = {
|
|
460
|
+
type: HavingExpressionType.CONDITION;
|
|
461
|
+
metric: string;
|
|
462
|
+
operator: ComparisonOperator;
|
|
463
|
+
value: number;
|
|
464
|
+
} | {
|
|
465
|
+
type: HavingExpressionType.BETWEEN;
|
|
466
|
+
metric: string;
|
|
467
|
+
lower: number;
|
|
468
|
+
upper: number;
|
|
469
|
+
} | {
|
|
470
|
+
type: HavingExpressionType.IN;
|
|
471
|
+
metric: string;
|
|
472
|
+
values: [number, ...number[]];
|
|
473
|
+
} | {
|
|
474
|
+
type: HavingExpressionType.IS_NULL;
|
|
475
|
+
metric: string;
|
|
476
|
+
negated?: boolean;
|
|
477
|
+
} | {
|
|
478
|
+
type: HavingExpressionType.AND | HavingExpressionType.OR;
|
|
479
|
+
operands: [HavingExpression, ...HavingExpression[]];
|
|
480
|
+
};
|
|
481
|
+
/**
|
|
482
|
+
* One column an {@link AggregationQuery} computes for each group; a query
|
|
483
|
+
* takes 1 to `AGGREGATION_LIMITS.MAX_METRICS` of them.
|
|
484
|
+
*/
|
|
485
|
+
export type AggregationMetric<FIELDS extends string = string> = CountAggregationMetric<FIELDS> | NumericAggregationMetric<FIELDS> | AnyAggregationMetric<FIELDS> | DistinctCountAggregationMetric<FIELDS> | PercentileAggregationMetric<FIELDS> | DerivedAggregationMetric | EdgeAggregationMetric<FIELDS>;
|
|
486
|
+
/**
|
|
487
|
+
* An aggregation request: which documents, grouped how, computing which
|
|
488
|
+
* metrics. `QueryApi.aggregate` and `aggregateStream` send it, and each
|
|
489
|
+
* result row holds the groups' and metrics' columns by alias. Assemble it
|
|
490
|
+
* with {@link aggregation.query}, which checks the rules Wow enforces across
|
|
491
|
+
* its parts before anything is sent.
|
|
492
|
+
*
|
|
493
|
+
* Wow 8.11 has no aggregation endpoint; Wow 8.12 added it with `COUNT` and
|
|
494
|
+
* `NUMERIC` metrics, and Wow 9.0 added `ANY`. `having`, the `DISTINCT_COUNT`,
|
|
495
|
+
* `PERCENTILE` and `DERIVED` metrics, metric filters, `missingKey` and `dense`
|
|
496
|
+
* need Wow 9.1.
|
|
497
|
+
*
|
|
498
|
+
* @template ROOT_FIELDS - The fields `filter` may name
|
|
499
|
+
* @template AGGREGATION_FIELDS - The fields groups and metrics may name
|
|
500
|
+
*/
|
|
501
|
+
export interface AggregationQuery<ROOT_FIELDS extends string = string, AGGREGATION_FIELDS extends string = ROOT_FIELDS> {
|
|
502
|
+
/** Which documents are aggregated; all of them when absent. */
|
|
503
|
+
filter?: FilterExpression<ROOT_FIELDS>;
|
|
504
|
+
/** Array fields to aggregate the elements of, instead of the documents. */
|
|
505
|
+
elements?: AggregationElement[];
|
|
506
|
+
/** The dimensions of the result; one row in total when absent or empty. */
|
|
507
|
+
groupBy?: AggregationGroup<AGGREGATION_FIELDS>[];
|
|
508
|
+
/** The columns computed for each group. */
|
|
509
|
+
metrics: [
|
|
510
|
+
AggregationMetric<AGGREGATION_FIELDS>,
|
|
511
|
+
...AggregationMetric<AGGREGATION_FIELDS>[]
|
|
512
|
+
];
|
|
513
|
+
/**
|
|
514
|
+
* The order of the rows, by group or metric alias; needs a `groupBy`. Wow
|
|
515
|
+
* then sorts by each remaining group ascending.
|
|
516
|
+
*/
|
|
517
|
+
sort?: FieldSort[];
|
|
518
|
+
/**
|
|
519
|
+
* The most rows returned, 1 to `AGGREGATION_LIMITS.MAX_LIMIT`; the
|
|
520
|
+
* server returns `DEFAULT_LIMIT` (100) when absent.
|
|
521
|
+
*/
|
|
522
|
+
limit?: number;
|
|
523
|
+
/**
|
|
524
|
+
* Keeps only the grouped rows whose metrics match, before `sort` and
|
|
525
|
+
* `limit`; built with {@link aggregation.having}. Needs a `groupBy`.
|
|
526
|
+
*/
|
|
527
|
+
having?: HavingExpression;
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* The options every metric builder takes after its target and alias.
|
|
531
|
+
*/
|
|
532
|
+
export interface AggregationMetricOptions<FIELDS extends string = string> {
|
|
533
|
+
/** Counts only the rows that match; sent as the metric's `filter`. */
|
|
534
|
+
filter?: FilterExpression<FIELDS>;
|
|
535
|
+
}
|
|
536
|
+
/** The options of {@link aggregation.terms}. */
|
|
537
|
+
export interface TermsAggregationOptions {
|
|
538
|
+
/** The key rows without a value are grouped under; must not be blank. */
|
|
539
|
+
missingKey?: string;
|
|
540
|
+
}
|
|
541
|
+
/** The options of {@link aggregation.histogram}. */
|
|
542
|
+
export interface HistogramAggregationOptions {
|
|
543
|
+
/** The width of each bucket: finite and greater than 0. */
|
|
544
|
+
interval: number;
|
|
545
|
+
}
|
|
546
|
+
/** The options of {@link aggregation.dateHistogram}. */
|
|
547
|
+
export interface DateHistogramAggregationOptions {
|
|
548
|
+
/** The calendar unit of each bucket. */
|
|
549
|
+
unit: AggregationDateUnit;
|
|
550
|
+
/** The zone the buckets are cut in, an IANA id. Defaults to `UTC`. */
|
|
551
|
+
timeZone?: string;
|
|
552
|
+
/**
|
|
553
|
+
* Whether the server fills in the empty buckets of the range. Only when
|
|
554
|
+
* this is the only group.
|
|
555
|
+
*/
|
|
556
|
+
dense?: boolean;
|
|
557
|
+
}
|
|
558
|
+
/** The options of {@link aggregation.datePart}. */
|
|
559
|
+
export interface DatePartAggregationOptions {
|
|
560
|
+
/** The calendar part each row is grouped by. */
|
|
561
|
+
part: AggregationDatePart;
|
|
562
|
+
/** The zone the part is read in, an IANA id. Defaults to `UTC`. */
|
|
563
|
+
timeZone?: string;
|
|
564
|
+
/**
|
|
565
|
+
* Whether the server returns every key of the part's domain, the empty
|
|
566
|
+
* ones filled in. Only when this is the only group.
|
|
567
|
+
*/
|
|
568
|
+
dense?: boolean;
|
|
569
|
+
}
|
|
570
|
+
/** The options of {@link aggregation.first} and {@link aggregation.last}. */
|
|
571
|
+
export interface EdgeAggregationOptions<FIELDS extends string = string> extends AggregationMetricOptions<FIELDS> {
|
|
572
|
+
/**
|
|
573
|
+
* The single-valued, sortable field that orders the records. Defaults to
|
|
574
|
+
* the model's event time, `analysis.firstLastOrderBy` in the descriptor.
|
|
575
|
+
*/
|
|
576
|
+
orderBy?: FIELDS;
|
|
577
|
+
}
|
|
578
|
+
/** The options of {@link aggregation.percentile}. */
|
|
579
|
+
export interface PercentileAggregationOptions<FIELDS extends string = string> extends AggregationMetricOptions<FIELDS> {
|
|
580
|
+
/** Which percentile: finite and within (0, 100). */
|
|
581
|
+
percentile: number;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* The sizes Wow's own `AggregationQuery` enforces by throwing.
|
|
585
|
+
*
|
|
586
|
+
* A query that breaks one of them is refused by the server, which says what
|
|
587
|
+
* was wrong but not which metric or group said it. Checking here keeps the
|
|
588
|
+
* complaint next to the call that built the query.
|
|
589
|
+
*/
|
|
590
|
+
export declare const AGGREGATION_LIMITS: Readonly<{
|
|
591
|
+
/** Rows returned when a query names no limit of its own. */
|
|
592
|
+
DEFAULT_LIMIT: 100;
|
|
593
|
+
/** The largest `limit`. */
|
|
594
|
+
MAX_LIMIT: 10000;
|
|
595
|
+
/** The most `elements`. */
|
|
596
|
+
MAX_ELEMENTS: 5;
|
|
597
|
+
/** The most `groupBy` entries. */
|
|
598
|
+
MAX_GROUPS: 32;
|
|
599
|
+
/** The most `metrics`. */
|
|
600
|
+
MAX_METRICS: 64;
|
|
601
|
+
/** The most `sort` fields, including those Wow appends for the groups. */
|
|
602
|
+
MAX_SORT_FIELDS: 32;
|
|
603
|
+
/** The deepest expression tree. */
|
|
604
|
+
MAX_EXPRESSION_DEPTH: 8;
|
|
605
|
+
/** The most expression nodes in the whole query. */
|
|
606
|
+
MAX_EXPRESSION_NODES: 256;
|
|
607
|
+
}>;
|
|
608
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/dsl/aggregation/types.ts
|
|
2
|
+
var e = /* @__PURE__ */ function(e) {
|
|
3
|
+
return e.TERMS = "TERMS", e.HISTOGRAM = "HISTOGRAM", e.DATE_HISTOGRAM = "DATE_HISTOGRAM", e.DATE_PART = "DATE_PART", e;
|
|
4
|
+
}({}), t = /* @__PURE__ */ function(e) {
|
|
5
|
+
return e.COUNT = "COUNT", e.NUMERIC = "NUMERIC", e.ANY = "ANY", e.DISTINCT_COUNT = "DISTINCT_COUNT", e.PERCENTILE = "PERCENTILE", e.DERIVED = "DERIVED", e.FIRST = "FIRST", e.LAST = "LAST", e;
|
|
6
|
+
}({}), n = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e.FIELD = "FIELD", e.CONSTANT = "CONSTANT", e.BINARY = "BINARY", e.DATE_DIFF = "DATE_DIFF", e;
|
|
8
|
+
}({}), r = /* @__PURE__ */ function(e) {
|
|
9
|
+
return e.SECOND = "SECOND", e.MINUTE = "MINUTE", e.HOUR = "HOUR", e.DAY = "DAY", e;
|
|
10
|
+
}({}), i = /* @__PURE__ */ function(e) {
|
|
11
|
+
return e.ADD = "ADD", e.SUBTRACT = "SUBTRACT", e.MULTIPLY = "MULTIPLY", e.DIVIDE = "DIVIDE", e;
|
|
12
|
+
}({}), a = /* @__PURE__ */ function(e) {
|
|
13
|
+
return e.YEAR = "YEAR", e.QUARTER = "QUARTER", e.MONTH = "MONTH", e.WEEK = "WEEK", e.DAY = "DAY", e.HOUR = "HOUR", e.MINUTE = "MINUTE", e.SECOND = "SECOND", e;
|
|
14
|
+
}({}), o = /* @__PURE__ */ function(e) {
|
|
15
|
+
return e.DAY_OF_WEEK = "DAY_OF_WEEK", e.DAY_OF_MONTH = "DAY_OF_MONTH", e.HOUR_OF_DAY = "HOUR_OF_DAY", e.MONTH_OF_YEAR = "MONTH_OF_YEAR", e;
|
|
16
|
+
}({}), s = /* @__PURE__ */ function(e) {
|
|
17
|
+
return e.SUM = "SUM", e.AVG = "AVG", e.MIN = "MIN", e.MAX = "MAX", e.STDDEV = "STDDEV", e.VARIANCE = "VARIANCE", e;
|
|
18
|
+
}({}), c = /* @__PURE__ */ function(e) {
|
|
19
|
+
return e.METRIC_REF = "METRIC_REF", e.CONSTANT = "CONSTANT", e.BINARY = "BINARY", e;
|
|
20
|
+
}({}), l = /* @__PURE__ */ function(e) {
|
|
21
|
+
return e.CONDITION = "CONDITION", e.BETWEEN = "BETWEEN", e.IN = "IN", e.IS_NULL = "IS_NULL", e.AND = "AND", e.OR = "OR", e;
|
|
22
|
+
}({}), u = /* @__PURE__ */ function(e) {
|
|
23
|
+
return e.EQ = "EQ", e.NE = "NE", e.GT = "GT", e.GTE = "GTE", e.LT = "LT", e.LTE = "LTE", e;
|
|
24
|
+
}({}), d = Object.freeze({
|
|
25
|
+
DEFAULT_LIMIT: 100,
|
|
26
|
+
MAX_LIMIT: 1e4,
|
|
27
|
+
MAX_ELEMENTS: 5,
|
|
28
|
+
MAX_GROUPS: 32,
|
|
29
|
+
MAX_METRICS: 64,
|
|
30
|
+
MAX_SORT_FIELDS: 32,
|
|
31
|
+
MAX_EXPRESSION_DEPTH: 8,
|
|
32
|
+
MAX_EXPRESSION_NODES: 256
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { d as AGGREGATION_LIMITS, o as AggregationDatePart, a as AggregationDateUnit, i as AggregationExpressionOperator, n as AggregationExpressionType, s as AggregationFunction, e as AggregationGroupType, t as AggregationMetricType, u as ComparisonOperator, r as DateDiffUnit, c as DerivedExpressionType, l as HavingExpressionType };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=types.es.js.map
|