@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,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discriminator sent as the `op` property of every filter expression. The
|
|
3
|
+
* values match the server-side `FilterOperator` enum.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum FilterOperator {
|
|
6
|
+
MATCH_ALL = "MATCH_ALL",
|
|
7
|
+
MATCH_NONE = "MATCH_NONE",
|
|
8
|
+
ID = "ID",
|
|
9
|
+
IDS = "IDS",
|
|
10
|
+
AGGREGATE_ID = "AGGREGATE_ID",
|
|
11
|
+
AGGREGATE_IDS = "AGGREGATE_IDS",
|
|
12
|
+
TENANT_ID = "TENANT_ID",
|
|
13
|
+
OWNER_ID = "OWNER_ID",
|
|
14
|
+
SPACE_ID = "SPACE_ID",
|
|
15
|
+
AND = "AND",
|
|
16
|
+
OR = "OR",
|
|
17
|
+
NOR = "NOR",
|
|
18
|
+
EQ = "EQ",
|
|
19
|
+
NE = "NE",
|
|
20
|
+
GT = "GT",
|
|
21
|
+
GTE = "GTE",
|
|
22
|
+
LT = "LT",
|
|
23
|
+
LTE = "LTE",
|
|
24
|
+
CONTAINS = "CONTAINS",
|
|
25
|
+
STARTS_WITH = "STARTS_WITH",
|
|
26
|
+
ENDS_WITH = "ENDS_WITH",
|
|
27
|
+
IN = "IN",
|
|
28
|
+
NOT_IN = "NOT_IN",
|
|
29
|
+
BETWEEN = "BETWEEN",
|
|
30
|
+
CONTAINS_ALL = "CONTAINS_ALL",
|
|
31
|
+
IS_EMPTY = "IS_EMPTY",
|
|
32
|
+
IS_EMPTY_STRING = "IS_EMPTY_STRING",
|
|
33
|
+
IS_NOT_EMPTY_STRING = "IS_NOT_EMPTY_STRING",
|
|
34
|
+
IS_NULL = "IS_NULL",
|
|
35
|
+
IS_NOT_NULL = "IS_NOT_NULL",
|
|
36
|
+
EXISTS = "EXISTS",
|
|
37
|
+
NOT_EXISTS = "NOT_EXISTS",
|
|
38
|
+
DELETION = "DELETION",
|
|
39
|
+
ELEMENT_MATCH = "ELEMENT_MATCH",
|
|
40
|
+
SEARCH = "SEARCH",
|
|
41
|
+
TODAY = "TODAY",
|
|
42
|
+
BEFORE_TODAY = "BEFORE_TODAY",
|
|
43
|
+
TOMORROW = "TOMORROW",
|
|
44
|
+
THIS_WEEK = "THIS_WEEK",
|
|
45
|
+
NEXT_WEEK = "NEXT_WEEK",
|
|
46
|
+
LAST_WEEK = "LAST_WEEK",
|
|
47
|
+
THIS_MONTH = "THIS_MONTH",
|
|
48
|
+
LAST_MONTH = "LAST_MONTH",
|
|
49
|
+
YESTERDAY = "YESTERDAY",
|
|
50
|
+
NEXT_MONTH = "NEXT_MONTH",
|
|
51
|
+
LAST_YEAR = "LAST_YEAR",
|
|
52
|
+
THIS_YEAR = "THIS_YEAR",
|
|
53
|
+
NEXT_YEAR = "NEXT_YEAR",
|
|
54
|
+
RECENT_DAYS = "RECENT_DAYS",
|
|
55
|
+
EARLIER_DAYS = "EARLIER_DAYS",
|
|
56
|
+
/**
|
|
57
|
+
* The field is strictly before the server's `now + offset`. Needs a Wow
|
|
58
|
+
* server of 9.2.0 or later.
|
|
59
|
+
*/
|
|
60
|
+
BEFORE_NOW = "BEFORE_NOW",
|
|
61
|
+
/**
|
|
62
|
+
* The field is strictly after the server's `now + offset`. Needs a Wow
|
|
63
|
+
* server of 9.2.0 or later.
|
|
64
|
+
*/
|
|
65
|
+
AFTER_NOW = "AFTER_NOW",
|
|
66
|
+
/**
|
|
67
|
+
* A computed expression, such as the hours between two time fields,
|
|
68
|
+
* compared with a number. Evaluated per record, so expensive; a record
|
|
69
|
+
* whose expression has no value never matches. Needs a Wow server of
|
|
70
|
+
* 9.2.0 or later.
|
|
71
|
+
*/
|
|
72
|
+
EXPRESSION = "EXPRESSION"
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Case handling for `CONTAINS`, `STARTS_WITH` and `ENDS_WITH`.
|
|
76
|
+
*/
|
|
77
|
+
export declare enum StringComparison {
|
|
78
|
+
/**
|
|
79
|
+
* Characters must match exactly. The default.
|
|
80
|
+
*/
|
|
81
|
+
CASE_SENSITIVE = "CASE_SENSITIVE",
|
|
82
|
+
/**
|
|
83
|
+
* Ignores case. Backends may execute this more expensively.
|
|
84
|
+
*/
|
|
85
|
+
CASE_INSENSITIVE = "CASE_INSENSITIVE"
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Matching mode of a full-text `SEARCH` filter.
|
|
89
|
+
*/
|
|
90
|
+
export declare enum SearchMode {
|
|
91
|
+
/**
|
|
92
|
+
* Analyzed terms match independently; they need not appear together. The
|
|
93
|
+
* default.
|
|
94
|
+
*/
|
|
95
|
+
TERMS = "TERMS",
|
|
96
|
+
/**
|
|
97
|
+
* Analyzed terms must appear in order and at adjacent positions.
|
|
98
|
+
*/
|
|
99
|
+
PHRASE = "PHRASE"
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Unit of a numeric epoch time field targeted by a relative time filter.
|
|
103
|
+
* Ignored when `datePattern` is set.
|
|
104
|
+
*/
|
|
105
|
+
export declare enum TimeUnit {
|
|
106
|
+
NANOSECONDS = "NANOSECONDS",
|
|
107
|
+
MICROSECONDS = "MICROSECONDS",
|
|
108
|
+
MILLISECONDS = "MILLISECONDS",
|
|
109
|
+
SECONDS = "SECONDS",
|
|
110
|
+
MINUTES = "MINUTES",
|
|
111
|
+
HOURS = "HOURS",
|
|
112
|
+
DAYS = "DAYS"
|
|
113
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discriminator sent as the `op` property of every filter expression. The
|
|
3
|
+
* values match the server-side `FilterOperator` enum.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum FilterOperator {
|
|
6
|
+
MATCH_ALL = "MATCH_ALL",
|
|
7
|
+
MATCH_NONE = "MATCH_NONE",
|
|
8
|
+
ID = "ID",
|
|
9
|
+
IDS = "IDS",
|
|
10
|
+
AGGREGATE_ID = "AGGREGATE_ID",
|
|
11
|
+
AGGREGATE_IDS = "AGGREGATE_IDS",
|
|
12
|
+
TENANT_ID = "TENANT_ID",
|
|
13
|
+
OWNER_ID = "OWNER_ID",
|
|
14
|
+
SPACE_ID = "SPACE_ID",
|
|
15
|
+
AND = "AND",
|
|
16
|
+
OR = "OR",
|
|
17
|
+
NOR = "NOR",
|
|
18
|
+
EQ = "EQ",
|
|
19
|
+
NE = "NE",
|
|
20
|
+
GT = "GT",
|
|
21
|
+
GTE = "GTE",
|
|
22
|
+
LT = "LT",
|
|
23
|
+
LTE = "LTE",
|
|
24
|
+
CONTAINS = "CONTAINS",
|
|
25
|
+
STARTS_WITH = "STARTS_WITH",
|
|
26
|
+
ENDS_WITH = "ENDS_WITH",
|
|
27
|
+
IN = "IN",
|
|
28
|
+
NOT_IN = "NOT_IN",
|
|
29
|
+
BETWEEN = "BETWEEN",
|
|
30
|
+
CONTAINS_ALL = "CONTAINS_ALL",
|
|
31
|
+
IS_EMPTY = "IS_EMPTY",
|
|
32
|
+
IS_EMPTY_STRING = "IS_EMPTY_STRING",
|
|
33
|
+
IS_NOT_EMPTY_STRING = "IS_NOT_EMPTY_STRING",
|
|
34
|
+
IS_NULL = "IS_NULL",
|
|
35
|
+
IS_NOT_NULL = "IS_NOT_NULL",
|
|
36
|
+
EXISTS = "EXISTS",
|
|
37
|
+
NOT_EXISTS = "NOT_EXISTS",
|
|
38
|
+
DELETION = "DELETION",
|
|
39
|
+
ELEMENT_MATCH = "ELEMENT_MATCH",
|
|
40
|
+
SEARCH = "SEARCH",
|
|
41
|
+
TODAY = "TODAY",
|
|
42
|
+
BEFORE_TODAY = "BEFORE_TODAY",
|
|
43
|
+
TOMORROW = "TOMORROW",
|
|
44
|
+
THIS_WEEK = "THIS_WEEK",
|
|
45
|
+
NEXT_WEEK = "NEXT_WEEK",
|
|
46
|
+
LAST_WEEK = "LAST_WEEK",
|
|
47
|
+
THIS_MONTH = "THIS_MONTH",
|
|
48
|
+
LAST_MONTH = "LAST_MONTH",
|
|
49
|
+
YESTERDAY = "YESTERDAY",
|
|
50
|
+
NEXT_MONTH = "NEXT_MONTH",
|
|
51
|
+
LAST_YEAR = "LAST_YEAR",
|
|
52
|
+
THIS_YEAR = "THIS_YEAR",
|
|
53
|
+
NEXT_YEAR = "NEXT_YEAR",
|
|
54
|
+
RECENT_DAYS = "RECENT_DAYS",
|
|
55
|
+
EARLIER_DAYS = "EARLIER_DAYS",
|
|
56
|
+
/**
|
|
57
|
+
* The field is strictly before the server's `now + offset`. Needs a Wow
|
|
58
|
+
* server of 9.2.0 or later.
|
|
59
|
+
*/
|
|
60
|
+
BEFORE_NOW = "BEFORE_NOW",
|
|
61
|
+
/**
|
|
62
|
+
* The field is strictly after the server's `now + offset`. Needs a Wow
|
|
63
|
+
* server of 9.2.0 or later.
|
|
64
|
+
*/
|
|
65
|
+
AFTER_NOW = "AFTER_NOW",
|
|
66
|
+
/**
|
|
67
|
+
* A computed expression, such as the hours between two time fields,
|
|
68
|
+
* compared with a number. Evaluated per record, so expensive; a record
|
|
69
|
+
* whose expression has no value never matches. Needs a Wow server of
|
|
70
|
+
* 9.2.0 or later.
|
|
71
|
+
*/
|
|
72
|
+
EXPRESSION = "EXPRESSION"
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Case handling for `CONTAINS`, `STARTS_WITH` and `ENDS_WITH`.
|
|
76
|
+
*/
|
|
77
|
+
export declare enum StringComparison {
|
|
78
|
+
/**
|
|
79
|
+
* Characters must match exactly. The default.
|
|
80
|
+
*/
|
|
81
|
+
CASE_SENSITIVE = "CASE_SENSITIVE",
|
|
82
|
+
/**
|
|
83
|
+
* Ignores case. Backends may execute this more expensively.
|
|
84
|
+
*/
|
|
85
|
+
CASE_INSENSITIVE = "CASE_INSENSITIVE"
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Matching mode of a full-text `SEARCH` filter.
|
|
89
|
+
*/
|
|
90
|
+
export declare enum SearchMode {
|
|
91
|
+
/**
|
|
92
|
+
* Analyzed terms match independently; they need not appear together. The
|
|
93
|
+
* default.
|
|
94
|
+
*/
|
|
95
|
+
TERMS = "TERMS",
|
|
96
|
+
/**
|
|
97
|
+
* Analyzed terms must appear in order and at adjacent positions.
|
|
98
|
+
*/
|
|
99
|
+
PHRASE = "PHRASE"
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Unit of a numeric epoch time field targeted by a relative time filter.
|
|
103
|
+
* Ignored when `datePattern` is set.
|
|
104
|
+
*/
|
|
105
|
+
export declare enum TimeUnit {
|
|
106
|
+
NANOSECONDS = "NANOSECONDS",
|
|
107
|
+
MICROSECONDS = "MICROSECONDS",
|
|
108
|
+
MILLISECONDS = "MILLISECONDS",
|
|
109
|
+
SECONDS = "SECONDS",
|
|
110
|
+
MINUTES = "MINUTES",
|
|
111
|
+
HOURS = "HOURS",
|
|
112
|
+
DAYS = "DAYS"
|
|
113
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/dsl/filter/operator.ts
|
|
2
|
+
var e = /* @__PURE__ */ function(e) {
|
|
3
|
+
return e.MATCH_ALL = "MATCH_ALL", e.MATCH_NONE = "MATCH_NONE", e.ID = "ID", e.IDS = "IDS", e.AGGREGATE_ID = "AGGREGATE_ID", e.AGGREGATE_IDS = "AGGREGATE_IDS", e.TENANT_ID = "TENANT_ID", e.OWNER_ID = "OWNER_ID", e.SPACE_ID = "SPACE_ID", e.AND = "AND", e.OR = "OR", e.NOR = "NOR", e.EQ = "EQ", e.NE = "NE", e.GT = "GT", e.GTE = "GTE", e.LT = "LT", e.LTE = "LTE", e.CONTAINS = "CONTAINS", e.STARTS_WITH = "STARTS_WITH", e.ENDS_WITH = "ENDS_WITH", e.IN = "IN", e.NOT_IN = "NOT_IN", e.BETWEEN = "BETWEEN", e.CONTAINS_ALL = "CONTAINS_ALL", e.IS_EMPTY = "IS_EMPTY", e.IS_EMPTY_STRING = "IS_EMPTY_STRING", e.IS_NOT_EMPTY_STRING = "IS_NOT_EMPTY_STRING", e.IS_NULL = "IS_NULL", e.IS_NOT_NULL = "IS_NOT_NULL", e.EXISTS = "EXISTS", e.NOT_EXISTS = "NOT_EXISTS", e.DELETION = "DELETION", e.ELEMENT_MATCH = "ELEMENT_MATCH", e.SEARCH = "SEARCH", e.TODAY = "TODAY", e.BEFORE_TODAY = "BEFORE_TODAY", e.TOMORROW = "TOMORROW", e.THIS_WEEK = "THIS_WEEK", e.NEXT_WEEK = "NEXT_WEEK", e.LAST_WEEK = "LAST_WEEK", e.THIS_MONTH = "THIS_MONTH", e.LAST_MONTH = "LAST_MONTH", e.YESTERDAY = "YESTERDAY", e.NEXT_MONTH = "NEXT_MONTH", e.LAST_YEAR = "LAST_YEAR", e.THIS_YEAR = "THIS_YEAR", e.NEXT_YEAR = "NEXT_YEAR", e.RECENT_DAYS = "RECENT_DAYS", e.EARLIER_DAYS = "EARLIER_DAYS", e.BEFORE_NOW = "BEFORE_NOW", e.AFTER_NOW = "AFTER_NOW", e.EXPRESSION = "EXPRESSION", e;
|
|
4
|
+
}({}), t = /* @__PURE__ */ function(e) {
|
|
5
|
+
return e.CASE_SENSITIVE = "CASE_SENSITIVE", e.CASE_INSENSITIVE = "CASE_INSENSITIVE", e;
|
|
6
|
+
}({}), n = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e.TERMS = "TERMS", e.PHRASE = "PHRASE", e;
|
|
8
|
+
}({}), r = /* @__PURE__ */ function(e) {
|
|
9
|
+
return e.NANOSECONDS = "NANOSECONDS", e.MICROSECONDS = "MICROSECONDS", e.MILLISECONDS = "MILLISECONDS", e.SECONDS = "SECONDS", e.MINUTES = "MINUTES", e.HOURS = "HOURS", e.DAYS = "DAYS", e;
|
|
10
|
+
}({});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as FilterOperator, n as SearchMode, t as StringComparison, r as TimeUnit };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=operator.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operator.es.js","names":["FilterOperator","\"MATCH_ALL\"","\"MATCH_NONE\"","\"ID\"","\"IDS\"","\"AGGREGATE_ID\"","\"AGGREGATE_IDS\"","\"TENANT_ID\"","\"OWNER_ID\"","\"SPACE_ID\"","\"AND\"","\"OR\"","\"NOR\"","\"EQ\"","\"NE\"","\"GT\"","\"GTE\"","\"LT\"","\"LTE\"","\"CONTAINS\"","\"STARTS_WITH\"","\"ENDS_WITH\"","\"IN\"","\"NOT_IN\"","\"BETWEEN\"","\"CONTAINS_ALL\"","\"IS_EMPTY\"","\"IS_EMPTY_STRING\"","\"IS_NOT_EMPTY_STRING\"","\"IS_NULL\"","\"IS_NOT_NULL\"","\"EXISTS\"","\"NOT_EXISTS\"","\"DELETION\"","\"ELEMENT_MATCH\"","\"SEARCH\"","\"TODAY\"","\"BEFORE_TODAY\"","\"TOMORROW\"","\"THIS_WEEK\"","\"NEXT_WEEK\"","\"LAST_WEEK\"","\"THIS_MONTH\"","\"LAST_MONTH\"","\"YESTERDAY\"","\"NEXT_MONTH\"","\"LAST_YEAR\"","\"THIS_YEAR\"","\"NEXT_YEAR\"","\"RECENT_DAYS\"","\"EARLIER_DAYS\"","\"BEFORE_NOW\"","\"AFTER_NOW\"","\"EXPRESSION\"","StringComparison","\"CASE_SENSITIVE\"","\"CASE_INSENSITIVE\"","SearchMode","\"TERMS\"","\"PHRASE\"","TimeUnit","\"NANOSECONDS\"","\"MICROSECONDS\"","\"MILLISECONDS\"","\"SECONDS\"","\"MINUTES\"","\"HOURS\"","\"DAYS\""],"sources":["../../../src/dsl/filter/operator.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Discriminator sent as the `op` property of every filter expression. The\n * values match the server-side `FilterOperator` enum.\n */\nexport enum FilterOperator {\n MATCH_ALL = 'MATCH_ALL',\n MATCH_NONE = 'MATCH_NONE',\n ID = 'ID',\n IDS = 'IDS',\n AGGREGATE_ID = 'AGGREGATE_ID',\n AGGREGATE_IDS = 'AGGREGATE_IDS',\n TENANT_ID = 'TENANT_ID',\n OWNER_ID = 'OWNER_ID',\n SPACE_ID = 'SPACE_ID',\n AND = 'AND',\n OR = 'OR',\n NOR = 'NOR',\n EQ = 'EQ',\n NE = 'NE',\n GT = 'GT',\n GTE = 'GTE',\n LT = 'LT',\n LTE = 'LTE',\n CONTAINS = 'CONTAINS',\n STARTS_WITH = 'STARTS_WITH',\n ENDS_WITH = 'ENDS_WITH',\n IN = 'IN',\n NOT_IN = 'NOT_IN',\n BETWEEN = 'BETWEEN',\n CONTAINS_ALL = 'CONTAINS_ALL',\n IS_EMPTY = 'IS_EMPTY',\n IS_EMPTY_STRING = 'IS_EMPTY_STRING',\n IS_NOT_EMPTY_STRING = 'IS_NOT_EMPTY_STRING',\n IS_NULL = 'IS_NULL',\n IS_NOT_NULL = 'IS_NOT_NULL',\n EXISTS = 'EXISTS',\n NOT_EXISTS = 'NOT_EXISTS',\n DELETION = 'DELETION',\n ELEMENT_MATCH = 'ELEMENT_MATCH',\n SEARCH = 'SEARCH',\n TODAY = 'TODAY',\n BEFORE_TODAY = 'BEFORE_TODAY',\n TOMORROW = 'TOMORROW',\n THIS_WEEK = 'THIS_WEEK',\n NEXT_WEEK = 'NEXT_WEEK',\n LAST_WEEK = 'LAST_WEEK',\n THIS_MONTH = 'THIS_MONTH',\n LAST_MONTH = 'LAST_MONTH',\n YESTERDAY = 'YESTERDAY',\n NEXT_MONTH = 'NEXT_MONTH',\n LAST_YEAR = 'LAST_YEAR',\n THIS_YEAR = 'THIS_YEAR',\n NEXT_YEAR = 'NEXT_YEAR',\n RECENT_DAYS = 'RECENT_DAYS',\n EARLIER_DAYS = 'EARLIER_DAYS',\n /**\n * The field is strictly before the server's `now + offset`. Needs a Wow\n * server of 9.2.0 or later.\n */\n BEFORE_NOW = 'BEFORE_NOW',\n /**\n * The field is strictly after the server's `now + offset`. Needs a Wow\n * server of 9.2.0 or later.\n */\n AFTER_NOW = 'AFTER_NOW',\n /**\n * A computed expression, such as the hours between two time fields,\n * compared with a number. Evaluated per record, so expensive; a record\n * whose expression has no value never matches. Needs a Wow server of\n * 9.2.0 or later.\n */\n EXPRESSION = 'EXPRESSION',\n}\n\n/**\n * Case handling for `CONTAINS`, `STARTS_WITH` and `ENDS_WITH`.\n */\nexport enum StringComparison {\n /**\n * Characters must match exactly. The default.\n */\n CASE_SENSITIVE = 'CASE_SENSITIVE',\n /**\n * Ignores case. Backends may execute this more expensively.\n */\n CASE_INSENSITIVE = 'CASE_INSENSITIVE',\n}\n\n/**\n * Matching mode of a full-text `SEARCH` filter.\n */\nexport enum SearchMode {\n /**\n * Analyzed terms match independently; they need not appear together. The\n * default.\n */\n TERMS = 'TERMS',\n /**\n * Analyzed terms must appear in order and at adjacent positions.\n */\n PHRASE = 'PHRASE',\n}\n\n/**\n * Unit of a numeric epoch time field targeted by a relative time filter.\n * Ignored when `datePattern` is set.\n */\nexport enum TimeUnit {\n NANOSECONDS = 'NANOSECONDS',\n MICROSECONDS = 'MICROSECONDS',\n MILLISECONDS = 'MILLISECONDS',\n SECONDS = 'SECONDS',\n MINUTES = 'MINUTES',\n HOURS = 'HOURS',\n DAYS = 'DAYS',\n}\n"],"mappings":";AAiBA,IAAYA,IAAL,yBAAA,GAAA;QACL,EAAAC,YAAA,aACA,EAAAC,aAAA,cACA,EAAAC,KAAA,MACA,EAAAC,MAAA,OACA,EAAAC,eAAA,gBACA,EAAAC,gBAAA,iBACA,EAAAC,YAAA,aACA,EAAAC,WAAA,YACA,EAAAC,WAAA,YACA,EAAAC,MAAA,OACA,EAAAC,KAAA,MACA,EAAAC,MAAA,OACA,EAAAC,KAAA,MACA,EAAAC,KAAA,MACA,EAAAC,KAAA,MACA,EAAAC,MAAA,OACA,EAAAC,KAAA,MACA,EAAAC,MAAA,OACA,EAAAC,WAAA,YACA,EAAAC,cAAA,eACA,EAAAC,YAAA,aACA,EAAAC,KAAA,MACA,EAAAC,SAAA,UACA,EAAAC,UAAA,WACA,EAAAC,eAAA,gBACA,EAAAC,WAAA,YACA,EAAAC,kBAAA,mBACA,EAAAC,sBAAA,uBACA,EAAAC,UAAA,WACA,EAAAC,cAAA,eACA,EAAAC,SAAA,UACA,EAAAC,aAAA,cACA,EAAAC,WAAA,YACA,EAAAC,gBAAA,iBACA,EAAAC,SAAA,UACA,EAAAC,QAAA,SACA,EAAAC,eAAA,gBACA,EAAAC,WAAA,YACA,EAAAC,YAAA,aACA,EAAAC,YAAA,aACA,EAAAC,YAAA,aACA,EAAAC,aAAA,cACA,EAAAC,aAAA,cACA,EAAAC,YAAA,aACA,EAAAC,aAAA,cACA,EAAAC,YAAA,aACA,EAAAC,YAAA,aACA,EAAAC,YAAA,aACA,EAAAC,cAAA,eACA,EAAAC,eAAA,gBAKA,EAAAC,aAAA,cAKA,EAAAC,YAAA,aAOA,EAAAC,aAAA;AACF,EAAA,CAAA,CAAA,GAKYC,IAAL,yBAAA,GAAA;QAIL,EAAAC,iBAAA,kBAIA,EAAAC,mBAAA;AACF,EAAA,CAAA,CAAA,GAKYC,IAAL,yBAAA,GAAA;QAKL,EAAAC,QAAA,SAIA,EAAAC,SAAA;AACF,EAAA,CAAA,CAAA,GAMYC,IAAL,yBAAA,GAAA;QACL,EAAAC,cAAA,eACA,EAAAC,eAAA,gBACA,EAAAC,eAAA,gBACA,EAAAC,UAAA,WACA,EAAAC,UAAA,WACA,EAAAC,QAAA,SACA,EAAAC,OAAA;AACF,EAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("./operator.cjs");function t(n,r,i=!0){switch(n.op){case e.FilterOperator.ID:case e.FilterOperator.IDS:case e.FilterOperator.AGGREGATE_ID:case e.FilterOperator.AGGREGATE_IDS:case e.FilterOperator.TENANT_ID:case e.FilterOperator.OWNER_ID:case e.FilterOperator.SPACE_ID:case e.FilterOperator.DELETION:throw TypeError(`${r} cannot contain root filters.`);case e.FilterOperator.EXPRESSION:if(i)throw TypeError(`${r} cannot contain root filters.`);break;case e.FilterOperator.SEARCH:if(!i||!n.fields?.length)throw TypeError(`${r} cannot contain root filters.`);break;case e.FilterOperator.AND:case e.FilterOperator.OR:case e.FilterOperator.NOR:if(n.operands.length===0)throw TypeError(`${n.op} operands cannot be empty.`);if(n.operands.some(e=>e==null))throw TypeError(`${n.op} operands cannot contain null.`);n.operands.forEach(e=>t(e,r,i));break;case e.FilterOperator.ELEMENT_MATCH:t(n.predicate,r,i)}}exports.requireElementScopedFilter=t;
|
|
2
|
+
//# sourceMappingURL=scope.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.cjs","names":["FilterOperator","require_operator","requireElementScopedFilter","expression","subject","fieldSearch","operand"],"sources":["../../../src/dsl/filter/scope.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Internal: not re-exported by filter/index.ts. `filter.elementMatch` and an\n// aggregation element's own filter both scope a filter to an element; this is\n// the one rule they share.\nimport { FilterOperator } from './operator.js';\nimport type { FilterExpression } from './types.js';\n\n/**\n * Refuses the filters that only a whole record can answer.\n *\n * The metadata filters, `DELETION` and a model-wide `SEARCH` ask about the\n * record — its id, its owner, whether it is deleted, its text — and an\n * element is not a record. Wow calls them root filters and refuses them in\n * both places a filter is scoped to an element: an `ELEMENT_MATCH` predicate\n * and an aggregation element's own filter. A `SEARCH` that names its fields\n * asks about the element's text, which an `ELEMENT_MATCH` predicate takes\n * (`fieldSearch`) and an aggregation element's filter does not; an\n * `EXPRESSION` filter goes the other way round. `subject`\n * names which one, so the complaint points at the call that made it.\n */\nexport function requireElementScopedFilter(\n expression: FilterExpression,\n subject: string,\n fieldSearch = true,\n): void {\n switch (expression.op) {\n case FilterOperator.ID:\n case FilterOperator.IDS:\n case FilterOperator.AGGREGATE_ID:\n case FilterOperator.AGGREGATE_IDS:\n case FilterOperator.TENANT_ID:\n case FilterOperator.OWNER_ID:\n case FilterOperator.SPACE_ID:\n case FilterOperator.DELETION:\n throw new TypeError(`${subject} cannot contain root filters.`);\n // A computed comparison cannot run inside ELEMENT_MATCH on every storage;\n // an aggregation element's filter takes it.\n case FilterOperator.EXPRESSION:\n if (fieldSearch)\n throw new TypeError(`${subject} cannot contain root filters.`);\n break;\n case FilterOperator.SEARCH:\n if (!fieldSearch || !expression.fields?.length)\n throw new TypeError(`${subject} cannot contain root filters.`);\n break;\n case FilterOperator.AND:\n case FilterOperator.OR:\n case FilterOperator.NOR:\n if (expression.operands.length === 0) {\n throw new TypeError(`${expression.op} operands cannot be empty.`);\n }\n if (expression.operands.some(operand => operand == null)) {\n throw new TypeError(`${expression.op} operands cannot contain null.`);\n }\n expression.operands.forEach(operand =>\n requireElementScopedFilter(operand, subject, fieldSearch),\n );\n break;\n case FilterOperator.ELEMENT_MATCH:\n requireElementScopedFilter(expression.predicate, subject, fieldSearch);\n break;\n }\n}\n"],"mappings":"kCAgCA,SAAgBE,EACd,EACA,EACA,EAAc,GACR,CACN,OAAQC,EAAW,GAAnB,CACE,KAAKH,EAAAA,eAAe,GACpB,KAAKA,EAAAA,eAAe,IACpB,KAAKA,EAAAA,eAAe,aACpB,KAAKA,EAAAA,eAAe,cACpB,KAAKA,EAAAA,eAAe,UACpB,KAAKA,EAAAA,eAAe,SACpB,KAAKA,EAAAA,eAAe,SACpB,KAAKA,EAAAA,eAAe,SAClB,MAAU,UAAU,GAAGI,EAAQ,8BAA8B,EAG/D,KAAKJ,EAAAA,eAAe,WAClB,GAAIK,EACF,MAAU,UAAU,GAAGD,EAAQ,8BAA8B,EAC/D,MACF,KAAKJ,EAAAA,eAAe,OAClB,GAAI,CAACK,GAAe,CAACF,EAAW,QAAQ,OACtC,MAAU,UAAU,GAAGC,EAAQ,8BAA8B,EAC/D,MACF,KAAKJ,EAAAA,eAAe,IACpB,KAAKA,EAAAA,eAAe,GACpB,KAAKA,EAAAA,eAAe,IAClB,GAAIG,EAAW,SAAS,SAAW,EACjC,MAAU,UAAU,GAAGA,EAAW,GAAG,2BAA2B,EAElE,GAAIA,EAAW,SAAS,KAAK,GAAWG,GAAW,IAAI,EACrD,MAAU,UAAU,GAAGH,EAAW,GAAG,+BAA+B,EAEtEA,EAAW,SAAS,QAAQ,GAC1BD,EAA2BI,EAASF,EAASC,CAAW,CAC1D,EACA,MACF,KAAKL,EAAAA,eAAe,cAClBE,EAA2BC,EAAW,UAAWC,EAASC,CAAW,CAEzE,CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FilterExpression } from './types.cjs';
|
|
2
|
+
/**
|
|
3
|
+
* Refuses the filters that only a whole record can answer.
|
|
4
|
+
*
|
|
5
|
+
* The metadata filters, `DELETION` and a model-wide `SEARCH` ask about the
|
|
6
|
+
* record — its id, its owner, whether it is deleted, its text — and an
|
|
7
|
+
* element is not a record. Wow calls them root filters and refuses them in
|
|
8
|
+
* both places a filter is scoped to an element: an `ELEMENT_MATCH` predicate
|
|
9
|
+
* and an aggregation element's own filter. A `SEARCH` that names its fields
|
|
10
|
+
* asks about the element's text, which an `ELEMENT_MATCH` predicate takes
|
|
11
|
+
* (`fieldSearch`) and an aggregation element's filter does not; an
|
|
12
|
+
* `EXPRESSION` filter goes the other way round. `subject`
|
|
13
|
+
* names which one, so the complaint points at the call that made it.
|
|
14
|
+
*/
|
|
15
|
+
export declare function requireElementScopedFilter(expression: FilterExpression, subject: string, fieldSearch?: boolean): void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FilterExpression } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Refuses the filters that only a whole record can answer.
|
|
4
|
+
*
|
|
5
|
+
* The metadata filters, `DELETION` and a model-wide `SEARCH` ask about the
|
|
6
|
+
* record — its id, its owner, whether it is deleted, its text — and an
|
|
7
|
+
* element is not a record. Wow calls them root filters and refuses them in
|
|
8
|
+
* both places a filter is scoped to an element: an `ELEMENT_MATCH` predicate
|
|
9
|
+
* and an aggregation element's own filter. A `SEARCH` that names its fields
|
|
10
|
+
* asks about the element's text, which an `ELEMENT_MATCH` predicate takes
|
|
11
|
+
* (`fieldSearch`) and an aggregation element's filter does not; an
|
|
12
|
+
* `EXPRESSION` filter goes the other way round. `subject`
|
|
13
|
+
* names which one, so the complaint points at the call that made it.
|
|
14
|
+
*/
|
|
15
|
+
export declare function requireElementScopedFilter(expression: FilterExpression, subject: string, fieldSearch?: boolean): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FilterOperator as e } from "./operator.es.js";
|
|
2
|
+
//#region src/dsl/filter/scope.ts
|
|
3
|
+
function t(n, r, i = !0) {
|
|
4
|
+
switch (n.op) {
|
|
5
|
+
case e.ID:
|
|
6
|
+
case e.IDS:
|
|
7
|
+
case e.AGGREGATE_ID:
|
|
8
|
+
case e.AGGREGATE_IDS:
|
|
9
|
+
case e.TENANT_ID:
|
|
10
|
+
case e.OWNER_ID:
|
|
11
|
+
case e.SPACE_ID:
|
|
12
|
+
case e.DELETION: throw TypeError(`${r} cannot contain root filters.`);
|
|
13
|
+
case e.EXPRESSION:
|
|
14
|
+
if (i) throw TypeError(`${r} cannot contain root filters.`);
|
|
15
|
+
break;
|
|
16
|
+
case e.SEARCH:
|
|
17
|
+
if (!i || !n.fields?.length) throw TypeError(`${r} cannot contain root filters.`);
|
|
18
|
+
break;
|
|
19
|
+
case e.AND:
|
|
20
|
+
case e.OR:
|
|
21
|
+
case e.NOR:
|
|
22
|
+
if (n.operands.length === 0) throw TypeError(`${n.op} operands cannot be empty.`);
|
|
23
|
+
if (n.operands.some((e) => e == null)) throw TypeError(`${n.op} operands cannot contain null.`);
|
|
24
|
+
n.operands.forEach((e) => t(e, r, i));
|
|
25
|
+
break;
|
|
26
|
+
case e.ELEMENT_MATCH: t(n.predicate, r, i);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { t as requireElementScopedFilter };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=scope.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.es.js","names":["requireElementScopedFilter","expression","FilterOperator","subject","fieldSearch","operand"],"sources":["../../../src/dsl/filter/scope.ts"],"sourcesContent":["/*\n * Copyright [2021-present] [ahoo wang <ahoowang@qq.com> (https://github.com/Ahoo-Wang)].\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Internal: not re-exported by filter/index.ts. `filter.elementMatch` and an\n// aggregation element's own filter both scope a filter to an element; this is\n// the one rule they share.\nimport { FilterOperator } from './operator.js';\nimport type { FilterExpression } from './types.js';\n\n/**\n * Refuses the filters that only a whole record can answer.\n *\n * The metadata filters, `DELETION` and a model-wide `SEARCH` ask about the\n * record — its id, its owner, whether it is deleted, its text — and an\n * element is not a record. Wow calls them root filters and refuses them in\n * both places a filter is scoped to an element: an `ELEMENT_MATCH` predicate\n * and an aggregation element's own filter. A `SEARCH` that names its fields\n * asks about the element's text, which an `ELEMENT_MATCH` predicate takes\n * (`fieldSearch`) and an aggregation element's filter does not; an\n * `EXPRESSION` filter goes the other way round. `subject`\n * names which one, so the complaint points at the call that made it.\n */\nexport function requireElementScopedFilter(\n expression: FilterExpression,\n subject: string,\n fieldSearch = true,\n): void {\n switch (expression.op) {\n case FilterOperator.ID:\n case FilterOperator.IDS:\n case FilterOperator.AGGREGATE_ID:\n case FilterOperator.AGGREGATE_IDS:\n case FilterOperator.TENANT_ID:\n case FilterOperator.OWNER_ID:\n case FilterOperator.SPACE_ID:\n case FilterOperator.DELETION:\n throw new TypeError(`${subject} cannot contain root filters.`);\n // A computed comparison cannot run inside ELEMENT_MATCH on every storage;\n // an aggregation element's filter takes it.\n case FilterOperator.EXPRESSION:\n if (fieldSearch)\n throw new TypeError(`${subject} cannot contain root filters.`);\n break;\n case FilterOperator.SEARCH:\n if (!fieldSearch || !expression.fields?.length)\n throw new TypeError(`${subject} cannot contain root filters.`);\n break;\n case FilterOperator.AND:\n case FilterOperator.OR:\n case FilterOperator.NOR:\n if (expression.operands.length === 0) {\n throw new TypeError(`${expression.op} operands cannot be empty.`);\n }\n if (expression.operands.some(operand => operand == null)) {\n throw new TypeError(`${expression.op} operands cannot contain null.`);\n }\n expression.operands.forEach(operand =>\n requireElementScopedFilter(operand, subject, fieldSearch),\n );\n break;\n case FilterOperator.ELEMENT_MATCH:\n requireElementScopedFilter(expression.predicate, subject, fieldSearch);\n break;\n }\n}\n"],"mappings":";;AAgCA,SAAgBA,EACd,GACA,GACA,IAAc,IACR;CACN,QAAQC,EAAW,IAAnB;EACE,KAAKC,EAAe;EACpB,KAAKA,EAAe;EACpB,KAAKA,EAAe;EACpB,KAAKA,EAAe;EACpB,KAAKA,EAAe;EACpB,KAAKA,EAAe;EACpB,KAAKA,EAAe;EACpB,KAAKA,EAAe,UAClB,MAAU,UAAU,GAAGC,EAAQ,8BAA8B;EAG/D,KAAKD,EAAe;GAClB,IAAIE,GACF,MAAU,UAAU,GAAGD,EAAQ,8BAA8B;GAC/D;EACF,KAAKD,EAAe;GAClB,IAAI,CAACE,KAAe,CAACH,EAAW,QAAQ,QACtC,MAAU,UAAU,GAAGE,EAAQ,8BAA8B;GAC/D;EACF,KAAKD,EAAe;EACpB,KAAKA,EAAe;EACpB,KAAKA,EAAe;GAClB,IAAID,EAAW,SAAS,WAAW,GACjC,MAAU,UAAU,GAAGA,EAAW,GAAG,2BAA2B;GAElE,IAAIA,EAAW,SAAS,MAAK,MAAWI,KAAW,IAAI,GACrD,MAAU,UAAU,GAAGJ,EAAW,GAAG,+BAA+B;GAEtE,EAAW,SAAS,SAAQ,MAC1BD,EAA2BK,GAASF,GAASC,CAAW,CAC1D;GACA;EACF,KAAKF,EAAe,eAClB,EAA2BD,EAAW,WAAWE,GAASC,CAAW;CAEzE;AACF"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { AggregationExpression, ComparisonOperator } from '../aggregation/types.cjs';
|
|
2
|
+
import { DeletionState } from '../deletionState.cjs';
|
|
3
|
+
import { FilterOperator, SearchMode, StringComparison, TimeUnit } from './operator.cjs';
|
|
4
|
+
/**
|
|
5
|
+
* Dot-separated logical field path. The first segment is a name; later
|
|
6
|
+
* segments are names or decimal array indexes. A name may start with `@`,
|
|
7
|
+
* begins with an ASCII letter or `_`, and continues with ASCII letters,
|
|
8
|
+
* digits, `_` or `-`. Builders throw `TypeError` for any other string.
|
|
9
|
+
*/
|
|
10
|
+
export type QueryField<FIELDS extends string = string> = FIELDS;
|
|
11
|
+
/**
|
|
12
|
+
* JSON scalar accepted as a filter value. Numbers must be finite.
|
|
13
|
+
*/
|
|
14
|
+
export type FilterLiteral = null | string | number | boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Value accepted by `EQ` and `NE`, including `null`.
|
|
17
|
+
*/
|
|
18
|
+
export type EqualityFilterValue = FilterLiteral;
|
|
19
|
+
/**
|
|
20
|
+
* Non-null JSON scalar accepted by comparison, range and collection filters.
|
|
21
|
+
*/
|
|
22
|
+
export type ComparableFilterLiteral = Exclude<FilterLiteral, null>;
|
|
23
|
+
/**
|
|
24
|
+
* Constant filter: `MATCH_ALL` matches everything in the query scope,
|
|
25
|
+
* `MATCH_NONE` matches nothing.
|
|
26
|
+
*/
|
|
27
|
+
export type MatchFilter = {
|
|
28
|
+
op: FilterOperator.MATCH_ALL | FilterOperator.MATCH_NONE;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Root-only filter on one system identifier: record ID, aggregate ID,
|
|
32
|
+
* tenant, owner or space.
|
|
33
|
+
*/
|
|
34
|
+
export type MetadataValueFilter = {
|
|
35
|
+
op: FilterOperator.ID | FilterOperator.AGGREGATE_ID | FilterOperator.TENANT_ID | FilterOperator.OWNER_ID | FilterOperator.SPACE_ID;
|
|
36
|
+
value: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Root-only filter on a non-empty set of record IDs or aggregate IDs.
|
|
40
|
+
*/
|
|
41
|
+
export type MetadataValuesFilter = {
|
|
42
|
+
op: FilterOperator.IDS | FilterOperator.AGGREGATE_IDS;
|
|
43
|
+
values: string[];
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Any root-only system identifier filter.
|
|
47
|
+
*/
|
|
48
|
+
export type MetadataFilter = MetadataValueFilter | MetadataValuesFilter;
|
|
49
|
+
/**
|
|
50
|
+
* `AND`, `OR` or `NOR` over a non-empty list of filter expressions.
|
|
51
|
+
*/
|
|
52
|
+
export type LogicalFilter<FIELDS extends string = string> = {
|
|
53
|
+
op: FilterOperator.AND | FilterOperator.OR | FilterOperator.NOR;
|
|
54
|
+
operands: FilterExpression<FIELDS>[];
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* `AND`, `OR` or `NOR` whose operands are all valid inside an
|
|
58
|
+
* `ELEMENT_MATCH` predicate.
|
|
59
|
+
*/
|
|
60
|
+
export type ElementLogicalFilter<FIELDS extends string = string> = {
|
|
61
|
+
op: FilterOperator.AND | FilterOperator.OR | FilterOperator.NOR;
|
|
62
|
+
operands: ElementFilterExpression<FIELDS>[];
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* `EQ` or `NE` on a field. The server rewrites a `null` value to `IS_NULL`
|
|
66
|
+
* or `IS_NOT_NULL`.
|
|
67
|
+
*/
|
|
68
|
+
export type EqualityFilter<FIELDS extends string = string> = {
|
|
69
|
+
op: FilterOperator.EQ | FilterOperator.NE;
|
|
70
|
+
field: QueryField<FIELDS>;
|
|
71
|
+
value: EqualityFilterValue;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* `GT`, `GTE`, `LT` or `LTE` on a field against a non-null scalar.
|
|
75
|
+
*/
|
|
76
|
+
export type ComparisonFilter<FIELDS extends string = string> = {
|
|
77
|
+
op: FilterOperator.GT | FilterOperator.GTE | FilterOperator.LT | FilterOperator.LTE;
|
|
78
|
+
field: QueryField<FIELDS>;
|
|
79
|
+
value: ComparableFilterLiteral;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Literal substring, prefix or suffix match on a string field. No full-text
|
|
83
|
+
* analyzer is applied. `stringComparison` defaults to `CASE_SENSITIVE`.
|
|
84
|
+
*/
|
|
85
|
+
export type StringFilter<FIELDS extends string = string> = {
|
|
86
|
+
op: FilterOperator.CONTAINS | FilterOperator.STARTS_WITH | FilterOperator.ENDS_WITH;
|
|
87
|
+
field: QueryField<FIELDS>;
|
|
88
|
+
value: string;
|
|
89
|
+
stringComparison?: StringComparison;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* `IN`, `NOT_IN` or `CONTAINS_ALL` on a field against a non-empty list of
|
|
93
|
+
* non-null scalars.
|
|
94
|
+
*/
|
|
95
|
+
export type CollectionFilter<FIELDS extends string = string> = {
|
|
96
|
+
op: FilterOperator.IN | FilterOperator.NOT_IN | FilterOperator.CONTAINS_ALL;
|
|
97
|
+
field: QueryField<FIELDS>;
|
|
98
|
+
values: ComparableFilterLiteral[];
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Inclusive range on a field: `lowerBound <= field <= upperBound`.
|
|
102
|
+
*/
|
|
103
|
+
export type BetweenFilter<FIELDS extends string = string> = {
|
|
104
|
+
op: FilterOperator.BETWEEN;
|
|
105
|
+
field: QueryField<FIELDS>;
|
|
106
|
+
lowerBound: ComparableFilterLiteral;
|
|
107
|
+
upperBound: ComparableFilterLiteral;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Operand-free check of a field's null, existence, empty-collection or
|
|
111
|
+
* empty-string state.
|
|
112
|
+
*/
|
|
113
|
+
export type FieldPresenceFilter<FIELDS extends string = string> = {
|
|
114
|
+
op: FilterOperator.IS_EMPTY | FilterOperator.IS_EMPTY_STRING | FilterOperator.IS_NOT_EMPTY_STRING | FilterOperator.IS_NULL | FilterOperator.IS_NOT_NULL | FilterOperator.EXISTS | FilterOperator.NOT_EXISTS;
|
|
115
|
+
field: QueryField<FIELDS>;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Root-only filter on the deletion state of snapshots.
|
|
119
|
+
*/
|
|
120
|
+
export type DeletionFilter = {
|
|
121
|
+
op: FilterOperator.DELETION;
|
|
122
|
+
state: DeletionState;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Matches when a single element of the array `field` satisfies `predicate`.
|
|
126
|
+
* Predicate fields are relative to the element.
|
|
127
|
+
*/
|
|
128
|
+
export type ElementMatchFilter<FIELDS extends string = string, ELEMENT_FIELDS extends string = string> = {
|
|
129
|
+
op: FilterOperator.ELEMENT_MATCH;
|
|
130
|
+
field: QueryField<FIELDS>;
|
|
131
|
+
predicate: ElementFilterExpression<ELEMENT_FIELDS>;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Full-text search. Matching depends on the backend's index and analyzer.
|
|
135
|
+
* Empty `fields` means the backend's default search fields, a model-wide
|
|
136
|
+
* search, which only a record can answer; inside an `ELEMENT_MATCH` a
|
|
137
|
+
* search must name its fields: see {@link ElementSearchFilter}.
|
|
138
|
+
*/
|
|
139
|
+
export type SearchFilter<FIELDS extends string = string> = {
|
|
140
|
+
op: FilterOperator.SEARCH;
|
|
141
|
+
query: string;
|
|
142
|
+
fields?: QueryField<FIELDS>[];
|
|
143
|
+
/**
|
|
144
|
+
* Matching mode. Defaults to `SearchMode.TERMS`.
|
|
145
|
+
*/
|
|
146
|
+
mode?: SearchMode;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* A `SEARCH` that names at least one field: the only search an
|
|
150
|
+
* `ELEMENT_MATCH` predicate takes, with fields relative to the element.
|
|
151
|
+
* `filter.search(query, { fields: ['name'] })` builds one. Wow 9.2 and
|
|
152
|
+
* later, on a storage that lists `elements[].search` in the descriptor.
|
|
153
|
+
*/
|
|
154
|
+
export type ElementSearchFilter<FIELDS extends string = string> = SearchFilter<FIELDS> & {
|
|
155
|
+
fields: [QueryField<FIELDS>, ...QueryField<FIELDS>[]];
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Options for {@link filter.search}.
|
|
159
|
+
*/
|
|
160
|
+
export interface SearchFilterOptions<FIELDS extends string = string> {
|
|
161
|
+
/**
|
|
162
|
+
* Fields to search. Defaults to `[]`, the backend's default search fields.
|
|
163
|
+
*/
|
|
164
|
+
fields?: readonly QueryField<FIELDS>[];
|
|
165
|
+
/**
|
|
166
|
+
* Matching mode. Defaults to `SearchMode.TERMS`.
|
|
167
|
+
*/
|
|
168
|
+
mode?: SearchMode;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Options shared by relative time filters. Unset options are omitted from
|
|
172
|
+
* the payload, except `timeUnit`, which the builders always send.
|
|
173
|
+
*/
|
|
174
|
+
export interface RelativeTimeFilterOptions {
|
|
175
|
+
/**
|
|
176
|
+
* Time zone that defines calendar days, e.g. `Asia/Shanghai` or `+08:00`.
|
|
177
|
+
* Defaults to the server process time zone. Must not be blank. A value
|
|
178
|
+
* that starts with an optional `UTC`, `GMT` or `UT` prefix followed by `+`
|
|
179
|
+
* or `-` must be a valid offset within +/-18:00; region IDs are checked by
|
|
180
|
+
* the server only.
|
|
181
|
+
*/
|
|
182
|
+
zoneId?: string;
|
|
183
|
+
/**
|
|
184
|
+
* `java.time.format.DateTimeFormatter` pattern for fields stored as
|
|
185
|
+
* formatted strings, e.g. `yyyy-MM-dd`. Must equal the pattern declared by
|
|
186
|
+
* the query schema. Must not be blank.
|
|
187
|
+
*/
|
|
188
|
+
datePattern?: string;
|
|
189
|
+
/**
|
|
190
|
+
* Unit of a numeric epoch field. Defaults to `TimeUnit.MILLISECONDS`.
|
|
191
|
+
* Ignored when `datePattern` is set.
|
|
192
|
+
*/
|
|
193
|
+
timeUnit?: TimeUnit;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Matches times in a calendar window relative to now: `[start, end)` in the
|
|
197
|
+
* configured time zone. Weeks start on Monday.
|
|
198
|
+
*/
|
|
199
|
+
export type CalendarFilter<FIELDS extends string = string> = RelativeTimeFilterOptions & {
|
|
200
|
+
op: FilterOperator.TODAY | FilterOperator.TOMORROW | FilterOperator.THIS_WEEK | FilterOperator.NEXT_WEEK | FilterOperator.LAST_WEEK | FilterOperator.THIS_MONTH | FilterOperator.LAST_MONTH | FilterOperator.YESTERDAY | FilterOperator.NEXT_MONTH | FilterOperator.LAST_YEAR | FilterOperator.THIS_YEAR | FilterOperator.NEXT_YEAR;
|
|
201
|
+
field: QueryField<FIELDS>;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Matches times earlier than today at the local time `time`.
|
|
205
|
+
*/
|
|
206
|
+
export type BeforeTodayFilter<FIELDS extends string = string> = RelativeTimeFilterOptions & {
|
|
207
|
+
op: FilterOperator.BEFORE_TODAY;
|
|
208
|
+
field: QueryField<FIELDS>;
|
|
209
|
+
time: string;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* `RECENT_DAYS` matches today and the `days - 1` previous calendar days;
|
|
213
|
+
* `EARLIER_DAYS` matches times before that window.
|
|
214
|
+
*/
|
|
215
|
+
export type DaysFilter<FIELDS extends string = string> = RelativeTimeFilterOptions & {
|
|
216
|
+
op: FilterOperator.RECENT_DAYS | FilterOperator.EARLIER_DAYS;
|
|
217
|
+
field: QueryField<FIELDS>;
|
|
218
|
+
days: number;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* `BEFORE_NOW` matches times strictly before the server's `now + offset`;
|
|
222
|
+
* `AFTER_NOW` matches times strictly after it. The server reads its clock
|
|
223
|
+
* once per query, so every condition of one query compares against the same
|
|
224
|
+
* moment and a saved query never depends on the client's clock. `offset` is
|
|
225
|
+
* an ISO-8601 duration (`PT0S`, `-PT30M`, `P1DT2H`); a negative offset looks
|
|
226
|
+
* back.
|
|
227
|
+
*
|
|
228
|
+
* Needs a Wow server of 9.2.0 or later; an earlier one refuses the operator.
|
|
229
|
+
*/
|
|
230
|
+
export type NowFilter<FIELDS extends string = string> = RelativeTimeFilterOptions & {
|
|
231
|
+
op: FilterOperator.BEFORE_NOW | FilterOperator.AFTER_NOW;
|
|
232
|
+
field: QueryField<FIELDS>;
|
|
233
|
+
offset: string;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Filter expression allowed inside an `ELEMENT_MATCH` predicate. Excludes
|
|
237
|
+
* root-only filters: system identifiers, `DELETION` and a model-wide
|
|
238
|
+
* `SEARCH`; a `SEARCH` that names its fields is an element predicate. An
|
|
239
|
+
* aggregation element's filter takes no `SEARCH` at all, which
|
|
240
|
+
* {@link aggregation.element} checks when it runs.
|
|
241
|
+
*/
|
|
242
|
+
export type ElementFilterExpression<FIELDS extends string = string> = MatchFilter | ElementLogicalFilter<FIELDS> | EqualityFilter<FIELDS> | ComparisonFilter<FIELDS> | StringFilter<FIELDS> | CollectionFilter<FIELDS> | BetweenFilter<FIELDS> | FieldPresenceFilter<FIELDS> | ElementMatchFilter<FIELDS> | CalendarFilter<FIELDS> | BeforeTodayFilter<FIELDS> | DaysFilter<FIELDS> | NowFilter<FIELDS> | ElementSearchFilter<FIELDS>;
|
|
243
|
+
/**
|
|
244
|
+
* A computed expression compared with a number; {@link filter.expression}.
|
|
245
|
+
* The expression is an {@link AggregationExpression}, such as a `DATE_DIFF`
|
|
246
|
+
* between two time fields, evaluated per record. A record whose expression
|
|
247
|
+
* has no value (an operand is absent or holds several values, or a division
|
|
248
|
+
* by zero) does not match, whatever the comparison, `NE` included.
|
|
249
|
+
*
|
|
250
|
+
* Allowed at the root, in a metric's filter and in an aggregation element's
|
|
251
|
+
* filter, but not inside `ELEMENT_MATCH`. It is an expensive operator: the
|
|
252
|
+
* descriptor lists `EXPRESSION` in `record.rootOperators` only where the
|
|
253
|
+
* server allows expensive operators. Wow 9.2 and later.
|
|
254
|
+
*/
|
|
255
|
+
export type ExpressionFilter<FIELDS extends string = string> = {
|
|
256
|
+
op: FilterOperator.EXPRESSION;
|
|
257
|
+
/** The per-record value compared; it reads at least one field. */
|
|
258
|
+
expression: AggregationExpression<FIELDS>;
|
|
259
|
+
/** How the value compares with `value`. */
|
|
260
|
+
comparison: ComparisonOperator;
|
|
261
|
+
/** A finite number. */
|
|
262
|
+
value: number;
|
|
263
|
+
};
|
|
264
|
+
/**
|
|
265
|
+
* Filter expression sent to the query API. Build values with
|
|
266
|
+
* {@link filter}.
|
|
267
|
+
*/
|
|
268
|
+
export type FilterExpression<FIELDS extends string = string> = MatchFilter | MetadataFilter | LogicalFilter<FIELDS> | EqualityFilter<FIELDS> | ComparisonFilter<FIELDS> | StringFilter<FIELDS> | CollectionFilter<FIELDS> | BetweenFilter<FIELDS> | FieldPresenceFilter<FIELDS> | DeletionFilter | ElementMatchFilter<FIELDS> | SearchFilter<FIELDS> | CalendarFilter<FIELDS> | BeforeTodayFilter<FIELDS> | DaysFilter<FIELDS> | NowFilter<FIELDS> | ExpressionFilter<FIELDS>;
|
|
269
|
+
/**
|
|
270
|
+
* Query that carries a filter expression.
|
|
271
|
+
*/
|
|
272
|
+
export interface FilterCapable<FIELDS extends string = string> {
|
|
273
|
+
filter: FilterExpression<FIELDS>;
|
|
274
|
+
}
|