@aws-sdk/client-timestream-query 3.310.0 → 3.312.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.
@@ -7,130 +7,91 @@ const uuid_1 = require("uuid");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const TimestreamQueryServiceException_1 = require("../models/TimestreamQueryServiceException");
9
9
  const se_CancelQueryCommand = async (input, context) => {
10
- const headers = {
11
- "content-type": "application/x-amz-json-1.0",
12
- "x-amz-target": "Timestream_20181101.CancelQuery",
13
- };
10
+ const headers = sharedHeaders("CancelQuery");
14
11
  let body;
15
12
  body = JSON.stringify(se_CancelQueryRequest(input, context));
16
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
14
  };
18
15
  exports.se_CancelQueryCommand = se_CancelQueryCommand;
19
16
  const se_CreateScheduledQueryCommand = async (input, context) => {
20
- const headers = {
21
- "content-type": "application/x-amz-json-1.0",
22
- "x-amz-target": "Timestream_20181101.CreateScheduledQuery",
23
- };
17
+ const headers = sharedHeaders("CreateScheduledQuery");
24
18
  let body;
25
19
  body = JSON.stringify(se_CreateScheduledQueryRequest(input, context));
26
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
21
  };
28
22
  exports.se_CreateScheduledQueryCommand = se_CreateScheduledQueryCommand;
29
23
  const se_DeleteScheduledQueryCommand = async (input, context) => {
30
- const headers = {
31
- "content-type": "application/x-amz-json-1.0",
32
- "x-amz-target": "Timestream_20181101.DeleteScheduledQuery",
33
- };
24
+ const headers = sharedHeaders("DeleteScheduledQuery");
34
25
  let body;
35
26
  body = JSON.stringify(se_DeleteScheduledQueryRequest(input, context));
36
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
37
28
  };
38
29
  exports.se_DeleteScheduledQueryCommand = se_DeleteScheduledQueryCommand;
39
30
  const se_DescribeEndpointsCommand = async (input, context) => {
40
- const headers = {
41
- "content-type": "application/x-amz-json-1.0",
42
- "x-amz-target": "Timestream_20181101.DescribeEndpoints",
43
- };
31
+ const headers = sharedHeaders("DescribeEndpoints");
44
32
  let body;
45
33
  body = JSON.stringify(se_DescribeEndpointsRequest(input, context));
46
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
35
  };
48
36
  exports.se_DescribeEndpointsCommand = se_DescribeEndpointsCommand;
49
37
  const se_DescribeScheduledQueryCommand = async (input, context) => {
50
- const headers = {
51
- "content-type": "application/x-amz-json-1.0",
52
- "x-amz-target": "Timestream_20181101.DescribeScheduledQuery",
53
- };
38
+ const headers = sharedHeaders("DescribeScheduledQuery");
54
39
  let body;
55
40
  body = JSON.stringify(se_DescribeScheduledQueryRequest(input, context));
56
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
42
  };
58
43
  exports.se_DescribeScheduledQueryCommand = se_DescribeScheduledQueryCommand;
59
44
  const se_ExecuteScheduledQueryCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.0",
62
- "x-amz-target": "Timestream_20181101.ExecuteScheduledQuery",
63
- };
45
+ const headers = sharedHeaders("ExecuteScheduledQuery");
64
46
  let body;
65
47
  body = JSON.stringify(se_ExecuteScheduledQueryRequest(input, context));
66
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
49
  };
68
50
  exports.se_ExecuteScheduledQueryCommand = se_ExecuteScheduledQueryCommand;
69
51
  const se_ListScheduledQueriesCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.0",
72
- "x-amz-target": "Timestream_20181101.ListScheduledQueries",
73
- };
52
+ const headers = sharedHeaders("ListScheduledQueries");
74
53
  let body;
75
54
  body = JSON.stringify(se_ListScheduledQueriesRequest(input, context));
76
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
56
  };
78
57
  exports.se_ListScheduledQueriesCommand = se_ListScheduledQueriesCommand;
79
58
  const se_ListTagsForResourceCommand = async (input, context) => {
80
- const headers = {
81
- "content-type": "application/x-amz-json-1.0",
82
- "x-amz-target": "Timestream_20181101.ListTagsForResource",
83
- };
59
+ const headers = sharedHeaders("ListTagsForResource");
84
60
  let body;
85
61
  body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
86
62
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
87
63
  };
