@aws-sdk/client-cloudtrail-data 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,22 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CloudTrailData = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const CloudTrailDataClient_1 = require("./CloudTrailDataClient");
5
6
  const PutAuditEventsCommand_1 = require("./commands/PutAuditEventsCommand");
7
+ const commands = {
8
+ PutAuditEventsCommand: PutAuditEventsCommand_1.PutAuditEventsCommand,
9
+ };
6
10
  class CloudTrailData extends CloudTrailDataClient_1.CloudTrailDataClient {
7
- putAuditEvents(args, optionsOrCb, cb) {
8
- const command = new PutAuditEventsCommand_1.PutAuditEventsCommand(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
11
  }
22
12
  exports.CloudTrailData = CloudTrailData;
13
+ (0, smithy_client_1.createAggregatedClient)(commands, CloudTrailData);
@@ -1,18 +1,9 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { CloudTrailDataClient } from "./CloudTrailDataClient";
2
3
  import { PutAuditEventsCommand, } from "./commands/PutAuditEventsCommand";
4
+ const commands = {
5
+ PutAuditEventsCommand,
6
+ };
3
7
  export class CloudTrailData extends CloudTrailDataClient {
4
- putAuditEvents(args, optionsOrCb, cb) {
5
- const command = new PutAuditEventsCommand(args);
6
- if (typeof optionsOrCb === "function") {
7
- this.send(command, optionsOrCb);
8
- }
9
- else if (typeof cb === "function") {
10
- if (typeof optionsOrCb !== "object")
11
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
12
- this.send(command, optionsOrCb || {}, cb);
13
- }
14
- else {
15
- return this.send(command, optionsOrCb);
16
- }
17
- }
18
8
  }
9
+ createAggregatedClient(commands, CloudTrailData);
@@ -1,6 +1,14 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
2
  import { CloudTrailDataClient } from "./CloudTrailDataClient";
3
3
  import { PutAuditEventsCommandInput, PutAuditEventsCommandOutput } from "./commands/PutAuditEventsCommand";
4
+ export interface CloudTrailData {
5
+ /**
6
+ * @see {@link PutAuditEventsCommand}
7
+ */
8
+ putAuditEvents(args: PutAuditEventsCommandInput, options?: __HttpHandlerOptions): Promise<PutAuditEventsCommandOutput>;
9
+ putAuditEvents(args: PutAuditEventsCommandInput, cb: (err: any, data?: PutAuditEventsCommandOutput) => void): void;
10
+ putAuditEvents(args: PutAuditEventsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutAuditEventsCommandOutput) => void): void;
11
+ }
4
12
  /**
5
13
  * @public
6
14
  * <p>The CloudTrail Data Service lets you ingest events into CloudTrail from any source in your
@@ -10,16 +18,5 @@ import { PutAuditEventsCommandInput, PutAuditEventsCommandOutput } from "./comma
10
18
  * <code>PutAuditEvents</code> to ingest your application activity into CloudTrail, you can use CloudTrail Lake to search, query, and analyze the data that is logged
11
19
  * from your applications.</p>
12
20
  */
13
- export declare class CloudTrailData extends CloudTrailDataClient {
14
- /**
15
- * @public
16
- * <p>Ingests your application events into CloudTrail Lake. A required parameter,
17
- * <code>auditEvents</code>, accepts the JSON records (also called
18
- * <i>payload</i>) of events that you want CloudTrail to ingest. You
19
- * can add up to 100 of these events (or up to 1 MB) per <code>PutAuditEvents</code>
20
- * request.</p>
21
- */
22
- putAuditEvents(args: PutAuditEventsCommandInput, options?: __HttpHandlerOptions): Promise<PutAuditEventsCommandOutput>;
23
- putAuditEvents(args: PutAuditEventsCommandInput, cb: (err: any, data?: PutAuditEventsCommandOutput) => void): void;
24
- putAuditEvents(args: PutAuditEventsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutAuditEventsCommandOutput) => void): void;
21
+ export declare class CloudTrailData extends CloudTrailDataClient implements CloudTrailData {
25
22
  }
@@ -4,7 +4,7 @@ import {
4
4
  PutAuditEventsCommandInput,
5
5
  PutAuditEventsCommandOutput,
6
6
  } from "./commands/PutAuditEventsCommand";
7
- export declare class CloudTrailData extends CloudTrailDataClient {
7
+ export interface CloudTrailData {
8
8
  putAuditEvents(
9
9
  args: PutAuditEventsCommandInput,
10
10
  options?: __HttpHandlerOptions
@@ -19,3 +19,6 @@ export declare class CloudTrailData extends CloudTrailDataClient {
19
19
  cb: (err: any, data?: PutAuditEventsCommandOutput) => void
20
20
  ): void;
21
21
  }
22
+ export declare class CloudTrailData
23
+ extends CloudTrailDataClient
24
+ implements CloudTrailData {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-cloudtrail-data",
3
3
  "description": "AWS SDK for JavaScript Cloudtrail Data Client for Node.js, Browser and React Native",
4
- "version": "3.315.0",
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.315.0",
24
+ "@aws-sdk/client-sts": "3.319.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.315.0",
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.310.0",
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.315.0",
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.315.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.315.0",
51
- "@aws-sdk/util-endpoints": "3.310.0",
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",