@aws-sdk/client-connectcases 3.511.0 → 3.513.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.
@@ -0,0 +1 @@
1
+ module.exports = require("../index.js");
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveHttpAuthSchemeConfig = exports.defaultConnectCasesHttpAuthSchemeProvider = exports.defaultConnectCasesHttpAuthSchemeParametersProvider = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const util_middleware_1 = require("@smithy/util-middleware");
6
+ const defaultConnectCasesHttpAuthSchemeParametersProvider = async (config, context, input) => {
7
+ return {
8
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
9
+ region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
10
+ (() => {
11
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
12
+ })(),
13
+ };
14
+ };
15
+ exports.defaultConnectCasesHttpAuthSchemeParametersProvider = defaultConnectCasesHttpAuthSchemeParametersProvider;
16
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
17
+ return {
18
+ schemeId: "aws.auth#sigv4",
19
+ signingProperties: {
20
+ name: "cases",
21
+ region: authParameters.region,
22
+ },
23
+ propertiesExtractor: (config, context) => ({
24
+ signingProperties: {
25
+ config,
26
+ context,
27
+ },
28
+ }),
29
+ };
30
+ }
31
+ const defaultConnectCasesHttpAuthSchemeProvider = (authParameters) => {
32
+ const options = [];
33
+ switch (authParameters.operation) {
34
+ default: {
35
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
36
+ }
37
+ }
38
+ return options;
39
+ };
40
+ exports.defaultConnectCasesHttpAuthSchemeProvider = defaultConnectCasesHttpAuthSchemeProvider;
41
+ const resolveHttpAuthSchemeConfig = (config) => {
42
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
43
+ return {
44
+ ...config_0,
45
+ };
46
+ };
47
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
package/dist-cjs/index.js CHANGED
@@ -98,13 +98,14 @@ module.exports = __toCommonJS(src_exports);
98
98
  var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
99
99
  var import_middleware_logger = require("@aws-sdk/middleware-logger");
100
100
  var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
101
- var import_middleware_signing = require("@aws-sdk/middleware-signing");
102
101
  var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
103
102
  var import_config_resolver = require("@smithy/config-resolver");
103
+ var import_core = require("@smithy/core");
104
104
  var import_middleware_content_length = require("@smithy/middleware-content-length");
105
105
  var import_middleware_endpoint = require("@smithy/middleware-endpoint");
106
106
  var import_middleware_retry = require("@smithy/middleware-retry");
107
107
 
108
+ var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
108
109
 
109
110
  // src/endpoint/EndpointParameters.ts
110
111
  var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
@@ -129,19 +130,62 @@ var import_runtimeConfig = require("././runtimeConfig");
129
130
  var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
130
131
  var import_protocol_http = require("@smithy/protocol-http");
131
132
  var import_smithy_client = require("@smithy/smithy-client");
133
+
134
+ // src/auth/httpAuthExtensionConfiguration.ts
135
+ var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
136
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
137
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
138
+ let _credentials = runtimeConfig.credentials;
139
+ return {
140
+ setHttpAuthScheme(httpAuthScheme) {
141
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
142
+ if (index === -1) {
143
+ _httpAuthSchemes.push(httpAuthScheme);
144
+ } else {
145
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
146
+ }
147
+ },
148
+ httpAuthSchemes() {
149
+ return _httpAuthSchemes;
150
+ },
151
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
152
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
153
+ },
154
+ httpAuthSchemeProvider() {
155
+ return _httpAuthSchemeProvider;
156
+ },
157
+ setCredentials(credentials) {
158
+ _credentials = credentials;
159
+ },
160
+ credentials() {
161
+ return _credentials;
162
+ }
163
+ };
164
+ }, "getHttpAuthExtensionConfiguration");
165
+ var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
166
+ return {
167
+ httpAuthSchemes: config.httpAuthSchemes(),
168
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
169
+ credentials: config.credentials()
170
+ };
171
+ }, "resolveHttpAuthRuntimeConfig");
172
+
173
+ // src/runtimeExtensions.ts
132
174
  var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
133
175
  var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
134
176
  const extensionConfiguration = {
135
177
  ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
136
178
  ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
137
- ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
179
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
180
+ ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig))
138
181
  };
139
182
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
140
183
  return {
141
184
  ...runtimeConfig,
142
185
  ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
143
186
  ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
144
- ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
187
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
188
+ ...resolveHttpAuthRuntimeConfig(extensionConfiguration)
145
189
  };
