@aws-sdk/client-cognito-sync 3.474.0 → 3.477.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,368 +1,233 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateRecordsCommand = exports.de_UnsubscribeFromDatasetCommand = exports.de_SubscribeToDatasetCommand = exports.de_SetIdentityPoolConfigurationCommand = exports.de_SetCognitoEventsCommand = exports.de_RegisterDeviceCommand = exports.de_ListRecordsCommand = exports.de_ListIdentityPoolUsageCommand = exports.de_ListDatasetsCommand = exports.de_GetIdentityPoolConfigurationCommand = exports.de_GetCognitoEventsCommand = exports.de_GetBulkPublishDetailsCommand = exports.de_DescribeIdentityUsageCommand = exports.de_DescribeIdentityPoolUsageCommand = exports.de_DescribeDatasetCommand = exports.de_DeleteDatasetCommand = exports.de_BulkPublishCommand = exports.se_UpdateRecordsCommand = exports.se_UnsubscribeFromDatasetCommand = exports.se_SubscribeToDatasetCommand = exports.se_SetIdentityPoolConfigurationCommand = exports.se_SetCognitoEventsCommand = exports.se_RegisterDeviceCommand = exports.se_ListRecordsCommand = exports.se_ListIdentityPoolUsageCommand = exports.se_ListDatasetsCommand = exports.se_GetIdentityPoolConfigurationCommand = exports.se_GetCognitoEventsCommand = exports.se_GetBulkPublishDetailsCommand = exports.se_DescribeIdentityUsageCommand = exports.se_DescribeIdentityPoolUsageCommand = exports.se_DescribeDatasetCommand = exports.se_DeleteDatasetCommand = exports.se_BulkPublishCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const CognitoSyncServiceException_1 = require("../models/CognitoSyncServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_BulkPublishCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {};
11
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
12
- "/identitypools/{IdentityPoolId}/bulkpublish";
13
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
11
+ b.bp("/identitypools/{IdentityPoolId}/bulkpublish");
12
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
14
13
  let body;
15
- return new protocol_http_1.HttpRequest({
16
- protocol,
17
- hostname,
18
- port,
19
- method: "POST",
20
- headers,
21
- path: resolvedPath,
22
- body,
23
- });
14
+ b.m("POST").h(headers).b(body);
15
+ return b.build();
24
16
  };
25
17
  exports.se_BulkPublishCommand = se_BulkPublishCommand;
26
18
  const se_DeleteDatasetCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
19
+ const b = (0, core_1.requestBuilder)(input, context);
28
20
  const headers = {};
29
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
30
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
31
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
32
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
33
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
21
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}");
22
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
23
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
24
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
34
25
  let body;
35
- return new protocol_http_1.HttpRequest({
36
- protocol,
37
- hostname,
38
- port,
39
- method: "DELETE",
40
- headers,
41
- path: resolvedPath,
42
- body,
43
- });
26
+ b.m("DELETE").h(headers).b(body);
27
+ return b.build();
44
28
  };
45
29
  exports.se_DeleteDatasetCommand = se_DeleteDatasetCommand;
46
30
  const se_DescribeDatasetCommand = async (input, context) => {
47
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
31
+ const b = (0, core_1.requestBuilder)(input, context);
48
32
  const headers = {};
49
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
50
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
51
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
52
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
53
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
33
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}");
34
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
35
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
36
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
54
37
  let body;
55
- return new protocol_http_1.HttpRequest({
56
- protocol,
57
- hostname,
58
- port,
59
- method: "GET",
60
- headers,
61
- path: resolvedPath,
62
- body,
63
- });
38
+ b.m("GET").h(headers).b(body);
39
+ return b.build();
64
40
  };
65
41
  exports.se_DescribeDatasetCommand = se_DescribeDatasetCommand;
66
42
  const se_DescribeIdentityPoolUsageCommand = async (input, context) => {
67
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
43
+ const b = (0, core_1.requestBuilder)(input, context);
68
44
  const headers = {};
69
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}";
70
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
45
+ b.bp("/identitypools/{IdentityPoolId}");
46
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
71
47
  let body;
