@superdurable/connector-amazon-dynamodb 0.1.0 → 0.2.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.
@@ -0,0 +1,187 @@
1
+ import { SecretString, CredentialProvider, Query, Mutation, ConnectionRef } from '@superdurable/connectors-sdk';
2
+ import { z } from 'zod';
3
+
4
+ /** Connector configuration; omitted fields use manifest defaults. */
5
+ interface Config {
6
+ /** AWS Region code for the table, such as eu-west-1. In https://console.aws.amazon.com/dynamodb > Tables, use the console Region selector; blank uses the displayed default. */
7
+ region?: string;
8
+ /** Optional DynamoDB-compatible API root. Blank derives the regional AWS endpoint from region. Override only for a trusted compatible endpoint; local tests may use loopback HTTP. */
9
+ endpoint?: string;
10
+ /** Maximum duration of one DynamoDB API request as a positive Go duration such as 15s. Blank uses the displayed default; increase only for a slow network. Runtime value in milliseconds. */
11
+ timeoutMs?: number;
12
+ /** Maximum complete DynamoDB response in bytes. Blank uses the displayed default; increase only for unusually large item pages. */
13
+ maxResponseBytes?: number;
14
+ }
15
+ /** Runtime schema for manifest configuration. */
16
+ declare const ConfigSchema: z.ZodObject<{
17
+ region: z.ZodOptional<z.ZodString>;
18
+ endpoint: z.ZodOptional<z.ZodString>;
19
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
20
+ maxResponseBytes: z.ZodOptional<z.ZodNumber>;
21
+ }, z.core.$strip>;
22
+ /** Private connector credentials resolved by the host. */
23
+ interface Credentials {
24
+ /** Secret-stored AWS access key ID from https://console.aws.amazon.com/iam > Users > selected user > Security credentials > Access keys > Create access key. Long-term IDs start AKIA and temporary IDs start ASIA. Blank prevents signing. */
25
+ accessKeyId: SecretString;
26
+ /** Secret access key paired with access_key_id, shown once on the IAM Retrieve access keys page. Copy the Value, never the key ID. Blank prevents signing; rotate through IAM. */
27
+ secretAccessKey: SecretString;
28
+ /** Secret session token for temporary ASIA credentials, from AWS STS. Blank means long-term IAM user credentials. Temporary credentials expire; replace all three fields before expiry. */
29
+ sessionToken?: SecretString;
30
+ }
31
+ /** Stored credential material that fails the connector credential checks, so no retry can succeed. */
32
+ declare class CredentialMaterialError extends TypeError {
33
+ constructor(message: string);
34
+ }
35
+ /** Report malformed stored credential material, also behind the SDK provider's decoding TypeError. */
36
+ declare function isCredentialMaterialError(error: unknown): boolean;
37
+ /** Decode private credential fields for the connector. */
38
+ declare function decodeCredentials(value: unknown): Credentials;
39
+ /** Host-owned source of private connector credentials. */
40
+ type CredentialSource = CredentialProvider<Credentials>;
41
+ /** GetItemInput identifies a table row by all of its S, N, or B key attributes. */
42
+ interface GetItemInput {
43
+ "tableName": string;
44
+ "key": {
45
+ [key: string]: unknown | null;
46
+ } | null;
47
+ "consistentRead": boolean;
48
+ }
49
+ /** ItemResult returns the item's AttributeValue map when it exists. */
50
+ interface ItemResult {
51
+ "exists": boolean;
52
+ "item": {
53
+ [key: string]: unknown | null;
54
+ } | null;
55
+ }
56
+ /** PutItemInput supplies a complete item including its table primary key. */
57
+ interface PutItemInput {
58
+ /** TableName identifies the table in the configured Region. */
59
+ "tableName": string;
60
+ /** Item is the complete map of DynamoDB AttributeValue objects. */
61
+ "item": {
62
+ [key: string]: unknown | null;
63
+ } | null;
64
+ }
65
+ /** ItemWriteResult confirms DynamoDB accepted a write without storing item values. */
66
+ interface ItemWriteResult {
67
+ /** Applied reports that DynamoDB accepted the write. */
68
+ "applied": boolean;
69
+ }
70
+ /** UpdateItemInput sets absolute values on one item by complete primary key. */
71
+ interface UpdateItemInput {
72
+ /** TableName identifies the table in the configured Region. */
73
+ "tableName": string;
74
+ /** Key is the complete table primary key. */
75
+ "key": {
76
+ [key: string]: unknown | null;
77
+ } | null;
78
+ /** Attributes contains non-key attributes to set to absolute values. */
79
+ "attributes": {
80
+ [key: string]: unknown | null;
81
+ } | null;
82
+ }
83
+ /** DeleteItemInput identifies one item by its complete primary key. */
84
+ interface DeleteItemInput {
85
+ /** TableName identifies the table in the configured Region. */
86
+ "tableName": string;
87
+ /** Key is the complete table primary key. */
88
+ "key": {
89
+ [key: string]: unknown | null;
90
+ } | null;
91
+ }
92
+ /** ScanItemsInput selects one bounded page of table items. */
93
+ interface ScanItemsInput {
94
+ /** TableName identifies the table in the configured Region. */
95
+ "tableName": string;
96
+ /** Limit bounds evaluated items, 1 to 1000; zero uses DynamoDB's page limit. */
97
+ "limit"?: number | undefined;
98
+ /** ExclusiveStartKey resumes from a prior page's LastEvaluatedKey; nil starts at the beginning. */
99
+ "exclusiveStartKey"?: {
100
+ [key: string]: unknown | null;
101
+ } | undefined;
102
+ }
103
+ /** ItemPage contains one bounded scan page and its continuation key. */
104
+ interface ItemPage {
105
+ /** Items are the returned DynamoDB AttributeValue maps. */
106
+ "items": Array<{
107
+ [key: string]: unknown | null;
108
+ } | null> | null;
109
+ /** Count is the number of returned items. */
110
+ "count": number;
111
+ /** LastEvaluatedKey is the continuation key, or empty at the end. */
112
+ "lastEvaluatedKey": {
113
+ [key: string]: unknown | null;
114
+ } | null;
115
+ }
116
+ /** Runtime validator for GetItemInput. */
117
+ declare const GetItemInputSchema: z.ZodObject<{
118
+ tableName: z.ZodString;
119
+ key: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
120
+ consistentRead: z.ZodBoolean;
121
+ }, z.core.$strict>;
122
+ /** Runtime validator for ItemResult. */
123
+ declare const ItemResultSchema: z.ZodObject<{
124
+ exists: z.ZodBoolean;
125
+ item: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
126
+ }, z.core.$strict>;
127
+ /** Runtime validator for PutItemInput. */
128
+ declare const PutItemInputSchema: z.ZodObject<{
129
+ tableName: z.ZodString;
130
+ item: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
131
+ }, z.core.$strict>;
132
+ /** Runtime validator for ItemWriteResult. */
133
+ declare const ItemWriteResultSchema: z.ZodObject<{
134
+ applied: z.ZodBoolean;
135
+ }, z.core.$strict>;
136
+ /** Runtime validator for UpdateItemInput. */
137
+ declare const UpdateItemInputSchema: z.ZodObject<{
138
+ tableName: z.ZodString;
139
+ key: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
140
+ attributes: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
141
+ }, z.core.$strict>;
142
+ /** Runtime validator for DeleteItemInput. */
143
+ declare const DeleteItemInputSchema: z.ZodObject<{
144
+ tableName: z.ZodString;
145
+ key: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
146
+ }, z.core.$strict>;
147
+ /** Runtime validator for ScanItemsInput. */
148
+ declare const ScanItemsInputSchema: z.ZodObject<{
149
+ tableName: z.ZodString;
150
+ limit: z.ZodOptional<z.ZodNumber>;
151
+ exclusiveStartKey: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
152
+ }, z.core.$strict>;
153
+ /** Runtime validator for ItemPage. */
154
+ declare const ItemPageSchema: z.ZodObject<{
155
+ items: z.ZodNullable<z.ZodArray<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>>>;
156
+ count: z.ZodNumber;
157
+ lastEvaluatedKey: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodUnknown>>>;
158
+ }, z.core.$strict>;
159
+
160
+ /** Typed operations supplied by a client or mock. */
161
+ interface Operations {
162
+ /** Invoke getItem through this connection. */
163
+ getItem(): Query<GetItemInput, ItemResult>;
164
+ /** Invoke putItem through this connection. */
165
+ putItem(): Mutation<PutItemInput, ItemWriteResult>;
166
+ /** Invoke updateItem through this connection. */
167
+ updateItem(): Mutation<UpdateItemInput, ItemWriteResult>;
168
+ /** Invoke deleteItem through this connection. */
169
+ deleteItem(): Mutation<DeleteItemInput, ItemWriteResult>;
170
+ /** Invoke scanItems through this connection. */
171
+ scanItems(): Query<ScanItemsInput, ItemPage>;
172
+ }
173
+ /** Named connector connection kept outside Flow state. */
174
+ declare class Connection<BoundOperations = Operations> {
175
+ /** Stable provider and connection name. */
176
+ readonly reference: ConnectionRef;
177
+ /** Bound provider operations. */
178
+ readonly operations: BoundOperations;
179
+ /** Validate a reference and bind operations. */
180
+ constructor(reference: ConnectionRef, operations: BoundOperations);
181
+ }
182
+ /** Bind a client to a named connection. */
183
+ declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
184
+ /** Bind scripted operations to a named connection. */
185
+ declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
186
+
187
+ export { Connection as C, type DeleteItemInput as D, type GetItemInput as G, type ItemWriteResult as I, type Operations as O, type PutItemInput as P, type ScanItemsInput as S, type UpdateItemInput as U, type ItemResult as a, type ItemPage as b, type Config as c, type Credentials as d, ConfigSchema as e, CredentialMaterialError as f, type CredentialSource as g, DeleteItemInputSchema as h, GetItemInputSchema as i, ItemPageSchema as j, ItemResultSchema as k, ItemWriteResultSchema as l, PutItemInputSchema as m, ScanItemsInputSchema as n, UpdateItemInputSchema as o, decodeCredentials as p, isCredentialMaterialError as q, newConnection as r, newConnectionWithOperations as s };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { G as GetItemInput, I as ItemResult, C as Connection, O as Operations, a as Config, b as Credentials } from './connection-DjOgB3k-.js';
2
- export { c as ConfigSchema, d as CredentialSource, e as GetItemInputSchema, f as ItemResultSchema, g as decodeCredentials, n as newConnection, h as newConnectionWithOperations } from './connection-DjOgB3k-.js';
3
- import { QueryDefinition, QueryStepConfig, Query, QueryResult, QueryStep, CredentialProvider, Call, QueryAttempt } from '@superdurable/connectors-sdk';
1
+ import { D as DeleteItemInput, I as ItemWriteResult, C as Connection, G as GetItemInput, a as ItemResult, P as PutItemInput, S as ScanItemsInput, b as ItemPage, U as UpdateItemInput, O as Operations, c as Config, d as Credentials } from './connection-D5oiDePw.js';
2
+ export { e as ConfigSchema, f as CredentialMaterialError, g as CredentialSource, h as DeleteItemInputSchema, i as GetItemInputSchema, j as ItemPageSchema, k as ItemResultSchema, l as ItemWriteResultSchema, m as PutItemInputSchema, n as ScanItemsInputSchema, o as UpdateItemInputSchema, p as decodeCredentials, q as isCredentialMaterialError, r as newConnection, s as newConnectionWithOperations } from './connection-D5oiDePw.js';
3
+ import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
4
+ import { MutationDefinition, QueryDefinition, MutationStepConfig, Mutation, MutationResult, QueryStepConfig, Query, QueryResult, MutationStep, QueryStep, CredentialProvider, Call, QueryAttempt, MutationAttempt } from '@superdurable/connectors-sdk';
4
5
  import { StepTarget } from '@superdurable/dex';
