@mavogel/awscdk-rootmail 0.0.157 → 0.0.159

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.
Files changed (159) hide show
  1. package/.jsii +7 -7
  2. package/lib/rootmail.js +1 -1
  3. package/lib/ses-receive.js +1 -1
  4. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/runtimeConfig.js +1 -0
  5. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-es/runtimeConfig.js +2 -1
  6. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/runtimeConfig.browser.d.ts +2 -1
  7. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/runtimeConfig.d.ts +2 -1
  8. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/runtimeConfig.native.d.ts +2 -1
  9. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -3
  10. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/runtimeConfig.d.ts +6 -3
  11. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -3
  12. package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +14 -14
  13. package/node_modules/@aws-sdk/client-route-53/dist-cjs/runtimeConfig.js +1 -0
  14. package/node_modules/@aws-sdk/client-route-53/dist-es/runtimeConfig.js +2 -1
  15. package/node_modules/@aws-sdk/client-route-53/dist-types/runtimeConfig.browser.d.ts +2 -1
  16. package/node_modules/@aws-sdk/client-route-53/dist-types/runtimeConfig.d.ts +2 -1
  17. package/node_modules/@aws-sdk/client-route-53/dist-types/runtimeConfig.native.d.ts +2 -1
  18. package/node_modules/@aws-sdk/client-route-53/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -3
  19. package/node_modules/@aws-sdk/client-route-53/dist-types/ts3.4/runtimeConfig.d.ts +6 -3
  20. package/node_modules/@aws-sdk/client-route-53/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -3
  21. package/node_modules/@aws-sdk/client-route-53/package.json +15 -15
  22. package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +38 -25
  23. package/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js +1 -0
  24. package/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js +2 -0
  25. package/node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js +4 -0
  26. package/node_modules/@aws-sdk/client-s3/dist-es/protocols/Aws_restXml.js +5 -0
  27. package/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.js +2 -1
  28. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLifecycleConfigurationCommand.d.ts +1 -0
  29. package/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadObjectCommand.d.ts +1 -1
  30. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketLifecycleConfigurationCommand.d.ts +11 -10
  31. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +1 -1
  32. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketOwnershipControlsCommand.d.ts +1 -1
  33. package/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +98 -80
  34. package/node_modules/@aws-sdk/client-s3/dist-types/models/models_1.d.ts +95 -21
  35. package/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.browser.d.ts +2 -1
  36. package/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.d.ts +2 -1
  37. package/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.native.d.ts +2 -1
  38. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketLifecycleConfigurationCommand.d.ts +7 -3
  39. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketNotificationConfigurationCommand.d.ts +1 -1
  40. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketOwnershipControlsCommand.d.ts +1 -1
  41. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_0.d.ts +11 -12
  42. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_1.d.ts +14 -0
  43. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -3
  44. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.d.ts +8 -3
  45. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -3
  46. package/node_modules/@aws-sdk/client-s3/package.json +22 -22
  47. package/node_modules/@aws-sdk/client-ses/dist-cjs/runtimeConfig.js +1 -0
  48. package/node_modules/@aws-sdk/client-ses/dist-es/runtimeConfig.js +2 -1
  49. package/node_modules/@aws-sdk/client-ses/dist-types/runtimeConfig.browser.d.ts +2 -1
  50. package/node_modules/@aws-sdk/client-ses/dist-types/runtimeConfig.d.ts +2 -1
  51. package/node_modules/@aws-sdk/client-ses/dist-types/runtimeConfig.native.d.ts +2 -1
  52. package/node_modules/@aws-sdk/client-ses/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -3
  53. package/node_modules/@aws-sdk/client-ses/dist-types/ts3.4/runtimeConfig.d.ts +6 -3
  54. package/node_modules/@aws-sdk/client-ses/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -3
  55. package/node_modules/@aws-sdk/client-ses/package.json +14 -14
  56. package/node_modules/@aws-sdk/client-ssm/dist-cjs/runtimeConfig.js +1 -0
  57. package/node_modules/@aws-sdk/client-ssm/dist-es/runtimeConfig.js +2 -1
  58. package/node_modules/@aws-sdk/client-ssm/dist-types/runtimeConfig.browser.d.ts +2 -1
  59. package/node_modules/@aws-sdk/client-ssm/dist-types/runtimeConfig.d.ts +2 -1
  60. package/node_modules/@aws-sdk/client-ssm/dist-types/runtimeConfig.native.d.ts +2 -1
  61. package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -3
  62. package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/runtimeConfig.d.ts +6 -3
  63. package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -3
  64. package/node_modules/@aws-sdk/client-ssm/package.json +14 -14
  65. package/node_modules/@aws-sdk/client-sso/dist-cjs/runtimeConfig.js +1 -0
  66. package/node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.js +2 -1
  67. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.browser.d.ts +2 -1
  68. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.d.ts +2 -1
  69. package/node_modules/@aws-sdk/client-sso/dist-types/runtimeConfig.native.d.ts +2 -1
  70. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -3
  71. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.d.ts +6 -3
  72. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -3
  73. package/node_modules/@aws-sdk/client-sso/package.json +11 -11
  74. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/runtimeConfig.js +1 -0
  75. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/runtimeConfig.js +2 -1
  76. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.browser.d.ts +2 -1
  77. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.d.ts +2 -1
  78. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/runtimeConfig.native.d.ts +2 -1
  79. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -3
  80. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.d.ts +6 -3
  81. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -3
  82. package/node_modules/@aws-sdk/client-sso-oidc/package.json +13 -13
  83. package/node_modules/@aws-sdk/client-sts/dist-cjs/runtimeConfig.js +1 -0
  84. package/node_modules/@aws-sdk/client-sts/dist-es/runtimeConfig.js +2 -1
  85. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +2 -1
  86. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +2 -1
  87. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +2 -1
  88. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +7 -3
  89. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +6 -3
  90. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +7 -3
  91. package/node_modules/@aws-sdk/client-sts/package.json +13 -13
  92. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +17 -2
  93. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
  94. package/node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js +11 -0
  95. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
  96. package/node_modules/@aws-sdk/core/dist-types/submodules/client/setFeature.d.ts +12 -0
  97. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
  98. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setFeature.d.ts +6 -0
  99. package/node_modules/@aws-sdk/core/package.json +2 -1
  100. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  101. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  102. package/node_modules/@aws-sdk/credential-provider-ini/package.json +8 -8
  103. package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
  104. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  105. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  106. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  107. package/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +2 -2
  108. package/node_modules/@aws-sdk/middleware-expect-continue/package.json +2 -2
  109. package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +2 -2
  110. package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
  111. package/node_modules/@aws-sdk/middleware-location-constraint/package.json +2 -2
  112. package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
  113. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
  114. package/node_modules/@aws-sdk/middleware-sdk-route53/package.json +2 -2
  115. package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +3 -3
  116. package/node_modules/@aws-sdk/middleware-ssec/package.json +2 -2
  117. package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +60 -4
  118. package/node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js +22 -0
  119. package/node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js +18 -0
  120. package/node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js +9 -1
  121. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/configurations.d.ts +14 -1
  122. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/encode-features.d.ts +5 -0
  123. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/configurations.d.ts +5 -1
  124. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/encode-features.d.ts +2 -0
  125. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/user-agent-middleware.d.ts +2 -1
  126. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/user-agent-middleware.d.ts +2 -1
  127. package/node_modules/@aws-sdk/middleware-user-agent/package.json +4 -3
  128. package/node_modules/@aws-sdk/region-config-resolver/package.json +2 -2
  129. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
  130. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  131. package/node_modules/@aws-sdk/types/dist-es/feature-ids.js +1 -0
  132. package/node_modules/@aws-sdk/types/dist-es/index.js +1 -0
  133. package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +54 -0
  134. package/node_modules/@aws-sdk/types/dist-types/index.d.ts +1 -0
  135. package/node_modules/@aws-sdk/types/dist-types/middleware.d.ts +12 -0
  136. package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +51 -0
  137. package/node_modules/@aws-sdk/types/dist-types/ts3.4/index.d.ts +1 -0
  138. package/node_modules/@aws-sdk/types/dist-types/ts3.4/middleware.d.ts +7 -0
  139. package/node_modules/@aws-sdk/types/package.json +1 -1
  140. package/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
  141. package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.js +6 -2
  142. package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.native.js +1 -1
  143. package/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js +6 -2
  144. package/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.native.js +1 -1
  145. package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.d.ts +4 -1
  146. package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/index.d.ts +6 -1
  147. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +2 -2
  148. package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +46 -39
  149. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/defaultUserAgent.js +29 -0
  150. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/index.js +2 -39
  151. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/nodeAppIdConfigOptions.js +8 -0
  152. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/defaultUserAgent.d.ts +23 -0
  153. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/index.d.ts +2 -20
  154. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/nodeAppIdConfigOptions.d.ts +13 -0
  155. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/defaultUserAgent.d.ts +21 -0
  156. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/index.d.ts +2 -12
  157. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/nodeAppIdConfigOptions.d.ts +6 -0
  158. package/node_modules/@aws-sdk/util-user-agent-node/package.json +3 -2
  159. package/package.json +9 -9
