@aws-sdk/client-dynamodb-streams 3.315.0 → 3.319.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.
|
@@ -1,67 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DynamoDBStreams = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
4
5
|
const DescribeStreamCommand_1 = require("./commands/DescribeStreamCommand");
|
|
5
6
|
const GetRecordsCommand_1 = require("./commands/GetRecordsCommand");
|
|
6
7
|
const GetShardIteratorCommand_1 = require("./commands/GetShardIteratorCommand");
|
|
7
8
|
const ListStreamsCommand_1 = require("./commands/ListStreamsCommand");
|
|
8
9
|
const DynamoDBStreamsClient_1 = require("./DynamoDBStreamsClient");
|
|
10
|
+
const commands = {
|
|
11
|
+
DescribeStreamCommand: DescribeStreamCommand_1.DescribeStreamCommand,
|
|
12
|
+
GetRecordsCommand: GetRecordsCommand_1.GetRecordsCommand,
|
|
13
|
+
GetShardIteratorCommand: GetShardIteratorCommand_1.GetShardIteratorCommand,
|
|
14
|
+
ListStreamsCommand: ListStreamsCommand_1.ListStreamsCommand,
|
|
15
|
+
};
|
|
9
16
|
class DynamoDBStreams extends DynamoDBStreamsClient_1.DynamoDBStreamsClient {
|
|
10
|
-
describeStream(args, optionsOrCb, cb) {
|
|
11
|
-
const command = new DescribeStreamCommand_1.DescribeStreamCommand(args);
|
|
12
|
-
if (typeof optionsOrCb === "function") {
|
|
13
|
-
this.send(command, optionsOrCb);
|
|
14
|
-
}
|
|
15
|
-
else if (typeof cb === "function") {
|
|
16
|
-
if (typeof optionsOrCb !== "object")
|
|
17
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
18
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
return this.send(command, optionsOrCb);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
getRecords(args, optionsOrCb, cb) {
|
|
25
|
-
const command = new GetRecordsCommand_1.GetRecordsCommand(args);
|
|
26
|
-
if (typeof optionsOrCb === "function") {
|
|
27
|
-
this.send(command, optionsOrCb);
|
|
28
|
-
}
|
|
29
|
-
else if (typeof cb === "function") {
|
|
30
|
-
if (typeof optionsOrCb !== "object")
|
|
31
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
32
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
return this.send(command, optionsOrCb);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
getShardIterator(args, optionsOrCb, cb) {
|
|
39
|
-
const command = new GetShardIteratorCommand_1.GetShardIteratorCommand(args);
|
|
40
|
-
if (typeof optionsOrCb === "function") {
|
|
41
|
-
this.send(command, optionsOrCb);
|
|
42
|
-
}
|
|
43
|
-
else if (typeof cb === "function") {
|
|
44
|
-
if (typeof optionsOrCb !== "object")
|
|
45
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
46
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
return this.send(command, optionsOrCb);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
listStreams(args, optionsOrCb, cb) {
|
|
53
|
-
const command = new ListStreamsCommand_1.ListStreamsCommand(args);
|
|
54
|
-
if (typeof optionsOrCb === "function") {
|
|
55
|
-
this.send(command, optionsOrCb);
|
|
56
|
-
}
|
|
57
|
-
else if (typeof cb === "function") {
|
|
58
|
-
if (typeof optionsOrCb !== "object")
|
|
59
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
60
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
return this.send(command, optionsOrCb);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
17
|
}
|
|
67
18
|
exports.DynamoDBStreams = DynamoDBStreams;
|
|
19
|
+
(0, smithy_client_1.createAggregatedClient)(commands, DynamoDBStreams);
|
|
@@ -1,63 +1,15 @@
|
|
|
1
|
+
import { createAggregatedClient } from "@aws-sdk/smithy-client";
|
|
1
2
|
import { DescribeStreamCommand, } from "./commands/DescribeStreamCommand";
|
|
2
3
|
import { GetRecordsCommand } from "./commands/GetRecordsCommand";
|
|
3
4
|
import { GetShardIteratorCommand, } from "./commands/GetShardIteratorCommand";
|
|
4
5
|
import { ListStreamsCommand } from "./commands/ListStreamsCommand";
|
|
5
6
|
import { DynamoDBStreamsClient } from "./DynamoDBStreamsClient";
|
|
7
|
+
const commands = {
|
|
8
|
+
DescribeStreamCommand,
|
|
9
|
+
GetRecordsCommand,
|
|
10
|
+
GetShardIteratorCommand,
|
|
11
|
+
ListStreamsCommand,
|
|
12
|
+
};
|
|
6
13
|
export class DynamoDBStreams extends DynamoDBStreamsClient {
|
|
7
|
-
describeStream(args, optionsOrCb, cb) {
|
|
8
|
-
const command = new DescribeStreamCommand(args);
|
|
9
|
-
if (typeof optionsOrCb === "function") {
|
|
10
|
-
this.send(command, optionsOrCb);
|
|
11
|
-
}
|
|
12
|
-
else if (typeof cb === "function") {
|
|
13
|
-
if (typeof optionsOrCb !== "object")
|
|
14
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
15
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
return this.send(command, optionsOrCb);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
getRecords(args, optionsOrCb, cb) {
|
|
22
|
-
const command = new GetRecordsCommand(args);
|
|
23
|
-
if (typeof optionsOrCb === "function") {
|
|
24
|
-
this.send(command, optionsOrCb);
|
|
25
|
-
}
|
|
26
|
-
else if (typeof cb === "function") {
|
|
27
|
-
if (typeof optionsOrCb !== "object")
|
|
28
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
29
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
return this.send(command, optionsOrCb);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
getShardIterator(args, optionsOrCb, cb) {
|
|
36
|
-
const command = new GetShardIteratorCommand(args);
|
|
37
|
-
if (typeof optionsOrCb === "function") {
|
|
38
|
-
this.send(command, optionsOrCb);
|
|
39
|
-
}
|
|
40
|
-
else if (typeof cb === "function") {
|
|
41
|
-
if (typeof optionsOrCb !== "object")
|
|
42
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
43
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
return this.send(command, optionsOrCb);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
listStreams(args, optionsOrCb, cb) {
|
|
50
|
-
const command = new ListStreamsCommand(args);
|
|
51
|
-
if (typeof optionsOrCb === "function") {
|
|
52
|
-
this.send(command, optionsOrCb);
|
|
53
|
-
}
|
|
54
|
-
else if (typeof cb === "function") {
|
|
55
|
-
if (typeof optionsOrCb !== "object")
|
|
56
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
57
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
return this.send(command, optionsOrCb);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
14
|
}
|
|
15
|
+
createAggregatedClient(commands, DynamoDBStreams);
|
|
@@ -4,72 +4,40 @@ import { GetRecordsCommandInput, GetRecordsCommandOutput } from "./commands/GetR
|
|
|
4
4
|
import { GetShardIteratorCommandInput, GetShardIteratorCommandOutput } from "./commands/GetShardIteratorCommand";
|
|
5
5
|
import { ListStreamsCommandInput, ListStreamsCommandOutput } from "./commands/ListStreamsCommand";
|
|
6
6
|
import { DynamoDBStreamsClient } from "./DynamoDBStreamsClient";
|
|
7
|
-
|
|
8
|
-
* @public
|
|
9
|
-
* <fullname>Amazon DynamoDB</fullname>
|
|
10
|
-
*
|
|
11
|
-
* <p>Amazon DynamoDB Streams provides API actions for accessing streams and processing
|
|
12
|
-
* stream records. To learn more about application development with Streams, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html">Capturing
|
|
13
|
-
* Table Activity with DynamoDB Streams</a> in the Amazon DynamoDB Developer
|
|
14
|
-
* Guide.</p>
|
|
15
|
-
*/
|
|
16
|
-
export declare class DynamoDBStreams extends DynamoDBStreamsClient {
|
|
7
|
+
export interface DynamoDBStreams {
|
|
17
8
|
/**
|
|
18
|
-
* @
|
|
19
|
-
* <p>Returns information about a stream, including the current status of the stream, its Amazon Resource Name (ARN), the composition of its shards, and its corresponding DynamoDB table.</p>
|
|
20
|
-
* <note>
|
|
21
|
-
* <p>You can call <code>DescribeStream</code> at a maximum rate of 10 times per second.</p>
|
|
22
|
-
* </note>
|
|
23
|
-
* <p>Each shard in the stream has a <code>SequenceNumberRange</code> associated with it. If the
|
|
24
|
-
* <code>SequenceNumberRange</code> has a <code>StartingSequenceNumber</code> but no
|
|
25
|
-
* <code>EndingSequenceNumber</code>, then the shard is still open (able to receive more stream
|
|
26
|
-
* records). If both <code>StartingSequenceNumber</code> and <code>EndingSequenceNumber</code>
|
|
27
|
-
* are present, then that shard is closed and can no longer receive more data.</p>
|
|
9
|
+
* @see {@link DescribeStreamCommand}
|
|
28
10
|
*/
|
|
29
11
|
describeStream(args: DescribeStreamCommandInput, options?: __HttpHandlerOptions): Promise<DescribeStreamCommandOutput>;
|
|
30
12
|
describeStream(args: DescribeStreamCommandInput, cb: (err: any, data?: DescribeStreamCommandOutput) => void): void;
|
|
31
13
|
describeStream(args: DescribeStreamCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeStreamCommandOutput) => void): void;
|
|
32
14
|
/**
|
|
33
|
-
* @
|
|
34
|
-
* <p>Retrieves the stream records from a given shard.</p>
|
|
35
|
-
* <p>Specify a shard iterator using the <code>ShardIterator</code> parameter. The shard iterator
|
|
36
|
-
* specifies the position in the shard from which you want to start reading stream records
|
|
37
|
-
* sequentially. If there are no stream records available in the portion of the shard that the
|
|
38
|
-
* iterator points to, <code>GetRecords</code> returns an empty list. Note that it might take
|
|
39
|
-
* multiple calls to get to a portion of the shard that contains stream records.</p>
|
|
40
|
-
* <note>
|
|
41
|
-
* <p>
|
|
42
|
-
* <code>GetRecords</code> can retrieve a maximum of 1 MB of data or 1000 stream records,
|
|
43
|
-
* whichever comes first.</p>
|
|
44
|
-
* </note>
|
|
15
|
+
* @see {@link GetRecordsCommand}
|
|
45
16
|
*/
|
|
46
17
|
getRecords(args: GetRecordsCommandInput, options?: __HttpHandlerOptions): Promise<GetRecordsCommandOutput>;
|
|
47
18
|
getRecords(args: GetRecordsCommandInput, cb: (err: any, data?: GetRecordsCommandOutput) => void): void;
|
|
48
19
|
getRecords(args: GetRecordsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRecordsCommandOutput) => void): void;
|
|
49
20
|
/**
|
|
50
|
-
* @
|
|
51
|
-
* <p>Returns a shard iterator. A shard iterator provides information
|
|
52
|
-
* about how to retrieve the stream records from within a shard. Use
|
|
53
|
-
* the shard iterator in a subsequent
|
|
54
|
-
* <code>GetRecords</code> request to read the stream records
|
|
55
|
-
* from the shard.</p>
|
|
56
|
-
* <note>
|
|
57
|
-
* <p>A shard iterator expires 15 minutes after it is returned to the requester.</p>
|
|
58
|
-
* </note>
|
|
21
|
+
* @see {@link GetShardIteratorCommand}
|
|
59
22
|
*/
|
|
60
23
|
getShardIterator(args: GetShardIteratorCommandInput, options?: __HttpHandlerOptions): Promise<GetShardIteratorCommandOutput>;
|
|
61
24
|
getShardIterator(args: GetShardIteratorCommandInput, cb: (err: any, data?: GetShardIteratorCommandOutput) => void): void;
|
|
62
25
|
getShardIterator(args: GetShardIteratorCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetShardIteratorCommandOutput) => void): void;
|
|
63
26
|
/**
|
|
64
|
-
* @
|
|
65
|
-
* <p>Returns an array of stream ARNs associated with the current account and endpoint. If the
|
|
66
|
-
* <code>TableName</code> parameter is present, then <code>ListStreams</code> will return only the
|
|
67
|
-
* streams ARNs for that table.</p>
|
|
68
|
-
* <note>
|
|
69
|
-
* <p>You can call <code>ListStreams</code> at a maximum rate of 5 times per second.</p>
|
|
70
|
-
* </note>
|
|
27
|
+
* @see {@link ListStreamsCommand}
|
|
71
28
|
*/
|
|
72
29
|
listStreams(args: ListStreamsCommandInput, options?: __HttpHandlerOptions): Promise<ListStreamsCommandOutput>;
|
|
73
30
|
listStreams(args: ListStreamsCommandInput, cb: (err: any, data?: ListStreamsCommandOutput) => void): void;
|
|
74
31
|
listStreams(args: ListStreamsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListStreamsCommandOutput) => void): void;
|
|
75
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* @public
|
|
35
|
+
* <fullname>Amazon DynamoDB</fullname>
|
|
36
|
+
*
|
|
37
|
+
* <p>Amazon DynamoDB Streams provides API actions for accessing streams and processing
|
|
38
|
+
* stream records. To learn more about application development with Streams, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html">Capturing
|
|
39
|
+
* Table Activity with DynamoDB Streams</a> in the Amazon DynamoDB Developer
|
|
40
|
+
* Guide.</p>
|
|
41
|
+
*/
|
|
42
|
+
export declare class DynamoDBStreams extends DynamoDBStreamsClient implements DynamoDBStreams {
|
|
43
|
+
}
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
ListStreamsCommandOutput,
|
|
17
17
|
} from "./commands/ListStreamsCommand";
|
|
18
18
|
import { DynamoDBStreamsClient } from "./DynamoDBStreamsClient";
|
|
19
|
-
export
|
|
19
|
+
export interface DynamoDBStreams {
|
|
20
20
|
describeStream(
|
|
21
21
|
args: DescribeStreamCommandInput,
|
|
22
22
|
options?: __HttpHandlerOptions
|
|
@@ -70,3 +70,6 @@ export declare class DynamoDBStreams extends DynamoDBStreamsClient {
|
|
|
70
70
|
cb: (err: any, data?: ListStreamsCommandOutput) => void
|
|
71
71
|
): void;
|
|
72
72
|
}
|
|
73
|
+
export declare class DynamoDBStreams
|
|
74
|
+
extends DynamoDBStreamsClient
|
|
75
|
+
implements DynamoDBStreams {}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-dynamodb-streams",
|
|
3
3
|
"description": "AWS SDK for JavaScript Dynamodb Streams Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.319.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.319.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.319.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"@aws-sdk/middleware-serde": "3.310.0",
|
|
37
37
|
"@aws-sdk/middleware-signing": "3.310.0",
|
|
38
38
|
"@aws-sdk/middleware-stack": "3.310.0",
|
|
39
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
39
|
+
"@aws-sdk/middleware-user-agent": "3.319.0",
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.316.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
51
|
-
"@aws-sdk/util-endpoints": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.316.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.316.0",
|
|
51
|
+
"@aws-sdk/util-endpoints": "3.319.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|
|
54
54
|
"@aws-sdk/util-user-agent-node": "3.310.0",
|