@ferricstore/ferricstore 0.2.0 → 0.3.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/README.md +20 -3
- package/dist/index.cjs +515 -124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -7
- package/dist/index.d.ts +58 -7
- package/dist/index.js +502 -113
- package/dist/index.js.map +1 -1
- package/docs/api/assets/hierarchy.js +1 -1
- package/docs/api/assets/navigation.js +1 -1
- package/docs/api/assets/search.js +1 -1
- package/docs/api/classes/ClaimHydrationError.html +1 -1
- package/docs/api/classes/ConnectionClosedError.html +1 -1
- package/docs/api/classes/FerricStoreClient.html +3 -3
- package/docs/api/classes/FerricStoreError.html +1 -1
- package/docs/api/classes/FlowAlreadyExistsError.html +2 -2
- package/docs/api/classes/FlowBatchError.html +1 -1
- package/docs/api/classes/FlowNotFoundError.html +1 -1
- package/docs/api/classes/FlowWrongStateError.html +1 -1
- package/docs/api/classes/InvalidCommandError.html +2 -2
- package/docs/api/classes/LeaseRenewalError.html +1 -1
- package/docs/api/classes/LockHeldError.html +2 -2
- package/docs/api/classes/LockNotOwnedError.html +2 -2
- package/docs/api/classes/OverloadedError.html +2 -2
- package/docs/api/classes/QueueCompletionError.html +1 -1
- package/docs/api/classes/ReconnectingExecutor.html +4 -4
- package/docs/api/classes/RequestTimeoutError.html +1 -1
- package/docs/api/classes/RerouteError.html +2 -2
- package/docs/api/classes/StaleLeaseError.html +1 -1
- package/docs/api/classes/StalePolicyGenerationError.html +39 -0
- package/docs/api/classes/TopologyNativeAdapterPool.html +3 -3
- package/docs/api/classes/Workflow.html +1 -1
- package/docs/api/classes/WorkflowWorker.html +2 -2
- package/docs/api/functions/classifyServerError.html +1 -1
- package/docs/api/functions/isReconnectableClosedConnectionError.html +1 -1
- package/docs/api/functions/mapException.html +1 -1
- package/docs/api/hierarchy.html +1 -1
- package/docs/api/index.html +8 -4
- package/docs/api/interfaces/AdminListOptions.html +1 -1
- package/docs/api/interfaces/CancelOptions.html +2 -2
- package/docs/api/interfaces/CompleteOptions.html +2 -2
- package/docs/api/interfaces/CompleteOutcome.html +1 -1
- package/docs/api/interfaces/CreateManyOptions.html +1 -1
- package/docs/api/interfaces/EffectCompensateOptions.html +1 -1
- package/docs/api/interfaces/EffectConfirmOptions.html +1 -1
- package/docs/api/interfaces/EffectFailOptions.html +1 -1
- package/docs/api/interfaces/EffectStatusOptions.html +1 -1
- package/docs/api/interfaces/ExtendLeaseOptions.html +2 -2
- package/docs/api/interfaces/FailOptions.html +2 -2
- package/docs/api/interfaces/FailOutcome.html +1 -1
- package/docs/api/interfaces/FerricStoreClientFromUrlOptions.html +1 -1
- package/docs/api/interfaces/FerricStoreClientOptions.html +1 -1
- package/docs/api/interfaces/FlowPolicyBackoffSnapshot.html +5 -0
- package/docs/api/interfaces/FlowPolicyOptions.html +8 -4
- package/docs/api/interfaces/FlowPolicyRetentionSnapshot.html +3 -0
- package/docs/api/interfaces/FlowPolicyRetrySnapshot.html +4 -0
- package/docs/api/interfaces/FlowPolicySnapshot.html +17 -0
- package/docs/api/interfaces/FlowPolicyStateSnapshot.html +6 -0
- package/docs/api/interfaces/HistoryOptions.html +2 -2
- package/docs/api/interfaces/InvocationCreateOptions.html +2 -2
- package/docs/api/interfaces/LeaseMutationOptions.html +2 -2
- package/docs/api/interfaces/LimitListOptions.html +1 -1
- package/docs/api/interfaces/MutateOptions.html +2 -2
- package/docs/api/interfaces/NamedValueMutation.html +1 -1
- package/docs/api/interfaces/ProtocolCommand.html +2 -2
- package/docs/api/interfaces/ReadOptions.html +2 -2
- package/docs/api/interfaces/ReclaimOptions.html +1 -1
- package/docs/api/interfaces/RequestContext.html +2 -2
- package/docs/api/interfaces/RequestContextOptions.html +2 -2
- package/docs/api/interfaces/RetryOptions.html +2 -2
- package/docs/api/interfaces/RetryOutcome.html +1 -1
- package/docs/api/interfaces/RunStepsItem.html +2 -2
- package/docs/api/interfaces/RunStepsManyOptions.html +2 -2
- package/docs/api/interfaces/SearchOptions.html +2 -2
- package/docs/api/interfaces/StepContinueOptions.html +3 -3
- package/docs/api/interfaces/TDigestCreateOptions.html +1 -1
- package/docs/api/interfaces/TDigestMergeOptions.html +1 -1
- package/docs/api/interfaces/TransitionOptions.html +2 -2
- package/docs/api/interfaces/TransitionOutcome.html +1 -1
- package/docs/api/modules.html +1 -1
- package/docs/api/types/ConnectionRequestDisposition.html +1 -1
- package/docs/api/types/FlowPolicyBackoffKind.html +1 -0
- package/docs/api/types/ManagementPairs.html +1 -1
- package/docs/api/types/SearchStateMeta.html +1 -1
- package/docs/api/variables/FERRICSTORE_MINIMUM_SERVER_VERSION.html +1 -1
- package/docs/api/variables/FERRICSTORE_NATIVE_PROTOCOL_VERSION.html +1 -1
- package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +1 -1
- package/docs/api/variables/MAX_FLOW_POLICY_GENERATION.html +1 -0
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -45,6 +45,10 @@ declare class FlowWrongStateError extends FerricStoreError {
|
|
|
45
45
|
declare class StaleLeaseError extends FerricStoreError {
|
|
46
46
|
readonly code = "stale_lease";
|
|
47
47
|
}
|
|
48
|
+
/** FLOW.POLICY.SET expected_generation did not match the stored generation. */
|
|
49
|
+
declare class StalePolicyGenerationError extends FerricStoreError {
|
|
50
|
+
readonly code = "stale_policy_generation";
|
|
51
|
+
}
|
|
48
52
|
declare class FlowAlreadyExistsError extends FerricStoreError {
|
|
49
53
|
readonly code = "flow_already_exists";
|
|
50
54
|
}
|
|
@@ -960,6 +964,10 @@ interface FlowStatePolicy {
|
|
|
960
964
|
}
|
|
961
965
|
type FlowStatePolicyLike = FlowStatePolicy | RetryPolicy;
|
|
962
966
|
interface FlowPolicyOptions {
|
|
967
|
+
/** Replace the complete stored policy instead of applying the default deep patch. */
|
|
968
|
+
replace?: boolean;
|
|
969
|
+
/** Compare-and-swap generation. Must be a nonnegative JavaScript safe integer. */
|
|
970
|
+
expectedGeneration?: number;
|
|
963
971
|
state?: string;
|
|
964
972
|
mode?: FlowStateMode;
|
|
965
973
|
retry?: RetryPolicy;
|
|
@@ -1823,6 +1831,49 @@ declare class FerricStoreManagementClient extends FerricStoreClientCore {
|
|
|
1823
1831
|
governanceLedger(id: string, options?: GovernanceLedgerOptions): Promise<FlowAdminRecord[]>;
|
|
1824
1832
|
}
|
|
1825
1833
|
|
|
1834
|
+
declare const MAX_FLOW_POLICY_GENERATION: number;
|
|
1835
|
+
type FlowPolicyBackoffKind = "none" | "fixed" | "linear" | "exponential";
|
|
1836
|
+
interface FlowPolicyBackoffSnapshot {
|
|
1837
|
+
readonly kind: FlowPolicyBackoffKind;
|
|
1838
|
+
readonly baseMs: number;
|
|
1839
|
+
readonly maxMs: number;
|
|
1840
|
+
readonly jitterPct: number;
|
|
1841
|
+
}
|
|
1842
|
+
interface FlowPolicyRetrySnapshot {
|
|
1843
|
+
readonly maxRetries: number;
|
|
1844
|
+
readonly backoff: FlowPolicyBackoffSnapshot;
|
|
1845
|
+
readonly exhaustedTo: string;
|
|
1846
|
+
}
|
|
1847
|
+
interface FlowPolicyRetentionSnapshot {
|
|
1848
|
+
readonly ttlMs: number;
|
|
1849
|
+
readonly historyMaxEvents: number;
|
|
1850
|
+
}
|
|
1851
|
+
interface FlowPolicyStateSnapshot {
|
|
1852
|
+
readonly mode: FlowStateMode;
|
|
1853
|
+
readonly maxActiveMs?: number;
|
|
1854
|
+
readonly retry: FlowPolicyRetrySnapshot;
|
|
1855
|
+
readonly retention: FlowPolicyRetentionSnapshot;
|
|
1856
|
+
readonly governance?: Readonly<Record<string, unknown>>;
|
|
1857
|
+
}
|
|
1858
|
+
/** Resolved policy state returned by FLOW.POLICY.SET and FLOW.POLICY.GET. */
|
|
1859
|
+
interface FlowPolicySnapshot {
|
|
1860
|
+
readonly type: string;
|
|
1861
|
+
/** Server-allocated monotonic generation in the JavaScript safe-integer range. */
|
|
1862
|
+
readonly generation: number;
|
|
1863
|
+
readonly state?: string;
|
|
1864
|
+
readonly version?: string | number;
|
|
1865
|
+
readonly mode?: FlowStateMode;
|
|
1866
|
+
readonly maxActiveMs?: number;
|
|
1867
|
+
readonly retry: FlowPolicyRetrySnapshot;
|
|
1868
|
+
readonly retention: FlowPolicyRetentionSnapshot;
|
|
1869
|
+
readonly indexedAttributes: readonly string[];
|
|
1870
|
+
readonly indexedStateMeta?: string;
|
|
1871
|
+
readonly governance?: Readonly<Record<string, unknown>>;
|
|
1872
|
+
readonly states?: Readonly<Record<string, FlowPolicyStateSnapshot>>;
|
|
1873
|
+
/** Original protocol value for forward-compatible fields not yet modeled by the SDK. */
|
|
1874
|
+
readonly raw: unknown;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1826
1877
|
/** @internal Read, policy, and shared Flow helpers kept off the primary implementation module. */
|
|
1827
1878
|
declare class FerricStoreFlowSupportClient extends FerricStoreManagementClient {
|
|
1828
1879
|
rewind(id: string, options?: {
|
|
@@ -1872,10 +1923,10 @@ declare class FerricStoreFlowSupportClient extends FerricStoreManagementClient {
|
|
|
1872
1923
|
values?: Record<string, unknown>;
|
|
1873
1924
|
valueRefs?: Record<string, string>;
|
|
1874
1925
|
}): Promise<unknown>;
|
|
1875
|
-
installPolicy(type: string, options?: FlowPolicyOptions): Promise<
|
|
1926
|
+
installPolicy(type: string, options?: FlowPolicyOptions): Promise<FlowPolicySnapshot>;
|
|
1876
1927
|
policyGet(type: string, options?: {
|
|
1877
1928
|
state?: string;
|
|
1878
|
-
}): Promise<
|
|
1929
|
+
}): Promise<FlowPolicySnapshot>;
|
|
1879
1930
|
retentionCleanup(): Promise<Record<string, unknown>>;
|
|
1880
1931
|
protected executeProducerWrite(args: CommandArgument[]): Promise<unknown>;
|
|
1881
1932
|
protected recordOrGet(response: unknown, id: string, partitionKey: string | undefined): Promise<FlowRecord>;
|
|
@@ -2330,7 +2381,7 @@ declare class Workflow {
|
|
|
2330
2381
|
worker(options?: WorkerConfig & {
|
|
2331
2382
|
states?: string[];
|
|
2332
2383
|
}): WorkflowWorker;
|
|
2333
|
-
installPolicy(options?: Omit<FlowPolicyOptions, "mode" | "state" | "states">): Promise<
|
|
2384
|
+
installPolicy(options?: Omit<FlowPolicyOptions, "mode" | "state" | "states">): Promise<FlowPolicySnapshot>;
|
|
2334
2385
|
stateNames(): string[];
|
|
2335
2386
|
stateRegistration(name: string): StateRegistration | undefined;
|
|
2336
2387
|
}
|
|
@@ -2353,13 +2404,13 @@ declare class WorkflowWorker {
|
|
|
2353
2404
|
}
|
|
2354
2405
|
|
|
2355
2406
|
/** TypeScript SDK package version. */
|
|
2356
|
-
declare const FERRICSTORE_SDK_VERSION = "0.
|
|
2407
|
+
declare const FERRICSTORE_SDK_VERSION = "0.3.0";
|
|
2357
2408
|
/** Oldest FerricStore server supported by this breaking beta contract. */
|
|
2358
|
-
declare const FERRICSTORE_MINIMUM_SERVER_VERSION = "0.
|
|
2359
|
-
/** Native framing and opcode ABI version; unchanged by FerricStore 0.
|
|
2409
|
+
declare const FERRICSTORE_MINIMUM_SERVER_VERSION = "0.9.1";
|
|
2410
|
+
/** Native framing and opcode ABI version; unchanged by FerricStore 0.9.1. */
|
|
2360
2411
|
declare const FERRICSTORE_NATIVE_PROTOCOL_VERSION = 1;
|
|
2361
2412
|
|
|
2362
2413
|
/** @deprecated Use RequestDisposition; retained for source compatibility. */
|
|
2363
2414
|
type ConnectionRequestDisposition = RequestDisposition;
|
|
2364
2415
|
|
|
2365
|
-
export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, FERRICSTORE_MINIMUM_SERVER_VERSION, FERRICSTORE_NATIVE_PROTOCOL_VERSION, FERRICSTORE_SDK_VERSION, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowMaxActiveFailure, FlowNotFoundError, type FlowPolicyOptions, type FlowRecord, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, retry, transition };
|
|
2416
|
+
export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, FERRICSTORE_MINIMUM_SERVER_VERSION, FERRICSTORE_NATIVE_PROTOCOL_VERSION, FERRICSTORE_SDK_VERSION, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowMaxActiveFailure, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, type FlowRecord, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, retry, transition };
|
package/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,10 @@ declare class FlowWrongStateError extends FerricStoreError {
|
|
|
45
45
|
declare class StaleLeaseError extends FerricStoreError {
|
|
46
46
|
readonly code = "stale_lease";
|
|
47
47
|
}
|
|
48
|
+
/** FLOW.POLICY.SET expected_generation did not match the stored generation. */
|
|
49
|
+
declare class StalePolicyGenerationError extends FerricStoreError {
|
|
50
|
+
readonly code = "stale_policy_generation";
|
|
51
|
+
}
|
|
48
52
|
declare class FlowAlreadyExistsError extends FerricStoreError {
|
|
49
53
|
readonly code = "flow_already_exists";
|
|
50
54
|
}
|
|
@@ -960,6 +964,10 @@ interface FlowStatePolicy {
|
|
|
960
964
|
}
|
|
961
965
|
type FlowStatePolicyLike = FlowStatePolicy | RetryPolicy;
|
|
962
966
|
interface FlowPolicyOptions {
|
|
967
|
+
/** Replace the complete stored policy instead of applying the default deep patch. */
|
|
968
|
+
replace?: boolean;
|
|
969
|
+
/** Compare-and-swap generation. Must be a nonnegative JavaScript safe integer. */
|
|
970
|
+
expectedGeneration?: number;
|
|
963
971
|
state?: string;
|
|
964
972
|
mode?: FlowStateMode;
|
|
965
973
|
retry?: RetryPolicy;
|
|
@@ -1823,6 +1831,49 @@ declare class FerricStoreManagementClient extends FerricStoreClientCore {
|
|
|
1823
1831
|
governanceLedger(id: string, options?: GovernanceLedgerOptions): Promise<FlowAdminRecord[]>;
|
|
1824
1832
|
}
|
|
1825
1833
|
|
|
1834
|
+
declare const MAX_FLOW_POLICY_GENERATION: number;
|
|
1835
|
+
type FlowPolicyBackoffKind = "none" | "fixed" | "linear" | "exponential";
|
|
1836
|
+
interface FlowPolicyBackoffSnapshot {
|
|
1837
|
+
readonly kind: FlowPolicyBackoffKind;
|
|
1838
|
+
readonly baseMs: number;
|
|
1839
|
+
readonly maxMs: number;
|
|
1840
|
+
readonly jitterPct: number;
|
|
1841
|
+
}
|
|
1842
|
+
interface FlowPolicyRetrySnapshot {
|
|
1843
|
+
readonly maxRetries: number;
|
|
1844
|
+
readonly backoff: FlowPolicyBackoffSnapshot;
|
|
1845
|
+
readonly exhaustedTo: string;
|
|
1846
|
+
}
|
|
1847
|
+
interface FlowPolicyRetentionSnapshot {
|
|
1848
|
+
readonly ttlMs: number;
|
|
1849
|
+
readonly historyMaxEvents: number;
|
|
1850
|
+
}
|
|
1851
|
+
interface FlowPolicyStateSnapshot {
|
|
1852
|
+
readonly mode: FlowStateMode;
|
|
1853
|
+
readonly maxActiveMs?: number;
|
|
1854
|
+
readonly retry: FlowPolicyRetrySnapshot;
|
|
1855
|
+
readonly retention: FlowPolicyRetentionSnapshot;
|
|
1856
|
+
readonly governance?: Readonly<Record<string, unknown>>;
|
|
1857
|
+
}
|
|
1858
|
+
/** Resolved policy state returned by FLOW.POLICY.SET and FLOW.POLICY.GET. */
|
|
1859
|
+
interface FlowPolicySnapshot {
|
|
1860
|
+
readonly type: string;
|
|
1861
|
+
/** Server-allocated monotonic generation in the JavaScript safe-integer range. */
|
|
1862
|
+
readonly generation: number;
|
|
1863
|
+
readonly state?: string;
|
|
1864
|
+
readonly version?: string | number;
|
|
1865
|
+
readonly mode?: FlowStateMode;
|
|
1866
|
+
readonly maxActiveMs?: number;
|
|
1867
|
+
readonly retry: FlowPolicyRetrySnapshot;
|
|
1868
|
+
readonly retention: FlowPolicyRetentionSnapshot;
|
|
1869
|
+
readonly indexedAttributes: readonly string[];
|
|
1870
|
+
readonly indexedStateMeta?: string;
|
|
1871
|
+
readonly governance?: Readonly<Record<string, unknown>>;
|
|
1872
|
+
readonly states?: Readonly<Record<string, FlowPolicyStateSnapshot>>;
|
|
1873
|
+
/** Original protocol value for forward-compatible fields not yet modeled by the SDK. */
|
|
1874
|
+
readonly raw: unknown;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1826
1877
|
/** @internal Read, policy, and shared Flow helpers kept off the primary implementation module. */
|
|
1827
1878
|
declare class FerricStoreFlowSupportClient extends FerricStoreManagementClient {
|
|
1828
1879
|
rewind(id: string, options?: {
|
|
@@ -1872,10 +1923,10 @@ declare class FerricStoreFlowSupportClient extends FerricStoreManagementClient {
|
|
|
1872
1923
|
values?: Record<string, unknown>;
|
|
1873
1924
|
valueRefs?: Record<string, string>;
|
|
1874
1925
|
}): Promise<unknown>;
|
|
1875
|
-
installPolicy(type: string, options?: FlowPolicyOptions): Promise<
|
|
1926
|
+
installPolicy(type: string, options?: FlowPolicyOptions): Promise<FlowPolicySnapshot>;
|
|
1876
1927
|
policyGet(type: string, options?: {
|
|
1877
1928
|
state?: string;
|
|
1878
|
-
}): Promise<
|
|
1929
|
+
}): Promise<FlowPolicySnapshot>;
|
|
1879
1930
|
retentionCleanup(): Promise<Record<string, unknown>>;
|
|
1880
1931
|
protected executeProducerWrite(args: CommandArgument[]): Promise<unknown>;
|
|
1881
1932
|
protected recordOrGet(response: unknown, id: string, partitionKey: string | undefined): Promise<FlowRecord>;
|
|
@@ -2330,7 +2381,7 @@ declare class Workflow {
|
|
|
2330
2381
|
worker(options?: WorkerConfig & {
|
|
2331
2382
|
states?: string[];
|
|
2332
2383
|
}): WorkflowWorker;
|
|
2333
|
-
installPolicy(options?: Omit<FlowPolicyOptions, "mode" | "state" | "states">): Promise<
|
|
2384
|
+
installPolicy(options?: Omit<FlowPolicyOptions, "mode" | "state" | "states">): Promise<FlowPolicySnapshot>;
|
|
2334
2385
|
stateNames(): string[];
|
|
2335
2386
|
stateRegistration(name: string): StateRegistration | undefined;
|
|
2336
2387
|
}
|
|
@@ -2353,13 +2404,13 @@ declare class WorkflowWorker {
|
|
|
2353
2404
|
}
|
|
2354
2405
|
|
|
2355
2406
|
/** TypeScript SDK package version. */
|
|
2356
|
-
declare const FERRICSTORE_SDK_VERSION = "0.
|
|
2407
|
+
declare const FERRICSTORE_SDK_VERSION = "0.3.0";
|
|
2357
2408
|
/** Oldest FerricStore server supported by this breaking beta contract. */
|
|
2358
|
-
declare const FERRICSTORE_MINIMUM_SERVER_VERSION = "0.
|
|
2359
|
-
/** Native framing and opcode ABI version; unchanged by FerricStore 0.
|
|
2409
|
+
declare const FERRICSTORE_MINIMUM_SERVER_VERSION = "0.9.1";
|
|
2410
|
+
/** Native framing and opcode ABI version; unchanged by FerricStore 0.9.1. */
|
|
2360
2411
|
declare const FERRICSTORE_NATIVE_PROTOCOL_VERSION = 1;
|
|
2361
2412
|
|
|
2362
2413
|
/** @deprecated Use RequestDisposition; retained for source compatibility. */
|
|
2363
2414
|
type ConnectionRequestDisposition = RequestDisposition;
|
|
2364
2415
|
|
|
2365
|
-
export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, FERRICSTORE_MINIMUM_SERVER_VERSION, FERRICSTORE_NATIVE_PROTOCOL_VERSION, FERRICSTORE_SDK_VERSION, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowMaxActiveFailure, FlowNotFoundError, type FlowPolicyOptions, type FlowRecord, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, retry, transition };
|
|
2416
|
+
export { type AdminListOptions, type ApprovalListOptions, type ApprovalRequestOptions, type AttributeQueryOptions, type AutoBatchOptions, type BackoffKind, type BackpressurePolicy, BitmapStore, BloomFilterStore, type BudgetCommitOptions, type BudgetReserveOptions, COMMAND_OPCODES, type CancelOptions, type ChildSpec, type CircuitOpenOptions, type ClaimDueOptions, ClaimHydrationError, type ClaimHydrationItem, type ClaimedItem, type Codec, type CollectionScanOptions, type Command, type CommandArgument, type CommandExecutor, type CompleteJobsAndClaimJobsResult, type CompleteManyOptions, type CompleteOptions, type CompleteOutcome, ConnectionClosedError, type ConnectionRequestDisposition, type CountMinMergeOptions, CountMinSketchStore, type CreateItem, type CreateManyOptions, type CreateOptions, CuckooFilterStore, type EffectCompensateOptions, type EffectConfirmOptions, type EffectFailOptions, type EffectReserveOptions, type EffectStatusOptions, type EndpointPolicy, type ExceptionPolicy, type ExecutePipelineOptions, type ExpiryCondition, type ExtendLeaseOptions, FERRICSTORE_MINIMUM_SERVER_VERSION, FERRICSTORE_NATIVE_PROTOCOL_VERSION, FERRICSTORE_SDK_VERSION, type FailOptions, type FailOutcome, type FencedItem, type FencingToken, FerricStoreClient, type FerricStoreClientFromUrlOptions, type FerricStoreClientOptions, FerricStoreError, type FetchOrComputeComputeResult, type FetchOrComputeFencedResult, type FetchOrComputeHitResult, type FetchOrComputeResult, type FlowAdminRecord, FlowAlreadyExistsError, type FlowBatchCompletedItem, FlowBatchError, type FlowMaxActiveFailure, FlowNotFoundError, type FlowPolicyBackoffKind, type FlowPolicyBackoffSnapshot, type FlowPolicyOptions, type FlowPolicyRetentionSnapshot, type FlowPolicyRetrySnapshot, type FlowPolicySnapshot, type FlowPolicyStateSnapshot, type FlowRecord, type FlowStateMode, type FlowStatePolicy, type FlowStatePolicyLike, type FlowStatsOptions, FlowWrongStateError, type GeoAddOptions, type GeoMember, GeoStore, type GetExOptions, type GovernanceLedgerOptions, type HashScanResult, HashStore, type HistoryOptions, HyperLogLogStore, type IntegerReply, InvalidCommandError, type InvocationCreateOptions, JsonCodec, type KeyInfo, KeyValueStore, type LeaseMutationOptions, LeaseRenewalError, type LimitAmountOptions, type LimitLeaseOptions, type LimitListOptions, type LimitReleaseOptions, ListStore, LockHeldError, LockNotOwnedError, MAX_FLOW_POLICY_GENERATION, type ManagementPairs, type MaxActiveMs, type MutateOptions, type NamedValueMutation, NativeAdapter, type NativeAdapterOptions, type NativeClientOptions, type NativeProtocolEvent, type Outcome, OverloadedError, type ProtocolCommand, Queue, type QueueBatchHandler, QueueClient, QueueCompletionError, type QueueHandler, type QueueJob, type QueueOptions, QueueWorker, type QueueWorkerResult, type RangeLimit, type RateLimitResult, RawCodec, type ReadOptions, type ReclaimOptions, type ReconnectOptions, ReconnectingExecutor, type RequestContext, type RequestContextOptions, type RequestDisposition, RequestTimeoutError, RerouteError, type RetryOptions, type RetryOutcome, type RetryPolicy, type RoutingEndpoint, type RoutingRoute, RoutingTopology, type RunStepsItem, type RunStepsManyOptions, type ScanOptions, type ScheduleFireDueOptions, type ScheduleListOptions, type ScheduleOptions, type SearchOptions, type SearchStateMeta, type SetOptions, type SetScanResult, SetStore, type SortedSetScanResult, SortedSetStore, StaleLeaseError, StalePolicyGenerationError, type StartAndClaimOptions, type StateMeta, type StateMetaValue, type StateOptions, type StateRegistration, type StepContinueOptions, type StoreCommandClient, StreamStore, type TDigestCreateOptions, type TDigestMergeOptions, TDigestStore, type TopKReserveOptions, TopKStore, type TopologyNativeAdapterOptions, TopologyNativeAdapterPool, type TransitionOptions, type TransitionOutcome, type ValueConfig, type WorkerConfig, type WorkerProfile, type WorkerRefillStrategy, Workflow, WorkflowClient, WorkflowContext, WorkflowFlowCommands, type WorkflowHandler, type WorkflowOptions, WorkflowWorker, type WorkflowWorkerResult, type XReadStream, type ZAddMember, type ZAddOptions, classifyServerError, complete, fail, isOutcome, isReconnectableClosedConnectionError, mapException, retry, transition };
|