72
- return new protocol_http_1.HttpRequest({
73
- protocol,
74
- hostname,
75
- port,
76
- method: "GET",
77
- headers,
78
- path: resolvedPath,
79
- body,
80
- });
48
+ b.m("GET").h(headers).b(body);
49
+ return b.build();
81
50
  };
82
51
  exports.se_DescribeIdentityPoolUsageCommand = se_DescribeIdentityPoolUsageCommand;
83
52
  const se_DescribeIdentityUsageCommand = async (input, context) => {
84
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
53
+ const b = (0, core_1.requestBuilder)(input, context);
85
54
  const headers = {};
86
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
87
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}";
88
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
89
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
55
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}");
56
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
57
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
90
58
  let body;
91
- return new protocol_http_1.HttpRequest({
92
- protocol,
93
- hostname,
94
- port,
95
- method: "GET",
96
- headers,
97
- path: resolvedPath,
98
- body,
99
- });
59
+ b.m("GET").h(headers).b(body);
60
+ return b.build();
100
61
  };
101
62
  exports.se_DescribeIdentityUsageCommand = se_DescribeIdentityUsageCommand;
102
63
  const se_GetBulkPublishDetailsCommand = async (input, context) => {
103
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
64
+ const b = (0, core_1.requestBuilder)(input, context);
104
65
  const headers = {};
105
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
106
- "/identitypools/{IdentityPoolId}/getBulkPublishDetails";
107
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
66
+ b.bp("/identitypools/{IdentityPoolId}/getBulkPublishDetails");
67
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
108
68
  let body;
109
- return new protocol_http_1.HttpRequest({
110
- protocol,
111
- hostname,
112
- port,
113
- method: "POST",
114
- headers,
115
- path: resolvedPath,
116
- body,
117
- });
69
+ b.m("POST").h(headers).b(body);
70
+ return b.build();
118
71
  };
119
72
  exports.se_GetBulkPublishDetailsCommand = se_GetBulkPublishDetailsCommand;
120
73
  const se_GetCognitoEventsCommand = async (input, context) => {
121
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
74
+ const b = (0, core_1.requestBuilder)(input, context);
122
75
  const headers = {};
123
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}/events";
124
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
76
+ b.bp("/identitypools/{IdentityPoolId}/events");
77
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
125
78
  let body;
126
- return new protocol_http_1.HttpRequest({
127
- protocol,
128
- hostname,
129
- port,
130
- method: "GET",
131
- headers,
132
- path: resolvedPath,
133
- body,
134
- });
79
+ b.m("GET").h(headers).b(body);
80
+ return b.build();
135
81
  };
136
82
  exports.se_GetCognitoEventsCommand = se_GetCognitoEventsCommand;
137
83
  const se_GetIdentityPoolConfigurationCommand = async (input, context) => {
138
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
+ const b = (0, core_1.requestBuilder)(input, context);
139
85
  const headers = {};
140
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
141
- "/identitypools/{IdentityPoolId}/configuration";
142
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
86
+ b.bp("/identitypools/{IdentityPoolId}/configuration");
87
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
143
88
  let body;
144
- return new protocol_http_1.HttpRequest({
145
- protocol,
146
- hostname,
147
- port,
148
- method: "GET",
149
- headers,
150
- path: resolvedPath,
151
- body,
152
- });
89
+ b.m("GET").h(headers).b(body);
90
+ return b.build();
153
91
  };
154
92
  exports.se_GetIdentityPoolConfigurationCommand = se_GetIdentityPoolConfigurationCommand;