5
6
  import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
6
7
  import { ProviderRequest, ProviderResponse } from '@superdurable/connectors-sdk/providerhttp';
@@ -36,6 +37,98 @@ declare const GetItemMetadata: {
36
37
  readonly idempotency: "none";
37
38
  readonly authorization: "required";
38
39
  };
40
+ /** Branch IDs for putItem. */
41
+ declare const PutItemBranch: {
42
+ readonly Written: "written";
43
+ readonly ProviderRejected: "providerRejected";
44
+ readonly InvalidResponse: "invalidResponse";
45
+ readonly Defect: "defect";
46
+ };
47
+ /** DynamoDB accepted the item replacement. */
48
+ declare const PutItemBranchWritten: "written";
49
+ /** DynamoDB conclusively rejected the write or credentials. */
50
+ declare const PutItemBranchProviderRejected: "providerRejected";
51
+ /** DynamoDB returned malformed or oversized write JSON. */
52
+ declare const PutItemBranchInvalidResponse: "invalidResponse";
53
+ /** The table or item is invalid. */
54
+ declare const PutItemBranchDefect: "defect";
55
+ /** Manifest definition for putItem. */
56
+ declare const PutItemDefinition: MutationDefinition;
57
+ /** Manifest metadata for putItem. */
58
+ declare const PutItemMetadata: {
59
+ readonly kind: "mutation";
60
+ readonly idempotency: "required";
61
+ readonly authorization: "required";
62
+ };
63
+ /** Branch IDs for updateItem. */
64
+ declare const UpdateItemBranch: {
65
+ readonly Updated: "updated";
66
+ readonly ProviderRejected: "providerRejected";
67
+ readonly InvalidResponse: "invalidResponse";
68
+ readonly Defect: "defect";
69
+ };
70
+ /** DynamoDB accepted the absolute attribute update. */
71
+ declare const UpdateItemBranchUpdated: "updated";
72
+ /** DynamoDB conclusively rejected the update or credentials. */
73
+ declare const UpdateItemBranchProviderRejected: "providerRejected";
74
+ /** DynamoDB returned malformed or oversized update JSON. */
75
+ declare const UpdateItemBranchInvalidResponse: "invalidResponse";
76
+ /** The table, key, or attributes are invalid. */
77
+ declare const UpdateItemBranchDefect: "defect";
78
+ /** Manifest definition for updateItem. */
79
+ declare const UpdateItemDefinition: MutationDefinition;
80
+ /** Manifest metadata for updateItem. */
81
+ declare const UpdateItemMetadata: {
82
+ readonly kind: "mutation";
83
+ readonly idempotency: "required";
84
+ readonly authorization: "required";
85
+ };
86
+ /** Branch IDs for deleteItem. */
87
+ declare const DeleteItemBranch: {
88
+ readonly Deleted: "deleted";
89
+ readonly ProviderRejected: "providerRejected";
90
+ readonly InvalidResponse: "invalidResponse";
91
+ readonly Defect: "defect";
92
+ };
93
+ /** DynamoDB accepted the deletion. */
94
+ declare const DeleteItemBranchDeleted: "deleted";
95
+ /** DynamoDB conclusively rejected the deletion or credentials. */
96
+ declare const DeleteItemBranchProviderRejected: "providerRejected";
97
+ /** DynamoDB returned malformed or oversized deletion JSON. */
98
+ declare const DeleteItemBranchInvalidResponse: "invalidResponse";
99
+ /** The table or key is invalid. */
100
+ declare const DeleteItemBranchDefect: "defect";
101
+ /** Manifest definition for deleteItem. */
102
+ declare const DeleteItemDefinition: MutationDefinition;
103
+ /** Manifest metadata for deleteItem. */
104
+ declare const DeleteItemMetadata: {
105
+ readonly kind: "mutation";
106
+ readonly idempotency: "required";
107
+ readonly authorization: "required";
108
+ };
109
+ /** Branch IDs for scanItems. */
110
+ declare const ScanItemsBranch: {
111
+ readonly Scanned: "scanned";
112
+ readonly ProviderRejected: "providerRejected";
113
+ readonly InvalidResponse: "invalidResponse";
114
+ readonly Defect: "defect";
115
+ };
116
+ /** DynamoDB returned an item page, possibly empty. */
117
+ declare const ScanItemsBranchScanned: "scanned";
118
+ /** DynamoDB conclusively rejected the scan or credentials. */
119
+ declare const ScanItemsBranchProviderRejected: "providerRejected";
120
+ /** DynamoDB returned malformed or oversized page JSON. */
121
+ declare const ScanItemsBranchInvalidResponse: "invalidResponse";
122
+ /** The table, limit, or continuation key is invalid. */
123
+ declare const ScanItemsBranchDefect: "defect";
124
+ /** Manifest definition for scanItems. */
125
+ declare const ScanItemsDefinition: QueryDefinition;
126
+ /** Manifest metadata for scanItems. */
127
+ declare const ScanItemsMetadata: {
128
+ readonly kind: "query";
129
+ readonly idempotency: "none";
130
+ readonly authorization: "required";
131
+ };
39
132
 