146
190
  }, "resolveRuntimeExtensions");
147
191
 
@@ -154,8 +198,8 @@ var _ConnectCasesClient = class _ConnectCasesClient extends import_smithy_client
154
198
  const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
155
199
  const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
156
200
  const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
157
- const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
158
- const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
201
+ const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);
202
+ const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
159
203
  const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
160
204
  super(_config_8);
161
205
  this.config = _config_8;
@@ -164,8 +208,14 @@ var _ConnectCasesClient = class _ConnectCasesClient extends import_smithy_client
164
208
  this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
165
209
  this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
166
210
  this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
167
- this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
168
211
  this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
212
+ this.middlewareStack.use(
213
+ (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
214
+ httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
215
+ identityProviderConfigProvider: this.getIdentityProviderConfigProvider()
216
+ })
217
+ );
218
+ this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
169
219
  }
170
220
  /**
171
221
  * Destroy underlying resources, like sockets. It's usually not necessary to do this.
@@ -175,6 +225,14 @@ var _ConnectCasesClient = class _ConnectCasesClient extends import_smithy_client
175
225
  destroy() {
176
226
  super.destroy();
177
227
  }
228
+ getDefaultHttpAuthSchemeParametersProvider() {
229
+ return import_httpAuthSchemeProvider.defaultConnectCasesHttpAuthSchemeParametersProvider;
230
+ }
231
+ getIdentityProviderConfigProvider() {
232
+ return async (config) => new import_core.DefaultIdentityProviderConfig({
233
+ "aws.auth#sigv4": config.credentials
234
+ });
235
+ }
178
236
  };
179
237
  __name(_ConnectCasesClient, "ConnectCasesClient");
180
238
  var ConnectCasesClient = _ConnectCasesClient;
@@ -189,8 +247,8 @@ var import_middleware_serde = require("@smithy/middleware-serde");
189
247
  var import_types = require("@smithy/types");
190
248
 
191
249
  // src/protocols/Aws_restJson1.ts
192
- var import_core = require("@aws-sdk/core");
193
- var import_core2 = require("@smithy/core");
250
+ var import_core2 = require("@aws-sdk/core");
251
+
194
252
 
195
253
  var import_uuid = require("uuid");
196
254
 
@@ -492,7 +550,7 @@ var CaseFilter;
492
550
 
493
551
  // src/protocols/Aws_restJson1.ts
494
552
  var se_BatchGetFieldCommand = /* @__PURE__ */ __name(async (input, context) => {
495
- const b = (0, import_core2.requestBuilder)(input, context);
553
+ const b = (0, import_core.requestBuilder)(input, context);
496
554
  const headers = {
497
555
  "content-type": "application/json"
498
556
  };
@@ -508,7 +566,7 @@ var se_BatchGetFieldCommand = /* @__PURE__ */ __name(async (input, context) => {
508
566
  return b.build();
509
567
  }, "se_BatchGetFieldCommand");
510
568
  var se_BatchPutFieldOptionsCommand = /* @__PURE__ */ __name(async (input, context) => {
511
- const b = (0, import_core2.requestBuilder)(input, context);
569
+ const b = (0, import_core.requestBuilder)(input, context);
512
570
  const headers = {
513
571
  "content-type": "application/json"
514
572
  };
@@ -525,7 +583,7 @@ var se_BatchPutFieldOptionsCommand = /* @__PURE__ */ __name(async (input, contex
525
583
  return b.build();
526
584
  }, "se_BatchPutFieldOptionsCommand");
527
585
  var se_CreateCaseCommand = /* @__PURE__ */ __name(async (input, context) => {
528
- const b = (0, import_core2.requestBuilder)(input, context);
586
+ const b = (0, import_core.requestBuilder)(input, context);
529
587
  const headers = {
530
588
  "content-type": "application/json"
531
589
  };
@@ -544,7 +602,7 @@ var se_CreateCaseCommand = /* @__PURE__ */ __name(async (input, context) => {
544
602
  return b.build();
545
603
  }, "se_CreateCaseCommand");
546
604
  var se_CreateDomainCommand = /* @__PURE__ */ __name(async (input, context) => {
547
- const b = (0, import_core2.requestBuilder)(input, context);
605
+ const b = (0, import_core.requestBuilder)(input, context);
548
606
  const headers = {
549
607
  "content-type": "application/json"
550
608
  };
@@ -559,7 +617,7 @@ var se_CreateDomainCommand = /* @__PURE__ */ __name(async (input, context) => {
559
617
  return b.build();
560
618
  }, "se_CreateDomainCommand");
561
619
  var se_CreateFieldCommand = /* @__PURE__ */ __name(async (input, context) => {
562
- const b = (0, import_core2.requestBuilder)(input, context);
620
+ const b = (0, import_core.requestBuilder)(input, context);
563
621
  const headers = {
564
622
  "content-type": "application/json"
565
623
  };
@@ -577,7 +635,7 @@ var se_CreateFieldCommand = /* @__PURE__ */ __name(async (input, context) => {
577
635
  return b.build();
578
636
  }, "se_CreateFieldCommand");
579
637
  var se_CreateLayoutCommand = /* @__PURE__ */ __name(async (input, context) => {
580
- const b = (0, import_core2.requestBuilder)(input, context);
638
+ const b = (0, import_core.requestBuilder)(input, context);
581
639
  const headers = {
582
640
  "content-type": "application/json"
583
641
  };
@@ -594,7 +652,7 @@ var se_CreateLayoutCommand = /* @__PURE__ */ __name(async (input, context) => {
594
652
  return b.build();
595
653
  }, "se_CreateLayoutCommand");
596
654
  var se_CreateRelatedItemCommand = /* @__PURE__ */ __name(async (input, context) => {
597
- const b = (0, import_core2.requestBuilder)(input, context);
655
+ const b = (0, import_core.requestBuilder)(input, context);
598
656
  const headers = {
599
657
  "content-type": "application/json"
600
658
  };
@@ -613,7 +671,7 @@ var se_CreateRelatedItemCommand = /* @__PURE__ */ __name(async (input, context)
613
671
  return b.build();
614
672
  }, "se_CreateRelatedItemCommand");
615
673
  var se_CreateTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
616
- const b = (0, import_core2.requestBuilder)(input, context);
674
+ const b = (0, import_core.requestBuilder)(input, context);
617
675
  const headers = {
618
676
  "content-type": "application/json"
619
677
  };
@@ -633,7 +691,7 @@ var se_CreateTemplateCommand = /* @__PURE__ */ __name(async (input, context) =>
633
691
  return b.build();
634
692
  }, "se_CreateTemplateCommand");
635
693
  var se_DeleteDomainCommand = /* @__PURE__ */ __name(async (input, context) => {
636
- const b = (0, import_core2.requestBuilder)(input, context);
694
+ const b = (0, import_core.requestBuilder)(input, context);
637
695
  const headers = {};
638
696
  b.bp("/domains/{domainId}");
639
697
  b.p("domainId", () => input.domainId, "{domainId}", false);
@@ -642,7 +700,7 @@ var se_DeleteDomainCommand = /* @__PURE__ */ __name(async (input, context) => {
642
700
  return b.build();
643
701
  }, "se_DeleteDomainCommand");
644
702
  var se_GetCaseCommand = /* @__PURE__ */ __name(async (input, context) => {
645
- const b = (0, import_core2.requestBuilder)(input, context);
703
+ const b = (0, import_core.requestBuilder)(input, context);
646
704
  const headers = {
647
705
  "content-type": "application/json"
648
706
  };
@@ -660,7 +718,7 @@ var se_GetCaseCommand = /* @__PURE__ */ __name(async (input, context) => {
660
718
  return b.build();
661
719
  }, "se_GetCaseCommand");
662
720
  var se_GetCaseAuditEventsCommand = /* @__PURE__ */ __name(async (input, context) => {
663
- const b = (0, import_core2.requestBuilder)(input, context);
721
+ const b = (0, import_core.requestBuilder)(input, context);
664
722
  const headers = {
665
723
  "content-type": "application/json"
666
724
  };
@@ -678,7 +736,7 @@ var se_GetCaseAuditEventsCommand = /* @__PURE__ */ __name(async (input, context)
678
736
  return b.build();
679
737
  }, "se_GetCaseAuditEventsCommand");
680
738
  var se_GetCaseEventConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
681
- const b = (0, import_core2.requestBuilder)(input, context);
739
+ const b = (0, import_core.requestBuilder)(input, context);
682
740
  const headers = {};
683
741
  b.bp("/domains/{domainId}/case-event-configuration");
684
742
  b.p("domainId", () => input.domainId, "{domainId}", false);
@@ -687,7 +745,7 @@ var se_GetCaseEventConfigurationCommand = /* @__PURE__ */ __name(async (input, c
687
745
  return b.build();
688
746
  }, "se_GetCaseEventConfigurationCommand");
689
747
  var se_GetDomainCommand = /* @__PURE__ */ __name(async (input, context) => {
690
- const b = (0, import_core2.requestBuilder)(input, context);
748
+ const b = (0, import_core.requestBuilder)(input, context);
691
749
  const headers = {};
692
750
  b.bp("/domains/{domainId}");
693
751
  b.p("domainId", () => input.domainId, "{domainId}", false);
@@ -696,7 +754,7 @@ var se_GetDomainCommand = /* @__PURE__ */ __name(async (input, context) => {
696
754
  return b.build();
697
755
  }, "se_GetDomainCommand");
698
756
  var se_GetLayoutCommand = /* @__PURE__ */ __name(async (input, context) => {
699
- const b = (0, import_core2.requestBuilder)(input, context);
757
+ const b = (0, import_core.requestBuilder)(input, context);
700
758
  const headers = {};
701
759
  b.bp("/domains/{domainId}/layouts/{layoutId}");
702
760
  b.p("domainId", () => input.domainId, "{domainId}", false);
@@ -706,7 +764,7 @@ var se_GetLayoutCommand = /* @__PURE__ */ __name(async (input, context) => {
706
764
  return b.build();
707
765
  }, "se_GetLayoutCommand");
708
766
  var se_GetTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
709
- const b = (0, import_core2.requestBuilder)(input, context);
767
+ const b = (0, import_core.requestBuilder)(input, context);
710
768
  const headers = {};
711
769
  b.bp("/domains/{domainId}/templates/{templateId}");
712
770
  b.p("domainId", () => input.domainId, "{domainId}", false);
@@ -716,7 +774,7 @@ var se_GetTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
716
774
  return b.build();
717
775
  }, "se_GetTemplateCommand");
718
776
  var se_ListCasesForContactCommand = /* @__PURE__ */ __name(async (input, context) => {
719
- const b = (0, import_core2.requestBuilder)(input, context);
777
+ const b = (0, import_core.requestBuilder)(input, context);
720
778
  const headers = {
721
779
  "content-type": "application/json"
722
780
  };
@@ -734,7 +792,7 @@ var se_ListCasesForContactCommand = /* @__PURE__ */ __name(async (input, context
734
792
  return b.build();
735
793
  }, "se_ListCasesForContactCommand");
736
794
  var se_ListDomainsCommand = /* @__PURE__ */ __name(async (input, context) => {
737
- const b = (0, import_core2.requestBuilder)(input, context);
795
+ const b = (0, import_core.requestBuilder)(input, context);
738
796
  const headers = {};
739
797
  b.bp("/domains-list");
740
798
  const query = (0, import_smithy_client.map)({
@@ -746,7 +804,7 @@ var se_ListDomainsCommand = /* @__PURE__ */ __name(async (input, context) => {
746
804
  return b.build();
747
805
  }, "se_ListDomainsCommand");
748
806
  var se_ListFieldOptionsCommand = /* @__PURE__ */ __name(async (input, context) => {
749
- const b = (0, import_core2.requestBuilder)(input, context);
807
+ const b = (0, import_core.requestBuilder)(input, context);
750
808
  const headers = {};
751
809
  b.bp("/domains/{domainId}/fields/{fieldId}/options-list");
752
810
  b.p("domainId", () => input.domainId, "{domainId}", false);
@@ -761,7 +819,7 @@ var se_ListFieldOptionsCommand = /* @__PURE__ */ __name(async (input, context) =
761
819
  return b.build();
762
820
  }, "se_ListFieldOptionsCommand");
763
821
  var se_ListFieldsCommand = /* @__PURE__ */ __name(async (input, context) => {
764
- const b = (0, import_core2.requestBuilder)(input, context);
822
+ const b = (0, import_core.requestBuilder)(input, context);
765
823
  const headers = {};
766
824
  b.bp("/domains/{domainId}/fields-list");
767
825
  b.p("domainId", () => input.domainId, "{domainId}", false);
@@ -774,7 +832,7 @@ var se_ListFieldsCommand = /* @__PURE__ */ __name(async (input, context) => {
774
832
  return b.build();
775
833
  }, "se_ListFieldsCommand");
776
834
  var se_ListLayoutsCommand = /* @__PURE__ */ __name(async (input, context) => {
777
- const b = (0, import_core2.requestBuilder)(input, context);
835
+ const b = (0, import_core.requestBuilder)(input, context);
778
836
  const headers = {};
779
837
  b.bp("/domains/{domainId}/layouts-list");
780
838
  b.p("domainId", () => input.domainId, "{domainId}", false);
@@ -787,7 +845,7 @@ var se_ListLayoutsCommand = /* @__PURE__ */ __name(async (input, context) => {
787
845
  return b.build();
788
846
  }, "se_ListLayoutsCommand");
789
847
  var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
790
- const b = (0, import_core2.requestBuilder)(input, context);
848
+ const b = (0, import_core.requestBuilder)(input, context);
791
849
  const headers = {};
792
850
  b.bp("/tags/{arn}");
793
851
  b.p("arn", () => input.arn, "{arn}", false);
@@ -796,7 +854,7 @@ var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context
796
854
  return b.build();
797
855
  }, "se_ListTagsForResourceCommand");
798
856
  var se_ListTemplatesCommand = /* @__PURE__ */ __name(async (input, context) => {
799
- const b = (0, import_core2.requestBuilder)(input, context);
857
+ const b = (0, import_core.requestBuilder)(input, context);
800
858
  const headers = {};
801
859
  b.bp("/domains/{domainId}/templates-list");
802
860
  b.p("domainId", () => input.domainId, "{domainId}", false);
@@ -810,7 +868,7 @@ var se_ListTemplatesCommand = /* @__PURE__ */ __name(async (input, context) => {
810
868
  return b.build();
811
869
  }, "se_ListTemplatesCommand");
812
870
  var se_PutCaseEventConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
813
- const b = (0, import_core2.requestBuilder)(input, context);
871
+ const b = (0, import_core.requestBuilder)(input, context);
814
872
  const headers = {
815
873
  "content-type": "application/json"
816
874
  };
@@ -826,7 +884,7 @@ var se_PutCaseEventConfigurationCommand = /* @__PURE__ */ __name(async (input, c
826
884
  return b.build();
827
885
  }, "se_PutCaseEventConfigurationCommand");
828
886
  var se_SearchCasesCommand = /* @__PURE__ */ __name(async (input, context) => {
829
- const b = (0, import_core2.requestBuilder)(input, context);
887
+ const b = (0, import_core.requestBuilder)(input, context);
830
888
  const headers = {
831
889
  "content-type": "application/json"
832
890
  };
@@ -847,7 +905,7 @@ var se_SearchCasesCommand = /* @__PURE__ */ __name(async (input, context) => {
847
905
  return b.build();
848
906
  }, "se_SearchCasesCommand");
849
907
  var se_SearchRelatedItemsCommand = /* @__PURE__ */ __name(async (input, context) => {
850
- const b = (0, import_core2.requestBuilder)(input, context);
908
+ const b = (0, import_core.requestBuilder)(input, context);
851
909
  const headers = {
852
910
  "content-type": "application/json"
853
911
  };
@@ -866,7 +924,7 @@ var se_SearchRelatedItemsCommand = /* @__PURE__ */ __name(async (input, context)
866
924
  return b.build();
867
925
  }, "se_SearchRelatedItemsCommand");
868
926
  var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
869
- const b = (0, import_core2.requestBuilder)(input, context);
927
+ const b = (0, import_core.requestBuilder)(input, context);
870
928
  const headers = {
871
929
  "content-type": "application/json"
872
930
  };
@@ -882,7 +940,7 @@ var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
882
940
  return b.build();
883
941
  }, "se_TagResourceCommand");
884
942
  var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
885
- const b = (0, import_core2.requestBuilder)(input, context);
943
+ const b = (0, import_core.requestBuilder)(input, context);
886
944
  const headers = {};
887
945
  b.bp("/tags/{arn}");
888
946
  b.p("arn", () => input.arn, "{arn}", false);
@@ -897,7 +955,7 @@ var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
897
955
  return b.build();
898
956
  }, "se_UntagResourceCommand");
899
957
  var se_UpdateCaseCommand = /* @__PURE__ */ __name(async (input, context) => {
900
- const b = (0, import_core2.requestBuilder)(input, context);
958
+ const b = (0, import_core.requestBuilder)(input, context);
901
959
  const headers = {
902
960
  "content-type": "application/json"
903
961
  };
@@ -915,7 +973,7 @@ var se_UpdateCaseCommand = /* @__PURE__ */ __name(async (input, context) => {
915
973
  return b.build();
916
974
  }, "se_UpdateCaseCommand");
917
975
  var se_UpdateFieldCommand = /* @__PURE__ */ __name(async (input, context) => {
918
- const b = (0, import_core2.requestBuilder)(input, context);
976
+ const b = (0, import_core.requestBuilder)(input, context);
919
977
  const headers = {
920
978
  "content-type": "application/json"
921
979
  };
@@ -933,7 +991,7 @@ var se_UpdateFieldCommand = /* @__PURE__ */ __name(async (input, context) => {
933
991
  return b.build();
934
992
  }, "se_UpdateFieldCommand");
935
993
  var se_UpdateLayoutCommand = /* @__PURE__ */ __name(async (input, context) => {
936
- const b = (0, import_core2.requestBuilder)(input, context);
994
+ const b = (0, import_core.requestBuilder)(input, context);
937
995
  const headers = {
938
996
  "content-type": "application/json"
939
997
  };
@@ -951,7 +1009,7 @@ var se_UpdateLayoutCommand = /* @__PURE__ */ __name(async (input, context) => {
951
1009
  return b.build();
952
1010
  }, "se_UpdateLayoutCommand");
953
1011
  var se_UpdateTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {
954
- const b = (0, import_core2.requestBuilder)(input, context);
1012
+ const b = (0, import_core.requestBuilder)(input, context);
955
1013
  const headers = {
956
1014
  "content-type": "application/json"
957
1015
  };
@@ -1175,7 +1233,7 @@ var de_GetLayoutCommand = /* @__PURE__ */ __name(async (output, context) => {
1175
1233
  });
1176
1234
  const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
1177
1235
  const doc = (0, import_smithy_client.take)(data, {
1178
- content: (_) => (0, import_smithy_client._json)((0, import_core.awsExpectUnion)(_)),
1236
+ content: (_) => (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(_)),
1179
1237
  layoutArn: import_smithy_client.expectString,
1180
1238
  layoutId: import_smithy_client.expectString,
1181
1239
  name: import_smithy_client.expectString,
@@ -1611,8 +1669,8 @@ var de_AuditEvent = /* @__PURE__ */ __name((output, context) => {
1611
1669
  var de_AuditEventField = /* @__PURE__ */ __name((output, context) => {
1612
1670
  return (0, import_smithy_client.take)(output, {
1613
1671
  eventFieldId: import_smithy_client.expectString,
1614
- newValue: (_) => de_AuditEventFieldValueUnion((0, import_core.awsExpectUnion)(_), context),
1615
- oldValue: (_) => de_AuditEventFieldValueUnion((0, import_core.awsExpectUnion)(_), context)
1672
+ newValue: (_) => de_AuditEventFieldValueUnion((0, import_core2.awsExpectUnion)(_), context),
1673
+ oldValue: (_) => de_AuditEventFieldValueUnion((0, import_core2.awsExpectUnion)(_), context)
1616
1674
  });
1617
1675
  }, "de_AuditEventField");
1618
1676
  var de_AuditEventFieldList = /* @__PURE__ */ __name((output, context) => {
@@ -1669,7 +1727,7 @@ var de_ContactContent = /* @__PURE__ */ __name((output, context) => {
1669
1727
  var de_FieldValue = /* @__PURE__ */ __name((output, context) => {
1670
1728
  return (0, import_smithy_client.take)(output, {
1671
1729
  id: import_smithy_client.expectString,
1672
- value: (_) => de_FieldValueUnion((0, import_core.awsExpectUnion)(_), context)
1730
+ value: (_) => de_FieldValueUnion((0, import_core2.awsExpectUnion)(_), context)
1673
1731
  });
1674
1732
  }, "de_FieldValue");
1675
1733
  var de_FieldValueList = /* @__PURE__ */ __name((output, context) => {
@@ -1742,8 +1800,8 @@ var de_SearchCasesResponseItemList = /* @__PURE__ */ __name((output, context) =>
1742
1800
  var de_SearchRelatedItemsResponseItem = /* @__PURE__ */ __name((output, context) => {
1743
1801
  return (0, import_smithy_client.take)(output, {
1744
1802
  associationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
1745
- content: (_) => de_RelatedItemContent((0, import_core.awsExpectUnion)(_), context),
1746
- performedBy: (_) => (0, import_smithy_client._json)((0, import_core.awsExpectUnion)(_)),
1803
+ content: (_) => de_RelatedItemContent((0, import_core2.awsExpectUnion)(_), context),
1804
+ performedBy: (_) => (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(_)),
1747
1805
  relatedItemId: import_smithy_client.expectString,
1748
1806
  tags: (_) => de_Tags(_, context),
1749
1807
  type: import_smithy_client.expectString
@@ -2387,44 +2445,44 @@ var ConnectCases = _ConnectCases;
2387
2445
  (0, import_smithy_client.createAggregatedClient)(commands, ConnectCases);
2388
2446
 
2389
2447
  // src/pagination/GetCaseAuditEventsPaginator.ts
2390
- var import_core3 = require("@smithy/core");
2391
- var paginateGetCaseAuditEvents = (0, import_core3.createPaginator)(ConnectCasesClient, GetCaseAuditEventsCommand, "nextToken", "nextToken", "maxResults");
2448
+
2449
+ var paginateGetCaseAuditEvents = (0, import_core.createPaginator)(ConnectCasesClient, GetCaseAuditEventsCommand, "nextToken", "nextToken", "maxResults");
2392
2450
 
2393
2451
  // src/pagination/GetCasePaginator.ts
2394
- var import_core4 = require("@smithy/core");
2395
- var paginateGetCase = (0, import_core4.createPaginator)(ConnectCasesClient, GetCaseCommand, "nextToken", "nextToken", "");
2452
+
2453
+ var paginateGetCase = (0, import_core.createPaginator)(ConnectCasesClient, GetCaseCommand, "nextToken", "nextToken", "");
2396
2454
 
2397
2455
  // src/pagination/ListCasesForContactPaginator.ts
2398
- var import_core5 = require("@smithy/core");
2399
- var paginateListCasesForContact = (0, import_core5.createPaginator)(ConnectCasesClient, ListCasesForContactCommand, "nextToken", "nextToken", "maxResults");
2456
+
2457
+ var paginateListCasesForContact = (0, import_core.createPaginator)(ConnectCasesClient, ListCasesForContactCommand, "nextToken", "nextToken", "maxResults");
2400
2458
 
2401
2459
  // src/pagination/ListDomainsPaginator.ts
2402
- var import_core6 = require("@smithy/core");
2403
- var paginateListDomains = (0, import_core6.createPaginator)(ConnectCasesClient, ListDomainsCommand, "nextToken", "nextToken", "maxResults");
2460
+
2461
+ var paginateListDomains = (0, import_core.createPaginator)(ConnectCasesClient, ListDomainsCommand, "nextToken", "nextToken", "maxResults");
2404
2462
 
2405
2463
  // src/pagination/ListFieldOptionsPaginator.ts
2406
- var import_core7 = require("@smithy/core");
2407
- var paginateListFieldOptions = (0, import_core7.createPaginator)(ConnectCasesClient, ListFieldOptionsCommand, "nextToken", "nextToken", "maxResults");
2464
+
2465
+ var paginateListFieldOptions = (0, import_core.createPaginator)(ConnectCasesClient, ListFieldOptionsCommand, "nextToken", "nextToken", "maxResults");
2408
2466
 
2409
2467
  // src/pagination/ListFieldsPaginator.ts
2410
- var import_core8 = require("@smithy/core");
2411
- var paginateListFields = (0, import_core8.createPaginator)(ConnectCasesClient, ListFieldsCommand, "nextToken", "nextToken", "maxResults");
2468
+
2469
+ var paginateListFields = (0, import_core.createPaginator)(ConnectCasesClient, ListFieldsCommand, "nextToken", "nextToken", "maxResults");
2412
2470
 
2413
2471
  // src/pagination/ListLayoutsPaginator.ts
2414
- var import_core9 = require("@smithy/core");
2415
- var paginateListLayouts = (0, import_core9.createPaginator)(ConnectCasesClient, ListLayoutsCommand, "nextToken", "nextToken", "maxResults");
2472
+
2473
+ var paginateListLayouts = (0, import_core.createPaginator)(ConnectCasesClient, ListLayoutsCommand, "nextToken", "nextToken", "maxResults");
2416
2474
 
2417
2475
  // src/pagination/ListTemplatesPaginator.ts
2418
- var import_core10 = require("@smithy/core");
2419
- var paginateListTemplates = (0, import_core10.createPaginator)(ConnectCasesClient, ListTemplatesCommand, "nextToken", "nextToken", "maxResults");
2476
+
2477
+ var paginateListTemplates = (0, import_core.createPaginator)(ConnectCasesClient, ListTemplatesCommand, "nextToken", "nextToken", "maxResults");
2420
2478
 
2421
2479
  // src/pagination/SearchCasesPaginator.ts
2422
- var import_core11 = require("@smithy/core");
2423
- var paginateSearchCases = (0, import_core11.createPaginator)(ConnectCasesClient, SearchCasesCommand, "nextToken", "nextToken", "maxResults");
2480
+
2481
+ var paginateSearchCases = (0, import_core.createPaginator)(ConnectCasesClient, SearchCasesCommand, "nextToken", "nextToken", "maxResults");
2424
2482
 
2425
2483
  // src/pagination/SearchRelatedItemsPaginator.ts
2426
- var import_core12 = require("@smithy/core");
2427
- var paginateSearchRelatedItems = (0, import_core12.createPaginator)(ConnectCasesClient, SearchRelatedItemsCommand, "nextToken", "nextToken", "maxResults");
2484
+
2485
+ var paginateSearchRelatedItems = (0, import_core.createPaginator)(ConnectCasesClient, SearchRelatedItemsCommand, "nextToken", "nextToken", "maxResults");
2428
2486
 
2429
2487
  // src/index.ts
2430
2488
  var import_util_endpoints = require("@aws-sdk/util-endpoints");
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
+ const core_1 = require("@aws-sdk/core");
4
5
  const smithy_client_1 = require("@smithy/smithy-client");
5
6
  const url_parser_1 = require("@smithy/url-parser");
6
7
  const util_base64_1 = require("@smithy/util-base64");
7
8
  const util_utf8_1 = require("@smithy/util-utf8");
9
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
8
10
  const endpointResolver_1 = require("./endpoint/endpointResolver");
9
11
  const getRuntimeConfig = (config) => {
10
12
  return {
@@ -14,6 +16,14 @@ const getRuntimeConfig = (config) => {
14
16
  disableHostPrefix: config?.disableHostPrefix ?? false,
15
17
  endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
16
18
  extensions: config?.extensions ?? [],
19
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultConnectCasesHttpAuthSchemeProvider,
20
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
21
+ {
22
+ schemeId: "aws.auth#sigv4",
23
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
24
+ signer: new core_1.AwsSdkSigV4Signer(),
25
+ },
26
+ ],
17
27
  logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
18
28
  serviceId: config?.serviceId ?? "ConnectCases",
19
29
  urlParser: config?.urlParser ?? url_parser_1.parseUrl,
@@ -1,13 +1,14 @@
1
1
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
2
2
  import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
3
3
  import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
4
- import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
5
4
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
6
5
  import { resolveRegionConfig } from "@smithy/config-resolver";
6
+ import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
7
7
  import { getContentLengthPlugin } from "@smithy/middleware-content-length";
8
8
  import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
9
9
  import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
10
10
  import { Client as __Client, } from "@smithy/smithy-client";
11
+ import { defaultConnectCasesHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
11
12
  import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
12
13
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
13
14
  import { resolveRuntimeExtensions } from "./runtimeExtensions";
@@ -20,8 +21,8 @@ export class ConnectCasesClient extends __Client {
20
21
  const _config_3 = resolveEndpointConfig(_config_2);
21
22
  const _config_4 = resolveRetryConfig(_config_3);
22
23
  const _config_5 = resolveHostHeaderConfig(_config_4);
23
- const _config_6 = resolveAwsAuthConfig(_config_5);
24
- const _config_7 = resolveUserAgentConfig(_config_6);
24
+ const _config_6 = resolveUserAgentConfig(_config_5);
25
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
25
26
  const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
26
27
  super(_config_8);
27
28
  this.config = _config_8;
@@ -30,10 +31,22 @@ export class ConnectCasesClient extends __Client {
30
31
  this.middlewareStack.use(getHostHeaderPlugin(this.config));
31
32
  this.middlewareStack.use(getLoggerPlugin(this.config));
32
33
  this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
33
- this.middlewareStack.use(getAwsAuthPlugin(this.config));
34
34
  this.middlewareStack.use(getUserAgentPlugin(this.config));
35
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
36
+ httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
37
+ identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
38
+ }));
39
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
35
40
  }
36
41
  destroy() {
37
42
  super.destroy();
38
43
  }
44
+ getDefaultHttpAuthSchemeParametersProvider() {
45
+ return defaultConnectCasesHttpAuthSchemeParametersProvider;
46
+ }
47
+ getIdentityProviderConfigProvider() {
48
+ return async (config) => new DefaultIdentityProviderConfig({
49
+ "aws.auth#sigv4": config.credentials,
50
+ });
51
+ }
39
52
  }