@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,962 @@
|
|
|
1
|
+
import { ComparisonOperator, AggregationExpression } from '../aggregation/types.cjs';
|
|
2
|
+
import { DeletionState } from '../deletionState.cjs';
|
|
3
|
+
import { StringComparison } from './operator.cjs';
|
|
4
|
+
import { BeforeTodayFilter, BetweenFilter, CalendarFilter, CollectionFilter, ComparableFilterLiteral, ComparisonFilter, DaysFilter, DeletionFilter, ElementFilterExpression, ElementLogicalFilter, ElementMatchFilter, EqualityFilter, EqualityFilterValue, FieldPresenceFilter, FilterExpression, LogicalFilter, MatchFilter, MetadataValueFilter, MetadataValuesFilter, NowFilter, RelativeTimeFilterOptions, SearchFilter, SearchFilterOptions, StringFilter, ElementSearchFilter, QueryField, ExpressionFilter } from './types.cjs';
|
|
5
|
+
/**
|
|
6
|
+
* `filter.and`: matches when all of `operands` match. With element-scoped
|
|
7
|
+
* operands only, the result is element-scoped too, so it can be an
|
|
8
|
+
* `ELEMENT_MATCH` predicate.
|
|
9
|
+
*/
|
|
10
|
+
declare function andFilter<FIELDS extends string>(operands: readonly ElementFilterExpression<FIELDS>[]): ElementLogicalFilter<FIELDS>;
|
|
11
|
+
/** `filter.and`: matches when all of `operands` match. */
|
|
12
|
+
declare function andFilter<FIELDS extends string>(operands: readonly FilterExpression<FIELDS>[]): LogicalFilter<FIELDS>;
|
|
13
|
+
/**
|
|
14
|
+
* `filter.or`: matches when at least one of `operands` matches. With
|
|
15
|
+
* element-scoped operands only, the result is element-scoped too, so it can
|
|
16
|
+
* be an `ELEMENT_MATCH` predicate.
|
|
17
|
+
*/
|
|
18
|
+
declare function orFilter<FIELDS extends string>(operands: readonly ElementFilterExpression<FIELDS>[]): ElementLogicalFilter<FIELDS>;
|
|
19
|
+
/** `filter.or`: matches when at least one of `operands` matches. */
|
|
20
|
+
declare function orFilter<FIELDS extends string>(operands: readonly FilterExpression<FIELDS>[]): LogicalFilter<FIELDS>;
|
|
21
|
+
/**
|
|
22
|
+
* `filter.nor`: matches when none of `operands` match. With element-scoped
|
|
23
|
+
* operands only, the result is element-scoped too, so it can be an
|
|
24
|
+
* `ELEMENT_MATCH` predicate.
|
|
25
|
+
*/
|
|
26
|
+
declare function norFilter<FIELDS extends string>(operands: readonly ElementFilterExpression<FIELDS>[]): ElementLogicalFilter<FIELDS>;
|
|
27
|
+
/** `filter.nor`: matches when none of `operands` match. */
|
|
28
|
+
declare function norFilter<FIELDS extends string>(operands: readonly FilterExpression<FIELDS>[]): LogicalFilter<FIELDS>;
|
|
29
|
+
/**
|
|
30
|
+
* The overloads of {@link filter.search}: naming at least one field, as an
|
|
31
|
+
* array literal, types the result as an {@link ElementSearchFilter}, which
|
|
32
|
+
* `ELEMENT_MATCH` takes; otherwise it is a {@link SearchFilter}, root-only
|
|
33
|
+
* when its `fields` are empty.
|
|
34
|
+
*/
|
|
35
|
+
export interface SearchBuilder {
|
|
36
|
+
<FIELDS extends string>(query: string, options: SearchFilterOptions<FIELDS> & {
|
|
37
|
+
fields: readonly [QueryField<FIELDS>, ...QueryField<FIELDS>[]];
|
|
38
|
+
}): ElementSearchFilter<FIELDS>;
|
|
39
|
+
<FIELDS extends string>(query: string, options?: SearchFilterOptions<FIELDS>): SearchFilter<FIELDS>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Builders for {@link FilterExpression} values. Each builder validates its
|
|
43
|
+
* arguments, throws `TypeError` on invalid input, and returns a plain JSON
|
|
44
|
+
* object in the server wire shape.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* const paid = filter.and([
|
|
49
|
+
* filter.eq('state.status', 'PAID'),
|
|
50
|
+
* filter.gte('state.total', 100),
|
|
51
|
+
* ]);
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare const filter: {
|
|
55
|
+
/**
|
|
56
|
+
* Matches every record in the query scope.
|
|
57
|
+
*
|
|
58
|
+
* @returns `{ op: 'MATCH_ALL' }`.
|
|
59
|
+
* @example
|
|
60
|
+
* ```typescript
|
|
61
|
+
* filter.matchAll();
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
matchAll(): MatchFilter;
|
|
65
|
+
/**
|
|
66
|
+
* Matches no record.
|
|
67
|
+
*
|
|
68
|
+
* @returns `{ op: 'MATCH_NONE' }`.
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* filter.matchNone();
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
matchNone(): MatchFilter;
|
|
75
|
+
/**
|
|
76
|
+
* Matches the record whose record ID equals `value`. Root-only: not allowed
|
|
77
|
+
* inside `elementMatch`.
|
|
78
|
+
*
|
|
79
|
+
* @param value - The record ID.
|
|
80
|
+
* @returns `{ op: 'ID', value }`.
|
|
81
|
+
* @throws TypeError If `value` is not a string.
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* filter.id('order-1');
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
id(value: string): MetadataValueFilter;
|
|
88
|
+
/**
|
|
89
|
+
* Matches records whose record ID is one of `values`. Root-only: not
|
|
90
|
+
* allowed inside `elementMatch`.
|
|
91
|
+
*
|
|
92
|
+
* @param values - Non-empty list of record IDs.
|
|
93
|
+
* @returns `{ op: 'IDS', values }` with a copy of `values`.
|
|
94
|
+
* @throws TypeError If `values` is empty, contains `null` or `undefined`,
|
|
95
|
+
* or contains a non-string.
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* filter.ids(['order-1', 'order-2']);
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
ids(values: readonly string[]): MetadataValuesFilter;
|
|
102
|
+
/**
|
|
103
|
+
* Matches the record whose aggregate ID equals `value`. Root-only: not allowed
|
|
104
|
+
* inside `elementMatch`.
|
|
105
|
+
*
|
|
106
|
+
* @param value - The aggregate ID.
|
|
107
|
+
* @returns `{ op: 'AGGREGATE_ID', value }`.
|
|
108
|
+
* @throws TypeError If `value` is not a string.
|
|
109
|
+
* @example
|
|
110
|
+
* ```typescript
|
|
111
|
+
* filter.aggregateId('order-1');
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
aggregateId(value: string): MetadataValueFilter;
|
|
115
|
+
/**
|
|
116
|
+
* Matches records whose aggregate ID is one of `values`. Root-only: not
|
|
117
|
+
* allowed inside `elementMatch`.
|
|
118
|
+
*
|
|
119
|
+
* @param values - Non-empty list of aggregate IDs.
|
|
120
|
+
* @returns `{ op: 'AGGREGATE_IDS', values }` with a copy of `values`.
|
|
121
|
+
* @throws TypeError If `values` is empty, contains `null` or `undefined`,
|
|
122
|
+
* or contains a non-string.
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* filter.aggregateIds(['order-1', 'order-2']);
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
aggregateIds(values: readonly string[]): MetadataValuesFilter;
|
|
129
|
+
/**
|
|
130
|
+
* Matches the record whose tenant ID equals `value`. Root-only: not allowed
|
|
131
|
+
* inside `elementMatch`.
|
|
132
|
+
*
|
|
133
|
+
* @param value - The tenant ID.
|
|
134
|
+
* @returns `{ op: 'TENANT_ID', value }`.
|
|
135
|
+
* @throws TypeError If `value` is not a string.
|
|
136
|
+
* @example
|
|
137
|
+
* ```typescript
|
|
138
|
+
* filter.tenantId('tenant-a');
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
tenantId(value: string): MetadataValueFilter;
|
|
142
|
+
/**
|
|
143
|
+
* Matches the record whose owner ID equals `value`. Root-only: not allowed
|
|
144
|
+
* inside `elementMatch`.
|
|
145
|
+
*
|
|
146
|
+
* @param value - The owner ID.
|
|
147
|
+
* @returns `{ op: 'OWNER_ID', value }`.
|
|
148
|
+
* @throws TypeError If `value` is not a string.
|
|
149
|
+
* @example
|
|
150
|
+
* ```typescript
|
|
151
|
+
* filter.ownerId('user-1');
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
ownerId(value: string): MetadataValueFilter;
|
|
155
|
+
/**
|
|
156
|
+
* Matches the record whose space ID equals `value`. Root-only: not allowed
|
|
157
|
+
* inside `elementMatch`.
|
|
158
|
+
*
|
|
159
|
+
* @param value - The space ID.
|
|
160
|
+
* @returns `{ op: 'SPACE_ID', value }`.
|
|
161
|
+
* @throws TypeError If `value` is not a string.
|
|
162
|
+
* @example
|
|
163
|
+
* ```typescript
|
|
164
|
+
* filter.spaceId('space-1');
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
spaceId(value: string): MetadataValueFilter;
|
|
168
|
+
/**
|
|
169
|
+
* Matches when all of `operands` match. Returns an element-scoped
|
|
170
|
+
* filter when every operand is element-scoped, so the result can be used
|
|
171
|
+
* inside `elementMatch`.
|
|
172
|
+
*
|
|
173
|
+
* @param operands - Non-empty list of filter expressions.
|
|
174
|
+
* @returns `{ op: 'AND', operands }` with a copy of `operands`.
|
|
175
|
+
* @throws TypeError If `operands` is empty or contains `null` or
|
|
176
|
+
* `undefined`.
|
|
177
|
+
* @example
|
|
178
|
+
* ```typescript
|
|
179
|
+
* filter.and([
|
|
180
|
+
* filter.eq('state.status', 'PAID'),
|
|
181
|
+
* filter.eq('state.status', 'SHIPPED'),
|
|
182
|
+
* ]);
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
and: typeof andFilter;
|
|
186
|
+
/**
|
|
187
|
+
* Matches when at least one of `operands` match. Returns an element-scoped
|
|
188
|
+
* filter when every operand is element-scoped, so the result can be used
|
|
189
|
+
* inside `elementMatch`.
|
|
190
|
+
*
|
|
191
|
+
* @param operands - Non-empty list of filter expressions.
|
|
192
|
+
* @returns `{ op: 'OR', operands }` with a copy of `operands`.
|
|
193
|
+
* @throws TypeError If `operands` is empty or contains `null` or
|
|
194
|
+
* `undefined`.
|
|
195
|
+
* @example
|
|
196
|
+
* ```typescript
|
|
197
|
+
* filter.or([
|
|
198
|
+
* filter.eq('state.status', 'PAID'),
|
|
199
|
+
* filter.eq('state.status', 'SHIPPED'),
|
|
200
|
+
* ]);
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
or: typeof orFilter;
|
|
204
|
+
/**
|
|
205
|
+
* Matches when none of `operands` match. Returns an element-scoped
|
|
206
|
+
* filter when every operand is element-scoped, so the result can be used
|
|
207
|
+
* inside `elementMatch`.
|
|
208
|
+
*
|
|
209
|
+
* @param operands - Non-empty list of filter expressions.
|
|
210
|
+
* @returns `{ op: 'NOR', operands }` with a copy of `operands`.
|
|
211
|
+
* @throws TypeError If `operands` is empty or contains `null` or
|
|
212
|
+
* `undefined`.
|
|
213
|
+
* @example
|
|
214
|
+
* ```typescript
|
|
215
|
+
* filter.nor([
|
|
216
|
+
* filter.eq('state.status', 'PAID'),
|
|
217
|
+
* filter.eq('state.status', 'SHIPPED'),
|
|
218
|
+
* ]);
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
nor: typeof norFilter;
|
|
222
|
+
/**
|
|
223
|
+
* Matches records whose `field` equals `value`.
|
|
224
|
+
*
|
|
225
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
226
|
+
* @param value - JSON scalar. `null` is sent as is; the server rewrites it
|
|
227
|
+
* to `IS_NULL`.
|
|
228
|
+
* @returns `{ op: 'EQ', field, value }`.
|
|
229
|
+
* @throws TypeError If `field` is not a valid query field path, or `value` is not
|
|
230
|
+
* `null`, a string, a boolean or a finite number.
|
|
231
|
+
* @example
|
|
232
|
+
* ```typescript
|
|
233
|
+
* filter.eq('state.status', 'PAID');
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
eq<FIELDS extends string>(field: FIELDS, value: EqualityFilterValue): EqualityFilter<FIELDS>;
|
|
237
|
+
/**
|
|
238
|
+
* Matches records whose `field` does not equal `value`.
|
|
239
|
+
*
|
|
240
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
241
|
+
* @param value - JSON scalar. `null` is sent as is; the server rewrites it
|
|
242
|
+
* to `IS_NOT_NULL`.
|
|
243
|
+
* @returns `{ op: 'NE', field, value }`.
|
|
244
|
+
* @throws TypeError If `field` is not a valid query field path, or `value` is not
|
|
245
|
+
* `null`, a string, a boolean or a finite number.
|
|
246
|
+
* @example
|
|
247
|
+
* ```typescript
|
|
248
|
+
* filter.ne('state.status', 'CANCELLED');
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
251
|
+
ne<FIELDS extends string>(field: FIELDS, value: EqualityFilterValue): EqualityFilter<FIELDS>;
|
|
252
|
+
/**
|
|
253
|
+
* Matches records whose `field` is greater than `value` (`field > value`).
|
|
254
|
+
* Numbers compare at the backend's stored precision.
|
|
255
|
+
*
|
|
256
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
257
|
+
* @param value - Non-null JSON scalar.
|
|
258
|
+
* @returns `{ op: 'GT', field, value }`.
|
|
259
|
+
* @throws TypeError If `field` is not a valid query field path, or `value` is not a
|
|
260
|
+
* string, a boolean or a finite number.
|
|
261
|
+
* @example
|
|
262
|
+
* ```typescript
|
|
263
|
+
* filter.gt('state.total', 100);
|
|
264
|
+
* ```
|
|
265
|
+
*/
|
|
266
|
+
gt<FIELDS extends string>(field: FIELDS, value: ComparableFilterLiteral): ComparisonFilter<FIELDS>;
|
|
267
|
+
/**
|
|
268
|
+
* Matches records whose `field` is greater than or equal to `value` (`field >= value`).
|
|
269
|
+
* Numbers compare at the backend's stored precision.
|
|
270
|
+
*
|
|
271
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
272
|
+
* @param value - Non-null JSON scalar.
|
|
273
|
+
* @returns `{ op: 'GTE', field, value }`.
|
|
274
|
+
* @throws TypeError If `field` is not a valid query field path, or `value` is not a
|
|
275
|
+
* string, a boolean or a finite number.
|
|
276
|
+
* @example
|
|
277
|
+
* ```typescript
|
|
278
|
+
* filter.gte('state.total', 100);
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
gte<FIELDS extends string>(field: FIELDS, value: ComparableFilterLiteral): ComparisonFilter<FIELDS>;
|
|
282
|
+
/**
|
|
283
|
+
* Matches records whose `field` is less than `value` (`field < value`).
|
|
284
|
+
* Numbers compare at the backend's stored precision.
|
|
285
|
+
*
|
|
286
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
287
|
+
* @param value - Non-null JSON scalar.
|
|
288
|
+
* @returns `{ op: 'LT', field, value }`.
|
|
289
|
+
* @throws TypeError If `field` is not a valid query field path, or `value` is not a
|
|
290
|
+
* string, a boolean or a finite number.
|
|
291
|
+
* @example
|
|
292
|
+
* ```typescript
|
|
293
|
+
* filter.lt('state.total', 100);
|
|
294
|
+
* ```
|
|
295
|
+
*/
|
|
296
|
+
lt<FIELDS extends string>(field: FIELDS, value: ComparableFilterLiteral): ComparisonFilter<FIELDS>;
|
|
297
|
+
/**
|
|
298
|
+
* Matches records whose `field` is less than or equal to `value` (`field <= value`).
|
|
299
|
+
* Numbers compare at the backend's stored precision.
|
|
300
|
+
*
|
|
301
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
302
|
+
* @param value - Non-null JSON scalar.
|
|
303
|
+
* @returns `{ op: 'LTE', field, value }`.
|
|
304
|
+
* @throws TypeError If `field` is not a valid query field path, or `value` is not a
|
|
305
|
+
* string, a boolean or a finite number.
|
|
306
|
+
* @example
|
|
307
|
+
* ```typescript
|
|
308
|
+
* filter.lte('state.total', 100);
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
311
|
+
lte<FIELDS extends string>(field: FIELDS, value: ComparableFilterLiteral): ComparisonFilter<FIELDS>;
|
|
312
|
+
/**
|
|
313
|
+
* Matches records whose string `field` contains `value` literally. No
|
|
314
|
+
* full-text analyzer is applied.
|
|
315
|
+
*
|
|
316
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
317
|
+
* @param value - Literal text.
|
|
318
|
+
* @param stringComparison - Case handling. Defaults to
|
|
319
|
+
* `StringComparison.CASE_SENSITIVE`.
|
|
320
|
+
* @returns `{ op: 'CONTAINS', field, value, stringComparison }`.
|
|
321
|
+
* @throws TypeError If `stringComparison` is not a {@link StringComparison}
|
|
322
|
+
* member, `field` is not a valid query field path, or `value` is not a string.
|
|
323
|
+
* @example
|
|
324
|
+
* ```typescript
|
|
325
|
+
* filter.contains('state.note', 'vip', StringComparison.CASE_INSENSITIVE);
|
|
326
|
+
* ```
|
|
327
|
+
*/
|
|
328
|
+
contains<FIELDS extends string>(field: FIELDS, value: string, stringComparison?: StringComparison): StringFilter<FIELDS>;
|
|
329
|
+
/**
|
|
330
|
+
* Matches records whose string `field` starts with `value` literally. No
|
|
331
|
+
* full-text analyzer is applied.
|
|
332
|
+
*
|
|
333
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
334
|
+
* @param value - Literal text.
|
|
335
|
+
* @param stringComparison - Case handling. Defaults to
|
|
336
|
+
* `StringComparison.CASE_SENSITIVE`.
|
|
337
|
+
* @returns `{ op: 'STARTS_WITH', field, value, stringComparison }`.
|
|
338
|
+
* @throws TypeError If `stringComparison` is not a {@link StringComparison}
|
|
339
|
+
* member, `field` is not a valid query field path, or `value` is not a string.
|
|
340
|
+
* @example
|
|
341
|
+
* ```typescript
|
|
342
|
+
* filter.startsWith('state.note', 'VIP-', StringComparison.CASE_INSENSITIVE);
|
|
343
|
+
* ```
|
|
344
|
+
*/
|
|
345
|
+
startsWith<FIELDS extends string>(field: FIELDS, value: string, stringComparison?: StringComparison): StringFilter<FIELDS>;
|
|
346
|
+
/**
|
|
347
|
+
* Matches records whose string `field` ends with `value` literally. No
|
|
348
|
+
* full-text analyzer is applied.
|
|
349
|
+
*
|
|
350
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
351
|
+
* @param value - Literal text.
|
|
352
|
+
* @param stringComparison - Case handling. Defaults to
|
|
353
|
+
* `StringComparison.CASE_SENSITIVE`.
|
|
354
|
+
* @returns `{ op: 'ENDS_WITH', field, value, stringComparison }`.
|
|
355
|
+
* @throws TypeError If `stringComparison` is not a {@link StringComparison}
|
|
356
|
+
* member, `field` is not a valid query field path, or `value` is not a string.
|
|
357
|
+
* @example
|
|
358
|
+
* ```typescript
|
|
359
|
+
* filter.endsWith('state.note', '.pdf', StringComparison.CASE_INSENSITIVE);
|
|
360
|
+
* ```
|
|
361
|
+
*/
|
|
362
|
+
endsWith<FIELDS extends string>(field: FIELDS, value: string, stringComparison?: StringComparison): StringFilter<FIELDS>;
|
|
363
|
+
/**
|
|
364
|
+
* Matches records whose `field` equals one of `values`.
|
|
365
|
+
*
|
|
366
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
367
|
+
* @param values - Non-empty list of non-null JSON scalars.
|
|
368
|
+
* @returns `{ op: 'IN', field, values }` with a copy of `values`.
|
|
369
|
+
* @throws TypeError If `values` is empty, contains `null` or `undefined`,
|
|
370
|
+
* or contains a value that is not a string, a boolean or a finite
|
|
371
|
+
* number, or if `field` is not a valid query field path.
|
|
372
|
+
* @example
|
|
373
|
+
* ```typescript
|
|
374
|
+
* filter.isIn('state.status', ['PAID', 'SHIPPED']);
|
|
375
|
+
* ```
|
|
376
|
+
*/
|
|
377
|
+
isIn<FIELDS extends string>(field: FIELDS, values: readonly ComparableFilterLiteral[]): CollectionFilter<FIELDS>;
|
|
378
|
+
/**
|
|
379
|
+
* Matches records whose `field` equals none of `values`.
|
|
380
|
+
*
|
|
381
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
382
|
+
* @param values - Non-empty list of non-null JSON scalars.
|
|
383
|
+
* @returns `{ op: 'NOT_IN', field, values }` with a copy of `values`.
|
|
384
|
+
* @throws TypeError If `values` is empty, contains `null` or `undefined`,
|
|
385
|
+
* or contains a value that is not a string, a boolean or a finite
|
|
386
|
+
* number, or if `field` is not a valid query field path.
|
|
387
|
+
* @example
|
|
388
|
+
* ```typescript
|
|
389
|
+
* filter.notIn('state.status', ['CANCELLED', 'REFUNDED']);
|
|
390
|
+
* ```
|
|
391
|
+
*/
|
|
392
|
+
notIn<FIELDS extends string>(field: FIELDS, values: readonly ComparableFilterLiteral[]): CollectionFilter<FIELDS>;
|
|
393
|
+
/**
|
|
394
|
+
* Matches records whose array `field` contains every value in `values`.
|
|
395
|
+
*
|
|
396
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
397
|
+
* @param values - Non-empty list of non-null JSON scalars.
|
|
398
|
+
* @returns `{ op: 'CONTAINS_ALL', field, values }` with a copy of `values`.
|
|
399
|
+
* @throws TypeError If `values` is empty, contains `null` or `undefined`,
|
|
400
|
+
* or contains a value that is not a string, a boolean or a finite
|
|
401
|
+
* number, or if `field` is not a valid query field path.
|
|
402
|
+
* @example
|
|
403
|
+
* ```typescript
|
|
404
|
+
* filter.containsAll('state.tags', ['vip', 'new']);
|
|
405
|
+
* ```
|
|
406
|
+
*/
|
|
407
|
+
containsAll<FIELDS extends string>(field: FIELDS, values: readonly ComparableFilterLiteral[]): CollectionFilter<FIELDS>;
|
|
408
|
+
/**
|
|
409
|
+
* Matches records whose `field` lies in the inclusive range
|
|
410
|
+
* `lowerBound <= field <= upperBound`.
|
|
411
|
+
*
|
|
412
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
413
|
+
* @param lowerBound - Inclusive lower bound; non-null JSON scalar.
|
|
414
|
+
* @param upperBound - Inclusive upper bound; non-null JSON scalar.
|
|
415
|
+
* @returns `{ op: 'BETWEEN', field, lowerBound, upperBound }`.
|
|
416
|
+
* @throws TypeError If `field` is not a valid query field path, or either bound is not a
|
|
417
|
+
* string, a boolean or a finite number.
|
|
418
|
+
* @example
|
|
419
|
+
* ```typescript
|
|
420
|
+
* filter.between('state.total', 100, 200);
|
|
421
|
+
* ```
|
|
422
|
+
*/
|
|
423
|
+
between<FIELDS extends string>(field: FIELDS, lowerBound: ComparableFilterLiteral, upperBound: ComparableFilterLiteral): BetweenFilter<FIELDS>;
|
|
424
|
+
/**
|
|
425
|
+
* Matches records whose array `field` is empty. On Elasticsearch it may also
|
|
426
|
+
* match a missing or `null` field.
|
|
427
|
+
*
|
|
428
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
429
|
+
* @returns `{ op: 'IS_EMPTY', field }`.
|
|
430
|
+
* @throws TypeError If `field` is not a valid query field path.
|
|
431
|
+
* @example
|
|
432
|
+
* ```typescript
|
|
433
|
+
* filter.isEmpty('state.items');
|
|
434
|
+
* ```
|
|
435
|
+
*/
|
|
436
|
+
isEmpty<FIELDS extends string>(field: FIELDS): FieldPresenceFilter<FIELDS>;
|
|
437
|
+
/**
|
|
438
|
+
* Matches records whose string `field` equals `""`. Whitespace-only
|
|
439
|
+
* strings do not match.
|
|
440
|
+
*
|
|
441
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
442
|
+
* @returns `{ op: 'IS_EMPTY_STRING', field }`.
|
|
443
|
+
* @throws TypeError If `field` is not a valid query field path.
|
|
444
|
+
* @example
|
|
445
|
+
* ```typescript
|
|
446
|
+
* filter.isEmptyString('state.note');
|
|
447
|
+
* ```
|
|
448
|
+
*/
|
|
449
|
+
isEmptyString<FIELDS extends string>(field: FIELDS): FieldPresenceFilter<FIELDS>;
|
|
450
|
+
/**
|
|
451
|
+
* Matches records whose string `field` exists, is not `null` and is not
|
|
452
|
+
* `""`.
|
|
453
|
+
*
|
|
454
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
455
|
+
* @returns `{ op: 'IS_NOT_EMPTY_STRING', field }`.
|
|
456
|
+
* @throws TypeError If `field` is not a valid query field path.
|
|
457
|
+
* @example
|
|
458
|
+
* ```typescript
|
|
459
|
+
* filter.isNotEmptyString('state.note');
|
|
460
|
+
* ```
|
|
461
|
+
*/
|
|
462
|
+
isNotEmptyString<FIELDS extends string>(field: FIELDS): FieldPresenceFilter<FIELDS>;
|
|
463
|
+
/**
|
|
464
|
+
* Matches records whose `field` is `null` or missing, following the
|
|
465
|
+
* backend's null semantics.
|
|
466
|
+
*
|
|
467
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
468
|
+
* @returns `{ op: 'IS_NULL', field }`.
|
|
469
|
+
* @throws TypeError If `field` is not a valid query field path.
|
|
470
|
+
* @example
|
|
471
|
+
* ```typescript
|
|
472
|
+
* filter.isNull('state.note');
|
|
473
|
+
* ```
|
|
474
|
+
*/
|
|
475
|
+
isNull<FIELDS extends string>(field: FIELDS): FieldPresenceFilter<FIELDS>;
|
|
476
|
+
/**
|
|
477
|
+
* Matches records whose `field` exists and is not `null`, following the
|
|
478
|
+
* backend's null semantics.
|
|
479
|
+
*
|
|
480
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
481
|
+
* @returns `{ op: 'IS_NOT_NULL', field }`.
|
|
482
|
+
* @throws TypeError If `field` is not a valid query field path.
|
|
483
|
+
* @example
|
|
484
|
+
* ```typescript
|
|
485
|
+
* filter.isNotNull('state.note');
|
|
486
|
+
* ```
|
|
487
|
+
*/
|
|
488
|
+
isNotNull<FIELDS extends string>(field: FIELDS): FieldPresenceFilter<FIELDS>;
|
|
489
|
+
/**
|
|
490
|
+
* Matches records where `field` exists. On MongoDB this includes a `null`
|
|
491
|
+
* value.
|
|
492
|
+
*
|
|
493
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
494
|
+
* @returns `{ op: 'EXISTS', field }`.
|
|
495
|
+
* @throws TypeError If `field` is not a valid query field path.
|
|
496
|
+
* @example
|
|
497
|
+
* ```typescript
|
|
498
|
+
* filter.exists('state.note');
|
|
499
|
+
* ```
|
|
500
|
+
*/
|
|
501
|
+
exists<FIELDS extends string>(field: FIELDS): FieldPresenceFilter<FIELDS>;
|
|
502
|
+
/**
|
|
503
|
+
* Matches records where `field` is missing.
|
|
504
|
+
*
|
|
505
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
506
|
+
* @returns `{ op: 'NOT_EXISTS', field }`.
|
|
507
|
+
* @throws TypeError If `field` is not a valid query field path.
|
|
508
|
+
* @example
|
|
509
|
+
* ```typescript
|
|
510
|
+
* filter.notExists('state.note');
|
|
511
|
+
* ```
|
|
512
|
+
*/
|
|
513
|
+
notExists<FIELDS extends string>(field: FIELDS): FieldPresenceFilter<FIELDS>;
|
|
514
|
+
/**
|
|
515
|
+
* Matches snapshots by deletion state. An explicit `DELETION` at the root or
|
|
516
|
+
* in a root `AND` replaces the gateway's default `ACTIVE` scope. Root-only:
|
|
517
|
+
* not allowed inside `elementMatch`.
|
|
518
|
+
*
|
|
519
|
+
* @param state - `ACTIVE`, `DELETED` or `ALL`.
|
|
520
|
+
* @returns `{ op: 'DELETION', state }`.
|
|
521
|
+
* @throws TypeError If `state` is not a {@link DeletionState} member.
|
|
522
|
+
* @example
|
|
523
|
+
* ```typescript
|
|
524
|
+
* filter.deletion(DeletionState.ALL);
|
|
525
|
+
* ```
|
|
526
|
+
*/
|
|
527
|
+
deletion(state: DeletionState): DeletionFilter;
|
|
528
|
+
/**
|
|
529
|
+
* Matches records where a single element of the array `field` satisfies
|
|
530
|
+
* `predicate`. Fields in `predicate` are relative to the element.
|
|
531
|
+
*
|
|
532
|
+
* @param field - Query field path of the array, e.g. `state.items`.
|
|
533
|
+
* @param predicate - Element-scoped filter expression.
|
|
534
|
+
* @returns `{ op: 'ELEMENT_MATCH', field, predicate }`.
|
|
535
|
+
* A `SEARCH` inside it must name the fields it searches, relative to the
|
|
536
|
+
* element (Wow 9.2 and later, where the descriptor lists
|
|
537
|
+
* `elements[].search`); a model-wide `SEARCH` is a root filter.
|
|
538
|
+
*
|
|
539
|
+
* @throws TypeError If `predicate` contains, at any depth, a root-only filter
|
|
540
|
+
* (`ID`, `IDS`, `AGGREGATE_ID`, `AGGREGATE_IDS`, `TENANT_ID`, `OWNER_ID`,
|
|
541
|
+
* `SPACE_ID`, `DELETION` or a `SEARCH` without fields) or an `AND`, `OR`
|
|
542
|
+
* or `NOR` whose operands are empty or contain `null`, or if `field` is
|
|
543
|
+
* not a valid query field path.
|
|
544
|
+
* @example
|
|
545
|
+
* ```typescript
|
|
546
|
+
* filter.elementMatch('state.items', filter.gt('quantity', 1));
|
|
547
|
+
* filter.elementMatch(
|
|
548
|
+
* 'state.items',
|
|
549
|
+
* filter.search('usb cable', { fields: ['productName'] }),
|
|
550
|
+
* );
|
|
551
|
+
* ```
|
|
552
|
+
*/
|
|
553
|
+
elementMatch<FIELDS extends string, ELEMENT_FIELDS extends string>(field: FIELDS, predicate: ElementFilterExpression<ELEMENT_FIELDS>): ElementMatchFilter<FIELDS, ELEMENT_FIELDS>;
|
|
554
|
+
/**
|
|
555
|
+
* Matches records by full-text search. Tokenization and matching depend on
|
|
556
|
+
* the backend's analyzer. Inside `elementMatch` it must name its fields,
|
|
557
|
+
* relative to the element; with fields given as a non-empty array literal
|
|
558
|
+
* it returns an {@link ElementSearchFilter}, which `elementMatch` takes.
|
|
559
|
+
*
|
|
560
|
+
* @param query - Search text.
|
|
561
|
+
* @param options - Optional `fields` (defaults to `[]`, the backend's default
|
|
562
|
+
* search fields) and `mode` (defaults to `SearchMode.TERMS`).
|
|
563
|
+
* @returns `{ op: 'SEARCH', query, mode, fields }`.
|
|
564
|
+
* @throws TypeError If `query` is not a string or is blank, `options` is
|
|
565
|
+
* given but is `null`, an array or not an object, `mode` is not a
|
|
566
|
+
* {@link SearchMode} member, or any of `fields` is not a valid query field
|
|
567
|
+
* path.
|
|
568
|
+
* @example
|
|
569
|
+
* ```typescript
|
|
570
|
+
* filter.search('event sourcing', {
|
|
571
|
+
* fields: ['state.description'],
|
|
572
|
+
* mode: SearchMode.PHRASE,
|
|
573
|
+
* });
|
|
574
|
+
* ```
|
|
575
|
+
*/
|
|
576
|
+
search: SearchBuilder;
|
|
577
|
+
/**
|
|
578
|
+
* Matches times within today, as the half-open range `[start, end)` in the
|
|
579
|
+
* configured time zone.
|
|
580
|
+
*
|
|
581
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
582
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
583
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
584
|
+
* `TimeUnit.MILLISECONDS`.
|
|
585
|
+
* @returns `{ op: 'TODAY', field, timeUnit }`, plus `zoneId` and
|
|
586
|
+
* `datePattern` when set.
|
|
587
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
588
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
589
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
590
|
+
* @example
|
|
591
|
+
* ```typescript
|
|
592
|
+
* filter.today('state.createTime', { zoneId: 'Asia/Shanghai' });
|
|
593
|
+
* ```
|
|
594
|
+
*/
|
|
595
|
+
today<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
596
|
+
/**
|
|
597
|
+
* Matches times earlier than today at the local time `time`
|
|
598
|
+
* (`field < today at time`) in the configured time zone.
|
|
599
|
+
*
|
|
600
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
601
|
+
* @param time - 24-hour local time: `HH:mm`, `HH:mm:ss` or `HH:mm:ss.S` with
|
|
602
|
+
* 1 to 9 fraction digits.
|
|
603
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
604
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
605
|
+
* `TimeUnit.MILLISECONDS`.
|
|
606
|
+
* @returns `{ op: 'BEFORE_TODAY', field, time, timeUnit }`, plus `zoneId`
|
|
607
|
+
* and `datePattern` when set.
|
|
608
|
+
* @throws TypeError If `time` is not a string in one of the formats above,
|
|
609
|
+
* `field` is not a valid query field path, `zoneId` is blank or an invalid UTC offset,
|
|
610
|
+
* `datePattern` is blank or not a valid `java.time` pattern, or
|
|
611
|
+
* `timeUnit` is not a {@link TimeUnit} member.
|
|
612
|
+
* @example
|
|
613
|
+
* ```typescript
|
|
614
|
+
* filter.beforeToday('state.createTime', '12:00');
|
|
615
|
+
* ```
|
|
616
|
+
*/
|
|
617
|
+
beforeToday<FIELDS extends string>(field: FIELDS, time: string, options?: RelativeTimeFilterOptions): BeforeTodayFilter<FIELDS>;
|
|
618
|
+
/**
|
|
619
|
+
* Matches times within tomorrow, as the half-open range `[start, end)` in the
|
|
620
|
+
* configured time zone.
|
|
621
|
+
*
|
|
622
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
623
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
624
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
625
|
+
* `TimeUnit.MILLISECONDS`.
|
|
626
|
+
* @returns `{ op: 'TOMORROW', field, timeUnit }`, plus `zoneId` and
|
|
627
|
+
* `datePattern` when set.
|
|
628
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
629
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
630
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
631
|
+
* @example
|
|
632
|
+
* ```typescript
|
|
633
|
+
* filter.tomorrow('state.createTime');
|
|
634
|
+
* ```
|
|
635
|
+
*/
|
|
636
|
+
tomorrow<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
637
|
+
/**
|
|
638
|
+
* Matches times within the current Monday-start week, as the half-open range `[start, end)` in the
|
|
639
|
+
* configured time zone.
|
|
640
|
+
*
|
|
641
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
642
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
643
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
644
|
+
* `TimeUnit.MILLISECONDS`.
|
|
645
|
+
* @returns `{ op: 'THIS_WEEK', field, timeUnit }`, plus `zoneId` and
|
|
646
|
+
* `datePattern` when set.
|
|
647
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
648
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
649
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
650
|
+
* @example
|
|
651
|
+
* ```typescript
|
|
652
|
+
* filter.thisWeek('state.createTime');
|
|
653
|
+
* ```
|
|
654
|
+
*/
|
|
655
|
+
thisWeek<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
656
|
+
/**
|
|
657
|
+
* Matches times within the next Monday-start week, as the half-open range `[start, end)` in the
|
|
658
|
+
* configured time zone.
|
|
659
|
+
*
|
|
660
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
661
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
662
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
663
|
+
* `TimeUnit.MILLISECONDS`.
|
|
664
|
+
* @returns `{ op: 'NEXT_WEEK', field, timeUnit }`, plus `zoneId` and
|
|
665
|
+
* `datePattern` when set.
|
|
666
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
667
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
668
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
669
|
+
* @example
|
|
670
|
+
* ```typescript
|
|
671
|
+
* filter.nextWeek('state.createTime');
|
|
672
|
+
* ```
|
|
673
|
+
*/
|
|
674
|
+
nextWeek<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
675
|
+
/**
|
|
676
|
+
* Matches times within the previous Monday-start week, as the half-open range `[start, end)` in the
|
|
677
|
+
* configured time zone.
|
|
678
|
+
*
|
|
679
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
680
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
681
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
682
|
+
* `TimeUnit.MILLISECONDS`.
|
|
683
|
+
* @returns `{ op: 'LAST_WEEK', field, timeUnit }`, plus `zoneId` and
|
|
684
|
+
* `datePattern` when set.
|
|
685
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
686
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
687
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
688
|
+
* @example
|
|
689
|
+
* ```typescript
|
|
690
|
+
* filter.lastWeek('state.createTime');
|
|
691
|
+
* ```
|
|
692
|
+
*/
|
|
693
|
+
lastWeek<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
694
|
+
/**
|
|
695
|
+
* Matches times within the current calendar month, as the half-open range `[start, end)` in the
|
|
696
|
+
* configured time zone.
|
|
697
|
+
*
|
|
698
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
699
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
700
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
701
|
+
* `TimeUnit.MILLISECONDS`.
|
|
702
|
+
* @returns `{ op: 'THIS_MONTH', field, timeUnit }`, plus `zoneId` and
|
|
703
|
+
* `datePattern` when set.
|
|
704
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
705
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
706
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
707
|
+
* @example
|
|
708
|
+
* ```typescript
|
|
709
|
+
* filter.thisMonth('state.createTime');
|
|
710
|
+
* ```
|
|
711
|
+
*/
|
|
712
|
+
thisMonth<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
713
|
+
/**
|
|
714
|
+
* Matches times within the previous calendar month, as the half-open range `[start, end)` in the
|
|
715
|
+
* configured time zone.
|
|
716
|
+
*
|
|
717
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
718
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
719
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
720
|
+
* `TimeUnit.MILLISECONDS`.
|
|
721
|
+
* @returns `{ op: 'LAST_MONTH', field, timeUnit }`, plus `zoneId` and
|
|
722
|
+
* `datePattern` when set.
|
|
723
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
724
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
725
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
726
|
+
* @example
|
|
727
|
+
* ```typescript
|
|
728
|
+
* filter.lastMonth('state.createTime');
|
|
729
|
+
* ```
|
|
730
|
+
*/
|
|
731
|
+
lastMonth<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
732
|
+
/**
|
|
733
|
+
* Matches times within yesterday, as the half-open range `[start, end)` in the
|
|
734
|
+
* configured time zone.
|
|
735
|
+
*
|
|
736
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
737
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
738
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
739
|
+
* `TimeUnit.MILLISECONDS`.
|
|
740
|
+
* @returns `{ op: 'YESTERDAY', field, timeUnit }`, plus `zoneId` and
|
|
741
|
+
* `datePattern` when set.
|
|
742
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
743
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
744
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
745
|
+
* @example
|
|
746
|
+
* ```typescript
|
|
747
|
+
* filter.yesterday('state.createTime');
|
|
748
|
+
* ```
|
|
749
|
+
*/
|
|
750
|
+
yesterday<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
751
|
+
/**
|
|
752
|
+
* Matches times within the next calendar month, as the half-open range `[start, end)` in the
|
|
753
|
+
* configured time zone.
|
|
754
|
+
*
|
|
755
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
756
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
757
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
758
|
+
* `TimeUnit.MILLISECONDS`.
|
|
759
|
+
* @returns `{ op: 'NEXT_MONTH', field, timeUnit }`, plus `zoneId` and
|
|
760
|
+
* `datePattern` when set.
|
|
761
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
762
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
763
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
764
|
+
* @example
|
|
765
|
+
* ```typescript
|
|
766
|
+
* filter.nextMonth('state.createTime');
|
|
767
|
+
* ```
|
|
768
|
+
*/
|
|
769
|
+
nextMonth<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
770
|
+
/**
|
|
771
|
+
* Matches times within the previous calendar year, as the half-open range `[start, end)` in the
|
|
772
|
+
* configured time zone.
|
|
773
|
+
*
|
|
774
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
775
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
776
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
777
|
+
* `TimeUnit.MILLISECONDS`.
|
|
778
|
+
* @returns `{ op: 'LAST_YEAR', field, timeUnit }`, plus `zoneId` and
|
|
779
|
+
* `datePattern` when set.
|
|
780
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
781
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
782
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
783
|
+
* @example
|
|
784
|
+
* ```typescript
|
|
785
|
+
* filter.lastYear('state.createTime');
|
|
786
|
+
* ```
|
|
787
|
+
*/
|
|
788
|
+
lastYear<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
789
|
+
/**
|
|
790
|
+
* Matches times within the current calendar year, as the half-open range `[start, end)` in the
|
|
791
|
+
* configured time zone.
|
|
792
|
+
*
|
|
793
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
794
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
795
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
796
|
+
* `TimeUnit.MILLISECONDS`.
|
|
797
|
+
* @returns `{ op: 'THIS_YEAR', field, timeUnit }`, plus `zoneId` and
|
|
798
|
+
* `datePattern` when set.
|
|
799
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
800
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
801
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
802
|
+
* @example
|
|
803
|
+
* ```typescript
|
|
804
|
+
* filter.thisYear('state.createTime', { timeUnit: TimeUnit.SECONDS });
|
|
805
|
+
* ```
|
|
806
|
+
*/
|
|
807
|
+
thisYear<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
808
|
+
/**
|
|
809
|
+
* Matches times within the next calendar year, as the half-open range `[start, end)` in the
|
|
810
|
+
* configured time zone.
|
|
811
|
+
*
|
|
812
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
813
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
814
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
815
|
+
* `TimeUnit.MILLISECONDS`.
|
|
816
|
+
* @returns `{ op: 'NEXT_YEAR', field, timeUnit }`, plus `zoneId` and
|
|
817
|
+
* `datePattern` when set.
|
|
818
|
+
* @throws TypeError If `field` is not a valid query field path, `zoneId` is blank or an
|
|
819
|
+
* invalid UTC offset, `datePattern` is blank or not a valid
|
|
820
|
+
* `java.time` pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
821
|
+
* @example
|
|
822
|
+
* ```typescript
|
|
823
|
+
* filter.nextYear('state.createTime');
|
|
824
|
+
* ```
|
|
825
|
+
*/
|
|
826
|
+
nextYear<FIELDS extends string>(field: FIELDS, options?: RelativeTimeFilterOptions): CalendarFilter<FIELDS>;
|
|
827
|
+
/**
|
|
828
|
+
* Matches times from the start of the day `days - 1` days ago until the end
|
|
829
|
+
* of today. `recentDays(field, 7)` covers today and the six previous days.
|
|
830
|
+
*
|
|
831
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
832
|
+
* @param days - Number of calendar days, including today; an integer from
|
|
833
|
+
* 1 to 2147483647.
|
|
834
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
835
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
836
|
+
* `TimeUnit.MILLISECONDS`.
|
|
837
|
+
* @returns `{ op: 'RECENT_DAYS', field, days, timeUnit }`, plus `zoneId` and
|
|
838
|
+
* `datePattern` when set.
|
|
839
|
+
* @throws TypeError If `days` is not an integer from 1 to 2147483647,
|
|
840
|
+
* `field` is not a valid query field path, `zoneId` is blank or an invalid UTC offset,
|
|
841
|
+
* `datePattern` is blank or not a valid `java.time` pattern, or
|
|
842
|
+
* `timeUnit` is not a {@link TimeUnit} member.
|
|
843
|
+
* @example
|
|
844
|
+
* ```typescript
|
|
845
|
+
* filter.recentDays('state.createTime', 7);
|
|
846
|
+
* ```
|
|
847
|
+
*/
|
|
848
|
+
recentDays<FIELDS extends string>(field: FIELDS, days: number, options?: RelativeTimeFilterOptions): DaysFilter<FIELDS>;
|
|
849
|
+
/**
|
|
850
|
+
* Matches times before the start of the day `days - 1` days ago, that is,
|
|
851
|
+
* before the window that `recentDays` covers with the same `days`.
|
|
852
|
+
*
|
|
853
|
+
* @param field - Query field path, e.g. `state.status`.
|
|
854
|
+
* @param days - Number of calendar days, including today; an integer from
|
|
855
|
+
* 1 to 2147483647.
|
|
856
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
857
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
858
|
+
* `TimeUnit.MILLISECONDS`.
|
|
859
|
+
* @returns `{ op: 'EARLIER_DAYS', field, days, timeUnit }`, plus `zoneId` and
|
|
860
|
+
* `datePattern` when set.
|
|
861
|
+
* @throws TypeError If `days` is not an integer from 1 to 2147483647,
|
|
862
|
+
* `field` is not a valid query field path, `zoneId` is blank or an invalid UTC offset,
|
|
863
|
+
* `datePattern` is blank or not a valid `java.time` pattern, or
|
|
864
|
+
* `timeUnit` is not a {@link TimeUnit} member.
|
|
865
|
+
* @example
|
|
866
|
+
* ```typescript
|
|
867
|
+
* filter.earlierDays('state.createTime', 7);
|
|
868
|
+
* ```
|
|
869
|
+
*/
|
|
870
|
+
earlierDays<FIELDS extends string>(field: FIELDS, days: number, options?: RelativeTimeFilterOptions): DaysFilter<FIELDS>;
|
|
871
|
+
/**
|
|
872
|
+
* Matches times strictly before the server's `now + offset`
|
|
873
|
+
* (`field < now + offset`). The server reads its clock once per query,
|
|
874
|
+
* so a saved query never depends on the client's clock, and the moment is
|
|
875
|
+
* encoded the way the field stores time: an epoch in `timeUnit`, or text
|
|
876
|
+
* in `datePattern` and `zoneId`.
|
|
877
|
+
*
|
|
878
|
+
* Needs a Wow server of 9.2.0 or later; an earlier one refuses `BEFORE_NOW`.
|
|
879
|
+
*
|
|
880
|
+
* @param field - Query field path, e.g. `state.timeoutAt`.
|
|
881
|
+
* @param offset - ISO-8601 duration added to now, as
|
|
882
|
+
* `java.time.Duration.parse` reads it: days, hours, minutes and seconds,
|
|
883
|
+
* each optionally signed, e.g. `PT0S`, `-PT30M` or `P1DT2H`. A negative
|
|
884
|
+
* offset looks back. Defaults to `PT0S`, now itself.
|
|
885
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
886
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
887
|
+
* `TimeUnit.MILLISECONDS`.
|
|
888
|
+
* @returns `{ op: 'BEFORE_NOW', field, offset, timeUnit }`, plus `zoneId` and
|
|
889
|
+
* `datePattern` when set.
|
|
890
|
+
* @throws TypeError If `offset` is not an ISO-8601 duration in that
|
|
891
|
+
* grammar, `field` is not a valid query field path, `zoneId` is blank or
|
|
892
|
+
* an invalid UTC offset, `datePattern` is blank or not a valid `java.time`
|
|
893
|
+
* pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
894
|
+
* @example
|
|
895
|
+
* ```typescript
|
|
896
|
+
* // Timed out: the deadline has passed.
|
|
897
|
+
* filter.beforeNow('state.timeoutAt');
|
|
898
|
+
* ```
|
|
899
|
+
*/
|
|
900
|
+
beforeNow<FIELDS extends string>(field: FIELDS, offset?: string, options?: RelativeTimeFilterOptions): NowFilter<FIELDS>;
|
|
901
|
+
/**
|
|
902
|
+
* Matches times strictly after the server's `now + offset`
|
|
903
|
+
* (`field > now + offset`). The server reads its clock once per query,
|
|
904
|
+
* so a saved query never depends on the client's clock, and the moment is
|
|
905
|
+
* encoded the way the field stores time: an epoch in `timeUnit`, or text
|
|
906
|
+
* in `datePattern` and `zoneId`.
|
|
907
|
+
*
|
|
908
|
+
* Needs a Wow server of 9.2.0 or later; an earlier one refuses `AFTER_NOW`.
|
|
909
|
+
*
|
|
910
|
+
* @param field - Query field path, e.g. `state.timeoutAt`.
|
|
911
|
+
* @param offset - ISO-8601 duration added to now, as
|
|
912
|
+
* `java.time.Duration.parse` reads it: days, hours, minutes and seconds,
|
|
913
|
+
* each optionally signed, e.g. `PT0S`, `-PT30M` or `P1DT2H`. A negative
|
|
914
|
+
* offset looks back. Defaults to `PT0S`, now itself.
|
|
915
|
+
* @param options - Optional `zoneId`, `datePattern` and `timeUnit`; see
|
|
916
|
+
* {@link RelativeTimeFilterOptions}. `timeUnit` defaults to
|
|
917
|
+
* `TimeUnit.MILLISECONDS`.
|
|
918
|
+
* @returns `{ op: 'AFTER_NOW', field, offset, timeUnit }`, plus `zoneId` and
|
|
919
|
+
* `datePattern` when set.
|
|
920
|
+
* @throws TypeError If `offset` is not an ISO-8601 duration in that
|
|
921
|
+
* grammar, `field` is not a valid query field path, `zoneId` is blank or
|
|
922
|
+
* an invalid UTC offset, `datePattern` is blank or not a valid `java.time`
|
|
923
|
+
* pattern, or `timeUnit` is not a {@link TimeUnit} member.
|
|
924
|
+
* @example
|
|
925
|
+
* ```typescript
|
|
926
|
+
* // Created in the last 30 minutes.
|
|
927
|
+
* filter.afterNow('state.createTime', '-PT30M');
|
|
928
|
+
* ```
|
|
929
|
+
*/
|
|
930
|
+
afterNow<FIELDS extends string>(field: FIELDS, offset?: string, options?: RelativeTimeFilterOptions): NowFilter<FIELDS>;
|
|
931
|
+
/**
|
|
932
|
+
* Compares a computed expression with a number, such as the hours from
|
|
933
|
+
* `paidAt` to `shippedAt`. `{ op: 'EXPRESSION', expression, comparison,
|
|
934
|
+
* value }`.
|
|
935
|
+
*
|
|
936
|
+
* The expression is evaluated per record, so this is an expensive
|
|
937
|
+
* operator, admitted where the descriptor lists `EXPRESSION` in
|
|
938
|
+
* `record.rootOperators`. A record whose expression has no value (an
|
|
939
|
+
* operand absent or holding several values, or a division by zero) does
|
|
940
|
+
* not match, whatever the comparison, `NE` included. Allowed at the root,
|
|
941
|
+
* in a metric's filter and in an aggregation element's filter, but not
|
|
942
|
+
* inside `elementMatch`. Needs a Wow server of 9.2.0 or later.
|
|
943
|
+
*
|
|
944
|
+
* @param expression - What is compared; it must read at least one field.
|
|
945
|
+
* @param comparison - How it compares with `value`.
|
|
946
|
+
* @param value - A finite number.
|
|
947
|
+
* @throws TypeError If `value` is not finite, `comparison` is not a
|
|
948
|
+
* {@link ComparisonOperator}, `expression` reads no field, or the tree is
|
|
949
|
+
* too deep or too large.
|
|
950
|
+
* @example
|
|
951
|
+
* ```typescript
|
|
952
|
+
* // Shipped more than two days after it was paid.
|
|
953
|
+
* filter.expression(
|
|
954
|
+
* aggregation.dateDiff('state.paidAt', 'state.shippedAt', DateDiffUnit.HOUR),
|
|
955
|
+
* ComparisonOperator.GT,
|
|
956
|
+
* 48,
|
|
957
|
+
* );
|
|
958
|
+
* ```
|
|
959
|
+
*/
|
|
960
|
+
expression<FIELDS extends string>(expression: AggregationExpression<FIELDS>, comparison: ComparisonOperator, value: number): ExpressionFilter<FIELDS>;
|
|
961
|
+
};
|
|
962
|
+
export {};
|