40
133
  /** Configuration for the getItem connector Step. */
41
134
  interface GetItemStepConfig<StepInput, OperationInput = GetItemInput, OperationOutput = ItemResult> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
@@ -58,6 +151,88 @@ interface GetItemStepConfig<StepInput, OperationInput = GetItemInput, OperationO
58
151
  }
59
152
  /** Build the getItem Step from a named connection. */
60
153
  declare function newGetItemStep<StepInput, OperationInput = GetItemInput, OperationOutput = ItemResult>(configuration: GetItemStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
154
+ /** Configuration for the putItem connector Step. */
155
+ interface PutItemStepConfig<StepInput, OperationInput = PutItemInput, OperationOutput = ItemWriteResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
156
+ /** Named connection supplying this operation. */
157
+ connection: Connection<{
158
+ putItem(): Mutation<OperationInput, OperationOutput>;
159
+ }>;
160
+ /** Name matching the bound connection. */
161
+ connectionName: string;
162
+ /** DynamoDB accepted the item replacement. */
163
+ written: StepTarget<MutationResult<OperationOutput>>;
164
+ /** DynamoDB conclusively rejected the write or credentials. */
165
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
166
+ /** DynamoDB returned malformed or oversized write JSON. */
167
+ invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
168
+ /** The table or item is invalid. */
169
+ defect?: StepTarget<MutationResult<OperationOutput>>;
170
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
171
+ maxSends?: number;
172
+ }
173
+ /** Build the putItem Step from a named connection. */
174
+ declare function newPutItemStep<StepInput, OperationInput = PutItemInput, OperationOutput = ItemWriteResult>(configuration: PutItemStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
175
+ /** Configuration for the updateItem connector Step. */
176
+ interface UpdateItemStepConfig<StepInput, OperationInput = UpdateItemInput, OperationOutput = ItemWriteResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
177
+ /** Named connection supplying this operation. */
178
+ connection: Connection<{
179
+ updateItem(): Mutation<OperationInput, OperationOutput>;
180
+ }>;
181
+ /** Name matching the bound connection. */
182
+ connectionName: string;
183
+ /** DynamoDB accepted the absolute attribute update. */
184
+ updated: StepTarget<MutationResult<OperationOutput>>;
185
+ /** DynamoDB conclusively rejected the update or credentials. */
186
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
187
+ /** DynamoDB returned malformed or oversized update JSON. */
188
+ invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
189
+ /** The table, key, or attributes are invalid. */
190
+ defect?: StepTarget<MutationResult<OperationOutput>>;
191
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
192
+ maxSends?: number;
193
+ }
194
+ /** Build the updateItem Step from a named connection. */
195
+ declare function newUpdateItemStep<StepInput, OperationInput = UpdateItemInput, OperationOutput = ItemWriteResult>(configuration: UpdateItemStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
196
+ /** Configuration for the deleteItem connector Step. */
197
+ interface DeleteItemStepConfig<StepInput, OperationInput = DeleteItemInput, OperationOutput = ItemWriteResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
198
+ /** Named connection supplying this operation. */
199
+ connection: Connection<{
200
+ deleteItem(): Mutation<OperationInput, OperationOutput>;
201
+ }>;
202
+ /** Name matching the bound connection. */
203
+ connectionName: string;
204
+ /** DynamoDB accepted the deletion. */
205
+ deleted: StepTarget<MutationResult<OperationOutput>>;
206
+ /** DynamoDB conclusively rejected the deletion or credentials. */
207
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
208
+ /** DynamoDB returned malformed or oversized deletion JSON. */
209
+ invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
210
+ /** The table or key is invalid. */
211
+ defect?: StepTarget<MutationResult<OperationOutput>>;
212
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
213
+ maxSends?: number;
214
+ }
215
+ /** Build the deleteItem Step from a named connection. */
216
+ declare function newDeleteItemStep<StepInput, OperationInput = DeleteItemInput, OperationOutput = ItemWriteResult>(configuration: DeleteItemStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
217
+ /** Configuration for the scanItems connector Step. */
218
+ interface ScanItemsStepConfig<StepInput, OperationInput = ScanItemsInput, OperationOutput = ItemPage> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
219
+ /** Named connection supplying this operation. */
220
+ connection: Connection<{
221
+ scanItems(): Query<OperationInput, OperationOutput>;
222
+ }>;
223
+ /** Name matching the bound connection. */
224
+ connectionName: string;
225
+ /** DynamoDB returned an item page, possibly empty. */
226
+ scanned: StepTarget<QueryResult<OperationOutput>>;
227
+ /** DynamoDB conclusively rejected the scan or credentials. */
228
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
229
+ /** DynamoDB returned malformed or oversized page JSON. */
230
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
231
+ /** The table, limit, or continuation key is invalid. */
232
+ defect?: StepTarget<QueryResult<OperationOutput>>;
233
+ }
234
+ /** Build the scanItems Step from a named connection. */
235
+ declare function newScanItemsStep<StepInput, OperationInput = ScanItemsInput, OperationOutput = ItemPage>(configuration: ScanItemsStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
61
236
 
62
237
  /** Open one named Amazon DynamoDB connection from Dex project configuration. */
63
238
  declare function newProjectConnection(project: LoadedProject, connectionName: string): Connection<Operations>;
@@ -71,9 +246,9 @@ interface Exchange {
71
246
  status: number;
72
247
  body: Uint8Array;
73
248
  retryAfterMs: number;
74
- error?: 'credential' | 'request' | 'tooLarge';
249
+ error?: 'credential' | 'request' | 'tooLarge' | 'interrupted';
75
250
  }
76
- /** Authenticated DynamoDB client for signed GetItem requests. */
251
+ /** Authenticated DynamoDB client for signed requests. */
77
252
  declare class AmazonDynamoDBClient {
78
253
  private readonly credentials;
79
254
  private readonly endpoint;
@@ -85,8 +260,18 @@ declare class AmazonDynamoDBClient {
85
260
  /** Validate the Region, endpoint, and limits without contacting AWS. */
86
261
  constructor(config: Config, credentials: CredentialProvider<Credentials>, options?: AmazonDynamoDBClientOptions);
87
262
  /** Bind the getItem Query. */ getItem(): GetItemOperation;
263
+ /** Bind the complete replacement Mutation. */
264
+ putItem(): PutItemOperation;
265
+ /** Bind the absolute update Mutation. */
266
+ updateItem(): UpdateItemOperation;
267
+ /** Bind the repeat-safe delete Mutation. */
268
+ deleteItem(): DeleteItemOperation;
269
+ /** Bind the bounded scan Query. */
270
+ scanItems(): ScanItemsOperation;
88
271
  /** Sign and send one bounded GetItem request. */
89
272
  readItem(call: Call, body: Buffer): Promise<Exchange>;
273
+ /** Sign and send one bounded DynamoDB request using the configured endpoint and Region. */
274
+ sendItemRequest(call: Call, target: 'GetItem' | 'PutItem' | 'UpdateItem' | 'DeleteItem' | 'Scan', body: Buffer): Promise<Exchange>;
90
275
  }
91
276
  /** Read one item by its complete primary key. */
92
277
  declare class GetItemOperation implements Query<GetItemInput, ItemResult> {
@@ -96,5 +281,51 @@ declare class GetItemOperation implements Query<GetItemInput, ItemResult> {
96
281
  /** Classify provider outcomes consistently with the Go implementation. */
97
282
  invoke(call: Call, input: GetItemInput): Promise<QueryAttempt<ItemResult>>;
98
283
  }
284
+ /** Replace one complete item including its primary key. */
285
+ declare class PutItemOperation implements Mutation<PutItemInput, ItemWriteResult> {
286
+ private readonly client;
287
+ /** Bind the provider client. */
288
+ constructor(client: AmazonDynamoDBClient);
289
+ /** Return the generated replacement contract. */
290
+ definition(): _superdurable_connectors_sdk.MutationDefinition;
291
+ /** Correlate repeat-safe replacements with the Dex call. */
292
+ idempotencyKey(callId: string): string;
293
+ /** Replace the item using the supplied absolute values. */
294
+ invoke(call: Call, input: PutItemInput): Promise<MutationAttempt<ItemWriteResult>>;
295
+ }
296
+ /** Set absolute non-key attributes using expression aliases. */
297
+ declare class UpdateItemOperation implements Mutation<UpdateItemInput, ItemWriteResult> {
298
+ private readonly client;
299
+ /** Bind the provider client. */
300
+ constructor(client: AmazonDynamoDBClient);
301
+ /** Return the generated update contract. */
302
+ definition(): _superdurable_connectors_sdk.MutationDefinition;
303
+ /** Correlate repeat-safe updates with the Dex call. */
304
+ idempotencyKey(callId: string): string;
305
+ /** Update the supplied attributes without changing the key. */
306
+ invoke(call: Call, input: UpdateItemInput): Promise<MutationAttempt<ItemWriteResult>>;
307
+ }
308
+ /** Delete one item by its complete primary key. */
309
+ declare class DeleteItemOperation implements Mutation<DeleteItemInput, ItemWriteResult> {
310
+ private readonly client;
311
+ /** Bind the provider client. */
312
+ constructor(client: AmazonDynamoDBClient);
313
+ /** Return the generated deletion contract. */
314
+ definition(): _superdurable_connectors_sdk.MutationDefinition;
315
+ /** Correlate repeat-safe deletions with the Dex call. */
316
+ idempotencyKey(callId: string): string;
317
+ /** Delete the item or retry a temporary response. */
318
+ invoke(call: Call, input: DeleteItemInput): Promise<MutationAttempt<ItemWriteResult>>;
319
+ }
320
+ /** Read one bounded page with its continuation key. */
321
+ declare class ScanItemsOperation implements Query<ScanItemsInput, ItemPage> {
322
+ private readonly client;
323
+ /** Bind the provider client. */
324
+ constructor(client: AmazonDynamoDBClient);
325
+ /** Return the generated scan contract. */
326
+ definition(): QueryDefinition;
327
+ /** Scan one page using the supplied limit and cursor. */
328
+ invoke(call: Call, input: ScanItemsInput): Promise<QueryAttempt<ItemPage>>;
329
+ }
99
330
 
100
- export { AmazonDynamoDBClient, type AmazonDynamoDBClientOptions, Config, Connection, ConnectorID, Credentials, GetItemBranch, GetItemBranchDefect, GetItemBranchFound, GetItemBranchInvalidResponse, GetItemBranchMissing, GetItemBranchProviderRejected, GetItemDefinition, GetItemInput, GetItemMetadata, GetItemOperation, type GetItemStepConfig, ItemResult, ProviderID, newGetItemStep, newProjectConnection };
331
+ export { AmazonDynamoDBClient, type AmazonDynamoDBClientOptions, Config, Connection, ConnectorID, Credentials, DeleteItemBranch, DeleteItemBranchDefect, DeleteItemBranchDeleted, DeleteItemBranchInvalidResponse, DeleteItemBranchProviderRejected, DeleteItemDefinition, DeleteItemInput, DeleteItemMetadata, DeleteItemOperation, type DeleteItemStepConfig, GetItemBranch, GetItemBranchDefect, GetItemBranchFound, GetItemBranchInvalidResponse, GetItemBranchMissing, GetItemBranchProviderRejected, GetItemDefinition, GetItemInput, GetItemMetadata, GetItemOperation, type GetItemStepConfig, ItemPage, ItemResult, ItemWriteResult, ProviderID, PutItemBranch, PutItemBranchDefect, PutItemBranchInvalidResponse, PutItemBranchProviderRejected, PutItemBranchWritten, PutItemDefinition, PutItemInput, PutItemMetadata, PutItemOperation, type PutItemStepConfig, ScanItemsBranch, ScanItemsBranchDefect, ScanItemsBranchInvalidResponse, ScanItemsBranchProviderRejected, ScanItemsBranchScanned, ScanItemsDefinition, ScanItemsInput, ScanItemsMetadata, ScanItemsOperation, type ScanItemsStepConfig, UpdateItemBranch, UpdateItemBranchDefect, UpdateItemBranchInvalidResponse, UpdateItemBranchProviderRejected, UpdateItemBranchUpdated, UpdateItemDefinition, UpdateItemInput, UpdateItemMetadata, UpdateItemOperation, type UpdateItemStepConfig, newDeleteItemStep, newGetItemStep, newProjectConnection, newPutItemStep, newScanItemsStep, newUpdateItemStep };