88
64
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
89
65
  const se_PrepareQueryCommand = async (input, context) => {
90
- const headers = {
91
- "content-type": "application/x-amz-json-1.0",
92
- "x-amz-target": "Timestream_20181101.PrepareQuery",
93
- };
66
+ const headers = sharedHeaders("PrepareQuery");
94
67
  let body;
95
68
  body = JSON.stringify(se_PrepareQueryRequest(input, context));
96
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
97
70
  };
98
71
  exports.se_PrepareQueryCommand = se_PrepareQueryCommand;
99
72
  const se_QueryCommand = async (input, context) => {
100
- const headers = {
101
- "content-type": "application/x-amz-json-1.0",
102
- "x-amz-target": "Timestream_20181101.Query",
103
- };
73
+ const headers = sharedHeaders("Query");
104
74
  let body;
105
75
  body = JSON.stringify(se_QueryRequest(input, context));
106
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
77
  };
108
78
  exports.se_QueryCommand = se_QueryCommand;
109
79
  const se_TagResourceCommand = async (input, context) => {
110
- const headers = {
111
- "content-type": "application/x-amz-json-1.0",
112
- "x-amz-target": "Timestream_20181101.TagResource",
113
- };
80
+ const headers = sharedHeaders("TagResource");
114
81
  let body;
115
82
  body = JSON.stringify(se_TagResourceRequest(input, context));
116
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
117
84
  };
118
85
  exports.se_TagResourceCommand = se_TagResourceCommand;
119
86
  const se_UntagResourceCommand = async (input, context) => {
120
- const headers = {
121
- "content-type": "application/x-amz-json-1.0",
122
- "x-amz-target": "Timestream_20181101.UntagResource",
123
- };
87
+ const headers = sharedHeaders("UntagResource");
124
88
  let body;
125
89
  body = JSON.stringify(se_UntagResourceRequest(input, context));
126
90
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
127
91
  };
128
92
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
129
93
  const se_UpdateScheduledQueryCommand = async (input, context) => {
130
- const headers = {
131
- "content-type": "application/x-amz-json-1.0",
132
- "x-amz-target": "Timestream_20181101.UpdateScheduledQuery",
133
- };
94
+ const headers = sharedHeaders("UpdateScheduledQuery");
134
95
  let body;
135
96
  body = JSON.stringify(se_UpdateScheduledQueryRequest(input, context));
136
97
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -1562,6 +1523,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1562
1523
  }
1563
1524
  return new protocol_http_1.HttpRequest(contents);
1564
1525
  };
1526
+ function sharedHeaders(operation) {
1527
+ return {
1528
+ "content-type": "application/x-amz-json-1.0",
1529
+ "x-amz-target": `Timestream_20181101.${operation}`,
1530
+ };
1531
+ }
1565
1532
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1566
1533
  if (encoded.length) {
1567
1534
  return JSON.parse(encoded);
@@ -4,118 +4,79 @@ import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, InvalidEndpointException, QueryExecutionException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  import { TimestreamQueryServiceException as __BaseException } from "../models/TimestreamQueryServiceException";
6
6
  export const se_CancelQueryCommand = async (input, context) => {
7
- const headers = {
8
- "content-type": "application/x-amz-json-1.0",
9
- "x-amz-target": "Timestream_20181101.CancelQuery",
10
- };
7
+ const headers = sharedHeaders("CancelQuery");
11
8
  let body;
12
9
  body = JSON.stringify(se_CancelQueryRequest(input, context));
13
10
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
11
  };
15
12
  export const se_CreateScheduledQueryCommand = async (input, context) => {
16
- const headers = {
17
- "content-type": "application/x-amz-json-1.0",
18
- "x-amz-target": "Timestream_20181101.CreateScheduledQuery",
19
- };
13
+ const headers = sharedHeaders("CreateScheduledQuery");
20
14
  let body;
21
15
  body = JSON.stringify(se_CreateScheduledQueryRequest(input, context));
22
16
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
17
  };
24
18
  export const se_DeleteScheduledQueryCommand = async (input, context) => {
25
- const headers = {
26
- "content-type": "application/x-amz-json-1.0",
27
- "x-amz-target": "Timestream_20181101.DeleteScheduledQuery",
28
- };
19
+ const headers = sharedHeaders("DeleteScheduledQuery");
29
20
  let body;
30
21
  body = JSON.stringify(se_DeleteScheduledQueryRequest(input, context));
31
22
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
32
23
  };
33
24
  export const se_DescribeEndpointsCommand = async (input, context) => {
34
- const headers = {
35
- "content-type": "application/x-amz-json-1.0",
36
- "x-amz-target": "Timestream_20181101.DescribeEndpoints",
37
- };
25
+ const headers = sharedHeaders("DescribeEndpoints");
38
26
  let body;
39
27
  body = JSON.stringify(se_DescribeEndpointsRequest(input, context));
40
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
29
  };
42
30
  export const se_DescribeScheduledQueryCommand = async (input, context) => {
43
- const headers = {
44
- "content-type": "application/x-amz-json-1.0",
45
- "x-amz-target": "Timestream_20181101.DescribeScheduledQuery",
46
- };
31
+ const headers = sharedHeaders("DescribeScheduledQuery");
47
32
  let body;
48
33
  body = JSON.stringify(se_DescribeScheduledQueryRequest(input, context));
49
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
35
  };
51
36
  export const se_ExecuteScheduledQueryCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.0",
54
- "x-amz-target": "Timestream_20181101.ExecuteScheduledQuery",
55
- };
37
+ const headers = sharedHeaders("ExecuteScheduledQuery");
56
38
  let body;
