piclaw 0.0.19 → 0.0.21

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 (270) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/defult-D5RLDUrI.js +1 -0
  3. package/.output/public/assets/{dist-CMBqBOCp.js → dist-BH_oa-kv.js} +1 -1
  4. package/.output/public/assets/index-7JvURuHy.js +204 -0
  5. package/.output/public/assets/index-K43slwjJ.css +1 -0
  6. package/.output/public/index.html +11 -2
  7. package/.output/server/_...path_.get.mjs +16 -0
  8. package/.output/server/_chunks/app.mjs +261 -181
  9. package/.output/server/_chunks/browser.mjs +4 -1
  10. package/.output/server/_chunks/config.mjs +4 -0
  11. package/.output/server/_chunks/db.mjs +32 -28
  12. package/.output/server/_chunks/device-bus.mjs +123 -0
  13. package/.output/server/_chunks/dummy.mjs +1 -1
  14. package/.output/server/_chunks/logger.mjs +23 -0
  15. package/.output/server/_chunks/login.mjs +1 -1
  16. package/.output/server/_chunks/notes.mjs +1 -3
  17. package/.output/server/_chunks/renderer-template.mjs +1 -1
  18. package/.output/server/_chunks/sandbox.mjs +217 -0
  19. package/.output/server/_chunks/server.mjs +2302 -122
  20. package/.output/server/_chunks/terminal.mjs +63 -8
  21. package/.output/server/_chunks/uploads.mjs +60 -0
  22. package/.output/server/_chunks/virtual.mjs +192 -54
  23. package/.output/server/_id_.delete.mjs +5 -2
  24. package/.output/server/_id_.patch.mjs +2 -0
  25. package/.output/server/_id_2.delete.mjs +8 -0
  26. package/.output/server/_jid_.delete.mjs +5 -2
  27. package/.output/server/_jid_.patch.mjs +37 -4
  28. package/.output/server/_jid_2.delete.mjs +5 -2
  29. package/.output/server/_libs/@acemir/cssom+[...].mjs +2269 -1137
  30. package/.output/server/_libs/@google/genai.mjs +337 -273
  31. package/.output/server/_libs/@mariozechner/pi-agent-core+[...].mjs +381 -2073
  32. package/.output/server/_libs/@mariozechner/pi-coding-agent+[...].mjs +231 -131
  33. package/.output/server/_libs/_.mjs +3 -2
  34. package/.output/server/_libs/_10.mjs +2 -4
  35. package/.output/server/_libs/_11.mjs +2 -4
  36. package/.output/server/_libs/_12.mjs +2 -3
  37. package/.output/server/_libs/_13.mjs +2 -3
  38. package/.output/server/_libs/_14.mjs +2 -4
  39. package/.output/server/_libs/_15.mjs +2 -4
  40. package/.output/server/_libs/_16.mjs +2 -3
  41. package/.output/server/_libs/_17.mjs +2 -4
  42. package/.output/server/_libs/_18.mjs +2 -2
  43. package/.output/server/_libs/_19.mjs +2 -2
  44. package/.output/server/_libs/_2.mjs +3 -3
  45. package/.output/server/_libs/_20.mjs +2 -2
  46. package/.output/server/_libs/_21.mjs +2 -2
  47. package/.output/server/_libs/_22.mjs +2 -2
  48. package/.output/server/_libs/_23.mjs +2 -2
  49. package/.output/server/_libs/_24.mjs +2 -2
  50. package/.output/server/_libs/_25.mjs +2 -2
  51. package/.output/server/_libs/_26.mjs +2 -2
  52. package/.output/server/_libs/_27.mjs +2 -2
  53. package/.output/server/_libs/_28.mjs +2 -2
  54. package/.output/server/_libs/_29.mjs +2 -2
  55. package/.output/server/_libs/_3.mjs +3 -3
  56. package/.output/server/_libs/_30.mjs +2 -2
  57. package/.output/server/_libs/_31.mjs +2 -2
  58. package/.output/server/_libs/_32.mjs +2 -2
  59. package/.output/server/_libs/_33.mjs +2 -2
  60. package/.output/server/_libs/_34.mjs +2 -2
  61. package/.output/server/_libs/_35.mjs +2 -2
  62. package/.output/server/_libs/_36.mjs +2 -2
  63. package/.output/server/_libs/_37.mjs +2 -2
  64. package/.output/server/_libs/_38.mjs +2 -2
  65. package/.output/server/_libs/_39.mjs +2 -2
  66. package/.output/server/_libs/_4.mjs +4 -3
  67. package/.output/server/_libs/_40.mjs +2 -2
  68. package/.output/server/_libs/_41.mjs +2 -2
  69. package/.output/server/_libs/_42.mjs +2 -2
  70. package/.output/server/_libs/_43.mjs +2 -2
  71. package/.output/server/_libs/_44.mjs +2 -2
  72. package/.output/server/_libs/_45.mjs +2 -2
  73. package/.output/server/_libs/_46.mjs +2 -2
  74. package/.output/server/_libs/_47.mjs +2 -2
  75. package/.output/server/_libs/_48.mjs +2 -2
  76. package/.output/server/_libs/_49.mjs +2 -2
  77. package/.output/server/_libs/_5.mjs +2 -3
  78. package/.output/server/_libs/_50.mjs +2 -2
  79. package/.output/server/_libs/_51.mjs +2 -2
  80. package/.output/server/_libs/_52.mjs +2 -2
  81. package/.output/server/_libs/_53.mjs +2 -2
  82. package/.output/server/_libs/_54.mjs +2 -2
  83. package/.output/server/_libs/_55.mjs +2 -2
  84. package/.output/server/_libs/_56.mjs +2 -2
  85. package/.output/server/_libs/_57.mjs +2 -2
  86. package/.output/server/_libs/_58.mjs +2 -2
  87. package/.output/server/_libs/_59.mjs +2 -2
  88. package/.output/server/_libs/_6.mjs +2 -3
  89. package/.output/server/_libs/_60.mjs +2 -2
  90. package/.output/server/_libs/_61.mjs +2 -2
  91. package/.output/server/_libs/_62.mjs +2 -2
  92. package/.output/server/_libs/_63.mjs +2 -2
  93. package/.output/server/_libs/_64.mjs +2 -2
  94. package/.output/server/_libs/_65.mjs +2 -2
  95. package/.output/server/_libs/_66.mjs +2 -2
  96. package/.output/server/_libs/_67.mjs +2 -2
  97. package/.output/server/_libs/_68.mjs +2 -2
  98. package/.output/server/_libs/_69.mjs +2 -2
  99. package/.output/server/_libs/_7.mjs +2 -5
  100. package/.output/server/_libs/_70.mjs +2 -2
  101. package/.output/server/_libs/_71.mjs +2 -2
  102. package/.output/server/_libs/_72.mjs +2 -2
  103. package/.output/server/_libs/_73.mjs +2 -2
  104. package/.output/server/_libs/_74.mjs +2 -2
  105. package/.output/server/_libs/_75.mjs +2 -2
  106. package/.output/server/_libs/_76.mjs +2 -2
  107. package/.output/server/_libs/_77.mjs +2 -2
  108. package/.output/server/_libs/_78.mjs +2 -2
  109. package/.output/server/_libs/_79.mjs +2 -2
  110. package/.output/server/_libs/_8.mjs +2 -3
  111. package/.output/server/_libs/_80.mjs +2 -2
  112. package/.output/server/_libs/_81.mjs +2 -2
  113. package/.output/server/_libs/_82.mjs +2 -2
  114. package/.output/server/_libs/_83.mjs +2 -2
  115. package/.output/server/_libs/_84.mjs +2 -2
  116. package/.output/server/_libs/_85.mjs +2 -2
  117. package/.output/server/_libs/_86.mjs +2 -2
  118. package/.output/server/_libs/_87.mjs +2 -2
  119. package/.output/server/_libs/_88.mjs +2 -2
  120. package/.output/server/_libs/_89.mjs +2 -2
  121. package/.output/server/_libs/_9.mjs +2 -4
  122. package/.output/server/_libs/_90.mjs +5 -2
  123. package/.output/server/_libs/_91.mjs +3 -2
  124. package/.output/server/_libs/_92.mjs +2 -2
  125. package/.output/server/_libs/_93.mjs +2 -2
  126. package/.output/server/_libs/_94.mjs +2 -2
  127. package/.output/server/_libs/agent-base.mjs +1 -1
  128. package/.output/server/_libs/cheerio+[...].mjs +1 -1
  129. package/.output/server/_libs/data-uri-to-buffer.mjs +2 -67
  130. package/.output/server/_libs/data-urls+[...].mjs +1 -1
  131. package/.output/server/_libs/diff.mjs +1 -1
  132. package/.output/server/_libs/exodus__bytes.mjs +99 -81
  133. package/.output/server/_libs/fetch-blob+node-domexception.mjs +1 -1
  134. package/.output/server/_libs/h3+rou3+srvx.mjs +34 -4
  135. package/.output/server/_libs/html-encoding-sniffer.mjs +1 -1
  136. package/.output/server/_libs/https-proxy-agent.mjs +2 -2
  137. package/.output/server/_libs/jsdom.mjs +1 -1
  138. package/.output/server/_libs/just-bash+[...].mjs +4676 -3916
  139. package/.output/server/_libs/mariozechner__jiti.mjs +1 -1
  140. package/.output/server/_libs/mariozechner__pi-ai.mjs +1472 -0
  141. package/.output/server/_libs/md4x.mjs +1 -1
  142. package/.output/server/_libs/mime.mjs +838 -1
  143. package/.output/server/_libs/node-fetch.mjs +4 -4
  144. package/.output/server/_libs/node-liblzma.mjs +1 -1
  145. package/.output/server/_libs/silvia-odwyer__photon-node.mjs +1 -1
  146. package/.output/server/_routes/api/auth/approve.mjs +2 -0
  147. package/.output/server/_routes/api/auth/revoke.mjs +2 -0
  148. package/.output/server/_routes/api/auth/status.mjs +25 -6
  149. package/.output/server/_routes/api/browser2.mjs +1 -1
  150. package/.output/server/_routes/api/config2.mjs +2 -0
  151. package/.output/server/_routes/api/device_events.mjs +36 -0
  152. package/.output/server/_routes/api/files/groups.mjs +1 -2
  153. package/.output/server/_routes/api/files/raw.mjs +1 -1
  154. package/.output/server/_routes/api/groups.mjs +5 -3
  155. package/.output/server/_routes/api/groups2.mjs +18 -6
  156. package/.output/server/_routes/api/health.mjs +1 -2
  157. package/.output/server/_routes/api/messages.mjs +7 -1
  158. package/.output/server/_routes/api/notes/delete.mjs +4 -1
  159. package/.output/server/_routes/api/notes/write.mjs +2 -0
  160. package/.output/server/_routes/api/ntfy/setup.mjs +8 -0
  161. package/.output/server/_routes/api/pi/apikey.mjs +3 -2
  162. package/.output/server/_routes/api/pi/apikey_providers.mjs +1 -2
  163. package/.output/server/_routes/api/pi/commands.mjs +13 -3
  164. package/.output/server/_routes/api/pi/login/events.mjs +0 -1
  165. package/.output/server/_routes/api/pi/login/respond.mjs +2 -1
  166. package/.output/server/_routes/api/pi/login.mjs +1 -2
  167. package/.output/server/_routes/api/pi/logout.mjs +2 -1
  168. package/.output/server/_routes/api/pi/models.mjs +1 -2
  169. package/.output/server/_routes/api/pi/models_config2.mjs +2 -0
  170. package/.output/server/_routes/api/pi/settings2.mjs +2 -0
  171. package/.output/server/_routes/api/pi/status.mjs +1 -2
  172. package/.output/server/_routes/api/proxy.mjs +19 -1
  173. package/.output/server/_routes/api/sandbox.mjs +26 -0
  174. package/.output/server/_routes/api/sandbox2.mjs +17 -0
  175. package/.output/server/_routes/api/send.mjs +26 -18
  176. package/.output/server/_routes/api/status.mjs +1 -3
  177. package/.output/server/_routes/api/stop.mjs +11 -0
  178. package/.output/server/_routes/api/store/plugins.mjs +75 -0
  179. package/.output/server/_routes/api/store/skills.mjs +11 -0
  180. package/.output/server/_routes/api/tasks2.mjs +3 -2
  181. package/.output/server/_routes/api/telegram/setup.mjs +5 -2
  182. package/.output/server/_routes/api/telegram/status.mjs +1 -2
  183. package/.output/server/_routes/api/terminal2.mjs +2 -1
  184. package/.output/server/_routes/api/tunnel/setup.mjs +4 -2
  185. package/.output/server/_runtime.mjs +1 -2
  186. package/.output/server/_utils.mjs +10 -2
  187. package/.output/server/index.mjs +1 -1
  188. package/.output/server/node_modules/amdefine/amdefine.js +301 -0
  189. package/.output/server/node_modules/amdefine/package.json +16 -0
  190. package/.output/server/node_modules/compressjs/lib/BWT.js +420 -0
  191. package/.output/server/node_modules/compressjs/lib/BWTC.js +234 -0
  192. package/.output/server/node_modules/compressjs/lib/BitStream.js +108 -0
  193. package/.output/server/node_modules/compressjs/lib/Bzip2.js +936 -0
  194. package/.output/server/node_modules/compressjs/lib/CRC32.js +105 -0
  195. package/.output/server/node_modules/compressjs/lib/Context1Model.js +56 -0
  196. package/.output/server/node_modules/compressjs/lib/DefSumModel.js +152 -0
  197. package/.output/server/node_modules/compressjs/lib/DeflateDistanceModel.js +55 -0
  198. package/.output/server/node_modules/compressjs/lib/Dmc.js +197 -0
  199. package/.output/server/node_modules/compressjs/lib/DummyRangeCoder.js +81 -0
  200. package/.output/server/node_modules/compressjs/lib/FenwickModel.js +194 -0
  201. package/.output/server/node_modules/compressjs/lib/Huffman.js +514 -0
  202. package/.output/server/node_modules/compressjs/lib/HuffmanAllocator.js +227 -0
  203. package/.output/server/node_modules/compressjs/lib/LogDistanceModel.js +46 -0
  204. package/.output/server/node_modules/compressjs/lib/Lzjb.js +300 -0
  205. package/.output/server/node_modules/compressjs/lib/LzjbR.js +241 -0
  206. package/.output/server/node_modules/compressjs/lib/Lzp3.js +273 -0
  207. package/.output/server/node_modules/compressjs/lib/MTFModel.js +208 -0
  208. package/.output/server/node_modules/compressjs/lib/NoModel.js +46 -0
  209. package/.output/server/node_modules/compressjs/lib/PPM.js +343 -0
  210. package/.output/server/node_modules/compressjs/lib/RangeCoder.js +238 -0
  211. package/.output/server/node_modules/compressjs/lib/Simple.js +111 -0
  212. package/.output/server/node_modules/compressjs/lib/Stream.js +53 -0
  213. package/.output/server/node_modules/compressjs/lib/Util.js +324 -0
  214. package/.output/server/node_modules/compressjs/lib/freeze.js +14 -0
  215. package/.output/server/node_modules/compressjs/main.js +29 -0
  216. package/.output/server/node_modules/compressjs/package.json +35 -0
  217. package/.output/server/package.json +2 -1
  218. package/README.md +10 -1
  219. package/lib/index.d.mts +1 -0
  220. package/lib/index.mjs +1 -0
  221. package/lib/piclaw.mjs +100 -0
  222. package/lib/utils.mjs +96 -0
  223. package/package.json +16 -11
  224. package/.output/public/assets/defult-CMO6TZ5a.js +0 -1
  225. package/.output/public/assets/index-jdnbJw-M.js +0 -204
  226. package/.output/public/assets/index-ooXrRwgl.css +0 -1
  227. package/.output/server/_chunks/commands.mjs +0 -282
  228. package/.output/server/_chunks/pi.mjs +0 -202
  229. package/.output/server/_chunks/session.mjs +0 -1114
  230. package/.output/server/_libs/@aws-crypto/crc32+[...].mjs +0 -299
  231. package/.output/server/_libs/@aws-sdk/client-bedrock-runtime+[...].mjs +0 -17828
  232. package/.output/server/_libs/@aws-sdk/credential-provider-http+[...].mjs +0 -122
  233. package/.output/server/_libs/@aws-sdk/credential-provider-ini+[...].mjs +0 -417
  234. package/.output/server/_libs/@aws-sdk/credential-provider-process+[...].mjs +0 -54
  235. package/.output/server/_libs/@aws-sdk/credential-provider-sso+[...].mjs +0 -1151
  236. package/.output/server/_libs/@aws-sdk/credential-provider-web-identity+[...].mjs +0 -50
  237. package/.output/server/_libs/@smithy/credential-provider-imds+[...].mjs +0 -369
  238. package/.output/server/_libs/@tootallnate/quickjs-emscripten+[...].mjs +0 -3011
  239. package/.output/server/_libs/_100.mjs +0 -2
  240. package/.output/server/_libs/_101.mjs +0 -2
  241. package/.output/server/_libs/_102.mjs +0 -5
  242. package/.output/server/_libs/_103.mjs +0 -3
  243. package/.output/server/_libs/_104.mjs +0 -2
  244. package/.output/server/_libs/_105.mjs +0 -3
  245. package/.output/server/_libs/_106.mjs +0 -2
  246. package/.output/server/_libs/_107.mjs +0 -2
  247. package/.output/server/_libs/_95.mjs +0 -2
  248. package/.output/server/_libs/_96.mjs +0 -2
  249. package/.output/server/_libs/_97.mjs +0 -2
  250. package/.output/server/_libs/_98.mjs +0 -2
  251. package/.output/server/_libs/_99.mjs +0 -2
  252. package/.output/server/_libs/amdefine.mjs +0 -188
  253. package/.output/server/_libs/ast-types.mjs +0 -2270
  254. package/.output/server/_libs/aws-sdk__nested-clients.mjs +0 -3141
  255. package/.output/server/_libs/basic-ftp.mjs +0 -1906
  256. package/.output/server/_libs/compressjs.mjs +0 -50
  257. package/.output/server/_libs/degenerator+[...].mjs +0 -9964
  258. package/.output/server/_libs/get-uri.mjs +0 -413
  259. package/.output/server/_libs/http-proxy-agent.mjs +0 -123
  260. package/.output/server/_libs/ip-address.mjs +0 -1423
  261. package/.output/server/_libs/lru-cache.mjs +0 -732
  262. package/.output/server/_libs/netmask.mjs +0 -139
  263. package/.output/server/_libs/pac-proxy-agent+[...].mjs +0 -3104
  264. package/.output/server/_libs/proxy-agent+proxy-from-env.mjs +0 -204
  265. package/.output/server/_libs/smithy__core.mjs +0 -192
  266. package/.output/server/node_modules/tslib/modules/index.js +0 -70
  267. package/.output/server/node_modules/tslib/modules/package.json +0 -3
  268. package/.output/server/node_modules/tslib/package.json +0 -47
  269. package/.output/server/node_modules/tslib/tslib.js +0 -484
  270. package/bin/piclaw.mjs +0 -195
