@aws-sdk/client-dynamodb-streams 3.1008.0 → 3.1009.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.
Files changed (2) hide show
  1. package/README.md +26 -46
  2. package/package.json +34 -34
package/README.md CHANGED
@@ -13,8 +13,9 @@ Table Activity with DynamoDB Streams</a> in the Amazon DynamoDB Developer
13
13
  Guide.</p>
14
14
 
15
15
  ## Installing
16
- To install this package, simply type add or install @aws-sdk/client-dynamodb-streams
17
- using your favorite package manager:
16
+
17
+ To install this package, use the CLI of your favorite package manager:
18
+
18
19
  - `npm install @aws-sdk/client-dynamodb-streams`
19
20
  - `yarn add @aws-sdk/client-dynamodb-streams`
20
21
  - `pnpm add @aws-sdk/client-dynamodb-streams`
@@ -39,15 +40,15 @@ import { DynamoDBStreamsClient, ListStreamsCommand } from "@aws-sdk/client-dynam
39
40
 
40
41
  ### Usage
41
42
 
42
- To send a request, you:
43
+ To send a request:
43
44
 
44
- - Initiate client with configuration (e.g. credentials, region).
45
- - Initiate command with input parameters.
46
- - Call `send` operation on client with command object as input.
47
- - If you are using a custom http handler, you may call `destroy()` to close open connections.
45
+ - Instantiate a client with configuration (e.g. credentials, region).
46
+ - See [docs/CLIENTS](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md) for configuration details.
47
+ - See [@aws-sdk/config](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/config/README.md) for additional options.
48
+ - Instantiate a command with input parameters.
49
+ - Call the `send` operation on the client, providing the command object as input.
48
50
 
49
51
  ```js
50
- // a client can be shared by different commands.
51
52
  const client = new DynamoDBStreamsClient({ region: "REGION" });
52
53
 
53
54
  const params = { /** input parameters */ };
@@ -56,7 +57,7 @@ const command = new ListStreamsCommand(params);
56
57
 
57
58
  #### Async/await
58
59
 
59
- We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
60
+ We recommend using the [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
60
61
  operator to wait for the promise returned by send operation as follows:
61
62
 
62
63
  ```js
@@ -71,26 +72,9 @@ try {
71
72
  }
72
73
  ```
73
74
 
74
- Async-await is clean, concise, intuitive, easy to debug and has better error handling
75
- as compared to using Promise chains or callbacks.
76
-
77
75
  #### Promises
78
76
 
79
- You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
80
- to execute send operation.
81
-
82
- ```js
83
- client.send(command).then(
84
- (data) => {
85
- // process data.
86
- },
87
- (error) => {
88
- // error handling.
89
- }
90
- );
91
- ```
92
-
93
- Promises can also be called using `.catch()` and `.finally()` as follows:
77
+ You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining).
94
78
 
95
79
  ```js
96
80
  client
@@ -106,27 +90,21 @@ client
106
90
  });
107
91
  ```
108
92
 
109
- #### Callbacks
110
-
111
- We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
112
- but they are supported by the send operation.
93
+ #### Aggregated client
113
94
 
114
- ```js
115
- // callbacks.
116
- client.send(command, (err, data) => {
117
- // process err and data.
118
- });
119
- ```
95
+ The aggregated client class is exported from the same package, but without the "Client" suffix.
120
96
 
121
- #### v2 compatible style
97
+ `DynamoDBStreams` extends `DynamoDBStreamsClient` and additionally supports all operations, waiters, and paginators as methods.
98
+ This style may be familiar to you from the AWS SDK for JavaScript v2.
122
99
 
123
- The client can also send requests using v2 compatible style.
124
- However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post
125
- on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/)
100
+ If you are bundling the AWS SDK, we recommend using only the bare-bones client (`DynamoDBStreamsClient`).
101
+ More details are in the blog post on
102
+ [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/).
126
103
 
127
104
  ```ts
128
- import * as AWS from "@aws-sdk/client-dynamodb-streams";
129
- const client = new AWS.DynamoDBStreams({ region: "REGION" });
105
+ import { DynamoDBStreams } from "@aws-sdk/client-dynamodb-streams";
106
+
107
+ const client = new DynamoDBStreams({ region: "REGION" });
130
108
 
131
109
  // async/await.
132
110
  try {
@@ -146,7 +124,7 @@ client
146
124
  // error handling.
147
125
  });
148
126
 
149
- // callbacks.
127
+ // callbacks (not recommended).
150
128
  client.listStreams(params, (err, data) => {
151
129
  // process err and data.
152
130
  });
@@ -174,12 +152,14 @@ try {
174
152
  }