57
39
  body = JSON.stringify(se_ExecuteScheduledQueryRequest(input, context));
58
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
41
  };
60
42
  export const se_ListScheduledQueriesCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.0",
63
- "x-amz-target": "Timestream_20181101.ListScheduledQueries",
64
- };
43
+ const headers = sharedHeaders("ListScheduledQueries");
65
44
  let body;
66
45
  body = JSON.stringify(se_ListScheduledQueriesRequest(input, context));
67
46
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
47
  };
69
48
  export const se_ListTagsForResourceCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.0",
72
- "x-amz-target": "Timestream_20181101.ListTagsForResource",
73
- };
49
+ const headers = sharedHeaders("ListTagsForResource");
74
50
  let body;
75
51
  body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
76
52
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
53
  };
78
54
  export const se_PrepareQueryCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.0",
81
- "x-amz-target": "Timestream_20181101.PrepareQuery",
82
- };
55
+ const headers = sharedHeaders("PrepareQuery");
83
56
  let body;
84
57
  body = JSON.stringify(se_PrepareQueryRequest(input, context));
85
58
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
59
  };
87
60
  export const se_QueryCommand = async (input, context) => {
88
- const headers = {
89
- "content-type": "application/x-amz-json-1.0",
90
- "x-amz-target": "Timestream_20181101.Query",
91
- };
61
+ const headers = sharedHeaders("Query");
92
62
  let body;
93
63
  body = JSON.stringify(se_QueryRequest(input, context));
94
64
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
65
  };
96
66
  export const se_TagResourceCommand = async (input, context) => {
97
- const headers = {
98
- "content-type": "application/x-amz-json-1.0",
99
- "x-amz-target": "Timestream_20181101.TagResource",
100
- };
67
+ const headers = sharedHeaders("TagResource");
101
68
  let body;
102
69
  body = JSON.stringify(se_TagResourceRequest(input, context));
103
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
71
  };
105
72
  export const se_UntagResourceCommand = async (input, context) => {
106
- const headers = {
107
- "content-type": "application/x-amz-json-1.0",
108
- "x-amz-target": "Timestream_20181101.UntagResource",
109
- };
73
+ const headers = sharedHeaders("UntagResource");
110
74
  let body;
111
75
  body = JSON.stringify(se_UntagResourceRequest(input, context));
112
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
77
  };
114
78
  export const se_UpdateScheduledQueryCommand = async (input, context) => {
115
- const headers = {
116
- "content-type": "application/x-amz-json-1.0",
117
- "x-amz-target": "Timestream_20181101.UpdateScheduledQuery",
118
- };
79
+ const headers = sharedHeaders("UpdateScheduledQuery");
119
80
  let body;
120
81
  body = JSON.stringify(se_UpdateScheduledQueryRequest(input, context));
121
82
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -1533,6 +1494,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1533
1494
  }
1534
1495
  return new __HttpRequest(contents);
1535
1496
  };
1497
+ function sharedHeaders(operation) {
1498
+ return {
1499
+ "content-type": "application/x-amz-json-1.0",
1500
+ "x-amz-target": `Timestream_20181101.${operation}`,
1501
+ };
1502
+ }
1536
1503
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1537
1504
  if (encoded.length) {
1538
1505
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-timestream-query",
3
3
  "description": "AWS SDK for JavaScript Timestream Query Client for Node.js, Browser and React Native",
4
- "version": "3.310.0",
4
+ "version": "3.312.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,7 +21,7 @@
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.310.0",
24
+ "@aws-sdk/client-sts": "3.312.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
26
  "@aws-sdk/credential-provider-node": "3.310.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",