155
93
  const se_ListDatasetsCommand = async (input, context) => {
156
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
94
+ const b = (0, core_1.requestBuilder)(input, context);
157
95
  const headers = {};
158
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
159
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets";
160
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
161
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
96
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets");
97
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
98
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
162
99
  const query = (0, smithy_client_1.map)({
163
- nextToken: [, input.NextToken],
164
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
100
+ [_nT]: [, input[_NT]],
101
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
165
102
  });
166
103
  let body;
167
- return new protocol_http_1.HttpRequest({
168
- protocol,
169
- hostname,
170
- port,
171
- method: "GET",
172
- headers,
173
- path: resolvedPath,
174
- query,
175
- body,
176
- });
104
+ b.m("GET").h(headers).q(query).b(body);
105
+ return b.build();
177
106
  };
178
107
  exports.se_ListDatasetsCommand = se_ListDatasetsCommand;
179
108
  const se_ListIdentityPoolUsageCommand = async (input, context) => {
180
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
+ const b = (0, core_1.requestBuilder)(input, context);
181
110
  const headers = {};
182
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools";
111
+ b.bp("/identitypools");
183
112
  const query = (0, smithy_client_1.map)({
184
- nextToken: [, input.NextToken],
185
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
113
+ [_nT]: [, input[_NT]],
114
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
186
115
  });
187
116
  let body;
188
- return new protocol_http_1.HttpRequest({
189
- protocol,
190
- hostname,
191
- port,
192
- method: "GET",
193
- headers,
194
- path: resolvedPath,
195
- query,
196
- body,
197
- });
117
+ b.m("GET").h(headers).q(query).b(body);
118
+ return b.build();
198
119
  };
199
120
  exports.se_ListIdentityPoolUsageCommand = se_ListIdentityPoolUsageCommand;
200
121
  const se_ListRecordsCommand = async (input, context) => {
201
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
122
+ const b = (0, core_1.requestBuilder)(input, context);
202
123
  const headers = {};
203
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
204
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records";
205
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
206
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
207
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
124
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records");
125
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
126
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
127
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
208
128
  const query = (0, smithy_client_1.map)({
209
- lastSyncCount: [() => input.LastSyncCount !== void 0, () => input.LastSyncCount.toString()],
210
- nextToken: [, input.NextToken],
211
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
212
- syncSessionToken: [, input.SyncSessionToken],
129
+ [_lSC]: [() => input.LastSyncCount !== void 0, () => input[_LSC].toString()],
130
+ [_nT]: [, input[_NT]],
131
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
132
+ [_sST]: [, input[_SST]],
213
133
  });
214
134
  let body;
215
- return new protocol_http_1.HttpRequest({
216
- protocol,
217
- hostname,
218
- port,
219
- method: "GET",
220
- headers,
221
- path: resolvedPath,
222
- query,
223
- body,
224
- });
135
+ b.m("GET").h(headers).q(query).b(body);
136
+ return b.build();
225
137
  };
226
138
  exports.se_ListRecordsCommand = se_ListRecordsCommand;
227
139
  const se_RegisterDeviceCommand = async (input, context) => {
228
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
140
+ const b = (0, core_1.requestBuilder)(input, context);
229
141
  const headers = {
230
142
  "content-type": "application/json",
231
143
  };
232
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
233
- "/identitypools/{IdentityPoolId}/identity/{IdentityId}/device";
234
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
235
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
144
+ b.bp("/identitypools/{IdentityPoolId}/identity/{IdentityId}/device");
145
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
146
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
236
147
  let body;
237
148
  body = JSON.stringify((0, smithy_client_1.take)(input, {
238
149
  Platform: [],
239
150
  Token: [],
240
151
  }));
241
- return new protocol_http_1.HttpRequest({
242
- protocol,
243
- hostname,
244
- port,
245
- method: "POST",
246
- headers,
247
- path: resolvedPath,
248
- body,
249
- });
152
+ b.m("POST").h(headers).b(body);
153
+ return b.build();
250
154
  };
251
155
  exports.se_RegisterDeviceCommand = se_RegisterDeviceCommand;
252
156
  const se_SetCognitoEventsCommand = async (input, context) => {
253
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const b = (0, core_1.requestBuilder)(input, context);
254
158
  const headers = {
255
159
  "content-type": "application/json",
256
160
  };
257
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}/events";
258
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
161
+ b.bp("/identitypools/{IdentityPoolId}/events");
162
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
259
163
  let body;
