-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path968.js
955 lines (917 loc) · 34.5 KB
/
968.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
"use strict";
(self["webpackChunkwalinga_github_io"] = self["webpackChunkwalinga_github_io"] || []).push([[968],{
/***/ 968:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
CognitoIdentityClient: () => (/* reexport */ CognitoIdentityClient/* CognitoIdentityClient */.D),
GetCredentialsForIdentityCommand: () => (/* reexport */ GetCredentialsForIdentityCommand),
GetIdCommand: () => (/* reexport */ GetIdCommand)
});
// EXTERNAL MODULE: ./node_modules/@smithy/middleware-endpoint/dist-es/index.js + 8 modules
var dist_es = __webpack_require__(12);
// EXTERNAL MODULE: ./node_modules/@smithy/middleware-serde/dist-es/index.js + 3 modules
var middleware_serde_dist_es = __webpack_require__(208);
// EXTERNAL MODULE: ./node_modules/@smithy/smithy-client/dist-es/index.js + 22 modules
var smithy_client_dist_es = __webpack_require__(735);
// EXTERNAL MODULE: ./node_modules/@aws-sdk/client-cognito-identity/dist-es/endpoint/EndpointParameters.js
var EndpointParameters = __webpack_require__(19);
;// CONCATENATED MODULE: ./node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js
const collectBodyString = (streamBody, context) => (0,smithy_client_dist_es/* collectBody */.Px)(streamBody, context).then((body) => context.utf8Encoder(body));
;// CONCATENATED MODULE: ./node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js
const parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
if (encoded.length) {
try {
return JSON.parse(encoded);
}
catch (e) {
if (e?.name === "SyntaxError") {
Object.defineProperty(e, "$responseBodyText", {
value: encoded,
});
}
throw e;
}
}
return {};
});
const parseJsonErrorBody = async (errorBody, context) => {
const value = await parseJsonBody(errorBody, context);
value.message = value.message ?? value.Message;
return value;
};
const loadRestJsonErrorCode = (output, data) => {
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
const sanitizeErrorCode = (rawValue) => {
let cleanValue = rawValue;
if (typeof cleanValue === "number") {
cleanValue = cleanValue.toString();
}
if (cleanValue.indexOf(",") >= 0) {
cleanValue = cleanValue.split(",")[0];
}
if (cleanValue.indexOf(":") >= 0) {
cleanValue = cleanValue.split(":")[0];
}
if (cleanValue.indexOf("#") >= 0) {
cleanValue = cleanValue.split("#")[1];
}
return cleanValue;
};
const headerKey = findKey(output.headers, "x-amzn-errortype");
if (headerKey !== undefined) {
return sanitizeErrorCode(output.headers[headerKey]);
}
if (data.code !== undefined) {
return sanitizeErrorCode(data.code);
}
if (data["__type"] !== undefined) {
return sanitizeErrorCode(data["__type"]);
}
};
// EXTERNAL MODULE: ./node_modules/@smithy/protocol-http/dist-es/index.js + 5 modules
var protocol_http_dist_es = __webpack_require__(479);
;// CONCATENATED MODULE: ./node_modules/@aws-sdk/client-cognito-identity/dist-es/models/CognitoIdentityServiceException.js
class CognitoIdentityServiceException extends smithy_client_dist_es/* ServiceException */.TJ {
constructor(options) {
super(options);
Object.setPrototypeOf(this, CognitoIdentityServiceException.prototype);
}
}
;// CONCATENATED MODULE: ./node_modules/@aws-sdk/client-cognito-identity/dist-es/models/models_0.js
const AmbiguousRoleResolutionType = {
AUTHENTICATED_ROLE: "AuthenticatedRole",
DENY: "Deny",
};
class InternalErrorException extends CognitoIdentityServiceException {
constructor(opts) {
super({
name: "InternalErrorException",
$fault: "server",
...opts,
});
this.name = "InternalErrorException";
this.$fault = "server";
Object.setPrototypeOf(this, InternalErrorException.prototype);
}
}
class InvalidParameterException extends CognitoIdentityServiceException {
constructor(opts) {
super({
name: "InvalidParameterException",
$fault: "client",
...opts,
});
this.name = "InvalidParameterException";
this.$fault = "client";
Object.setPrototypeOf(this, InvalidParameterException.prototype);
}
}
class LimitExceededException extends CognitoIdentityServiceException {
constructor(opts) {
super({
name: "LimitExceededException",
$fault: "client",
...opts,
});
this.name = "LimitExceededException";
this.$fault = "client";
Object.setPrototypeOf(this, LimitExceededException.prototype);
}
}
class NotAuthorizedException extends CognitoIdentityServiceException {
constructor(opts) {
super({
name: "NotAuthorizedException",
$fault: "client",
...opts,
});
this.name = "NotAuthorizedException";
this.$fault = "client";
Object.setPrototypeOf(this, NotAuthorizedException.prototype);
}
}
class ResourceConflictException extends CognitoIdentityServiceException {
constructor(opts) {
super({
name: "ResourceConflictException",
$fault: "client",
...opts,
});
this.name = "ResourceConflictException";
this.$fault = "client";
Object.setPrototypeOf(this, ResourceConflictException.prototype);
}
}
class TooManyRequestsException extends CognitoIdentityServiceException {
constructor(opts) {
super({
name: "TooManyRequestsException",
$fault: "client",
...opts,
});
this.name = "TooManyRequestsException";
this.$fault = "client";
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
}
}
const ErrorCode = {
ACCESS_DENIED: "AccessDenied",
INTERNAL_SERVER_ERROR: "InternalServerError",
};
class ResourceNotFoundException extends CognitoIdentityServiceException {
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts,
});
this.name = "ResourceNotFoundException";
this.$fault = "client";
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
}
}
class ExternalServiceException extends CognitoIdentityServiceException {
constructor(opts) {
super({
name: "ExternalServiceException",
$fault: "client",
...opts,
});
this.name = "ExternalServiceException";
this.$fault = "client";
Object.setPrototypeOf(this, ExternalServiceException.prototype);
}
}
class InvalidIdentityPoolConfigurationException extends CognitoIdentityServiceException {
constructor(opts) {
super({
name: "InvalidIdentityPoolConfigurationException",
$fault: "client",
...opts,
});
this.name = "InvalidIdentityPoolConfigurationException";
this.$fault = "client";
Object.setPrototypeOf(this, InvalidIdentityPoolConfigurationException.prototype);
}
}
const MappingRuleMatchType = {
CONTAINS: "Contains",
EQUALS: "Equals",
NOT_EQUAL: "NotEqual",
STARTS_WITH: "StartsWith",
};
const RoleMappingType = {
RULES: "Rules",
TOKEN: "Token",
};
class DeveloperUserAlreadyRegisteredException extends CognitoIdentityServiceException {
constructor(opts) {
super({
name: "DeveloperUserAlreadyRegisteredException",
$fault: "client",
...opts,
});
this.name = "DeveloperUserAlreadyRegisteredException";
this.$fault = "client";
Object.setPrototypeOf(this, DeveloperUserAlreadyRegisteredException.prototype);
}
}
class ConcurrentModificationException extends CognitoIdentityServiceException {
constructor(opts) {
super({
name: "ConcurrentModificationException",
$fault: "client",
...opts,
});
this.name = "ConcurrentModificationException";
this.$fault = "client";
Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
}
}
;// CONCATENATED MODULE: ./node_modules/@aws-sdk/client-cognito-identity/dist-es/protocols/Aws_json1_1.js
const se_CreateIdentityPoolCommand = async (input, context) => {
const headers = sharedHeaders("CreateIdentityPool");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_DeleteIdentitiesCommand = async (input, context) => {
const headers = sharedHeaders("DeleteIdentities");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_DeleteIdentityPoolCommand = async (input, context) => {
const headers = sharedHeaders("DeleteIdentityPool");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_DescribeIdentityCommand = async (input, context) => {
const headers = sharedHeaders("DescribeIdentity");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_DescribeIdentityPoolCommand = async (input, context) => {
const headers = sharedHeaders("DescribeIdentityPool");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_GetCredentialsForIdentityCommand = async (input, context) => {
const headers = sharedHeaders("GetCredentialsForIdentity");
let body;
body = JSON.stringify((0,smithy_client_dist_es/* _json */.Ss)(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_GetIdCommand = async (input, context) => {
const headers = sharedHeaders("GetId");
let body;
body = JSON.stringify((0,smithy_client_dist_es/* _json */.Ss)(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_GetIdentityPoolRolesCommand = async (input, context) => {
const headers = sharedHeaders("GetIdentityPoolRoles");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_GetOpenIdTokenCommand = async (input, context) => {
const headers = sharedHeaders("GetOpenIdToken");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_GetOpenIdTokenForDeveloperIdentityCommand = async (input, context) => {
const headers = sharedHeaders("GetOpenIdTokenForDeveloperIdentity");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_GetPrincipalTagAttributeMapCommand = async (input, context) => {
const headers = sharedHeaders("GetPrincipalTagAttributeMap");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_ListIdentitiesCommand = async (input, context) => {
const headers = sharedHeaders("ListIdentities");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_ListIdentityPoolsCommand = async (input, context) => {
const headers = sharedHeaders("ListIdentityPools");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_ListTagsForResourceCommand = async (input, context) => {
const headers = sharedHeaders("ListTagsForResource");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_LookupDeveloperIdentityCommand = async (input, context) => {
const headers = sharedHeaders("LookupDeveloperIdentity");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_MergeDeveloperIdentitiesCommand = async (input, context) => {
const headers = sharedHeaders("MergeDeveloperIdentities");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_SetIdentityPoolRolesCommand = async (input, context) => {
const headers = sharedHeaders("SetIdentityPoolRoles");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_SetPrincipalTagAttributeMapCommand = async (input, context) => {
const headers = sharedHeaders("SetPrincipalTagAttributeMap");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_TagResourceCommand = async (input, context) => {
const headers = sharedHeaders("TagResource");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_UnlinkDeveloperIdentityCommand = async (input, context) => {
const headers = sharedHeaders("UnlinkDeveloperIdentity");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_UnlinkIdentityCommand = async (input, context) => {
const headers = sharedHeaders("UnlinkIdentity");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_UntagResourceCommand = async (input, context) => {
const headers = sharedHeaders("UntagResource");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const se_UpdateIdentityPoolCommand = async (input, context) => {
const headers = sharedHeaders("UpdateIdentityPool");
let body;
body = JSON.stringify(_json(input));
return buildHttpRpcRequest(context, headers, "/", undefined, body);
};
const de_CreateIdentityPoolCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_DeleteIdentitiesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_DeleteIdentityPoolCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await collectBody(output.body, context);
const response = {
$metadata: deserializeMetadata(output),
};
return response;
};
const de_DescribeIdentityCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = de_IdentityDescription(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_DescribeIdentityPoolCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_GetCredentialsForIdentityCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseJsonBody(output.body, context);
let contents = {};
contents = de_GetCredentialsForIdentityResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_GetIdCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseJsonBody(output.body, context);
let contents = {};
contents = (0,smithy_client_dist_es/* _json */.Ss)(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_GetIdentityPoolRolesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_GetOpenIdTokenCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_GetOpenIdTokenForDeveloperIdentityCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_GetPrincipalTagAttributeMapCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_ListIdentitiesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = de_ListIdentitiesResponse(data, context);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_ListIdentityPoolsCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_ListTagsForResourceCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_LookupDeveloperIdentityCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_MergeDeveloperIdentitiesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_SetIdentityPoolRolesCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await collectBody(output.body, context);
const response = {
$metadata: deserializeMetadata(output),
};
return response;
};
const de_SetPrincipalTagAttributeMapCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_TagResourceCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_UnlinkDeveloperIdentityCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await collectBody(output.body, context);
const response = {
$metadata: deserializeMetadata(output),
};
return response;
};
const de_UnlinkIdentityCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
await collectBody(output.body, context);
const response = {
$metadata: deserializeMetadata(output),
};
return response;
};
const de_UntagResourceCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_UpdateIdentityPoolCommand = async (output, context) => {
if (output.statusCode >= 300) {
return de_CommandError(output, context);
}
const data = await parseBody(output.body, context);
let contents = {};
contents = _json(data);
const response = {
$metadata: deserializeMetadata(output),
...contents,
};
return response;
};
const de_CommandError = async (output, context) => {
const parsedOutput = {
...output,
body: await parseJsonErrorBody(output.body, context),
};
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
switch (errorCode) {
case "InternalErrorException":
case "com.amazonaws.cognitoidentity#InternalErrorException":
throw await de_InternalErrorExceptionRes(parsedOutput, context);
case "InvalidParameterException":
case "com.amazonaws.cognitoidentity#InvalidParameterException":
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
case "LimitExceededException":
case "com.amazonaws.cognitoidentity#LimitExceededException":
throw await de_LimitExceededExceptionRes(parsedOutput, context);
case "NotAuthorizedException":
case "com.amazonaws.cognitoidentity#NotAuthorizedException":
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
case "ResourceConflictException":
case "com.amazonaws.cognitoidentity#ResourceConflictException":
throw await de_ResourceConflictExceptionRes(parsedOutput, context);
case "TooManyRequestsException":
case "com.amazonaws.cognitoidentity#TooManyRequestsException":
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
case "ResourceNotFoundException":
case "com.amazonaws.cognitoidentity#ResourceNotFoundException":
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
case "ExternalServiceException":
case "com.amazonaws.cognitoidentity#ExternalServiceException":
throw await de_ExternalServiceExceptionRes(parsedOutput, context);
case "InvalidIdentityPoolConfigurationException":
case "com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":
throw await de_InvalidIdentityPoolConfigurationExceptionRes(parsedOutput, context);
case "DeveloperUserAlreadyRegisteredException":
case "com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException":
throw await de_DeveloperUserAlreadyRegisteredExceptionRes(parsedOutput, context);
case "ConcurrentModificationException":
case "com.amazonaws.cognitoidentity#ConcurrentModificationException":
throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
parsedBody,
errorCode,
});
}
};
const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0,smithy_client_dist_es/* _json */.Ss)(body);
const exception = new ConcurrentModificationException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return (0,smithy_client_dist_es/* decorateServiceException */.Mw)(exception, body);
};
const de_DeveloperUserAlreadyRegisteredExceptionRes = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0,smithy_client_dist_es/* _json */.Ss)(body);
const exception = new DeveloperUserAlreadyRegisteredException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return (0,smithy_client_dist_es/* decorateServiceException */.Mw)(exception, body);
};
const de_ExternalServiceExceptionRes = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0,smithy_client_dist_es/* _json */.Ss)(body);
const exception = new ExternalServiceException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return (0,smithy_client_dist_es/* decorateServiceException */.Mw)(exception, body);
};
const de_InternalErrorExceptionRes = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0,smithy_client_dist_es/* _json */.Ss)(body);
const exception = new InternalErrorException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return (0,smithy_client_dist_es/* decorateServiceException */.Mw)(exception, body);
};
const de_InvalidIdentityPoolConfigurationExceptionRes = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0,smithy_client_dist_es/* _json */.Ss)(body);
const exception = new InvalidIdentityPoolConfigurationException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return (0,smithy_client_dist_es/* decorateServiceException */.Mw)(exception, body);
};
const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0,smithy_client_dist_es/* _json */.Ss)(body);
const exception = new InvalidParameterException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return (0,smithy_client_dist_es/* decorateServiceException */.Mw)(exception, body);
};
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0,smithy_client_dist_es/* _json */.Ss)(body);
const exception = new LimitExceededException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return (0,smithy_client_dist_es/* decorateServiceException */.Mw)(exception, body);
};
const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0,smithy_client_dist_es/* _json */.Ss)(body);
const exception = new NotAuthorizedException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return (0,smithy_client_dist_es/* decorateServiceException */.Mw)(exception, body);
};
const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0,smithy_client_dist_es/* _json */.Ss)(body);
const exception = new ResourceConflictException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return (0,smithy_client_dist_es/* decorateServiceException */.Mw)(exception, body);
};
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0,smithy_client_dist_es/* _json */.Ss)(body);
const exception = new ResourceNotFoundException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return (0,smithy_client_dist_es/* decorateServiceException */.Mw)(exception, body);
};
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
const body = parsedOutput.body;
const deserialized = (0,smithy_client_dist_es/* _json */.Ss)(body);
const exception = new TooManyRequestsException({
$metadata: deserializeMetadata(parsedOutput),
...deserialized,
});
return (0,smithy_client_dist_es/* decorateServiceException */.Mw)(exception, body);
};
const de_Credentials = (output, context) => {
return (0,smithy_client_dist_es/* take */.s)(output, {
AccessKeyId: smithy_client_dist_es/* expectString */.lK,
Expiration: (_) => (0,smithy_client_dist_es/* expectNonNull */.Y0)((0,smithy_client_dist_es/* parseEpochTimestamp */.l3)((0,smithy_client_dist_es/* expectNumber */.r$)(_))),
SecretKey: smithy_client_dist_es/* expectString */.lK,
SessionToken: smithy_client_dist_es/* expectString */.lK,
});
};
const de_GetCredentialsForIdentityResponse = (output, context) => {
return (0,smithy_client_dist_es/* take */.s)(output, {
Credentials: (_) => de_Credentials(_, context),
IdentityId: smithy_client_dist_es/* expectString */.lK,
});
};
const de_IdentitiesList = (output, context) => {
const retVal = (output || [])
.filter((e) => e != null)
.map((entry) => {
return de_IdentityDescription(entry, context);
});
return retVal;
};
const de_IdentityDescription = (output, context) => {
return take(output, {
CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
IdentityId: __expectString,
LastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
Logins: _json,
});
};
const de_ListIdentitiesResponse = (output, context) => {
return take(output, {
Identities: (_) => de_IdentitiesList(_, context),
IdentityPoolId: __expectString,
NextToken: __expectString,
});
};
const deserializeMetadata = (output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"],
});
const Aws_json1_1_collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
const throwDefaultError = (0,smithy_client_dist_es/* withBaseException */.jr)(CognitoIdentityServiceException);
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents = {
protocol,
hostname,
port,
method: "POST",
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
contents.hostname = resolvedHostname;
}
if (body !== undefined) {
contents.body = body;
}
return new protocol_http_dist_es/* HttpRequest */.Kd(contents);
};
function sharedHeaders(operation) {
return {
"content-type": "application/x-amz-json-1.1",
"x-amz-target": `AWSCognitoIdentityService.${operation}`,
};
}
;// CONCATENATED MODULE: ./node_modules/@aws-sdk/client-cognito-identity/dist-es/commands/GetCredentialsForIdentityCommand.js
class GetCredentialsForIdentityCommand extends smithy_client_dist_es/* Command */.uB
.classBuilder()
.ep({
...EndpointParameters/* commonParams */.S,
})
.m(function (Command, cs, config, o) {
return [
(0,middleware_serde_dist_es/* getSerdePlugin */.TM)(config, this.serialize, this.deserialize),
(0,dist_es/* getEndpointPlugin */.rD)(config, Command.getEndpointParameterInstructions()),
];
})
.s("AWSCognitoIdentityService", "GetCredentialsForIdentity", {})
.n("CognitoIdentityClient", "GetCredentialsForIdentityCommand")
.f(void 0, void 0)
.ser(se_GetCredentialsForIdentityCommand)
.de(de_GetCredentialsForIdentityCommand)
.build() {
}
;// CONCATENATED MODULE: ./node_modules/@aws-sdk/client-cognito-identity/dist-es/commands/GetIdCommand.js
class GetIdCommand extends smithy_client_dist_es/* Command */.uB
.classBuilder()
.ep({
...EndpointParameters/* commonParams */.S,
})
.m(function (Command, cs, config, o) {
return [
(0,middleware_serde_dist_es/* getSerdePlugin */.TM)(config, this.serialize, this.deserialize),
(0,dist_es/* getEndpointPlugin */.rD)(config, Command.getEndpointParameterInstructions()),
];
})
.s("AWSCognitoIdentityService", "GetId", {})
.n("CognitoIdentityClient", "GetIdCommand")
.f(void 0, void 0)
.ser(se_GetIdCommand)
.de(de_GetIdCommand)
.build() {
}
// EXTERNAL MODULE: ./node_modules/@aws-sdk/client-cognito-identity/dist-es/CognitoIdentityClient.js + 8 modules
var CognitoIdentityClient = __webpack_require__(636);
;// CONCATENATED MODULE: ./node_modules/@aws-sdk/credential-provider-cognito-identity/dist-es/loadCognitoIdentity.js
/***/ })
}]);