@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,2 @@
|
|
|
1
|
+
var e=Object.freeze({LOAD:`{id}/state`,LOAD_VERSIONED:`{id}/state/{version}`,LOAD_TIME_BASED:`{id}/state/time/{createTime}`}),t=Object.freeze({LOAD:`state`,LOAD_VERSIONED:`state/{version}`,LOAD_TIME_BASED:`state/time/{createTime}`});exports.LoadOwnerStateAggregateEndpointPaths=t,exports.LoadStateAggregateEndpointPaths=e;
|
|
2
|
+
//# sourceMappingURL=endpointPaths.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpointPaths.cjs","names":["LoadStateAggregateEndpointPaths","LoadOwnerStateAggregateEndpointPaths"],"sources":["../../../../src/client/query/state/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 LoadStateAggregateEndpointPaths = Object.freeze({\n LOAD: '{id}/state',\n LOAD_VERSIONED: '{id}/state/{version}',\n LOAD_TIME_BASED: '{id}/state/time/{createTime}',\n} as const);\n\nexport const LoadOwnerStateAggregateEndpointPaths = Object.freeze({\n LOAD: 'state',\n LOAD_VERSIONED: 'state/{version}',\n LOAD_TIME_BASED: 'state/time/{createTime}',\n} as const);\n"],"mappings":"AAeA,IAAaA,EAAkC,OAAO,OAAO,CAC3D,KAAM,aACN,eAAgB,uBAChB,gBAAiB,8BACnB,CAAU,EAEGC,EAAuC,OAAO,OAAO,CAChE,KAAM,QACN,eAAgB,kBAChB,gBAAiB,yBACnB,CAAU"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const LoadStateAggregateEndpointPaths: Readonly<{
|
|
2
|
+
readonly LOAD: "{id}/state";
|
|
3
|
+
readonly LOAD_VERSIONED: "{id}/state/{version}";
|
|
4
|
+
readonly LOAD_TIME_BASED: "{id}/state/time/{createTime}";
|
|
5
|
+
}>;
|
|
6
|
+
export declare const LoadOwnerStateAggregateEndpointPaths: Readonly<{
|
|
7
|
+
readonly LOAD: "state";
|
|
8
|
+
readonly LOAD_VERSIONED: "state/{version}";
|
|
9
|
+
readonly LOAD_TIME_BASED: "state/time/{createTime}";
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const LoadStateAggregateEndpointPaths: Readonly<{
|
|
2
|
+
readonly LOAD: "{id}/state";
|
|
3
|
+
readonly LOAD_VERSIONED: "{id}/state/{version}";
|
|
4
|
+
readonly LOAD_TIME_BASED: "{id}/state/time/{createTime}";
|
|
5
|
+
}>;
|
|
6
|
+
export declare const LoadOwnerStateAggregateEndpointPaths: Readonly<{
|
|
7
|
+
readonly LOAD: "state";
|
|
8
|
+
readonly LOAD_VERSIONED: "state/{version}";
|
|
9
|
+
readonly LOAD_TIME_BASED: "state/time/{createTime}";
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/client/query/state/endpointPaths.ts
|
|
2
|
+
var e = Object.freeze({
|
|
3
|
+
LOAD: "{id}/state",
|
|
4
|
+
LOAD_VERSIONED: "{id}/state/{version}",
|
|
5
|
+
LOAD_TIME_BASED: "{id}/state/time/{createTime}"
|
|
6
|
+
}), t = Object.freeze({
|
|
7
|
+
LOAD: "state",
|
|
8
|
+
LOAD_VERSIONED: "state/{version}",
|
|
9
|
+
LOAD_TIME_BASED: "state/time/{createTime}"
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { t as LoadOwnerStateAggregateEndpointPaths, e as LoadStateAggregateEndpointPaths };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=endpointPaths.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpointPaths.es.js","names":["LoadStateAggregateEndpointPaths","LoadOwnerStateAggregateEndpointPaths"],"sources":["../../../../src/client/query/state/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 LoadStateAggregateEndpointPaths = Object.freeze({\n LOAD: '{id}/state',\n LOAD_VERSIONED: '{id}/state/{version}',\n LOAD_TIME_BASED: '{id}/state/time/{createTime}',\n} as const);\n\nexport const LoadOwnerStateAggregateEndpointPaths = Object.freeze({\n LOAD: 'state',\n LOAD_VERSIONED: 'state/{version}',\n LOAD_TIME_BASED: 'state/time/{createTime}',\n} as const);\n"],"mappings":";AAeA,IAAaA,IAAkC,OAAO,OAAO;CAC3D,MAAM;CACN,gBAAgB;CAChB,iBAAiB;AACnB,CAAU,GAEGC,IAAuC,OAAO,OAAO;CAChE,MAAM;CACN,gBAAgB;CAChB,iBAAiB;AACnB,CAAU"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads the state of the aggregate the client's owner holds: the current
|
|
3
|
+
* state, or the state at a version or a point in time. The owner comes from
|
|
4
|
+
* the client's `urlParams`, not from the call.
|
|
5
|
+
* `LoadOwnerStateAggregateClient` implements it; code written against
|
|
6
|
+
* the interface can take a test double.
|
|
7
|
+
* @template S - The type of the aggregate state
|
|
8
|
+
*/
|
|
9
|
+
export interface LoadOwnerStateAggregateApi<S> {
|
|
10
|
+
/**
|
|
11
|
+
* Loads the current state of the owner's aggregate.
|
|
12
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
13
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
14
|
+
* custom data between different interceptors.
|
|
15
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
16
|
+
*/
|
|
17
|
+
load(attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
18
|
+
/**
|
|
19
|
+
* Loads the state of the owner's aggregate at `version`.
|
|
20
|
+
* @param version - The aggregate version
|
|
21
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
22
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
23
|
+
* custom data between different interceptors.
|
|
24
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
25
|
+
*/
|
|
26
|
+
loadVersioned(version: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
27
|
+
/**
|
|
28
|
+
* Loads the state of the owner's aggregate as of `createTime`.
|
|
29
|
+
* @param createTime - The point in time, in epoch milliseconds
|
|
30
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
31
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
32
|
+
* custom data between different interceptors.
|
|
33
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
34
|
+
*/
|
|
35
|
+
loadTimeBased(createTime: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads the state of the aggregate the client's owner holds: the current
|
|
3
|
+
* state, or the state at a version or a point in time. The owner comes from
|
|
4
|
+
* the client's `urlParams`, not from the call.
|
|
5
|
+
* `LoadOwnerStateAggregateClient` implements it; code written against
|
|
6
|
+
* the interface can take a test double.
|
|
7
|
+
* @template S - The type of the aggregate state
|
|
8
|
+
*/
|
|
9
|
+
export interface LoadOwnerStateAggregateApi<S> {
|
|
10
|
+
/**
|
|
11
|
+
* Loads the current state of the owner's aggregate.
|
|
12
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
13
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
14
|
+
* custom data between different interceptors.
|
|
15
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
16
|
+
*/
|
|
17
|
+
load(attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
18
|
+
/**
|
|
19
|
+
* Loads the state of the owner's aggregate at `version`.
|
|
20
|
+
* @param version - The aggregate version
|
|
21
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
22
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
23
|
+
* custom data between different interceptors.
|
|
24
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
25
|
+
*/
|
|
26
|
+
loadVersioned(version: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
27
|
+
/**
|
|
28
|
+
* Loads the state of the owner's aggregate as of `createTime`.
|
|
29
|
+
* @param createTime - The point in time, in epoch milliseconds
|
|
30
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
31
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
32
|
+
* custom data between different interceptors.
|
|
33
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
34
|
+
*/
|
|
35
|
+
loadTimeBased(createTime: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../../bindMethods.cjs"),t=require("../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.cjs"),n=require("../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateParam.cjs"),r=require("../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.cjs"),i=require("./endpointPaths.cjs");let a=require("@ahoo-wang/fetcher-decorator");var o=class{constructor(t){this.apiMetadata=t,e.bindMethods(this)}load(e,t){throw(0,a.autoGeneratedError)(e,t)}loadVersioned(e,t,n){throw(0,a.autoGeneratedError)(e,t,n)}loadTimeBased(e,t,n){throw(0,a.autoGeneratedError)(e,t,n)}};r.default([(0,a.get)(i.LoadOwnerStateAggregateEndpointPaths.LOAD),n.default(0,(0,a.attribute)()),t.default(`design:type`,Function),t.default(`design:paramtypes`,[typeof Record>`u`?Object:Record,Object]),t.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],o.prototype,`load`,null),r.default([(0,a.get)(i.LoadOwnerStateAggregateEndpointPaths.LOAD_VERSIONED),n.default(0,(0,a.path)(`version`)),n.default(1,(0,a.attribute)()),t.default(`design:type`,Function),t.default(`design:paramtypes`,[Number,typeof Record>`u`?Object:Record,Object]),t.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],o.prototype,`loadVersioned`,null),r.default([(0,a.get)(i.LoadOwnerStateAggregateEndpointPaths.LOAD_TIME_BASED),n.default(0,(0,a.path)(`createTime`)),n.default(1,(0,a.attribute)()),t.default(`design:type`,Function),t.default(`design:paramtypes`,[Number,typeof Record>`u`?Object:Record,Object]),t.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],o.prototype,`loadTimeBased`,null),o=r.default([(0,a.api)(),t.default(`design:paramtypes`,[Object])],o),Object.defineProperty(exports,"LoadOwnerStateAggregateClient",{enumerable:!0,get:function(){return o}});
|
|
2
|
+
//# sourceMappingURL=loadOwnerStateAggregateClient.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadOwnerStateAggregateClient.cjs","names":["autoGeneratedError","_decorate","get","LoadOwnerStateAggregateEndpointPaths","_decorateParam","attribute","_decorateMetadata","path","api","require_bindMethods","require_decorateMetadata","require_decorateParam","require_decorate","require_endpointPaths","_ahoo_wang_fetcher_decorator","LoadOwnerStateAggregateClient","apiMetadata","attributes","abort","version","createTime"],"sources":["../../../../src/client/query/state/loadOwnerStateAggregateClient.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 ApiMetadata,\n ApiMetadataCapable,\n} from '@ahoo-wang/fetcher-decorator';\nimport type { LoadOwnerStateAggregateApi } from './loadOwnerStateAggregateApi.js';\nimport {\n api,\n attribute,\n autoGeneratedError,\n get,\n path,\n} from '@ahoo-wang/fetcher-decorator';\nimport { LoadOwnerStateAggregateEndpointPaths } from './endpointPaths.js';\nimport { bindMethods } from '../../bindMethods.js';\n\n/**\n * Loads the state of an aggregate whose ID is its owner's ID, such as a\n * user's cart (Wow's `AggregateRoute.Owner.AGGREGATE_ID`): `GET\n * {basePath}/state`, or the state at a version or a point in time. The owner\n * comes from the client's `urlParams`, not from the call. An aggregate that\n * does not exist or is deleted answers 404. Create it with\n * `QueryClientFactory.createLoadOwnerStateAggregateClient` and\n * `ResourceAttributionPathSpec.OWNER`.\n *\n * @template S - The type of the aggregate state\n *\n * @example\n * ```typescript\n * const carts = new LoadOwnerStateAggregateClient<{ items: string[] }>({\n * basePath: 'owner/{ownerId}/cart',\n * urlParams: { path: { ownerId: 'user-1' } },\n * });\n * const cart = await carts.load();\n * ```\n */\n@api()\nexport class LoadOwnerStateAggregateClient<S>\n implements LoadOwnerStateAggregateApi<S>, ApiMetadataCapable\n{\n constructor(public readonly apiMetadata?: ApiMetadata) {\n bindMethods(this);\n }\n\n /**\n * Loads the current state of the aggregate.\n *\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the current state of the aggregate\n */\n @get(LoadOwnerStateAggregateEndpointPaths.LOAD)\n /* v8 ignore start */\n load(\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Loads the state of the aggregate at a specific version.\n *\n * @param version - The version number of the aggregate state to load\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the state of the aggregate at the specified version\n */\n @get(LoadOwnerStateAggregateEndpointPaths.LOAD_VERSIONED)\n /* v8 ignore start */\n loadVersioned(\n @path('version') version: number,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(version, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Loads the state of the aggregate at a specific point in time.\n *\n * @param createTime - The creation timestamp to load the aggregate state for\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the state of the aggregate at the specified time\n */\n @get(LoadOwnerStateAggregateEndpointPaths.LOAD_TIME_BASED)\n /* v8 ignore start */\n loadTimeBased(\n @path('createTime') createTime: number,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(createTime, attributes, abort);\n }\n /* v8 ignore stop */\n}\n"],"mappings":"uYAiDO,IAAMe,EAAN,KAEP,CACE,YAAY,EAA2C,CAA3B,KAAA,YAAAC,EAC1BP,EAAA,YAAY,IAAI,CAClB,CAWA,KAGE,EACA,EACY,CACZ,MAAA,EAAMT,EAAAA,mBAAAA,CAAmBiB,EAAYC,CAAK,CAC5C,CAaA,cAGE,EACA,EACA,EACY,CACZ,MAAA,EAAMlB,EAAAA,mBAAAA,CAAmBmB,EAASF,EAAYC,CAAK,CACrD,CAaA,cAGE,EACA,EACA,EACY,CACZ,MAAA,EAAMlB,EAAAA,mBAAAA,CAAmBoB,EAAYH,EAAYC,CAAK,CACxD,CAEF,cAnDGhB,EAAAA,EAAAA,IAAAA,CAAIC,EAAAA,qCAAqC,IAAI,EAG3CC,EAAAA,QAAA,GAAA,EAAAC,EAAAA,UAAAA,CAAU,CAAA,mNAiBZH,EAAAA,EAAAA,IAAAA,CAAIC,EAAAA,qCAAqC,cAAc,EAGrDC,EAAAA,QAAA,GAAA,EAAAG,EAAAA,KAAAA,CAAK,SAAS,CAAA,EACdH,EAAAA,QAAA,GAAA,EAAAC,EAAAA,UAAAA,CAAU,CAAA,mOAiBZH,EAAAA,EAAAA,IAAAA,CAAIC,EAAAA,qCAAqC,eAAe,EAGtDC,EAAAA,QAAA,GAAA,EAAAG,EAAAA,KAAAA,CAAK,YAAY,CAAA,EACjBH,EAAAA,QAAA,GAAA,EAAAC,EAAAA,UAAAA,CAAU,CAAA,uNA9Dd,EAAAJ,EAAAA,QAAA,EAAA,EAAAO,EAAAA,IAAAA,CAAI,EAAAF,EAAAA,QAAA,oBAAA,CAAA,MAAA,CAAA,CAAA,EAAAS,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
|
|
2
|
+
import { LoadOwnerStateAggregateApi } from './loadOwnerStateAggregateApi.cjs';
|
|
3
|
+
/**
|
|
4
|
+
* Loads the state of an aggregate whose ID is its owner's ID, such as a
|
|
5
|
+
* user's cart (Wow's `AggregateRoute.Owner.AGGREGATE_ID`): `GET
|
|
6
|
+
* {basePath}/state`, or the state at a version or a point in time. The owner
|
|
7
|
+
* comes from the client's `urlParams`, not from the call. An aggregate that
|
|
8
|
+
* does not exist or is deleted answers 404. Create it with
|
|
9
|
+
* `QueryClientFactory.createLoadOwnerStateAggregateClient` and
|
|
10
|
+
* `ResourceAttributionPathSpec.OWNER`.
|
|
11
|
+
*
|
|
12
|
+
* @template S - The type of the aggregate state
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const carts = new LoadOwnerStateAggregateClient<{ items: string[] }>({
|
|
17
|
+
* basePath: 'owner/{ownerId}/cart',
|
|
18
|
+
* urlParams: { path: { ownerId: 'user-1' } },
|
|
19
|
+
* });
|
|
20
|
+
* const cart = await carts.load();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class LoadOwnerStateAggregateClient<S> implements LoadOwnerStateAggregateApi<S>, ApiMetadataCapable {
|
|
24
|
+
readonly apiMetadata?: ApiMetadata | undefined;
|
|
25
|
+
constructor(apiMetadata?: ApiMetadata | undefined);
|
|
26
|
+
/**
|
|
27
|
+
* Loads the current state of the aggregate.
|
|
28
|
+
*
|
|
29
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
30
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
31
|
+
* custom data between different interceptors.
|
|
32
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
33
|
+
* @returns A promise that resolves to the current state of the aggregate
|
|
34
|
+
*/
|
|
35
|
+
load(attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
36
|
+
/**
|
|
37
|
+
* Loads the state of the aggregate at a specific version.
|
|
38
|
+
*
|
|
39
|
+
* @param version - The version number of the aggregate state to load
|
|
40
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
41
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
42
|
+
* custom data between different interceptors.
|
|
43
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
44
|
+
* @returns A promise that resolves to the state of the aggregate at the specified version
|
|
45
|
+
*/
|
|
46
|
+
loadVersioned(version: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
47
|
+
/**
|
|
48
|
+
* Loads the state of the aggregate at a specific point in time.
|
|
49
|
+
*
|
|
50
|
+
* @param createTime - The creation timestamp to load the aggregate state for
|
|
51
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
52
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
53
|
+
* custom data between different interceptors.
|
|
54
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
55
|
+
* @returns A promise that resolves to the state of the aggregate at the specified time
|
|
56
|
+
*/
|
|
57
|
+
loadTimeBased(createTime: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
|
|
2
|
+
import { LoadOwnerStateAggregateApi } from './loadOwnerStateAggregateApi.js';
|
|
3
|
+
/**
|
|
4
|
+
* Loads the state of an aggregate whose ID is its owner's ID, such as a
|
|
5
|
+
* user's cart (Wow's `AggregateRoute.Owner.AGGREGATE_ID`): `GET
|
|
6
|
+
* {basePath}/state`, or the state at a version or a point in time. The owner
|
|
7
|
+
* comes from the client's `urlParams`, not from the call. An aggregate that
|
|
8
|
+
* does not exist or is deleted answers 404. Create it with
|
|
9
|
+
* `QueryClientFactory.createLoadOwnerStateAggregateClient` and
|
|
10
|
+
* `ResourceAttributionPathSpec.OWNER`.
|
|
11
|
+
*
|
|
12
|
+
* @template S - The type of the aggregate state
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const carts = new LoadOwnerStateAggregateClient<{ items: string[] }>({
|
|
17
|
+
* basePath: 'owner/{ownerId}/cart',
|
|
18
|
+
* urlParams: { path: { ownerId: 'user-1' } },
|
|
19
|
+
* });
|
|
20
|
+
* const cart = await carts.load();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class LoadOwnerStateAggregateClient<S> implements LoadOwnerStateAggregateApi<S>, ApiMetadataCapable {
|
|
24
|
+
readonly apiMetadata?: ApiMetadata | undefined;
|
|
25
|
+
constructor(apiMetadata?: ApiMetadata | undefined);
|
|
26
|
+
/**
|
|
27
|
+
* Loads the current state of the aggregate.
|
|
28
|
+
*
|
|
29
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
30
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
31
|
+
* custom data between different interceptors.
|
|
32
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
33
|
+
* @returns A promise that resolves to the current state of the aggregate
|
|
34
|
+
*/
|
|
35
|
+
load(attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
36
|
+
/**
|
|
37
|
+
* Loads the state of the aggregate at a specific version.
|
|
38
|
+
*
|
|
39
|
+
* @param version - The version number of the aggregate state to load
|
|
40
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
41
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
42
|
+
* custom data between different interceptors.
|
|
43
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
44
|
+
* @returns A promise that resolves to the state of the aggregate at the specified version
|
|
45
|
+
*/
|
|
46
|
+
loadVersioned(version: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
47
|
+
/**
|
|
48
|
+
* Loads the state of the aggregate at a specific point in time.
|
|
49
|
+
*
|
|
50
|
+
* @param createTime - The creation timestamp to load the aggregate state for
|
|
51
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
52
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
53
|
+
* custom data between different interceptors.
|
|
54
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
55
|
+
* @returns A promise that resolves to the state of the aggregate at the specified time
|
|
56
|
+
*/
|
|
57
|
+
loadTimeBased(createTime: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { bindMethods as e } from "../../bindMethods.es.js";
|
|
2
|
+
import t from "../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.es.js";
|
|
3
|
+
import n from "../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateParam.es.js";
|
|
4
|
+
import r from "../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.es.js";
|
|
5
|
+
import { LoadOwnerStateAggregateEndpointPaths as i } from "./endpointPaths.es.js";
|
|
6
|
+
import { api as a, attribute as o, autoGeneratedError as s, get as c, path as l } from "@ahoo-wang/fetcher-decorator";
|
|
7
|
+
//#region src/client/query/state/loadOwnerStateAggregateClient.ts
|
|
8
|
+
var u = class {
|
|
9
|
+
constructor(t) {
|
|
10
|
+
this.apiMetadata = t, e(this);
|
|
11
|
+
}
|
|
12
|
+
load(e, t) {
|
|
13
|
+
throw s(e, t);
|
|
14
|
+
}
|
|
15
|
+
/* v8 ignore stop */
|
|
16
|
+
loadVersioned(e, t, n) {
|
|
17
|
+
throw s(e, t, n);
|
|
18
|
+
}
|
|
19
|
+
/* v8 ignore stop */
|
|
20
|
+
loadTimeBased(e, t, n) {
|
|
21
|
+
throw s(e, t, n);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
r([
|
|
25
|
+
c(i.LOAD),
|
|
26
|
+
n(0, o()),
|
|
27
|
+
t("design:type", Function),
|
|
28
|
+
t("design:paramtypes", [typeof Record > "u" ? Object : Record, Object]),
|
|
29
|
+
t("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
30
|
+
], u.prototype, "load", null), r([
|
|
31
|
+
c(i.LOAD_VERSIONED),
|
|
32
|
+
n(0, l("version")),
|
|
33
|
+
n(1, o()),
|
|
34
|
+
t("design:type", Function),
|
|
35
|
+
t("design:paramtypes", [
|
|
36
|
+
Number,
|
|
37
|
+
typeof Record > "u" ? Object : Record,
|
|
38
|
+
Object
|
|
39
|
+
]),
|
|
40
|
+
t("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
41
|
+
], u.prototype, "loadVersioned", null), r([
|
|
42
|
+
c(i.LOAD_TIME_BASED),
|
|
43
|
+
n(0, l("createTime")),
|
|
44
|
+
n(1, o()),
|
|
45
|
+
t("design:type", Function),
|
|
46
|
+
t("design:paramtypes", [
|
|
47
|
+
Number,
|
|
48
|
+
typeof Record > "u" ? Object : Record,
|
|
49
|
+
Object
|
|
50
|
+
]),
|
|
51
|
+
t("design:returntype", typeof Promise > "u" ? Object : Promise)
|
|
52
|
+
], u.prototype, "loadTimeBased", null), u = r([a(), t("design:paramtypes", [Object])], u);
|
|
53
|
+
//#endregion
|
|
54
|
+
export { u as LoadOwnerStateAggregateClient };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=loadOwnerStateAggregateClient.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadOwnerStateAggregateClient.es.js","names":["_decorate","_decorateParam","_decorateMetadata","__decorateMetadata","__decorateParam","__decorate","LoadOwnerStateAggregateClient","apiMetadata","bindMethods","autoGeneratedError","attributes","abort","version","createTime","get","LoadOwnerStateAggregateEndpointPaths","attribute","path","api"],"sources":["../../../../src/client/query/state/loadOwnerStateAggregateClient.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 ApiMetadata,\n ApiMetadataCapable,\n} from '@ahoo-wang/fetcher-decorator';\nimport type { LoadOwnerStateAggregateApi } from './loadOwnerStateAggregateApi.js';\nimport {\n api,\n attribute,\n autoGeneratedError,\n get,\n path,\n} from '@ahoo-wang/fetcher-decorator';\nimport { LoadOwnerStateAggregateEndpointPaths } from './endpointPaths.js';\nimport { bindMethods } from '../../bindMethods.js';\n\n/**\n * Loads the state of an aggregate whose ID is its owner's ID, such as a\n * user's cart (Wow's `AggregateRoute.Owner.AGGREGATE_ID`): `GET\n * {basePath}/state`, or the state at a version or a point in time. The owner\n * comes from the client's `urlParams`, not from the call. An aggregate that\n * does not exist or is deleted answers 404. Create it with\n * `QueryClientFactory.createLoadOwnerStateAggregateClient` and\n * `ResourceAttributionPathSpec.OWNER`.\n *\n * @template S - The type of the aggregate state\n *\n * @example\n * ```typescript\n * const carts = new LoadOwnerStateAggregateClient<{ items: string[] }>({\n * basePath: 'owner/{ownerId}/cart',\n * urlParams: { path: { ownerId: 'user-1' } },\n * });\n * const cart = await carts.load();\n * ```\n */\n@api()\nexport class LoadOwnerStateAggregateClient<S>\n implements LoadOwnerStateAggregateApi<S>, ApiMetadataCapable\n{\n constructor(public readonly apiMetadata?: ApiMetadata) {\n bindMethods(this);\n }\n\n /**\n * Loads the current state of the aggregate.\n *\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the current state of the aggregate\n */\n @get(LoadOwnerStateAggregateEndpointPaths.LOAD)\n /* v8 ignore start */\n load(\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Loads the state of the aggregate at a specific version.\n *\n * @param version - The version number of the aggregate state to load\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the state of the aggregate at the specified version\n */\n @get(LoadOwnerStateAggregateEndpointPaths.LOAD_VERSIONED)\n /* v8 ignore start */\n loadVersioned(\n @path('version') version: number,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(version, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Loads the state of the aggregate at a specific point in time.\n *\n * @param createTime - The creation timestamp to load the aggregate state for\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the state of the aggregate at the specified time\n */\n @get(LoadOwnerStateAggregateEndpointPaths.LOAD_TIME_BASED)\n /* v8 ignore start */\n loadTimeBased(\n @path('createTime') createTime: number,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(createTime, attributes, abort);\n }\n /* v8 ignore stop */\n}\n"],"mappings":";;;;;;;AAiDO,IAAMM,IAAN,MAEP;CACE,YAAY,GAA2C;EACrD,AAD0B,KAAA,cAAAC,GAC1BC,EAAY,IAAI;CAClB;CAWA,KAGE,GACA,GACY;EACZ,MAAMC,EAAmBC,GAAYC,CAAK;CAC5C;;CAaA,cAGE,GACA,GACA,GACY;EACZ,MAAMF,EAAmBG,GAASF,GAAYC,CAAK;CACrD;;CAaA,cAGE,GACA,GACA,GACY;EACZ,MAAMF,EAAmBI,GAAYH,GAAYC,CAAK;CACxD;AAEF;;CAnDGG,EAAIC,EAAqC,IAAI;CAG3Cd,EAAA,GAAAe,EAAU,CAAA;;;;;CAiBZF,EAAIC,EAAqC,cAAc;CAGrDd,EAAA,GAAAgB,EAAK,SAAS,CAAA;CACdhB,EAAA,GAAAe,EAAU,CAAA;;;;;;;;;CAiBZF,EAAIC,EAAqC,eAAe;CAGtDd,EAAA,GAAAgB,EAAK,YAAY,CAAA;CACjBhB,EAAA,GAAAe,EAAU,CAAA;;;;;;;;wCA9Dd,IAAAhB,EAAA,CAAAkB,EAAI,GAAAhB,EAAA,qBAAA,CAAA,MAAA,CAAA,CAAA,GAAAI,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads the state of an aggregate by its ID: the current state, or the state
|
|
3
|
+
* at a version or a point in time. `LoadStateAggregateClient`
|
|
4
|
+
* implements it; code written against the interface can take a test double.
|
|
5
|
+
* @template S - The type of the aggregate state
|
|
6
|
+
*/
|
|
7
|
+
export interface LoadStateAggregateApi<S> {
|
|
8
|
+
/**
|
|
9
|
+
* Loads the current state of the aggregate.
|
|
10
|
+
* @param id - The aggregate ID
|
|
11
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
12
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
13
|
+
* custom data between different interceptors.
|
|
14
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
15
|
+
*/
|
|
16
|
+
load(id: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
17
|
+
/**
|
|
18
|
+
* Loads the state of the aggregate at `version`.
|
|
19
|
+
* @param id - The aggregate ID
|
|
20
|
+
* @param version - The aggregate version
|
|
21
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
22
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
23
|
+
* custom data between different interceptors.
|
|
24
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
25
|
+
*/
|
|
26
|
+
loadVersioned(id: string, version: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
27
|
+
/**
|
|
28
|
+
* Loads the state of the aggregate as of `createTime`.
|
|
29
|
+
* @param id - The aggregate ID
|
|
30
|
+
* @param createTime - The point in time, in epoch milliseconds
|
|
31
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
32
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
33
|
+
* custom data between different interceptors.
|
|
34
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
35
|
+
*/
|
|
36
|
+
loadTimeBased(id: string, createTime: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads the state of an aggregate by its ID: the current state, or the state
|
|
3
|
+
* at a version or a point in time. `LoadStateAggregateClient`
|
|
4
|
+
* implements it; code written against the interface can take a test double.
|
|
5
|
+
* @template S - The type of the aggregate state
|
|
6
|
+
*/
|
|
7
|
+
export interface LoadStateAggregateApi<S> {
|
|
8
|
+
/**
|
|
9
|
+
* Loads the current state of the aggregate.
|
|
10
|
+
* @param id - The aggregate ID
|
|
11
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
12
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
13
|
+
* custom data between different interceptors.
|
|
14
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
15
|
+
*/
|
|
16
|
+
load(id: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
17
|
+
/**
|
|
18
|
+
* Loads the state of the aggregate at `version`.
|
|
19
|
+
* @param id - The aggregate ID
|
|
20
|
+
* @param version - The aggregate version
|
|
21
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
22
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
23
|
+
* custom data between different interceptors.
|
|
24
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
25
|
+
*/
|
|
26
|
+
loadVersioned(id: string, version: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
27
|
+
/**
|
|
28
|
+
* Loads the state of the aggregate as of `createTime`.
|
|
29
|
+
* @param id - The aggregate ID
|
|
30
|
+
* @param createTime - The point in time, in epoch milliseconds
|
|
31
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
32
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
33
|
+
* custom data between different interceptors.
|
|
34
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
35
|
+
*/
|
|
36
|
+
loadTimeBased(id: string, createTime: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("../../bindMethods.cjs"),t=require("../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.cjs"),n=require("../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateParam.cjs"),r=require("../../../_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.cjs"),i=require("./endpointPaths.cjs");let a=require("@ahoo-wang/fetcher-decorator");var o=class{constructor(t){this.apiMetadata=t,e.bindMethods(this)}load(e,t,n){throw(0,a.autoGeneratedError)(e,t,n)}loadVersioned(e,t,n,r){throw(0,a.autoGeneratedError)(e,t,n,r)}loadTimeBased(e,t,n,r){throw(0,a.autoGeneratedError)(e,t,n,r)}};r.default([(0,a.get)(i.LoadStateAggregateEndpointPaths.LOAD),n.default(0,(0,a.path)(`id`)),n.default(1,(0,a.attribute)()),t.default(`design:type`,Function),t.default(`design:paramtypes`,[String,typeof Record>`u`?Object:Record,Object]),t.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],o.prototype,`load`,null),r.default([(0,a.get)(i.LoadStateAggregateEndpointPaths.LOAD_VERSIONED),n.default(0,(0,a.path)(`id`)),n.default(1,(0,a.path)(`version`)),n.default(2,(0,a.attribute)()),t.default(`design:type`,Function),t.default(`design:paramtypes`,[String,Number,typeof Record>`u`?Object:Record,Object]),t.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],o.prototype,`loadVersioned`,null),r.default([(0,a.get)(i.LoadStateAggregateEndpointPaths.LOAD_TIME_BASED),n.default(0,(0,a.path)(`id`)),n.default(1,(0,a.path)(`createTime`)),n.default(2,(0,a.attribute)()),t.default(`design:type`,Function),t.default(`design:paramtypes`,[String,Number,typeof Record>`u`?Object:Record,Object]),t.default(`design:returntype`,typeof Promise>`u`?Object:Promise)],o.prototype,`loadTimeBased`,null),o=r.default([(0,a.api)(),t.default(`design:paramtypes`,[Object])],o),Object.defineProperty(exports,"LoadStateAggregateClient",{enumerable:!0,get:function(){return o}});
|
|
2
|
+
//# sourceMappingURL=loadStateAggregateClient.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadStateAggregateClient.cjs","names":["autoGeneratedError","_decorate","get","LoadStateAggregateEndpointPaths","_decorateParam","path","attribute","_decorateMetadata","api","require_bindMethods","require_decorateMetadata","require_decorateParam","require_decorate","require_endpointPaths","_ahoo_wang_fetcher_decorator","LoadStateAggregateClient","apiMetadata","id","attributes","abort","version","createTime"],"sources":["../../../../src/client/query/state/loadStateAggregateClient.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 ApiMetadata,\n ApiMetadataCapable,\n} from '@ahoo-wang/fetcher-decorator';\nimport type { LoadStateAggregateApi } from './loadStateAggregateApi.js';\nimport {\n api,\n attribute,\n autoGeneratedError,\n get,\n path,\n} from '@ahoo-wang/fetcher-decorator';\nimport { LoadStateAggregateEndpointPaths } from './endpointPaths.js';\nimport { bindMethods } from '../../bindMethods.js';\n\n/**\n * Loads the state of an aggregate by its ID, as the server's aggregate\n * repository loads it: the latest snapshot and the events after it, so the\n * state is current even when snapshots lag. `GET {basePath}/{id}/state` for\n * the current state, or the state at a version or a point in time. An\n * aggregate that does not exist or is deleted answers 404. It takes no\n * filter; to search, use a `SnapshotQueryClient`. Create it with\n * `QueryClientFactory.createLoadStateAggregateClient`, or with the\n * `ApiMetadata` of the aggregate's base path.\n *\n * @template S - The type of the aggregate state\n *\n * @example\n * ```typescript\n * const orders = new LoadStateAggregateClient<{ status: string }>({\n * basePath: 'order',\n * });\n * const order = await orders.load('order-1');\n * const third = await orders.loadVersioned('order-1', 3);\n * ```\n */\n@api()\nexport class LoadStateAggregateClient<S>\n implements LoadStateAggregateApi<S>, ApiMetadataCapable\n{\n constructor(public readonly apiMetadata?: ApiMetadata) {\n bindMethods(this);\n }\n\n /**\n * Loads the current state of the aggregate by its ID.\n *\n * @param id - The unique identifier of the aggregate to load\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the current state of the aggregate\n */\n @get(LoadStateAggregateEndpointPaths.LOAD)\n /* v8 ignore start */\n load(\n @path('id') id: string,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(id, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Loads the state of the aggregate at a specific version by its ID.\n *\n * @param id - The unique identifier of the aggregate to load\n * @param version - The version number of the aggregate state to load\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the state of the aggregate at the specified version\n */\n @get(LoadStateAggregateEndpointPaths.LOAD_VERSIONED)\n /* v8 ignore start */\n loadVersioned(\n @path('id') id: string,\n @path('version') version: number,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(id, version, attributes, abort);\n }\n /* v8 ignore stop */\n\n /**\n * Loads the state of the aggregate at a specific point in time by its ID.\n *\n * @param id - The unique identifier of the aggregate to load\n * @param createTime - The creation timestamp to load the aggregate state for\n * @param attributes - Optional shared attributes that can be accessed by interceptors\n * throughout the request lifecycle. These attributes allow passing\n * custom data between different interceptors.\n * @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.\n * @returns A promise that resolves to the state of the aggregate at the specified time\n */\n @get(LoadStateAggregateEndpointPaths.LOAD_TIME_BASED)\n /* v8 ignore start */\n loadTimeBased(\n @path('id') id: string,\n @path('createTime') createTime: number,\n @attribute() attributes?: Record<string, unknown>,\n abort?: AbortController | AbortSignal,\n ): Promise<S> {\n throw autoGeneratedError(id, createTime, attributes, abort);\n }\n /* v8 ignore stop */\n}\n"],"mappings":"uYAkDO,IAAMe,EAAN,KAEP,CACE,YAAY,EAA2C,CAA3B,KAAA,YAAAC,EAC1BP,EAAA,YAAY,IAAI,CAClB,CAYA,KAGE,EACA,EACA,EACY,CACZ,MAAA,EAAMT,EAAAA,mBAAAA,CAAmBiB,EAAIC,EAAYC,CAAK,CAChD,CAcA,cAGE,EACA,EACA,EACA,EACY,CACZ,MAAA,EAAMnB,EAAAA,mBAAAA,CAAmBiB,EAAIG,EAASF,EAAYC,CAAK,CACzD,CAcA,cAGE,EACA,EACA,EACA,EACY,CACZ,MAAA,EAAMnB,EAAAA,mBAAAA,CAAmBiB,EAAII,EAAYH,EAAYC,CAAK,CAC5D,CAEF,cAxDGjB,EAAAA,EAAAA,IAAAA,CAAIC,EAAAA,gCAAgC,IAAI,EAGtCC,EAAAA,QAAA,GAAA,EAAAC,EAAAA,KAAAA,CAAK,IAAI,CAAA,EACTD,EAAAA,QAAA,GAAA,EAAAE,EAAAA,UAAAA,CAAU,CAAA,0NAkBZJ,EAAAA,EAAAA,IAAAA,CAAIC,EAAAA,gCAAgC,cAAc,EAGhDC,EAAAA,QAAA,GAAA,EAAAC,EAAAA,KAAAA,CAAK,IAAI,CAAA,EACTD,EAAAA,QAAA,GAAA,EAAAC,EAAAA,KAAAA,CAAK,SAAS,CAAA,EACdD,EAAAA,QAAA,GAAA,EAAAE,EAAAA,UAAAA,CAAU,CAAA,0OAkBZJ,EAAAA,EAAAA,IAAAA,CAAIC,EAAAA,gCAAgC,eAAe,EAGjDC,EAAAA,QAAA,GAAA,EAAAC,EAAAA,KAAAA,CAAK,IAAI,CAAA,EACTD,EAAAA,QAAA,GAAA,EAAAC,EAAAA,KAAAA,CAAK,YAAY,CAAA,EACjBD,EAAAA,QAAA,GAAA,EAAAE,EAAAA,UAAAA,CAAU,CAAA,8NApEd,EAAAL,EAAAA,QAAA,EAAA,EAAAO,EAAAA,IAAAA,CAAI,EAAAD,EAAAA,QAAA,oBAAA,CAAA,MAAA,CAAA,CAAA,EAAAQ,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
|
|
2
|
+
import { LoadStateAggregateApi } from './loadStateAggregateApi.cjs';
|
|
3
|
+
/**
|
|
4
|
+
* Loads the state of an aggregate by its ID, as the server's aggregate
|
|
5
|
+
* repository loads it: the latest snapshot and the events after it, so the
|
|
6
|
+
* state is current even when snapshots lag. `GET {basePath}/{id}/state` for
|
|
7
|
+
* the current state, or the state at a version or a point in time. An
|
|
8
|
+
* aggregate that does not exist or is deleted answers 404. It takes no
|
|
9
|
+
* filter; to search, use a `SnapshotQueryClient`. Create it with
|
|
10
|
+
* `QueryClientFactory.createLoadStateAggregateClient`, or with the
|
|
11
|
+
* `ApiMetadata` of the aggregate's base path.
|
|
12
|
+
*
|
|
13
|
+
* @template S - The type of the aggregate state
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const orders = new LoadStateAggregateClient<{ status: string }>({
|
|
18
|
+
* basePath: 'order',
|
|
19
|
+
* });
|
|
20
|
+
* const order = await orders.load('order-1');
|
|
21
|
+
* const third = await orders.loadVersioned('order-1', 3);
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class LoadStateAggregateClient<S> implements LoadStateAggregateApi<S>, ApiMetadataCapable {
|
|
25
|
+
readonly apiMetadata?: ApiMetadata | undefined;
|
|
26
|
+
constructor(apiMetadata?: ApiMetadata | undefined);
|
|
27
|
+
/**
|
|
28
|
+
* Loads the current state of the aggregate by its ID.
|
|
29
|
+
*
|
|
30
|
+
* @param id - The unique identifier of the aggregate to load
|
|
31
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
32
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
33
|
+
* custom data between different interceptors.
|
|
34
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
35
|
+
* @returns A promise that resolves to the current state of the aggregate
|
|
36
|
+
*/
|
|
37
|
+
load(id: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
38
|
+
/**
|
|
39
|
+
* Loads the state of the aggregate at a specific version by its ID.
|
|
40
|
+
*
|
|
41
|
+
* @param id - The unique identifier of the aggregate to load
|
|
42
|
+
* @param version - The version number of the aggregate state to load
|
|
43
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
44
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
45
|
+
* custom data between different interceptors.
|
|
46
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
47
|
+
* @returns A promise that resolves to the state of the aggregate at the specified version
|
|
48
|
+
*/
|
|
49
|
+
loadVersioned(id: string, version: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
50
|
+
/**
|
|
51
|
+
* Loads the state of the aggregate at a specific point in time by its ID.
|
|
52
|
+
*
|
|
53
|
+
* @param id - The unique identifier of the aggregate to load
|
|
54
|
+
* @param createTime - The creation timestamp to load the aggregate state for
|
|
55
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
56
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
57
|
+
* custom data between different interceptors.
|
|
58
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
59
|
+
* @returns A promise that resolves to the state of the aggregate at the specified time
|
|
60
|
+
*/
|
|
61
|
+
loadTimeBased(id: string, createTime: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
62
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ApiMetadata, ApiMetadataCapable } from '@ahoo-wang/fetcher-decorator';
|
|
2
|
+
import { LoadStateAggregateApi } from './loadStateAggregateApi.js';
|
|
3
|
+
/**
|
|
4
|
+
* Loads the state of an aggregate by its ID, as the server's aggregate
|
|
5
|
+
* repository loads it: the latest snapshot and the events after it, so the
|
|
6
|
+
* state is current even when snapshots lag. `GET {basePath}/{id}/state` for
|
|
7
|
+
* the current state, or the state at a version or a point in time. An
|
|
8
|
+
* aggregate that does not exist or is deleted answers 404. It takes no
|
|
9
|
+
* filter; to search, use a `SnapshotQueryClient`. Create it with
|
|
10
|
+
* `QueryClientFactory.createLoadStateAggregateClient`, or with the
|
|
11
|
+
* `ApiMetadata` of the aggregate's base path.
|
|
12
|
+
*
|
|
13
|
+
* @template S - The type of the aggregate state
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const orders = new LoadStateAggregateClient<{ status: string }>({
|
|
18
|
+
* basePath: 'order',
|
|
19
|
+
* });
|
|
20
|
+
* const order = await orders.load('order-1');
|
|
21
|
+
* const third = await orders.loadVersioned('order-1', 3);
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class LoadStateAggregateClient<S> implements LoadStateAggregateApi<S>, ApiMetadataCapable {
|
|
25
|
+
readonly apiMetadata?: ApiMetadata | undefined;
|
|
26
|
+
constructor(apiMetadata?: ApiMetadata | undefined);
|
|
27
|
+
/**
|
|
28
|
+
* Loads the current state of the aggregate by its ID.
|
|
29
|
+
*
|
|
30
|
+
* @param id - The unique identifier of the aggregate to load
|
|
31
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
32
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
33
|
+
* custom data between different interceptors.
|
|
34
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
35
|
+
* @returns A promise that resolves to the current state of the aggregate
|
|
36
|
+
*/
|
|
37
|
+
load(id: string, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
38
|
+
/**
|
|
39
|
+
* Loads the state of the aggregate at a specific version by its ID.
|
|
40
|
+
*
|
|
41
|
+
* @param id - The unique identifier of the aggregate to load
|
|
42
|
+
* @param version - The version number of the aggregate state to load
|
|
43
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
44
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
45
|
+
* custom data between different interceptors.
|
|
46
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
47
|
+
* @returns A promise that resolves to the state of the aggregate at the specified version
|
|
48
|
+
*/
|
|
49
|
+
loadVersioned(id: string, version: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
50
|
+
/**
|
|
51
|
+
* Loads the state of the aggregate at a specific point in time by its ID.
|
|
52
|
+
*
|
|
53
|
+
* @param id - The unique identifier of the aggregate to load
|
|
54
|
+
* @param createTime - The creation timestamp to load the aggregate state for
|
|
55
|
+
* @param attributes - Optional shared attributes that can be accessed by interceptors
|
|
56
|
+
* throughout the request lifecycle. These attributes allow passing
|
|
57
|
+
* custom data between different interceptors.
|
|
58
|
+
* @param abort - Cancels the request: an `AbortController`, or an `AbortSignal` such as `AbortSignal.timeout(ms)` or the `signal` a data-fetching library passes.
|
|
59
|
+
* @returns A promise that resolves to the state of the aggregate at the specified time
|
|
60
|
+
*/
|
|
61
|
+
loadTimeBased(id: string, createTime: number, attributes?: Record<string, unknown>, abort?: AbortController | AbortSignal): Promise<S>;
|
|
62
|
+
}
|