260
164
  body = JSON.stringify((0, smithy_client_1.take)(input, {
261
165
  Events: (_) => (0, smithy_client_1._json)(_),
262
166
  }));
263
- return new protocol_http_1.HttpRequest({
264
- protocol,
265
- hostname,
266
- port,
267
- method: "POST",
268
- headers,
269
- path: resolvedPath,
270
- body,
271
- });
167
+ b.m("POST").h(headers).b(body);
168
+ return b.build();
272
169
  };
273
170
  exports.se_SetCognitoEventsCommand = se_SetCognitoEventsCommand;
274
171
  const se_SetIdentityPoolConfigurationCommand = async (input, context) => {
275
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
172
+ const b = (0, core_1.requestBuilder)(input, context);
276
173
  const headers = {
277
174
  "content-type": "application/json",
278
175
  };
279
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
280
- "/identitypools/{IdentityPoolId}/configuration";
281
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
176
+ b.bp("/identitypools/{IdentityPoolId}/configuration");
177
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
282
178
  let body;
283
179
  body = JSON.stringify((0, smithy_client_1.take)(input, {
284
180
  CognitoStreams: (_) => (0, smithy_client_1._json)(_),
285
181
  PushSync: (_) => (0, smithy_client_1._json)(_),
286
182
  }));
287
- return new protocol_http_1.HttpRequest({
288
- protocol,
289
- hostname,
290
- port,
291
- method: "POST",
292
- headers,
293
- path: resolvedPath,
294
- body,
295
- });
183
+ b.m("POST").h(headers).b(body);
184
+ return b.build();
296
185
  };
297
186
  exports.se_SetIdentityPoolConfigurationCommand = se_SetIdentityPoolConfigurationCommand;
298
187
  const se_SubscribeToDatasetCommand = async (input, context) => {
299
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
188
+ const b = (0, core_1.requestBuilder)(input, context);
300
189
  const headers = {};
301
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
302
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}";
303
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
304
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
305
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
306
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DeviceId", () => input.DeviceId, "{DeviceId}", false);
190
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}");
191
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
192
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
193
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
194
+ b.p("DeviceId", () => input.DeviceId, "{DeviceId}", false);
307
195
  let body;
308
- return new protocol_http_1.HttpRequest({
309
- protocol,
310
- hostname,
311
- port,
312
- method: "POST",
313
- headers,
314
- path: resolvedPath,
315
- body,
316
- });
196
+ b.m("POST").h(headers).b(body);
197
+ return b.build();
317
198
  };
318
199
  exports.se_SubscribeToDatasetCommand = se_SubscribeToDatasetCommand;
319
200
  const se_UnsubscribeFromDatasetCommand = async (input, context) => {
320
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
201
+ const b = (0, core_1.requestBuilder)(input, context);
321
202
  const headers = {};
322
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
323
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}";
324
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
325
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
326
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
327
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DeviceId", () => input.DeviceId, "{DeviceId}", false);
203
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}");
204
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
205
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
206
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
207
+ b.p("DeviceId", () => input.DeviceId, "{DeviceId}", false);
328
208
  let body;
329
- return new protocol_http_1.HttpRequest({
330
- protocol,
331
- hostname,
332
- port,
333
- method: "DELETE",
334
- headers,
335
- path: resolvedPath,
336
- body,
337
- });
209
+ b.m("DELETE").h(headers).b(body);
210
+ return b.build();
338
211
  };
339
212
  exports.se_UnsubscribeFromDatasetCommand = se_UnsubscribeFromDatasetCommand;
340
213
  const se_UpdateRecordsCommand = async (input, context) => {
341
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
214
+ const b = (0, core_1.requestBuilder)(input, context);
342
215
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
343
216
  "content-type": "application/json",
344
- "x-amz-client-context": input.ClientContext,
217
+ [_xacc]: input[_CC],
345
218
  });
