@aws-sdk/client-cognito-sync 3.490.0 → 3.496.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.
- package/dist-cjs/CognitoSync.js +1 -45
- package/dist-cjs/CognitoSyncClient.js +1 -43
- package/dist-cjs/commands/BulkPublishCommand.js +1 -28
- package/dist-cjs/commands/DeleteDatasetCommand.js +1 -28
- package/dist-cjs/commands/DescribeDatasetCommand.js +1 -28
- package/dist-cjs/commands/DescribeIdentityPoolUsageCommand.js +1 -28
- package/dist-cjs/commands/DescribeIdentityUsageCommand.js +1 -28
- package/dist-cjs/commands/GetBulkPublishDetailsCommand.js +1 -28
- package/dist-cjs/commands/GetCognitoEventsCommand.js +1 -28
- package/dist-cjs/commands/GetIdentityPoolConfigurationCommand.js +1 -28
- package/dist-cjs/commands/ListDatasetsCommand.js +1 -28
- package/dist-cjs/commands/ListIdentityPoolUsageCommand.js +1 -28
- package/dist-cjs/commands/ListRecordsCommand.js +1 -28
- package/dist-cjs/commands/RegisterDeviceCommand.js +1 -28
- package/dist-cjs/commands/SetCognitoEventsCommand.js +1 -28
- package/dist-cjs/commands/SetIdentityPoolConfigurationCommand.js +1 -28
- package/dist-cjs/commands/SubscribeToDatasetCommand.js +1 -28
- package/dist-cjs/commands/UnsubscribeFromDatasetCommand.js +1 -28
- package/dist-cjs/commands/UpdateRecordsCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -20
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2082 -10
- package/dist-cjs/models/CognitoSyncServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -193
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1351
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1351 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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 core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const CognitoSyncServiceException_1 = require("../models/CognitoSyncServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_BulkPublishCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {};
|
|
11
|
-
b.bp("/identitypools/{IdentityPoolId}/bulkpublish");
|
|
12
|
-
b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
|
|
13
|
-
let body;
|
|
14
|
-
b.m("POST").h(headers).b(body);
|
|
15
|
-
return b.build();
|
|
16
|
-
};
|
|
17
|
-
exports.se_BulkPublishCommand = se_BulkPublishCommand;
|
|
18
|
-
const se_DeleteDatasetCommand = async (input, context) => {
|
|
19
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
20
|
-
const headers = {};
|
|
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);
|
|
25
|
-
let body;
|
|
26
|
-
b.m("DELETE").h(headers).b(body);
|
|
27
|
-
return b.build();
|
|
28
|
-
};
|
|
29
|
-
exports.se_DeleteDatasetCommand = se_DeleteDatasetCommand;
|
|
30
|
-
const se_DescribeDatasetCommand = async (input, context) => {
|
|
31
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
32
|
-
const headers = {};
|
|
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);
|
|
37
|
-
let body;
|
|
38
|
-
b.m("GET").h(headers).b(body);
|
|
39
|
-
return b.build();
|
|
40
|
-
};
|
|
41
|
-
exports.se_DescribeDatasetCommand = se_DescribeDatasetCommand;
|
|
42
|
-
const se_DescribeIdentityPoolUsageCommand = async (input, context) => {
|
|
43
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
44
|
-
const headers = {};
|
|
45
|
-
b.bp("/identitypools/{IdentityPoolId}");
|
|
46
|
-
b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
|
|
47
|
-
let body;
|
|
48
|
-
b.m("GET").h(headers).b(body);
|
|
49
|
-
return b.build();
|
|
50
|
-
};
|
|
51
|
-
exports.se_DescribeIdentityPoolUsageCommand = se_DescribeIdentityPoolUsageCommand;
|
|
52
|
-
const se_DescribeIdentityUsageCommand = async (input, context) => {
|
|
53
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
54
|
-
const headers = {};
|
|
55
|
-
b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}");
|
|
56
|
-
b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
|
|
57
|
-
b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
|
|
58
|
-
let body;
|
|
59
|
-
b.m("GET").h(headers).b(body);
|
|
60
|
-
return b.build();
|
|
61
|
-
};
|
|
62
|
-
exports.se_DescribeIdentityUsageCommand = se_DescribeIdentityUsageCommand;
|
|
63
|
-
const se_GetBulkPublishDetailsCommand = async (input, context) => {
|
|
64
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
65
|
-
const headers = {};
|
|
66
|
-
b.bp("/identitypools/{IdentityPoolId}/getBulkPublishDetails");
|
|
67
|
-
b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
|
|
68
|
-
let body;
|
|
69
|
-
b.m("POST").h(headers).b(body);
|
|
70
|
-
return b.build();
|
|
71
|
-
};
|
|
72
|
-
exports.se_GetBulkPublishDetailsCommand = se_GetBulkPublishDetailsCommand;
|
|
73
|
-
const se_GetCognitoEventsCommand = async (input, context) => {
|
|
74
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
75
|
-
const headers = {};
|
|
76
|
-
b.bp("/identitypools/{IdentityPoolId}/events");
|
|
77
|
-
b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
|
|
78
|
-
let body;
|
|
79
|
-
b.m("GET").h(headers).b(body);
|
|
80
|
-
return b.build();
|
|
81
|
-
};
|
|
82
|
-
exports.se_GetCognitoEventsCommand = se_GetCognitoEventsCommand;
|
|
83
|
-
const se_GetIdentityPoolConfigurationCommand = async (input, context) => {
|
|
84
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
85
|
-
const headers = {};
|
|
86
|
-
b.bp("/identitypools/{IdentityPoolId}/configuration");
|
|
87
|
-
b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
|
|
88
|
-
let body;
|
|
89
|
-
b.m("GET").h(headers).b(body);
|
|
90
|
-
return b.build();
|
|
91
|
-
};
|
|
92
|
-
exports.se_GetIdentityPoolConfigurationCommand = se_GetIdentityPoolConfigurationCommand;
|
|
93
|
-
const se_ListDatasetsCommand = async (input, context) => {
|
|
94
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
95
|
-
const headers = {};
|
|
96
|
-
b.bp("/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets");
|
|
97
|
-
b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
|
|
98
|
-
b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
|
|
99
|
-
const query = (0, smithy_client_1.map)({
|
|
100
|
-
[_nT]: [, input[_NT]],
|
|
101
|
-
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
102
|
-
});
|
|
103
|
-
let body;
|
|
104
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
105
|
-
return b.build();
|
|
106
|
-
};
|
|
107
|
-
exports.se_ListDatasetsCommand = se_ListDatasetsCommand;
|
|
108
|
-
const se_ListIdentityPoolUsageCommand = async (input, context) => {
|
|
109
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
110
|
-
const headers = {};
|
|
111
|
-
b.bp("/identitypools");
|
|
112
|
-
const query = (0, smithy_client_1.map)({
|
|
113
|
-
[_nT]: [, input[_NT]],
|
|
114
|
-
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
115
|
-
});
|
|
116
|
-
let body;
|
|
117
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
118
|
-
return b.build();
|
|
119
|
-
};
|
|
120
|
-
exports.se_ListIdentityPoolUsageCommand = se_ListIdentityPoolUsageCommand;
|
|
121
|
-
const se_ListRecordsCommand = async (input, context) => {
|
|
122
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
123
|
-
const headers = {};
|
|
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);
|
|
128
|
-
const query = (0, smithy_client_1.map)({
|
|
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]],
|
|
133
|
-
});
|
|
134
|
-
let body;
|
|
135
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
136
|
-
return b.build();
|
|
137
|
-
};
|
|
138
|
-
exports.se_ListRecordsCommand = se_ListRecordsCommand;
|
|
139
|
-
const se_RegisterDeviceCommand = async (input, context) => {
|
|
140
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
141
|
-
const headers = {
|
|
142
|
-
"content-type": "application/json",
|
|
143
|
-
};
|
|
144
|
-
b.bp("/identitypools/{IdentityPoolId}/identity/{IdentityId}/device");
|
|
145
|
-
b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
|
|
146
|
-
b.p("IdentityId", () => input.IdentityId, "{IdentityId}", false);
|
|
147
|
-
let body;
|
|
148
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
149
|
-
Platform: [],
|
|
150
|
-
Token: [],
|
|
151
|
-
}));
|
|
152
|
-
b.m("POST").h(headers).b(body);
|
|
153
|
-
return b.build();
|
|
154
|
-
};
|
|
155
|
-
exports.se_RegisterDeviceCommand = se_RegisterDeviceCommand;
|
|
156
|
-
const se_SetCognitoEventsCommand = async (input, context) => {
|
|
157
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
158
|
-
const headers = {
|
|
159
|
-
"content-type": "application/json",
|
|
160
|
-
};
|
|
161
|
-
b.bp("/identitypools/{IdentityPoolId}/events");
|
|
162
|
-
b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
|
|
163
|
-
let body;
|
|
164
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
165
|
-
Events: (_) => (0, smithy_client_1._json)(_),
|
|
166
|
-
}));
|
|
167
|
-
b.m("POST").h(headers).b(body);
|
|
168
|
-
return b.build();
|
|
169
|
-
};
|
|
170
|
-
exports.se_SetCognitoEventsCommand = se_SetCognitoEventsCommand;
|
|
171
|
-
const se_SetIdentityPoolConfigurationCommand = async (input, context) => {
|
|
172
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
173
|
-
const headers = {
|
|
174
|
-
"content-type": "application/json",
|
|
175
|
-
};
|
|
176
|
-
b.bp("/identitypools/{IdentityPoolId}/configuration");
|
|
177
|
-
b.p("IdentityPoolId", () => input.IdentityPoolId, "{IdentityPoolId}", false);
|
|
178
|
-
let body;
|
|
179
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
180
|
-
CognitoStreams: (_) => (0, smithy_client_1._json)(_),
|
|
181
|
-
PushSync: (_) => (0, smithy_client_1._json)(_),
|
|
182
|
-
}));
|
|
183
|
-
b.m("POST").h(headers).b(body);
|
|
184
|
-
return b.build();
|
|
185
|
-
};
|
|
186
|
-
exports.se_SetIdentityPoolConfigurationCommand = se_SetIdentityPoolConfigurationCommand;
|
|
187
|
-
const se_SubscribeToDatasetCommand = async (input, context) => {
|
|
188
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
189
|
-
const headers = {};
|
|
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);
|
|
195
|
-
let body;
|
|
196
|
-
b.m("POST").h(headers).b(body);
|
|
197
|
-
return b.build();
|
|
198
|
-
};
|
|
199
|
-
exports.se_SubscribeToDatasetCommand = se_SubscribeToDatasetCommand;
|
|
200
|
-
const se_UnsubscribeFromDatasetCommand = async (input, context) => {
|
|
201
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
202
|
-
const headers = {};
|
|
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);
|
|
208
|
-
let body;
|
|
209
|
-
b.m("DELETE").h(headers).b(body);
|
|
210
|
-
return b.build();
|
|
211
|
-
};
|
|
212
|
-
exports.se_UnsubscribeFromDatasetCommand = se_UnsubscribeFromDatasetCommand;
|
|
213
|
-
const se_UpdateRecordsCommand = async (input, context) => {
|
|
214
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
215
|
-
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
216
|
-
"content-type": "application/json",
|
|
217
|
-
[_xacc]: input[_CC],
|
|
218
|
-
});
|
|
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);
|
|
223
|
-
let body;
|
|
224
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
225
|
-
DeviceId: [],
|
|
226
|
-
RecordPatches: (_) => se_RecordPatchList(_, context),
|
|
227
|
-
SyncSessionToken: [],
|
|
228
|
-
}));
|
|
229
|
-
b.m("POST").h(headers).b(body);
|
|
230
|
-
return b.build();
|
|
231
|
-
};
|
|
232
|
-
exports.se_UpdateRecordsCommand = se_UpdateRecordsCommand;
|
|
233
|
-
const de_BulkPublishCommand = async (output, context) => {
|
|
234
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
235
|
-
return de_BulkPublishCommandError(output, context);
|
|
236
|
-
}
|
|
237
|
-
const contents = (0, smithy_client_1.map)({
|
|
238
|
-
$metadata: deserializeMetadata(output),
|
|
239
|
-
});
|
|
240
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
241
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
242
|
-
IdentityPoolId: smithy_client_1.expectString,
|
|
243
|
-
});
|
|
244
|
-
Object.assign(contents, doc);
|
|
245
|
-
return contents;
|
|
246
|
-
};
|
|
247
|
-
exports.de_BulkPublishCommand = de_BulkPublishCommand;
|
|
248
|
-
const de_BulkPublishCommandError = async (output, context) => {
|
|
249
|
-
const parsedOutput = {
|
|
250
|
-
...output,
|
|
251
|
-
body: await parseErrorBody(output.body, context),
|
|
252
|
-
};
|
|
253
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
254
|
-
switch (errorCode) {
|
|
255
|
-
case "AlreadyStreamedException":
|
|
256
|
-
case "com.amazonaws.cognitosync#AlreadyStreamedException":
|
|
257
|
-
throw await de_AlreadyStreamedExceptionRes(parsedOutput, context);
|
|
258
|
-
case "DuplicateRequestException":
|
|
259
|
-
case "com.amazonaws.cognitosync#DuplicateRequestException":
|
|
260
|
-
throw await de_DuplicateRequestExceptionRes(parsedOutput, context);
|
|
261
|
-
case "InternalErrorException":
|
|
262
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
263
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
264
|
-
case "InvalidParameterException":
|
|
265
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
266
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
267
|
-
case "NotAuthorizedException":
|
|
268
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
269
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
270
|
-
case "ResourceNotFoundException":
|
|
271
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
272
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
273
|
-
default:
|
|
274
|
-
const parsedBody = parsedOutput.body;
|
|
275
|
-
return throwDefaultError({
|
|
276
|
-
output,
|
|
277
|
-
parsedBody,
|
|
278
|
-
errorCode,
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
const de_DeleteDatasetCommand = async (output, context) => {
|
|
283
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
284
|
-
return de_DeleteDatasetCommandError(output, context);
|
|
285
|
-
}
|
|
286
|
-
const contents = (0, smithy_client_1.map)({
|
|
287
|
-
$metadata: deserializeMetadata(output),
|
|
288
|
-
});
|
|
289
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
290
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
291
|
-
Dataset: (_) => de_Dataset(_, context),
|
|
292
|
-
});
|
|
293
|
-
Object.assign(contents, doc);
|
|
294
|
-
return contents;
|
|
295
|
-
};
|
|
296
|
-
exports.de_DeleteDatasetCommand = de_DeleteDatasetCommand;
|
|
297
|
-
const de_DeleteDatasetCommandError = async (output, context) => {
|
|
298
|
-
const parsedOutput = {
|
|
299
|
-
...output,
|
|
300
|
-
body: await parseErrorBody(output.body, context),
|
|
301
|
-
};
|
|
302
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
303
|
-
switch (errorCode) {
|
|
304
|
-
case "InternalErrorException":
|
|
305
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
306
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
307
|
-
case "InvalidParameterException":
|
|
308
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
309
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
310
|
-
case "NotAuthorizedException":
|
|
311
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
312
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
313
|
-
case "ResourceConflictException":
|
|
314
|
-
case "com.amazonaws.cognitosync#ResourceConflictException":
|
|
315
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
316
|
-
case "ResourceNotFoundException":
|
|
317
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
318
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
319
|
-
case "TooManyRequestsException":
|
|
320
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
321
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
322
|
-
default:
|
|
323
|
-
const parsedBody = parsedOutput.body;
|
|
324
|
-
return throwDefaultError({
|
|
325
|
-
output,
|
|
326
|
-
parsedBody,
|
|
327
|
-
errorCode,
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
const de_DescribeDatasetCommand = async (output, context) => {
|
|
332
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
333
|
-
return de_DescribeDatasetCommandError(output, context);
|
|
334
|
-
}
|
|
335
|
-
const contents = (0, smithy_client_1.map)({
|
|
336
|
-
$metadata: deserializeMetadata(output),
|
|
337
|
-
});
|
|
338
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
339
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
340
|
-
Dataset: (_) => de_Dataset(_, context),
|
|
341
|
-
});
|
|
342
|
-
Object.assign(contents, doc);
|
|
343
|
-
return contents;
|
|
344
|
-
};
|
|
345
|
-
exports.de_DescribeDatasetCommand = de_DescribeDatasetCommand;
|
|
346
|
-
const de_DescribeDatasetCommandError = async (output, context) => {
|
|
347
|
-
const parsedOutput = {
|
|
348
|
-
...output,
|
|
349
|
-
body: await parseErrorBody(output.body, context),
|
|
350
|
-
};
|
|
351
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
352
|
-
switch (errorCode) {
|
|
353
|
-
case "InternalErrorException":
|
|
354
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
355
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
356
|
-
case "InvalidParameterException":
|
|
357
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
358
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
359
|
-
case "NotAuthorizedException":
|
|
360
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
361
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
362
|
-
case "ResourceNotFoundException":
|
|
363
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
364
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
365
|
-
case "TooManyRequestsException":
|
|
366
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
367
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
368
|
-
default:
|
|
369
|
-
const parsedBody = parsedOutput.body;
|
|
370
|
-
return throwDefaultError({
|
|
371
|
-
output,
|
|
372
|
-
parsedBody,
|
|
373
|
-
errorCode,
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
};
|
|
377
|
-
const de_DescribeIdentityPoolUsageCommand = async (output, context) => {
|
|
378
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
379
|
-
return de_DescribeIdentityPoolUsageCommandError(output, context);
|
|
380
|
-
}
|
|
381
|
-
const contents = (0, smithy_client_1.map)({
|
|
382
|
-
$metadata: deserializeMetadata(output),
|
|
383
|
-
});
|
|
384
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
385
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
386
|
-
IdentityPoolUsage: (_) => de_IdentityPoolUsage(_, context),
|
|
387
|
-
});
|
|
388
|
-
Object.assign(contents, doc);
|
|
389
|
-
return contents;
|
|
390
|
-
};
|
|
391
|
-
exports.de_DescribeIdentityPoolUsageCommand = de_DescribeIdentityPoolUsageCommand;
|
|
392
|
-
const de_DescribeIdentityPoolUsageCommandError = async (output, context) => {
|
|
393
|
-
const parsedOutput = {
|
|
394
|
-
...output,
|
|
395
|
-
body: await parseErrorBody(output.body, context),
|
|
396
|
-
};
|
|
397
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
398
|
-
switch (errorCode) {
|
|
399
|
-
case "InternalErrorException":
|
|
400
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
401
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
402
|
-
case "InvalidParameterException":
|
|
403
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
404
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
405
|
-
case "NotAuthorizedException":
|
|
406
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
407
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
408
|
-
case "ResourceNotFoundException":
|
|
409
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
410
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
411
|
-
case "TooManyRequestsException":
|
|
412
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
413
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
414
|
-
default:
|
|
415
|
-
const parsedBody = parsedOutput.body;
|
|
416
|
-
return throwDefaultError({
|
|
417
|
-
output,
|
|
418
|
-
parsedBody,
|
|
419
|
-
errorCode,
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
};
|
|
423
|
-
const de_DescribeIdentityUsageCommand = async (output, context) => {
|
|
424
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
425
|
-
return de_DescribeIdentityUsageCommandError(output, context);
|
|
426
|
-
}
|
|
427
|
-
const contents = (0, smithy_client_1.map)({
|
|
428
|
-
$metadata: deserializeMetadata(output),
|
|
429
|
-
});
|
|
430
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
431
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
432
|
-
IdentityUsage: (_) => de_IdentityUsage(_, context),
|
|
433
|
-
});
|
|
434
|
-
Object.assign(contents, doc);
|
|
435
|
-
return contents;
|
|
436
|
-
};
|
|
437
|
-
exports.de_DescribeIdentityUsageCommand = de_DescribeIdentityUsageCommand;
|
|
438
|
-
const de_DescribeIdentityUsageCommandError = async (output, context) => {
|
|
439
|
-
const parsedOutput = {
|
|
440
|
-
...output,
|
|
441
|
-
body: await parseErrorBody(output.body, context),
|
|
442
|
-
};
|
|
443
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
444
|
-
switch (errorCode) {
|
|
445
|
-
case "InternalErrorException":
|
|
446
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
447
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
448
|
-
case "InvalidParameterException":
|
|
449
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
450
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
451
|
-
case "NotAuthorizedException":
|
|
452
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
453
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
454
|
-
case "ResourceNotFoundException":
|
|
455
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
456
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
457
|
-
case "TooManyRequestsException":
|
|
458
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
459
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
460
|
-
default:
|
|
461
|
-
const parsedBody = parsedOutput.body;
|
|
462
|
-
return throwDefaultError({
|
|
463
|
-
output,
|
|
464
|
-
parsedBody,
|
|
465
|
-
errorCode,
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
const de_GetBulkPublishDetailsCommand = async (output, context) => {
|
|
470
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
471
|
-
return de_GetBulkPublishDetailsCommandError(output, context);
|
|
472
|
-
}
|
|
473
|
-
const contents = (0, smithy_client_1.map)({
|
|
474
|
-
$metadata: deserializeMetadata(output),
|
|
475
|
-
});
|
|
476
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
477
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
478
|
-
BulkPublishCompleteTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
479
|
-
BulkPublishStartTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
480
|
-
BulkPublishStatus: smithy_client_1.expectString,
|
|
481
|
-
FailureMessage: smithy_client_1.expectString,
|
|
482
|
-
IdentityPoolId: smithy_client_1.expectString,
|
|
483
|
-
});
|
|
484
|
-
Object.assign(contents, doc);
|
|
485
|
-
return contents;
|
|
486
|
-
};
|
|
487
|
-
exports.de_GetBulkPublishDetailsCommand = de_GetBulkPublishDetailsCommand;
|
|
488
|
-
const de_GetBulkPublishDetailsCommandError = async (output, context) => {
|
|
489
|
-
const parsedOutput = {
|
|
490
|
-
...output,
|
|
491
|
-
body: await parseErrorBody(output.body, context),
|
|
492
|
-
};
|
|
493
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
494
|
-
switch (errorCode) {
|
|
495
|
-
case "InternalErrorException":
|
|
496
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
497
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
498
|
-
case "InvalidParameterException":
|
|
499
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
500
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
501
|
-
case "NotAuthorizedException":
|
|
502
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
503
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
504
|
-
case "ResourceNotFoundException":
|
|
505
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
506
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
507
|
-
default:
|
|
508
|
-
const parsedBody = parsedOutput.body;
|
|
509
|
-
return throwDefaultError({
|
|
510
|
-
output,
|
|
511
|
-
parsedBody,
|
|
512
|
-
errorCode,
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
|
-
const de_GetCognitoEventsCommand = async (output, context) => {
|
|
517
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
518
|
-
return de_GetCognitoEventsCommandError(output, context);
|
|
519
|
-
}
|
|
520
|
-
const contents = (0, smithy_client_1.map)({
|
|
521
|
-
$metadata: deserializeMetadata(output),
|
|
522
|
-
});
|
|
523
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
524
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
525
|
-
Events: smithy_client_1._json,
|
|
526
|
-
});
|
|
527
|
-
Object.assign(contents, doc);
|
|
528
|
-
return contents;
|
|
529
|
-
};
|
|
530
|
-
exports.de_GetCognitoEventsCommand = de_GetCognitoEventsCommand;
|
|
531
|
-
const de_GetCognitoEventsCommandError = async (output, context) => {
|
|
532
|
-
const parsedOutput = {
|
|
533
|
-
...output,
|
|
534
|
-
body: await parseErrorBody(output.body, context),
|
|
535
|
-
};
|
|
536
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
537
|
-
switch (errorCode) {
|
|
538
|
-
case "InternalErrorException":
|
|
539
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
540
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
541
|
-
case "InvalidParameterException":
|
|
542
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
543
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
544
|
-
case "NotAuthorizedException":
|
|
545
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
546
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
547
|
-
case "ResourceNotFoundException":
|
|
548
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
549
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
550
|
-
case "TooManyRequestsException":
|
|
551
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
552
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
553
|
-
default:
|
|
554
|
-
const parsedBody = parsedOutput.body;
|
|
555
|
-
return throwDefaultError({
|
|
556
|
-
output,
|
|
557
|
-
parsedBody,
|
|
558
|
-
errorCode,
|
|
559
|
-
});
|
|
560
|
-
}
|
|
561
|
-
};
|
|
562
|
-
const de_GetIdentityPoolConfigurationCommand = async (output, context) => {
|
|
563
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
564
|
-
return de_GetIdentityPoolConfigurationCommandError(output, context);
|
|
565
|
-
}
|
|
566
|
-
const contents = (0, smithy_client_1.map)({
|
|
567
|
-
$metadata: deserializeMetadata(output),
|
|
568
|
-
});
|
|
569
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
570
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
571
|
-
CognitoStreams: smithy_client_1._json,
|
|
572
|
-
IdentityPoolId: smithy_client_1.expectString,
|
|
573
|
-
PushSync: smithy_client_1._json,
|
|
574
|
-
});
|
|
575
|
-
Object.assign(contents, doc);
|
|
576
|
-
return contents;
|
|
577
|
-
};
|
|
578
|
-
exports.de_GetIdentityPoolConfigurationCommand = de_GetIdentityPoolConfigurationCommand;
|
|
579
|
-
const de_GetIdentityPoolConfigurationCommandError = async (output, context) => {
|
|
580
|
-
const parsedOutput = {
|
|
581
|
-
...output,
|
|
582
|
-
body: await parseErrorBody(output.body, context),
|
|
583
|
-
};
|
|
584
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
585
|
-
switch (errorCode) {
|
|
586
|
-
case "InternalErrorException":
|
|
587
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
588
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
589
|
-
case "InvalidParameterException":
|
|
590
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
591
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
592
|
-
case "NotAuthorizedException":
|
|
593
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
594
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
595
|
-
case "ResourceNotFoundException":
|
|
596
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
597
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
598
|
-
case "TooManyRequestsException":
|
|
599
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
600
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
601
|
-
default:
|
|
602
|
-
const parsedBody = parsedOutput.body;
|
|
603
|
-
return throwDefaultError({
|
|
604
|
-
output,
|
|
605
|
-
parsedBody,
|
|
606
|
-
errorCode,
|
|
607
|
-
});
|
|
608
|
-
}
|
|
609
|
-
};
|
|
610
|
-
const de_ListDatasetsCommand = async (output, context) => {
|
|
611
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
612
|
-
return de_ListDatasetsCommandError(output, context);
|
|
613
|
-
}
|
|
614
|
-
const contents = (0, smithy_client_1.map)({
|
|
615
|
-
$metadata: deserializeMetadata(output),
|
|
616
|
-
});
|
|
617
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
618
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
619
|
-
Count: smithy_client_1.expectInt32,
|
|
620
|
-
Datasets: (_) => de_DatasetList(_, context),
|
|
621
|
-
NextToken: smithy_client_1.expectString,
|
|
622
|
-
});
|
|
623
|
-
Object.assign(contents, doc);
|
|
624
|
-
return contents;
|
|
625
|
-
};
|
|
626
|
-
exports.de_ListDatasetsCommand = de_ListDatasetsCommand;
|
|
627
|
-
const de_ListDatasetsCommandError = async (output, context) => {
|
|
628
|
-
const parsedOutput = {
|
|
629
|
-
...output,
|
|
630
|
-
body: await parseErrorBody(output.body, context),
|
|
631
|
-
};
|
|
632
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
633
|
-
switch (errorCode) {
|
|
634
|
-
case "InternalErrorException":
|
|
635
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
636
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
637
|
-
case "InvalidParameterException":
|
|
638
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
639
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
640
|
-
case "NotAuthorizedException":
|
|
641
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
642
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
643
|
-
case "TooManyRequestsException":
|
|
644
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
645
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
646
|
-
default:
|
|
647
|
-
const parsedBody = parsedOutput.body;
|
|
648
|
-
return throwDefaultError({
|
|
649
|
-
output,
|
|
650
|
-
parsedBody,
|
|
651
|
-
errorCode,
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
};
|
|
655
|
-
const de_ListIdentityPoolUsageCommand = async (output, context) => {
|
|
656
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
657
|
-
return de_ListIdentityPoolUsageCommandError(output, context);
|
|
658
|
-
}
|
|
659
|
-
const contents = (0, smithy_client_1.map)({
|
|
660
|
-
$metadata: deserializeMetadata(output),
|
|
661
|
-
});
|
|
662
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
663
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
664
|
-
Count: smithy_client_1.expectInt32,
|
|
665
|
-
IdentityPoolUsages: (_) => de_IdentityPoolUsageList(_, context),
|
|
666
|
-
MaxResults: smithy_client_1.expectInt32,
|
|
667
|
-
NextToken: smithy_client_1.expectString,
|
|
668
|
-
});
|
|
669
|
-
Object.assign(contents, doc);
|
|
670
|
-
return contents;
|
|
671
|
-
};
|
|
672
|
-
exports.de_ListIdentityPoolUsageCommand = de_ListIdentityPoolUsageCommand;
|
|
673
|
-
const de_ListIdentityPoolUsageCommandError = async (output, context) => {
|
|
674
|
-
const parsedOutput = {
|
|
675
|
-
...output,
|
|
676
|
-
body: await parseErrorBody(output.body, context),
|
|
677
|
-
};
|
|
678
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
679
|
-
switch (errorCode) {
|
|
680
|
-
case "InternalErrorException":
|
|
681
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
682
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
683
|
-
case "InvalidParameterException":
|
|
684
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
685
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
686
|
-
case "NotAuthorizedException":
|
|
687
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
688
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
689
|
-
case "TooManyRequestsException":
|
|
690
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
691
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
692
|
-
default:
|
|
693
|
-
const parsedBody = parsedOutput.body;
|
|
694
|
-
return throwDefaultError({
|
|
695
|
-
output,
|
|
696
|
-
parsedBody,
|
|
697
|
-
errorCode,
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
};
|
|
701
|
-
const de_ListRecordsCommand = async (output, context) => {
|
|
702
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
703
|
-
return de_ListRecordsCommandError(output, context);
|
|
704
|
-
}
|
|
705
|
-
const contents = (0, smithy_client_1.map)({
|
|
706
|
-
$metadata: deserializeMetadata(output),
|
|
707
|
-
});
|
|
708
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
709
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
710
|
-
Count: smithy_client_1.expectInt32,
|
|
711
|
-
DatasetDeletedAfterRequestedSyncCount: smithy_client_1.expectBoolean,
|
|
712
|
-
DatasetExists: smithy_client_1.expectBoolean,
|
|
713
|
-
DatasetSyncCount: smithy_client_1.expectLong,
|
|
714
|
-
LastModifiedBy: smithy_client_1.expectString,
|
|
715
|
-
MergedDatasetNames: smithy_client_1._json,
|
|
716
|
-
NextToken: smithy_client_1.expectString,
|
|
717
|
-
Records: (_) => de_RecordList(_, context),
|
|
718
|
-
SyncSessionToken: smithy_client_1.expectString,
|
|
719
|
-
});
|
|
720
|
-
Object.assign(contents, doc);
|
|
721
|
-
return contents;
|
|
722
|
-
};
|
|
723
|
-
exports.de_ListRecordsCommand = de_ListRecordsCommand;
|
|
724
|
-
const de_ListRecordsCommandError = async (output, context) => {
|
|
725
|
-
const parsedOutput = {
|
|
726
|
-
...output,
|
|
727
|
-
body: await parseErrorBody(output.body, context),
|
|
728
|
-
};
|
|
729
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
730
|
-
switch (errorCode) {
|
|
731
|
-
case "InternalErrorException":
|
|
732
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
733
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
734
|
-
case "InvalidParameterException":
|
|
735
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
736
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
737
|
-
case "NotAuthorizedException":
|
|
738
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
739
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
740
|
-
case "TooManyRequestsException":
|
|
741
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
742
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
743
|
-
default:
|
|
744
|
-
const parsedBody = parsedOutput.body;
|
|
745
|
-
return throwDefaultError({
|
|
746
|
-
output,
|
|
747
|
-
parsedBody,
|
|
748
|
-
errorCode,
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
|
-
const de_RegisterDeviceCommand = async (output, context) => {
|
|
753
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
754
|
-
return de_RegisterDeviceCommandError(output, context);
|
|
755
|
-
}
|
|
756
|
-
const contents = (0, smithy_client_1.map)({
|
|
757
|
-
$metadata: deserializeMetadata(output),
|
|
758
|
-
});
|
|
759
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
760
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
761
|
-
DeviceId: smithy_client_1.expectString,
|
|
762
|
-
});
|
|
763
|
-
Object.assign(contents, doc);
|
|
764
|
-
return contents;
|
|
765
|
-
};
|
|
766
|
-
exports.de_RegisterDeviceCommand = de_RegisterDeviceCommand;
|
|
767
|
-
const de_RegisterDeviceCommandError = async (output, context) => {
|
|
768
|
-
const parsedOutput = {
|
|
769
|
-
...output,
|
|
770
|
-
body: await parseErrorBody(output.body, context),
|
|
771
|
-
};
|
|
772
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
773
|
-
switch (errorCode) {
|
|
774
|
-
case "InternalErrorException":
|
|
775
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
776
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
777
|
-
case "InvalidConfigurationException":
|
|
778
|
-
case "com.amazonaws.cognitosync#InvalidConfigurationException":
|
|
779
|
-
throw await de_InvalidConfigurationExceptionRes(parsedOutput, context);
|
|
780
|
-
case "InvalidParameterException":
|
|
781
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
782
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
783
|
-
case "NotAuthorizedException":
|
|
784
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
785
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
786
|
-
case "ResourceNotFoundException":
|
|
787
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
788
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
789
|
-
case "TooManyRequestsException":
|
|
790
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
791
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
792
|
-
default:
|
|
793
|
-
const parsedBody = parsedOutput.body;
|
|
794
|
-
return throwDefaultError({
|
|
795
|
-
output,
|
|
796
|
-
parsedBody,
|
|
797
|
-
errorCode,
|
|
798
|
-
});
|
|
799
|
-
}
|
|
800
|
-
};
|
|
801
|
-
const de_SetCognitoEventsCommand = async (output, context) => {
|
|
802
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
803
|
-
return de_SetCognitoEventsCommandError(output, context);
|
|
804
|
-
}
|
|
805
|
-
const contents = (0, smithy_client_1.map)({
|
|
806
|
-
$metadata: deserializeMetadata(output),
|
|
807
|
-
});
|
|
808
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
809
|
-
return contents;
|
|
810
|
-
};
|
|
811
|
-
exports.de_SetCognitoEventsCommand = de_SetCognitoEventsCommand;
|
|
812
|
-
const de_SetCognitoEventsCommandError = async (output, context) => {
|
|
813
|
-
const parsedOutput = {
|
|
814
|
-
...output,
|
|
815
|
-
body: await parseErrorBody(output.body, context),
|
|
816
|
-
};
|
|
817
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
818
|
-
switch (errorCode) {
|
|
819
|
-
case "InternalErrorException":
|
|
820
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
821
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
822
|
-
case "InvalidParameterException":
|
|
823
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
824
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
825
|
-
case "NotAuthorizedException":
|
|
826
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
827
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
828
|
-
case "ResourceNotFoundException":
|
|
829
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
830
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
831
|
-
case "TooManyRequestsException":
|
|
832
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
833
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
834
|
-
default:
|
|
835
|
-
const parsedBody = parsedOutput.body;
|
|
836
|
-
return throwDefaultError({
|
|
837
|
-
output,
|
|
838
|
-
parsedBody,
|
|
839
|
-
errorCode,
|
|
840
|
-
});
|
|
841
|
-
}
|
|
842
|
-
};
|
|
843
|
-
const de_SetIdentityPoolConfigurationCommand = async (output, context) => {
|
|
844
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
845
|
-
return de_SetIdentityPoolConfigurationCommandError(output, context);
|
|
846
|
-
}
|
|
847
|
-
const contents = (0, smithy_client_1.map)({
|
|
848
|
-
$metadata: deserializeMetadata(output),
|
|
849
|
-
});
|
|
850
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
851
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
852
|
-
CognitoStreams: smithy_client_1._json,
|
|
853
|
-
IdentityPoolId: smithy_client_1.expectString,
|
|
854
|
-
PushSync: smithy_client_1._json,
|
|
855
|
-
});
|
|
856
|
-
Object.assign(contents, doc);
|
|
857
|
-
return contents;
|
|
858
|
-
};
|
|
859
|
-
exports.de_SetIdentityPoolConfigurationCommand = de_SetIdentityPoolConfigurationCommand;
|
|
860
|
-
const de_SetIdentityPoolConfigurationCommandError = async (output, context) => {
|
|
861
|
-
const parsedOutput = {
|
|
862
|
-
...output,
|
|
863
|
-
body: await parseErrorBody(output.body, context),
|
|
864
|
-
};
|
|
865
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
866
|
-
switch (errorCode) {
|
|
867
|
-
case "ConcurrentModificationException":
|
|
868
|
-
case "com.amazonaws.cognitosync#ConcurrentModificationException":
|
|
869
|
-
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
|
|
870
|
-
case "InternalErrorException":
|
|
871
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
872
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
873
|
-
case "InvalidParameterException":
|
|
874
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
875
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
876
|
-
case "NotAuthorizedException":
|
|
877
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
878
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
879
|
-
case "ResourceNotFoundException":
|
|
880
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
881
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
882
|
-
case "TooManyRequestsException":
|
|
883
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
884
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
885
|
-
default:
|
|
886
|
-
const parsedBody = parsedOutput.body;
|
|
887
|
-
return throwDefaultError({
|
|
888
|
-
output,
|
|
889
|
-
parsedBody,
|
|
890
|
-
errorCode,
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
};
|
|
894
|
-
const de_SubscribeToDatasetCommand = async (output, context) => {
|
|
895
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
896
|
-
return de_SubscribeToDatasetCommandError(output, context);
|
|
897
|
-
}
|
|
898
|
-
const contents = (0, smithy_client_1.map)({
|
|
899
|
-
$metadata: deserializeMetadata(output),
|
|
900
|
-
});
|
|
901
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
902
|
-
return contents;
|
|
903
|
-
};
|
|
904
|
-
exports.de_SubscribeToDatasetCommand = de_SubscribeToDatasetCommand;
|
|
905
|
-
const de_SubscribeToDatasetCommandError = async (output, context) => {
|
|
906
|
-
const parsedOutput = {
|
|
907
|
-
...output,
|
|
908
|
-
body: await parseErrorBody(output.body, context),
|
|
909
|
-
};
|
|
910
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
911
|
-
switch (errorCode) {
|
|
912
|
-
case "InternalErrorException":
|
|
913
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
914
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
915
|
-
case "InvalidConfigurationException":
|
|
916
|
-
case "com.amazonaws.cognitosync#InvalidConfigurationException":
|
|
917
|
-
throw await de_InvalidConfigurationExceptionRes(parsedOutput, context);
|
|
918
|
-
case "InvalidParameterException":
|
|
919
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
920
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
921
|
-
case "NotAuthorizedException":
|
|
922
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
923
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
924
|
-
case "ResourceNotFoundException":
|
|
925
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
926
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
927
|
-
case "TooManyRequestsException":
|
|
928
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
929
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
930
|
-
default:
|
|
931
|
-
const parsedBody = parsedOutput.body;
|
|
932
|
-
return throwDefaultError({
|
|
933
|
-
output,
|
|
934
|
-
parsedBody,
|
|
935
|
-
errorCode,
|
|
936
|
-
});
|
|
937
|
-
}
|
|
938
|
-
};
|
|
939
|
-
const de_UnsubscribeFromDatasetCommand = async (output, context) => {
|
|
940
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
941
|
-
return de_UnsubscribeFromDatasetCommandError(output, context);
|
|
942
|
-
}
|
|
943
|
-
const contents = (0, smithy_client_1.map)({
|
|
944
|
-
$metadata: deserializeMetadata(output),
|
|
945
|
-
});
|
|
946
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
947
|
-
return contents;
|
|
948
|
-
};
|
|
949
|
-
exports.de_UnsubscribeFromDatasetCommand = de_UnsubscribeFromDatasetCommand;
|
|
950
|
-
const de_UnsubscribeFromDatasetCommandError = async (output, context) => {
|
|
951
|
-
const parsedOutput = {
|
|
952
|
-
...output,
|
|
953
|
-
body: await parseErrorBody(output.body, context),
|
|
954
|
-
};
|
|
955
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
956
|
-
switch (errorCode) {
|
|
957
|
-
case "InternalErrorException":
|
|
958
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
959
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
960
|
-
case "InvalidConfigurationException":
|
|
961
|
-
case "com.amazonaws.cognitosync#InvalidConfigurationException":
|
|
962
|
-
throw await de_InvalidConfigurationExceptionRes(parsedOutput, context);
|
|
963
|
-
case "InvalidParameterException":
|
|
964
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
965
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
966
|
-
case "NotAuthorizedException":
|
|
967
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
968
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
969
|
-
case "ResourceNotFoundException":
|
|
970
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
971
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
972
|
-
case "TooManyRequestsException":
|
|
973
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
974
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
975
|
-
default:
|
|
976
|
-
const parsedBody = parsedOutput.body;
|
|
977
|
-
return throwDefaultError({
|
|
978
|
-
output,
|
|
979
|
-
parsedBody,
|
|
980
|
-
errorCode,
|
|
981
|
-
});
|
|
982
|
-
}
|
|
983
|
-
};
|
|
984
|
-
const de_UpdateRecordsCommand = async (output, context) => {
|
|
985
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
986
|
-
return de_UpdateRecordsCommandError(output, context);
|
|
987
|
-
}
|
|
988
|
-
const contents = (0, smithy_client_1.map)({
|
|
989
|
-
$metadata: deserializeMetadata(output),
|
|
990
|
-
});
|
|
991
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
992
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
993
|
-
Records: (_) => de_RecordList(_, context),
|
|
994
|
-
});
|
|
995
|
-
Object.assign(contents, doc);
|
|
996
|
-
return contents;
|
|
997
|
-
};
|
|
998
|
-
exports.de_UpdateRecordsCommand = de_UpdateRecordsCommand;
|
|
999
|
-
const de_UpdateRecordsCommandError = async (output, context) => {
|
|
1000
|
-
const parsedOutput = {
|
|
1001
|
-
...output,
|
|
1002
|
-
body: await parseErrorBody(output.body, context),
|
|
1003
|
-
};
|
|
1004
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1005
|
-
switch (errorCode) {
|
|
1006
|
-
case "InternalErrorException":
|
|
1007
|
-
case "com.amazonaws.cognitosync#InternalErrorException":
|
|
1008
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1009
|
-
case "InvalidLambdaFunctionOutputException":
|
|
1010
|
-
case "com.amazonaws.cognitosync#InvalidLambdaFunctionOutputException":
|
|
1011
|
-
throw await de_InvalidLambdaFunctionOutputExceptionRes(parsedOutput, context);
|
|
1012
|
-
case "InvalidParameterException":
|
|
1013
|
-
case "com.amazonaws.cognitosync#InvalidParameterException":
|
|
1014
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1015
|
-
case "LambdaThrottledException":
|
|
1016
|
-
case "com.amazonaws.cognitosync#LambdaThrottledException":
|
|
1017
|
-
throw await de_LambdaThrottledExceptionRes(parsedOutput, context);
|
|
1018
|
-
case "LimitExceededException":
|
|
1019
|
-
case "com.amazonaws.cognitosync#LimitExceededException":
|
|
1020
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1021
|
-
case "NotAuthorizedException":
|
|
1022
|
-
case "com.amazonaws.cognitosync#NotAuthorizedException":
|
|
1023
|
-
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
|
|
1024
|
-
case "ResourceConflictException":
|
|
1025
|
-
case "com.amazonaws.cognitosync#ResourceConflictException":
|
|
1026
|
-
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
|
|
1027
|
-
case "ResourceNotFoundException":
|
|
1028
|
-
case "com.amazonaws.cognitosync#ResourceNotFoundException":
|
|
1029
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1030
|
-
case "TooManyRequestsException":
|
|
1031
|
-
case "com.amazonaws.cognitosync#TooManyRequestsException":
|
|
1032
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1033
|
-
default:
|
|
1034
|
-
const parsedBody = parsedOutput.body;
|
|
1035
|
-
return throwDefaultError({
|
|
1036
|
-
output,
|
|
1037
|
-
parsedBody,
|
|
1038
|
-
errorCode,
|
|
1039
|
-
});
|
|
1040
|
-
}
|
|
1041
|
-
};
|
|
1042
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(CognitoSyncServiceException_1.CognitoSyncServiceException);
|
|
1043
|
-
const de_AlreadyStreamedExceptionRes = async (parsedOutput, context) => {
|
|
1044
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1045
|
-
const data = parsedOutput.body;
|
|
1046
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1047
|
-
message: smithy_client_1.expectString,
|
|
1048
|
-
});
|
|
1049
|
-
Object.assign(contents, doc);
|
|
1050
|
-
const exception = new models_0_1.AlreadyStreamedException({
|
|
1051
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1052
|
-
...contents,
|
|
1053
|
-
});
|
|
1054
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1055
|
-
};
|
|
1056
|
-
const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
1057
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1058
|
-
const data = parsedOutput.body;
|
|
1059
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1060
|
-
message: smithy_client_1.expectString,
|
|
1061
|
-
});
|
|
1062
|
-
Object.assign(contents, doc);
|
|
1063
|
-
const exception = new models_0_1.ConcurrentModificationException({
|
|
1064
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1065
|
-
...contents,
|
|
1066
|
-
});
|
|
1067
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1068
|
-
};
|
|
1069
|
-
const de_DuplicateRequestExceptionRes = async (parsedOutput, context) => {
|
|
1070
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1071
|
-
const data = parsedOutput.body;
|
|
1072
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1073
|
-
message: smithy_client_1.expectString,
|
|
1074
|
-
});
|
|
1075
|
-
Object.assign(contents, doc);
|
|
1076
|
-
const exception = new models_0_1.DuplicateRequestException({
|
|
1077
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1078
|
-
...contents,
|
|
1079
|
-
});
|
|
1080
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1081
|
-
};
|
|
1082
|
-
const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
|
|
1083
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1084
|
-
const data = parsedOutput.body;
|
|
1085
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1086
|
-
message: smithy_client_1.expectString,
|
|
1087
|
-
});
|
|
1088
|
-
Object.assign(contents, doc);
|
|
1089
|
-
const exception = new models_0_1.InternalErrorException({
|
|
1090
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1091
|
-
...contents,
|
|
1092
|
-
});
|
|
1093
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1094
|
-
};
|
|
1095
|
-
const de_InvalidConfigurationExceptionRes = async (parsedOutput, context) => {
|
|
1096
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1097
|
-
const data = parsedOutput.body;
|
|
1098
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1099
|
-
message: smithy_client_1.expectString,
|
|
1100
|
-
});
|
|
1101
|
-
Object.assign(contents, doc);
|
|
1102
|
-
const exception = new models_0_1.InvalidConfigurationException({
|
|
1103
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1104
|
-
...contents,
|
|
1105
|
-
});
|
|
1106
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1107
|
-
};
|
|
1108
|
-
const de_InvalidLambdaFunctionOutputExceptionRes = async (parsedOutput, context) => {
|
|
1109
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1110
|
-
const data = parsedOutput.body;
|
|
1111
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1112
|
-
message: smithy_client_1.expectString,
|
|
1113
|
-
});
|
|
1114
|
-
Object.assign(contents, doc);
|
|
1115
|
-
const exception = new models_0_1.InvalidLambdaFunctionOutputException({
|
|
1116
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1117
|
-
...contents,
|
|
1118
|
-
});
|
|
1119
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1120
|
-
};
|
|
1121
|
-
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
|
|
1122
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1123
|
-
const data = parsedOutput.body;
|
|
1124
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1125
|
-
message: smithy_client_1.expectString,
|
|
1126
|
-
});
|
|
1127
|
-
Object.assign(contents, doc);
|
|
1128
|
-
const exception = new models_0_1.InvalidParameterException({
|
|
1129
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1130
|
-
...contents,
|
|
1131
|
-
});
|
|
1132
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1133
|
-
};
|
|
1134
|
-
const de_LambdaThrottledExceptionRes = async (parsedOutput, context) => {
|
|
1135
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1136
|
-
const data = parsedOutput.body;
|
|
1137
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1138
|
-
message: smithy_client_1.expectString,
|
|
1139
|
-
});
|
|
1140
|
-
Object.assign(contents, doc);
|
|
1141
|
-
const exception = new models_0_1.LambdaThrottledException({
|
|
1142
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1143
|
-
...contents,
|
|
1144
|
-
});
|
|
1145
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1146
|
-
};
|
|
1147
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
1148
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1149
|
-
const data = parsedOutput.body;
|
|
1150
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1151
|
-
message: smithy_client_1.expectString,
|
|
1152
|
-
});
|
|
1153
|
-
Object.assign(contents, doc);
|
|
1154
|
-
const exception = new models_0_1.LimitExceededException({
|
|
1155
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1156
|
-
...contents,
|
|
1157
|
-
});
|
|
1158
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1159
|
-
};
|
|
1160
|
-
const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
|
|
1161
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1162
|
-
const data = parsedOutput.body;
|
|
1163
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1164
|
-
message: smithy_client_1.expectString,
|
|
1165
|
-
});
|
|
1166
|
-
Object.assign(contents, doc);
|
|
1167
|
-
const exception = new models_0_1.NotAuthorizedException({
|
|
1168
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1169
|
-
...contents,
|
|
1170
|
-
});
|
|
1171
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1172
|
-
};
|
|
1173
|
-
const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
|
|
1174
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1175
|
-
const data = parsedOutput.body;
|
|
1176
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1177
|
-
message: smithy_client_1.expectString,
|
|
1178
|
-
});
|
|
1179
|
-
Object.assign(contents, doc);
|
|
1180
|
-
const exception = new models_0_1.ResourceConflictException({
|
|
1181
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1182
|
-
...contents,
|
|
1183
|
-
});
|
|
1184
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1185
|
-
};
|
|
1186
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1187
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1188
|
-
const data = parsedOutput.body;
|
|
1189
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1190
|
-
message: smithy_client_1.expectString,
|
|
1191
|
-
});
|
|
1192
|
-
Object.assign(contents, doc);
|
|
1193
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1194
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1195
|
-
...contents,
|
|
1196
|
-
});
|
|
1197
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1198
|
-
};
|
|
1199
|
-
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
1200
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1201
|
-
const data = parsedOutput.body;
|
|
1202
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1203
|
-
message: smithy_client_1.expectString,
|
|
1204
|
-
});
|
|
1205
|
-
Object.assign(contents, doc);
|
|
1206
|
-
const exception = new models_0_1.TooManyRequestsException({
|
|
1207
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1208
|
-
...contents,
|
|
1209
|
-
});
|
|
1210
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1211
|
-
};
|
|
1212
|
-
const se_RecordPatch = (input, context) => {
|
|
1213
|
-
return (0, smithy_client_1.take)(input, {
|
|
1214
|
-
DeviceLastModifiedDate: (_) => Math.round(_.getTime() / 1000),
|
|
1215
|
-
Key: [],
|
|
1216
|
-
Op: [],
|
|
1217
|
-
SyncCount: [],
|
|
1218
|
-
Value: [],
|
|
1219
|
-
});
|
|
1220
|
-
};
|
|
1221
|
-
const se_RecordPatchList = (input, context) => {
|
|
1222
|
-
return input
|
|
1223
|
-
.filter((e) => e != null)
|
|
1224
|
-
.map((entry) => {
|
|
1225
|
-
return se_RecordPatch(entry, context);
|
|
1226
|
-
});
|
|
1227
|
-
};
|
|
1228
|
-
const de_Dataset = (output, context) => {
|
|
1229
|
-
return (0, smithy_client_1.take)(output, {
|
|
1230
|
-
CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1231
|
-
DataStorage: smithy_client_1.expectLong,
|
|
1232
|
-
DatasetName: smithy_client_1.expectString,
|
|
1233
|
-
IdentityId: smithy_client_1.expectString,
|
|
1234
|
-
LastModifiedBy: smithy_client_1.expectString,
|
|
1235
|
-
LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1236
|
-
NumRecords: smithy_client_1.expectLong,
|
|
1237
|
-
});
|
|
1238
|
-
};
|
|
1239
|
-
const de_DatasetList = (output, context) => {
|
|
1240
|
-
const retVal = (output || [])
|
|
1241
|
-
.filter((e) => e != null)
|
|
1242
|
-
.map((entry) => {
|
|
1243
|
-
return de_Dataset(entry, context);
|
|
1244
|
-
});
|
|
1245
|
-
return retVal;
|
|
1246
|
-
};
|
|
1247
|
-
const de_IdentityPoolUsage = (output, context) => {
|
|
1248
|
-
return (0, smithy_client_1.take)(output, {
|
|
1249
|
-
DataStorage: smithy_client_1.expectLong,
|
|
1250
|
-
IdentityPoolId: smithy_client_1.expectString,
|
|
1251
|
-
LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1252
|
-
SyncSessionsCount: smithy_client_1.expectLong,
|
|
1253
|
-
});
|
|
1254
|
-
};
|
|
1255
|
-
const de_IdentityPoolUsageList = (output, context) => {
|
|
1256
|
-
const retVal = (output || [])
|
|
1257
|
-
.filter((e) => e != null)
|
|
1258
|
-
.map((entry) => {
|
|
1259
|
-
return de_IdentityPoolUsage(entry, context);
|
|
1260
|
-
});
|
|
1261
|
-
return retVal;
|
|
1262
|
-
};
|
|
1263
|
-
const de_IdentityUsage = (output, context) => {
|
|
1264
|
-
return (0, smithy_client_1.take)(output, {
|
|
1265
|
-
DataStorage: smithy_client_1.expectLong,
|
|
1266
|
-
DatasetCount: smithy_client_1.expectInt32,
|
|
1267
|
-
IdentityId: smithy_client_1.expectString,
|
|
1268
|
-
IdentityPoolId: smithy_client_1.expectString,
|
|
1269
|
-
LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1270
|
-
});
|
|
1271
|
-
};
|
|
1272
|
-
const de__Record = (output, context) => {
|
|
1273
|
-
return (0, smithy_client_1.take)(output, {
|
|
1274
|
-
DeviceLastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1275
|
-
Key: smithy_client_1.expectString,
|
|
1276
|
-
LastModifiedBy: smithy_client_1.expectString,
|
|
1277
|
-
LastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1278
|
-
SyncCount: smithy_client_1.expectLong,
|
|
1279
|
-
Value: smithy_client_1.expectString,
|
|
1280
|
-
});
|
|
1281
|
-
};
|
|
1282
|
-
const de_RecordList = (output, context) => {
|
|
1283
|
-
const retVal = (output || [])
|
|
1284
|
-
.filter((e) => e != null)
|
|
1285
|
-
.map((entry) => {
|
|
1286
|
-
return de__Record(entry, context);
|
|
1287
|
-
});
|
|
1288
|
-
return retVal;
|
|
1289
|
-
};
|
|
1290
|
-
const deserializeMetadata = (output) => ({
|
|
1291
|
-
httpStatusCode: output.statusCode,
|
|
1292
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1293
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1294
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1295
|
-
});
|
|
1296
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1297
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1298
|
-
value !== null &&
|
|
1299
|
-
value !== "" &&
|
|
1300
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
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";
|
|
1312
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1313
|
-
if (encoded.length) {
|
|
1314
|
-
return JSON.parse(encoded);
|
|
1315
|
-
}
|
|
1316
|
-
return {};
|
|
1317
|
-
});
|
|
1318
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1319
|
-
const value = await parseBody(errorBody, context);
|
|
1320
|
-
value.message = value.message ?? value.Message;
|
|
1321
|
-
return value;
|
|
1322
|
-
};
|
|
1323
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1324
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1325
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1326
|
-
let cleanValue = rawValue;
|
|
1327
|
-
if (typeof cleanValue === "number") {
|
|
1328
|
-
cleanValue = cleanValue.toString();
|
|
1329
|
-
}
|
|
1330
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1331
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1332
|
-
}
|
|
1333
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1334
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1335
|
-
}
|
|
1336
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1337
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1338
|
-
}
|
|
1339
|
-
return cleanValue;
|
|
1340
|
-
};
|
|
1341
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1342
|
-
if (headerKey !== undefined) {
|
|
1343
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1344
|
-
}
|
|
1345
|
-
if (data.code !== undefined) {
|
|
1346
|
-
return sanitizeErrorCode(data.code);
|
|
1347
|
-
}
|
|
1348
|
-
if (data["__type"] !== undefined) {
|
|
1349
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1350
|
-
}
|
|
1351
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|