graphddb 0.2.3 → 0.2.4
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 +48 -2
- package/dist/{chunk-FWDJSGF3.js → chunk-GCPEUPAA.js} +248 -26
- package/dist/{chunk-NJEC76TX.js → chunk-IQEOJVHI.js} +62 -21
- package/dist/{chunk-CVUDLLRS.js → chunk-LNESVUTO.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +105 -12
- package/dist/index.js +13 -3
- package/dist/testing/index.d.ts +5 -5
- package/dist/testing/index.js +9 -6
- package/dist/{types-SKxZQbQO.d.ts → types-BEeQ_nSd.d.ts} +242 -41
- package/package.json +1 -1
|
@@ -1,5 +1,131 @@
|
|
|
1
1
|
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* App-level throttle / transient-error retry for single-op sends (issue #111).
|
|
5
|
+
*
|
|
6
|
+
* GraphDDB's single-item ops (GetItem / Query / Put / Update / Delete) and the
|
|
7
|
+
* read fan-out (relation resolution) used to throw on throttling
|
|
8
|
+
* (`ProvisionedThroughputExceededException` / `ThrottlingException`) and rely
|
|
9
|
+
* solely on the AWS SDK v3 default retry, so the LIBRARY itself guaranteed no
|
|
10
|
+
* throttle-resilience. The batch ops already retry partial completion
|
|
11
|
+
* (`UnprocessedKeys` / `UnprocessedItems`, see `src/operations/batch-retry.ts`);
|
|
12
|
+
* this module is the SEPARATE, library-owned ERROR retry that wraps every
|
|
13
|
+
* `docClient.send()` for the single ops via {@link RetryingExecutor}.
|
|
14
|
+
*
|
|
15
|
+
* The two retry layers are DISTINCT and must not be merged:
|
|
16
|
+
* - (A) partial-batch retry (`batch-retry.ts`) — DynamoDB accepted the request
|
|
17
|
+
* but could not process every key/item; the request itself did NOT error.
|
|
18
|
+
* - (B) error retry (this module) — `send()` REJECTED with a throttle / transient
|
|
19
|
+
* error and is retried whole.
|
|
20
|
+
* They share {@link computeBackoffDelay} so backoff is consistent across both,
|
|
21
|
+
* but they are different mechanisms.
|
|
22
|
+
*
|
|
23
|
+
* The default policy is ENABLED out of the box (see {@link DEFAULT_RETRY_POLICY}):
|
|
24
|
+
* even with zero configuration a sensible exponential-backoff-with-jitter,
|
|
25
|
+
* bounded-attempts retry applies. Users tune it globally via
|
|
26
|
+
* `DDBModel.setRetryPolicy(...)` or per-call via the `retry?:` option on the
|
|
27
|
+
* operation option bags; `retry: false` disables retry for that one call.
|
|
28
|
+
*
|
|
29
|
+
* NOTE on the AWS SDK's OWN retry: now that the library owns retry, a
|
|
30
|
+
* `DynamoDBClient` left at the SDK default `maxAttempts: 3` retries
|
|
31
|
+
* MULTIPLICATIVELY underneath this layer. Users should construct their client
|
|
32
|
+
* with `maxAttempts: 1` so the library is the single source of truth for retry
|
|
33
|
+
* (documented at `DDBModel.setClient` and in the README). The library does NOT
|
|
34
|
+
* silently mutate a user-provided client.
|
|
35
|
+
*/
|
|
36
|
+
/** The single-op kind a retry is wrapping — surfaced to {@link RetryPolicy.onRetry}. */
|
|
37
|
+
type RetryOperationKind = 'get' | 'query' | 'batchGet' | 'put' | 'update' | 'delete' | 'batchWrite' | 'transactWrite';
|
|
38
|
+
/** The context handed to {@link RetryPolicy.onRetry} before each backoff sleep. */
|
|
39
|
+
interface RetryInfo {
|
|
40
|
+
/** 1-based attempt number that just FAILED and is about to be retried. */
|
|
41
|
+
readonly attempt: number;
|
|
42
|
+
/** The throttle / transient error that triggered this retry. */
|
|
43
|
+
readonly error: unknown;
|
|
44
|
+
/** The backoff delay (ms) about to be slept before the next attempt. */
|
|
45
|
+
readonly delayMs: number;
|
|
46
|
+
/** Which single-op kind is being retried. */
|
|
47
|
+
readonly operation: RetryOperationKind;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A retry policy for the single-op error-retry layer (issue #111). Every field is
|
|
51
|
+
* optional and resolved INDEPENDENTLY, in layers (see {@link resolveRetryPolicy}):
|
|
52
|
+
* a per-call override field wins, else the globally-configured policy's field
|
|
53
|
+
* (from {@link import('../model/DDBModel.js').DDBModel.setRetryPolicy}), else
|
|
54
|
+
* {@link DEFAULT_RETRY_POLICY}. So a partial per-call override (e.g.
|
|
55
|
+
* `{ maxAttempts: 3 }`) overrides ONLY that field and INHERITS the rest from the
|
|
56
|
+
* global policy — a global `onRetry` / `jitter` is NOT dropped. A policy value of
|
|
57
|
+
* `false` on an option bag disables retry entirely for that call.
|
|
58
|
+
*/
|
|
59
|
+
interface RetryPolicy {
|
|
60
|
+
/**
|
|
61
|
+
* Maximum number of attempts (the FIRST try counts as attempt 1). `1` disables
|
|
62
|
+
* retry (a single try, no backoff). Default {@link DEFAULT_MAX_ATTEMPTS}.
|
|
63
|
+
*/
|
|
64
|
+
readonly maxAttempts?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Compute the base backoff delay (ms) for a 1-based retry attempt, BEFORE jitter.
|
|
67
|
+
* Defaults to {@link computeBackoffDelay} (`min(1000, 50*2^(attempt-1))`), the
|
|
68
|
+
* same ramp the batch partial-retry layer uses, so backoff is consistent across
|
|
69
|
+
* the two layers.
|
|
70
|
+
*/
|
|
71
|
+
readonly computeDelay?: (attempt: number) => number;
|
|
72
|
+
/**
|
|
73
|
+
* Jitter strategy applied to the base delay:
|
|
74
|
+
* - `'full'` (default) — uniform random in `[0, base]` (AWS "full jitter"),
|
|
75
|
+
* the recommended strategy to de-correlate retries across clients.
|
|
76
|
+
* - `'none'` — use the base delay verbatim (deterministic; handy in tests).
|
|
77
|
+
*/
|
|
78
|
+
readonly jitter?: 'full' | 'none';
|
|
79
|
+
/**
|
|
80
|
+
* Classify whether an error is retryable. Defaults to {@link isRetryableError}
|
|
81
|
+
* (throttle + 5xx / transient). A custom classifier fully replaces the default —
|
|
82
|
+
* it should still avoid retrying validation / conditional-check failures.
|
|
83
|
+
*/
|
|
84
|
+
readonly isRetryable?: (error: unknown) => boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Observability hook (issue #111 §8): invoked BEFORE each backoff sleep with the
|
|
87
|
+
* attempt number, the triggering error, the computed (post-jitter) delay, and the
|
|
88
|
+
* operation kind. Never invoked on the terminal success or the terminal failure.
|
|
89
|
+
*/
|
|
90
|
+
readonly onRetry?: (info: RetryInfo) => void;
|
|
91
|
+
}
|
|
92
|
+
/** Default cap on attempts: the first try plus up to 9 retries (mirrors the batch cap). */
|
|
93
|
+
declare const DEFAULT_MAX_ATTEMPTS = 10;
|
|
94
|
+
/**
|
|
95
|
+
* The default, always-on retry policy (issue #111 §3). Exponential backoff (the
|
|
96
|
+
* shared {@link computeBackoffDelay} ramp) + full jitter, capped at
|
|
97
|
+
* {@link DEFAULT_MAX_ATTEMPTS} attempts, retrying throttle / 5xx / transient
|
|
98
|
+
* errors only (never validation / conditional-check failures).
|
|
99
|
+
*/
|
|
100
|
+
declare const DEFAULT_RETRY_POLICY: Required<Pick<RetryPolicy, 'maxAttempts' | 'computeDelay' | 'jitter' | 'isRetryable'>>;
|
|
101
|
+
/**
|
|
102
|
+
* Default error classifier (issue #111 §5). Retryable when the error is a known
|
|
103
|
+
* throttle / transient fault, an AWS SDK error flagged `$retryable`, or a 5xx /
|
|
104
|
+
* 429 status. NEVER retryable for validation / conditional-check / not-found /
|
|
105
|
+
* access-denied — those are deterministic and would just burn the attempt budget.
|
|
106
|
+
*
|
|
107
|
+
* NOTE: a {@link https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html
|
|
108
|
+
* TransactionCanceledException} is handled SEPARATELY by
|
|
109
|
+
* {@link isRetryableTransactionCancellation}; this function treats it as
|
|
110
|
+
* non-retryable so the transact path can inspect its `CancellationReasons` first.
|
|
111
|
+
*/
|
|
112
|
+
declare function isRetryableError(error: unknown): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Classify a `TransactionCanceledException` (issue #111 §6). Inspects the
|
|
115
|
+
* `CancellationReasons`:
|
|
116
|
+
* - ANY `ConditionalCheckFailed` reason ⇒ NOT retryable (a deterministic
|
|
117
|
+
* condition failure; retrying would just fail again) — return `false`.
|
|
118
|
+
* - Otherwise, when EVERY non-`None` reason is a throttle / conflict code
|
|
119
|
+
* (`ThrottlingError` / `ProvisionedThroughputExceeded` / `TransactionConflict`)
|
|
120
|
+
* ⇒ retryable — return `true`.
|
|
121
|
+
* - A cancellation with no inspectable reasons, or any other reason code, is
|
|
122
|
+
* treated conservatively as NOT retryable.
|
|
123
|
+
*
|
|
124
|
+
* Only meaningful for an error whose name is `TransactionCanceledException`; the
|
|
125
|
+
* caller checks that first.
|
|
126
|
+
*/
|
|
127
|
+
declare function isRetryableTransactionCancellation(error: unknown): boolean;
|
|
128
|
+
|
|
3
129
|
interface RangeCondition {
|
|
4
130
|
operator: 'begins_with';
|
|
5
131
|
key: string;
|
|
@@ -859,41 +985,6 @@ interface ModelStatic<T extends DDBModel, C = unknown> {
|
|
|
859
985
|
deleteItem(key: DeleteKey<C>, options?: WriteOptions<T>): Promise<void>;
|
|
860
986
|
}
|
|
861
987
|
|
|
862
|
-
interface PutOptions<T = unknown> {
|
|
863
|
-
condition?: WriteCondition<T>;
|
|
864
|
-
}
|
|
865
|
-
interface UpdateOptions<T = unknown> {
|
|
866
|
-
condition?: WriteCondition<T>;
|
|
867
|
-
/**
|
|
868
|
-
* How to re-derive a GSI key whose composing fields are changed but **not all**
|
|
869
|
-
* available from `{ ...key, ...changes }` (issue #115).
|
|
870
|
-
*
|
|
871
|
-
* - **unset (default)** — refuse with an explicit error rather than let the
|
|
872
|
-
* index silently rot. The error names the index, the changed field, and the
|
|
873
|
-
* missing field(s). The happy path (all composing fields available) re-derives
|
|
874
|
-
* in the SAME `UpdateExpression` and is unaffected by this option.
|
|
875
|
-
* - `'read-modify-write'` — read the current item, merge `{ ...item, ...changes }`,
|
|
876
|
-
* re-derive every affected GSI key from the merged image, and write back under
|
|
877
|
-
* an optimistic condition (the item must still exist / be unchanged). This costs
|
|
878
|
-
* one extra read and is NOT atomic with the original update, but always re-derives
|
|
879
|
-
* correctly.
|
|
880
|
-
*/
|
|
881
|
-
rederive?: 'read-modify-write';
|
|
882
|
-
}
|
|
883
|
-
interface DeleteOptions<T = unknown> {
|
|
884
|
-
condition?: WriteCondition<T>;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
interface PutInput {
|
|
888
|
-
TableName: string;
|
|
889
|
-
Item: Record<string, unknown>;
|
|
890
|
-
ConditionExpression?: string;
|
|
891
|
-
ExpressionAttributeNames?: Record<string, string>;
|
|
892
|
-
ExpressionAttributeValues?: Record<string, unknown>;
|
|
893
|
-
}
|
|
894
|
-
declare function buildPutInput(modelClass: Function, item: Record<string, unknown>, options?: PutOptions): PutInput;
|
|
895
|
-
declare function executePut(modelClass: Function, item: Record<string, unknown>, options?: PutOptions): Promise<void>;
|
|
896
|
-
|
|
897
988
|
interface UpdateInput {
|
|
898
989
|
TableName: string;
|
|
899
990
|
Key: Record<string, unknown>;
|
|
@@ -930,10 +1021,34 @@ interface ExecutorResult {
|
|
|
930
1021
|
interface WriteResult {
|
|
931
1022
|
oldItem?: Record<string, unknown>;
|
|
932
1023
|
}
|
|
1024
|
+
/**
|
|
1025
|
+
* A per-call retry override threaded down to {@link RetryingExecutor} (issue
|
|
1026
|
+
* #111). `undefined` ⇒ use the globally-configured (or default) policy; a
|
|
1027
|
+
* {@link RetryPolicy} ⇒ use that for this call; `false` ⇒ disable retry for this
|
|
1028
|
+
* call. The default {@link DynamoExecutor} and the test `MemoryExecutor` ignore
|
|
1029
|
+
* it — only {@link RetryingExecutor} acts on it.
|
|
1030
|
+
*/
|
|
1031
|
+
type RetryOverride = RetryPolicy | false;
|
|
1032
|
+
/**
|
|
1033
|
+
* Per-call options for the READ path (issue #111). Carries the per-op retry
|
|
1034
|
+
* override down to {@link RetryingExecutor}. Extended (rather than passing the
|
|
1035
|
+
* override positionally) so future per-call read knobs have a home.
|
|
1036
|
+
*/
|
|
1037
|
+
interface ReadExecOptions {
|
|
1038
|
+
/** Per-call retry override; see {@link RetryOverride}. */
|
|
1039
|
+
retry?: RetryOverride;
|
|
1040
|
+
}
|
|
933
1041
|
/** Options shared by the single-item structured write methods. */
|
|
934
1042
|
interface WriteExecOptions {
|
|
935
1043
|
/** Request the pre-write image (DynamoDB `ReturnValues: ALL_OLD`). */
|
|
936
1044
|
returnOldImage?: boolean;
|
|
1045
|
+
/** Per-call retry override (issue #111); see {@link RetryOverride}. */
|
|
1046
|
+
retry?: RetryOverride;
|
|
1047
|
+
}
|
|
1048
|
+
/** Per-call options for the batch / transact paths (issue #111). */
|
|
1049
|
+
interface BatchExecOptions {
|
|
1050
|
+
/** Per-call retry override; see {@link RetryOverride}. */
|
|
1051
|
+
retry?: RetryOverride;
|
|
937
1052
|
}
|
|
938
1053
|
/**
|
|
939
1054
|
* One BatchGetItem sub-request: a single physical table plus its keys and an
|
|
@@ -997,13 +1112,18 @@ type TransactWriteExecItem = {
|
|
|
997
1112
|
* implement a fake.
|
|
998
1113
|
*/
|
|
999
1114
|
interface Executor {
|
|
1000
|
-
/**
|
|
1001
|
-
|
|
1115
|
+
/**
|
|
1116
|
+
* Read path: GetItem / Query / BatchGetItem. The optional {@link ReadExecOptions}
|
|
1117
|
+
* carries a per-call retry override (issue #111); the default
|
|
1118
|
+
* {@link DynamoExecutor} and `MemoryExecutor` ignore it, only `RetryingExecutor`
|
|
1119
|
+
* acts on it.
|
|
1120
|
+
*/
|
|
1121
|
+
execute(operation: DynamoDBOperation, options?: ReadExecOptions): Promise<ExecutorResult>;
|
|
1002
1122
|
/**
|
|
1003
1123
|
* BatchGetItem for a single table. The caller is responsible for chunking
|
|
1004
1124
|
* keys ≤100 (the relation traversal and the planner-driven path both do).
|
|
1005
1125
|
*/
|
|
1006
|
-
batchGet(input: BatchGetExecInput): Promise<ExecutorResult>;
|
|
1126
|
+
batchGet(input: BatchGetExecInput, options?: ReadExecOptions): Promise<ExecutorResult>;
|
|
1007
1127
|
/** Put one item. */
|
|
1008
1128
|
put(input: PutInput, options?: WriteExecOptions): Promise<WriteResult>;
|
|
1009
1129
|
/** Update one item (applies its structured UpdateExpression). */
|
|
@@ -1014,10 +1134,63 @@ interface Executor {
|
|
|
1014
1134
|
* BatchWriteItem for a single table (non-atomic). Keys/items are chunked ≤25
|
|
1015
1135
|
* with UnprocessedItems retry by the implementation.
|
|
1016
1136
|
*/
|
|
1017
|
-
batchWrite(tableName: string, items: BatchWriteExecItem[]): Promise<void>;
|
|
1137
|
+
batchWrite(tableName: string, items: BatchWriteExecItem[], options?: BatchExecOptions): Promise<void>;
|
|
1018
1138
|
/** TransactWriteItems — all-or-nothing atomic. */
|
|
1019
|
-
transactWrite(items: TransactWriteExecItem[]): Promise<void>;
|
|
1139
|
+
transactWrite(items: TransactWriteExecItem[], options?: BatchExecOptions): Promise<void>;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
interface PutOptions<T = unknown> {
|
|
1143
|
+
condition?: WriteCondition<T>;
|
|
1144
|
+
/**
|
|
1145
|
+
* Per-call throttle / transient-error retry override (issue #111). A
|
|
1146
|
+
* {@link RetryPolicy} replaces the global policy for this call; `false` disables
|
|
1147
|
+
* retry for this call. Omit to use the configured (or built-in default) policy.
|
|
1148
|
+
*/
|
|
1149
|
+
retry?: RetryOverride;
|
|
1150
|
+
}
|
|
1151
|
+
interface UpdateOptions<T = unknown> {
|
|
1152
|
+
condition?: WriteCondition<T>;
|
|
1153
|
+
/**
|
|
1154
|
+
* Per-call throttle / transient-error retry override (issue #111). A
|
|
1155
|
+
* {@link RetryPolicy} replaces the global policy for this call; `false` disables
|
|
1156
|
+
* retry for this call.
|
|
1157
|
+
*/
|
|
1158
|
+
retry?: RetryOverride;
|
|
1159
|
+
/**
|
|
1160
|
+
* How to re-derive a GSI key whose composing fields are changed but **not all**
|
|
1161
|
+
* available from `{ ...key, ...changes }` (issue #115).
|
|
1162
|
+
*
|
|
1163
|
+
* - **unset (default)** — refuse with an explicit error rather than let the
|
|
1164
|
+
* index silently rot. The error names the index, the changed field, and the
|
|
1165
|
+
* missing field(s). The happy path (all composing fields available) re-derives
|
|
1166
|
+
* in the SAME `UpdateExpression` and is unaffected by this option.
|
|
1167
|
+
* - `'read-modify-write'` — read the current item, merge `{ ...item, ...changes }`,
|
|
1168
|
+
* re-derive every affected GSI key from the merged image, and write back under
|
|
1169
|
+
* an optimistic condition (the item must still exist / be unchanged). This costs
|
|
1170
|
+
* one extra read and is NOT atomic with the original update, but always re-derives
|
|
1171
|
+
* correctly.
|
|
1172
|
+
*/
|
|
1173
|
+
rederive?: 'read-modify-write';
|
|
1174
|
+
}
|
|
1175
|
+
interface DeleteOptions<T = unknown> {
|
|
1176
|
+
condition?: WriteCondition<T>;
|
|
1177
|
+
/**
|
|
1178
|
+
* Per-call throttle / transient-error retry override (issue #111). A
|
|
1179
|
+
* {@link RetryPolicy} replaces the global policy for this call; `false` disables
|
|
1180
|
+
* retry for this call.
|
|
1181
|
+
*/
|
|
1182
|
+
retry?: RetryOverride;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
interface PutInput {
|
|
1186
|
+
TableName: string;
|
|
1187
|
+
Item: Record<string, unknown>;
|
|
1188
|
+
ConditionExpression?: string;
|
|
1189
|
+
ExpressionAttributeNames?: Record<string, string>;
|
|
1190
|
+
ExpressionAttributeValues?: Record<string, unknown>;
|
|
1020
1191
|
}
|
|
1192
|
+
declare function buildPutInput(modelClass: Function, item: Record<string, unknown>, options?: PutOptions): PutInput;
|
|
1193
|
+
declare function executePut(modelClass: Function, item: Record<string, unknown>, options?: PutOptions): Promise<void>;
|
|
1021
1194
|
|
|
1022
1195
|
type TransactWriteItemInput = {
|
|
1023
1196
|
Put: PutInput;
|
|
@@ -4266,6 +4439,14 @@ type WriteEnvelope = Record<string, InProcessWriteDescriptor>;
|
|
|
4266
4439
|
/** Options for {@link executeWriteEnvelope}. */
|
|
4267
4440
|
interface MutateOptions {
|
|
4268
4441
|
readonly mode?: MutateMode;
|
|
4442
|
+
/**
|
|
4443
|
+
* Per-call throttle / transient-error retry override (issue #111), applied to
|
|
4444
|
+
* every write this envelope composes (the atomic `TransactWriteItems` in
|
|
4445
|
+
* `transaction` mode, or each op's send in `parallel` mode). A {@link RetryPolicy}
|
|
4446
|
+
* overrides the global policy; `false` disables retry. Omit ⇒ the configured /
|
|
4447
|
+
* built-in default policy.
|
|
4448
|
+
*/
|
|
4449
|
+
readonly retry?: RetryOverride;
|
|
4269
4450
|
}
|
|
4270
4451
|
/** A per-alias result in `parallel` mode: success carries the read-back, else error. */
|
|
4271
4452
|
type ParallelOpResult = {
|
|
@@ -4345,8 +4526,28 @@ type MutateParallelResult<E extends WriteEnvelope> = {
|
|
|
4345
4526
|
declare abstract class DDBModel {
|
|
4346
4527
|
/** @internal Type brand — prevents primitives from structurally matching DDBModel. */
|
|
4347
4528
|
private readonly __brand;
|
|
4529
|
+
/**
|
|
4530
|
+
* Register the `DynamoDBClient` GraphDDB sends through.
|
|
4531
|
+
*
|
|
4532
|
+
* IMPORTANT (issue #111): GraphDDB now owns single-op throttle / transient-error
|
|
4533
|
+
* retry (see {@link setRetryPolicy}), so a client left at the AWS SDK default
|
|
4534
|
+
* `maxAttempts: 3` retries MULTIPLICATIVELY underneath the library. Construct the
|
|
4535
|
+
* client with `maxAttempts: 1` so the library is the single source of truth for
|
|
4536
|
+
* retry — e.g. `new DynamoDBClient({ maxAttempts: 1 })`. GraphDDB does NOT mutate
|
|
4537
|
+
* a client you pass in.
|
|
4538
|
+
*/
|
|
4348
4539
|
static setClient(client: DynamoDBClient): void;
|
|
4349
4540
|
static setTableMapping(mapping: Record<string, string>): void;
|
|
4541
|
+
/**
|
|
4542
|
+
* Configure the global single-op retry policy (issue #111) — exponential backoff
|
|
4543
|
+
* + jitter with a bounded attempt cap, applied to every GetItem / Query / Put /
|
|
4544
|
+
* Update / Delete / relation-fan-out send and to `TransactWriteItems`. Mirrors
|
|
4545
|
+
* {@link setClient} / {@link setTableMapping}. A sensible default is ALWAYS on; call
|
|
4546
|
+
* this only to tune it (or pass `null` to restore the default). A per-call
|
|
4547
|
+
* `retry?: RetryPolicy | false` on an operation's options overrides this globally
|
|
4548
|
+
* for that call (`false` disables retry).
|
|
4549
|
+
*/
|
|
4550
|
+
static setRetryPolicy(policy: RetryPolicy | null): void;
|
|
4350
4551
|
static transaction(fn: (tx: TransactionContext) => void | Promise<void>): Promise<void>;
|
|
4351
4552
|
/**
|
|
4352
4553
|
* In-process multi-route READ (issue #101 — the unified envelope). Each alias
|
|
@@ -4619,4 +4820,4 @@ interface CdcEmulatorOptions {
|
|
|
4619
4820
|
}
|
|
4620
4821
|
type ShardId = string;
|
|
4621
4822
|
|
|
4622
|
-
export { type
|
|
4823
|
+
export { type QuerySpec as $, type ParamDescriptor as A, type BatchGetExecInput as B, type ChangeEvent as C, type DynamoDBOperation as D, type Executor as E, type FaultSpec as F, type DefinitionMap as G, type WriteDefinitionOptions as H, type PartialQueryKeyOf as I, type StrictSelectSpec as J, type EntityInput as K, type UniqueQueryKeyOf as L, type ModelStatic as M, type EntityRef as N, type OperationDefinition as O, type PutInput as P, type ConditionInput as Q, type ReadExecOptions as R, type SelectableOf as S, type TransactWriteExecItem as T, type UpdateInput as U, type QueryModelContract as V, type WriteExecOptions as W, type QueryMethodSpec as X, type CommandModelContract as Y, type CommandMethodSpec as Z, type ContractSpec as _, type ExecutorResult as a, type FilterInput as a$, type CommandSpec as a0, type ContextSpec as a1, type OperationsDocument as a2, type AnyOperationDefinition as a3, type BridgeBundle as a4, type ConditionSpec as a5, type BatchDeleteRequest as a6, type BatchGetRequest as a7, BatchGetResult as a8, type BatchPutRequest as a9, type ContractFromRef as aA, type ContractInputArity as aB, type ContractItem as aC, type ContractKeyFieldRef as aD, type ContractKeyInput as aE, type ContractKeyRef as aF, type ContractKeySpec as aG, type ContractKind as aH, type ContractMethodOp as aI, type ContractParamRef as aJ, type ContractQueryParams as aK, type ContractResolution as aL, DEFAULT_MAX_ATTEMPTS as aM, DEFAULT_RETRY_POLICY as aN, type DeleteOptions as aO, type DeriveEffect as aP, type DerivedEdgeWrite as aQ, type DerivedUpdate as aR, type DescriptorBinding as aS, ENTITY_WRITES_MARKER as aT, type EdgeEffect as aU, type EffectPath as aV, type EmitEffect as aW, type EntityWritesDefinition as aX, type EntityWritesShape as aY, type ExecutableCommandContract as aZ, type ExecutableQueryContract as a_, type BatchResult as aa, type BatchWriteRequest as ab, CONTRACT_RANGE_FANOUT_CONCURRENCY as ac, type CdcMode as ad, type ChangeBatch as ae, type ChangeEventName as af, type ClockMode as ag, type Column as ah, type ColumnMap as ai, type CommandContractMethodSpec as aj, type CommandInputShape as ak, type CommandMethod as al, type CommandPlan as am, type CommandResolutionTarget as an, type CommandResultKind as ao, type CommandSelectShape as ap, type CompiledFragment as aq, type ComposeSpec as ar, type CondSlot as as, type ConditionCheckInput as at, type Connection as au, type ContractCallSignature as av, type ContractCardinality as aw, type ContractCommandParams as ax, type ContractCommandResult as ay, type ContractComposeNode as az, type WriteResult as b, type SegmentSpec as b$, type FilterSpec as b0, type FragmentInput as b1, type GsiDefinitionMarker as b2, type GsiOptions as b3, type IdempotencyEffect as b4, type InProcessWriteDescriptor as b5, type InputArity as b6, type KeyDefinitionMarker as b7, type KeySegment as b8, type KeySlot as b9, type OperationSpec as bA, type ParallelOpResult as bB, type ParamKind as bC, type ParamSpec as bD, type ParamStructure as bE, type PlannedCommandMethod as bF, type PutOptions as bG, type QueryContractMethodSpec as bH, type QueryEnvelopeResult as bI, type QueryKeyOf as bJ, type QueryMethod as bK, type QueryResult as bL, type RangeConditionSpec as bM, type ReadEnvelope as bN, type ReadOperationType as bO, type ReadRouteDescriptor as bP, type ReadRouteOptions as bQ, type ReadRouteResult as bR, type RecordedCompose as bS, type RelationBuilder as bT, type RelationSelect as bU, type RelationSpec as bV, type RequiresEffect as bW, type Resolution as bX, type RetryInfo as bY, type RetryOperationKind as bZ, SPEC_VERSION as b_, type KeyStructure as ba, type KeyedResult as bb, LIFECYCLE_CONTRACT_MARKER as bc, type LifecycleContract as bd, type LifecycleEffects as be, type LiteralParam as bf, type ManifestEntity as bg, type ManifestField as bh, type ManifestFieldType as bi, type ManifestGsi as bj, type ManifestKey as bk, type ManifestRelation as bl, type ManifestTable as bm, type ModelRef as bn, type MutateMode as bo, type MutateOptions as bp, type MutateParallelResult as bq, type MutateTransactionResult as br, type MutationBody as bs, type MutationDescriptorMap as bt, type MutationFragment as bu, type MutationInputProxy as bv, type MutationInputRef as bw, type MutationIntent as bx, type NumberParam as by, type OperationKind as bz, type DeleteInput as c, mintContractParamRef as c$, type SelectBuilder as c0, type SelectOf as c1, type StartingPosition as c2, type StreamViewType as c3, type StringParam as c4, TransactionContext as c5, type TransactionItemType as c6, type UniqueEffect as c7, type Updatable as c8, type UpdateOptions as c9, executeTransaction as cA, executeUpdate as cB, from as cC, getEntityWrites as cD, gsi as cE, isColumn as cF, isCommandModelContract as cG, isCommandPlan as cH, isContractComposeNode as cI, isContractFromRef as cJ, isContractKeyFieldRef as cK, isContractKeyRef as cL, isContractParamRef as cM, isEntityWritesDefinition as cN, isKeySegment as cO, isLifecycleContract as cP, isMutationFragment as cQ, isMutationInputRef as cR, isParam as cS, isPlannedCommandMethod as cT, isQueryModelContract as cU, isRetryableError as cV, isRetryableTransactionCancellation as cW, k as cX, key as cY, lifecyclePhaseForIntent as cZ, mintContractKeyFieldRef as c_, type WhenSpec as ca, type WriteDescriptor as cb, type WriteEnvelope as cc, type WriteLifecyclePhase as cd, type WriteOperationType as ce, type WriteRecorder as cf, type WriteResultProjection as cg, attachModelClass as ch, buildDeleteInput as ci, buildPutInput as cj, buildUpdateInput as ck, compileFragment as cl, compileMutationPlan as cm, compileSingleFragmentPlan as cn, cond as co, contractOfMethodSpec as cp, definePlan as cq, entityWrites as cr, executeBatchGet as cs, executeBatchWrite as ct, executeCommandMethod as cu, executeDelete as cv, executeKeyedBatchGet as cw, executePut as cx, executeQueryMethod as cy, executeRangeFanout as cz, type BatchWriteExecItem as d, mutation as d0, param as d1, publicCommandModel as d2, publicQueryModel as d3, query as d4, resolveLifecycle as d5, wholeKeysSentinel as d6, type BatchExecOptions as e, DDBModel as f, type PrimaryKeyOf as g, type RetryPolicy as h, type ExecutionPlanSpec as i, type SegmentedKey as j, type SelectBuilderSpec as k, type RawCondition as l, type TransactionSpec as m, type Manifest as n, type RetryOverride as o, type ExecutionPlan as p, type ResolvedKey as q, type CdcEmulatorOptions as r, type ChangeHandler as s, type Unsubscribe as t, type ConcurrentRecomputeRef as u, type EventLog as v, type ReplayOptions as w, type ShardId as x, type TransactionItemSpec as y, type Param as z };
|