346
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
347
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
348
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
349
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
350
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
219
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}");
220
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
221
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
222
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
351
223
  let body;
352
224
  body = JSON.stringify((0, smithy_client_1.take)(input, {
353
225
  DeviceId: [],
354
226
  RecordPatches: (_) => se_RecordPatchList(_, context),
355
227
  SyncSessionToken: [],
356
228
  }));
357
- return new protocol_http_1.HttpRequest({
358
- protocol,
359
- hostname,
360
- port,
361
- method: "POST",
362
- headers,
363
- path: resolvedPath,
364
- body,
365
- });
229
+ b.m("POST").h(headers).b(body);
230
+ return b.build();
366
231
  };
367
232
  exports.se_UpdateRecordsCommand = se_UpdateRecordsCommand;
368
233
  const de_BulkPublishCommand = async (output, context) => {
@@ -1434,6 +1299,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1434
1299
  value !== "" &&
1435
1300
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1436
1301
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1302
+ const _CC = "ClientContext";
1303
+ const _LSC = "LastSyncCount";
1304
+ const _MR = "MaxResults";
1305
+ const _NT = "NextToken";
1306
+ const _SST = "SyncSessionToken";
1307
+ const _lSC = "lastSyncCount";
1308
+ const _mR = "maxResults";
1309
+ const _nT = "nextToken";
1310
+ const _sST = "syncSessionToken";
1311
+ const _xacc = "x-amz-client-context";
1437
1312
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1438
1313
  if (encoded.length) {
1439
1314
  return JSON.parse(encoded);
@@ -1,349 +1,214 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { CognitoSyncServiceException as __BaseException } from "../models/CognitoSyncServiceException";
4
4
  import { AlreadyStreamedException, ConcurrentModificationException, DuplicateRequestException, InternalErrorException, InvalidConfigurationException, InvalidLambdaFunctionOutputException, InvalidParameterException, LambdaThrottledException, LimitExceededException, NotAuthorizedException, ResourceConflictException, ResourceNotFoundException, TooManyRequestsException, } from "../models/models_0";
5
5
  export const se_BulkPublishCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {};
8
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
9
- "/identitypools/{IdentityPoolId}/bulkpublish";
10
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
8
+ b.bp("/identitypools/{IdentityPoolId}/bulkpublish");
9
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
11
10
  let body;
12
- return new __HttpRequest({
13
- protocol,
14
- hostname,
15
- port,
16
- method: "POST",
17
- headers,
18
- path: resolvedPath,
19
- body,
20
- });
11
+ b.m("POST").h(headers).b(body);
12
+ return b.build();
21
13
  };
22
14
  export const se_DeleteDatasetCommand = async (input, context) => {
23
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
15
+ const b = rb(input, context);
24
16
  const headers = {};
25
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
26
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
27
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
28
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
29
- resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
17
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}");
18
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
19
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
20
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
30
21
  let body;
31
- return new __HttpRequest({
32
- protocol,
33
- hostname,
34
- port,
35
- method: "DELETE",
36
- headers,
37
- path: resolvedPath,
38
- body,
39
- });
22
+ b.m("DELETE").h(headers).b(body);
23
+ return b.build();
40
24
  };
41
25
  export const se_DescribeDatasetCommand = async (input, context) => {
42
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
26
+ const b = rb(input, context);
43
27
  const headers = {};
44
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
45
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
46
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
47
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
48
- resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
28
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}");
29
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
30
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
31
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
49
32
  let body;
50
- return new __HttpRequest({
51
- protocol,
52
- hostname,
53
- port,
54
- method: "GET",
55
- headers,
56
- path: resolvedPath,
57
- body,
58
- });
33
+ b.m("GET").h(headers).b(body);
34
+ return b.build();
59
35
  };
60
36
  export const se_DescribeIdentityPoolUsageCommand = async (input, context) => {
61
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const b = rb(input, context);
62
38
  const headers = {};
63
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}";
64
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
39
+ b.bp("/identitypools/{IdentityPoolId}");
40
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
65
41
  let body;
