@aws-sdk/client-clouddirectory 3.42.0 → 3.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,4 @@
1
1
  import { __assign } from "tslib";
2
- export var AccessDeniedException;
3
- (function (AccessDeniedException) {
4
- AccessDeniedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
5
- })(AccessDeniedException || (AccessDeniedException = {}));
6
2
  export var AttributeKey;
7
3
  (function (AttributeKey) {
8
4
  AttributeKey.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -60,38 +56,6 @@ export var AddFacetToObjectResponse;
60
56
  (function (AddFacetToObjectResponse) {
61
57
  AddFacetToObjectResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
62
58
  })(AddFacetToObjectResponse || (AddFacetToObjectResponse = {}));
63
- export var DirectoryNotEnabledException;
64
- (function (DirectoryNotEnabledException) {
65
- DirectoryNotEnabledException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
66
- })(DirectoryNotEnabledException || (DirectoryNotEnabledException = {}));
67
- export var FacetValidationException;
68
- (function (FacetValidationException) {
69
- FacetValidationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
70
- })(FacetValidationException || (FacetValidationException = {}));
71
- export var InternalServiceException;
72
- (function (InternalServiceException) {
73
- InternalServiceException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
74
- })(InternalServiceException || (InternalServiceException = {}));
75
- export var InvalidArnException;
76
- (function (InvalidArnException) {
77
- InvalidArnException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
78
- })(InvalidArnException || (InvalidArnException = {}));
79
- export var LimitExceededException;
80
- (function (LimitExceededException) {
81
- LimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
82
- })(LimitExceededException || (LimitExceededException = {}));
83
- export var ResourceNotFoundException;
84
- (function (ResourceNotFoundException) {
85
- ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
86
- })(ResourceNotFoundException || (ResourceNotFoundException = {}));
87
- export var RetryableConflictException;
88
- (function (RetryableConflictException) {
89
- RetryableConflictException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
90
- })(RetryableConflictException || (RetryableConflictException = {}));
91
- export var ValidationException;
92
- (function (ValidationException) {
93
- ValidationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
94
- })(ValidationException || (ValidationException = {}));
95
59
  export var ApplySchemaRequest;
96
60
  (function (ApplySchemaRequest) {
97
61
  ApplySchemaRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -100,14 +64,6 @@ export var ApplySchemaResponse;
100
64
  (function (ApplySchemaResponse) {
101
65
  ApplySchemaResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
102
66
  })(ApplySchemaResponse || (ApplySchemaResponse = {}));
103
- export var InvalidAttachmentException;
104
- (function (InvalidAttachmentException) {
105
- InvalidAttachmentException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
106
- })(InvalidAttachmentException || (InvalidAttachmentException = {}));
107
- export var SchemaAlreadyExistsException;
108
- (function (SchemaAlreadyExistsException) {
109
- SchemaAlreadyExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
110
- })(SchemaAlreadyExistsException || (SchemaAlreadyExistsException = {}));
111
67
  export var AttachObjectRequest;
112
68
  (function (AttachObjectRequest) {
113
69
  AttachObjectRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -116,10 +72,6 @@ export var AttachObjectResponse;
116
72
  (function (AttachObjectResponse) {
117
73
  AttachObjectResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
118
74
  })(AttachObjectResponse || (AttachObjectResponse = {}));
119
- export var LinkNameAlreadyInUseException;
120
- (function (LinkNameAlreadyInUseException) {
121
- LinkNameAlreadyInUseException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
122
- })(LinkNameAlreadyInUseException || (LinkNameAlreadyInUseException = {}));
123
75
  export var AttachPolicyRequest;
124
76
  (function (AttachPolicyRequest) {
125
77
  AttachPolicyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -128,10 +80,6 @@ export var AttachPolicyResponse;
128
80
  (function (AttachPolicyResponse) {
129
81
  AttachPolicyResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
130
82
  })(AttachPolicyResponse || (AttachPolicyResponse = {}));
131
- export var NotPolicyException;
132
- (function (NotPolicyException) {
133
- NotPolicyException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
134
- })(NotPolicyException || (NotPolicyException = {}));
135
83
  export var AttachToIndexRequest;
136
84
  (function (AttachToIndexRequest) {
137
85
  AttachToIndexRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -140,14 +88,6 @@ export var AttachToIndexResponse;
140
88
  (function (AttachToIndexResponse) {
141
89
  AttachToIndexResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
142
90
  })(AttachToIndexResponse || (AttachToIndexResponse = {}));
143
- export var IndexedAttributeMissingException;
144
- (function (IndexedAttributeMissingException) {
145
- IndexedAttributeMissingException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
146
- })(IndexedAttributeMissingException || (IndexedAttributeMissingException = {}));
147
- export var NotIndexException;
148
- (function (NotIndexException) {
149
- NotIndexException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
150
- })(NotIndexException || (NotIndexException = {}));
151
91
  export var AttributeNameAndValue;
152
92
  (function (AttributeNameAndValue) {
153
93
  AttributeNameAndValue.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Value && { Value: TypedAttributeValue.filterSensitiveLog(obj.Value) }))); };
@@ -416,10 +356,6 @@ export var BatchWriteExceptionType;
416
356
  BatchWriteExceptionType["UnsupportedIndexTypeException"] = "UnsupportedIndexTypeException";
417
357
  BatchWriteExceptionType["ValidationException"] = "ValidationException";
418
358
  })(BatchWriteExceptionType || (BatchWriteExceptionType = {}));
419
- export var BatchWriteException;
420
- (function (BatchWriteException) {
421
- BatchWriteException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
422
- })(BatchWriteException || (BatchWriteException = {}));
423
359
  export var BatchAddFacetToObject;
424
360
  (function (BatchAddFacetToObject) {
425
361
  BatchAddFacetToObject.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.ObjectAttributeList && {
@@ -611,10 +547,6 @@ export var CreateDirectoryResponse;
611
547
  (function (CreateDirectoryResponse) {
612
548
  CreateDirectoryResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
613
549
  })(CreateDirectoryResponse || (CreateDirectoryResponse = {}));
614
- export var DirectoryAlreadyExistsException;
615
- (function (DirectoryAlreadyExistsException) {
616
- DirectoryAlreadyExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
617
- })(DirectoryAlreadyExistsException || (DirectoryAlreadyExistsException = {}));
618
550
  export var RuleType;
619
551
  (function (RuleType) {
620
552
  RuleType["BINARY_LENGTH"] = "BINARY_LENGTH";
@@ -674,14 +606,6 @@ export var CreateFacetResponse;
674
606
  (function (CreateFacetResponse) {
675
607
  CreateFacetResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
676
608
  })(CreateFacetResponse || (CreateFacetResponse = {}));
677
- export var FacetAlreadyExistsException;
678
- (function (FacetAlreadyExistsException) {
679
- FacetAlreadyExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
680
- })(FacetAlreadyExistsException || (FacetAlreadyExistsException = {}));
681
- export var InvalidRuleException;
682
- (function (InvalidRuleException) {
683
- InvalidRuleException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
684
- })(InvalidRuleException || (InvalidRuleException = {}));
685
609
  export var CreateIndexRequest;
686
610
  (function (CreateIndexRequest) {
687
611
  CreateIndexRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -690,10 +614,6 @@ export var CreateIndexResponse;
690
614
  (function (CreateIndexResponse) {
691
615
  CreateIndexResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
692
616
  })(CreateIndexResponse || (CreateIndexResponse = {}));
693
- export var UnsupportedIndexTypeException;
694
- (function (UnsupportedIndexTypeException) {
695
- UnsupportedIndexTypeException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
696
- })(UnsupportedIndexTypeException || (UnsupportedIndexTypeException = {}));
697
617
  export var CreateObjectRequest;
698
618
  (function (CreateObjectRequest) {
699
619
  CreateObjectRequest.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.ObjectAttributeList && {
@@ -738,14 +658,6 @@ export var DeleteDirectoryResponse;
738
658
  (function (DeleteDirectoryResponse) {
739
659
  DeleteDirectoryResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
740
660
  })(DeleteDirectoryResponse || (DeleteDirectoryResponse = {}));
741
- export var DirectoryDeletedException;
742
- (function (DirectoryDeletedException) {
743
- DirectoryDeletedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
744
- })(DirectoryDeletedException || (DirectoryDeletedException = {}));
745
- export var DirectoryNotDisabledException;
746
- (function (DirectoryNotDisabledException) {
747
- DirectoryNotDisabledException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
748
- })(DirectoryNotDisabledException || (DirectoryNotDisabledException = {}));
749
661
  export var DeleteFacetRequest;
750
662
  (function (DeleteFacetRequest) {
751
663
  DeleteFacetRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -754,14 +666,6 @@ export var DeleteFacetResponse;
754
666
  (function (DeleteFacetResponse) {
755
667
  DeleteFacetResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
756
668
  })(DeleteFacetResponse || (DeleteFacetResponse = {}));
757
- export var FacetInUseException;
758
- (function (FacetInUseException) {
759
- FacetInUseException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
760
- })(FacetInUseException || (FacetInUseException = {}));
761
- export var FacetNotFoundException;
762
- (function (FacetNotFoundException) {
763
- FacetNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
764
- })(FacetNotFoundException || (FacetNotFoundException = {}));
765
669
  export var DeleteObjectRequest;
766
670
  (function (DeleteObjectRequest) {
767
671
  DeleteObjectRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -770,10 +674,6 @@ export var DeleteObjectResponse;
770
674
  (function (DeleteObjectResponse) {
771
675
  DeleteObjectResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
772
676
  })(DeleteObjectResponse || (DeleteObjectResponse = {}));
773
- export var ObjectNotDetachedException;
774
- (function (ObjectNotDetachedException) {
775
- ObjectNotDetachedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
776
- })(ObjectNotDetachedException || (ObjectNotDetachedException = {}));
777
677
  export var DeleteSchemaRequest;
778
678
  (function (DeleteSchemaRequest) {
779
679
  DeleteSchemaRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -782,10 +682,6 @@ export var DeleteSchemaResponse;
782
682
  (function (DeleteSchemaResponse) {
783
683
  DeleteSchemaResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
784
684
  })(DeleteSchemaResponse || (DeleteSchemaResponse = {}));
785
- export var StillContainsLinksException;
786
- (function (StillContainsLinksException) {
787
- StillContainsLinksException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
788
- })(StillContainsLinksException || (StillContainsLinksException = {}));
789
685
  export var DeleteTypedLinkFacetRequest;
790
686
  (function (DeleteTypedLinkFacetRequest) {
791
687
  DeleteTypedLinkFacetRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -802,10 +698,6 @@ export var DetachFromIndexResponse;
802
698
  (function (DetachFromIndexResponse) {
803
699
  DetachFromIndexResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
804
700
  })(DetachFromIndexResponse || (DetachFromIndexResponse = {}));
805
- export var ObjectAlreadyDetachedException;
806
- (function (ObjectAlreadyDetachedException) {
807
- ObjectAlreadyDetachedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
808
- })(ObjectAlreadyDetachedException || (ObjectAlreadyDetachedException = {}));
809
701
  export var DetachObjectRequest;
810
702
  (function (DetachObjectRequest) {
811
703
  DetachObjectRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -814,10 +706,6 @@ export var DetachObjectResponse;
814
706
  (function (DetachObjectResponse) {
815
707
  DetachObjectResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
816
708
  })(DetachObjectResponse || (DetachObjectResponse = {}));
817
- export var NotNodeException;
818
- (function (NotNodeException) {
819
- NotNodeException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
820
- })(NotNodeException || (NotNodeException = {}));
821
709
  export var DetachPolicyRequest;
822
710
  (function (DetachPolicyRequest) {
823
711
  DetachPolicyRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -928,10 +816,6 @@ export var GetTypedLinkFacetInformationResponse;
928
816
  (function (GetTypedLinkFacetInformationResponse) {
929
817
  GetTypedLinkFacetInformationResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
930
818
  })(GetTypedLinkFacetInformationResponse || (GetTypedLinkFacetInformationResponse = {}));
931
- export var InvalidNextTokenException;
932
- (function (InvalidNextTokenException) {
933
- InvalidNextTokenException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
934
- })(InvalidNextTokenException || (InvalidNextTokenException = {}));
935
819
  export var ListAppliedSchemaArnsRequest;
936
820
  (function (ListAppliedSchemaArnsRequest) {
937
821
  ListAppliedSchemaArnsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1032,10 +916,6 @@ export var ListObjectParentPathsResponse;
1032
916
  (function (ListObjectParentPathsResponse) {
1033
917
  ListObjectParentPathsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1034
918
  })(ListObjectParentPathsResponse || (ListObjectParentPathsResponse = {}));
1035
- export var CannotListParentOfRootException;
1036
- (function (CannotListParentOfRootException) {
1037
- CannotListParentOfRootException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1038
- })(CannotListParentOfRootException || (CannotListParentOfRootException = {}));
1039
919
  export var ListObjectParentsRequest;
1040
920
  (function (ListObjectParentsRequest) {
1041
921
  ListObjectParentsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1078,10 +958,6 @@ export var ListPublishedSchemaArnsResponse;
1078
958
  (function (ListPublishedSchemaArnsResponse) {
1079
959
  ListPublishedSchemaArnsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1080
960
  })(ListPublishedSchemaArnsResponse || (ListPublishedSchemaArnsResponse = {}));
1081
- export var InvalidTaggingRequestException;
1082
- (function (InvalidTaggingRequestException) {
1083
- InvalidTaggingRequestException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1084
- })(InvalidTaggingRequestException || (InvalidTaggingRequestException = {}));
1085
961
  export var ListTagsForResourceRequest;
1086
962
  (function (ListTagsForResourceRequest) {
1087
963
  ListTagsForResourceRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1128,14 +1004,6 @@ export var PublishSchemaResponse;
1128
1004
  (function (PublishSchemaResponse) {
1129
1005
  PublishSchemaResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1130
1006
  })(PublishSchemaResponse || (PublishSchemaResponse = {}));
1131
- export var SchemaAlreadyPublishedException;
1132
- (function (SchemaAlreadyPublishedException) {
1133
- SchemaAlreadyPublishedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1134
- })(SchemaAlreadyPublishedException || (SchemaAlreadyPublishedException = {}));
1135
- export var InvalidSchemaDocException;
1136
- (function (InvalidSchemaDocException) {
1137
- InvalidSchemaDocException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1138
- })(InvalidSchemaDocException || (InvalidSchemaDocException = {}));
1139
1007
  export var PutSchemaFromJsonRequest;
1140
1008
  (function (PutSchemaFromJsonRequest) {
1141
1009
  PutSchemaFromJsonRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1168,10 +1036,6 @@ export var UntagResourceResponse;
1168
1036
  (function (UntagResourceResponse) {
1169
1037
  UntagResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1170
1038
  })(UntagResourceResponse || (UntagResourceResponse = {}));
1171
- export var InvalidFacetUpdateException;
1172
- (function (InvalidFacetUpdateException) {
1173
- InvalidFacetUpdateException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1174
- })(InvalidFacetUpdateException || (InvalidFacetUpdateException = {}));
1175
1039
  export var FacetAttributeUpdate;
1176
1040
  (function (FacetAttributeUpdate) {
1177
1041
  FacetAttributeUpdate.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Attribute && { Attribute: FacetAttribute.filterSensitiveLog(obj.Attribute) }))); };
@@ -1230,10 +1094,6 @@ export var UpdateTypedLinkFacetResponse;
1230
1094
  (function (UpdateTypedLinkFacetResponse) {
1231
1095
  UpdateTypedLinkFacetResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1232
1096
  })(UpdateTypedLinkFacetResponse || (UpdateTypedLinkFacetResponse = {}));
1233
- export var IncompatibleSchemaException;
1234
- (function (IncompatibleSchemaException) {
1235
- IncompatibleSchemaException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
1236
- })(IncompatibleSchemaException || (IncompatibleSchemaException = {}));
1237
1097
  export var UpgradeAppliedSchemaRequest;
1238
1098
  (function (UpgradeAppliedSchemaRequest) {
1239
1099
  UpgradeAppliedSchemaRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,8 +1,8 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
5
- import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
6
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
7
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
8
8
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
10
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
11
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
13
15
  export var getRuntimeConfig = function (config) {
14
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ var defaultsMode = resolveDefaultsModeConfig(config);
18
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
15
19
  var clientSharedValues = getSharedRuntimeConfig(config);
16
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
20
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
+ switch (_a.label) {
22
+ case 0: return [4, defaultConfigProvider()];
23
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
+ }
25
+ }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
17
26
  };
@@ -1,21 +1,28 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
4
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
5
5
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
6
6
  import { Hash } from "@aws-sdk/hash-node";
7
- import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
7
+ import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
8
8
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
9
- import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
10
10
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
11
11
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
12
12
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
13
13
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
14
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
- import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
15
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
16
17
  export var getRuntimeConfig = function (config) {
17
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
- emitWarningIfUnsupportedVersion(process.version);
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
19
21
  var clientSharedValues = getSharedRuntimeConfig(config);
20
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
22
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
23
+ switch (_a.label) {
24
+ case 0: return [4, defaultConfigProvider()];
25
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
26
+ }
27
+ }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
21
28
  };
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
4
4
  import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
- import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
7
+ import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
8
  import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { AddFacetToObjectCommandInput, AddFacetToObjectCommandOutput } from "./commands/AddFacetToObjectCommand";
10
10
  import { ApplySchemaCommandInput, ApplySchemaCommandOutput } from "./commands/ApplySchemaCommand";
@@ -174,6 +174,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
174
174
  * @internal
175
175
  */
176
176
  defaultUserAgentProvider?: Provider<__UserAgent>;
177
+ /**
178
+ * The {@link DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
179
+ */
180
+ defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
177
181
  }
178
182
  declare type CloudDirectoryClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
179
183
  /**