@ferricstore/ferricstore 0.11.8 → 0.11.9
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/README.md +35 -1
- package/dist/index.cjs +672 -152
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -2
- package/dist/index.d.ts +40 -2
- package/dist/index.js +662 -145
- package/dist/index.js.map +1 -1
- package/docs/api/assets/hierarchy.js +1 -1
- package/docs/api/assets/highlight.css +1 -1
- package/docs/api/assets/main.js +1 -1
- package/docs/api/assets/navigation.js +1 -1
- package/docs/api/assets/search.js +1 -1
- package/docs/api/assets/style.css +18 -3
- package/docs/api/classes/BitmapStore.html +192 -3
- package/docs/api/classes/BloomFilterStore.html +197 -3
- package/docs/api/classes/ClaimHydrationError.html +202 -7
- package/docs/api/classes/ConnectionClosedError.html +193 -8
- package/docs/api/classes/CountMinSketchStore.html +171 -3
- package/docs/api/classes/CuckooFilterStore.html +196 -3
- package/docs/api/classes/FerricStoreClient.html +2888 -7
- package/docs/api/classes/FerricStoreError.html +197 -7
- package/docs/api/classes/FlowAlreadyExistsError.html +185 -7
- package/docs/api/classes/FlowBatchError.html +204 -8
- package/docs/api/classes/FlowNotFoundError.html +185 -7
- package/docs/api/classes/FlowQueryError.html +204 -7
- package/docs/api/classes/FlowWrongStateError.html +185 -7
- package/docs/api/classes/GeoStore.html +188 -3
- package/docs/api/classes/HTTPAdapter.html +144 -0
- package/docs/api/classes/HTTPTransportError.html +222 -0
- package/docs/api/classes/HashStore.html +493 -3
- package/docs/api/classes/HyperLogLogStore.html +148 -3
- package/docs/api/classes/InvalidCommandError.html +185 -7
- package/docs/api/classes/JsonCodec.html +104 -3
- package/docs/api/classes/KeyValueStore.html +794 -3
- package/docs/api/classes/LeaseRenewalError.html +157 -8
- package/docs/api/classes/ListStore.html +451 -3
- package/docs/api/classes/LockHeldError.html +185 -7
- package/docs/api/classes/LockNotOwnedError.html +185 -7
- package/docs/api/classes/NativeAdapter.html +135 -3
- package/docs/api/classes/OverloadedError.html +190 -7
- package/docs/api/classes/Queue.html +141 -4
- package/docs/api/classes/QueueClient.html +97 -4
- package/docs/api/classes/QueueCompletionError.html +163 -8
- package/docs/api/classes/QueueWorker.html +153 -4
- package/docs/api/classes/RawCodec.html +96 -3
- package/docs/api/classes/ReconnectingExecutor.html +180 -5
- package/docs/api/classes/RequestTimeoutError.html +199 -8
- package/docs/api/classes/RerouteError.html +188 -8
- package/docs/api/classes/RoutingTopology.html +125 -3
- package/docs/api/classes/SetStore.html +363 -3
- package/docs/api/classes/SortedSetStore.html +369 -3
- package/docs/api/classes/StaleLeaseError.html +185 -7
- package/docs/api/classes/StalePolicyGenerationError.html +188 -8
- package/docs/api/classes/StreamStore.html +259 -3
- package/docs/api/classes/TDigestStore.html +348 -3
- package/docs/api/classes/TopKStore.html +229 -3
- package/docs/api/classes/TopologyNativeAdapterPool.html +180 -5
- package/docs/api/classes/Workflow.html +266 -4
- package/docs/api/classes/WorkflowClient.html +97 -4
- package/docs/api/classes/WorkflowContext.html +293 -5
- package/docs/api/classes/WorkflowFlowCommands.html +251 -3
- package/docs/api/classes/WorkflowWorker.html +108 -4
- package/docs/api/functions/classifyServerError.html +44 -1
- package/docs/api/functions/complete.html +41 -1
- package/docs/api/functions/fail.html +41 -1
- package/docs/api/functions/httpCommandDisposition.html +41 -0
- package/docs/api/functions/isOutcome.html +41 -1
- package/docs/api/functions/isReconnectableClosedConnectionError.html +41 -1
- package/docs/api/functions/mapException.html +41 -1
- package/docs/api/functions/projectFlowQuery.html +43 -1
- package/docs/api/functions/retry.html +41 -1
- package/docs/api/functions/transition.html +42 -1
- package/docs/api/hierarchy.html +112 -1
- package/docs/api/index.html +70 -3
- package/docs/api/interfaces/AdminListOptions.html +70 -2
- package/docs/api/interfaces/ApprovalListOptions.html +74 -2
- package/docs/api/interfaces/ApprovalRequestOptions.html +99 -2
- package/docs/api/interfaces/AttributeQueryOptions.html +69 -2
- package/docs/api/interfaces/AutoBatchOptions.html +72 -3
- package/docs/api/interfaces/BackpressurePolicy.html +69 -2
- package/docs/api/interfaces/BudgetCommitOptions.html +59 -2
- package/docs/api/interfaces/BudgetReserveOptions.html +69 -2
- package/docs/api/interfaces/CancelOptions.html +135 -2
- package/docs/api/interfaces/ChildSpec.html +79 -2
- package/docs/api/interfaces/CircuitOpenOptions.html +64 -2
- package/docs/api/interfaces/ClaimDueOptions.html +146 -3
- package/docs/api/interfaces/ClaimHydrationItem.html +59 -2
- package/docs/api/interfaces/ClaimedItem.html +100 -3
- package/docs/api/interfaces/Codec.html +84 -2
- package/docs/api/interfaces/CommandExecutor.html +145 -4
- package/docs/api/interfaces/CompleteJobsAndClaimJobsResult.html +84 -7
- package/docs/api/interfaces/CompleteManyOptions.html +114 -2
- package/docs/api/interfaces/CompleteOptions.html +143 -2
- package/docs/api/interfaces/CompleteOutcome.html +117 -2
- package/docs/api/interfaces/CountMinMergeOptions.html +54 -2
- package/docs/api/interfaces/CreateItem.html +84 -2
- package/docs/api/interfaces/CreateManyOptions.html +173 -6
- package/docs/api/interfaces/CreateOptions.html +143 -4
- package/docs/api/interfaces/EffectCompensateOptions.html +89 -2
- package/docs/api/interfaces/EffectConfirmOptions.html +89 -2
- package/docs/api/interfaces/EffectFailOptions.html +94 -2
- package/docs/api/interfaces/EffectReserveOptions.html +84 -2
- package/docs/api/interfaces/EffectStatusOptions.html +77 -2
- package/docs/api/interfaces/ExecutePipelineOptions.html +68 -4
- package/docs/api/interfaces/ExtendLeaseOptions.html +79 -2
- package/docs/api/interfaces/FailOptions.html +143 -2
- package/docs/api/interfaces/FailOutcome.html +117 -2
- package/docs/api/interfaces/FencedItem.html +69 -2
- package/docs/api/interfaces/FerricStoreClientFromUrlOptions.html +105 -4
- package/docs/api/interfaces/FerricStoreClientOptions.html +84 -4
- package/docs/api/interfaces/FetchOrComputeComputeResult.html +83 -4
- package/docs/api/interfaces/FetchOrComputeHitResult.html +78 -2
- package/docs/api/interfaces/FlowBatchCompletedItem.html +59 -2
- package/docs/api/interfaces/FlowEventProjectionField.html +64 -2
- package/docs/api/interfaces/FlowExplainCapabilities.html +69 -2
- package/docs/api/interfaces/FlowExplainResult.html +124 -2
- package/docs/api/interfaces/FlowMaxActiveFailure.html +59 -2
- package/docs/api/interfaces/FlowPolicyBackoffSnapshot.html +69 -2
- package/docs/api/interfaces/FlowPolicyOptions.html +107 -6
- package/docs/api/interfaces/FlowPolicyRetentionSnapshot.html +59 -2
- package/docs/api/interfaces/FlowPolicyRetrySnapshot.html +64 -2
- package/docs/api/interfaces/FlowPolicySnapshot.html +121 -5
- package/docs/api/interfaces/FlowPolicyStateSnapshot.html +74 -2
- package/docs/api/interfaces/FlowQueryCountResult.html +89 -2
- package/docs/api/interfaces/FlowQueryErrorPosition.html +64 -2
- package/docs/api/interfaces/FlowQueryIndex.html +134 -2
- package/docs/api/interfaces/FlowQueryIndexBuild.html +106 -2
- package/docs/api/interfaces/FlowQueryIndexCoverage.html +69 -2
- package/docs/api/interfaces/FlowQueryIndexField.html +69 -2
- package/docs/api/interfaces/FlowQueryIndexFormat.html +79 -2
- package/docs/api/interfaces/FlowQueryIndexProgress.html +86 -2
- package/docs/api/interfaces/FlowQueryIndexRegistry.html +59 -2
- package/docs/api/interfaces/FlowQueryIndexRetirement.html +94 -2
- package/docs/api/interfaces/FlowQueryIndexServices.html +74 -2
- package/docs/api/interfaces/FlowQueryIndexStatistics.html +99 -2
- package/docs/api/interfaces/FlowQueryIndexStatus.html +84 -2
- package/docs/api/interfaces/FlowQueryIndexValidation.html +121 -2
- package/docs/api/interfaces/FlowQueryPage.html +59 -2
- package/docs/api/interfaces/FlowQueryQuality.html +69 -2
- package/docs/api/interfaces/FlowQueryRecordsResult.html +94 -2
- package/docs/api/interfaces/FlowQueryUsage.html +104 -2
- package/docs/api/interfaces/FlowRecord.html +173 -2
- package/docs/api/interfaces/FlowRunProjectionField.html +64 -2
- package/docs/api/interfaces/FlowStatePolicy.html +59 -2
- package/docs/api/interfaces/FlowStatsOptions.html +74 -2
- package/docs/api/interfaces/GeoMember.html +64 -2
- package/docs/api/interfaces/GovernanceLedgerOptions.html +74 -2
- package/docs/api/interfaces/HTTPAdapterOptions.html +120 -0
- package/docs/api/interfaces/HistoryOptions.html +124 -2
- package/docs/api/interfaces/InvocationCreateOptions.html +71 -2
- package/docs/api/interfaces/KeyInfo.html +79 -2
- package/docs/api/interfaces/LeaseMutationOptions.html +136 -2
- package/docs/api/interfaces/LimitAmountOptions.html +64 -2
- package/docs/api/interfaces/LimitLeaseOptions.html +74 -2
- package/docs/api/interfaces/LimitListOptions.html +78 -2
- package/docs/api/interfaces/LimitReleaseOptions.html +64 -2
- package/docs/api/interfaces/MutateOptions.html +110 -2
- package/docs/api/interfaces/NamedValueMutation.html +93 -2
- package/docs/api/interfaces/NativeAdapterOptions.html +175 -12
- package/docs/api/interfaces/NativeClientOptions.html +249 -16
- package/docs/api/interfaces/NativeProtocolEvent.html +69 -2
- package/docs/api/interfaces/ProtocolCommand.html +69 -2
- package/docs/api/interfaces/QueueOptions.html +64 -2
- package/docs/api/interfaces/QueueWorkerResult.html +69 -2
- package/docs/api/interfaces/RangeLimit.html +59 -2
- package/docs/api/interfaces/RateLimitResult.html +74 -2
- package/docs/api/interfaces/ReadOptions.html +107 -3
- package/docs/api/interfaces/ReclaimOptions.html +140 -3
- package/docs/api/interfaces/ReconnectOptions.html +75 -5
- package/docs/api/interfaces/RequestContext.html +64 -2
- package/docs/api/interfaces/RequestContextOptions.html +60 -2
- package/docs/api/interfaces/RetryOptions.html +143 -2
- package/docs/api/interfaces/RetryOutcome.html +117 -2
- package/docs/api/interfaces/RetryPolicy.html +79 -2
- package/docs/api/interfaces/RoutingEndpoint.html +69 -2
- package/docs/api/interfaces/RoutingRoute.html +79 -2
- package/docs/api/interfaces/RunStepsItem.html +59 -2
- package/docs/api/interfaces/RunStepsManyOptions.html +99 -2
- package/docs/api/interfaces/ScanOptions.html +66 -3
- package/docs/api/interfaces/ScheduleFireDueOptions.html +74 -2
- package/docs/api/interfaces/ScheduleFireOptions.html +59 -2
- package/docs/api/interfaces/ScheduleListOptions.html +89 -2
- package/docs/api/interfaces/ScheduleOptions.html +131 -3
- package/docs/api/interfaces/SearchOptions.html +122 -3
- package/docs/api/interfaces/StartAndClaimOptions.html +136 -3
- package/docs/api/interfaces/StateOptions.html +94 -2
- package/docs/api/interfaces/StateRegistration.html +104 -2
- package/docs/api/interfaces/StepContinueOptions.html +159 -3
- package/docs/api/interfaces/StoreCommandClient.html +89 -3
- package/docs/api/interfaces/TDigestCreateOptions.html +60 -2
- package/docs/api/interfaces/TDigestMergeOptions.html +66 -2
- package/docs/api/interfaces/TopologyNativeAdapterOptions.html +228 -15
- package/docs/api/interfaces/TransitionOptions.html +153 -2
- package/docs/api/interfaces/TransitionOutcome.html +122 -2
- package/docs/api/interfaces/ValueConfig.html +59 -2
- package/docs/api/interfaces/WorkerConfig.html +230 -15
- package/docs/api/interfaces/WorkflowOptions.html +69 -2
- package/docs/api/interfaces/WorkflowWorkerResult.html +69 -2
- package/docs/api/interfaces/XReadStream.html +59 -2
- package/docs/api/interfaces/ZAddMember.html +59 -2
- package/docs/api/modules.html +51 -1
- package/docs/api/types/BackoffKind.html +32 -1
- package/docs/api/types/CollectionScanOptions.html +34 -2
- package/docs/api/types/Command.html +32 -1
- package/docs/api/types/CommandArgument.html +32 -1
- package/docs/api/types/ConnectionRequestDisposition.html +36 -2
- package/docs/api/types/EndpointPolicy.html +34 -2
- package/docs/api/types/ExceptionPolicy.html +32 -1
- package/docs/api/types/ExpiryCondition.html +32 -1
- package/docs/api/types/FencingToken.html +34 -2
- package/docs/api/types/FetchOrComputeFencedResult.html +32 -1
- package/docs/api/types/FetchOrComputeResult.html +36 -1
- package/docs/api/types/FlowAdminRecord.html +32 -1
- package/docs/api/types/FlowPolicyBackoffKind.html +32 -1
- package/docs/api/types/FlowProjectionField.html +32 -1
- package/docs/api/types/FlowProjectionShape.html +32 -1
- package/docs/api/types/FlowQueryIndexServiceState.html +32 -1
- package/docs/api/types/FlowQueryInteger.html +32 -1
- package/docs/api/types/FlowQueryParameter.html +32 -1
- package/docs/api/types/FlowQueryParameters.html +32 -1
- package/docs/api/types/FlowQueryRecord.html +32 -1
- package/docs/api/types/FlowQueryResult.html +32 -1
- package/docs/api/types/FlowStateMode.html +32 -1
- package/docs/api/types/FlowStatePolicyLike.html +32 -1
- package/docs/api/types/GeoAddOptions.html +34 -2
- package/docs/api/types/GetExOptions.html +34 -2
- package/docs/api/types/HTTPCommandDisposition.html +32 -0
- package/docs/api/types/HashScanResult.html +38 -2
- package/docs/api/types/IntegerReply.html +34 -2
- package/docs/api/types/ManagementPairs.html +32 -1
- package/docs/api/types/MaxActiveMs.html +32 -1
- package/docs/api/types/Outcome.html +32 -1
- package/docs/api/types/QueueBatchHandler.html +44 -1
- package/docs/api/types/QueueHandler.html +44 -1
- package/docs/api/types/QueueJob.html +32 -1
- package/docs/api/types/RequestDisposition.html +32 -1
- package/docs/api/types/ScheduleCatchupPolicy.html +34 -2
- package/docs/api/types/ScheduleFireDueResult.html +55 -3
- package/docs/api/types/ScheduleFireResult.html +34 -2
- package/docs/api/types/ScheduleKind.html +32 -1
- package/docs/api/types/ScheduleOverlapPolicy.html +32 -1
- package/docs/api/types/ScheduleRecord.html +95 -12
- package/docs/api/types/ScheduleState.html +32 -1
- package/docs/api/types/SearchStateMeta.html +32 -1
- package/docs/api/types/SetOptions.html +34 -2
- package/docs/api/types/SetScanResult.html +38 -2
- package/docs/api/types/SortedSetScanResult.html +38 -2
- package/docs/api/types/StateMeta.html +32 -1
- package/docs/api/types/StateMetaValue.html +32 -1
- package/docs/api/types/TopKReserveOptions.html +32 -1
- package/docs/api/types/WorkerProfile.html +32 -1
- package/docs/api/types/WorkerRefillStrategy.html +32 -1
- package/docs/api/types/WorkflowHandler.html +44 -1
- package/docs/api/types/ZAddOptions.html +34 -2
- package/docs/api/variables/COMMAND_OPCODES.html +297 -1
- package/docs/api/variables/FERRICSTORE_MINIMUM_SERVER_VERSION.html +34 -2
- package/docs/api/variables/FERRICSTORE_NATIVE_PROTOCOL_VERSION.html +34 -2
- package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +34 -2
- package/docs/api/variables/FlowProjection.html +32 -1
- package/docs/api/variables/MAX_FLOW_POLICY_GENERATION.html +32 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ Requires Node.js 22.22 or newer. The SDK ships ESM and CommonJS builds and is te
|
|
|
18
18
|
|
|
19
19
|
## Compatibility
|
|
20
20
|
|
|
21
|
-
TypeScript SDK `0.11.
|
|
21
|
+
TypeScript SDK `0.11.9` requires FerricStore server `0.11.4` or newer. With
|
|
22
22
|
FerricStore 0.11.8 it negotiates compact Stream mode 34 for homogeneous auto-ID
|
|
23
23
|
`XADD` pipelines and compact Pub/Sub mode 35 for homogeneous `PUBLISH`
|
|
24
24
|
pipelines. Native wire protocol v1 and the generic fallback are unchanged.
|
|
@@ -90,6 +90,40 @@ const projected = projectFlowQuery(
|
|
|
90
90
|
const result = await client.query(projected, { partition: "partition-a", run: "run-1" });
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
+
## HTTP transport
|
|
94
|
+
|
|
95
|
+
`fromUrl` accepts `http://` and `https://` without changing the command API.
|
|
96
|
+
HTTP/1.1 uses a persistent keep-alive pool. Set `http2: true` to use one
|
|
97
|
+
multiplexed HTTP/2 session per origin:
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
const client = await FerricStoreClient.fromUrl(
|
|
101
|
+
"https://ferricstore-http.example.com",
|
|
102
|
+
{
|
|
103
|
+
httpOptions: {
|
|
104
|
+
username: "default",
|
|
105
|
+
password,
|
|
106
|
+
http2: true
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
await client.ping();
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Use `bearerToken` for Bearer authentication. Basic username/password
|
|
115
|
+
authentication requires HTTPS; omitting the username uses `default`. One SDK
|
|
116
|
+
pipeline becomes one ordered HTTP request. `httpOptions` also bounds request
|
|
117
|
+
and response bytes, batch items, HTTP/1.1 connections, redirects, and the whole
|
|
118
|
+
request deadline.
|
|
119
|
+
|
|
120
|
+
The HTTP endpoint is stateless. `AUTH`, `CLIENT`, transactions, Pub/Sub
|
|
121
|
+
subscriptions, blocking list/stream reads, and `WATCH` require native TCP and
|
|
122
|
+
fail before network I/O. Redirects intentionally retain authentication and
|
|
123
|
+
custom headers across origins, so configure only endpoints and redirect targets
|
|
124
|
+
you trust. Use `ferric://` or `ferrics://` whenever connection-local behavior is
|
|
125
|
+
required.
|
|
126
|
+
|
|
93
127
|
## Cluster-aware client
|
|
94
128
|
|
|
95
129
|
For a single node, use `fromUrl`. For a FerricStore cluster, pass multiple seed URLs. The SDK fetches the server `SHARDS` topology, routes keyed commands to the current shard leader, and refuses learned hosts outside the seed-host trust set by default. The creation promise resolves only after startup and authentication succeed; cluster creation also waits for the initial topology, so connection failures reject the corresponding `await` directly.
|