66
- return new __HttpRequest({
67
- protocol,
68
- hostname,
69
- port,
70
- method: "GET",
71
- headers,
72
- path: resolvedPath,
73
- body,
74
- });
42
+ b.m("GET").h(headers).b(body);
43
+ return b.build();
75
44
  };
76
45
  export const se_DescribeIdentityUsageCommand = async (input, context) => {
77
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
46
+ const b = rb(input, context);
78
47
  const headers = {};
79
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
80
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}";
81
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
82
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
48
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}");
49
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
50
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
83
51
  let body;
84
- return new __HttpRequest({
85
- protocol,
86
- hostname,
87
- port,
88
- method: "GET",
89
- headers,
90
- path: resolvedPath,
91
- body,
92
- });
52
+ b.m("GET").h(headers).b(body);
53
+ return b.build();
93
54
  };
94
55
  export const se_GetBulkPublishDetailsCommand = async (input, context) => {
95
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
+ const b = rb(input, context);
96
57
  const headers = {};
97
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
98
- "/identitypools/{IdentityPoolId}/getBulkPublishDetails";
99
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
58
+ b.bp("/identitypools/{IdentityPoolId}/getBulkPublishDetails");
59
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
100
60
  let body;
101
- return new __HttpRequest({
102
- protocol,
103
- hostname,
104
- port,
105
- method: "POST",
106
- headers,
107
- path: resolvedPath,
108
- body,
109
- });
61
+ b.m("POST").h(headers).b(body);
62
+ return b.build();
110
63
  };
111
64
  export const se_GetCognitoEventsCommand = async (input, context) => {
112
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
65
+ const b = rb(input, context);
113
66
  const headers = {};
114
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}/events";
115
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
67
+ b.bp("/identitypools/{IdentityPoolId}/events");
68
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
116
69
  let body;
117
- return new __HttpRequest({
118
- protocol,
119
- hostname,
120
- port,
121
- method: "GET",
122
- headers,
123
- path: resolvedPath,
124
- body,
125
- });
70
+ b.m("GET").h(headers).b(body);
71
+ return b.build();
126
72
  };
127
73
  export const se_GetIdentityPoolConfigurationCommand = async (input, context) => {
128
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
74
+ const b = rb(input, context);
129
75
  const headers = {};
130
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
131
- "/identitypools/{IdentityPoolId}/configuration";
132
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
76
+ b.bp("/identitypools/{IdentityPoolId}/configuration");
77
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
133
78
  let body;
134
- return new __HttpRequest({
135
- protocol,
136
- hostname,
137
- port,
138
- method: "GET",
139
- headers,
140
- path: resolvedPath,
141
- body,
142
- });
79
+ b.m("GET").h(headers).b(body);
80
+ return b.build();
143
81
  };
144
82
  export const se_ListDatasetsCommand = async (input, context) => {
145
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
83
+ const b = rb(input, context);
146
84
  const headers = {};
147
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
148
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets";
149
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
150
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
85
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets");
86
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
87
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
151
88
  const query = map({
152
- nextToken: [, input.NextToken],
153
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
89
+ [_nT]: [, input[_NT]],
90
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
154
91
  });
155
92
  let body;
156
- return new __HttpRequest({
157
- protocol,
158
- hostname,
159
- port,
160
- method: "GET",
161
- headers,
162
- path: resolvedPath,
163
- query,
164
- body,
165
- });
93
+ b.m("GET").h(headers).q(query).b(body);
94
+ return b.build();
166
95
  };
