@aws-sdk/client-cognito-sync 3.28.0 → 3.32.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/CHANGELOG.md +32 -0
- package/dist/cjs/package.json +31 -31
- package/dist/cjs/protocols/Aws_restJson1.js +34 -34
- package/dist/cjs/protocols/Aws_restJson1.js.map +1 -1
- package/dist/es/endpoints.js +1 -2
- package/dist/es/endpoints.js.map +1 -1
- package/dist/es/package.json +31 -31
- package/dist/es/protocols/Aws_restJson1.js +105 -77
- package/dist/es/protocols/Aws_restJson1.js.map +1 -1
- package/package.json +31 -31
- package/protocols/Aws_restJson1.ts +42 -35
|
@@ -61,9 +61,14 @@ import {
|
|
|
61
61
|
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
62
62
|
import {
|
|
63
63
|
expectBoolean as __expectBoolean,
|
|
64
|
-
|
|
64
|
+
expectInt32 as __expectInt32,
|
|
65
|
+
expectLong as __expectLong,
|
|
66
|
+
expectNonNull as __expectNonNull,
|
|
67
|
+
expectNumber as __expectNumber,
|
|
68
|
+
expectObject as __expectObject,
|
|
65
69
|
expectString as __expectString,
|
|
66
70
|
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
71
|
+
parseEpochTimestamp as __parseEpochTimestamp,
|
|
67
72
|
} from "@aws-sdk/smithy-client";
|
|
68
73
|
import {
|
|
69
74
|
Endpoint as __Endpoint,
|
|
@@ -784,7 +789,7 @@ export const deserializeAws_restJson1BulkPublishCommand = async (
|
|
|
784
789
|
$metadata: deserializeMetadata(output),
|
|
785
790
|
IdentityPoolId: undefined,
|
|
786
791
|
};
|
|
787
|
-
const data: any = await parseBody(output.body, context);
|
|
792
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
788
793
|
if (data.IdentityPoolId !== undefined && data.IdentityPoolId !== null) {
|
|
789
794
|
contents.IdentityPoolId = __expectString(data.IdentityPoolId);
|
|
790
795
|
}
|
|
@@ -879,7 +884,7 @@ export const deserializeAws_restJson1DeleteDatasetCommand = async (
|
|
|
879
884
|
$metadata: deserializeMetadata(output),
|
|
880
885
|
Dataset: undefined,
|
|
881
886
|
};
|
|
882
|
-
const data: any = await parseBody(output.body, context);
|
|
887
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
883
888
|
if (data.Dataset !== undefined && data.Dataset !== null) {
|
|
884
889
|
contents.Dataset = deserializeAws_restJson1Dataset(data.Dataset, context);
|
|
885
890
|
}
|
|
@@ -974,7 +979,7 @@ export const deserializeAws_restJson1DescribeDatasetCommand = async (
|
|
|
974
979
|
$metadata: deserializeMetadata(output),
|
|
975
980
|
Dataset: undefined,
|
|
976
981
|
};
|
|
977
|
-
const data: any = await parseBody(output.body, context);
|
|
982
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
978
983
|
if (data.Dataset !== undefined && data.Dataset !== null) {
|
|
979
984
|
contents.Dataset = deserializeAws_restJson1Dataset(data.Dataset, context);
|
|
980
985
|
}
|
|
@@ -1061,7 +1066,7 @@ export const deserializeAws_restJson1DescribeIdentityPoolUsageCommand = async (
|
|
|
1061
1066
|
$metadata: deserializeMetadata(output),
|
|
1062
1067
|
IdentityPoolUsage: undefined,
|
|
1063
1068
|
};
|
|
1064
|
-
const data: any = await parseBody(output.body, context);
|
|
1069
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1065
1070
|
if (data.IdentityPoolUsage !== undefined && data.IdentityPoolUsage !== null) {
|
|
1066
1071
|
contents.IdentityPoolUsage = deserializeAws_restJson1IdentityPoolUsage(data.IdentityPoolUsage, context);
|
|
1067
1072
|
}
|
|
@@ -1148,7 +1153,7 @@ export const deserializeAws_restJson1DescribeIdentityUsageCommand = async (
|
|
|
1148
1153
|
$metadata: deserializeMetadata(output),
|
|
1149
1154
|
IdentityUsage: undefined,
|
|
1150
1155
|
};
|
|
1151
|
-
const data: any = await parseBody(output.body, context);
|
|
1156
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1152
1157
|
if (data.IdentityUsage !== undefined && data.IdentityUsage !== null) {
|
|
1153
1158
|
contents.IdentityUsage = deserializeAws_restJson1IdentityUsage(data.IdentityUsage, context);
|
|
1154
1159
|
}
|
|
@@ -1239,12 +1244,14 @@ export const deserializeAws_restJson1GetBulkPublishDetailsCommand = async (
|
|
|
1239
1244
|
FailureMessage: undefined,
|
|
1240
1245
|
IdentityPoolId: undefined,
|
|
1241
1246
|
};
|
|
1242
|
-
const data: any = await parseBody(output.body, context);
|
|
1247
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1243
1248
|
if (data.BulkPublishCompleteTime !== undefined && data.BulkPublishCompleteTime !== null) {
|
|
1244
|
-
contents.BulkPublishCompleteTime =
|
|
1249
|
+
contents.BulkPublishCompleteTime = __expectNonNull(
|
|
1250
|
+
__parseEpochTimestamp(__expectNumber(data.BulkPublishCompleteTime))
|
|
1251
|
+
);
|
|
1245
1252
|
}
|
|
1246
1253
|
if (data.BulkPublishStartTime !== undefined && data.BulkPublishStartTime !== null) {
|
|
1247
|
-
contents.BulkPublishStartTime =
|
|
1254
|
+
contents.BulkPublishStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.BulkPublishStartTime)));
|
|
1248
1255
|
}
|
|
1249
1256
|
if (data.BulkPublishStatus !== undefined && data.BulkPublishStatus !== null) {
|
|
1250
1257
|
contents.BulkPublishStatus = __expectString(data.BulkPublishStatus);
|
|
@@ -1330,7 +1337,7 @@ export const deserializeAws_restJson1GetCognitoEventsCommand = async (
|
|
|
1330
1337
|
$metadata: deserializeMetadata(output),
|
|
1331
1338
|
Events: undefined,
|
|
1332
1339
|
};
|
|
1333
|
-
const data: any = await parseBody(output.body, context);
|
|
1340
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1334
1341
|
if (data.Events !== undefined && data.Events !== null) {
|
|
1335
1342
|
contents.Events = deserializeAws_restJson1Events(data.Events, context);
|
|
1336
1343
|
}
|
|
@@ -1419,7 +1426,7 @@ export const deserializeAws_restJson1GetIdentityPoolConfigurationCommand = async
|
|
|
1419
1426
|
IdentityPoolId: undefined,
|
|
1420
1427
|
PushSync: undefined,
|
|
1421
1428
|
};
|
|
1422
|
-
const data: any = await parseBody(output.body, context);
|
|
1429
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1423
1430
|
if (data.CognitoStreams !== undefined && data.CognitoStreams !== null) {
|
|
1424
1431
|
contents.CognitoStreams = deserializeAws_restJson1CognitoStreams(data.CognitoStreams, context);
|
|
1425
1432
|
}
|
|
@@ -1514,9 +1521,9 @@ export const deserializeAws_restJson1ListDatasetsCommand = async (
|
|
|
1514
1521
|
Datasets: undefined,
|
|
1515
1522
|
NextToken: undefined,
|
|
1516
1523
|
};
|
|
1517
|
-
const data: any = await parseBody(output.body, context);
|
|
1524
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1518
1525
|
if (data.Count !== undefined && data.Count !== null) {
|
|
1519
|
-
contents.Count =
|
|
1526
|
+
contents.Count = __expectInt32(data.Count);
|
|
1520
1527
|
}
|
|
1521
1528
|
if (data.Datasets !== undefined && data.Datasets !== null) {
|
|
1522
1529
|
contents.Datasets = deserializeAws_restJson1DatasetList(data.Datasets, context);
|
|
@@ -1602,15 +1609,15 @@ export const deserializeAws_restJson1ListIdentityPoolUsageCommand = async (
|
|
|
1602
1609
|
MaxResults: undefined,
|
|
1603
1610
|
NextToken: undefined,
|
|
1604
1611
|
};
|
|
1605
|
-
const data: any = await parseBody(output.body, context);
|
|
1612
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1606
1613
|
if (data.Count !== undefined && data.Count !== null) {
|
|
1607
|
-
contents.Count =
|
|
1614
|
+
contents.Count = __expectInt32(data.Count);
|
|
1608
1615
|
}
|
|
1609
1616
|
if (data.IdentityPoolUsages !== undefined && data.IdentityPoolUsages !== null) {
|
|
1610
1617
|
contents.IdentityPoolUsages = deserializeAws_restJson1IdentityPoolUsageList(data.IdentityPoolUsages, context);
|
|
1611
1618
|
}
|
|
1612
1619
|
if (data.MaxResults !== undefined && data.MaxResults !== null) {
|
|
1613
|
-
contents.MaxResults =
|
|
1620
|
+
contents.MaxResults = __expectInt32(data.MaxResults);
|
|
1614
1621
|
}
|
|
1615
1622
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1616
1623
|
contents.NextToken = __expectString(data.NextToken);
|
|
@@ -1698,9 +1705,9 @@ export const deserializeAws_restJson1ListRecordsCommand = async (
|
|
|
1698
1705
|
Records: undefined,
|
|
1699
1706
|
SyncSessionToken: undefined,
|
|
1700
1707
|
};
|
|
1701
|
-
const data: any = await parseBody(output.body, context);
|
|
1708
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1702
1709
|
if (data.Count !== undefined && data.Count !== null) {
|
|
1703
|
-
contents.Count =
|
|
1710
|
+
contents.Count = __expectInt32(data.Count);
|
|
1704
1711
|
}
|
|
1705
1712
|
if (data.DatasetDeletedAfterRequestedSyncCount !== undefined && data.DatasetDeletedAfterRequestedSyncCount !== null) {
|
|
1706
1713
|
contents.DatasetDeletedAfterRequestedSyncCount = __expectBoolean(data.DatasetDeletedAfterRequestedSyncCount);
|
|
@@ -1709,7 +1716,7 @@ export const deserializeAws_restJson1ListRecordsCommand = async (
|
|
|
1709
1716
|
contents.DatasetExists = __expectBoolean(data.DatasetExists);
|
|
1710
1717
|
}
|
|
1711
1718
|
if (data.DatasetSyncCount !== undefined && data.DatasetSyncCount !== null) {
|
|
1712
|
-
contents.DatasetSyncCount =
|
|
1719
|
+
contents.DatasetSyncCount = __expectLong(data.DatasetSyncCount);
|
|
1713
1720
|
}
|
|
1714
1721
|
if (data.LastModifiedBy !== undefined && data.LastModifiedBy !== null) {
|
|
1715
1722
|
contents.LastModifiedBy = __expectString(data.LastModifiedBy);
|
|
@@ -1801,7 +1808,7 @@ export const deserializeAws_restJson1RegisterDeviceCommand = async (
|
|
|
1801
1808
|
$metadata: deserializeMetadata(output),
|
|
1802
1809
|
DeviceId: undefined,
|
|
1803
1810
|
};
|
|
1804
|
-
const data: any = await parseBody(output.body, context);
|
|
1811
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1805
1812
|
if (data.DeviceId !== undefined && data.DeviceId !== null) {
|
|
1806
1813
|
contents.DeviceId = __expectString(data.DeviceId);
|
|
1807
1814
|
}
|
|
@@ -1981,7 +1988,7 @@ export const deserializeAws_restJson1SetIdentityPoolConfigurationCommand = async
|
|
|
1981
1988
|
IdentityPoolId: undefined,
|
|
1982
1989
|
PushSync: undefined,
|
|
1983
1990
|
};
|
|
1984
|
-
const data: any = await parseBody(output.body, context);
|
|
1991
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1985
1992
|
if (data.CognitoStreams !== undefined && data.CognitoStreams !== null) {
|
|
1986
1993
|
contents.CognitoStreams = deserializeAws_restJson1CognitoStreams(data.CognitoStreams, context);
|
|
1987
1994
|
}
|
|
@@ -2264,7 +2271,7 @@ export const deserializeAws_restJson1UpdateRecordsCommand = async (
|
|
|
2264
2271
|
$metadata: deserializeMetadata(output),
|
|
2265
2272
|
Records: undefined,
|
|
2266
2273
|
};
|
|
2267
|
-
const data: any = await parseBody(output.body, context);
|
|
2274
|
+
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2268
2275
|
if (data.Records !== undefined && data.Records !== null) {
|
|
2269
2276
|
contents.Records = deserializeAws_restJson1RecordList(data.Records, context);
|
|
2270
2277
|
}
|
|
@@ -2682,17 +2689,17 @@ const deserializeAws_restJson1Dataset = (output: any, context: __SerdeContext):
|
|
|
2682
2689
|
return {
|
|
2683
2690
|
CreationDate:
|
|
2684
2691
|
output.CreationDate !== undefined && output.CreationDate !== null
|
|
2685
|
-
?
|
|
2692
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate)))
|
|
2686
2693
|
: undefined,
|
|
2687
|
-
DataStorage:
|
|
2694
|
+
DataStorage: __expectLong(output.DataStorage),
|
|
2688
2695
|
DatasetName: __expectString(output.DatasetName),
|
|
2689
2696
|
IdentityId: __expectString(output.IdentityId),
|
|
2690
2697
|
LastModifiedBy: __expectString(output.LastModifiedBy),
|
|
2691
2698
|
LastModifiedDate:
|
|
2692
2699
|
output.LastModifiedDate !== undefined && output.LastModifiedDate !== null
|
|
2693
|
-
?
|
|
2700
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate)))
|
|
2694
2701
|
: undefined,
|
|
2695
|
-
NumRecords:
|
|
2702
|
+
NumRecords: __expectLong(output.NumRecords),
|
|
2696
2703
|
} as any;
|
|
2697
2704
|
};
|
|
2698
2705
|
|
|
@@ -2721,13 +2728,13 @@ const deserializeAws_restJson1Events = (output: any, context: __SerdeContext): {
|
|
|
2721
2728
|
|
|
2722
2729
|
const deserializeAws_restJson1IdentityPoolUsage = (output: any, context: __SerdeContext): IdentityPoolUsage => {
|
|
2723
2730
|
return {
|
|
2724
|
-
DataStorage:
|
|
2731
|
+
DataStorage: __expectLong(output.DataStorage),
|
|
2725
2732
|
IdentityPoolId: __expectString(output.IdentityPoolId),
|
|
2726
2733
|
LastModifiedDate:
|
|
2727
2734
|
output.LastModifiedDate !== undefined && output.LastModifiedDate !== null
|
|
2728
|
-
?
|
|
2735
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate)))
|
|
2729
2736
|
: undefined,
|
|
2730
|
-
SyncSessionsCount:
|
|
2737
|
+
SyncSessionsCount: __expectLong(output.SyncSessionsCount),
|
|
2731
2738
|
} as any;
|
|
2732
2739
|
};
|
|
2733
2740
|
|
|
@@ -2744,13 +2751,13 @@ const deserializeAws_restJson1IdentityPoolUsageList = (output: any, context: __S
|
|
|
2744
2751
|
|
|
2745
2752
|
const deserializeAws_restJson1IdentityUsage = (output: any, context: __SerdeContext): IdentityUsage => {
|
|
2746
2753
|
return {
|
|
2747
|
-
DataStorage:
|
|
2748
|
-
DatasetCount:
|
|
2754
|
+
DataStorage: __expectLong(output.DataStorage),
|
|
2755
|
+
DatasetCount: __expectInt32(output.DatasetCount),
|
|
2749
2756
|
IdentityId: __expectString(output.IdentityId),
|
|
2750
2757
|
IdentityPoolId: __expectString(output.IdentityPoolId),
|
|
2751
2758
|
LastModifiedDate:
|
|
2752
2759
|
output.LastModifiedDate !== undefined && output.LastModifiedDate !== null
|
|
2753
|
-
?
|
|
2760
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate)))
|
|
2754
2761
|
: undefined,
|
|
2755
2762
|
} as any;
|
|
2756
2763
|
};
|
|
@@ -2780,15 +2787,15 @@ const deserializeAws_restJson1_Record = (output: any, context: __SerdeContext):
|
|
|
2780
2787
|
return {
|
|
2781
2788
|
DeviceLastModifiedDate:
|
|
2782
2789
|
output.DeviceLastModifiedDate !== undefined && output.DeviceLastModifiedDate !== null
|
|
2783
|
-
?
|
|
2790
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeviceLastModifiedDate)))
|
|
2784
2791
|
: undefined,
|
|
2785
2792
|
Key: __expectString(output.Key),
|
|
2786
2793
|
LastModifiedBy: __expectString(output.LastModifiedBy),
|
|
2787
2794
|
LastModifiedDate:
|
|
2788
2795
|
output.LastModifiedDate !== undefined && output.LastModifiedDate !== null
|
|
2789
|
-
?
|
|
2796
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate)))
|
|
2790
2797
|
: undefined,
|
|
2791
|
-
SyncCount:
|
|
2798
|
+
SyncCount: __expectLong(output.SyncCount),
|
|
2792
2799
|
Value: __expectString(output.Value),
|
|
2793
2800
|
} as any;
|
|
2794
2801
|
};
|