levelfour 1.5.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (553) hide show
  1. package/dist/Client.d.mts +3 -0
  2. package/dist/Client.d.ts +3 -0
  3. package/dist/Client.js +25 -20
  4. package/dist/Client.mjs +5 -0
  5. package/dist/api/resources/anthropic/client/Client.d.mts +113 -0
  6. package/dist/api/resources/anthropic/client/Client.d.ts +113 -0
  7. package/dist/api/resources/anthropic/client/Client.js +554 -1
  8. package/dist/api/resources/anthropic/client/Client.mjs +555 -2
  9. package/dist/api/resources/anthropic/client/requests/BodyPreviewTeamAreasApiV1ProvidersAnthropicTeamAreasPreviewPost.d.mts +11 -0
  10. package/dist/api/resources/anthropic/client/requests/BodyPreviewTeamAreasApiV1ProvidersAnthropicTeamAreasPreviewPost.d.ts +11 -0
  11. package/dist/api/resources/anthropic/client/requests/BodyPreviewTeamAreasApiV1ProvidersAnthropicTeamAreasPreviewPost.js +17 -0
  12. package/dist/api/resources/anthropic/client/requests/BodyPreviewTeamAreasApiV1ProvidersAnthropicTeamAreasPreviewPost.mjs +1 -0
  13. package/dist/api/resources/anthropic/client/requests/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequest.d.mts +2 -0
  14. package/dist/api/resources/anthropic/client/requests/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequest.d.ts +2 -0
  15. package/dist/api/resources/anthropic/client/requests/GetUsagePeopleApiV1ProvidersAnthropicUsagePeopleGetRequest.d.mts +16 -0
  16. package/dist/api/resources/anthropic/client/requests/GetUsagePeopleApiV1ProvidersAnthropicUsagePeopleGetRequest.d.ts +16 -0
  17. package/dist/api/resources/anthropic/client/requests/GetUsagePeopleApiV1ProvidersAnthropicUsagePeopleGetRequest.js +17 -0
  18. package/dist/api/resources/anthropic/client/requests/GetUsagePeopleApiV1ProvidersAnthropicUsagePeopleGetRequest.mjs +1 -0
  19. package/dist/api/resources/anthropic/client/requests/GetUsagePersonApiV1ProvidersAnthropicUsagePeoplePersonGetRequest.d.mts +9 -0
  20. package/dist/api/resources/anthropic/client/requests/GetUsagePersonApiV1ProvidersAnthropicUsagePeoplePersonGetRequest.d.ts +9 -0
  21. package/dist/api/resources/anthropic/client/requests/GetUsagePersonApiV1ProvidersAnthropicUsagePeoplePersonGetRequest.js +17 -0
  22. package/dist/api/resources/anthropic/client/requests/GetUsagePersonApiV1ProvidersAnthropicUsagePeoplePersonGetRequest.mjs +1 -0
  23. package/dist/api/resources/anthropic/client/requests/GetUsagePersonSessionsApiV1ProvidersAnthropicUsagePeoplePersonSessionsGetRequest.d.mts +18 -0
  24. package/dist/api/resources/anthropic/client/requests/GetUsagePersonSessionsApiV1ProvidersAnthropicUsagePeoplePersonSessionsGetRequest.d.ts +18 -0
  25. package/dist/api/resources/anthropic/client/requests/GetUsagePersonSessionsApiV1ProvidersAnthropicUsagePeoplePersonSessionsGetRequest.js +17 -0
  26. package/dist/api/resources/anthropic/client/requests/GetUsagePersonSessionsApiV1ProvidersAnthropicUsagePeoplePersonSessionsGetRequest.mjs +1 -0
  27. package/dist/api/resources/anthropic/client/requests/index.d.mts +4 -0
  28. package/dist/api/resources/anthropic/client/requests/index.d.ts +4 -0
  29. package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestSort.d.mts +1 -0
  30. package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestSort.d.ts +1 -0
  31. package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestSort.js +1 -0
  32. package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestSort.mjs +1 -0
  33. package/dist/api/resources/boards/client/Client.d.mts +3 -2
  34. package/dist/api/resources/boards/client/Client.d.ts +3 -2
  35. package/dist/api/resources/boards/client/Client.js +10 -5
  36. package/dist/api/resources/boards/client/Client.mjs +10 -5
  37. package/dist/api/resources/boards/client/requests/ListBoardsRequest.d.mts +8 -0
  38. package/dist/api/resources/boards/client/requests/ListBoardsRequest.d.ts +8 -0
  39. package/dist/api/resources/boards/client/requests/ListBoardsRequest.js +17 -0
  40. package/dist/api/resources/boards/client/requests/ListBoardsRequest.mjs +1 -0
  41. package/dist/api/resources/boards/client/requests/index.d.mts +1 -0
  42. package/dist/api/resources/boards/client/requests/index.d.ts +1 -0
  43. package/dist/api/resources/index.d.mts +3 -0
  44. package/dist/api/resources/index.d.ts +3 -0
  45. package/dist/api/resources/index.js +8 -1
  46. package/dist/api/resources/index.mjs +4 -0
  47. package/dist/api/resources/kubernetes/client/Client.d.mts +54 -0
  48. package/dist/api/resources/kubernetes/client/Client.d.ts +54 -0
  49. package/dist/api/resources/kubernetes/client/Client.js +251 -0
  50. package/dist/api/resources/kubernetes/client/Client.mjs +217 -0
  51. package/dist/api/resources/kubernetes/client/index.d.mts +1 -0
  52. package/dist/api/resources/kubernetes/client/index.d.ts +1 -0
  53. package/dist/api/resources/kubernetes/client/index.js +23 -0
  54. package/dist/api/resources/kubernetes/client/index.mjs +2 -0
  55. package/dist/api/resources/kubernetes/client/requests/GetClusterEksApiV1K8SClustersClusterIdEksGetRequest.d.mts +9 -0
  56. package/dist/api/resources/kubernetes/client/requests/GetClusterEksApiV1K8SClustersClusterIdEksGetRequest.d.ts +9 -0
  57. package/dist/api/resources/kubernetes/client/requests/GetClusterEksApiV1K8SClustersClusterIdEksGetRequest.js +17 -0
  58. package/dist/api/resources/kubernetes/client/requests/GetClusterEksApiV1K8SClustersClusterIdEksGetRequest.mjs +1 -0
  59. package/dist/api/resources/kubernetes/client/requests/index.d.mts +1 -0
  60. package/dist/api/resources/kubernetes/client/requests/index.d.ts +1 -0
  61. package/dist/api/resources/kubernetes/client/requests/index.js +17 -0
  62. package/dist/api/resources/kubernetes/client/requests/index.mjs +1 -0
  63. package/dist/api/resources/kubernetes/exports.d.mts +2 -0
  64. package/dist/api/resources/kubernetes/exports.d.ts +2 -0
  65. package/dist/api/resources/kubernetes/exports.js +32 -0
  66. package/dist/api/resources/kubernetes/exports.mjs +6 -0
  67. package/dist/api/resources/kubernetes/index.d.mts +1 -0
  68. package/dist/api/resources/kubernetes/index.d.ts +1 -0
  69. package/dist/api/resources/kubernetes/index.js +23 -0
  70. package/dist/api/resources/kubernetes/index.mjs +2 -0
  71. package/dist/api/resources/workspace/client/Client.d.mts +2 -1
  72. package/dist/api/resources/workspace/client/Client.d.ts +2 -1
  73. package/dist/api/resources/workspace/client/Client.js +7 -3
  74. package/dist/api/resources/workspace/client/Client.mjs +7 -3
  75. package/dist/api/resources/workspace/client/index.d.mts +1 -1
  76. package/dist/api/resources/workspace/client/index.d.ts +1 -1
  77. package/dist/api/resources/workspace/client/index.js +6 -0
  78. package/dist/api/resources/workspace/client/index.mjs +1 -0
  79. package/dist/api/resources/workspace/client/requests/CreateWorkspaceRequest.d.mts +23 -0
  80. package/dist/api/resources/workspace/client/requests/CreateWorkspaceRequest.d.ts +23 -0
  81. package/dist/api/resources/workspace/client/requests/CreateWorkspaceRequest.js +39 -0
  82. package/dist/api/resources/workspace/client/requests/CreateWorkspaceRequest.mjs +15 -0
  83. package/dist/api/resources/workspace/client/requests/index.d.mts +1 -0
  84. package/dist/api/resources/workspace/client/requests/index.d.ts +1 -0
  85. package/dist/api/resources/workspace/client/requests/index.js +29 -0
  86. package/dist/api/resources/workspace/client/requests/index.mjs +5 -0
  87. package/dist/api/types/AccountItem.d.mts +4 -0
  88. package/dist/api/types/AccountItem.d.ts +4 -0
  89. package/dist/api/types/AiPersonData.d.mts +29 -0
  90. package/dist/api/types/AiPersonData.d.ts +29 -0
  91. package/dist/api/types/AiPersonData.js +35 -0
  92. package/dist/api/types/AiPersonData.mjs +11 -0
  93. package/dist/api/types/AiPersonRecommendation.d.mts +19 -0
  94. package/dist/api/types/AiPersonRecommendation.d.ts +19 -0
  95. package/dist/api/types/AiPersonRecommendation.js +36 -0
  96. package/dist/api/types/AiPersonRecommendation.mjs +12 -0
  97. package/dist/api/types/AiPersonResponse.d.mts +6 -0
  98. package/dist/api/types/AiPersonResponse.d.ts +6 -0
  99. package/dist/api/types/AiPersonResponse.js +17 -0
  100. package/dist/api/types/AiPersonResponse.mjs +1 -0
  101. package/dist/api/types/AiPersonWeek.d.mts +6 -0
  102. package/dist/api/types/AiPersonWeek.d.ts +6 -0
  103. package/dist/api/types/AiPersonWeek.js +17 -0
  104. package/dist/api/types/AiPersonWeek.mjs +1 -0
  105. package/dist/api/types/AiSession.d.mts +15 -0
  106. package/dist/api/types/AiSession.d.ts +15 -0
  107. package/dist/api/types/AiSession.js +17 -0
  108. package/dist/api/types/AiSession.mjs +1 -0
  109. package/dist/api/types/AiSessionsData.d.mts +5 -0
  110. package/dist/api/types/AiSessionsData.d.ts +5 -0
  111. package/dist/api/types/AiSessionsData.js +17 -0
  112. package/dist/api/types/AiSessionsData.mjs +1 -0
  113. package/dist/api/types/AiSessionsResponse.d.mts +6 -0
  114. package/dist/api/types/AiSessionsResponse.d.ts +6 -0
  115. package/dist/api/types/AiSessionsResponse.js +17 -0
  116. package/dist/api/types/AiSessionsResponse.mjs +1 -0
  117. package/dist/api/types/AnthropicDeveloper.d.mts +28 -0
  118. package/dist/api/types/AnthropicDeveloper.d.ts +28 -0
  119. package/dist/api/types/AnthropicDeveloper.js +17 -0
  120. package/dist/api/types/AnthropicDeveloper.mjs +1 -0
  121. package/dist/api/types/AnthropicDeveloperGroup.d.mts +6 -0
  122. package/dist/api/types/AnthropicDeveloperGroup.d.ts +6 -0
  123. package/dist/api/types/AnthropicDeveloperGroup.js +17 -0
  124. package/dist/api/types/AnthropicDeveloperGroup.mjs +1 -0
  125. package/dist/api/types/AnthropicDeveloperSummary.d.mts +9 -0
  126. package/dist/api/types/AnthropicDeveloperSummary.d.ts +9 -0
  127. package/dist/api/types/AnthropicDeveloperSummary.js +17 -0
  128. package/dist/api/types/AnthropicDeveloperSummary.mjs +1 -0
  129. package/dist/api/types/AnthropicDevelopersData.d.mts +8 -0
  130. package/dist/api/types/AnthropicDevelopersData.d.ts +8 -0
  131. package/dist/api/types/AnthropicDevelopersData.js +17 -0
  132. package/dist/api/types/AnthropicDevelopersData.mjs +1 -0
  133. package/dist/api/types/AnthropicDevelopersResponse.d.mts +6 -0
  134. package/dist/api/types/AnthropicDevelopersResponse.d.ts +6 -0
  135. package/dist/api/types/AnthropicDevelopersResponse.js +17 -0
  136. package/dist/api/types/AnthropicDevelopersResponse.mjs +1 -0
  137. package/dist/api/types/AutomationAction.d.mts +33 -1
  138. package/dist/api/types/AutomationAction.d.ts +33 -1
  139. package/dist/api/types/AutomationAction.js +31 -3
  140. package/dist/api/types/AutomationAction.mjs +31 -3
  141. package/dist/api/types/AutomationComponent.d.mts +6 -0
  142. package/dist/api/types/AutomationComponent.d.ts +6 -0
  143. package/dist/api/types/AutomationEvent.d.mts +13 -0
  144. package/dist/api/types/AutomationEvent.d.ts +13 -0
  145. package/dist/api/types/AutomationEvent.js +21 -0
  146. package/dist/api/types/AutomationEvent.mjs +13 -0
  147. package/dist/api/types/AutomationEventList.d.mts +3 -1
  148. package/dist/api/types/AutomationEventList.d.ts +3 -1
  149. package/dist/api/types/AutomationSettings.d.mts +9 -0
  150. package/dist/api/types/AutomationSettings.d.ts +9 -0
  151. package/dist/api/types/AutoscalerCounts.d.mts +8 -0
  152. package/dist/api/types/AutoscalerCounts.d.ts +8 -0
  153. package/dist/api/types/AutoscalerCounts.js +17 -0
  154. package/dist/api/types/AutoscalerCounts.mjs +1 -0
  155. package/dist/api/types/Board.d.mts +1 -1
  156. package/dist/api/types/Board.d.ts +1 -1
  157. package/dist/api/types/BodyPutTeamAreasApiV1ProvidersAnthropicTeamAreasPut.d.mts +4 -0
  158. package/dist/api/types/BodyPutTeamAreasApiV1ProvidersAnthropicTeamAreasPut.d.ts +4 -0
  159. package/dist/api/types/BodyPutTeamAreasApiV1ProvidersAnthropicTeamAreasPut.js +17 -0
  160. package/dist/api/types/BodyPutTeamAreasApiV1ProvidersAnthropicTeamAreasPut.mjs +1 -0
  161. package/dist/api/types/BothBasesTotals.d.mts +5 -0
  162. package/dist/api/types/BothBasesTotals.d.ts +5 -0
  163. package/dist/api/types/BothBasesTotals.js +17 -0
  164. package/dist/api/types/BothBasesTotals.mjs +1 -0
  165. package/dist/api/types/ClaudeTeamArea.d.mts +20 -0
  166. package/dist/api/types/ClaudeTeamArea.d.ts +20 -0
  167. package/dist/api/types/ClaudeTeamArea.js +17 -0
  168. package/dist/api/types/ClaudeTeamArea.mjs +1 -0
  169. package/dist/api/types/ClaudeTeamAreaFigures.d.mts +18 -0
  170. package/dist/api/types/ClaudeTeamAreaFigures.d.ts +18 -0
  171. package/dist/api/types/ClaudeTeamAreaFigures.js +17 -0
  172. package/dist/api/types/ClaudeTeamAreaFigures.mjs +1 -0
  173. package/dist/api/types/ClaudeTeamAreaPreview.d.mts +6 -0
  174. package/dist/api/types/ClaudeTeamAreaPreview.d.ts +6 -0
  175. package/dist/api/types/ClaudeTeamAreaPreview.js +17 -0
  176. package/dist/api/types/ClaudeTeamAreaPreview.mjs +1 -0
  177. package/dist/api/types/ClaudeTeamAreasData.d.mts +7 -0
  178. package/dist/api/types/ClaudeTeamAreasData.d.ts +7 -0
  179. package/dist/api/types/ClaudeTeamAreasData.js +17 -0
  180. package/dist/api/types/ClaudeTeamAreasData.mjs +1 -0
  181. package/dist/api/types/ClaudeTeamAreasPreviewData.d.mts +13 -0
  182. package/dist/api/types/ClaudeTeamAreasPreviewData.d.ts +13 -0
  183. package/dist/api/types/ClaudeTeamAreasPreviewData.js +17 -0
  184. package/dist/api/types/ClaudeTeamAreasPreviewData.mjs +1 -0
  185. package/dist/api/types/ClaudeTeamAreasPreviewResponse.d.mts +6 -0
  186. package/dist/api/types/ClaudeTeamAreasPreviewResponse.d.ts +6 -0
  187. package/dist/api/types/ClaudeTeamAreasPreviewResponse.js +17 -0
  188. package/dist/api/types/ClaudeTeamAreasPreviewResponse.mjs +1 -0
  189. package/dist/api/types/ClaudeTeamAreasResponse.d.mts +6 -0
  190. package/dist/api/types/ClaudeTeamAreasResponse.d.ts +6 -0
  191. package/dist/api/types/ClaudeTeamAreasResponse.js +17 -0
  192. package/dist/api/types/ClaudeTeamAreasResponse.mjs +1 -0
  193. package/dist/api/types/ClaudeTeamAreasSaved.d.mts +7 -0
  194. package/dist/api/types/ClaudeTeamAreasSaved.d.ts +7 -0
  195. package/dist/api/types/ClaudeTeamAreasSaved.js +17 -0
  196. package/dist/api/types/ClaudeTeamAreasSaved.mjs +1 -0
  197. package/dist/api/types/ClaudeTeamAreasSavedResponse.d.mts +6 -0
  198. package/dist/api/types/ClaudeTeamAreasSavedResponse.d.ts +6 -0
  199. package/dist/api/types/ClaudeTeamAreasSavedResponse.js +17 -0
  200. package/dist/api/types/ClaudeTeamAreasSavedResponse.mjs +1 -0
  201. package/dist/api/types/ClaudeTeamDowngradeRule.d.mts +2 -0
  202. package/dist/api/types/ClaudeTeamDowngradeRule.d.ts +2 -0
  203. package/dist/api/types/ClaudeTeamRemoveRule.d.mts +2 -0
  204. package/dist/api/types/ClaudeTeamRemoveRule.d.ts +2 -0
  205. package/dist/api/types/ClaudeTeamUpgradeRule.d.mts +2 -0
  206. package/dist/api/types/ClaudeTeamUpgradeRule.d.ts +2 -0
  207. package/dist/api/types/ClusterAutomation.d.mts +1 -0
  208. package/dist/api/types/ClusterAutomation.d.ts +1 -0
  209. package/dist/api/types/ClusterConfig.d.mts +15 -0
  210. package/dist/api/types/ClusterConfig.d.ts +15 -0
  211. package/dist/api/types/ClusterConfig.js +17 -0
  212. package/dist/api/types/ClusterConfig.mjs +1 -0
  213. package/dist/api/types/ClusterFilterOptions.d.mts +5 -0
  214. package/dist/api/types/ClusterFilterOptions.d.ts +5 -0
  215. package/dist/api/types/ClusterItem.d.mts +22 -0
  216. package/dist/api/types/ClusterItem.d.ts +22 -0
  217. package/dist/api/types/ClusterSummary.d.mts +16 -0
  218. package/dist/api/types/ClusterSummary.d.ts +16 -0
  219. package/dist/api/types/ComputeMonth.d.mts +10 -0
  220. package/dist/api/types/ComputeMonth.d.ts +10 -0
  221. package/dist/api/types/ComputeMonth.js +17 -0
  222. package/dist/api/types/ComputeMonth.mjs +1 -0
  223. package/dist/api/types/ConfigLock.d.mts +6 -0
  224. package/dist/api/types/ConfigLock.d.ts +6 -0
  225. package/dist/api/types/ConfigLock.js +17 -0
  226. package/dist/api/types/ConfigLock.mjs +1 -0
  227. package/dist/api/types/ConfigObjectView.d.mts +41 -0
  228. package/dist/api/types/ConfigObjectView.d.ts +41 -0
  229. package/dist/api/types/ConfigObjectView.js +48 -0
  230. package/dist/api/types/ConfigObjectView.mjs +24 -0
  231. package/dist/api/types/ConfigTarget.d.mts +12 -0
  232. package/dist/api/types/ConfigTarget.d.ts +12 -0
  233. package/dist/api/types/ConfigTarget.js +36 -0
  234. package/dist/api/types/ConfigTarget.mjs +12 -0
  235. package/dist/api/types/ContainerDetail.d.mts +2 -0
  236. package/dist/api/types/ContainerDetail.d.ts +2 -0
  237. package/dist/api/types/CostGroup.d.mts +2 -0
  238. package/dist/api/types/CostGroup.d.ts +2 -0
  239. package/dist/api/types/CostPair.d.mts +6 -0
  240. package/dist/api/types/CostPair.d.ts +6 -0
  241. package/dist/api/types/CostPair.js +17 -0
  242. package/dist/api/types/CostPair.mjs +1 -0
  243. package/dist/api/types/DatadogHygieneData.d.mts +1 -1
  244. package/dist/api/types/DatadogHygieneData.d.ts +1 -1
  245. package/dist/api/types/DatadogHygieneRule.d.mts +3 -1
  246. package/dist/api/types/DatadogHygieneRule.d.ts +3 -1
  247. package/dist/api/types/EfficiencyPoint.d.mts +6 -0
  248. package/dist/api/types/EfficiencyPoint.d.ts +6 -0
  249. package/dist/api/types/EksAddon.d.mts +7 -0
  250. package/dist/api/types/EksAddon.d.ts +7 -0
  251. package/dist/api/types/EksAddon.js +17 -0
  252. package/dist/api/types/EksAddon.mjs +1 -0
  253. package/dist/api/types/EksCluster.d.mts +34 -0
  254. package/dist/api/types/EksCluster.d.ts +34 -0
  255. package/dist/api/types/EksCluster.js +42 -0
  256. package/dist/api/types/EksCluster.mjs +18 -0
  257. package/dist/api/types/EksClusterConfig.d.mts +29 -0
  258. package/dist/api/types/EksClusterConfig.d.ts +29 -0
  259. package/dist/api/types/EksClusterConfig.js +17 -0
  260. package/dist/api/types/EksClusterConfig.mjs +1 -0
  261. package/dist/api/types/EksClusterResponse.d.mts +6 -0
  262. package/dist/api/types/EksClusterResponse.d.ts +6 -0
  263. package/dist/api/types/EksClusterResponse.js +17 -0
  264. package/dist/api/types/EksClusterResponse.mjs +1 -0
  265. package/dist/api/types/EksFleetData.d.mts +4 -0
  266. package/dist/api/types/EksFleetData.d.ts +4 -0
  267. package/dist/api/types/EksFleetData.js +17 -0
  268. package/dist/api/types/EksFleetData.mjs +1 -0
  269. package/dist/api/types/EksFleetResponse.d.mts +6 -0
  270. package/dist/api/types/EksFleetResponse.d.ts +6 -0
  271. package/dist/api/types/EksFleetResponse.js +17 -0
  272. package/dist/api/types/EksFleetResponse.mjs +1 -0
  273. package/dist/api/types/EksHealthIssue.d.mts +4 -0
  274. package/dist/api/types/EksHealthIssue.d.ts +4 -0
  275. package/dist/api/types/EksHealthIssue.js +17 -0
  276. package/dist/api/types/EksHealthIssue.mjs +1 -0
  277. package/dist/api/types/EksInsight.d.mts +9 -0
  278. package/dist/api/types/EksInsight.d.ts +9 -0
  279. package/dist/api/types/EksInsight.js +17 -0
  280. package/dist/api/types/EksInsight.mjs +1 -0
  281. package/dist/api/types/EksLogging.d.mts +7 -0
  282. package/dist/api/types/EksLogging.d.ts +7 -0
  283. package/dist/api/types/EksLogging.js +17 -0
  284. package/dist/api/types/EksLogging.mjs +1 -0
  285. package/dist/api/types/EksNetworking.d.mts +9 -0
  286. package/dist/api/types/EksNetworking.d.ts +9 -0
  287. package/dist/api/types/EksNetworking.js +17 -0
  288. package/dist/api/types/EksNetworking.mjs +1 -0
  289. package/dist/api/types/EksPodIdentity.d.mts +4 -0
  290. package/dist/api/types/EksPodIdentity.d.ts +4 -0
  291. package/dist/api/types/EksPodIdentity.js +17 -0
  292. package/dist/api/types/EksPodIdentity.mjs +1 -0
  293. package/dist/api/types/EksSupport.d.mts +8 -0
  294. package/dist/api/types/EksSupport.d.ts +8 -0
  295. package/dist/api/types/EksSupport.js +17 -0
  296. package/dist/api/types/EksSupport.mjs +1 -0
  297. package/dist/api/types/EksUnreadable.d.mts +5 -0
  298. package/dist/api/types/EksUnreadable.d.ts +5 -0
  299. package/dist/api/types/EksUnreadable.js +17 -0
  300. package/dist/api/types/EksUnreadable.mjs +1 -0
  301. package/dist/api/types/FleetNamespace.d.mts +78 -0
  302. package/dist/api/types/FleetNamespace.d.ts +78 -0
  303. package/dist/api/types/FleetNamespace.js +49 -0
  304. package/dist/api/types/FleetNamespace.mjs +25 -0
  305. package/dist/api/types/FleetNamespaceListData.d.mts +7 -0
  306. package/dist/api/types/FleetNamespaceListData.d.ts +7 -0
  307. package/dist/api/types/FleetNamespaceListData.js +17 -0
  308. package/dist/api/types/FleetNamespaceListData.mjs +1 -0
  309. package/dist/api/types/FleetNamespaceListResponse.d.mts +6 -0
  310. package/dist/api/types/FleetNamespaceListResponse.d.ts +6 -0
  311. package/dist/api/types/FleetNamespaceListResponse.js +17 -0
  312. package/dist/api/types/FleetNamespaceListResponse.mjs +1 -0
  313. package/dist/api/types/FleetNetworkDestinations.d.mts +5 -0
  314. package/dist/api/types/FleetNetworkDestinations.d.ts +5 -0
  315. package/dist/api/types/FleetNetworkDestinations.js +17 -0
  316. package/dist/api/types/FleetNetworkDestinations.mjs +1 -0
  317. package/dist/api/types/FleetNetworkDestinationsResponse.d.mts +6 -0
  318. package/dist/api/types/FleetNetworkDestinationsResponse.d.ts +6 -0
  319. package/dist/api/types/FleetNetworkDestinationsResponse.js +17 -0
  320. package/dist/api/types/FleetNetworkDestinationsResponse.mjs +1 -0
  321. package/dist/api/types/FleetStorage.d.mts +14 -0
  322. package/dist/api/types/FleetStorage.d.ts +14 -0
  323. package/dist/api/types/FleetStorage.js +17 -0
  324. package/dist/api/types/FleetStorage.mjs +1 -0
  325. package/dist/api/types/FleetSummary.d.mts +10 -0
  326. package/dist/api/types/FleetSummary.d.ts +10 -0
  327. package/dist/api/types/FleetTotals.d.mts +4 -0
  328. package/dist/api/types/FleetTotals.d.ts +4 -0
  329. package/dist/api/types/FleetWorkload.d.mts +18 -0
  330. package/dist/api/types/FleetWorkload.d.ts +18 -0
  331. package/dist/api/types/FleetWorkload.js +20 -0
  332. package/dist/api/types/FleetWorkload.mjs +12 -0
  333. package/dist/api/types/FleetWorkloadListData.d.mts +1 -1
  334. package/dist/api/types/FleetWorkloadListData.d.ts +1 -1
  335. package/dist/api/types/FleetWorkloadPair.d.mts +10 -0
  336. package/dist/api/types/FleetWorkloadPair.d.ts +10 -0
  337. package/dist/api/types/FleetWorkloadPair.js +17 -0
  338. package/dist/api/types/FleetWorkloadPair.mjs +1 -0
  339. package/dist/api/types/HardLimits.d.mts +7 -0
  340. package/dist/api/types/HardLimits.d.ts +7 -0
  341. package/dist/api/types/HardLimits.js +17 -0
  342. package/dist/api/types/HardLimits.mjs +1 -0
  343. package/dist/api/types/KubernetesDataAvailability.d.mts +2 -0
  344. package/dist/api/types/KubernetesDataAvailability.d.ts +2 -0
  345. package/dist/api/types/LensTotals.d.mts +12 -0
  346. package/dist/api/types/LensTotals.d.ts +12 -0
  347. package/dist/api/types/NamespaceAutomation.d.mts +17 -0
  348. package/dist/api/types/NamespaceAutomation.d.ts +17 -0
  349. package/dist/api/types/NamespaceAutomation.js +6 -0
  350. package/dist/api/types/NamespaceAutomation.mjs +6 -0
  351. package/dist/api/types/NamespaceItem.d.mts +14 -1
  352. package/dist/api/types/NamespaceItem.d.ts +14 -1
  353. package/dist/api/types/NamespaceItem.js +1 -0
  354. package/dist/api/types/NamespaceItem.mjs +1 -0
  355. package/dist/api/types/NamespaceScope.d.mts +3 -2
  356. package/dist/api/types/NamespaceScope.d.ts +3 -2
  357. package/dist/api/types/NamespaceScope.js +1 -0
  358. package/dist/api/types/NamespaceScope.mjs +1 -0
  359. package/dist/api/types/NetworkDayUsage.d.mts +2 -0
  360. package/dist/api/types/NetworkDayUsage.d.ts +2 -0
  361. package/dist/api/types/NodeConditionItem.d.mts +7 -0
  362. package/dist/api/types/NodeConditionItem.d.ts +7 -0
  363. package/dist/api/types/NodeConditionItem.js +17 -0
  364. package/dist/api/types/NodeConditionItem.mjs +1 -0
  365. package/dist/api/types/NodeDetail.d.mts +6 -0
  366. package/dist/api/types/NodeDetail.d.ts +6 -0
  367. package/dist/api/types/NodeFacets.d.mts +2 -0
  368. package/dist/api/types/NodeFacets.d.ts +2 -0
  369. package/dist/api/types/NodeInfoItem.d.mts +8 -0
  370. package/dist/api/types/NodeInfoItem.d.ts +8 -0
  371. package/dist/api/types/NodeInfoItem.js +17 -0
  372. package/dist/api/types/NodeInfoItem.mjs +1 -0
  373. package/dist/api/types/PodPhases.d.mts +6 -0
  374. package/dist/api/types/PodPhases.d.ts +6 -0
  375. package/dist/api/types/PodPhases.js +17 -0
  376. package/dist/api/types/PodPhases.mjs +1 -0
  377. package/dist/api/types/PoolBillEffect.d.mts +25 -0
  378. package/dist/api/types/PoolBillEffect.d.ts +25 -0
  379. package/dist/api/types/PoolBillEffect.js +35 -0
  380. package/dist/api/types/PoolBillEffect.mjs +11 -0
  381. package/dist/api/types/PotentialSavings.d.mts +5 -0
  382. package/dist/api/types/PotentialSavings.d.ts +5 -0
  383. package/dist/api/types/ProviderShare.d.mts +9 -0
  384. package/dist/api/types/ProviderShare.d.ts +9 -0
  385. package/dist/api/types/ProviderShare.js +17 -0
  386. package/dist/api/types/ProviderShare.mjs +1 -0
  387. package/dist/api/types/PurchaseTypeShare.d.mts +4 -0
  388. package/dist/api/types/PurchaseTypeShare.d.ts +4 -0
  389. package/dist/api/types/RealizedBlocker.d.mts +5 -0
  390. package/dist/api/types/RealizedBlocker.d.ts +5 -0
  391. package/dist/api/types/RealizedBlocker.js +17 -0
  392. package/dist/api/types/RealizedBlocker.mjs +1 -0
  393. package/dist/api/types/RealizedPool.d.mts +6 -0
  394. package/dist/api/types/RealizedPool.d.ts +6 -0
  395. package/dist/api/types/RealizedPool.js +17 -0
  396. package/dist/api/types/RealizedPool.mjs +1 -0
  397. package/dist/api/types/RealizedRightsizing.d.mts +12 -0
  398. package/dist/api/types/RealizedRightsizing.d.ts +12 -0
  399. package/dist/api/types/RealizedRightsizing.js +17 -0
  400. package/dist/api/types/RealizedRightsizing.mjs +1 -0
  401. package/dist/api/types/RealizedRightsizingResponse.d.mts +6 -0
  402. package/dist/api/types/RealizedRightsizingResponse.d.ts +6 -0
  403. package/dist/api/types/RealizedRightsizingResponse.js +17 -0
  404. package/dist/api/types/RealizedRightsizingResponse.mjs +1 -0
  405. package/dist/api/types/RealizedTotal.d.mts +4 -0
  406. package/dist/api/types/RealizedTotal.d.ts +4 -0
  407. package/dist/api/types/RealizedTotal.js +17 -0
  408. package/dist/api/types/RealizedTotal.mjs +1 -0
  409. package/dist/api/types/ReliabilityEventDay.d.mts +6 -0
  410. package/dist/api/types/ReliabilityEventDay.d.ts +6 -0
  411. package/dist/api/types/ReliabilityEventDay.js +17 -0
  412. package/dist/api/types/ReliabilityEventDay.mjs +1 -0
  413. package/dist/api/types/ReliabilityGroup.d.mts +9 -0
  414. package/dist/api/types/ReliabilityGroup.d.ts +9 -0
  415. package/dist/api/types/ReliabilityGroup.js +17 -0
  416. package/dist/api/types/ReliabilityGroup.mjs +1 -0
  417. package/dist/api/types/ReliabilityLens.d.mts +2 -0
  418. package/dist/api/types/ReliabilityLens.d.ts +2 -0
  419. package/dist/api/types/ResourceCapacity.d.mts +12 -0
  420. package/dist/api/types/ResourceCapacity.d.ts +12 -0
  421. package/dist/api/types/ResourceCapacity.js +17 -0
  422. package/dist/api/types/ResourceCapacity.mjs +1 -0
  423. package/dist/api/types/ResourceEfficiency.d.mts +3 -1
  424. package/dist/api/types/ResourceEfficiency.d.ts +3 -1
  425. package/dist/api/types/RightsizeGuardrails.d.mts +9 -0
  426. package/dist/api/types/RightsizeGuardrails.d.ts +9 -0
  427. package/dist/api/types/RightsizeGuardrails.js +17 -0
  428. package/dist/api/types/RightsizeGuardrails.mjs +1 -0
  429. package/dist/api/types/RightsizeGuardrailsChange.d.mts +9 -0
  430. package/dist/api/types/RightsizeGuardrailsChange.d.ts +9 -0
  431. package/dist/api/types/RightsizeGuardrailsChange.js +17 -0
  432. package/dist/api/types/RightsizeGuardrailsChange.mjs +1 -0
  433. package/dist/api/types/RightsizedContainer.d.mts +132 -0
  434. package/dist/api/types/RightsizedContainer.d.ts +132 -0
  435. package/dist/api/types/RightsizedContainer.js +99 -0
  436. package/dist/api/types/RightsizedContainer.mjs +75 -0
  437. package/dist/api/types/RightsizedContainerList.d.mts +5 -0
  438. package/dist/api/types/RightsizedContainerList.d.ts +5 -0
  439. package/dist/api/types/RightsizedContainerList.js +17 -0
  440. package/dist/api/types/RightsizedContainerList.mjs +1 -0
  441. package/dist/api/types/RightsizedContainerListResponse.d.mts +6 -0
  442. package/dist/api/types/RightsizedContainerListResponse.d.ts +6 -0
  443. package/dist/api/types/RightsizedContainerListResponse.js +17 -0
  444. package/dist/api/types/RightsizedContainerListResponse.mjs +1 -0
  445. package/dist/api/types/RosterAsked.d.mts +21 -0
  446. package/dist/api/types/RosterAsked.d.ts +21 -0
  447. package/dist/api/types/RosterAsked.js +35 -0
  448. package/dist/api/types/RosterAsked.mjs +11 -0
  449. package/dist/api/types/SavingsByKind.d.mts +11 -0
  450. package/dist/api/types/SavingsByKind.d.ts +11 -0
  451. package/dist/api/types/SavingsByKind.js +17 -0
  452. package/dist/api/types/SavingsByKind.mjs +1 -0
  453. package/dist/api/types/SessionsAsked.d.mts +4 -0
  454. package/dist/api/types/SessionsAsked.d.ts +4 -0
  455. package/dist/api/types/SessionsAsked.js +17 -0
  456. package/dist/api/types/SessionsAsked.mjs +1 -0
  457. package/dist/api/types/SetAutomationRequest.d.mts +5 -2
  458. package/dist/api/types/SetAutomationRequest.d.ts +5 -2
  459. package/dist/api/types/SetNamespaceAutomationRequest.d.mts +8 -0
  460. package/dist/api/types/SetNamespaceAutomationRequest.d.ts +8 -0
  461. package/dist/api/types/SetNamespaceAutomationRequest.js +5 -0
  462. package/dist/api/types/SetNamespaceAutomationRequest.mjs +5 -0
  463. package/dist/api/types/SetWorkloadAutomationRequest.d.mts +12 -0
  464. package/dist/api/types/SetWorkloadAutomationRequest.d.ts +12 -0
  465. package/dist/api/types/SetWorkloadAutomationRequest.js +35 -0
  466. package/dist/api/types/SetWorkloadAutomationRequest.mjs +11 -0
  467. package/dist/api/types/SourcedValue.d.mts +11 -0
  468. package/dist/api/types/SourcedValue.d.ts +11 -0
  469. package/dist/api/types/SourcedValue.js +17 -0
  470. package/dist/api/types/SourcedValue.mjs +1 -0
  471. package/dist/api/types/SpendDay.d.mts +14 -0
  472. package/dist/api/types/SpendDay.d.ts +14 -0
  473. package/dist/api/types/SpendKpis.d.mts +12 -0
  474. package/dist/api/types/SpendKpis.d.ts +12 -0
  475. package/dist/api/types/SpendUnitCost.d.mts +6 -0
  476. package/dist/api/types/SpendUnitCost.d.ts +6 -0
  477. package/dist/api/types/StopAndRevertRequest.d.mts +3 -0
  478. package/dist/api/types/StopAndRevertRequest.d.ts +3 -0
  479. package/dist/api/types/StopAndRevertRequest.js +17 -0
  480. package/dist/api/types/StopAndRevertRequest.mjs +1 -0
  481. package/dist/api/types/StorageClassTotals.d.mts +14 -0
  482. package/dist/api/types/StorageClassTotals.d.ts +14 -0
  483. package/dist/api/types/StorageClassTotals.js +17 -0
  484. package/dist/api/types/StorageClassTotals.mjs +1 -0
  485. package/dist/api/types/StorageClassUsage.d.mts +2 -0
  486. package/dist/api/types/StorageClassUsage.d.ts +2 -0
  487. package/dist/api/types/Traffic.d.mts +2 -0
  488. package/dist/api/types/Traffic.d.ts +2 -0
  489. package/dist/api/types/Waste.d.mts +6 -0
  490. package/dist/api/types/Waste.d.ts +6 -0
  491. package/dist/api/types/WasteDay.d.mts +6 -0
  492. package/dist/api/types/WasteDay.d.ts +6 -0
  493. package/dist/api/types/WasteTotal.d.mts +2 -0
  494. package/dist/api/types/WasteTotal.d.ts +2 -0
  495. package/dist/api/types/WorkloadAutomation.d.mts +15 -0
  496. package/dist/api/types/WorkloadAutomation.d.ts +15 -0
  497. package/dist/api/types/WorkloadAutomation.js +35 -0
  498. package/dist/api/types/WorkloadAutomation.mjs +11 -0
  499. package/dist/api/types/WorkloadAutomationResponse.d.mts +6 -0
  500. package/dist/api/types/WorkloadAutomationResponse.d.ts +6 -0
  501. package/dist/api/types/WorkloadAutomationResponse.js +17 -0
  502. package/dist/api/types/WorkloadAutomationResponse.mjs +1 -0
  503. package/dist/api/types/WorkloadDay.d.mts +8 -0
  504. package/dist/api/types/WorkloadDay.d.ts +8 -0
  505. package/dist/api/types/WorkloadItem.d.mts +14 -0
  506. package/dist/api/types/WorkloadItem.d.ts +14 -0
  507. package/dist/api/types/WorkloadVolume.d.mts +2 -0
  508. package/dist/api/types/WorkloadVolume.d.ts +2 -0
  509. package/dist/api/types/index.d.mts +78 -0
  510. package/dist/api/types/index.d.ts +78 -0
  511. package/dist/api/types/index.js +156 -0
  512. package/dist/api/types/index.mjs +78 -0
  513. package/dist/core/exports.d.mts +1 -0
  514. package/dist/core/exports.d.ts +1 -0
  515. package/dist/core/exports.js +2 -0
  516. package/dist/core/exports.mjs +1 -0
  517. package/dist/core/file/exports.d.mts +1 -0
  518. package/dist/core/file/exports.d.ts +1 -0
  519. package/dist/core/file/exports.js +17 -0
  520. package/dist/core/file/exports.mjs +1 -0
  521. package/dist/core/file/file.d.mts +10 -0
  522. package/dist/core/file/file.d.ts +10 -0
  523. package/dist/core/file/file.js +199 -0
  524. package/dist/core/file/file.mjs +164 -0
  525. package/dist/core/file/index.d.mts +2 -0
  526. package/dist/core/file/index.d.ts +2 -0
  527. package/dist/core/file/index.js +25 -0
  528. package/dist/core/file/index.mjs +3 -0
  529. package/dist/core/file/types.d.mts +66 -0
  530. package/dist/core/file/types.d.ts +66 -0
  531. package/dist/core/file/types.js +17 -0
  532. package/dist/core/file/types.mjs +1 -0
  533. package/dist/core/form-data-utils/FormDataWrapper.d.mts +15 -0
  534. package/dist/core/form-data-utils/FormDataWrapper.d.ts +15 -0
  535. package/dist/core/form-data-utils/FormDataWrapper.js +143 -0
  536. package/dist/core/form-data-utils/FormDataWrapper.mjs +108 -0
  537. package/dist/core/form-data-utils/encodeAsFormParameter.d.mts +1 -0
  538. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  539. package/dist/core/form-data-utils/encodeAsFormParameter.js +37 -0
  540. package/dist/core/form-data-utils/encodeAsFormParameter.mjs +13 -0
  541. package/dist/core/form-data-utils/index.d.mts +2 -0
  542. package/dist/core/form-data-utils/index.d.ts +2 -0
  543. package/dist/core/form-data-utils/index.js +32 -0
  544. package/dist/core/form-data-utils/index.mjs +6 -0
  545. package/dist/core/index.d.mts +2 -0
  546. package/dist/core/index.d.ts +2 -0
  547. package/dist/core/index.js +5 -0
  548. package/dist/core/index.mjs +3 -0
  549. package/dist/version.d.mts +1 -1
  550. package/dist/version.d.ts +1 -1
  551. package/dist/version.js +1 -1
  552. package/dist/version.mjs +1 -1
  553. package/package.json +1 -1
