@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,68 @@
|
|
|
1
|
+
import { Condition, ListQueryRequest, PagedQueryRequest, SingleQueryRequest } from './requests.js';
|
|
2
|
+
import { PagedList } from '../../dsl/queryable.js';
|
|
3
|
+
import { AggregationQuery } from '../../dsl/aggregation/index.js';
|
|
4
|
+
import { FilterExpression } from '../../dsl/filter/index.js';
|
|
5
|
+
import { DynamicDocument } from '../../dsl/documents.js';
|
|
6
|
+
import { CursorPage, CursorQuery } from '../../dsl/cursorQuery.js';
|
|
7
|
+
/**
|
|
8
|
+
* Interface for generic query API operations.
|
|
9
|
+
* Provides methods for querying resources in different ways including single item retrieval,
|
|
10
|
+
* list retrieval, streaming lists, paged retrieval, and counting.
|
|
11
|
+
*
|
|
12
|
+
* @see {@link EventStreamQueryApi}
|
|
13
|
+
* @see {@link SnapshotQueryApi}
|
|
14
|
+
* @template R - The type of resource being queried
|
|
15
|
+
*/
|
|
16
|
+
export interface QueryApi<R, FIELDS extends string = string> {
|
|
17
|
+
/** Retrieves the next forward-only cursor page. */
|
|
18
|
+
cursor<T extends Partial<R> = R>(query: CursorQuery<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<CursorPage<T>>;
|
|
19
|
+
/** Runs an aggregation and returns all result rows. */
|
|
20
|
+
aggregate<Row extends object = DynamicDocument, AGGREGATION_FIELDS extends string = string>(query: AggregationQuery<FIELDS, AGGREGATION_FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<Row[]>;
|
|
21
|
+
/** Runs an aggregation and streams the result rows, one per server-sent event. */
|
|
22
|
+
aggregateStream<Row extends object = DynamicDocument, AGGREGATION_FIELDS extends string = string>(query: AggregationQuery<FIELDS, AGGREGATION_FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<ReadableStream<Row>>;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves a single resource based on the provided query parameters.
|
|
25
|
+
* @param singleQuery - The query parameters for retrieving a single resource
|
|
26
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
27
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
28
|
+
* custom data between different interceptors.
|
|
29
|
+
* @returns A promise that resolves to a partial resource
|
|
30
|
+
*/
|
|
31
|
+
single<T extends Partial<R> = R>(singleQuery: SingleQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<T>;
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves a list of resources based on the provided query parameters.
|
|
34
|
+
* @param listQuery - The query parameters for listing resources
|
|
35
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
36
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
37
|
+
* custom data between different interceptors.
|
|
38
|
+
* @returns A promise that resolves to an array of partial resources
|
|
39
|
+
*/
|
|
40
|
+
list<T extends Partial<R> = R>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<T[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves a stream of resources based on the provided query parameters.
|
|
43
|
+
* @param listQuery - The query parameters for listing resources
|
|
44
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
45
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
46
|
+
* custom data between different interceptors.
|
|
47
|
+
* @returns A promise that resolves to a readable stream of partial resources
|
|
48
|
+
*/
|
|
49
|
+
listStream<T extends Partial<R> = R>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<ReadableStream<T>>;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves a paged list of resources based on the provided query parameters.
|
|
52
|
+
* @param pagedQuery - The query parameters for paging resources
|
|
53
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
54
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
55
|
+
* custom data between different interceptors.
|
|
56
|
+
* @returns A promise that resolves to a paged list of partial resources
|
|
57
|
+
*/
|
|
58
|
+
paged<T extends Partial<R> = R>(pagedQuery: PagedQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<PagedList<T>>;
|
|
59
|
+
/**
|
|
60
|
+
* Counts the number of resources that match the given filter or legacy condition.
|
|
61
|
+
* @param filter - The filter expression or legacy condition
|
|
62
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
63
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
64
|
+
* custom data between different interceptors.
|
|
65
|
+
* @returns A promise that resolves to the count of matching resources
|
|
66
|
+
*/
|
|
67
|
+
count(filter: FilterExpression<FIELDS> | Condition<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<number>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ListQuery, PagedQuery, SingleQuery } from '../../legacy/queryable.cjs';
|
|
2
|
+
import { FilterListQuery, FilterPagedQuery, FilterSingleQuery } from '../../dsl/queryable.cjs';
|
|
3
|
+
export type { Condition } from '../../legacy/condition.cjs';
|
|
4
|
+
/**
|
|
5
|
+
* The `single` query bodies the query clients send: a `FilterSingleQuery`, or
|
|
6
|
+
* the Condition-based `SingleQuery` a Wow 8.10 server needs.
|
|
7
|
+
*
|
|
8
|
+
* @deprecated Use FilterSingleQuery instead. Removed in v10.
|
|
9
|
+
*/
|
|
10
|
+
export type SingleQueryRequest<FIELDS extends string = string> = FilterSingleQuery<FIELDS> | SingleQuery<FIELDS>;
|
|
11
|
+
/**
|
|
12
|
+
* The `list` query bodies the query clients send: a `FilterListQuery`, or the
|
|
13
|
+
* Condition-based `ListQuery` a Wow 8.10 server needs.
|
|
14
|
+
*
|
|
15
|
+
* @deprecated Use FilterListQuery instead. Removed in v10.
|
|
16
|
+
*/
|
|
17
|
+
export type ListQueryRequest<FIELDS extends string = string> = FilterListQuery<FIELDS> | ListQuery<FIELDS>;
|
|
18
|
+
/**
|
|
19
|
+
* The `paged` query bodies the query clients send: a `FilterPagedQuery`, or
|
|
20
|
+
* the Condition-based `PagedQuery` a Wow 8.10 server needs.
|
|
21
|
+
*
|
|
22
|
+
* @deprecated Use FilterPagedQuery instead. Removed in v10.
|
|
23
|
+
*/
|
|
24
|
+
export type PagedQueryRequest<FIELDS extends string = string> = FilterPagedQuery<FIELDS> | PagedQuery<FIELDS>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ListQuery, PagedQuery, SingleQuery } from '../../legacy/queryable.js';
|
|
2
|
+
import { FilterListQuery, FilterPagedQuery, FilterSingleQuery } from '../../dsl/queryable.js';
|
|
3
|
+
export type { Condition } from '../../legacy/condition.js';
|
|
4
|
+
/**
|
|
5
|
+
* The `single` query bodies the query clients send: a `FilterSingleQuery`, or
|
|
6
|
+
* the Condition-based `SingleQuery` a Wow 8.10 server needs.
|
|
7
|
+
*
|
|
8
|
+
* @deprecated Use FilterSingleQuery instead. Removed in v10.
|
|
9
|
+
*/
|
|
10
|
+
export type SingleQueryRequest<FIELDS extends string = string> = FilterSingleQuery<FIELDS> | SingleQuery<FIELDS>;
|
|
11
|
+
/**
|
|
12
|
+
* The `list` query bodies the query clients send: a `FilterListQuery`, or the
|
|
13
|
+
* Condition-based `ListQuery` a Wow 8.10 server needs.
|
|
14
|
+
*
|
|
15
|
+
* @deprecated Use FilterListQuery instead. Removed in v10.
|
|
16
|
+
*/
|
|
17
|
+
export type ListQueryRequest<FIELDS extends string = string> = FilterListQuery<FIELDS> | ListQuery<FIELDS>;
|
|
18
|
+
/**
|
|
19
|
+
* The `paged` query bodies the query clients send: a `FilterPagedQuery`, or
|
|
20
|
+
* the Condition-based `PagedQuery` a Wow 8.10 server needs.
|
|
21
|
+
*
|
|
22
|
+
* @deprecated Use FilterPagedQuery instead. Removed in v10.
|
|
23
|
+
*/
|
|
24
|
+
export type PagedQueryRequest<FIELDS extends string = string> = FilterPagedQuery<FIELDS> | PagedQuery<FIELDS>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.freeze({AGGREGATION:`snapshot/aggregation`,COUNT:`snapshot/count`,LIST:`snapshot/list`,LIST_STATE:`snapshot/list/state`,PAGED:`snapshot/paged`,PAGED_STATE:`snapshot/paged/state`,CURSOR:`snapshot/cursor`,CURSOR_STATE:`snapshot/cursor/state`,SINGLE:`snapshot/single`,SINGLE_STATE:`snapshot/single/state`});exports.SnapshotQueryEndpointPaths=e;
|
|
2
|
+
//# sourceMappingURL=endpointPaths.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpointPaths.cjs","names":["SnapshotQueryEndpointPaths"],"sources":["../../../../src/client/query/snapshot/endpointPaths.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: the index of this folder does not re-export this file. The\n// paths are relative to the client's base path.\nexport const SnapshotQueryEndpointPaths = Object.freeze({\n AGGREGATION: 'snapshot/aggregation',\n COUNT: 'snapshot/count',\n LIST: 'snapshot/list',\n LIST_STATE: 'snapshot/list/state',\n PAGED: 'snapshot/paged',\n PAGED_STATE: 'snapshot/paged/state',\n CURSOR: 'snapshot/cursor',\n CURSOR_STATE: 'snapshot/cursor/state',\n SINGLE: 'snapshot/single',\n SINGLE_STATE: 'snapshot/single/state',\n} as const);\n"],"mappings":"AAeA,IAAaA,EAA6B,OAAO,OAAO,CACtD,YAAa,uBACb,MAAO,iBACP,KAAM,gBACN,WAAY,sBACZ,MAAO,iBACP,YAAa,uBACb,OAAQ,kBACR,aAAc,wBACd,OAAQ,kBACR,aAAc,uBAChB,CAAU"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const SnapshotQueryEndpointPaths: Readonly<{
|
|
2
|
+
readonly AGGREGATION: "snapshot/aggregation";
|
|
3
|
+
readonly COUNT: "snapshot/count";
|
|
4
|
+
readonly LIST: "snapshot/list";
|
|
5
|
+
readonly LIST_STATE: "snapshot/list/state";
|
|
6
|
+
readonly PAGED: "snapshot/paged";
|
|
7
|
+
readonly PAGED_STATE: "snapshot/paged/state";
|
|
8
|
+
readonly CURSOR: "snapshot/cursor";
|
|
9
|
+
readonly CURSOR_STATE: "snapshot/cursor/state";
|
|
10
|
+
readonly SINGLE: "snapshot/single";
|
|
11
|
+
readonly SINGLE_STATE: "snapshot/single/state";
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const SnapshotQueryEndpointPaths: Readonly<{
|
|
2
|
+
readonly AGGREGATION: "snapshot/aggregation";
|
|
3
|
+
readonly COUNT: "snapshot/count";
|
|
4
|
+
readonly LIST: "snapshot/list";
|
|
5
|
+
readonly LIST_STATE: "snapshot/list/state";
|
|
6
|
+
readonly PAGED: "snapshot/paged";
|
|
7
|
+
readonly PAGED_STATE: "snapshot/paged/state";
|
|
8
|
+
readonly CURSOR: "snapshot/cursor";
|
|
9
|
+
readonly CURSOR_STATE: "snapshot/cursor/state";
|
|
10
|
+
readonly SINGLE: "snapshot/single";
|
|
11
|
+
readonly SINGLE_STATE: "snapshot/single/state";
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/client/query/snapshot/endpointPaths.ts
|
|
2
|
+
var e = Object.freeze({
|
|
3
|
+
AGGREGATION: "snapshot/aggregation",
|
|
4
|
+
COUNT: "snapshot/count",
|
|
5
|
+
LIST: "snapshot/list",
|
|
6
|
+
LIST_STATE: "snapshot/list/state",
|
|
7
|
+
PAGED: "snapshot/paged",
|
|
8
|
+
PAGED_STATE: "snapshot/paged/state",
|
|
9
|
+
CURSOR: "snapshot/cursor",
|
|
10
|
+
CURSOR_STATE: "snapshot/cursor/state",
|
|
11
|
+
SINGLE: "snapshot/single",
|
|
12
|
+
SINGLE_STATE: "snapshot/single/state"
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { e as SnapshotQueryEndpointPaths };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=endpointPaths.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpointPaths.es.js","names":["SnapshotQueryEndpointPaths"],"sources":["../../../../src/client/query/snapshot/endpointPaths.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: the index of this folder does not re-export this file. The\n// paths are relative to the client's base path.\nexport const SnapshotQueryEndpointPaths = Object.freeze({\n AGGREGATION: 'snapshot/aggregation',\n COUNT: 'snapshot/count',\n LIST: 'snapshot/list',\n LIST_STATE: 'snapshot/list/state',\n PAGED: 'snapshot/paged',\n PAGED_STATE: 'snapshot/paged/state',\n CURSOR: 'snapshot/cursor',\n CURSOR_STATE: 'snapshot/cursor/state',\n SINGLE: 'snapshot/single',\n SINGLE_STATE: 'snapshot/single/state',\n} as const);\n"],"mappings":";AAeA,IAAaA,IAA6B,OAAO,OAAO;CACtD,aAAa;CACb,OAAO;CACP,MAAM;CACN,YAAY;CACZ,OAAO;CACP,aAAa;CACb,QAAQ;CACR,cAAc;CACd,QAAQ;CACR,cAAc;AAChB,CAAU"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.freeze({VERSION:`version`,TENANT_ID:`tenantId`,OWNER_ID:`ownerId`,SPACE_ID:`spaceId`,EVENT_ID:`eventId`,FIRST_EVENT_TIME:`firstEventTime`,EVENT_TIME:`eventTime`,FIRST_OPERATOR:`firstOperator`,OPERATOR:`operator`,SNAPSHOT_TIME:`snapshotTime`,TAGS:`tags`,DELETED:`deleted`,STATE:`state`});exports.SnapshotMetadataFields=e;
|
|
2
|
+
//# sourceMappingURL=snapshot.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.cjs","names":["SnapshotMetadataFields"],"sources":["../../../../src/client/query/snapshot/snapshot.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\nimport type {\n AbacTaggable,\n AggregateId,\n DeletedCapable,\n EventIdCapable,\n EventTimeCapable,\n FirstEventTimeCapable,\n FirstOperatorCapable,\n OperatorCapable,\n OwnerId,\n SnapshotTimeCapable,\n SpaceIdCapable,\n StateCapable,\n TenantId,\n Version,\n} from '../../../model/index.js';\n\n/**\n * Interface for materialized snapshots with full capabilities.\n */\nexport interface MaterializedSnapshot<S>\n extends\n StateCapable<S>,\n AggregateId,\n TenantId,\n OwnerId,\n SpaceIdCapable,\n Version,\n EventIdCapable,\n FirstOperatorCapable,\n OperatorCapable,\n FirstEventTimeCapable,\n EventTimeCapable,\n SnapshotTimeCapable,\n AbacTaggable,\n DeletedCapable {}\n\n/**\n * Interface for materialized snapshots with medium capabilities.\n *\n * Represents a materialized snapshot for medium data, implementing multiple capabilities through inheritance.\n * This interface is designed to be generic, capable of holding state data of any type.\n * Each snapshot corresponds to a specific version of the state within a tenant and owner context,\n * and records information such as event IDs and operation times to support tracing and auditing.\n *\n * Mirrors `MediumMaterializedSnapshot` in\n * `wow-api/src/main/kotlin/me/ahoo/wow/api/query/MediumMaterializedSnapshot.kt`.\n */\nexport interface MediumMaterializedSnapshot<S>\n extends\n StateCapable<S>,\n TenantId,\n OwnerId,\n SpaceIdCapable,\n Version,\n EventIdCapable,\n FirstOperatorCapable,\n OperatorCapable,\n FirstEventTimeCapable,\n EventTimeCapable,\n AbacTaggable {}\n\n/**\n * Interface for simplified materialized snapshots with generic state.\n *\n * This interface implements multiple interfaces to provide version, materialization, first event time, and state information.\n *\n * Mirrors `SmallMaterializedSnapshot` in\n * `wow-api/src/main/kotlin/me/ahoo/wow/api/query/SmallMaterializedSnapshot.kt`.\n */\nexport interface SmallMaterializedSnapshot<S>\n extends StateCapable<S>, Version, FirstEventTimeCapable {}\n\n/**\n * The field names of a materialized snapshot, for filters, sorts and\n * projections over snapshots (`tenantId`, `state`, `deleted`, …).\n *\n * A frozen name table: read `SnapshotMetadataFields.TENANT_ID`; each value is\n * a string literal type.\n */\nexport const SnapshotMetadataFields = Object.freeze({\n VERSION: 'version',\n TENANT_ID: 'tenantId',\n OWNER_ID: 'ownerId',\n SPACE_ID: 'spaceId',\n EVENT_ID: 'eventId',\n FIRST_EVENT_TIME: 'firstEventTime',\n EVENT_TIME: 'eventTime',\n FIRST_OPERATOR: 'firstOperator',\n OPERATOR: 'operator',\n SNAPSHOT_TIME: 'snapshotTime',\n TAGS: 'tags',\n DELETED: 'deleted',\n STATE: 'state',\n} as const);\n"],"mappings":"AA6FA,IAAaA,EAAyB,OAAO,OAAO,CAClD,QAAS,UACT,UAAW,WACX,SAAU,UACV,SAAU,UACV,SAAU,UACV,iBAAkB,iBAClB,WAAY,YACZ,eAAgB,gBAChB,SAAU,WACV,cAAe,eACf,KAAM,OACN,QAAS,UACT,MAAO,OACT,CAAU"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { AbacTaggable, AggregateId, DeletedCapable, EventIdCapable, EventTimeCapable, FirstEventTimeCapable, FirstOperatorCapable, OperatorCapable, OwnerId, SnapshotTimeCapable, SpaceIdCapable, StateCapable, TenantId, Version } from '../../../model/index.cjs';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for materialized snapshots with full capabilities.
|
|
4
|
+
*/
|
|
5
|
+
export interface MaterializedSnapshot<S> extends StateCapable<S>, AggregateId, TenantId, OwnerId, SpaceIdCapable, Version, EventIdCapable, FirstOperatorCapable, OperatorCapable, FirstEventTimeCapable, EventTimeCapable, SnapshotTimeCapable, AbacTaggable, DeletedCapable {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Interface for materialized snapshots with medium capabilities.
|
|
9
|
+
*
|
|
10
|
+
* Represents a materialized snapshot for medium data, implementing multiple capabilities through inheritance.
|
|
11
|
+
* This interface is designed to be generic, capable of holding state data of any type.
|
|
12
|
+
* Each snapshot corresponds to a specific version of the state within a tenant and owner context,
|
|
13
|
+
* and records information such as event IDs and operation times to support tracing and auditing.
|
|
14
|
+
*
|
|
15
|
+
* Mirrors `MediumMaterializedSnapshot` in
|
|
16
|
+
* `wow-api/src/main/kotlin/me/ahoo/wow/api/query/MediumMaterializedSnapshot.kt`.
|
|
17
|
+
*/
|
|
18
|
+
export interface MediumMaterializedSnapshot<S> extends StateCapable<S>, TenantId, OwnerId, SpaceIdCapable, Version, EventIdCapable, FirstOperatorCapable, OperatorCapable, FirstEventTimeCapable, EventTimeCapable, AbacTaggable {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Interface for simplified materialized snapshots with generic state.
|
|
22
|
+
*
|
|
23
|
+
* This interface implements multiple interfaces to provide version, materialization, first event time, and state information.
|
|
24
|
+
*
|
|
25
|
+
* Mirrors `SmallMaterializedSnapshot` in
|
|
26
|
+
* `wow-api/src/main/kotlin/me/ahoo/wow/api/query/SmallMaterializedSnapshot.kt`.
|
|
27
|
+
*/
|
|
28
|
+
export interface SmallMaterializedSnapshot<S> extends StateCapable<S>, Version, FirstEventTimeCapable {
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The field names of a materialized snapshot, for filters, sorts and
|
|
32
|
+
* projections over snapshots (`tenantId`, `state`, `deleted`, …).
|
|
33
|
+
*
|
|
34
|
+
* A frozen name table: read `SnapshotMetadataFields.TENANT_ID`; each value is
|
|
35
|
+
* a string literal type.
|
|
36
|
+
*/
|
|
37
|
+
export declare const SnapshotMetadataFields: Readonly<{
|
|
38
|
+
readonly VERSION: "version";
|
|
39
|
+
readonly TENANT_ID: "tenantId";
|
|
40
|
+
readonly OWNER_ID: "ownerId";
|
|
41
|
+
readonly SPACE_ID: "spaceId";
|
|
42
|
+
readonly EVENT_ID: "eventId";
|
|
43
|
+
readonly FIRST_EVENT_TIME: "firstEventTime";
|
|
44
|
+
readonly EVENT_TIME: "eventTime";
|
|
45
|
+
readonly FIRST_OPERATOR: "firstOperator";
|
|
46
|
+
readonly OPERATOR: "operator";
|
|
47
|
+
readonly SNAPSHOT_TIME: "snapshotTime";
|
|
48
|
+
readonly TAGS: "tags";
|
|
49
|
+
readonly DELETED: "deleted";
|
|
50
|
+
readonly STATE: "state";
|
|
51
|
+
}>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { AbacTaggable, AggregateId, DeletedCapable, EventIdCapable, EventTimeCapable, FirstEventTimeCapable, FirstOperatorCapable, OperatorCapable, OwnerId, SnapshotTimeCapable, SpaceIdCapable, StateCapable, TenantId, Version } from '../../../model/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for materialized snapshots with full capabilities.
|
|
4
|
+
*/
|
|
5
|
+
export interface MaterializedSnapshot<S> extends StateCapable<S>, AggregateId, TenantId, OwnerId, SpaceIdCapable, Version, EventIdCapable, FirstOperatorCapable, OperatorCapable, FirstEventTimeCapable, EventTimeCapable, SnapshotTimeCapable, AbacTaggable, DeletedCapable {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Interface for materialized snapshots with medium capabilities.
|
|
9
|
+
*
|
|
10
|
+
* Represents a materialized snapshot for medium data, implementing multiple capabilities through inheritance.
|
|
11
|
+
* This interface is designed to be generic, capable of holding state data of any type.
|
|
12
|
+
* Each snapshot corresponds to a specific version of the state within a tenant and owner context,
|
|
13
|
+
* and records information such as event IDs and operation times to support tracing and auditing.
|
|
14
|
+
*
|
|
15
|
+
* Mirrors `MediumMaterializedSnapshot` in
|
|
16
|
+
* `wow-api/src/main/kotlin/me/ahoo/wow/api/query/MediumMaterializedSnapshot.kt`.
|
|
17
|
+
*/
|
|
18
|
+
export interface MediumMaterializedSnapshot<S> extends StateCapable<S>, TenantId, OwnerId, SpaceIdCapable, Version, EventIdCapable, FirstOperatorCapable, OperatorCapable, FirstEventTimeCapable, EventTimeCapable, AbacTaggable {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Interface for simplified materialized snapshots with generic state.
|
|
22
|
+
*
|
|
23
|
+
* This interface implements multiple interfaces to provide version, materialization, first event time, and state information.
|
|
24
|
+
*
|
|
25
|
+
* Mirrors `SmallMaterializedSnapshot` in
|
|
26
|
+
* `wow-api/src/main/kotlin/me/ahoo/wow/api/query/SmallMaterializedSnapshot.kt`.
|
|
27
|
+
*/
|
|
28
|
+
export interface SmallMaterializedSnapshot<S> extends StateCapable<S>, Version, FirstEventTimeCapable {
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The field names of a materialized snapshot, for filters, sorts and
|
|
32
|
+
* projections over snapshots (`tenantId`, `state`, `deleted`, …).
|
|
33
|
+
*
|
|
34
|
+
* A frozen name table: read `SnapshotMetadataFields.TENANT_ID`; each value is
|
|
35
|
+
* a string literal type.
|
|
36
|
+
*/
|
|
37
|
+
export declare const SnapshotMetadataFields: Readonly<{
|
|
38
|
+
readonly VERSION: "version";
|
|
39
|
+
readonly TENANT_ID: "tenantId";
|
|
40
|
+
readonly OWNER_ID: "ownerId";
|
|
41
|
+
readonly SPACE_ID: "spaceId";
|
|
42
|
+
readonly EVENT_ID: "eventId";
|
|
43
|
+
readonly FIRST_EVENT_TIME: "firstEventTime";
|
|
44
|
+
readonly EVENT_TIME: "eventTime";
|
|
45
|
+
readonly FIRST_OPERATOR: "firstOperator";
|
|
46
|
+
readonly OPERATOR: "operator";
|
|
47
|
+
readonly SNAPSHOT_TIME: "snapshotTime";
|
|
48
|
+
readonly TAGS: "tags";
|
|
49
|
+
readonly DELETED: "deleted";
|
|
50
|
+
readonly STATE: "state";
|
|
51
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/client/query/snapshot/snapshot.ts
|
|
2
|
+
var e = Object.freeze({
|
|
3
|
+
VERSION: "version",
|
|
4
|
+
TENANT_ID: "tenantId",
|
|
5
|
+
OWNER_ID: "ownerId",
|
|
6
|
+
SPACE_ID: "spaceId",
|
|
7
|
+
EVENT_ID: "eventId",
|
|
8
|
+
FIRST_EVENT_TIME: "firstEventTime",
|
|
9
|
+
EVENT_TIME: "eventTime",
|
|
10
|
+
FIRST_OPERATOR: "firstOperator",
|
|
11
|
+
OPERATOR: "operator",
|
|
12
|
+
SNAPSHOT_TIME: "snapshotTime",
|
|
13
|
+
TAGS: "tags",
|
|
14
|
+
DELETED: "deleted",
|
|
15
|
+
STATE: "state"
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { e as SnapshotMetadataFields };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=snapshot.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.es.js","names":["SnapshotMetadataFields"],"sources":["../../../../src/client/query/snapshot/snapshot.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\nimport type {\n AbacTaggable,\n AggregateId,\n DeletedCapable,\n EventIdCapable,\n EventTimeCapable,\n FirstEventTimeCapable,\n FirstOperatorCapable,\n OperatorCapable,\n OwnerId,\n SnapshotTimeCapable,\n SpaceIdCapable,\n StateCapable,\n TenantId,\n Version,\n} from '../../../model/index.js';\n\n/**\n * Interface for materialized snapshots with full capabilities.\n */\nexport interface MaterializedSnapshot<S>\n extends\n StateCapable<S>,\n AggregateId,\n TenantId,\n OwnerId,\n SpaceIdCapable,\n Version,\n EventIdCapable,\n FirstOperatorCapable,\n OperatorCapable,\n FirstEventTimeCapable,\n EventTimeCapable,\n SnapshotTimeCapable,\n AbacTaggable,\n DeletedCapable {}\n\n/**\n * Interface for materialized snapshots with medium capabilities.\n *\n * Represents a materialized snapshot for medium data, implementing multiple capabilities through inheritance.\n * This interface is designed to be generic, capable of holding state data of any type.\n * Each snapshot corresponds to a specific version of the state within a tenant and owner context,\n * and records information such as event IDs and operation times to support tracing and auditing.\n *\n * Mirrors `MediumMaterializedSnapshot` in\n * `wow-api/src/main/kotlin/me/ahoo/wow/api/query/MediumMaterializedSnapshot.kt`.\n */\nexport interface MediumMaterializedSnapshot<S>\n extends\n StateCapable<S>,\n TenantId,\n OwnerId,\n SpaceIdCapable,\n Version,\n EventIdCapable,\n FirstOperatorCapable,\n OperatorCapable,\n FirstEventTimeCapable,\n EventTimeCapable,\n AbacTaggable {}\n\n/**\n * Interface for simplified materialized snapshots with generic state.\n *\n * This interface implements multiple interfaces to provide version, materialization, first event time, and state information.\n *\n * Mirrors `SmallMaterializedSnapshot` in\n * `wow-api/src/main/kotlin/me/ahoo/wow/api/query/SmallMaterializedSnapshot.kt`.\n */\nexport interface SmallMaterializedSnapshot<S>\n extends StateCapable<S>, Version, FirstEventTimeCapable {}\n\n/**\n * The field names of a materialized snapshot, for filters, sorts and\n * projections over snapshots (`tenantId`, `state`, `deleted`, …).\n *\n * A frozen name table: read `SnapshotMetadataFields.TENANT_ID`; each value is\n * a string literal type.\n */\nexport const SnapshotMetadataFields = Object.freeze({\n VERSION: 'version',\n TENANT_ID: 'tenantId',\n OWNER_ID: 'ownerId',\n SPACE_ID: 'spaceId',\n EVENT_ID: 'eventId',\n FIRST_EVENT_TIME: 'firstEventTime',\n EVENT_TIME: 'eventTime',\n FIRST_OPERATOR: 'firstOperator',\n OPERATOR: 'operator',\n SNAPSHOT_TIME: 'snapshotTime',\n TAGS: 'tags',\n DELETED: 'deleted',\n STATE: 'state',\n} as const);\n"],"mappings":";AA6FA,IAAaA,IAAyB,OAAO,OAAO;CAClD,SAAS;CACT,WAAW;CACX,UAAU;CACV,UAAU;CACV,UAAU;CACV,kBAAkB;CAClB,YAAY;CACZ,gBAAgB;CAChB,UAAU;CACV,eAAe;CACf,MAAM;CACN,SAAS;CACT,OAAO;AACT,CAAU"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { QueryApi } from '../queryApi.cjs';
|
|
2
|
+
import { MaterializedSnapshot } from './snapshot.cjs';
|
|
3
|
+
import { ListQueryRequest, PagedQueryRequest, SingleQueryRequest } from '../requests.cjs';
|
|
4
|
+
import { PagedList } from '../../../dsl/queryable.cjs';
|
|
5
|
+
import { CursorPage, CursorQuery } from '../../../dsl/cursorQuery.cjs';
|
|
6
|
+
/**
|
|
7
|
+
* Interface for snapshot query API operations.
|
|
8
|
+
* Extends the base QueryApi interface for MaterializedSnapshot and adds methods
|
|
9
|
+
* for querying snapshot states directly without the full MaterializedSnapshot wrapper.
|
|
10
|
+
* @template S - The type of the snapshot state
|
|
11
|
+
*/
|
|
12
|
+
export interface SnapshotQueryApi<S, FIELDS extends string = string> extends QueryApi<MaterializedSnapshot<S>, FIELDS> {
|
|
13
|
+
/** Retrieves the next cursor page of snapshot states. */
|
|
14
|
+
cursorState<T extends Partial<S> = S>(query: CursorQuery<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<CursorPage<T>>;
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves a single snapshot state based on the provided query parameters.
|
|
17
|
+
* @param singleQuery - The query parameters for retrieving a single snapshot state
|
|
18
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
19
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
20
|
+
* custom data between different interceptors.
|
|
21
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
22
|
+
* @returns A promise that resolves to a partial snapshot state
|
|
23
|
+
*/
|
|
24
|
+
singleState<T extends Partial<S> = S>(singleQuery: SingleQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<T>;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves a list of snapshot states based on the provided query parameters.
|
|
27
|
+
* @param listQuery - The query parameters for listing snapshot states
|
|
28
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
29
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
30
|
+
* custom data between different interceptors.
|
|
31
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
32
|
+
* @returns A promise that resolves to an array of partial snapshot states
|
|
33
|
+
*/
|
|
34
|
+
listState<T extends Partial<S> = S>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<T[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves a stream of snapshot states based on the provided query parameters.
|
|
37
|
+
* @param listQuery - The query parameters for listing snapshot states
|
|
38
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
39
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
40
|
+
* custom data between different interceptors.
|
|
41
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
42
|
+
* @returns A promise that resolves to a readable stream of partial snapshot states
|
|
43
|
+
*/
|
|
44
|
+
listStateStream<T extends Partial<S> = S>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<ReadableStream<T>>;
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves a paged list of snapshot states based on the provided query parameters.
|
|
47
|
+
* @param pagedQuery - The query parameters for paging snapshot states
|
|
48
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
49
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
50
|
+
* custom data between different interceptors.
|
|
51
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
52
|
+
* @returns A promise that resolves to a paged list of partial snapshot states
|
|
53
|
+
*/
|
|
54
|
+
pagedState<T extends Partial<S> = S>(pagedQuery: PagedQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<PagedList<T>>;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves the materialized snapshot of one aggregate: `single` filtered
|
|
57
|
+
* by `filter.aggregateId(id)`.
|
|
58
|
+
* @param id - The aggregate ID
|
|
59
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
60
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
61
|
+
* custom data between different interceptors.
|
|
62
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
63
|
+
* @returns A promise that resolves to the materialized snapshot
|
|
64
|
+
*/
|
|
65
|
+
getById(id: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<MaterializedSnapshot<S>>;
|
|
66
|
+
/**
|
|
67
|
+
* Retrieves the state of one aggregate: `singleState` filtered by
|
|
68
|
+
* `filter.aggregateId(id)`.
|
|
69
|
+
* @param id - The aggregate ID
|
|
70
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
71
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
72
|
+
* custom data between different interceptors.
|
|
73
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
74
|
+
* @returns A promise that resolves to the snapshot state
|
|
75
|
+
*/
|
|
76
|
+
getStateById(id: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
77
|
+
/**
|
|
78
|
+
* Retrieves the materialized snapshots of several aggregates in one
|
|
79
|
+
* request: `list` filtered by `filter.aggregateIds(ids)`, limited to
|
|
80
|
+
* `ids.length`. An empty `ids` sends nothing and resolves to `[]`.
|
|
81
|
+
* @param ids - The aggregate IDs
|
|
82
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
83
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
84
|
+
* custom data between different interceptors.
|
|
85
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
86
|
+
* @returns A promise that resolves to the materialized snapshots found
|
|
87
|
+
*/
|
|
88
|
+
getByIds(ids: string[], attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<MaterializedSnapshot<S>[]>;
|
|
89
|
+
/**
|
|
90
|
+
* Retrieves the states of several aggregates in one request: `listState`
|
|
91
|
+
* filtered by `filter.aggregateIds(ids)`, limited to `ids.length`. An empty
|
|
92
|
+
* `ids` sends nothing and resolves to `[]`.
|
|
93
|
+
* @param ids - The aggregate IDs
|
|
94
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
95
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
96
|
+
* custom data between different interceptors.
|
|
97
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
98
|
+
* @returns A promise that resolves to the states found
|
|
99
|
+
*/
|
|
100
|
+
getStateByIds(ids: string[], attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S[]>;
|
|
101
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { QueryApi } from '../queryApi.js';
|
|
2
|
+
import { MaterializedSnapshot } from './snapshot.js';
|
|
3
|
+
import { ListQueryRequest, PagedQueryRequest, SingleQueryRequest } from '../requests.js';
|
|
4
|
+
import { PagedList } from '../../../dsl/queryable.js';
|
|
5
|
+
import { CursorPage, CursorQuery } from '../../../dsl/cursorQuery.js';
|
|
6
|
+
/**
|
|
7
|
+
* Interface for snapshot query API operations.
|
|
8
|
+
* Extends the base QueryApi interface for MaterializedSnapshot and adds methods
|
|
9
|
+
* for querying snapshot states directly without the full MaterializedSnapshot wrapper.
|
|
10
|
+
* @template S - The type of the snapshot state
|
|
11
|
+
*/
|
|
12
|
+
export interface SnapshotQueryApi<S, FIELDS extends string = string> extends QueryApi<MaterializedSnapshot<S>, FIELDS> {
|
|
13
|
+
/** Retrieves the next cursor page of snapshot states. */
|
|
14
|
+
cursorState<T extends Partial<S> = S>(query: CursorQuery<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<CursorPage<T>>;
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves a single snapshot state based on the provided query parameters.
|
|
17
|
+
* @param singleQuery - The query parameters for retrieving a single snapshot state
|
|
18
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
19
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
20
|
+
* custom data between different interceptors.
|
|
21
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
22
|
+
* @returns A promise that resolves to a partial snapshot state
|
|
23
|
+
*/
|
|
24
|
+
singleState<T extends Partial<S> = S>(singleQuery: SingleQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<T>;
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves a list of snapshot states based on the provided query parameters.
|
|
27
|
+
* @param listQuery - The query parameters for listing snapshot states
|
|
28
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
29
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
30
|
+
* custom data between different interceptors.
|
|
31
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
32
|
+
* @returns A promise that resolves to an array of partial snapshot states
|
|
33
|
+
*/
|
|
34
|
+
listState<T extends Partial<S> = S>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<T[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves a stream of snapshot states based on the provided query parameters.
|
|
37
|
+
* @param listQuery - The query parameters for listing snapshot states
|
|
38
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
39
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
40
|
+
* custom data between different interceptors.
|
|
41
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
42
|
+
* @returns A promise that resolves to a readable stream of partial snapshot states
|
|
43
|
+
*/
|
|
44
|
+
listStateStream<T extends Partial<S> = S>(listQuery: ListQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<ReadableStream<T>>;
|
|
45
|
+
/**
|
|
46
|
+
* Retrieves a paged list of snapshot states based on the provided query parameters.
|
|
47
|
+
* @param pagedQuery - The query parameters for paging snapshot states
|
|
48
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
49
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
50
|
+
* custom data between different interceptors.
|
|
51
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
52
|
+
* @returns A promise that resolves to a paged list of partial snapshot states
|
|
53
|
+
*/
|
|
54
|
+
pagedState<T extends Partial<S> = S>(pagedQuery: PagedQueryRequest<FIELDS>, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<PagedList<T>>;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves the materialized snapshot of one aggregate: `single` filtered
|
|
57
|
+
* by `filter.aggregateId(id)`.
|
|
58
|
+
* @param id - The aggregate ID
|
|
59
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
60
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
61
|
+
* custom data between different interceptors.
|
|
62
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
63
|
+
* @returns A promise that resolves to the materialized snapshot
|
|
64
|
+
*/
|
|
65
|
+
getById(id: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<MaterializedSnapshot<S>>;
|
|
66
|
+
/**
|
|
67
|
+
* Retrieves the state of one aggregate: `singleState` filtered by
|
|
68
|
+
* `filter.aggregateId(id)`.
|
|
69
|
+
* @param id - The aggregate ID
|
|
70
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
71
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
72
|
+
* custom data between different interceptors.
|
|
73
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
74
|
+
* @returns A promise that resolves to the snapshot state
|
|
75
|
+
*/
|
|
76
|
+
getStateById(id: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
77
|
+
/**
|
|
78
|
+
* Retrieves the materialized snapshots of several aggregates in one
|
|
79
|
+
* request: `list` filtered by `filter.aggregateIds(ids)`, limited to
|
|
80
|
+
* `ids.length`. An empty `ids` sends nothing and resolves to `[]`.
|
|
81
|
+
* @param ids - The aggregate IDs
|
|
82
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
83
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
84
|
+
* custom data between different interceptors.
|
|
85
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
86
|
+
* @returns A promise that resolves to the materialized snapshots found
|
|
87
|
+
*/
|
|
88
|
+
getByIds(ids: string[], attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<MaterializedSnapshot<S>[]>;
|
|
89
|
+
/**
|
|
90
|
+
* Retrieves the states of several aggregates in one request: `listState`
|
|
91
|
+
* filtered by `filter.aggregateIds(ids)`, limited to `ids.length`. An empty
|
|
92
|
+
* `ids` sends nothing and resolves to `[]`.
|
|
93
|
+
* @param ids - The aggregate IDs
|
|
94
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
95
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
96
|
+
* custom data between different interceptors.
|
|
97
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
98
|
+
* @returns A promise that resolves to the states found
|
|
99
|
+
*/
|
|
100
|
+
getStateByIds(ids: string[], attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S[]>;
|
|
101
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../../../dsl/filter/builders.cjs"),t=require("../../../dsl/queryable.cjs"),n=require("../../../transport/endpoints.cjs"),r=require("../../bindMethods.cjs"),i=require("../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.cjs"),a=require("../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateParam.cjs"),o=require("../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.cjs"),s=require("./endpointPaths.cjs");let c=require("@ahoo-wang/fetcher-decorator");var l=class{constructor(e){this.apiMetadata=e,r.bindMethods(this)}aggregate(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}aggregateStream(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}cursor(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}cursorState(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}count(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}list(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}listStream(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}listState(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}listStateStream(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}paged(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}pagedState(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}single(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}singleState(e,t,n){throw(0,c.autoGeneratedError)(e,t,n)}getById(n,r,i){let a=t.singleQuery({filter:e.filter.aggregateId(n)});return this.single(a,r,i)}getStateById(n,r,i){let a=t.singleQuery({filter:e.filter.aggregateId(n)});return this.singleState(a,r,i)}getByIds(n,r,i){if(n.length===0)return Promise.resolve([]);let a=t.listQuery({filter:e.filter.aggregateIds(n),limit:n.length});return this.list(a,r,i)}getStateByIds(n,r,i){if(n.length===0)return Promise.resolve([]);let a=t.listQuery({filter:e.filter.aggregateIds(n),limit:n.length});return this.listState(a,r,i)}};o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.AGGREGATION),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`aggregate`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.AGGREGATION,n.QUERY_STREAM_ENDPOINT),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`aggregateStream`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.CURSOR),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`cursor`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.CURSOR_STATE),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`cursorState`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.COUNT),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`count`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.LIST),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`list`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.LIST,n.QUERY_STREAM_ENDPOINT),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`listStream`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.LIST_STATE),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`listState`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.LIST_STATE,n.QUERY_STREAM_ENDPOINT),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`listStateStream`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.PAGED),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`paged`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.PAGED_STATE),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`pagedState`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.SINGLE),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`single`,null),o.default([(0,c.post)(s.SnapshotQueryEndpointPaths.SINGLE_STATE),a.default(0,(0,c.body)()),a.default(1,(0,c.attribute)()),i.default(`design:type`,Function),i.default(`design:paramtypes`,[Object,typeof Record>`u`?Object:Record,Object]),i.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],l.prototype,`singleState`,null),l=o.default([(0,c.api)(),i.default(`design:paramtypes`,[Object])],l),Object.defineProperty(exports,"SnapshotQueryClient",{enumerable:!0,get:function(){return l}});
|
|
2
|
+
//# sourceMappingURL=snapshotQueryClient.cjs.map
|