167
96
  export const se_ListIdentityPoolUsageCommand = async (input, context) => {
168
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
97
+ const b = rb(input, context);
169
98
  const headers = {};
170
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools";
99
+ b.bp("/identitypools");
171
100
  const query = map({
172
- nextToken: [, input.NextToken],
173
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
101
+ [_nT]: [, input[_NT]],
102
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
174
103
  });
175
104
  let body;
176
- return new __HttpRequest({
177
- protocol,
178
- hostname,
179
- port,
180
- method: "GET",
181
- headers,
182
- path: resolvedPath,
183
- query,
184
- body,
185
- });
105
+ b.m("GET").h(headers).q(query).b(body);
106
+ return b.build();
186
107
  };
187
108
  export const se_ListRecordsCommand = async (input, context) => {
188
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
+ const b = rb(input, context);
189
110
  const headers = {};
190
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
191
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records";
192
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
193
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
194
- resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
111
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records");
112
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
113
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
114
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
195
115
  const query = map({
196
- lastSyncCount: [() => input.LastSyncCount !== void 0, () => input.LastSyncCount.toString()],
197
- nextToken: [, input.NextToken],
198
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
199
- syncSessionToken: [, input.SyncSessionToken],
116
+ [_lSC]: [() => input.LastSyncCount !== void 0, () => input[_LSC].toString()],
117
+ [_nT]: [, input[_NT]],
118
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
119
+ [_sST]: [, input[_SST]],
200
120
  });
201
121
  let body;
202
- return new __HttpRequest({
203
- protocol,
204
- hostname,
205
- port,
206
- method: "GET",
207
- headers,
208
- path: resolvedPath,
209
- query,
210
- body,
211
- });
122
+ b.m("GET").h(headers).q(query).b(body);
123
+ return b.build();
212
124
  };
213
125
  export const se_RegisterDeviceCommand = async (input, context) => {
214
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
126
+ const b = rb(input, context);
215
127
  const headers = {
216
128
  "content-type": "application/json",
217
129
  };
218
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
219
- "/identitypools/{IdentityPoolId}/identity/{IdentityId}/device";
220
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
221
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
130
+ b.bp("/identitypools/{IdentityPoolId}/identity/{IdentityId}/device");
131
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
132
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
222
133
  let body;
223
134
  body = JSON.stringify(take(input, {
224
135
  Platform: [],
225
136
  Token: [],
226
137
  }));
227
- return new __HttpRequest({
228
- protocol,
229
- hostname,
230
- port,
231
- method: "POST",
232
- headers,
233
- path: resolvedPath,
234
- body,
235
- });
138
+ b.m("POST").h(headers).b(body);
139
+ return b.build();
236
140
  };
237
141
  export const se_SetCognitoEventsCommand = async (input, context) => {
238
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
142
+ const b = rb(input, context);
239
143
  const headers = {
240
144
  "content-type": "application/json",
241
145
  };
242
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identitypools/{IdentityPoolId}/events";
243
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
146
+ b.bp("/identitypools/{IdentityPoolId}/events");
147
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
244
148
  let body;
245
149
  body = JSON.stringify(take(input, {
246
150
  Events: (_) => _json(_),
247
151
  }));
248
- return new __HttpRequest({
249
- protocol,
250
- hostname,
251
- port,
252
- method: "POST",
253
- headers,
254
- path: resolvedPath,
255
- body,
256
- });
152
+ b.m("POST").h(headers).b(body);
153
+ return b.build();
257
154
  };
258
155
  export const se_SetIdentityPoolConfigurationCommand = async (input, context) => {
259
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
156
+ const b = rb(input, context);
260
157
  const headers = {
261
158
  "content-type": "application/json",
262
159
  };
263
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
264
- "/identitypools/{IdentityPoolId}/configuration";
265
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
160
+ b.bp("/identitypools/{IdentityPoolId}/configuration");
161
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
266
162
  let body;
267
163
  body = JSON.stringify(take(input, {
268
164
  CognitoStreams: (_) => _json(_),
269
165
  PushSync: (_) => _json(_),
270
166
  }));
271
- return new __HttpRequest({
272
- protocol,
273
- hostname,
274
- port,
275
- method: "POST",
276
- headers,
277
- path: resolvedPath,
278
- body,
279
- });
167
+ b.m("POST").h(headers).b(body);
168
+ return b.build();
280
169
  };