@@ -0,0 +1,164 @@
1
+ async function toBinaryUploadRequest(file) {
2
+ const { data, filename, contentLength, contentType } = await getFileWithMetadata(file);
3
+ const request = {
4
+ body: data,
5
+ headers: {}
6
+ };
7
+ if (filename) {
8
+ request.headers["Content-Disposition"] = `attachment; filename="${filename}"`;
9
+ }
10
+ if (contentType) {
11
+ request.headers["Content-Type"] = contentType;
12
+ }
13
+ if (contentLength != null) {
14
+ request.headers["Content-Length"] = contentLength.toString();
15
+ }
16
+ return request;
17
+ }
18
+ async function toMultipartDataPart(file) {
19
+ const { data, filename, contentType } = await getFileWithMetadata(file, {
20
+ noSniffFileSize: true
21
+ });
22
+ return {
23
+ data,
24
+ filename,
25
+ contentType
26
+ };
27
+ }
28
+ async function getFileWithMetadata(file, { noSniffFileSize } = {}) {
29
+ if (isFileLike(file)) {
30
+ return getFileWithMetadata(
31
+ {
32
+ data: file
33
+ },
34
+ { noSniffFileSize }
35
+ );
36
+ }
37
+ if ("path" in file) {
38
+ const fs = await import("fs");
39
+ if (!fs?.createReadStream) {
40
+ throw new Error("File path uploads are not supported in this environment.");
41
+ }
42
+ const data = fs.createReadStream(file.path);
43
+ const contentLength = file.contentLength ?? (noSniffFileSize === true ? void 0 : await tryGetFileSizeFromPath(file.path));
44
+ const filename = file.filename ?? getNameFromPath(file.path);
45
+ return {
46
+ data,
47
+ filename,
48
+ contentType: file.contentType,
49
+ contentLength
50
+ };
51
+ }
52
+ if ("data" in file) {
53
+ const data = file.data;
54
+ const contentLength = file.contentLength ?? await tryGetContentLengthFromFileLike(data, {
55
+ noSniffFileSize
56
+ });
57
+ const filename = file.filename ?? tryGetNameFromFileLike(data);
58
+ return {
59
+ data,
60
+ filename,
61
+ contentType: file.contentType ?? tryGetContentTypeFromFileLike(data),
62
+ contentLength
63
+ };
64
+ }
65
+ throw new Error(`Invalid FileUpload of type ${typeof file}: ${JSON.stringify(file)}`);
66
+ }
67
+ function isFileLike(value) {
68
+ return isBuffer(value) || isArrayBufferView(value) || isArrayBuffer(value) || isUint8Array(value) || isBlob(value) || isFile(value) || isStreamLike(value) || isReadableStream(value);
69
+ }
70
+ async function tryGetFileSizeFromPath(path) {
71
+ try {
72
+ const fs = await import("fs");
73
+ if (!fs?.promises?.stat) {
74
+ return void 0;
75
+ }
76
+ const fileStat = await fs.promises.stat(path);
77
+ return fileStat.size;
78
+ } catch (_fallbackError) {
79
+ return void 0;
80
+ }
81
+ }
82
+ function tryGetNameFromFileLike(data) {
83
+ if (isNamedValue(data)) {
84
+ return data.name;
85
+ }
86
+ if (isPathedValue(data)) {
87
+ return getNameFromPath(data.path.toString());
88
+ }
89
+ return void 0;
90
+ }
91
+ async function tryGetContentLengthFromFileLike(data, { noSniffFileSize } = {}) {
92
+ if (isBuffer(data)) {
93
+ return data.length;
94
+ }
95
+ if (isArrayBufferView(data)) {
96
+ return data.byteLength;
97
+ }
98
+ if (isArrayBuffer(data)) {
99
+ return data.byteLength;
100
+ }
101
+ if (isBlob(data)) {
102
+ return data.size;
103
+ }
104
+ if (isFile(data)) {
105
+ return data.size;
106
+ }
107
+ if (noSniffFileSize === true) {
108
+ return void 0;
109
+ }
110
+ if (isPathedValue(data)) {
111
+ return await tryGetFileSizeFromPath(data.path.toString());
112
+ }
113
+ return void 0;
114
+ }
115
+ function tryGetContentTypeFromFileLike(data) {
116
+ if (isBlob(data)) {
117
+ return data.type;
118
+ }
119
+ if (isFile(data)) {
120
+ return data.type;
121
+ }
122
+ return void 0;
123
+ }
124
+ function getNameFromPath(path) {
125
+ const lastForwardSlash = path.lastIndexOf("/");
126
+ const lastBackSlash = path.lastIndexOf("\\");
127
+ const lastSlashIndex = Math.max(lastForwardSlash, lastBackSlash);
128
+ return lastSlashIndex >= 0 ? path.substring(lastSlashIndex + 1) : path;
129
+ }
130
+ function isNamedValue(value) {
131
+ return typeof value === "object" && value != null && "name" in value;
132
+ }
133
+ function isPathedValue(value) {
134
+ return typeof value === "object" && value != null && "path" in value;
135
+ }
136
+ function isStreamLike(value) {
137
+ return typeof value === "object" && value != null && ("read" in value || "pipe" in value);
138
+ }
139
+ function isReadableStream(value) {
140
+ return typeof value === "object" && value != null && "getReader" in value;
141
+ }
142
+ function isBuffer(value) {
143
+ return typeof Buffer !== "undefined" && Buffer.isBuffer && Buffer.isBuffer(value);
144
+ }
145
+ function isArrayBufferView(value) {
146
+ return typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView(value);
147
+ }
148
+ function isArrayBuffer(value) {
149
+ return typeof ArrayBuffer !== "undefined" && value instanceof ArrayBuffer;
150
+ }
151
+ function isUint8Array(value) {
152
+ return typeof Uint8Array !== "undefined" && value instanceof Uint8Array;
153
+ }
154
+ function isBlob(value) {
155
+ return typeof Blob !== "undefined" && value instanceof Blob;
156
+ }
157
+ function isFile(value) {
158
+ return typeof File !== "undefined" && value instanceof File;
159
+ }
160
+ export {
161
+ toBinaryUploadRequest,
162
+ toMultipartDataPart
163
+ };
164
+ //# sourceMappingURL=file.mjs.map
@@ -0,0 +1,2 @@
1
+ export * from "./file.mjs";
2
+ export * from "./types.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./file.js";
2
+ export * from "./types.js";
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var file_exports = {};
17
+ module.exports = __toCommonJS(file_exports);
18
+ __reExport(file_exports, require("./file.js"), module.exports);
19
+ __reExport(file_exports, require("./types.js"), module.exports);
20
+ // Annotate the CommonJS export names for ESM import in node:
21
+ 0 && (module.exports = {
22
+ ...require("./file.js"),
23
+ ...require("./types.js")
24
+ });
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ export * from "./file.mjs";
2
+ export * from "./types.mjs";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,66 @@
1
+ /**
2
+ * A file that can be uploaded. Can be a file-like object (stream, buffer, blob, etc.),
3
+ * a path to a file, or an object with a file-like object and metadata.
4
+ */
5
+ export type Uploadable = Uploadable.FileLike | Uploadable.FromPath | Uploadable.WithMetadata;
6
+ export declare namespace Uploadable {
7
+ /**
8
+ * Various file-like objects that can be used to upload a file.
9
+ */
10
+ type FileLike = ArrayBuffer | ArrayBufferLike | ArrayBufferView | Uint8Array | import("buffer").Buffer | import("buffer").Blob | import("buffer").File | import("stream").Readable | import("stream/web").ReadableStream | globalThis.Blob | globalThis.File | ReadableStream;
11
+ /**
12
+ * A file path with optional metadata, used for uploading a file from the file system.
13
+ */
14
+ type FromPath = {
15
+ /** The path to the file to upload */
16
+ path: string;
17
+ /**
18
+ * Optional override for the file name (defaults to basename of path).
19
+ * This is used to set the `Content-Disposition` header in upload requests.
20
+ */
21
+ filename?: string;
22
+ /**
23
+ * Optional MIME type of the file (e.g., 'image/jpeg', 'text/plain').
24
+ * This is used to set the `Content-Type` header in upload requests.
25
+ */
26
+ contentType?: string;
27
+ /**
28
+ * Optional file size in bytes.
29
+ * If not provided, the file size will be determined from the file system.
30
+ * The content length is used to set the `Content-Length` header in upload requests.
31
+ */
32
+ contentLength?: number;
33
+ };
34
+ /**
35
+ * A file-like object with metadata, used for uploading files.
36
+ */
37
+ type WithMetadata = {
38
+ /** The file data */
39
+ data: FileLike;
40
+ /**
41
+ * Optional override for the file name (defaults to basename of path).
42
+ * This is used to set the `Content-Disposition` header in upload requests.
43
+ */
44
+ filename?: string;
45
+ /**
46
+ * Optional MIME type of the file (e.g., 'image/jpeg', 'text/plain').
47
+ * This is used to set the `Content-Type` header in upload requests.
48
+ *
49
+ * If not provided, the content type may be determined from the data itself.
50
+ * * If the data is a `File`, `Blob`, or similar, the content type will be determined from the file itself, if the type is set.
51
+ * * Any other data type will not have a content type set, and the upload request will use `Content-Type: application/octet-stream` instead.
52
+ */
53
+ contentType?: string;
54
+ /**
55
+ * Optional file size in bytes.
56
+ * The content length is used to set the `Content-Length` header in upload requests.
57
+ * If the content length is not provided and cannot be determined, the upload request will not include the `Content-Length` header, but will use `Transfer-Encoding: chunked` instead.
58
+ *
59
+ * If not provided, the file size will be determined depending on the data type.
60
+ * * If the data is of type `fs.ReadStream` (`createReadStream`), the size will be determined from the file system.
61
+ * * If the data is a `Buffer`, `ArrayBuffer`, `Uint8Array`, `Blob`, `File`, or similar, the size will be determined from the data itself.
62
+ * * If the data is a `Readable` or `ReadableStream`, the size will not be determined.
63
+ */
64
+ contentLength?: number;
65
+ };
66
+ }
@@ -0,0 +1,66 @@
1
+ /**
2
+ * A file that can be uploaded. Can be a file-like object (stream, buffer, blob, etc.),
3
+ * a path to a file, or an object with a file-like object and metadata.
4
+ */
5
+ export type Uploadable = Uploadable.FileLike | Uploadable.FromPath | Uploadable.WithMetadata;
6
+ export declare namespace Uploadable {
7
+ /**
8
+ * Various file-like objects that can be used to upload a file.
9
+ */
10
+ type FileLike = ArrayBuffer | ArrayBufferLike | ArrayBufferView | Uint8Array | import("buffer").Buffer | import("buffer").Blob | import("buffer").File | import("stream").Readable | import("stream/web").ReadableStream | globalThis.Blob | globalThis.File | ReadableStream;
11
+ /**
12
+ * A file path with optional metadata, used for uploading a file from the file system.
13
+ */
14
+ type FromPath = {
15
+ /** The path to the file to upload */
16
+ path: string;
17
+ /**
18
+ * Optional override for the file name (defaults to basename of path).
19
+ * This is used to set the `Content-Disposition` header in upload requests.
20
+ */
21
+ filename?: string;
22
+ /**
23
+ * Optional MIME type of the file (e.g., 'image/jpeg', 'text/plain').
24
+ * This is used to set the `Content-Type` header in upload requests.
25
+ */
26
+ contentType?: string;
27
+ /**
28
+ * Optional file size in bytes.
29
+ * If not provided, the file size will be determined from the file system.
30
+ * The content length is used to set the `Content-Length` header in upload requests.
31
+ */
32
+ contentLength?: number;
33
+ };
34
+ /**
35
+ * A file-like object with metadata, used for uploading files.
36
+ */
37
+ type WithMetadata = {
38
+ /** The file data */
39
+ data: FileLike;
40
+ /**
41
+ * Optional override for the file name (defaults to basename of path).
42
+ * This is used to set the `Content-Disposition` header in upload requests.
43
+ */
44
+ filename?: string;
45
+ /**
46
+ * Optional MIME type of the file (e.g., 'image/jpeg', 'text/plain').
47
+ * This is used to set the `Content-Type` header in upload requests.
48
+ *
49
+ * If not provided, the content type may be determined from the data itself.
50
+ * * If the data is a `File`, `Blob`, or similar, the content type will be determined from the file itself, if the type is set.
51
+ * * Any other data type will not have a content type set, and the upload request will use `Content-Type: application/octet-stream` instead.
52
+ */
53
+ contentType?: string;
54
+ /**
55
+ * Optional file size in bytes.
56
+ * The content length is used to set the `Content-Length` header in upload requests.
57
+ * If the content length is not provided and cannot be determined, the upload request will not include the `Content-Length` header, but will use `Transfer-Encoding: chunked` instead.
58
+ *
59
+ * If not provided, the file size will be determined depending on the data type.
60
+ * * If the data is of type `fs.ReadStream` (`createReadStream`), the size will be determined from the file system.
61
+ * * If the data is a `Buffer`, `ArrayBuffer`, `Uint8Array`, `Blob`, `File`, or similar, the size will be determined from the data itself.
62
+ * * If the data is a `Readable` or `ReadableStream`, the size will not be determined.
63
+ */
64
+ contentLength?: number;
65
+ };
66
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var types_exports = {};
16
+ module.exports = __toCommonJS(types_exports);
17
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1,15 @@
1
+ import { type Uploadable } from "../../core/file/index.mjs";
2
+ interface FormDataRequest<Body> {
3
+ body: Body;
4
+ headers: Record<string, string>;
5
+ duplex?: "half";
6
+ }
7
+ export declare function newFormData(): Promise<FormDataWrapper>;
8
+ export declare class FormDataWrapper {
9
+ private fd;
10
+ setup(): Promise<void>;
11
+ append(key: string, value: unknown): void;
12
+ appendFile(key: string, value: Uploadable): Promise<void>;
13
+ getRequest(): FormDataRequest<FormData>;
14
+ }
15
+ export {};
@@ -0,0 +1,15 @@
1
+ import { type Uploadable } from "../../core/file/index.js";
2
+ interface FormDataRequest<Body> {
3
+ body: Body;
4
+ headers: Record<string, string>;
5
+ duplex?: "half";
6
+ }
7
+ export declare function newFormData(): Promise<FormDataWrapper>;
8
+ export declare class FormDataWrapper {
9
+ private fd;
10
+ setup(): Promise<void>;
11
+ append(key: string, value: unknown): void;
12
+ appendFile(key: string, value: Uploadable): Promise<void>;
13
+ getRequest(): FormDataRequest<FormData>;
14
+ }
15
+ export {};
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var FormDataWrapper_exports = {};
30
+ __export(FormDataWrapper_exports, {
31
+ FormDataWrapper: () => FormDataWrapper,
32
+ newFormData: () => newFormData
33
+ });
34
+ module.exports = __toCommonJS(FormDataWrapper_exports);
35
+ var import_file = require("../../core/file/index.js");
36
+ var import_json = require("../../core/json.js");
37
+ var import_runtime = require("../runtime/index.js");
38
+ async function newFormData() {
39
+ return new FormDataWrapper();
40
+ }
41
+ class FormDataWrapper {
42
+ fd = new FormData();
43
+ async setup() {
44
+ }
45
+ append(key, value) {
46
+ this.fd.append(key, String(value));
47
+ }
48
+ async appendFile(key, value) {
49
+ const { data, filename, contentType } = await (0, import_file.toMultipartDataPart)(value);
50
+ const blob = await convertToBlob(data, contentType);
51
+ if (filename) {
52
+ this.fd.append(key, blob, filename);
53
+ } else {
54
+ this.fd.append(key, blob);
55
+ }
56
+ }
57
+ getRequest() {
58
+ return {
59
+ body: this.fd,
60
+ headers: {},
61
+ duplex: "half"
62
+ };
63
+ }
64
+ }
65
+ function isStreamLike(value) {
66
+ return typeof value === "object" && value != null && ("read" in value || "pipe" in value);
67
+ }
68
+ function isReadableStream(value) {
69
+ return typeof value === "object" && value != null && "getReader" in value;
70
+ }
71
+ function isBuffer(value) {
72
+ return typeof Buffer !== "undefined" && Buffer.isBuffer && Buffer.isBuffer(value);
73
+ }
74
+ function isArrayBufferView(value) {
75
+ return ArrayBuffer.isView(value);
76
+ }
77
+ async function streamToBuffer(stream) {
78
+ if (import_runtime.RUNTIME.type === "node") {
79
+ const { Readable } = await import("stream");
80
+ if (stream instanceof Readable) {
81
+ const chunks = [];
82
+ for await (const chunk of stream) {
83
+ chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
84
+ }
85
+ return Buffer.concat(chunks);
86
+ }
87
+ }
88
+ if (isReadableStream(stream)) {
89
+ const reader = stream.getReader();
90
+ const chunks = [];
91
+ try {
92
+ while (true) {
93
+ const { done, value } = await reader.read();
94
+ if (done) break;
95
+ chunks.push(value);
96
+ }
97
+ } finally {
98
+ reader.releaseLock();
99
+ }
100
+ const totalLength = chunks.reduce((sum, chunk) => sum + chunk.length, 0);
101
+ const result = new Uint8Array(totalLength);
102
+ let offset = 0;
103
+ for (const chunk of chunks) {
104
+ result.set(chunk, offset);
105
+ offset += chunk.length;
106
+ }
107
+ return Buffer.from(result);
108
+ }
109
+ throw new Error(
110
+ `Unsupported stream type: ${typeof stream}. Expected Node.js Readable stream or Web ReadableStream.`
111
+ );
112
+ }
113
+ async function convertToBlob(value, contentType) {
114
+ if (isStreamLike(value) || isReadableStream(value)) {
115
+ const buffer = await streamToBuffer(value);
116
+ return new Blob([buffer], { type: contentType });
117
+ }
118
+ if (value instanceof Blob) {
119
+ return value;
120
+ }
121
+ if (isBuffer(value)) {
122
+ return new Blob([value], { type: contentType });
123
+ }
124
+ if (value instanceof ArrayBuffer) {
125
+ return new Blob([value], { type: contentType });
126
+ }
127
+ if (isArrayBufferView(value)) {
128
+ return new Blob([value], { type: contentType });
129
+ }
130
+ if (typeof value === "string") {
131
+ return new Blob([value], { type: contentType });
132
+ }
133
+ if (typeof value === "object" && value !== null) {
134
+ return new Blob([(0, import_json.toJson)(value)], { type: contentType ?? "application/json" });
135
+ }
136
+ return new Blob([String(value)], { type: contentType });
137
+ }
138
+ // Annotate the CommonJS export names for ESM import in node:
139
+ 0 && (module.exports = {
140
+ FormDataWrapper,
141
+ newFormData
142
+ });
143
+ //# sourceMappingURL=FormDataWrapper.js.map
@@ -0,0 +1,108 @@
1
+ import { toMultipartDataPart } from "../../core/file/index.mjs";
2
+ import { toJson } from "../../core/json.mjs";
3
+ import { RUNTIME } from "../runtime/index.mjs";
4
+ async function newFormData() {
5
+ return new FormDataWrapper();
6
+ }
7
+ class FormDataWrapper {
8
+ fd = new FormData();
9
+ async setup() {
10
+ }
11
+ append(key, value) {
12
+ this.fd.append(key, String(value));
13
+ }
14
+ async appendFile(key, value) {
15
+ const { data, filename, contentType } = await toMultipartDataPart(value);
16
+ const blob = await convertToBlob(data, contentType);
17
+ if (filename) {
18
+ this.fd.append(key, blob, filename);
19
+ } else {
20
+ this.fd.append(key, blob);
21
+ }
22
+ }
23
+ getRequest() {
24
+ return {
25
+ body: this.fd,
26
+ headers: {},
27
+ duplex: "half"
28
+ };
29
+ }
30
+ }
31
+ function isStreamLike(value) {
32
+ return typeof value === "object" && value != null && ("read" in value || "pipe" in value);
33
+ }
34
+ function isReadableStream(value) {
35
+ return typeof value === "object" && value != null && "getReader" in value;
36
+ }
37
+ function isBuffer(value) {
38
+ return typeof Buffer !== "undefined" && Buffer.isBuffer && Buffer.isBuffer(value);
39
+ }
40
+ function isArrayBufferView(value) {
41
+ return ArrayBuffer.isView(value);
42
+ }
43
+ async function streamToBuffer(stream) {
44
+ if (RUNTIME.type === "node") {
45
+ const { Readable } = await import("stream");
46
+ if (stream instanceof Readable) {
47
+ const chunks = [];
48
+ for await (const chunk of stream) {
49
+ chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
50
+ }
51
+ return Buffer.concat(chunks);
52
+ }
53
+ }
54
+ if (isReadableStream(stream)) {
55
+ const reader = stream.getReader();
56
+ const chunks = [];
57
+ try {
58
+ while (true) {
59
+ const { done, value } = await reader.read();
60
+ if (done) break;
61
+ chunks.push(value);
62
+ }
63
+ } finally {
64
+ reader.releaseLock();
65
+ }
66
+ const totalLength = chunks.reduce((sum, chunk) => sum + chunk.length, 0);
67
+ const result = new Uint8Array(totalLength);
68
+ let offset = 0;
69
+ for (const chunk of chunks) {
70
+ result.set(chunk, offset);
71
+ offset += chunk.length;
72
+ }
73
+ return Buffer.from(result);
74
+ }
75
+ throw new Error(
76
+ `Unsupported stream type: ${typeof stream}. Expected Node.js Readable stream or Web ReadableStream.`
77
+ );
78
+ }
79
+ async function convertToBlob(value, contentType) {
80
+ if (isStreamLike(value) || isReadableStream(value)) {
81
+ const buffer = await streamToBuffer(value);
82
+ return new Blob([buffer], { type: contentType });
83
+ }
84
+ if (value instanceof Blob) {
85
+ return value;
86
+ }
87
+ if (isBuffer(value)) {
88
+ return new Blob([value], { type: contentType });
89
+ }
90
+ if (value instanceof ArrayBuffer) {
91
+ return new Blob([value], { type: contentType });
92
+ }
93
+ if (isArrayBufferView(value)) {
94
+ return new Blob([value], { type: contentType });
95
+ }
96
+ if (typeof value === "string") {
97
+ return new Blob([value], { type: contentType });
98
+ }
99
+ if (typeof value === "object" && value !== null) {
100
+ return new Blob([toJson(value)], { type: contentType ?? "application/json" });
101
+ }
102
+ return new Blob([String(value)], { type: contentType });
103
+ }
104
+ export {
105
+ FormDataWrapper,
106
+ newFormData
107
+ };
108
+ //# sourceMappingURL=FormDataWrapper.mjs.map
@@ -0,0 +1 @@
1
+ export declare function encodeAsFormParameter(value: unknown): Record<string, string>;
@@ -0,0 +1 @@
1
+ export declare function encodeAsFormParameter(value: unknown): Record<string, string>;