@@ -1,3141 +0,0 @@
1
- import { a as __require, o as __toCommonJS, t as __commonJSMin } from "../_runtime.mjs";
2
- import { A as init_dist_es$20, C as init_dist_es$15, D as init_dist_es$11, E as dist_es_exports$11, F as require_dist_cjs, Ft as require_client, G as dist_es_exports$17, H as init_dist_es$2, I as dist_es_exports$1, J as init_dist_es$16, K as init_dist_es$17, L as init_dist_es$1, M as init_dist_es$8, N as dist_es_exports$19, P as init_dist_es$19, R as dist_es_exports$4, S as dist_es_exports$15, T as init_dist_es$21, U as dist_es_exports$18, V as dist_es_exports$2, W as init_dist_es$18, Y as require_dist_cjs$1, _ as init_dist_es$9, at as init_dist_es$3, b as dist_es_exports$10, bt as dist_es_exports$23, ct as init_dist_es, d as require_protocols, dt as dist_es_exports$5, f as dist_es_exports$14, ft as init_dist_es$5, g as dist_es_exports$9, gt as init_dist_es$12, h as init_dist_es$13, ht as dist_es_exports$12, it as dist_es_exports$3, j as dist_es_exports$8, k as dist_es_exports$20, l as dist_es_exports$22, m as dist_es_exports$13, mt as init_dist_es$6, ot as require_schema, p as init_dist_es$14, pt as dist_es_exports$6, q as dist_es_exports$16, st as dist_es_exports, u as init_dist_es$22, v as dist_es_exports$7, w as dist_es_exports$21, x as init_dist_es$10, xt as init_dist_es$23, y as init_dist_es$7, z as init_dist_es$4 } from "./@aws-sdk/client-bedrock-runtime+[...].mjs";
3
- import { n as init_package, r as package_exports } from "./@aws-sdk/credential-provider-sso+[...].mjs";
4
- var require_httpAuthSchemeProvider$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.resolveHttpAuthSchemeConfig = exports.defaultSigninHttpAuthSchemeProvider = exports.defaultSigninHttpAuthSchemeParametersProvider = void 0;
7
- var core_1 = require_dist_cjs();
8
- var util_middleware_1 = (init_dist_es(), __toCommonJS(dist_es_exports));
9
- var defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => {
10
- return {
11
- operation: (0, util_middleware_1.getSmithyContext)(context).operation,
12
- region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
13
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
14
- })()
15
- };
16
- };
17
- exports.defaultSigninHttpAuthSchemeParametersProvider = defaultSigninHttpAuthSchemeParametersProvider;
18
- function createAwsAuthSigv4HttpAuthOption(authParameters) {
19
- return {
20
- schemeId: "aws.auth#sigv4",
21
- signingProperties: {
22
- name: "signin",
23
- region: authParameters.region
24
- },
25
- propertiesExtractor: (config, context) => ({ signingProperties: {
26
- config,
27
- context
28
- } })
29
- };
30
- }
31
- function createSmithyApiNoAuthHttpAuthOption(authParameters) {
32
- return { schemeId: "smithy.api#noAuth" };
33
- }
34
- var defaultSigninHttpAuthSchemeProvider = (authParameters) => {
35
- const options = [];
36
- switch (authParameters.operation) {
37
- case "CreateOAuth2Token":
38
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
39
- break;
40
- default: options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
41
- }
42
- return options;
43
- };
44
- exports.defaultSigninHttpAuthSchemeProvider = defaultSigninHttpAuthSchemeProvider;
45
- var resolveHttpAuthSchemeConfig = (config) => {
46
- const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
47
- return Object.assign(config_0, { authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []) });
48
- };
49
- exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
50
- }));
51
- var require_ruleset$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
52
- Object.defineProperty(exports, "__esModule", { value: true });
53
- exports.ruleSet = void 0;
54
- var u = "required", v = "fn", w = "argv", x = "ref";
55
- var a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = {
56
- [u]: true,
57
- default: false,
58
- type: "boolean"
59
- }, j = {
60
- [u]: false,
61
- type: "string"
62
- }, k = { [x]: "Endpoint" }, l = {
63
- [v]: c,
64
- [w]: [{ [x]: "UseFIPS" }, true]
65
- }, m = {
66
- [v]: c,
67
- [w]: [{ [x]: "UseDualStack" }, true]
68
- }, n = {}, o = {
69
- [v]: "getAttr",
70
- [w]: [{ [x]: g }, "name"]
71
- }, p = {
72
- [v]: c,
73
- [w]: [{ [x]: "UseFIPS" }, false]
74
- }, q = {
75
- [v]: c,
76
- [w]: [{ [x]: "UseDualStack" }, false]
77
- }, r = {
78
- [v]: "getAttr",
79
- [w]: [{ [x]: g }, "supportsFIPS"]
80
- }, s = {
81
- [v]: c,
82
- [w]: [true, {
83
- [v]: "getAttr",
84
- [w]: [{ [x]: g }, "supportsDualStack"]
85
- }]
86
- }, t = [{ [x]: "Region" }];
87
- exports.ruleSet = {
88
- version: "1.0",
89
- parameters: {
90
- UseDualStack: i,
91
- UseFIPS: i,
92
- Endpoint: j,
93
- Region: j
94
- },
95
- rules: [{
96
- conditions: [{
97
- [v]: b,
98
- [w]: [k]
99
- }],
100
- rules: [{
101
- conditions: [l],
102
- error: "Invalid Configuration: FIPS and custom endpoint are not supported",
103
- type: d
104
- }, {
105
- rules: [{
106
- conditions: [m],
107
- error: "Invalid Configuration: Dualstack and custom endpoint are not supported",
108
- type: d
109
- }, {
110
- endpoint: {
111
- url: k,
112
- properties: n,
113
- headers: n
114
- },
115
- type: e
116
- }],
117
- type: f
118
- }],
119
- type: f
120
- }, {
121
- rules: [{
122
- conditions: [{
123
- [v]: b,
124
- [w]: t
125
- }],
126
- rules: [{
127
- conditions: [{
128
- [v]: "aws.partition",
129
- [w]: t,
130
- assign: g
131
- }],
132
- rules: [
133
- {
134
- conditions: [
135
- {
136
- [v]: h,
137
- [w]: [o, "aws"]
138
- },
139
- p,
140
- q
141
- ],
142
- endpoint: {
143
- url: "https://{Region}.signin.aws.amazon.com",
144
- properties: n,
145
- headers: n
146
- },
147
- type: e
148
- },
149
- {
150
- conditions: [
151
- {
152
- [v]: h,
153
- [w]: [o, "aws-cn"]
154
- },
155
- p,
156
- q
157
- ],
158
- endpoint: {
159
- url: "https://{Region}.signin.amazonaws.cn",
160
- properties: n,
161
- headers: n
162
- },
163
- type: e
164
- },
165
- {
166
- conditions: [
167
- {
168
- [v]: h,
169
- [w]: [o, "aws-us-gov"]
170
- },
171
- p,
172
- q
173
- ],
174
- endpoint: {
175
- url: "https://{Region}.signin.amazonaws-us-gov.com",
176
- properties: n,
177
- headers: n
178
- },
179
- type: e
180
- },
181
- {
182
- conditions: [l, m],
183
- rules: [{
184
- conditions: [{
185
- [v]: c,
186
- [w]: [a, r]
187
- }, s],
188
- rules: [{
189
- endpoint: {
190
- url: "https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
191
- properties: n,
192
- headers: n
193
- },
194
- type: e
195
- }],
196
- type: f
197
- }, {
198
- error: "FIPS and DualStack are enabled, but this partition does not support one or both",
199
- type: d
200
- }],
201
- type: f
202
- },
203
- {
204
- conditions: [l, q],
205
- rules: [{
206
- conditions: [{
207
- [v]: c,
208
- [w]: [r, a]
209
- }],
210
- rules: [{
211
- endpoint: {
212
- url: "https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",
213
- properties: n,
214
- headers: n
215
- },
216
- type: e
217
- }],
218
- type: f
219
- }, {
220
- error: "FIPS is enabled but this partition does not support FIPS",
221
- type: d
222
- }],
223
- type: f
224
- },
225
- {
226
- conditions: [p, m],
227
- rules: [{
228
- conditions: [s],
229
- rules: [{
230
- endpoint: {
231
- url: "https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",
232
- properties: n,
233
- headers: n
234
- },
235
- type: e
236
- }],
237
- type: f
238
- }, {
239
- error: "DualStack is enabled but this partition does not support DualStack",
240
- type: d
241
- }],
242
- type: f
243
- },
244
- {
245
- endpoint: {
246
- url: "https://signin.{Region}.{PartitionResult#dnsSuffix}",
247
- properties: n,
248
- headers: n
249
- },
250
- type: e
251
- }
252
- ],
253
- type: f
254
- }],
255
- type: f
256
- }, {
257
- error: "Invalid Configuration: Missing Region",
258
- type: d
259
- }],
260
- type: f
261
- }]
262
- };
263
- }));
264
- var require_endpointResolver$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
265
- Object.defineProperty(exports, "__esModule", { value: true });
266
- exports.defaultEndpointResolver = void 0;
267
- var util_endpoints_1 = (init_dist_es$1(), __toCommonJS(dist_es_exports$1));
268
- var util_endpoints_2 = (init_dist_es$2(), __toCommonJS(dist_es_exports$2));
269
- var ruleset_1 = require_ruleset$2();
270
- var cache = new util_endpoints_2.EndpointCache({
271
- size: 50,
272
- params: [
273
- "Endpoint",
274
- "Region",
275
- "UseDualStack",
276
- "UseFIPS"
277
- ]
278
- });
279
- var defaultEndpointResolver = (endpointParams, context = {}) => {
280
- return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
281
- endpointParams,
282
- logger: context.logger
283
- }));
284
- };
285
- exports.defaultEndpointResolver = defaultEndpointResolver;
286
- util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
287
- }));
288
- var require_SigninServiceException = /* @__PURE__ */ __commonJSMin(((exports) => {
289
- Object.defineProperty(exports, "__esModule", { value: true });
290
- exports.SigninServiceException = exports.__ServiceException = void 0;
291
- var smithy_client_1 = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
292
- Object.defineProperty(exports, "__ServiceException", {
293
- enumerable: true,
294
- get: function() {
295
- return smithy_client_1.ServiceException;
296
- }
297
- });
298
- exports.SigninServiceException = class SigninServiceException extends smithy_client_1.ServiceException {
299
- constructor(options) {
300
- super(options);
301
- Object.setPrototypeOf(this, SigninServiceException.prototype);
302
- }
303
- };
304
- }));
305
- var require_errors$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
306
- Object.defineProperty(exports, "__esModule", { value: true });
307
- exports.ValidationException = exports.TooManyRequestsError = exports.InternalServerException = exports.AccessDeniedException = void 0;
308
- var SigninServiceException_1 = require_SigninServiceException();
309
- exports.AccessDeniedException = class AccessDeniedException extends SigninServiceException_1.SigninServiceException {
310
- name = "AccessDeniedException";
311
- $fault = "client";
312
- error;
313
- constructor(opts) {
314
- super({
315
- name: "AccessDeniedException",
316
- $fault: "client",
317
- ...opts
318
- });
319
- Object.setPrototypeOf(this, AccessDeniedException.prototype);
320
- this.error = opts.error;
321
- }
322
- };
323
- exports.InternalServerException = class InternalServerException extends SigninServiceException_1.SigninServiceException {
324
- name = "InternalServerException";
325
- $fault = "server";
326
- error;
327
- constructor(opts) {
328
- super({
329
- name: "InternalServerException",
330
- $fault: "server",
331
- ...opts
332
- });
333
- Object.setPrototypeOf(this, InternalServerException.prototype);
334
- this.error = opts.error;
335
- }
336
- };
337
- exports.TooManyRequestsError = class TooManyRequestsError extends SigninServiceException_1.SigninServiceException {
338
- name = "TooManyRequestsError";
339
- $fault = "client";
340
- error;
341
- constructor(opts) {
342
- super({
343
- name: "TooManyRequestsError",
344
- $fault: "client",
345
- ...opts
346
- });
347
- Object.setPrototypeOf(this, TooManyRequestsError.prototype);
348
- this.error = opts.error;
349
- }
350
- };
351
- exports.ValidationException = class ValidationException extends SigninServiceException_1.SigninServiceException {
352
- name = "ValidationException";
353
- $fault = "client";
354
- error;
355
- constructor(opts) {
356
- super({
357
- name: "ValidationException",
358
- $fault: "client",
359
- ...opts
360
- });
361
- Object.setPrototypeOf(this, ValidationException.prototype);
362
- this.error = opts.error;
363
- }
364
- };
365
- }));
366
- var require_schemas_0$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
367
- Object.defineProperty(exports, "__esModule", { value: true });
368
- exports.CreateOAuth2Token$ = exports.CreateOAuth2TokenResponseBody$ = exports.CreateOAuth2TokenResponse$ = exports.CreateOAuth2TokenRequestBody$ = exports.CreateOAuth2TokenRequest$ = exports.AccessToken$ = exports.errorTypeRegistries = exports.ValidationException$ = exports.TooManyRequestsError$ = exports.InternalServerException$ = exports.AccessDeniedException$ = exports.SigninServiceException$ = void 0;
369
- var _ADE = "AccessDeniedException";
370
- var _AT = "AccessToken";
371
- var _COAT = "CreateOAuth2Token";
372
- var _COATR = "CreateOAuth2TokenRequest";
373
- var _COATRB = "CreateOAuth2TokenRequestBody";
374
- var _COATRBr = "CreateOAuth2TokenResponseBody";
375
- var _COATRr = "CreateOAuth2TokenResponse";
376
- var _ISE = "InternalServerException";
377
- var _RT = "RefreshToken";
378
- var _TMRE = "TooManyRequestsError";
379
- var _VE = "ValidationException";
380
- var _aKI = "accessKeyId";
381
- var _aT = "accessToken";
382
- var _c = "client";
383
- var _cI = "clientId";
384
- var _cV = "codeVerifier";
385
- var _co = "code";
386
- var _e = "error";
387
- var _eI = "expiresIn";
388
- var _gT = "grantType";
389
- var _h = "http";
390
- var _hE = "httpError";
391
- var _iT = "idToken";
392
- var _jN = "jsonName";
393
- var _m = "message";
394
- var _rT = "refreshToken";
395
- var _rU = "redirectUri";
396
- var _s = "smithy.ts.sdk.synthetic.com.amazonaws.signin";
397
- var _sAK = "secretAccessKey";
398
- var _sT = "sessionToken";
399
- var _se = "server";
400
- var _tI = "tokenInput";
401
- var _tO = "tokenOutput";
402
- var _tT = "tokenType";
403
- var n0 = "com.amazonaws.signin";
404
- var schema_1 = require_schema();
405
- var errors_1 = require_errors$2();
406
- var SigninServiceException_1 = require_SigninServiceException();
407
- var _s_registry = schema_1.TypeRegistry.for(_s);
408
- exports.SigninServiceException$ = [
409
- -3,
410
- _s,
411
- "SigninServiceException",
412
- 0,
413
- [],
414
- []
415
- ];
416
- _s_registry.registerError(exports.SigninServiceException$, SigninServiceException_1.SigninServiceException);
417
- var n0_registry = schema_1.TypeRegistry.for(n0);
418
- exports.AccessDeniedException$ = [
419
- -3,
420
- n0,
421
- _ADE,
422
- { [_e]: _c },
423
- [_e, _m],
424
- [0, 0],
425
- 2
426
- ];
427
- n0_registry.registerError(exports.AccessDeniedException$, errors_1.AccessDeniedException);
428
- exports.InternalServerException$ = [
429
- -3,
430
- n0,
431
- _ISE,
432
- {
433
- [_e]: _se,
434
- [_hE]: 500
435
- },
436
- [_e, _m],
437
- [0, 0],
438
- 2
439
- ];
440
- n0_registry.registerError(exports.InternalServerException$, errors_1.InternalServerException);
441
- exports.TooManyRequestsError$ = [
442
- -3,
443
- n0,
444
- _TMRE,
445
- {
446
- [_e]: _c,
447
- [_hE]: 429
448
- },
449
- [_e, _m],
450
- [0, 0],
451
- 2
452
- ];
453
- n0_registry.registerError(exports.TooManyRequestsError$, errors_1.TooManyRequestsError);
454
- exports.ValidationException$ = [
455
- -3,
456
- n0,
457
- _VE,
458
- {
459
- [_e]: _c,
460
- [_hE]: 400
461
- },
462
- [_e, _m],
463
- [0, 0],
464
- 2
465
- ];
466
- n0_registry.registerError(exports.ValidationException$, errors_1.ValidationException);
467
- exports.errorTypeRegistries = [_s_registry, n0_registry];
468
- var RefreshToken = [
469
- 0,
470
- n0,
471
- _RT,
472
- 8,
473
- 0
474
- ];
475
- exports.AccessToken$ = [
476
- 3,
477
- n0,
478
- _AT,
479
- 8,
480
- [
481
- _aKI,
482
- _sAK,
483
- _sT
484
- ],
485
- [
486
- [0, { [_jN]: _aKI }],
487
- [0, { [_jN]: _sAK }],
488
- [0, { [_jN]: _sT }]
489
- ],
490
- 3
491
- ];
492
- exports.CreateOAuth2TokenRequest$ = [
493
- 3,
494
- n0,
495
- _COATR,
496
- 0,
497
- [_tI],
498
- [[() => exports.CreateOAuth2TokenRequestBody$, 16]],
499
- 1
500
- ];
501
- exports.CreateOAuth2TokenRequestBody$ = [
502
- 3,
503
- n0,
504
- _COATRB,
505
- 0,
506
- [
507
- _cI,
508
- _gT,
509
- _co,
510
- _rU,
511
- _cV,
512
- _rT
513
- ],
514
- [
515
- [0, { [_jN]: _cI }],
516
- [0, { [_jN]: _gT }],
517
- 0,
518
- [0, { [_jN]: _rU }],
519
- [0, { [_jN]: _cV }],
520
- [() => RefreshToken, { [_jN]: _rT }]
521
- ],
522
- 2
523
- ];
524
- exports.CreateOAuth2TokenResponse$ = [
525
- 3,
526
- n0,
527
- _COATRr,
528
- 0,
529
- [_tO],
530
- [[() => exports.CreateOAuth2TokenResponseBody$, 16]],
531
- 1
532
- ];
533
- exports.CreateOAuth2TokenResponseBody$ = [
534
- 3,
535
- n0,
536
- _COATRBr,
537
- 0,
538
- [
539
- _aT,
540
- _tT,
541
- _eI,
542
- _rT,
543
- _iT
544
- ],
545
- [
546
- [() => exports.AccessToken$, { [_jN]: _aT }],
547
- [0, { [_jN]: _tT }],
548
- [1, { [_jN]: _eI }],
549
- [() => RefreshToken, { [_jN]: _rT }],
550
- [0, { [_jN]: _iT }]
551
- ],
552
- 4
553
- ];
554
- exports.CreateOAuth2Token$ = [
555
- 9,
556
- n0,
557
- _COAT,
558
- { [_h]: [
559
- "POST",
560
- "/v1/token",
561
- 200
562
- ] },
563
- () => exports.CreateOAuth2TokenRequest$,
564
- () => exports.CreateOAuth2TokenResponse$
565
- ];
566
- }));
567
- var require_runtimeConfig_shared$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
568
- Object.defineProperty(exports, "__esModule", { value: true });
569
- exports.getRuntimeConfig = void 0;
570
- var core_1 = require_dist_cjs();
571
- var protocols_1 = require_protocols();
572
- var core_2 = require_dist_cjs$1();
573
- var smithy_client_1 = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
574
- var url_parser_1 = (init_dist_es$4(), __toCommonJS(dist_es_exports$4));
575
- var util_base64_1 = (init_dist_es$5(), __toCommonJS(dist_es_exports$5));
576
- var util_utf8_1 = (init_dist_es$6(), __toCommonJS(dist_es_exports$6));
577
- var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider$2();
578
- var endpointResolver_1 = require_endpointResolver$2();
579
- var schemas_0_1 = require_schemas_0$2();
580
- var getRuntimeConfig = (config) => {
581
- return {
582
- apiVersion: "2023-01-01",
583
- base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
584
- base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
585
- disableHostPrefix: config?.disableHostPrefix ?? false,
586
- endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
587
- extensions: config?.extensions ?? [],
588
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSigninHttpAuthSchemeProvider,
589
- httpAuthSchemes: config?.httpAuthSchemes ?? [{
590
- schemeId: "aws.auth#sigv4",
591
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
592
- signer: new core_1.AwsSdkSigV4Signer()
593
- }, {
594
- schemeId: "smithy.api#noAuth",
595
- identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
596
- signer: new core_2.NoAuthSigner()
597
- }],
598
- logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
599
- protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
600
- protocolSettings: config?.protocolSettings ?? {
601
- defaultNamespace: "com.amazonaws.signin",
602
- errorTypeRegistries: schemas_0_1.errorTypeRegistries,
603
- version: "2023-01-01",
604
- serviceTarget: "Signin"
605
- },
606
- serviceId: config?.serviceId ?? "Signin",
607
- urlParser: config?.urlParser ?? url_parser_1.parseUrl,
608
- utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
609
- utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
610
- };
611
- };
612
- exports.getRuntimeConfig = getRuntimeConfig;
613
- }));
614
- var require_runtimeConfig$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
615
- Object.defineProperty(exports, "__esModule", { value: true });
616
- exports.getRuntimeConfig = void 0;
617
- var package_json_1$2 = __require("tslib").__importDefault((init_package(), __toCommonJS(package_exports).default));
618
- var core_1 = require_dist_cjs();
619
- var util_user_agent_node_1 = (init_dist_es$7(), __toCommonJS(dist_es_exports$7));
620
- var config_resolver_1 = (init_dist_es$8(), __toCommonJS(dist_es_exports$8));
621
- var hash_node_1 = (init_dist_es$9(), __toCommonJS(dist_es_exports$9));
622
- var middleware_retry_1 = (init_dist_es$10(), __toCommonJS(dist_es_exports$10));
623
- var node_config_provider_1 = (init_dist_es$11(), __toCommonJS(dist_es_exports$11));
624
- var node_http_handler_1 = (init_dist_es$12(), __toCommonJS(dist_es_exports$12));
625
- var smithy_client_1 = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
626
- var util_body_length_node_1 = (init_dist_es$13(), __toCommonJS(dist_es_exports$13));
627
- var util_defaults_mode_node_1 = (init_dist_es$14(), __toCommonJS(dist_es_exports$14));
628
- var util_retry_1 = (init_dist_es$15(), __toCommonJS(dist_es_exports$15));
629
- var runtimeConfig_shared_1 = require_runtimeConfig_shared$2();
630
- var getRuntimeConfig = (config) => {
631
- (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
632
- const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
633
- const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
634
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
635
- (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
636
- const loaderConfig = {
637
- profile: config?.profile,
638
- logger: clientSharedValues.logger
639
- };
640
- return {
641
- ...clientSharedValues,
642
- ...config,
643
- runtime: "node",
644
- defaultsMode,
645
- authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
646
- bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
647
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({
648
- serviceId: clientSharedValues.serviceId,
649
- clientVersion: package_json_1$2.default.version
650
- }),
651
- maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
652
- region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, {
653
- ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS,
654
- ...loaderConfig
655
- }),
656
- requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
657
- retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
658
- ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
659
- default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
660
- }, config),
661
- sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
662
- streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
663
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
664
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
665
- userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
666
- };
667
- };
668
- exports.getRuntimeConfig = getRuntimeConfig;
669
- }));
670
- var require_signin = /* @__PURE__ */ __commonJSMin(((exports) => {
671
- var middlewareHostHeader = (init_dist_es$16(), __toCommonJS(dist_es_exports$16));
672
- var middlewareLogger = (init_dist_es$17(), __toCommonJS(dist_es_exports$17));
673
- var middlewareRecursionDetection = (init_dist_es$18(), __toCommonJS(dist_es_exports$18));
674
- var middlewareUserAgent = (init_dist_es$19(), __toCommonJS(dist_es_exports$19));
675
- var configResolver = (init_dist_es$8(), __toCommonJS(dist_es_exports$8));
676
- var core = require_dist_cjs$1();
677
- var schema = require_schema();
678
- var middlewareContentLength = (init_dist_es$20(), __toCommonJS(dist_es_exports$20));
679
- var middlewareEndpoint = (init_dist_es$21(), __toCommonJS(dist_es_exports$21));
680
- var middlewareRetry = (init_dist_es$10(), __toCommonJS(dist_es_exports$10));
681
- var smithyClient = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
682
- var httpAuthSchemeProvider = require_httpAuthSchemeProvider$2();
683
- var runtimeConfig = require_runtimeConfig$2();
684
- var regionConfigResolver = (init_dist_es$22(), __toCommonJS(dist_es_exports$22));
685
- var protocolHttp = (init_dist_es$23(), __toCommonJS(dist_es_exports$23));
686
- var schemas_0 = require_schemas_0$2();
687
- var errors = require_errors$2();
688
- var SigninServiceException = require_SigninServiceException();
689
- var resolveClientEndpointParameters = (options) => {
690
- return Object.assign(options, {
691
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
692
- useFipsEndpoint: options.useFipsEndpoint ?? false,
693
- defaultSigningName: "signin"
694
- });
695
- };
696
- var commonParams = {
697
- UseFIPS: {
698
- type: "builtInParams",
699
- name: "useFipsEndpoint"
700
- },
701
- Endpoint: {
702
- type: "builtInParams",
703
- name: "endpoint"
704
- },
705
- Region: {
706
- type: "builtInParams",
707
- name: "region"
708
- },
709
- UseDualStack: {
710
- type: "builtInParams",
711
- name: "useDualstackEndpoint"
712
- }
713
- };
714
- var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
715
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
716
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
717
- let _credentials = runtimeConfig.credentials;
718
- return {
719
- setHttpAuthScheme(httpAuthScheme) {
720
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
721
- if (index === -1) _httpAuthSchemes.push(httpAuthScheme);
722
- else _httpAuthSchemes.splice(index, 1, httpAuthScheme);
723
- },
724
- httpAuthSchemes() {
725
- return _httpAuthSchemes;
726
- },
727
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
728
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
729
- },
730
- httpAuthSchemeProvider() {
731
- return _httpAuthSchemeProvider;
732
- },
733
- setCredentials(credentials) {
734
- _credentials = credentials;
735
- },
736
- credentials() {
737
- return _credentials;
738
- }
739
- };
740
- };
741
- var resolveHttpAuthRuntimeConfig = (config) => {
742
- return {
743
- httpAuthSchemes: config.httpAuthSchemes(),
744
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
745
- credentials: config.credentials()
746
- };
747
- };
748
- var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
749
- const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
750
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
751
- return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
752
- };
753
- var SigninClient = class extends smithyClient.Client {
754
- config;
755
- constructor(...[configuration]) {
756
- const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
757
- super(_config_0);
758
- this.initConfig = _config_0;
759
- const _config_1 = resolveClientEndpointParameters(_config_0);
760
- const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
761
- const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
762
- const _config_4 = configResolver.resolveRegionConfig(_config_3);
763
- const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
764
- const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
765
- this.config = resolveRuntimeExtensions(httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6), configuration?.extensions || []);
766
- this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
767
- this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
768
- this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
769
- this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
770
- this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
771
- this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
772
- this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
773
- this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
774
- httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSigninHttpAuthSchemeParametersProvider,
775
- identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({ "aws.auth#sigv4": config.credentials })
776
- }));
777
- this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
778
- }
779
- destroy() {
780
- super.destroy();
781
- }
782
- };
783
- var CreateOAuth2TokenCommand = class extends smithyClient.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
784
- return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
785
- }).s("Signin", "CreateOAuth2Token", {}).n("SigninClient", "CreateOAuth2TokenCommand").sc(schemas_0.CreateOAuth2Token$).build() {};
786
- var commands = { CreateOAuth2TokenCommand };
787
- var Signin = class extends SigninClient {};
788
- smithyClient.createAggregatedClient(commands, Signin);
789
- var OAuth2ErrorCode = {
790
- AUTHCODE_EXPIRED: "AUTHCODE_EXPIRED",
791
- INSUFFICIENT_PERMISSIONS: "INSUFFICIENT_PERMISSIONS",
792
- INVALID_REQUEST: "INVALID_REQUEST",
793
- SERVER_ERROR: "server_error",
794
- TOKEN_EXPIRED: "TOKEN_EXPIRED",
795
- USER_CREDENTIALS_CHANGED: "USER_CREDENTIALS_CHANGED"
796
- };
797
- exports.$Command = smithyClient.Command;
798
- exports.__Client = smithyClient.Client;
799
- exports.SigninServiceException = SigninServiceException.SigninServiceException;
800
- exports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand;
801
- exports.OAuth2ErrorCode = OAuth2ErrorCode;
802
- exports.Signin = Signin;
803
- exports.SigninClient = SigninClient;
804
- Object.prototype.hasOwnProperty.call(schemas_0, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
805
- enumerable: true,
806
- value: schemas_0["__proto__"]
807
- });
808
- Object.keys(schemas_0).forEach(function(k) {
809
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
810
- });
811
- Object.prototype.hasOwnProperty.call(errors, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
812
- enumerable: true,
813
- value: errors["__proto__"]
814
- });
815
- Object.keys(errors).forEach(function(k) {
816
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
817
- });
818
- }));
819
- var require_httpAuthSchemeProvider$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
820
- Object.defineProperty(exports, "__esModule", { value: true });
821
- exports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;
822
- var core_1 = require_dist_cjs();
823
- var util_middleware_1 = (init_dist_es(), __toCommonJS(dist_es_exports));
824
- var defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
825
- return {
826
- operation: (0, util_middleware_1.getSmithyContext)(context).operation,
827
- region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
828
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
829
- })()
830
- };
831
- };
832
- exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider;
833
- function createAwsAuthSigv4HttpAuthOption(authParameters) {
834
- return {
835
- schemeId: "aws.auth#sigv4",
836
- signingProperties: {
837
- name: "sso-oauth",
838
- region: authParameters.region
839
- },
840
- propertiesExtractor: (config, context) => ({ signingProperties: {
841
- config,
842
- context
843
- } })
844
- };
845
- }
846
- function createSmithyApiNoAuthHttpAuthOption(authParameters) {
847
- return { schemeId: "smithy.api#noAuth" };
848
- }
849
- var defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {
850
- const options = [];
851
- switch (authParameters.operation) {
852
- case "CreateToken":
853
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
854
- break;
855
- default: options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
856
- }
857
- return options;
858
- };
859
- exports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider;
860
- var resolveHttpAuthSchemeConfig = (config) => {
861
- const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
862
- return Object.assign(config_0, { authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []) });
863
- };
864
- exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
865
- }));
866
- var require_ruleset$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
867
- Object.defineProperty(exports, "__esModule", { value: true });
868
- exports.ruleSet = void 0;
869
- var u = "required", v = "fn", w = "argv", x = "ref";
870
- var a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = {
871
- [u]: false,
872
- type: "string"
873
- }, j = {
874
- [u]: true,
875
- default: false,
876
- type: "boolean"
877
- }, k = { [x]: "Endpoint" }, l = {
878
- [v]: c,
879
- [w]: [{ [x]: "UseFIPS" }, true]
880
- }, m = {
881
- [v]: c,
882
- [w]: [{ [x]: "UseDualStack" }, true]
883
- }, n = {}, o = {
884
- [v]: h,
885
- [w]: [{ [x]: g }, "supportsFIPS"]
886
- }, p = { [x]: g }, q = {
887
- [v]: c,
888
- [w]: [true, {
889
- [v]: h,
890
- [w]: [p, "supportsDualStack"]
891
- }]
892
- }, r = [l], s = [m], t = [{ [x]: "Region" }];
893
- exports.ruleSet = {
894
- version: "1.0",
895
- parameters: {
896
- Region: i,
897
- UseDualStack: j,
898
- UseFIPS: j,
899
- Endpoint: i
900
- },
901
- rules: [
902
- {
903
- conditions: [{
904
- [v]: b,
905
- [w]: [k]
906
- }],
907
- rules: [
908
- {
909
- conditions: r,
910
- error: "Invalid Configuration: FIPS and custom endpoint are not supported",
911
- type: d
912
- },
913
- {
914
- conditions: s,
915
- error: "Invalid Configuration: Dualstack and custom endpoint are not supported",
916
- type: d
917
- },
918
- {
919
- endpoint: {
920
- url: k,
921
- properties: n,
922
- headers: n
923
- },
924
- type: e
925
- }
926
- ],
927
- type: f
928
- },
929
- {
930
- conditions: [{
931
- [v]: b,
932
- [w]: t
933
- }],
934
- rules: [{
935
- conditions: [{
936
- [v]: "aws.partition",
937
- [w]: t,
938
- assign: g
939
- }],
940
- rules: [
941
- {
942
- conditions: [l, m],
943
- rules: [{
944
- conditions: [{
945
- [v]: c,
946
- [w]: [a, o]
947
- }, q],
948
- rules: [{
949
- endpoint: {
950
- url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
951
- properties: n,
952
- headers: n
953
- },
954
- type: e
955
- }],
956
- type: f
957
- }, {
958
- error: "FIPS and DualStack are enabled, but this partition does not support one or both",
959
- type: d
960
- }],
961
- type: f
962
- },
963
- {
964
- conditions: r,
965
- rules: [{
966
- conditions: [{
967
- [v]: c,
968
- [w]: [o, a]
969
- }],
970
- rules: [{
971
- conditions: [{
972
- [v]: "stringEquals",
973
- [w]: [{
974
- [v]: h,
975
- [w]: [p, "name"]
976
- }, "aws-us-gov"]
977
- }],
978
- endpoint: {
979
- url: "https://oidc.{Region}.amazonaws.com",
980
- properties: n,
981
- headers: n
982
- },
983
- type: e
984
- }, {
985
- endpoint: {
986
- url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",
987
- properties: n,
988
- headers: n
989
- },
990
- type: e
991
- }],
992
- type: f
993
- }, {
994
- error: "FIPS is enabled but this partition does not support FIPS",
995
- type: d
996
- }],
997
- type: f
998
- },
999
- {
1000
- conditions: s,
1001
- rules: [{
1002
- conditions: [q],
1003
- rules: [{
1004
- endpoint: {
1005
- url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",
1006
- properties: n,
1007
- headers: n
1008
- },
1009
- type: e
1010
- }],
1011
- type: f
1012
- }, {
1013
- error: "DualStack is enabled but this partition does not support DualStack",
1014
- type: d
1015
- }],
1016
- type: f
1017
- },
1018
- {
1019
- endpoint: {
1020
- url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}",
1021
- properties: n,
1022
- headers: n
1023
- },
1024
- type: e
1025
- }
1026
- ],
1027
- type: f
1028
- }],
1029
- type: f
1030
- },
1031
- {
1032
- error: "Invalid Configuration: Missing Region",
1033
- type: d
1034
- }
1035
- ]
1036
- };
1037
- }));
1038
- var require_endpointResolver$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
1039
- Object.defineProperty(exports, "__esModule", { value: true });
1040
- exports.defaultEndpointResolver = void 0;
1041
- var util_endpoints_1 = (init_dist_es$1(), __toCommonJS(dist_es_exports$1));
1042
- var util_endpoints_2 = (init_dist_es$2(), __toCommonJS(dist_es_exports$2));
1043
- var ruleset_1 = require_ruleset$1();
1044
- var cache = new util_endpoints_2.EndpointCache({
1045
- size: 50,
1046
- params: [
1047
- "Endpoint",
1048
- "Region",
1049
- "UseDualStack",
1050
- "UseFIPS"
1051
- ]
1052
- });
1053
- var defaultEndpointResolver = (endpointParams, context = {}) => {
1054
- return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
1055
- endpointParams,
1056
- logger: context.logger
1057
- }));
1058
- };
1059
- exports.defaultEndpointResolver = defaultEndpointResolver;
1060
- util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
1061
- }));
1062
- var require_SSOOIDCServiceException = /* @__PURE__ */ __commonJSMin(((exports) => {
1063
- Object.defineProperty(exports, "__esModule", { value: true });
1064
- exports.SSOOIDCServiceException = exports.__ServiceException = void 0;
1065
- var smithy_client_1 = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
1066
- Object.defineProperty(exports, "__ServiceException", {
1067
- enumerable: true,
1068
- get: function() {
1069
- return smithy_client_1.ServiceException;
1070
- }
1071
- });
1072
- exports.SSOOIDCServiceException = class SSOOIDCServiceException extends smithy_client_1.ServiceException {
1073
- constructor(options) {
1074
- super(options);
1075
- Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);
1076
- }
1077
- };
1078
- }));
1079
- var require_errors$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
1080
- Object.defineProperty(exports, "__esModule", { value: true });
1081
- exports.UnsupportedGrantTypeException = exports.UnauthorizedClientException = exports.SlowDownException = exports.InvalidScopeException = exports.InvalidRequestException = exports.InvalidGrantException = exports.InvalidClientException = exports.InternalServerException = exports.ExpiredTokenException = exports.AuthorizationPendingException = exports.AccessDeniedException = void 0;
1082
- var SSOOIDCServiceException_1 = require_SSOOIDCServiceException();
1083
- exports.AccessDeniedException = class AccessDeniedException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
1084
- name = "AccessDeniedException";
1085
- $fault = "client";
1086
- error;
1087
- reason;
1088
- error_description;
1089
- constructor(opts) {
1090
- super({
1091
- name: "AccessDeniedException",
1092
- $fault: "client",
1093
- ...opts
1094
- });
1095
- Object.setPrototypeOf(this, AccessDeniedException.prototype);
1096
- this.error = opts.error;
1097
- this.reason = opts.reason;
1098
- this.error_description = opts.error_description;
1099
- }
1100
- };
1101
- exports.AuthorizationPendingException = class AuthorizationPendingException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
1102
- name = "AuthorizationPendingException";
1103
- $fault = "client";
1104
- error;
1105
- error_description;
1106
- constructor(opts) {
1107
- super({
1108
- name: "AuthorizationPendingException",
1109
- $fault: "client",
1110
- ...opts
1111
- });
1112
- Object.setPrototypeOf(this, AuthorizationPendingException.prototype);
1113
- this.error = opts.error;
1114
- this.error_description = opts.error_description;
1115
- }
1116
- };
1117
- exports.ExpiredTokenException = class ExpiredTokenException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
1118
- name = "ExpiredTokenException";
1119
- $fault = "client";
1120
- error;
1121
- error_description;
1122
- constructor(opts) {
1123
- super({
1124
- name: "ExpiredTokenException",
1125
- $fault: "client",
1126
- ...opts
1127
- });
1128
- Object.setPrototypeOf(this, ExpiredTokenException.prototype);
1129
- this.error = opts.error;
1130
- this.error_description = opts.error_description;
1131
- }
1132
- };
1133
- exports.InternalServerException = class InternalServerException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
1134
- name = "InternalServerException";
1135
- $fault = "server";
1136
- error;
1137
- error_description;
1138
- constructor(opts) {
1139
- super({
1140
- name: "InternalServerException",
1141
- $fault: "server",
1142
- ...opts
1143
- });
1144
- Object.setPrototypeOf(this, InternalServerException.prototype);
1145
- this.error = opts.error;
1146
- this.error_description = opts.error_description;
1147
- }
1148
- };
1149
- exports.InvalidClientException = class InvalidClientException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
1150
- name = "InvalidClientException";
1151
- $fault = "client";
1152
- error;
1153
- error_description;
1154
- constructor(opts) {
1155
- super({
1156
- name: "InvalidClientException",
1157
- $fault: "client",
1158
- ...opts
1159
- });
1160
- Object.setPrototypeOf(this, InvalidClientException.prototype);
1161
- this.error = opts.error;
1162
- this.error_description = opts.error_description;
1163
- }
1164
- };
1165
- exports.InvalidGrantException = class InvalidGrantException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
1166
- name = "InvalidGrantException";
1167
- $fault = "client";
1168
- error;
1169
- error_description;
1170
- constructor(opts) {
1171
- super({
1172
- name: "InvalidGrantException",
1173
- $fault: "client",
1174
- ...opts
1175
- });
1176
- Object.setPrototypeOf(this, InvalidGrantException.prototype);
1177
- this.error = opts.error;
1178
- this.error_description = opts.error_description;
1179
- }
1180
- };
1181
- exports.InvalidRequestException = class InvalidRequestException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
1182
- name = "InvalidRequestException";
1183
- $fault = "client";
1184
- error;
1185
- reason;
1186
- error_description;
1187
- constructor(opts) {
1188
- super({
1189
- name: "InvalidRequestException",
1190
- $fault: "client",
1191
- ...opts
1192
- });
1193
- Object.setPrototypeOf(this, InvalidRequestException.prototype);
1194
- this.error = opts.error;
1195
- this.reason = opts.reason;
1196
- this.error_description = opts.error_description;
1197
- }
1198
- };
1199
- exports.InvalidScopeException = class InvalidScopeException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
1200
- name = "InvalidScopeException";
1201
- $fault = "client";
1202
- error;
1203
- error_description;
1204
- constructor(opts) {
1205
- super({
1206
- name: "InvalidScopeException",
1207
- $fault: "client",
1208
- ...opts
1209
- });
1210
- Object.setPrototypeOf(this, InvalidScopeException.prototype);
1211
- this.error = opts.error;
1212
- this.error_description = opts.error_description;
1213
- }
1214
- };
1215
- exports.SlowDownException = class SlowDownException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
1216
- name = "SlowDownException";
1217
- $fault = "client";
1218
- error;
1219
- error_description;
1220
- constructor(opts) {
1221
- super({
1222
- name: "SlowDownException",
1223
- $fault: "client",
1224
- ...opts
1225
- });
1226
- Object.setPrototypeOf(this, SlowDownException.prototype);
1227
- this.error = opts.error;
1228
- this.error_description = opts.error_description;
1229
- }
1230
- };
1231
- exports.UnauthorizedClientException = class UnauthorizedClientException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
1232
- name = "UnauthorizedClientException";
1233
- $fault = "client";
1234
- error;
1235
- error_description;
1236
- constructor(opts) {
1237
- super({
1238
- name: "UnauthorizedClientException",
1239
- $fault: "client",
1240
- ...opts
1241
- });
1242
- Object.setPrototypeOf(this, UnauthorizedClientException.prototype);
1243
- this.error = opts.error;
1244
- this.error_description = opts.error_description;
1245
- }
1246
- };
1247
- exports.UnsupportedGrantTypeException = class UnsupportedGrantTypeException extends SSOOIDCServiceException_1.SSOOIDCServiceException {
1248
- name = "UnsupportedGrantTypeException";
1249
- $fault = "client";
1250
- error;
1251
- error_description;
1252
- constructor(opts) {
1253
- super({
1254
- name: "UnsupportedGrantTypeException",
1255
- $fault: "client",
1256
- ...opts
1257
- });
1258
- Object.setPrototypeOf(this, UnsupportedGrantTypeException.prototype);
1259
- this.error = opts.error;
1260
- this.error_description = opts.error_description;
1261
- }
1262
- };
1263
- }));
1264
- var require_schemas_0$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
1265
- Object.defineProperty(exports, "__esModule", { value: true });
1266
- exports.CreateToken$ = exports.CreateTokenResponse$ = exports.CreateTokenRequest$ = exports.errorTypeRegistries = exports.UnsupportedGrantTypeException$ = exports.UnauthorizedClientException$ = exports.SlowDownException$ = exports.InvalidScopeException$ = exports.InvalidRequestException$ = exports.InvalidGrantException$ = exports.InvalidClientException$ = exports.InternalServerException$ = exports.ExpiredTokenException$ = exports.AuthorizationPendingException$ = exports.AccessDeniedException$ = exports.SSOOIDCServiceException$ = void 0;
1267
- var _ADE = "AccessDeniedException";
1268
- var _APE = "AuthorizationPendingException";
1269
- var _AT = "AccessToken";
1270
- var _CS = "ClientSecret";
1271
- var _CT = "CreateToken";
1272
- var _CTR = "CreateTokenRequest";
1273
- var _CTRr = "CreateTokenResponse";
1274
- var _CV = "CodeVerifier";
1275
- var _ETE = "ExpiredTokenException";
1276
- var _ICE = "InvalidClientException";
1277
- var _IGE = "InvalidGrantException";
1278
- var _IRE = "InvalidRequestException";
1279
- var _ISE = "InternalServerException";
1280
- var _ISEn = "InvalidScopeException";
1281
- var _IT = "IdToken";
1282
- var _RT = "RefreshToken";
1283
- var _SDE = "SlowDownException";
1284
- var _UCE = "UnauthorizedClientException";
1285
- var _UGTE = "UnsupportedGrantTypeException";
1286
- var _aT = "accessToken";
1287
- var _c = "client";
1288
- var _cI = "clientId";
1289
- var _cS = "clientSecret";
1290
- var _cV = "codeVerifier";
1291
- var _co = "code";
1292
- var _dC = "deviceCode";
1293
- var _e = "error";
1294
- var _eI = "expiresIn";
1295
- var _ed = "error_description";
1296
- var _gT = "grantType";
1297
- var _h = "http";
1298
- var _hE = "httpError";
1299
- var _iT = "idToken";
1300
- var _r = "reason";
1301
- var _rT = "refreshToken";
1302
- var _rU = "redirectUri";
1303
- var _s = "smithy.ts.sdk.synthetic.com.amazonaws.ssooidc";
1304
- var _sc = "scope";
1305
- var _se = "server";
1306
- var _tT = "tokenType";
1307
- var n0 = "com.amazonaws.ssooidc";
1308
- var schema_1 = require_schema();
1309
- var errors_1 = require_errors$1();
1310
- var SSOOIDCServiceException_1 = require_SSOOIDCServiceException();
1311
- var _s_registry = schema_1.TypeRegistry.for(_s);
1312
- exports.SSOOIDCServiceException$ = [
1313
- -3,
1314
- _s,
1315
- "SSOOIDCServiceException",
1316
- 0,
1317
- [],
1318
- []
1319
- ];
1320
- _s_registry.registerError(exports.SSOOIDCServiceException$, SSOOIDCServiceException_1.SSOOIDCServiceException);
1321
- var n0_registry = schema_1.TypeRegistry.for(n0);
1322
- exports.AccessDeniedException$ = [
1323
- -3,
1324
- n0,
1325
- _ADE,
1326
- {
1327
- [_e]: _c,
1328
- [_hE]: 400
1329
- },
1330
- [
1331
- _e,
1332
- _r,
1333
- _ed
1334
- ],
1335
- [
1336
- 0,
1337
- 0,
1338
- 0
1339
- ]
1340
- ];
1341
- n0_registry.registerError(exports.AccessDeniedException$, errors_1.AccessDeniedException);
1342
- exports.AuthorizationPendingException$ = [
1343
- -3,
1344
- n0,
1345
- _APE,
1346
- {
1347
- [_e]: _c,
1348
- [_hE]: 400
1349
- },
1350
- [_e, _ed],
1351
- [0, 0]
1352
- ];
1353
- n0_registry.registerError(exports.AuthorizationPendingException$, errors_1.AuthorizationPendingException);
1354
- exports.ExpiredTokenException$ = [
1355
- -3,
1356
- n0,
1357
- _ETE,
1358
- {
1359
- [_e]: _c,
1360
- [_hE]: 400
1361
- },
1362
- [_e, _ed],
1363
- [0, 0]
1364
- ];
1365
- n0_registry.registerError(exports.ExpiredTokenException$, errors_1.ExpiredTokenException);
1366
- exports.InternalServerException$ = [
1367
- -3,
1368
- n0,
1369
- _ISE,
1370
- {
1371
- [_e]: _se,
1372
- [_hE]: 500
1373
- },
1374
- [_e, _ed],
1375
- [0, 0]
1376
- ];
1377
- n0_registry.registerError(exports.InternalServerException$, errors_1.InternalServerException);
1378
- exports.InvalidClientException$ = [
1379
- -3,
1380
- n0,
1381
- _ICE,
1382
- {
1383
- [_e]: _c,
1384
- [_hE]: 401
1385
- },
1386
- [_e, _ed],
1387
- [0, 0]
1388
- ];
1389
- n0_registry.registerError(exports.InvalidClientException$, errors_1.InvalidClientException);
1390
- exports.InvalidGrantException$ = [
1391
- -3,
1392
- n0,
1393
- _IGE,
1394
- {
1395
- [_e]: _c,
1396
- [_hE]: 400
1397
- },
1398
- [_e, _ed],
1399
- [0, 0]
1400
- ];
1401
- n0_registry.registerError(exports.InvalidGrantException$, errors_1.InvalidGrantException);
1402
- exports.InvalidRequestException$ = [
1403
- -3,
1404
- n0,
1405
- _IRE,
1406
- {
1407
- [_e]: _c,
1408
- [_hE]: 400
1409
- },
1410
- [
1411
- _e,
1412
- _r,
1413
- _ed
1414
- ],
1415
- [
1416
- 0,
1417
- 0,
1418
- 0
1419
- ]
1420
- ];
1421
- n0_registry.registerError(exports.InvalidRequestException$, errors_1.InvalidRequestException);
1422
- exports.InvalidScopeException$ = [
1423
- -3,
1424
- n0,
1425
- _ISEn,
1426
- {
1427
- [_e]: _c,
1428
- [_hE]: 400
1429
- },
1430
- [_e, _ed],
1431
- [0, 0]
1432
- ];
1433
- n0_registry.registerError(exports.InvalidScopeException$, errors_1.InvalidScopeException);
1434
- exports.SlowDownException$ = [
1435
- -3,
1436
- n0,
1437
- _SDE,
1438
- {
1439
- [_e]: _c,
1440
- [_hE]: 400
1441
- },
1442
- [_e, _ed],
1443
- [0, 0]
1444
- ];
1445
- n0_registry.registerError(exports.SlowDownException$, errors_1.SlowDownException);
1446
- exports.UnauthorizedClientException$ = [
1447
- -3,
1448
- n0,
1449
- _UCE,
1450
- {
1451
- [_e]: _c,
1452
- [_hE]: 400
1453
- },
1454
- [_e, _ed],
1455
- [0, 0]
1456
- ];
1457
- n0_registry.registerError(exports.UnauthorizedClientException$, errors_1.UnauthorizedClientException);
1458
- exports.UnsupportedGrantTypeException$ = [
1459
- -3,
1460
- n0,
1461
- _UGTE,
1462
- {
1463
- [_e]: _c,
1464
- [_hE]: 400
1465
- },
1466
- [_e, _ed],
1467
- [0, 0]
1468
- ];
1469
- n0_registry.registerError(exports.UnsupportedGrantTypeException$, errors_1.UnsupportedGrantTypeException);
1470
- exports.errorTypeRegistries = [_s_registry, n0_registry];
1471
- var AccessToken = [
1472
- 0,
1473
- n0,
1474
- _AT,
1475
- 8,
1476
- 0
1477
- ];
1478
- var ClientSecret = [
1479
- 0,
1480
- n0,
1481
- _CS,
1482
- 8,
1483
- 0
1484
- ];
1485
- var CodeVerifier = [
1486
- 0,
1487
- n0,
1488
- _CV,
1489
- 8,
1490
- 0
1491
- ];
1492
- var IdToken = [
1493
- 0,
1494
- n0,
1495
- _IT,
1496
- 8,
1497
- 0
1498
- ];
1499
- var RefreshToken = [
1500
- 0,
1501
- n0,
1502
- _RT,
1503
- 8,
1504
- 0
1505
- ];
1506
- exports.CreateTokenRequest$ = [
1507
- 3,
1508
- n0,
1509
- _CTR,
1510
- 0,
1511
- [
1512
- _cI,
1513
- _cS,
1514
- _gT,
1515
- _dC,
1516
- _co,
1517
- _rT,
1518
- _sc,
1519
- _rU,
1520
- _cV
1521
- ],
1522
- [
1523
- 0,
1524
- [() => ClientSecret, 0],
1525
- 0,
1526
- 0,
1527
- 0,
1528
- [() => RefreshToken, 0],
1529
- 64,
1530
- 0,
1531
- [() => CodeVerifier, 0]
1532
- ],
1533
- 3
1534
- ];
1535
- exports.CreateTokenResponse$ = [
1536
- 3,
1537
- n0,
1538
- _CTRr,
1539
- 0,
1540
- [
1541
- _aT,
1542
- _tT,
1543
- _eI,
1544
- _rT,
1545
- _iT
1546
- ],
1547
- [
1548
- [() => AccessToken, 0],
1549
- 0,
1550
- 1,
1551
- [() => RefreshToken, 0],
1552
- [() => IdToken, 0]
1553
- ]
1554
- ];
1555
- exports.CreateToken$ = [
1556
- 9,
1557
- n0,
1558
- _CT,
1559
- { [_h]: [
1560
- "POST",
1561
- "/token",
1562
- 200
1563
- ] },
1564
- () => exports.CreateTokenRequest$,
1565
- () => exports.CreateTokenResponse$
1566
- ];
1567
- }));
1568
- var require_runtimeConfig_shared$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
1569
- Object.defineProperty(exports, "__esModule", { value: true });
1570
- exports.getRuntimeConfig = void 0;
1571
- var core_1 = require_dist_cjs();
1572
- var protocols_1 = require_protocols();
1573
- var core_2 = require_dist_cjs$1();
1574
- var smithy_client_1 = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
1575
- var url_parser_1 = (init_dist_es$4(), __toCommonJS(dist_es_exports$4));
1576
- var util_base64_1 = (init_dist_es$5(), __toCommonJS(dist_es_exports$5));
1577
- var util_utf8_1 = (init_dist_es$6(), __toCommonJS(dist_es_exports$6));
1578
- var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider$1();
1579
- var endpointResolver_1 = require_endpointResolver$1();
1580
- var schemas_0_1 = require_schemas_0$1();
1581
- var getRuntimeConfig = (config) => {
1582
- return {
1583
- apiVersion: "2019-06-10",
1584
- base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
1585
- base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
1586
- disableHostPrefix: config?.disableHostPrefix ?? false,
1587
- endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
1588
- extensions: config?.extensions ?? [],
1589
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider,
1590
- httpAuthSchemes: config?.httpAuthSchemes ?? [{
1591
- schemeId: "aws.auth#sigv4",
1592
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
1593
- signer: new core_1.AwsSdkSigV4Signer()
1594
- }, {
1595
- schemeId: "smithy.api#noAuth",
1596
- identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
1597
- signer: new core_2.NoAuthSigner()
1598
- }],
1599
- logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
1600
- protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
1601
- protocolSettings: config?.protocolSettings ?? {
1602
- defaultNamespace: "com.amazonaws.ssooidc",
1603
- errorTypeRegistries: schemas_0_1.errorTypeRegistries,
1604
- version: "2019-06-10",
1605
- serviceTarget: "AWSSSOOIDCService"
1606
- },
1607
- serviceId: config?.serviceId ?? "SSO OIDC",
1608
- urlParser: config?.urlParser ?? url_parser_1.parseUrl,
1609
- utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
1610
- utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
1611
- };
1612
- };
1613
- exports.getRuntimeConfig = getRuntimeConfig;
1614
- }));
1615
- var require_runtimeConfig$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
1616
- Object.defineProperty(exports, "__esModule", { value: true });
1617
- exports.getRuntimeConfig = void 0;
1618
- var package_json_1$1 = __require("tslib").__importDefault((init_package(), __toCommonJS(package_exports).default));
1619
- var core_1 = require_dist_cjs();
1620
- var util_user_agent_node_1 = (init_dist_es$7(), __toCommonJS(dist_es_exports$7));
1621
- var config_resolver_1 = (init_dist_es$8(), __toCommonJS(dist_es_exports$8));
1622
- var hash_node_1 = (init_dist_es$9(), __toCommonJS(dist_es_exports$9));
1623
- var middleware_retry_1 = (init_dist_es$10(), __toCommonJS(dist_es_exports$10));
1624
- var node_config_provider_1 = (init_dist_es$11(), __toCommonJS(dist_es_exports$11));
1625
- var node_http_handler_1 = (init_dist_es$12(), __toCommonJS(dist_es_exports$12));
1626
- var smithy_client_1 = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
1627
- var util_body_length_node_1 = (init_dist_es$13(), __toCommonJS(dist_es_exports$13));
1628
- var util_defaults_mode_node_1 = (init_dist_es$14(), __toCommonJS(dist_es_exports$14));
1629
- var util_retry_1 = (init_dist_es$15(), __toCommonJS(dist_es_exports$15));
1630
- var runtimeConfig_shared_1 = require_runtimeConfig_shared$1();
1631
- var getRuntimeConfig = (config) => {
1632
- (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
1633
- const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
1634
- const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
1635
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
1636
- (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
1637
- const loaderConfig = {
1638
- profile: config?.profile,
1639
- logger: clientSharedValues.logger
1640
- };
1641
- return {
1642
- ...clientSharedValues,
1643
- ...config,
1644
- runtime: "node",
1645
- defaultsMode,
1646
- authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
1647
- bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
1648
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({
1649
- serviceId: clientSharedValues.serviceId,
1650
- clientVersion: package_json_1$1.default.version
1651
- }),
1652
- maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
1653
- region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, {
1654
- ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS,
1655
- ...loaderConfig
1656
- }),
1657
- requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
1658
- retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
1659
- ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
1660
- default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
1661
- }, config),
1662
- sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
1663
- streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
1664
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
1665
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
1666
- userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
1667
- };
1668
- };
1669
- exports.getRuntimeConfig = getRuntimeConfig;
1670
- }));
1671
- var require_sso_oidc = /* @__PURE__ */ __commonJSMin(((exports) => {
1672
- var middlewareHostHeader = (init_dist_es$16(), __toCommonJS(dist_es_exports$16));
1673
- var middlewareLogger = (init_dist_es$17(), __toCommonJS(dist_es_exports$17));
1674
- var middlewareRecursionDetection = (init_dist_es$18(), __toCommonJS(dist_es_exports$18));
1675
- var middlewareUserAgent = (init_dist_es$19(), __toCommonJS(dist_es_exports$19));
1676
- var configResolver = (init_dist_es$8(), __toCommonJS(dist_es_exports$8));
1677
- var core = require_dist_cjs$1();
1678
- var schema = require_schema();
1679
- var middlewareContentLength = (init_dist_es$20(), __toCommonJS(dist_es_exports$20));
1680
- var middlewareEndpoint = (init_dist_es$21(), __toCommonJS(dist_es_exports$21));
1681
- var middlewareRetry = (init_dist_es$10(), __toCommonJS(dist_es_exports$10));
1682
- var smithyClient = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
1683
- var httpAuthSchemeProvider = require_httpAuthSchemeProvider$1();
1684
- var runtimeConfig = require_runtimeConfig$1();
1685
- var regionConfigResolver = (init_dist_es$22(), __toCommonJS(dist_es_exports$22));
1686
- var protocolHttp = (init_dist_es$23(), __toCommonJS(dist_es_exports$23));
1687
- var schemas_0 = require_schemas_0$1();
1688
- var errors = require_errors$1();
1689
- var SSOOIDCServiceException = require_SSOOIDCServiceException();
1690
- var resolveClientEndpointParameters = (options) => {
1691
- return Object.assign(options, {
1692
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
1693
- useFipsEndpoint: options.useFipsEndpoint ?? false,
1694
- defaultSigningName: "sso-oauth"
1695
- });
1696
- };
1697
- var commonParams = {
1698
- UseFIPS: {
1699
- type: "builtInParams",
1700
- name: "useFipsEndpoint"
1701
- },
1702
- Endpoint: {
1703
- type: "builtInParams",
1704
- name: "endpoint"
1705
- },
1706
- Region: {
1707
- type: "builtInParams",
1708
- name: "region"
1709
- },
1710
- UseDualStack: {
1711
- type: "builtInParams",
1712
- name: "useDualstackEndpoint"
1713
- }
1714
- };
1715
- var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
1716
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
1717
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
1718
- let _credentials = runtimeConfig.credentials;
1719
- return {
1720
- setHttpAuthScheme(httpAuthScheme) {
1721
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
1722
- if (index === -1) _httpAuthSchemes.push(httpAuthScheme);
1723
- else _httpAuthSchemes.splice(index, 1, httpAuthScheme);
1724
- },
1725
- httpAuthSchemes() {
1726
- return _httpAuthSchemes;
1727
- },
1728
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
1729
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
1730
- },
1731
- httpAuthSchemeProvider() {
1732
- return _httpAuthSchemeProvider;
1733
- },
1734
- setCredentials(credentials) {
1735
- _credentials = credentials;
1736
- },
1737
- credentials() {
1738
- return _credentials;
1739
- }
1740
- };
1741
- };
1742
- var resolveHttpAuthRuntimeConfig = (config) => {
1743
- return {
1744
- httpAuthSchemes: config.httpAuthSchemes(),
1745
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
1746
- credentials: config.credentials()
1747
- };
1748
- };
1749
- var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
1750
- const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
1751
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
1752
- return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
1753
- };
1754
- var SSOOIDCClient = class extends smithyClient.Client {
1755
- config;
1756
- constructor(...[configuration]) {
1757
- const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
1758
- super(_config_0);
1759
- this.initConfig = _config_0;
1760
- const _config_1 = resolveClientEndpointParameters(_config_0);
1761
- const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
1762
- const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
1763
- const _config_4 = configResolver.resolveRegionConfig(_config_3);
1764
- const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
1765
- const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
1766
- this.config = resolveRuntimeExtensions(httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6), configuration?.extensions || []);
1767
- this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
1768
- this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
1769
- this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
1770
- this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
1771
- this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
1772
- this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
1773
- this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
1774
- this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
1775
- httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider,
1776
- identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({ "aws.auth#sigv4": config.credentials })
1777
- }));
1778
- this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
1779
- }
1780
- destroy() {
1781
- super.destroy();
1782
- }
1783
- };
1784
- var CreateTokenCommand = class extends smithyClient.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1785
- return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1786
- }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").sc(schemas_0.CreateToken$).build() {};
1787
- var commands = { CreateTokenCommand };
1788
- var SSOOIDC = class extends SSOOIDCClient {};
1789
- smithyClient.createAggregatedClient(commands, SSOOIDC);
1790
- var AccessDeniedExceptionReason = { KMS_ACCESS_DENIED: "KMS_AccessDeniedException" };
1791
- var InvalidRequestExceptionReason = {
1792
- KMS_DISABLED_KEY: "KMS_DisabledException",
1793
- KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException",
1794
- KMS_INVALID_STATE: "KMS_InvalidStateException",
1795
- KMS_KEY_NOT_FOUND: "KMS_NotFoundException"
1796
- };
1797
- exports.$Command = smithyClient.Command;
1798
- exports.__Client = smithyClient.Client;
1799
- exports.SSOOIDCServiceException = SSOOIDCServiceException.SSOOIDCServiceException;
1800
- exports.AccessDeniedExceptionReason = AccessDeniedExceptionReason;
1801
- exports.CreateTokenCommand = CreateTokenCommand;
1802
- exports.InvalidRequestExceptionReason = InvalidRequestExceptionReason;
1803
- exports.SSOOIDC = SSOOIDC;
1804
- exports.SSOOIDCClient = SSOOIDCClient;
1805
- Object.prototype.hasOwnProperty.call(schemas_0, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
1806
- enumerable: true,
1807
- value: schemas_0["__proto__"]
1808
- });
1809
- Object.keys(schemas_0).forEach(function(k) {
1810
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
1811
- });
1812
- Object.prototype.hasOwnProperty.call(errors, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
1813
- enumerable: true,
1814
- value: errors["__proto__"]
1815
- });
1816
- Object.keys(errors).forEach(function(k) {
1817
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
1818
- });
1819
- }));
1820
- var require_httpAuthSchemeProvider = /* @__PURE__ */ __commonJSMin(((exports) => {
1821
- Object.defineProperty(exports, "__esModule", { value: true });
1822
- exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0;
1823
- var core_1 = require_dist_cjs();
1824
- var util_middleware_1 = (init_dist_es(), __toCommonJS(dist_es_exports));
1825
- var STSClient_1 = require_STSClient();
1826
- var defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
1827
- return {
1828
- operation: (0, util_middleware_1.getSmithyContext)(context).operation,
1829
- region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
1830
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
1831
- })()
1832
- };
1833
- };
1834
- exports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;
1835
- function createAwsAuthSigv4HttpAuthOption(authParameters) {
1836
- return {
1837
- schemeId: "aws.auth#sigv4",
1838
- signingProperties: {
1839
- name: "sts",
1840
- region: authParameters.region
1841
- },
1842
- propertiesExtractor: (config, context) => ({ signingProperties: {
1843
- config,
1844
- context
1845
- } })
1846
- };
1847
- }
1848
- function createSmithyApiNoAuthHttpAuthOption(authParameters) {
1849
- return { schemeId: "smithy.api#noAuth" };
1850
- }
1851
- var defaultSTSHttpAuthSchemeProvider = (authParameters) => {
1852
- const options = [];
1853
- switch (authParameters.operation) {
1854
- case "AssumeRoleWithWebIdentity":
1855
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
1856
- break;
1857
- default: options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
1858
- }
1859
- return options;
1860
- };
1861
- exports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;
1862
- var resolveStsAuthConfig = (input) => Object.assign(input, { stsClientCtor: STSClient_1.STSClient });
1863
- exports.resolveStsAuthConfig = resolveStsAuthConfig;
1864
- var resolveHttpAuthSchemeConfig = (config) => {
1865
- const config_0 = (0, exports.resolveStsAuthConfig)(config);
1866
- const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0);
1867
- return Object.assign(config_1, { authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []) });
1868
- };
1869
- exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
1870
- }));
1871
- var require_EndpointParameters = /* @__PURE__ */ __commonJSMin(((exports) => {
1872
- Object.defineProperty(exports, "__esModule", { value: true });
1873
- exports.commonParams = exports.resolveClientEndpointParameters = void 0;
1874
- var resolveClientEndpointParameters = (options) => {
1875
- return Object.assign(options, {
1876
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
1877
- useFipsEndpoint: options.useFipsEndpoint ?? false,
1878
- useGlobalEndpoint: options.useGlobalEndpoint ?? false,
1879
- defaultSigningName: "sts"
1880
- });
1881
- };
1882
- exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
1883
- exports.commonParams = {
1884
- UseGlobalEndpoint: {
1885
- type: "builtInParams",
1886
- name: "useGlobalEndpoint"
1887
- },
1888
- UseFIPS: {
1889
- type: "builtInParams",
1890
- name: "useFipsEndpoint"
1891
- },
1892
- Endpoint: {
1893
- type: "builtInParams",
1894
- name: "endpoint"
1895
- },
1896
- Region: {
1897
- type: "builtInParams",
1898
- name: "region"
1899
- },
1900
- UseDualStack: {
1901
- type: "builtInParams",
1902
- name: "useDualstackEndpoint"
1903
- }
1904
- };
1905
- }));
1906
- var require_ruleset = /* @__PURE__ */ __commonJSMin(((exports) => {
1907
- Object.defineProperty(exports, "__esModule", { value: true });
1908
- exports.ruleSet = void 0;
1909
- var F = "required", G = "type", H = "fn", I = "argv", J = "ref";
1910
- var a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = {
1911
- [F]: false,
1912
- [G]: "string"
1913
- }, n = {
1914
- [F]: true,
1915
- default: false,
1916
- [G]: "boolean"
1917
- }, o = { [J]: "Endpoint" }, p = {
1918
- [H]: "isSet",
1919
- [I]: [{ [J]: "Region" }]
1920
- }, q = { [J]: "Region" }, r = {
1921
- [H]: "aws.partition",
1922
- [I]: [q],
1923
- assign: "PartitionResult"
1924
- }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = {
1925
- url: "https://sts.amazonaws.com",
1926
- properties: { authSchemes: [{
1927
- name: e,
1928
- signingName: f,
1929
- signingRegion: g
1930
- }] },
1931
- headers: {}
1932
- }, v = {}, w = {
1933
- conditions: [{
1934
- [H]: d,
1935
- [I]: [q, "aws-global"]
1936
- }],
1937
- [h]: u,
1938
- [G]: h
1939
- }, x = {
1940
- [H]: c,
1941
- [I]: [s, true]
1942
- }, y = {
1943
- [H]: c,
1944
- [I]: [t, true]
1945
- }, z = {
1946
- [H]: l,
1947
- [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"]
1948
- }, A = { [J]: "PartitionResult" }, B = {
1949
- [H]: c,
1950
- [I]: [true, {
1951
- [H]: l,
1952
- [I]: [A, "supportsDualStack"]
1953
- }]
1954
- }, C = [{
1955
- [H]: "isSet",
1956
- [I]: [o]
1957
- }], D = [x], E = [y];
1958
- exports.ruleSet = {
1959
- version: "1.0",
1960
- parameters: {
1961
- Region: m,
1962
- UseDualStack: n,
1963
- UseFIPS: n,
1964
- Endpoint: m,
1965
- UseGlobalEndpoint: n
1966
- },
1967
- rules: [
1968
- {
1969
- conditions: [
1970
- {
1971
- [H]: c,
1972
- [I]: [{ [J]: "UseGlobalEndpoint" }, b]
1973
- },
1974
- {
1975
- [H]: "not",
1976
- [I]: C
1977
- },
1978
- p,
1979
- r,
1980
- {
1981
- [H]: c,
1982
- [I]: [s, a]
1983
- },
1984
- {
1985
- [H]: c,
1986
- [I]: [t, a]
1987
- }
1988
- ],
1989
- rules: [
1990
- {
1991
- conditions: [{
1992
- [H]: d,
1993
- [I]: [q, "ap-northeast-1"]
1994
- }],
1995
- endpoint: u,
1996
- [G]: h
1997
- },
1998
- {
1999
- conditions: [{
2000
- [H]: d,
2001
- [I]: [q, "ap-south-1"]
2002
- }],
2003
- endpoint: u,
2004
- [G]: h
2005
- },
2006
- {
2007
- conditions: [{
2008
- [H]: d,
2009
- [I]: [q, "ap-southeast-1"]
2010
- }],
2011
- endpoint: u,
2012
- [G]: h
2013
- },
2014
- {
2015
- conditions: [{
2016
- [H]: d,
2017
- [I]: [q, "ap-southeast-2"]
2018
- }],
2019
- endpoint: u,
2020
- [G]: h
2021
- },
2022
- w,
2023
- {
2024
- conditions: [{
2025
- [H]: d,
2026
- [I]: [q, "ca-central-1"]
2027
- }],
2028
- endpoint: u,
2029
- [G]: h
2030
- },
2031
- {
2032
- conditions: [{
2033
- [H]: d,
2034
- [I]: [q, "eu-central-1"]
2035
- }],
2036
- endpoint: u,
2037
- [G]: h
2038
- },
2039
- {
2040
- conditions: [{
2041
- [H]: d,
2042
- [I]: [q, "eu-north-1"]
2043
- }],
2044
- endpoint: u,
2045
- [G]: h
2046
- },
2047
- {
2048
- conditions: [{
2049
- [H]: d,
2050
- [I]: [q, "eu-west-1"]
2051
- }],
2052
- endpoint: u,
2053
- [G]: h
2054
- },
2055
- {
2056
- conditions: [{
2057
- [H]: d,
2058
- [I]: [q, "eu-west-2"]
2059
- }],
2060
- endpoint: u,
2061
- [G]: h
2062
- },
2063
- {
2064
- conditions: [{
2065
- [H]: d,
2066
- [I]: [q, "eu-west-3"]
2067
- }],
2068
- endpoint: u,
2069
- [G]: h
2070
- },
2071
- {
2072
- conditions: [{
2073
- [H]: d,
2074
- [I]: [q, "sa-east-1"]
2075
- }],
2076
- endpoint: u,
2077
- [G]: h
2078
- },
2079
- {
2080
- conditions: [{
2081
- [H]: d,
2082
- [I]: [q, g]
2083
- }],
2084
- endpoint: u,
2085
- [G]: h
2086
- },
2087
- {
2088
- conditions: [{
2089
- [H]: d,
2090
- [I]: [q, "us-east-2"]
2091
- }],
2092
- endpoint: u,
2093
- [G]: h
2094
- },
2095
- {
2096
- conditions: [{
2097
- [H]: d,
2098
- [I]: [q, "us-west-1"]
2099
- }],
2100
- endpoint: u,
2101
- [G]: h
2102
- },
2103
- {
2104
- conditions: [{
2105
- [H]: d,
2106
- [I]: [q, "us-west-2"]
2107
- }],
2108
- endpoint: u,
2109
- [G]: h
2110
- },
2111
- {
2112
- endpoint: {
2113
- url: i,
2114
- properties: { authSchemes: [{
2115
- name: e,
2116
- signingName: f,
2117
- signingRegion: "{Region}"
2118
- }] },
2119
- headers: v
2120
- },
2121
- [G]: h
2122
- }
2123
- ],
2124
- [G]: j
2125
- },
2126
- {
2127
- conditions: C,
2128
- rules: [
2129
- {
2130
- conditions: D,
2131
- error: "Invalid Configuration: FIPS and custom endpoint are not supported",
2132
- [G]: k
2133
- },
2134
- {
2135
- conditions: E,
2136
- error: "Invalid Configuration: Dualstack and custom endpoint are not supported",
2137
- [G]: k
2138
- },
2139
- {
2140
- endpoint: {
2141
- url: o,
2142
- properties: v,
2143
- headers: v
2144
- },
2145
- [G]: h
2146
- }
2147
- ],
2148
- [G]: j
2149
- },
2150
- {
2151
- conditions: [p],
2152
- rules: [{
2153
- conditions: [r],
2154
- rules: [
2155
- {
2156
- conditions: [x, y],
2157
- rules: [{
2158
- conditions: [{
2159
- [H]: c,
2160
- [I]: [b, z]
2161
- }, B],
2162
- rules: [{
2163
- endpoint: {
2164
- url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
2165
- properties: v,
2166
- headers: v
2167
- },
2168
- [G]: h
2169
- }],
2170
- [G]: j
2171
- }, {
2172
- error: "FIPS and DualStack are enabled, but this partition does not support one or both",
2173
- [G]: k
2174
- }],
2175
- [G]: j
2176
- },
2177
- {
2178
- conditions: D,
2179
- rules: [{
2180
- conditions: [{
2181
- [H]: c,
2182
- [I]: [z, b]
2183
- }],
2184
- rules: [{
2185
- conditions: [{
2186
- [H]: d,
2187
- [I]: [{
2188
- [H]: l,
2189
- [I]: [A, "name"]
2190
- }, "aws-us-gov"]
2191
- }],
2192
- endpoint: {
2193
- url: "https://sts.{Region}.amazonaws.com",
2194
- properties: v,
2195
- headers: v
2196
- },
2197
- [G]: h
2198
- }, {
2199
- endpoint: {
2200
- url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",
2201
- properties: v,
2202
- headers: v
2203
- },
2204
- [G]: h
2205
- }],
2206
- [G]: j
2207
- }, {
2208
- error: "FIPS is enabled but this partition does not support FIPS",
2209
- [G]: k
2210
- }],
2211
- [G]: j
2212
- },
2213
- {
2214
- conditions: E,
2215
- rules: [{
2216
- conditions: [B],
2217
- rules: [{
2218
- endpoint: {
2219
- url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",
2220
- properties: v,
2221
- headers: v
2222
- },
2223
- [G]: h
2224
- }],
2225
- [G]: j
2226
- }, {
2227
- error: "DualStack is enabled but this partition does not support DualStack",
2228
- [G]: k
2229
- }],
2230
- [G]: j
2231
- },
2232
- w,
2233
- {
2234
- endpoint: {
2235
- url: i,
2236
- properties: v,
2237
- headers: v
2238
- },
2239
- [G]: h
2240
- }
2241
- ],
2242
- [G]: j
2243
- }],
2244
- [G]: j
2245
- },
2246
- {
2247
- error: "Invalid Configuration: Missing Region",
2248
- [G]: k
2249
- }
2250
- ]
2251
- };
2252
- }));
2253
- var require_endpointResolver = /* @__PURE__ */ __commonJSMin(((exports) => {
2254
- Object.defineProperty(exports, "__esModule", { value: true });
2255
- exports.defaultEndpointResolver = void 0;
2256
- var util_endpoints_1 = (init_dist_es$1(), __toCommonJS(dist_es_exports$1));
2257
- var util_endpoints_2 = (init_dist_es$2(), __toCommonJS(dist_es_exports$2));
2258
- var ruleset_1 = require_ruleset();
2259
- var cache = new util_endpoints_2.EndpointCache({
2260
- size: 50,
2261
- params: [
2262
- "Endpoint",
2263
- "Region",
2264
- "UseDualStack",
2265
- "UseFIPS",
2266
- "UseGlobalEndpoint"
2267
- ]
2268
- });
2269
- var defaultEndpointResolver = (endpointParams, context = {}) => {
2270
- return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
2271
- endpointParams,
2272
- logger: context.logger
2273
- }));
2274
- };
2275
- exports.defaultEndpointResolver = defaultEndpointResolver;
2276
- util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
2277
- }));
2278
- var require_STSServiceException = /* @__PURE__ */ __commonJSMin(((exports) => {
2279
- Object.defineProperty(exports, "__esModule", { value: true });
2280
- exports.STSServiceException = exports.__ServiceException = void 0;
2281
- var smithy_client_1 = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
2282
- Object.defineProperty(exports, "__ServiceException", {
2283
- enumerable: true,
2284
- get: function() {
2285
- return smithy_client_1.ServiceException;
2286
- }
2287
- });
2288
- exports.STSServiceException = class STSServiceException extends smithy_client_1.ServiceException {
2289
- constructor(options) {
2290
- super(options);
2291
- Object.setPrototypeOf(this, STSServiceException.prototype);
2292
- }
2293
- };
2294
- }));
2295
- var require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {
2296
- Object.defineProperty(exports, "__esModule", { value: true });
2297
- exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = void 0;
2298
- var STSServiceException_1 = require_STSServiceException();
2299
- exports.ExpiredTokenException = class ExpiredTokenException extends STSServiceException_1.STSServiceException {
2300
- name = "ExpiredTokenException";
2301
- $fault = "client";
2302
- constructor(opts) {
2303
- super({
2304
- name: "ExpiredTokenException",
2305
- $fault: "client",
2306
- ...opts
2307
- });
2308
- Object.setPrototypeOf(this, ExpiredTokenException.prototype);
2309
- }
2310
- };
2311
- exports.MalformedPolicyDocumentException = class MalformedPolicyDocumentException extends STSServiceException_1.STSServiceException {
2312
- name = "MalformedPolicyDocumentException";
2313
- $fault = "client";
2314
- constructor(opts) {
2315
- super({
2316
- name: "MalformedPolicyDocumentException",
2317
- $fault: "client",
2318
- ...opts
2319
- });
2320
- Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
2321
- }
2322
- };
2323
- exports.PackedPolicyTooLargeException = class PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException {
2324
- name = "PackedPolicyTooLargeException";
2325
- $fault = "client";
2326
- constructor(opts) {
2327
- super({
2328
- name: "PackedPolicyTooLargeException",
2329
- $fault: "client",
2330
- ...opts
2331
- });
2332
- Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
2333
- }
2334
- };
2335
- exports.RegionDisabledException = class RegionDisabledException extends STSServiceException_1.STSServiceException {
2336
- name = "RegionDisabledException";
2337
- $fault = "client";
2338
- constructor(opts) {
2339
- super({
2340
- name: "RegionDisabledException",
2341
- $fault: "client",
2342
- ...opts
2343
- });
2344
- Object.setPrototypeOf(this, RegionDisabledException.prototype);
2345
- }
2346
- };
2347
- exports.IDPRejectedClaimException = class IDPRejectedClaimException extends STSServiceException_1.STSServiceException {
2348
- name = "IDPRejectedClaimException";
2349
- $fault = "client";
2350
- constructor(opts) {
2351
- super({
2352
- name: "IDPRejectedClaimException",
2353
- $fault: "client",
2354
- ...opts
2355
- });
2356
- Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
2357
- }
2358
- };
2359
- exports.InvalidIdentityTokenException = class InvalidIdentityTokenException extends STSServiceException_1.STSServiceException {
2360
- name = "InvalidIdentityTokenException";
2361
- $fault = "client";
2362
- constructor(opts) {
2363
- super({
2364
- name: "InvalidIdentityTokenException",
2365
- $fault: "client",
2366
- ...opts
2367
- });
2368
- Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
2369
- }
2370
- };
2371
- exports.IDPCommunicationErrorException = class IDPCommunicationErrorException extends STSServiceException_1.STSServiceException {
2372
- name = "IDPCommunicationErrorException";
2373
- $fault = "client";
2374
- constructor(opts) {
2375
- super({
2376
- name: "IDPCommunicationErrorException",
2377
- $fault: "client",
2378
- ...opts
2379
- });
2380
- Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
2381
- }
2382
- };
2383
- }));
2384
- var require_schemas_0 = /* @__PURE__ */ __commonJSMin(((exports) => {
2385
- Object.defineProperty(exports, "__esModule", { value: true });
2386
- exports.AssumeRoleWithWebIdentity$ = exports.AssumeRole$ = exports.Tag$ = exports.ProvidedContext$ = exports.PolicyDescriptorType$ = exports.Credentials$ = exports.AssumeRoleWithWebIdentityResponse$ = exports.AssumeRoleWithWebIdentityRequest$ = exports.AssumeRoleResponse$ = exports.AssumeRoleRequest$ = exports.AssumedRoleUser$ = exports.errorTypeRegistries = exports.RegionDisabledException$ = exports.PackedPolicyTooLargeException$ = exports.MalformedPolicyDocumentException$ = exports.InvalidIdentityTokenException$ = exports.IDPRejectedClaimException$ = exports.IDPCommunicationErrorException$ = exports.ExpiredTokenException$ = exports.STSServiceException$ = void 0;
2387
- var _A = "Arn";
2388
- var _AKI = "AccessKeyId";
2389
- var _AR = "AssumeRole";
2390
- var _ARI = "AssumedRoleId";
2391
- var _ARR = "AssumeRoleRequest";
2392
- var _ARRs = "AssumeRoleResponse";
2393
- var _ARU = "AssumedRoleUser";
2394
- var _ARWWI = "AssumeRoleWithWebIdentity";
2395
- var _ARWWIR = "AssumeRoleWithWebIdentityRequest";
2396
- var _ARWWIRs = "AssumeRoleWithWebIdentityResponse";
2397
- var _Au = "Audience";
2398
- var _C = "Credentials";
2399
- var _CA = "ContextAssertion";
2400
- var _DS = "DurationSeconds";
2401
- var _E = "Expiration";
2402
- var _EI = "ExternalId";
2403
- var _ETE = "ExpiredTokenException";
2404
- var _IDPCEE = "IDPCommunicationErrorException";
2405
- var _IDPRCE = "IDPRejectedClaimException";
2406
- var _IITE = "InvalidIdentityTokenException";
2407
- var _K = "Key";
2408
- var _MPDE = "MalformedPolicyDocumentException";
2409
- var _P = "Policy";
2410
- var _PA = "PolicyArns";
2411
- var _PAr = "ProviderArn";
2412
- var _PC = "ProvidedContexts";
2413
- var _PCLT = "ProvidedContextsListType";
2414
- var _PCr = "ProvidedContext";
2415
- var _PDT = "PolicyDescriptorType";
2416
- var _PI = "ProviderId";
2417
- var _PPS = "PackedPolicySize";
2418
- var _PPTLE = "PackedPolicyTooLargeException";
2419
- var _Pr = "Provider";
2420
- var _RA = "RoleArn";
2421
- var _RDE = "RegionDisabledException";
2422
- var _RSN = "RoleSessionName";
2423
- var _SAK = "SecretAccessKey";
2424
- var _SFWIT = "SubjectFromWebIdentityToken";
2425
- var _SI = "SourceIdentity";
2426
- var _SN = "SerialNumber";
2427
- var _ST = "SessionToken";
2428
- var _T = "Tags";
2429
- var _TC = "TokenCode";
2430
- var _TTK = "TransitiveTagKeys";
2431
- var _Ta = "Tag";
2432
- var _V = "Value";
2433
- var _WIT = "WebIdentityToken";
2434
- var _a = "arn";
2435
- var _aKST = "accessKeySecretType";
2436
- var _aQE = "awsQueryError";
2437
- var _c = "client";
2438
- var _cTT = "clientTokenType";
2439
- var _e = "error";
2440
- var _hE = "httpError";
2441
- var _m = "message";
2442
- var _pDLT = "policyDescriptorListType";
2443
- var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
2444
- var _tLT = "tagListType";
2445
- var n0 = "com.amazonaws.sts";
2446
- var schema_1 = require_schema();
2447
- var errors_1 = require_errors();
2448
- var STSServiceException_1 = require_STSServiceException();
2449
- var _s_registry = schema_1.TypeRegistry.for(_s);
2450
- exports.STSServiceException$ = [
2451
- -3,
2452
- _s,
2453
- "STSServiceException",
2454
- 0,
2455
- [],
2456
- []
2457
- ];
2458
- _s_registry.registerError(exports.STSServiceException$, STSServiceException_1.STSServiceException);
2459
- var n0_registry = schema_1.TypeRegistry.for(n0);
2460
- exports.ExpiredTokenException$ = [
2461
- -3,
2462
- n0,
2463
- _ETE,
2464
- {
2465
- [_aQE]: [`ExpiredTokenException`, 400],
2466
- [_e]: _c,
2467
- [_hE]: 400
2468
- },
2469
- [_m],
2470
- [0]
2471
- ];
2472
- n0_registry.registerError(exports.ExpiredTokenException$, errors_1.ExpiredTokenException);
2473
- exports.IDPCommunicationErrorException$ = [
2474
- -3,
2475
- n0,
2476
- _IDPCEE,
2477
- {
2478
- [_aQE]: [`IDPCommunicationError`, 400],
2479
- [_e]: _c,
2480
- [_hE]: 400
2481
- },
2482
- [_m],
2483
- [0]
2484
- ];
2485
- n0_registry.registerError(exports.IDPCommunicationErrorException$, errors_1.IDPCommunicationErrorException);
2486
- exports.IDPRejectedClaimException$ = [
2487
- -3,
2488
- n0,
2489
- _IDPRCE,
2490
- {
2491
- [_aQE]: [`IDPRejectedClaim`, 403],
2492
- [_e]: _c,
2493
- [_hE]: 403
2494
- },
2495
- [_m],
2496
- [0]
2497
- ];
2498
- n0_registry.registerError(exports.IDPRejectedClaimException$, errors_1.IDPRejectedClaimException);
2499
- exports.InvalidIdentityTokenException$ = [
2500
- -3,
2501
- n0,
2502
- _IITE,
2503
- {
2504
- [_aQE]: [`InvalidIdentityToken`, 400],
2505
- [_e]: _c,
2506
- [_hE]: 400
2507
- },
2508
- [_m],
2509
- [0]
2510
- ];
2511
- n0_registry.registerError(exports.InvalidIdentityTokenException$, errors_1.InvalidIdentityTokenException);
2512
- exports.MalformedPolicyDocumentException$ = [
2513
- -3,
2514
- n0,
2515
- _MPDE,
2516
- {
2517
- [_aQE]: [`MalformedPolicyDocument`, 400],
2518
- [_e]: _c,
2519
- [_hE]: 400
2520
- },
2521
- [_m],
2522
- [0]
2523
- ];
2524
- n0_registry.registerError(exports.MalformedPolicyDocumentException$, errors_1.MalformedPolicyDocumentException);
2525
- exports.PackedPolicyTooLargeException$ = [
2526
- -3,
2527
- n0,
2528
- _PPTLE,
2529
- {
2530
- [_aQE]: [`PackedPolicyTooLarge`, 400],
2531
- [_e]: _c,
2532
- [_hE]: 400
2533
- },
2534
- [_m],
2535
- [0]
2536
- ];
2537
- n0_registry.registerError(exports.PackedPolicyTooLargeException$, errors_1.PackedPolicyTooLargeException);
2538
- exports.RegionDisabledException$ = [
2539
- -3,
2540
- n0,
2541
- _RDE,
2542
- {
2543
- [_aQE]: [`RegionDisabledException`, 403],
2544
- [_e]: _c,
2545
- [_hE]: 403
2546
- },
2547
- [_m],
2548
- [0]
2549
- ];
2550
- n0_registry.registerError(exports.RegionDisabledException$, errors_1.RegionDisabledException);
2551
- exports.errorTypeRegistries = [_s_registry, n0_registry];
2552
- var accessKeySecretType = [
2553
- 0,
2554
- n0,
2555
- _aKST,
2556
- 8,
2557
- 0
2558
- ];
2559
- var clientTokenType = [
2560
- 0,
2561
- n0,
2562
- _cTT,
2563
- 8,
2564
- 0
2565
- ];
2566
- exports.AssumedRoleUser$ = [
2567
- 3,
2568
- n0,
2569
- _ARU,
2570
- 0,
2571
- [_ARI, _A],
2572
- [0, 0],
2573
- 2
2574
- ];
2575
- exports.AssumeRoleRequest$ = [
2576
- 3,
2577
- n0,
2578
- _ARR,
2579
- 0,
2580
- [
2581
- _RA,
2582
- _RSN,
2583
- _PA,
2584
- _P,
2585
- _DS,
2586
- _T,
2587
- _TTK,
2588
- _EI,
2589
- _SN,
2590
- _TC,
2591
- _SI,
2592
- _PC
2593
- ],
2594
- [
2595
- 0,
2596
- 0,
2597
- () => policyDescriptorListType,
2598
- 0,
2599
- 1,
2600
- () => tagListType,
2601
- 64,
2602
- 0,
2603
- 0,
2604
- 0,
2605
- 0,
2606
- () => ProvidedContextsListType
2607
- ],
2608
- 2
2609
- ];
2610
- exports.AssumeRoleResponse$ = [
2611
- 3,
2612
- n0,
2613
- _ARRs,
2614
- 0,
2615
- [
2616
- _C,
2617
- _ARU,
2618
- _PPS,
2619
- _SI
2620
- ],
2621
- [
2622
- [() => exports.Credentials$, 0],
2623
- () => exports.AssumedRoleUser$,
2624
- 1,
2625
- 0
2626
- ]
2627
- ];
2628
- exports.AssumeRoleWithWebIdentityRequest$ = [
2629
- 3,
2630
- n0,
2631
- _ARWWIR,
2632
- 0,
2633
- [
2634
- _RA,
2635
- _RSN,
2636
- _WIT,
2637
- _PI,
2638
- _PA,
2639
- _P,
2640
- _DS
2641
- ],
2642
- [
2643
- 0,
2644
- 0,
2645
- [() => clientTokenType, 0],
2646
- 0,
2647
- () => policyDescriptorListType,
2648
- 0,
2649
- 1
2650
- ],
2651
- 3
2652
- ];
2653
- exports.AssumeRoleWithWebIdentityResponse$ = [
2654
- 3,
2655
- n0,
2656
- _ARWWIRs,
2657
- 0,
2658
- [
2659
- _C,
2660
- _SFWIT,
2661
- _ARU,
2662
- _PPS,
2663
- _Pr,
2664
- _Au,
2665
- _SI
2666
- ],
2667
- [
2668
- [() => exports.Credentials$, 0],
2669
- 0,
2670
- () => exports.AssumedRoleUser$,
2671
- 1,
2672
- 0,
2673
- 0,
2674
- 0
2675
- ]
2676
- ];
2677
- exports.Credentials$ = [
2678
- 3,
2679
- n0,
2680
- _C,
2681
- 0,
2682
- [
2683
- _AKI,
2684
- _SAK,
2685
- _ST,
2686
- _E
2687
- ],
2688
- [
2689
- 0,
2690
- [() => accessKeySecretType, 0],
2691
- 0,
2692
- 4
2693
- ],
2694
- 4
2695
- ];
2696
- exports.PolicyDescriptorType$ = [
2697
- 3,
2698
- n0,
2699
- _PDT,
2700
- 0,
2701
- [_a],
2702
- [0]
2703
- ];
2704
- exports.ProvidedContext$ = [
2705
- 3,
2706
- n0,
2707
- _PCr,
2708
- 0,
2709
- [_PAr, _CA],
2710
- [0, 0]
2711
- ];
2712
- exports.Tag$ = [
2713
- 3,
2714
- n0,
2715
- _Ta,
2716
- 0,
2717
- [_K, _V],
2718
- [0, 0],
2719
- 2
2720
- ];
2721
- var policyDescriptorListType = [
2722
- 1,
2723
- n0,
2724
- _pDLT,
2725
- 0,
2726
- () => exports.PolicyDescriptorType$
2727
- ];
2728
- var ProvidedContextsListType = [
2729
- 1,
2730
- n0,
2731
- _PCLT,
2732
- 0,
2733
- () => exports.ProvidedContext$
2734
- ];
2735
- var tagListType = [
2736
- 1,
2737
- n0,
2738
- _tLT,
2739
- 0,
2740
- () => exports.Tag$
2741
- ];
2742
- exports.AssumeRole$ = [
2743
- 9,
2744
- n0,
2745
- _AR,
2746
- 0,
2747
- () => exports.AssumeRoleRequest$,
2748
- () => exports.AssumeRoleResponse$
2749
- ];
2750
- exports.AssumeRoleWithWebIdentity$ = [
2751
- 9,
2752
- n0,
2753
- _ARWWI,
2754
- 0,
2755
- () => exports.AssumeRoleWithWebIdentityRequest$,
2756
- () => exports.AssumeRoleWithWebIdentityResponse$
2757
- ];
2758
- }));
2759
- var require_runtimeConfig_shared = /* @__PURE__ */ __commonJSMin(((exports) => {
2760
- Object.defineProperty(exports, "__esModule", { value: true });
2761
- exports.getRuntimeConfig = void 0;
2762
- var core_1 = require_dist_cjs();
2763
- var protocols_1 = require_protocols();
2764
- var core_2 = require_dist_cjs$1();
2765
- var smithy_client_1 = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
2766
- var url_parser_1 = (init_dist_es$4(), __toCommonJS(dist_es_exports$4));
2767
- var util_base64_1 = (init_dist_es$5(), __toCommonJS(dist_es_exports$5));
2768
- var util_utf8_1 = (init_dist_es$6(), __toCommonJS(dist_es_exports$6));
2769
- var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
2770
- var endpointResolver_1 = require_endpointResolver();
2771
- var schemas_0_1 = require_schemas_0();
2772
- var getRuntimeConfig = (config) => {
2773
- return {
2774
- apiVersion: "2011-06-15",
2775
- base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
2776
- base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
2777
- disableHostPrefix: config?.disableHostPrefix ?? false,
2778
- endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
2779
- extensions: config?.extensions ?? [],
2780
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
2781
- httpAuthSchemes: config?.httpAuthSchemes ?? [{
2782
- schemeId: "aws.auth#sigv4",
2783
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
2784
- signer: new core_1.AwsSdkSigV4Signer()
2785
- }, {
2786
- schemeId: "smithy.api#noAuth",
2787
- identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
2788
- signer: new core_2.NoAuthSigner()
2789
- }],
2790
- logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
2791
- protocol: config?.protocol ?? protocols_1.AwsQueryProtocol,
2792
- protocolSettings: config?.protocolSettings ?? {
2793
- defaultNamespace: "com.amazonaws.sts",
2794
- errorTypeRegistries: schemas_0_1.errorTypeRegistries,
2795
- xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
2796
- version: "2011-06-15",
2797
- serviceTarget: "AWSSecurityTokenServiceV20110615"
2798
- },
2799
- serviceId: config?.serviceId ?? "STS",
2800
- urlParser: config?.urlParser ?? url_parser_1.parseUrl,
2801
- utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
2802
- utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
2803
- };
2804
- };
2805
- exports.getRuntimeConfig = getRuntimeConfig;
2806
- }));
2807
- var require_runtimeConfig = /* @__PURE__ */ __commonJSMin(((exports) => {
2808
- Object.defineProperty(exports, "__esModule", { value: true });
2809
- exports.getRuntimeConfig = void 0;
2810
- var package_json_1 = __require("tslib").__importDefault((init_package(), __toCommonJS(package_exports).default));
2811
- var core_1 = require_dist_cjs();
2812
- var util_user_agent_node_1 = (init_dist_es$7(), __toCommonJS(dist_es_exports$7));
2813
- var config_resolver_1 = (init_dist_es$8(), __toCommonJS(dist_es_exports$8));
2814
- var core_2 = require_dist_cjs$1();
2815
- var hash_node_1 = (init_dist_es$9(), __toCommonJS(dist_es_exports$9));
2816
- var middleware_retry_1 = (init_dist_es$10(), __toCommonJS(dist_es_exports$10));
2817
- var node_config_provider_1 = (init_dist_es$11(), __toCommonJS(dist_es_exports$11));
2818
- var node_http_handler_1 = (init_dist_es$12(), __toCommonJS(dist_es_exports$12));
2819
- var smithy_client_1 = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
2820
- var util_body_length_node_1 = (init_dist_es$13(), __toCommonJS(dist_es_exports$13));
2821
- var util_defaults_mode_node_1 = (init_dist_es$14(), __toCommonJS(dist_es_exports$14));
2822
- var util_retry_1 = (init_dist_es$15(), __toCommonJS(dist_es_exports$15));
2823
- var runtimeConfig_shared_1 = require_runtimeConfig_shared();
2824
- var getRuntimeConfig = (config) => {
2825
- (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
2826
- const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
2827
- const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
2828
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
2829
- (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
2830
- const loaderConfig = {
2831
- profile: config?.profile,
2832
- logger: clientSharedValues.logger
2833
- };
2834
- return {
2835
- ...clientSharedValues,
2836
- ...config,
2837
- runtime: "node",
2838
- defaultsMode,
2839
- authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
2840
- bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
2841
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({
2842
- serviceId: clientSharedValues.serviceId,
2843
- clientVersion: package_json_1.default.version
2844
- }),
2845
- httpAuthSchemes: config?.httpAuthSchemes ?? [{
2846
- schemeId: "aws.auth#sigv4",
2847
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
2848
- signer: new core_1.AwsSdkSigV4Signer()
2849
- }, {
2850
- schemeId: "smithy.api#noAuth",
2851
- identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
2852
- signer: new core_2.NoAuthSigner()
2853
- }],
2854
- maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
2855
- region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, {
2856
- ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS,
2857
- ...loaderConfig
2858
- }),
2859
- requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
2860
- retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
2861
- ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
2862
- default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
2863
- }, config),
2864
- sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
2865
- streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
2866
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
2867
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
2868
- userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
2869
- };
2870
- };
2871
- exports.getRuntimeConfig = getRuntimeConfig;
2872
- }));
2873
- var require_httpAuthExtensionConfiguration = /* @__PURE__ */ __commonJSMin(((exports) => {
2874
- Object.defineProperty(exports, "__esModule", { value: true });
2875
- exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;
2876
- var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
2877
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
2878
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
2879
- let _credentials = runtimeConfig.credentials;
2880
- return {
2881
- setHttpAuthScheme(httpAuthScheme) {
2882
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
2883
- if (index === -1) _httpAuthSchemes.push(httpAuthScheme);
2884
- else _httpAuthSchemes.splice(index, 1, httpAuthScheme);
2885
- },
2886
- httpAuthSchemes() {
2887
- return _httpAuthSchemes;
2888
- },
2889
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
2890
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
2891
- },
2892
- httpAuthSchemeProvider() {
2893
- return _httpAuthSchemeProvider;
2894
- },
2895
- setCredentials(credentials) {
2896
- _credentials = credentials;
2897
- },
2898
- credentials() {
2899
- return _credentials;
2900
- }
2901
- };
2902
- };
2903
- exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
2904
- var resolveHttpAuthRuntimeConfig = (config) => {
2905
- return {
2906
- httpAuthSchemes: config.httpAuthSchemes(),
2907
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
2908
- credentials: config.credentials()
2909
- };
2910
- };
2911
- exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
2912
- }));
2913
- var require_runtimeExtensions = /* @__PURE__ */ __commonJSMin(((exports) => {
2914
- Object.defineProperty(exports, "__esModule", { value: true });
2915
- exports.resolveRuntimeExtensions = void 0;
2916
- var region_config_resolver_1 = (init_dist_es$22(), __toCommonJS(dist_es_exports$22));
2917
- var protocol_http_1 = (init_dist_es$23(), __toCommonJS(dist_es_exports$23));
2918
- var smithy_client_1 = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
2919
- var httpAuthExtensionConfiguration_1 = require_httpAuthExtensionConfiguration();
2920
- var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
2921
- const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));
2922
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
2923
- return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));
2924
- };
2925
- exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
2926
- }));
2927
- var require_STSClient = /* @__PURE__ */ __commonJSMin(((exports) => {
2928
- Object.defineProperty(exports, "__esModule", { value: true });
2929
- exports.STSClient = exports.__Client = void 0;
2930
- var middleware_host_header_1 = (init_dist_es$16(), __toCommonJS(dist_es_exports$16));
2931
- var middleware_logger_1 = (init_dist_es$17(), __toCommonJS(dist_es_exports$17));
2932
- var middleware_recursion_detection_1 = (init_dist_es$18(), __toCommonJS(dist_es_exports$18));
2933
- var middleware_user_agent_1 = (init_dist_es$19(), __toCommonJS(dist_es_exports$19));
2934
- var config_resolver_1 = (init_dist_es$8(), __toCommonJS(dist_es_exports$8));
2935
- var core_1 = require_dist_cjs$1();
2936
- var schema_1 = require_schema();
2937
- var middleware_content_length_1 = (init_dist_es$20(), __toCommonJS(dist_es_exports$20));
2938
- var middleware_endpoint_1 = (init_dist_es$21(), __toCommonJS(dist_es_exports$21));
2939
- var middleware_retry_1 = (init_dist_es$10(), __toCommonJS(dist_es_exports$10));
2940
- var smithy_client_1 = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
2941
- Object.defineProperty(exports, "__Client", {
2942
- enumerable: true,
2943
- get: function() {
2944
- return smithy_client_1.Client;
2945
- }
2946
- });
2947
- var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
2948
- var EndpointParameters_1 = require_EndpointParameters();
2949
- var runtimeConfig_1 = require_runtimeConfig();
2950
- var runtimeExtensions_1 = require_runtimeExtensions();
2951
- var STSClient = class extends smithy_client_1.Client {
2952
- config;
2953
- constructor(...[configuration]) {
2954
- const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
2955
- super(_config_0);
2956
- this.initConfig = _config_0;
2957
- const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
2958
- const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);
2959
- const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);
2960
- const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);
2961
- const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
2962
- const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);
2963
- const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
2964
- this.config = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
2965
- this.middlewareStack.use((0, schema_1.getSchemaSerdePlugin)(this.config));
2966
- this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
2967
- this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
2968
- this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
2969
- this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
2970
- this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
2971
- this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
2972
- this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
2973
- httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider,
2974
- identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({ "aws.auth#sigv4": config.credentials })
2975
- }));
2976
- this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
2977
- }
2978
- destroy() {
2979
- super.destroy();
2980
- }
2981
- };
2982
- exports.STSClient = STSClient;
2983
- }));
2984
- var require_sts = /* @__PURE__ */ __commonJSMin(((exports) => {
2985
- var STSClient = require_STSClient();
2986
- var smithyClient = (init_dist_es$3(), __toCommonJS(dist_es_exports$3));
2987
- var middlewareEndpoint = (init_dist_es$21(), __toCommonJS(dist_es_exports$21));
2988
- var EndpointParameters = require_EndpointParameters();
2989
- var schemas_0 = require_schemas_0();
2990
- var errors = require_errors();
2991
- var client = require_client();
2992
- var regionConfigResolver = (init_dist_es$22(), __toCommonJS(dist_es_exports$22));
2993
- var STSServiceException = require_STSServiceException();
2994
- var AssumeRoleCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o) {
2995
- return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
2996
- }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(schemas_0.AssumeRole$).build() {};
2997
- var AssumeRoleWithWebIdentityCommand = class extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o) {
2998
- return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
2999
- }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(schemas_0.AssumeRoleWithWebIdentity$).build() {};
3000
- var commands = {
3001
- AssumeRoleCommand,
3002
- AssumeRoleWithWebIdentityCommand
3003
- };
3004
- var STS = class extends STSClient.STSClient {};
3005
- smithyClient.createAggregatedClient(commands, STS);
3006
- var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
3007
- if (typeof assumedRoleUser?.Arn === "string") {
3008
- const arnComponents = assumedRoleUser.Arn.split(":");
3009
- if (arnComponents.length > 4 && arnComponents[4] !== "") return arnComponents[4];
3010
- }
3011
- };
3012
- var resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
3013
- const region = typeof _region === "function" ? await _region() : _region;
3014
- const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
3015
- let stsDefaultRegion = "";
3016
- const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());
3017
- credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
3018
- return resolvedRegion;
3019
- };
3020
- var getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
3021
- let stsClient;
3022
- let closureSourceCreds;
3023
- return async (sourceCreds, params) => {
3024
- closureSourceCreds = sourceCreds;
3025
- if (!stsClient) {
3026
- const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
3027
- const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
3028
- logger,
3029
- profile
3030
- });
3031
- const isCompatibleRequestHandler = !isH2(requestHandler);
3032
- stsClient = new STSClient({
3033
- ...stsOptions,
3034
- userAgentAppId,
3035
- profile,
3036
- credentialDefaultProvider: () => async () => closureSourceCreds,
3037
- region: resolvedRegion,
3038
- requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
3039
- logger
3040
- });
3041
- }
3042
- const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
3043
- if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
3044
- const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
3045
- const credentials = {
3046
- accessKeyId: Credentials.AccessKeyId,
3047
- secretAccessKey: Credentials.SecretAccessKey,
3048
- sessionToken: Credentials.SessionToken,
3049
- expiration: Credentials.Expiration,
3050
- ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
3051
- ...accountId && { accountId }
3052
- };
3053
- client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
3054
- return credentials;
3055
- };
3056
- };
3057
- var getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => {
3058
- let stsClient;
3059
- return async (params) => {
3060
- if (!stsClient) {
3061
- const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
3062
- const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
3063
- logger,
3064
- profile
3065
- });
3066
- const isCompatibleRequestHandler = !isH2(requestHandler);
3067
- stsClient = new STSClient({
3068
- ...stsOptions,
3069
- userAgentAppId,
3070
- profile,
3071
- region: resolvedRegion,
3072
- requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
3073
- logger
3074
- });
3075
- }
3076
- const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
3077
- if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
3078
- const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
3079
- const credentials = {
3080
- accessKeyId: Credentials.AccessKeyId,
3081
- secretAccessKey: Credentials.SecretAccessKey,
3082
- sessionToken: Credentials.SessionToken,
3083
- expiration: Credentials.Expiration,
3084
- ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
3085
- ...accountId && { accountId }
3086
- };
3087
- if (accountId) client.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
3088
- client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
3089
- return credentials;
3090
- };
3091
- };
3092
- var isH2 = (requestHandler) => {
3093
- return requestHandler?.metadata?.handlerProtocol === "h2";
3094
- };
3095
- var getCustomizableStsClientCtor = (baseCtor, customizations) => {
3096
- if (!customizations) return baseCtor;
3097
- else return class CustomizableSTSClient extends baseCtor {
3098
- constructor(config) {
3099
- super(config);
3100
- for (const customization of customizations) this.middlewareStack.use(customization);
3101
- }
3102
- };
3103
- };
3104
- var getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));
3105
- var getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));
3106
- var decorateDefaultCredentialProvider = (provider) => (input) => provider({
3107
- roleAssumer: getDefaultRoleAssumer(input),
3108
- roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),
3109
- ...input
3110
- });
3111
- exports.$Command = smithyClient.Command;
3112
- exports.STSServiceException = STSServiceException.STSServiceException;
3113
- exports.AssumeRoleCommand = AssumeRoleCommand;
3114
- exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
3115
- exports.STS = STS;
3116
- exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
3117
- exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
3118
- exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
3119
- Object.prototype.hasOwnProperty.call(STSClient, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
3120
- enumerable: true,
3121
- value: STSClient["__proto__"]
3122
- });
3123
- Object.keys(STSClient).forEach(function(k) {
3124
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = STSClient[k];
3125
- });
3126
- Object.prototype.hasOwnProperty.call(schemas_0, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
3127
- enumerable: true,
3128
- value: schemas_0["__proto__"]
3129
- });
3130
- Object.keys(schemas_0).forEach(function(k) {
3131
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
3132
- });
3133
- Object.prototype.hasOwnProperty.call(errors, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
3134
- enumerable: true,
3135
- value: errors["__proto__"]
3136
- });
3137
- Object.keys(errors).forEach(function(k) {
3138
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
3139
- });
3140
- }));
3141
- export { require_sso_oidc as n, require_signin as r, require_sts as t };