175
153
  ```
176
154
 
155
+ See also [docs/ERROR_HANDLING](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/ERROR_HANDLING.md).
156
+
177
157
  ## Getting Help
178
158
 
179
159
  Please use these community resources for getting help.
180
- We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
160
+ We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
181
161
 
182
- - Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
162
+ - Visit the [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
183
163
  or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
184
164
  - Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
185
165
  on AWS Developer Blog.
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.1008.0",
4
+ "version": "3.1009.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-dynamodb-streams",
@@ -27,46 +27,46 @@
27
27
  "dependencies": {
28
28
  "@aws-crypto/sha256-browser": "5.2.0",
29
29
  "@aws-crypto/sha256-js": "5.2.0",
30
- "@aws-sdk/core": "^3.973.19",
31
- "@aws-sdk/credential-provider-node": "^3.972.20",
32
- "@aws-sdk/middleware-host-header": "^3.972.7",
33
- "@aws-sdk/middleware-logger": "^3.972.7",
34
- "@aws-sdk/middleware-recursion-detection": "^3.972.7",
35
- "@aws-sdk/middleware-user-agent": "^3.972.20",
36
- "@aws-sdk/region-config-resolver": "^3.972.7",
37
- "@aws-sdk/types": "^3.973.5",
38
- "@aws-sdk/util-endpoints": "^3.996.4",
39
- "@aws-sdk/util-user-agent-browser": "^3.972.7",
40
- "@aws-sdk/util-user-agent-node": "^3.973.6",
41
- "@smithy/config-resolver": "^4.4.10",
42
- "@smithy/core": "^3.23.9",
43
- "@smithy/fetch-http-handler": "^5.3.13",
44
- "@smithy/hash-node": "^4.2.11",
45
- "@smithy/invalid-dependency": "^4.2.11",
46
- "@smithy/middleware-content-length": "^4.2.11",
47
- "@smithy/middleware-endpoint": "^4.4.23",
48
- "@smithy/middleware-retry": "^4.4.40",
49
- "@smithy/middleware-serde": "^4.2.12",
50
- "@smithy/middleware-stack": "^4.2.11",
51
- "@smithy/node-config-provider": "^4.3.11",
52
- "@smithy/node-http-handler": "^4.4.14",
53
- "@smithy/protocol-http": "^5.3.11",
54
- "@smithy/smithy-client": "^4.12.3",
55
- "@smithy/types": "^4.13.0",
56
- "@smithy/url-parser": "^4.2.11",
30
+ "@aws-sdk/core": "^3.973.20",
31
+ "@aws-sdk/credential-provider-node": "^3.972.21",
32
+ "@aws-sdk/middleware-host-header": "^3.972.8",
33
+ "@aws-sdk/middleware-logger": "^3.972.8",
34
+ "@aws-sdk/middleware-recursion-detection": "^3.972.8",
35
+ "@aws-sdk/middleware-user-agent": "^3.972.21",
36
+ "@aws-sdk/region-config-resolver": "^3.972.8",
37
+ "@aws-sdk/types": "^3.973.6",
38
+ "@aws-sdk/util-endpoints": "^3.996.5",
39
+ "@aws-sdk/util-user-agent-browser": "^3.972.8",
40
+ "@aws-sdk/util-user-agent-node": "^3.973.7",
41
+ "@smithy/config-resolver": "^4.4.11",
42
+ "@smithy/core": "^3.23.11",
43
+ "@smithy/fetch-http-handler": "^5.3.15",
44
+ "@smithy/hash-node": "^4.2.12",
45
+ "@smithy/invalid-dependency": "^4.2.12",
46
+ "@smithy/middleware-content-length": "^4.2.12",
47
+ "@smithy/middleware-endpoint": "^4.4.25",
48
+ "@smithy/middleware-retry": "^4.4.42",
49
+ "@smithy/middleware-serde": "^4.2.14",
50
+ "@smithy/middleware-stack": "^4.2.12",
51
+ "@smithy/node-config-provider": "^4.3.12",
52
+ "@smithy/node-http-handler": "^4.4.16",
53
+ "@smithy/protocol-http": "^5.3.12",
54
+ "@smithy/smithy-client": "^4.12.5",
55
+ "@smithy/types": "^4.13.1",
56
+ "@smithy/url-parser": "^4.2.12",
57
57
  "@smithy/util-base64": "^4.3.2",
58
58
  "@smithy/util-body-length-browser": "^4.2.2",
59
59
  "@smithy/util-body-length-node": "^4.2.3",
60
- "@smithy/util-defaults-mode-browser": "^4.3.39",
61
- "@smithy/util-defaults-mode-node": "^4.2.42",
62
- "@smithy/util-endpoints": "^3.3.2",
63
- "@smithy/util-middleware": "^4.2.11",
64
- "@smithy/util-retry": "^4.2.11",
60
+ "@smithy/util-defaults-mode-browser": "^4.3.41",
61
+ "@smithy/util-defaults-mode-node": "^4.2.44",
62
+ "@smithy/util-endpoints": "^3.3.3",
63
+ "@smithy/util-middleware": "^4.2.12",
64
+ "@smithy/util-retry": "^4.2.12",
65
65
  "@smithy/util-utf8": "^4.2.2",
66
66
  "tslib": "^2.6.2"
67
67
  },
68
68
  "devDependencies": {
69
- "@smithy/snapshot-testing": "^2.0.0",
69
+ "@smithy/snapshot-testing": "^2.0.2",
70
70
  "@tsconfig/node20": "20.1.8",
71
71
  "@types/node": "^20.14.8",
72
72
  "concurrently": "7.0.0",