281
170
  export const se_SubscribeToDatasetCommand = async (input, context) => {
282
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
171
+ const b = rb(input, context);
283
172
  const headers = {};
284
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
285
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}";
286
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
287
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
288
- resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
289
- resolvedPath = __resolvedPath(resolvedPath, input, "DeviceId", () => input.DeviceId, "{DeviceId}", false);
173
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}");
174
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
175
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
176
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
177
+ b.p("DeviceId", () => input.DeviceId, "{DeviceId}", false);
290
178
  let body;
291
- return new __HttpRequest({
292
- protocol,
293
- hostname,
294
- port,
295
- method: "POST",
296
- headers,
297
- path: resolvedPath,
298
- body,
299
- });
179
+ b.m("POST").h(headers).b(body);
180
+ return b.build();
300
181
  };
301
182
  export const se_UnsubscribeFromDatasetCommand = async (input, context) => {
302
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = rb(input, context);
303
184
  const headers = {};
304
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
305
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}";
306
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
307
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
308
- resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
309
- resolvedPath = __resolvedPath(resolvedPath, input, "DeviceId", () => input.DeviceId, "{DeviceId}", false);
185
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}");
186
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
187
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
188
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
189
+ b.p("DeviceId", () => input.DeviceId, "{DeviceId}", false);
310
190
  let body;
311
- return new __HttpRequest({
312
- protocol,
313
- hostname,
314
- port,
315
- method: "DELETE",
316
- headers,
317
- path: resolvedPath,
318
- body,
319
- });
191
+ b.m("DELETE").h(headers).b(body);
192
+ return b.build();
320
193
  };
321
194
  export const se_UpdateRecordsCommand = async (input, context) => {
322
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
195
+ const b = rb(input, context);
323
196
  const headers = map({}, isSerializableHeaderValue, {
324
197
  "content-type": "application/json",
325
- "x-amz-client-context": input.ClientContext,
198
+ [_xacc]: input[_CC],
326
199
  });
327
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
328
- "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}";
329
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
330
- resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", () => input.IdentityId, "{IdentityId}", false);
331
- resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", () => input.DatasetName, "{DatasetName}", false);
200
+ b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}");
201
+ b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
202
+ b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
203
+ b.p("DatasetName", () => input.DatasetName, "{DatasetName}", false);
332
204
  let body;
333
205
  body = JSON.stringify(take(input, {
334
206
  DeviceId: [],
335
207
  RecordPatches: (_) => se_RecordPatchList(_, context),
336
208
  SyncSessionToken: [],
337
209
  }));
338
- return new __HttpRequest({
339
- protocol,
340
- hostname,
341
- port,
342
- method: "POST",
343
- headers,
344
- path: resolvedPath,
345
- body,
346
- });
210
+ b.m("POST").h(headers).b(body);
211
+ return b.build();
347
212
  };
348
213
  export const de_BulkPublishCommand = async (output, context) => {
349
214
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1397,6 +1262,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1397
1262
  value !== "" &&
1398
1263
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1399
1264
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1265
+ const _CC = "ClientContext";
1266
+ const _LSC = "LastSyncCount";
1267
+ const _MR = "MaxResults";
1268
+ const _NT = "NextToken";
1269
+ const _SST = "SyncSessionToken";
1270
+ const _lSC = "lastSyncCount";
1271
+ const _mR = "maxResults";
1272
+ const _nT = "nextToken";
1273
+ const _sST = "syncSessionToken";
1274
+ const _xacc = "x-amz-client-context";
1400
1275
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1401
1276
  if (encoded.length) {
1402
1277
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-cognito-sync",
3
3
  "description": "AWS SDK for JavaScript Cognito Sync Client for Node.js, Browser and React Native",
4
- "version": "3.474.0",
4
+ "version": "3.477.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",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.474.0",
24
- "@aws-sdk/core": "3.474.0",
25
- "@aws-sdk/credential-provider-node": "3.474.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",