@@ -0,0 +1,18 @@
1
+ const BYTE_LIMIT = 1024;
2
+ export function encodeFeatures(features) {
3
+ let buffer = "";
4
+ for (const key in features) {
5
+ const val = features[key];
6
+ if (buffer.length + val.length + 1 <= BYTE_LIMIT) {
7
+ if (buffer.length) {
8
+ buffer += "," + val;
9
+ }
10
+ else {
11
+ buffer += val;
12
+ }
13
+ continue;
14
+ }
15
+ break;
16
+ }
17
+ return buffer;
18
+ }
@@ -1,14 +1,22 @@
1
1
  import { getUserAgentPrefix } from "@aws-sdk/util-endpoints";
2
2
  import { HttpRequest } from "@smithy/protocol-http";
3
3
  import { SPACE, UA_ESCAPE_CHAR, UA_NAME_ESCAPE_REGEX, UA_NAME_SEPARATOR, UA_VALUE_ESCAPE_REGEX, USER_AGENT, X_AMZ_USER_AGENT, } from "./constants";
4
+ import { encodeFeatures } from "./encode-features";
4
5
  export const userAgentMiddleware = (options) => (next, context) => async (args) => {
5
6
  const { request } = args;
6
- if (!HttpRequest.isInstance(request))
7
+ if (!HttpRequest.isInstance(request)) {
7
8
  return next(args);
9
+ }
8
10
  const { headers } = request;
9
11
  const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
10
12
  const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
13
+ const awsContext = context;
14
+ defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
11
15
  const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
16
+ const appId = await options.userAgentAppId();
17
+ if (appId) {
18
+ defaultUserAgent.push(escapeUserAgent([`app/${appId}`]));
19
+ }
12
20
  const prefix = getUserAgentPrefix();
13
21
  const sdkUserAgentValue = (prefix ? [prefix] : [])
14
22
  .concat([...defaultUserAgent, ...userAgent, ...customUserAgent])
@@ -1,4 +1,8 @@
1
- import { Provider, UserAgent } from "@smithy/types";
1
+ import { Logger, Provider, UserAgent } from "@smithy/types";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare const DEFAULT_UA_APP_ID: undefined;
2
6
  /**
3
7
  * @public
4
8
  */
@@ -7,10 +11,15 @@ export interface UserAgentInputConfig {
7
11
  * The custom user agent header that would be appended to default one
8
12
  */
9
13
  customUserAgent?: string | UserAgent;
14
+ /**
15
+ * The application ID used to identify the application.
16
+ */
17
+ userAgentAppId?: string | undefined | Provider<string | undefined>;
10
18
  }
11
19
  interface PreviouslyResolved {
12
20
  defaultUserAgentProvider: Provider<UserAgent>;
13
21
  runtime: string;
22
+ logger?: Logger;
14
23
  }
15
24
  export interface UserAgentResolvedConfig {
16
25
  /**
@@ -26,6 +35,10 @@ export interface UserAgentResolvedConfig {
26
35
  * The runtime environment
27
36
  */
28
37
  runtime: string;
38
+ /**
39
+ * Resolved value for input config {config.userAgentAppId}
40
+ */
41
+ userAgentAppId: Provider<string | undefined>;
29
42
  }
30
43
  export declare function resolveUserAgentConfig<T>(input: T & PreviouslyResolved & UserAgentInputConfig): T & UserAgentResolvedConfig;
31
44
  export {};
@@ -0,0 +1,5 @@
1
+ import type { AwsSdkFeatures } from "@aws-sdk/types";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare function encodeFeatures(features: AwsSdkFeatures): string;
@@ -1,15 +1,19 @@
1
- import { Provider, UserAgent } from "@smithy/types";
1
+ import { Logger, Provider, UserAgent } from "@smithy/types";
2
+ export declare const DEFAULT_UA_APP_ID: undefined;
2
3
  export interface UserAgentInputConfig {
3
4
  customUserAgent?: string | UserAgent;
5
+ userAgentAppId?: string | undefined | Provider<string | undefined>;
4
6
  }
5
7
  interface PreviouslyResolved {
6
8
  defaultUserAgentProvider: Provider<UserAgent>;
7
9
  runtime: string;
10
+ logger?: Logger;
8
11
  }
9
12
  export interface UserAgentResolvedConfig {
10
13
  defaultUserAgentProvider: Provider<UserAgent>;
11
14
  customUserAgent?: UserAgent;
12
15
  runtime: string;
16
+ userAgentAppId: Provider<string | undefined>;
13
17
  }
14
18
  export declare function resolveUserAgentConfig<T>(
15
19
  input: T & PreviouslyResolved & UserAgentInputConfig
@@ -0,0 +1,2 @@
1
+ import { AwsSdkFeatures } from "@aws-sdk/types";
2
+ export declare function encodeFeatures(features: AwsSdkFeatures): string;
@@ -1,3 +1,4 @@
1
+ import { AwsHandlerExecutionContext } from "@aws-sdk/types";
1
2
  import {
2
3
  AbsoluteLocation,
3
4
  BuildHandler,
@@ -11,7 +12,7 @@ export declare const userAgentMiddleware: (
11
12
  options: UserAgentResolvedConfig
12
13
  ) => <Output extends MetadataBearer>(
13
14
  next: BuildHandler<any, any>,
14
- context: HandlerExecutionContext
15
+ context: HandlerExecutionContext | AwsHandlerExecutionContext
15
16
  ) => BuildHandler<any, any>;
16
17
  export declare const getUserAgentMiddlewareOptions: BuildHandlerOptions &
17
18
  AbsoluteLocation;
@@ -1,3 +1,4 @@
1
+ import type { AwsHandlerExecutionContext } from "@aws-sdk/types";
1
2
  import { AbsoluteLocation, BuildHandler, BuildHandlerOptions, HandlerExecutionContext, MetadataBearer, Pluggable } from "@smithy/types";
2
3
  import { UserAgentResolvedConfig } from "./configurations";
3
4
  /**
@@ -12,6 +13,6 @@ import { UserAgentResolvedConfig } from "./configurations";
12
13
  * config or middleware setting the `userAgent` context to generate desired user
13
14
  * agent.
14
15
  */
15
- export declare const userAgentMiddleware: (options: UserAgentResolvedConfig) => <Output extends MetadataBearer>(next: BuildHandler<any, any>, context: HandlerExecutionContext) => BuildHandler<any, any>;
16
+ export declare const userAgentMiddleware: (options: UserAgentResolvedConfig) => <Output extends MetadataBearer>(next: BuildHandler<any, any>, context: HandlerExecutionContext | AwsHandlerExecutionContext) => BuildHandler<any, any>;
16
17
  export declare const getUserAgentMiddlewareOptions: BuildHandlerOptions & AbsoluteLocation;
17
18
  export declare const getUserAgentPlugin: (config: UserAgentResolvedConfig) => Pluggable<any, any>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-user-agent",
3
- "version": "3.662.0",
3
+ "version": "3.664.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline middleware-user-agent",
@@ -22,8 +22,9 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@aws-sdk/types": "3.662.0",
26
- "@aws-sdk/util-endpoints": "3.662.0",
25
+ "@aws-sdk/types": "3.664.0",
26
+ "@aws-sdk/util-endpoints": "3.664.0",
27
+ "@smithy/core": "^2.4.7",
27
28
  "@smithy/protocol-http": "^4.1.4",
28
29
  "@smithy/types": "^3.5.0",
29
30
  "tslib": "^2.6.2"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/region-config-resolver",
3
- "version": "3.662.0",
3
+ "version": "3.664.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline region-config-resolver",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
- "@aws-sdk/types": "3.662.0",
24
+ "@aws-sdk/types": "3.664.0",
25
25
  "@smithy/node-config-provider": "^3.1.8",
26
26
  "@smithy/types": "^3.5.0",
27
27
  "@smithy/util-config-provider": "^3.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/signature-v4-multi-region",
3
- "version": "3.662.0",
3
+ "version": "3.664.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline signature-v4-multi-region",
@@ -20,8 +20,8 @@
20
20
  },
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
- "@aws-sdk/middleware-sdk-s3": "3.662.0",
24
- "@aws-sdk/types": "3.662.0",
23
+ "@aws-sdk/middleware-sdk-s3": "3.664.0",
24
+ "@aws-sdk/types": "3.664.0",
25
25
  "@smithy/protocol-http": "^4.1.4",
26
26
  "@smithy/signature-v4": "^4.2.0",
27
27
  "@smithy/types": "^3.5.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/token-providers",
3
- "version": "3.662.0",
3
+ "version": "3.664.0",
4
4
  "description": "A collection of token providers",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@aws-sdk/types": "3.662.0",
29
+ "@aws-sdk/types": "3.664.0",
30
30
  "@smithy/property-provider": "^3.1.7",
31
31
  "@smithy/shared-ini-file-loader": "^3.1.8",
32
32
  "@smithy/types": "^3.5.0",
@@ -41,7 +41,7 @@
41
41
  "typescript": "~4.9.5"
42
42
  },
43
43
  "peerDependencies": {
44
- "@aws-sdk/client-sso-oidc": "^3.662.0"
44
+ "@aws-sdk/client-sso-oidc": "^3.664.0"
45
45
  },
46
46
  "types": "./dist-types/index.d.ts",
47
47
  "engines": {
@@ -0,0 +1 @@
1
+ export {};
@@ -12,6 +12,7 @@ export * from "./encode";
12
12
  export * from "./endpoint";
13
13
  export * from "./eventStream";
14
14
  export * from "./extensions";
15
+ export * from "./feature-ids";
15
16
  export * from "./http";
16
17
  export * from "./identity";
17
18
  export * from "./logger";
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export type AwsSdkFeatures = Partial<{
5
+ RESOURCE_MODEL: "A";
6
+ WAITER: "B";
7
+ PAGINATOR: "C";
8
+ RETRY_MODE_LEGACY: "D";
9
+ RETRY_MODE_STANDARD: "E";
10
+ RETRY_MODE_ADAPTIVE: "F";
11
+ S3_EXPRESS_BUCKET: "J";
12
+ S3_ACCESS_GRANTS: "K";
13
+ GZIP_REQUEST_COMPRESSION: "L";
14
+ PROTOCOL_RPC_V2_CBOR: "M";
15
+ ENDPOINT_OVERRIDE: "N";
16
+ ACCOUNT_ID_ENDPOINT: "O";
17
+ ACCOUNT_ID_MODE_PREFERRED: "P";
18
+ ACCOUNT_ID_MODE_DISABLED: "Q";
19
+ ACCOUNT_ID_MODE_REQUIRED: "R";
20
+ SIGV4A_SIGNING: "S";
21
+ RESOLVED_ACCOUNT_ID: "T";
22
+ FLEXIBLE_CHECKSUMS_REQ_CRC32: "U";
23
+ FLEXIBLE_CHECKSUMS_REQ_CRC32C: "V";
24
+ FLEXIBLE_CHECKSUMS_REQ_CRC64: "W";
25
+ FLEXIBLE_CHECKSUMS_REQ_SHA1: "X";
26
+ FLEXIBLE_CHECKSUMS_REQ_SHA256: "Y";
27
+ FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED: "Z";
28
+ FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED: "a";
29
+ FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED: "b";
30
+ FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED: "c";
31
+ DDB_MAPPER: "d";
32
+ CREDENTIALS_CODE: "e";
33
+ CREDENTIALS_ENV_VARS: "g";
34
+ CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN: "h";
35
+ CREDENTIALS_STS_ASSUME_ROLE: "i";
36
+ CREDENTIALS_STS_ASSUME_ROLE_SAML: "j";
37
+ CREDENTIALS_STS_ASSUME_ROLE_WEB_ID: "k";
38
+ CREDENTIALS_STS_FEDERATION_TOKEN: "l";
39
+ CREDENTIALS_STS_SESSION_TOKEN: "m";
40
+ CREDENTIALS_PROFILE: "n";
41
+ CREDENTIALS_PROFILE_SOURCE_PROFILE: "o";
42
+ CREDENTIALS_PROFILE_NAMED_PROVIDER: "p";
43
+ CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN: "q";
44
+ CREDENTIALS_PROFILE_SSO: "r";
45
+ CREDENTIALS_SSO: "s";
46
+ CREDENTIALS_PROFILE_SSO_LEGACY: "t";
47
+ CREDENTIALS_SSO_LEGACY: "u";
48
+ CREDENTIALS_PROFILE_PROCESS: "v";
49
+ CREDENTIALS_PROCESS: "w";
50
+ CREDENTIALS_BOTO2_CONFIG_FILE: "x";
51
+ CREDENTIALS_AWS_SDK_STORE: "y";
52
+ CREDENTIALS_HTTP: "z";
53
+ CREDENTIALS_IMDS: "0";
54
+ }>;
@@ -12,6 +12,7 @@ export * from "./encode";
12
12
  export * from "./endpoint";
13
13
  export * from "./eventStream";
14
14
  export * from "./extensions";
15
+ export * from "./feature-ids";
15
16
  export * from "./http";
16
17
  export * from "./identity";
17
18
  export * from "./logger";
@@ -1 +1,13 @@
1
+ import { HandlerExecutionContext } from "@smithy/types";
2
+ import { AwsSdkFeatures } from "./feature-ids";
1
3
  export { AbsoluteLocation, BuildHandler, BuildHandlerArguments, BuildHandlerOptions, BuildHandlerOutput, BuildMiddleware, DeserializeHandler, DeserializeHandlerArguments, DeserializeHandlerOptions, DeserializeHandlerOutput, DeserializeMiddleware, FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, FinalizeRequestHandlerOptions, FinalizeRequestMiddleware, Handler, HandlerExecutionContext, HandlerOptions, InitializeHandler, InitializeHandlerArguments, InitializeHandlerOptions, InitializeHandlerOutput, InitializeMiddleware, MiddlewareStack, MiddlewareType, Pluggable, Priority, Relation, RelativeLocation, RelativeMiddlewareOptions, SerializeHandler, SerializeHandlerArguments, SerializeHandlerOptions, SerializeHandlerOutput, SerializeMiddleware, Step, Terminalware, } from "@smithy/types";
4
+ /**
5
+ * @internal
6
+ * Contains reserved keys for AWS SDK internal usage of the
7
+ * handler execution context object.
8
+ */
9
+ export interface AwsHandlerExecutionContext extends HandlerExecutionContext {
10
+ __aws_sdk_context?: {
11
+ features?: AwsSdkFeatures;
12
+ };
13
+ }
@@ -0,0 +1,51 @@
1
+ export type AwsSdkFeatures = Partial<{
2
+ RESOURCE_MODEL: "A";
3
+ WAITER: "B";
4
+ PAGINATOR: "C";
5
+ RETRY_MODE_LEGACY: "D";
6
+ RETRY_MODE_STANDARD: "E";
7
+ RETRY_MODE_ADAPTIVE: "F";
8
+ S3_EXPRESS_BUCKET: "J";
9
+ S3_ACCESS_GRANTS: "K";
10
+ GZIP_REQUEST_COMPRESSION: "L";
11
+ PROTOCOL_RPC_V2_CBOR: "M";
12
+ ENDPOINT_OVERRIDE: "N";
13
+ ACCOUNT_ID_ENDPOINT: "O";
14
+ ACCOUNT_ID_MODE_PREFERRED: "P";
15
+ ACCOUNT_ID_MODE_DISABLED: "Q";
16
+ ACCOUNT_ID_MODE_REQUIRED: "R";
17
+ SIGV4A_SIGNING: "S";
18
+ RESOLVED_ACCOUNT_ID: "T";
19
+ FLEXIBLE_CHECKSUMS_REQ_CRC32: "U";
20
+ FLEXIBLE_CHECKSUMS_REQ_CRC32C: "V";
21
+ FLEXIBLE_CHECKSUMS_REQ_CRC64: "W";
22
+ FLEXIBLE_CHECKSUMS_REQ_SHA1: "X";
23
+ FLEXIBLE_CHECKSUMS_REQ_SHA256: "Y";
24
+ FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED: "Z";
25
+ FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED: "a";
26
+ FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED: "b";
27
+ FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED: "c";
28
+ DDB_MAPPER: "d";
29
+ CREDENTIALS_CODE: "e";
30
+ CREDENTIALS_ENV_VARS: "g";
31
+ CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN: "h";
32
+ CREDENTIALS_STS_ASSUME_ROLE: "i";
33
+ CREDENTIALS_STS_ASSUME_ROLE_SAML: "j";
34
+ CREDENTIALS_STS_ASSUME_ROLE_WEB_ID: "k";
35
+ CREDENTIALS_STS_FEDERATION_TOKEN: "l";
36
+ CREDENTIALS_STS_SESSION_TOKEN: "m";
37
+ CREDENTIALS_PROFILE: "n";
38
+ CREDENTIALS_PROFILE_SOURCE_PROFILE: "o";
39
+ CREDENTIALS_PROFILE_NAMED_PROVIDER: "p";
40
+ CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN: "q";
41
+ CREDENTIALS_PROFILE_SSO: "r";
42
+ CREDENTIALS_SSO: "s";
43
+ CREDENTIALS_PROFILE_SSO_LEGACY: "t";
44
+ CREDENTIALS_SSO_LEGACY: "u";
45
+ CREDENTIALS_PROFILE_PROCESS: "v";
46
+ CREDENTIALS_PROCESS: "w";
47
+ CREDENTIALS_BOTO2_CONFIG_FILE: "x";
48
+ CREDENTIALS_AWS_SDK_STORE: "y";
49
+ CREDENTIALS_HTTP: "z";
50
+ CREDENTIALS_IMDS: "0";
51
+ }>;
@@ -12,6 +12,7 @@ export * from "./encode";
12
12
  export * from "./endpoint";
13
13
  export * from "./eventStream";
14
14
  export * from "./extensions";
15
+ export * from "./feature-ids";
15
16
  export * from "./http";
16
17
  export * from "./identity";
17
18
  export * from "./logger";
@@ -1,3 +1,5 @@
1
+ import { HandlerExecutionContext } from "@smithy/types";
2
+ import { AwsSdkFeatures } from "./feature-ids";
1
3
  export {
2
4
  AbsoluteLocation,
3
5
  BuildHandler,
@@ -38,3 +40,8 @@ export {
38
40
  Step,
39
41
  Terminalware,
40
42
  } from "@smithy/types";
43
+ export interface AwsHandlerExecutionContext extends HandlerExecutionContext {
44
+ __aws_sdk_context?: {
45
+ features?: AwsSdkFeatures;
46
+ };
47
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.662.0",
3
+ "version": "3.664.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-endpoints",
3
- "version": "3.662.0",
3
+ "version": "3.664.0",
4
4
  "description": "Utilities to help with endpoint resolution",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@aws-sdk/types": "3.662.0",
25
+ "@aws-sdk/types": "3.664.0",
26
26
  "@smithy/types": "^3.5.0",
27
27
  "@smithy/util-endpoints": "^2.1.3",
28
28
  "tslib": "^2.6.2"
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultUserAgent = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const bowser_1 = tslib_1.__importDefault(require("bowser"));
6
- const defaultUserAgent = ({ serviceId, clientVersion }) => async () => {
6
+ const defaultUserAgent = ({ serviceId, clientVersion }) => async (config) => {
7
7
  const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent
8
8
  ? bowser_1.default.parse(window.navigator.userAgent)
9
9
  : undefined;
10
10
  const sections = [
11
11
  ["aws-sdk-js", clientVersion],
12
- ["ua", "2.0"],
12
+ ["ua", "2.1"],
13
13
  [`os/${parsedUA?.os?.name || "other"}`, parsedUA?.os?.version],
14
14
  ["lang/js"],
15
15
  ["md/browser", `${parsedUA?.browser?.name ?? "unknown"}_${parsedUA?.browser?.version ?? "unknown"}`],
@@ -17,6 +17,10 @@ const defaultUserAgent = ({ serviceId, clientVersion }) => async () => {
17
17
  if (serviceId) {
18
18
  sections.push([`api/${serviceId}`, clientVersion]);
19
19
  }
20
+ const appId = await config?.userAgentAppId?.();
21
+ if (appId) {
22
+ sections.push([`app/${appId}`]);
23
+ }
20
24
  return sections;
21
25
  };
22
26
  exports.defaultUserAgent = defaultUserAgent;
@@ -4,7 +4,7 @@ exports.defaultUserAgent = void 0;
4
4
  const defaultUserAgent = ({ serviceId, clientVersion }) => async () => {
5
5
  const sections = [
6
6
  ["aws-sdk-js", clientVersion],
7
- ["ua", "2.0"],
7
+ ["ua", "2.1"],
8
8
  ["os/other"],
9
9
  ["lang/js"],
10
10
  ["md/rn"],
@@ -1,11 +1,11 @@
1
1
  import bowser from "bowser";
2
- export const defaultUserAgent = ({ serviceId, clientVersion }) => async () => {
2
+ export const defaultUserAgent = ({ serviceId, clientVersion }) => async (config) => {
3
3
  const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent
4
4
  ? bowser.parse(window.navigator.userAgent)
5
5
  : undefined;
6
6
  const sections = [
7
7
  ["aws-sdk-js", clientVersion],
8
- ["ua", "2.0"],
8
+ ["ua", "2.1"],
9
9
  [`os/${parsedUA?.os?.name || "other"}`, parsedUA?.os?.version],
10
10
  ["lang/js"],
11
11
  ["md/browser", `${parsedUA?.browser?.name ?? "unknown"}_${parsedUA?.browser?.version ?? "unknown"}`],
@@ -13,5 +13,9 @@ export const defaultUserAgent = ({ serviceId, clientVersion }) => async () => {
13
13
  if (serviceId) {
14
14
  sections.push([`api/${serviceId}`, clientVersion]);
15
15
  }
16
+ const appId = await config?.userAgentAppId?.();
17
+ if (appId) {
18
+ sections.push([`app/${appId}`]);
19
+ }
16
20
  return sections;
17
21
  };
@@ -1,7 +1,7 @@
1
1
  export const defaultUserAgent = ({ serviceId, clientVersion }) => async () => {
2
2
  const sections = [
3
3
  ["aws-sdk-js", clientVersion],
4
- ["ua", "2.0"],
4
+ ["ua", "2.1"],
5
5
  ["os/other"],
6
6
  ["lang/js"],
7
7
  ["md/rn"],
@@ -1,9 +1,12 @@
1
1
  import { Provider, UserAgent } from "@smithy/types";
2
2
  import { DefaultUserAgentOptions } from "./configurations";
3
+ export interface PreviouslyResolved {
4
+ userAgentAppId: Provider<string | undefined>;
5
+ }
3
6
  /**
4
7
  * @internal
5
8
  *
6
9
  * Default provider to the user agent in browsers. It's a best effort to infer
7
10
  * the device information. It uses bowser library to detect the browser and version
8
11
  */
9
- export declare const defaultUserAgent: ({ serviceId, clientVersion }: DefaultUserAgentOptions) => Provider<UserAgent>;
12
+ export declare const defaultUserAgent: ({ serviceId, clientVersion }: DefaultUserAgentOptions) => (config: PreviouslyResolved) => Promise<UserAgent>;
@@ -1,6 +1,11 @@
1
1
  import { Provider, UserAgent } from "@smithy/types";
2
2
  import { DefaultUserAgentOptions } from "./configurations";
3
+ export interface PreviouslyResolved {
4
+ userAgentAppId: Provider<string | undefined>;
5
+ }
3
6
  export declare const defaultUserAgent: ({
4
7
  serviceId,
5
8
  clientVersion,
6
- }: DefaultUserAgentOptions) => Provider<UserAgent>;
9
+ }: DefaultUserAgentOptions) => (
10
+ config: PreviouslyResolved
11
+ ) => Promise<UserAgent>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-user-agent-browser",
3
- "version": "3.662.0",
3
+ "version": "3.664.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline util-user-agent-browser",
@@ -22,7 +22,7 @@
22
22
  "license": "Apache-2.0",
23
23
  "react-native": "dist-es/index.native.js",
24
24
  "dependencies": {
25
- "@aws-sdk/types": "3.662.0",
25
+ "@aws-sdk/types": "3.664.0",
26
26
  "@smithy/types": "^3.5.0",
27
27
  "bowser": "^2.11.0",
28
28
  "tslib": "^2.6.2"