@fern-api/venus-api-sdk 0.22.4 → 0.22.34

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 (305) hide show
  1. package/README.md +270 -0
  2. package/dist/cjs/BaseClient.d.ts +17 -4
  3. package/dist/cjs/BaseClient.js +59 -0
  4. package/dist/cjs/Client.d.ts +19 -16
  5. package/dist/cjs/Client.js +15 -50
  6. package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +16 -17
  7. package/dist/cjs/api/resources/apiKeys/client/Client.js +41 -34
  8. package/dist/cjs/api/resources/apiKeys/client/create.js +1 -1
  9. package/dist/cjs/api/resources/apiKeys/client/getTokenMetadata.js +1 -1
  10. package/dist/cjs/api/resources/apiKeys/client/getTokensForOrganization.js +1 -1
  11. package/dist/cjs/api/resources/apiKeys/client/revokeToken.js +1 -1
  12. package/dist/cjs/api/resources/apiKeys/client/revokeTokenById.js +1 -1
  13. package/dist/cjs/api/resources/auth/client/Client.d.ts +69 -0
  14. package/dist/cjs/api/resources/auth/client/Client.js +295 -0
  15. package/dist/cjs/api/resources/auth/client/getAutopilotToken.d.ts +24 -0
  16. package/dist/cjs/api/resources/auth/client/getAutopilotToken.js +65 -0
  17. package/dist/cjs/api/resources/auth/client/getJwt.d.ts +24 -0
  18. package/dist/cjs/api/resources/auth/client/getJwt.js +65 -0
  19. package/dist/cjs/api/resources/auth/client/getOrgForGithubOwner.d.ts +19 -0
  20. package/dist/cjs/api/resources/auth/client/getOrgForGithubOwner.js +55 -0
  21. package/dist/cjs/api/resources/auth/client/index.d.ts +4 -0
  22. package/dist/cjs/api/resources/auth/client/index.js +43 -0
  23. package/dist/cjs/api/resources/auth/client/requests/GetAutopilotTokenRequest.d.ts +22 -0
  24. package/dist/cjs/api/resources/auth/client/requests/GetAutopilotTokenRequest.js +3 -0
  25. package/dist/cjs/api/resources/auth/client/requests/GetJwtRequest.d.ts +16 -0
  26. package/dist/cjs/api/resources/auth/client/requests/GetJwtRequest.js +3 -0
  27. package/dist/cjs/api/resources/auth/client/requests/index.d.ts +2 -0
  28. package/dist/cjs/api/resources/auth/client/requests/index.js +2 -0
  29. package/dist/cjs/api/resources/auth/index.d.ts +2 -0
  30. package/dist/cjs/api/resources/auth/index.js +18 -0
  31. package/dist/cjs/api/resources/auth/types/JwtResponse.d.ts +11 -0
  32. package/dist/cjs/api/resources/auth/types/JwtResponse.js +3 -0
  33. package/dist/cjs/api/resources/auth/types/index.d.ts +1 -0
  34. package/dist/cjs/api/resources/auth/types/index.js +17 -0
  35. package/dist/cjs/api/resources/index.d.ts +3 -0
  36. package/dist/cjs/api/resources/index.js +4 -1
  37. package/dist/cjs/api/resources/organization/client/Client.d.ts +37 -27
  38. package/dist/cjs/api/resources/organization/client/Client.js +152 -60
  39. package/dist/cjs/api/resources/organization/client/addUser.js +1 -1
  40. package/dist/cjs/api/resources/organization/client/create.js +1 -1
  41. package/dist/cjs/api/resources/organization/client/delete.js +1 -1
  42. package/dist/cjs/api/resources/organization/client/get.js +1 -1
  43. package/dist/cjs/api/resources/organization/client/getByPostmanTeamId.d.ts +24 -0
  44. package/dist/cjs/api/resources/organization/client/getByPostmanTeamId.js +65 -0
  45. package/dist/cjs/api/resources/organization/client/getMyOrganizationFromScopedToken.js +1 -1
  46. package/dist/cjs/api/resources/organization/client/getOrgIdsFromToken.js +1 -1
  47. package/dist/cjs/api/resources/organization/client/index.d.ts +1 -0
  48. package/dist/cjs/api/resources/organization/client/index.js +2 -1
  49. package/dist/cjs/api/resources/organization/client/inviteUser.js +1 -1
  50. package/dist/cjs/api/resources/organization/client/isMember.js +1 -1
  51. package/dist/cjs/api/resources/organization/client/removeUser.js +1 -1
  52. package/dist/cjs/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +8 -0
  53. package/dist/cjs/api/resources/organization/client/update.js +1 -1
  54. package/dist/cjs/api/resources/organization/types/Organization.d.ts +2 -0
  55. package/dist/cjs/api/resources/registry/client/Client.d.ts +12 -13
  56. package/dist/cjs/api/resources/registry/client/Client.js +28 -26
  57. package/dist/cjs/api/resources/registry/client/generateRegistryTokens.d.ts +6 -1
  58. package/dist/cjs/api/resources/registry/client/generateRegistryTokens.js +11 -1
  59. package/dist/cjs/api/resources/registry/client/hasRegistryPermission.js +1 -1
  60. package/dist/cjs/api/resources/registry/client/revokeToken.d.ts +6 -1
  61. package/dist/cjs/api/resources/registry/client/revokeToken.js +11 -1
  62. package/dist/cjs/api/resources/user/client/Client.d.ts +12 -13
  63. package/dist/cjs/api/resources/user/client/Client.js +27 -25
  64. package/dist/cjs/api/resources/user/client/getMyOrganizations.js +1 -1
  65. package/dist/cjs/api/resources/user/client/getMyself.js +1 -1
  66. package/dist/cjs/api/resources/user/client/linkAccounts.js +1 -1
  67. package/dist/cjs/auth/BearerAuthProvider.d.ts +20 -0
  68. package/dist/cjs/auth/BearerAuthProvider.js +76 -0
  69. package/dist/cjs/auth/index.d.ts +1 -0
  70. package/dist/cjs/auth/index.js +5 -0
  71. package/dist/cjs/core/auth/AuthProvider.d.ts +4 -1
  72. package/dist/cjs/core/auth/BearerToken.d.ts +3 -1
  73. package/dist/cjs/core/auth/BearerToken.js +7 -6
  74. package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
  75. package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
  76. package/dist/cjs/core/auth/index.d.ts +1 -0
  77. package/dist/cjs/core/auth/index.js +3 -1
  78. package/dist/cjs/core/exports.d.ts +1 -0
  79. package/dist/cjs/core/exports.js +17 -0
  80. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
  81. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
  82. package/dist/cjs/core/fetcher/Fetcher.d.ts +10 -4
  83. package/dist/cjs/core/fetcher/Fetcher.js +210 -10
  84. package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
  85. package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
  86. package/dist/cjs/core/fetcher/getResponseBody.js +18 -4
  87. package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
  88. package/dist/cjs/core/fetcher/makeRequest.js +0 -2
  89. package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
  90. package/dist/cjs/core/fetcher/signals.d.ts +1 -7
  91. package/dist/cjs/core/fetcher/signals.js +0 -12
  92. package/dist/cjs/core/headers.d.ts +2 -2
  93. package/dist/cjs/core/headers.js +6 -4
  94. package/dist/cjs/core/index.d.ts +1 -0
  95. package/dist/cjs/core/index.js +2 -1
  96. package/dist/cjs/core/logging/exports.d.ts +18 -0
  97. package/dist/cjs/core/logging/exports.js +45 -0
  98. package/dist/cjs/core/logging/index.d.ts +1 -0
  99. package/dist/cjs/core/logging/index.js +17 -0
  100. package/dist/cjs/core/logging/logger.d.ts +126 -0
  101. package/dist/cjs/core/logging/logger.js +144 -0
  102. package/dist/cjs/core/runtime/runtime.js +11 -10
  103. package/dist/cjs/core/schemas/Schema.d.ts +1 -0
  104. package/dist/cjs/core/schemas/Schema.js +1 -0
  105. package/dist/cjs/core/schemas/builders/object/object.js +34 -3
  106. package/dist/cjs/core/schemas/builders/primitives/index.d.ts +1 -0
  107. package/dist/cjs/core/schemas/builders/primitives/index.js +3 -1
  108. package/dist/cjs/core/schemas/builders/primitives/never.d.ts +2 -0
  109. package/dist/cjs/core/schemas/builders/primitives/never.js +14 -0
  110. package/dist/cjs/core/url/join.js +0 -1
  111. package/dist/cjs/exports.d.ts +1 -0
  112. package/dist/cjs/exports.js +17 -0
  113. package/dist/cjs/index.d.ts +1 -0
  114. package/dist/cjs/index.js +4 -0
  115. package/dist/cjs/serialization/resources/auth/client/getAutopilotToken.d.ts +10 -0
  116. package/dist/cjs/serialization/resources/auth/client/getAutopilotToken.js +66 -0
  117. package/dist/cjs/serialization/resources/auth/client/getJwt.d.ts +10 -0
  118. package/dist/cjs/serialization/resources/auth/client/getJwt.js +66 -0
  119. package/dist/cjs/serialization/resources/auth/client/getOrgForGithubOwner.d.ts +8 -0
  120. package/dist/cjs/serialization/resources/auth/client/getOrgForGithubOwner.js +6 -0
  121. package/dist/cjs/serialization/resources/auth/client/index.d.ts +4 -0
  122. package/dist/cjs/serialization/resources/auth/client/index.js +43 -0
  123. package/dist/cjs/serialization/resources/auth/client/requests/GetAutopilotTokenRequest.d.ts +11 -0
  124. package/dist/cjs/serialization/resources/auth/client/requests/GetAutopilotTokenRequest.js +43 -0
  125. package/dist/cjs/serialization/resources/auth/client/requests/GetJwtRequest.d.ts +10 -0
  126. package/dist/cjs/serialization/resources/auth/client/requests/GetJwtRequest.js +42 -0
  127. package/dist/cjs/serialization/resources/auth/client/requests/index.d.ts +2 -0
  128. package/dist/cjs/serialization/resources/auth/client/requests/index.js +7 -0
  129. package/dist/cjs/serialization/resources/auth/index.d.ts +2 -0
  130. package/dist/cjs/serialization/resources/auth/index.js +18 -0
  131. package/dist/cjs/serialization/resources/auth/types/JwtResponse.d.ts +10 -0
  132. package/dist/cjs/serialization/resources/auth/types/JwtResponse.js +42 -0
  133. package/dist/cjs/serialization/resources/auth/types/index.d.ts +1 -0
  134. package/dist/cjs/serialization/resources/auth/types/index.js +17 -0
  135. package/dist/cjs/serialization/resources/index.d.ts +3 -0
  136. package/dist/cjs/serialization/resources/index.js +4 -1
  137. package/dist/cjs/serialization/resources/organization/client/getByPostmanTeamId.d.ts +10 -0
  138. package/dist/cjs/serialization/resources/organization/client/getByPostmanTeamId.js +66 -0
  139. package/dist/cjs/serialization/resources/organization/client/index.d.ts +1 -0
  140. package/dist/cjs/serialization/resources/organization/client/index.js +2 -1
  141. package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +2 -0
  142. package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +2 -0
  143. package/dist/cjs/serialization/resources/organization/types/Organization.d.ts +1 -0
  144. package/dist/cjs/serialization/resources/organization/types/Organization.js +1 -0
  145. package/dist/cjs/serialization/resources/registry/client/generateRegistryTokens.d.ts +4 -1
  146. package/dist/cjs/serialization/resources/registry/client/generateRegistryTokens.js +3 -0
  147. package/dist/cjs/serialization/resources/registry/client/revokeToken.d.ts +4 -1
  148. package/dist/cjs/serialization/resources/registry/client/revokeToken.js +3 -0
  149. package/dist/cjs/version.d.ts +1 -1
  150. package/dist/cjs/version.js +1 -1
  151. package/dist/esm/BaseClient.d.mts +17 -4
  152. package/dist/esm/BaseClient.mjs +24 -1
  153. package/dist/esm/Client.d.mts +19 -16
  154. package/dist/esm/Client.mjs +16 -18
  155. package/dist/esm/api/resources/apiKeys/client/Client.d.mts +16 -17
  156. package/dist/esm/api/resources/apiKeys/client/Client.mjs +40 -33
  157. package/dist/esm/api/resources/apiKeys/client/create.mjs +1 -1
  158. package/dist/esm/api/resources/apiKeys/client/getTokenMetadata.mjs +1 -1
  159. package/dist/esm/api/resources/apiKeys/client/getTokensForOrganization.mjs +1 -1
  160. package/dist/esm/api/resources/apiKeys/client/revokeToken.mjs +1 -1
  161. package/dist/esm/api/resources/apiKeys/client/revokeTokenById.mjs +1 -1
  162. package/dist/esm/api/resources/auth/client/Client.d.mts +69 -0
  163. package/dist/esm/api/resources/auth/client/Client.mjs +258 -0
  164. package/dist/esm/api/resources/auth/client/getAutopilotToken.d.mts +24 -0
  165. package/dist/esm/api/resources/auth/client/getAutopilotToken.mjs +29 -0
  166. package/dist/esm/api/resources/auth/client/getJwt.d.mts +24 -0
  167. package/dist/esm/api/resources/auth/client/getJwt.mjs +29 -0
  168. package/dist/esm/api/resources/auth/client/getOrgForGithubOwner.d.mts +19 -0
  169. package/dist/esm/api/resources/auth/client/getOrgForGithubOwner.mjs +19 -0
  170. package/dist/esm/api/resources/auth/client/index.d.mts +4 -0
  171. package/dist/esm/api/resources/auth/client/index.mjs +4 -0
  172. package/dist/esm/api/resources/auth/client/requests/GetAutopilotTokenRequest.d.mts +22 -0
  173. package/dist/esm/api/resources/auth/client/requests/GetAutopilotTokenRequest.mjs +2 -0
  174. package/dist/esm/api/resources/auth/client/requests/GetJwtRequest.d.mts +16 -0
  175. package/dist/esm/api/resources/auth/client/requests/GetJwtRequest.mjs +2 -0
  176. package/dist/esm/api/resources/auth/client/requests/index.d.mts +2 -0
  177. package/dist/esm/api/resources/auth/client/requests/index.mjs +1 -0
  178. package/dist/esm/api/resources/auth/index.d.mts +2 -0
  179. package/dist/esm/api/resources/auth/index.mjs +2 -0
  180. package/dist/esm/api/resources/auth/types/JwtResponse.d.mts +11 -0
  181. package/dist/esm/api/resources/auth/types/JwtResponse.mjs +2 -0
  182. package/dist/esm/api/resources/auth/types/index.d.mts +1 -0
  183. package/dist/esm/api/resources/auth/types/index.mjs +1 -0
  184. package/dist/esm/api/resources/index.d.mts +3 -0
  185. package/dist/esm/api/resources/index.mjs +3 -0
  186. package/dist/esm/api/resources/organization/client/Client.d.mts +37 -27
  187. package/dist/esm/api/resources/organization/client/Client.mjs +151 -59
  188. package/dist/esm/api/resources/organization/client/addUser.mjs +1 -1
  189. package/dist/esm/api/resources/organization/client/create.mjs +1 -1
  190. package/dist/esm/api/resources/organization/client/delete.mjs +1 -1
  191. package/dist/esm/api/resources/organization/client/get.mjs +1 -1
  192. package/dist/esm/api/resources/organization/client/getByPostmanTeamId.d.mts +24 -0
  193. package/dist/esm/api/resources/organization/client/getByPostmanTeamId.mjs +29 -0
  194. package/dist/esm/api/resources/organization/client/getMyOrganizationFromScopedToken.mjs +1 -1
  195. package/dist/esm/api/resources/organization/client/getOrgIdsFromToken.mjs +1 -1
  196. package/dist/esm/api/resources/organization/client/index.d.mts +1 -0
  197. package/dist/esm/api/resources/organization/client/index.mjs +1 -0
  198. package/dist/esm/api/resources/organization/client/inviteUser.mjs +1 -1
  199. package/dist/esm/api/resources/organization/client/isMember.mjs +1 -1
  200. package/dist/esm/api/resources/organization/client/removeUser.mjs +1 -1
  201. package/dist/esm/api/resources/organization/client/requests/CreateOrganizationRequest.d.mts +8 -0
  202. package/dist/esm/api/resources/organization/client/update.mjs +1 -1
  203. package/dist/esm/api/resources/organization/types/Organization.d.mts +2 -0
  204. package/dist/esm/api/resources/registry/client/Client.d.mts +12 -13
  205. package/dist/esm/api/resources/registry/client/Client.mjs +27 -25
  206. package/dist/esm/api/resources/registry/client/generateRegistryTokens.d.mts +6 -1
  207. package/dist/esm/api/resources/registry/client/generateRegistryTokens.mjs +11 -1
  208. package/dist/esm/api/resources/registry/client/hasRegistryPermission.mjs +1 -1
  209. package/dist/esm/api/resources/registry/client/revokeToken.d.mts +6 -1
  210. package/dist/esm/api/resources/registry/client/revokeToken.mjs +11 -1
  211. package/dist/esm/api/resources/user/client/Client.d.mts +12 -13
  212. package/dist/esm/api/resources/user/client/Client.mjs +26 -24
  213. package/dist/esm/api/resources/user/client/getMyOrganizations.mjs +1 -1
  214. package/dist/esm/api/resources/user/client/getMyself.mjs +1 -1
  215. package/dist/esm/api/resources/user/client/linkAccounts.mjs +1 -1
  216. package/dist/esm/auth/BearerAuthProvider.d.mts +20 -0
  217. package/dist/esm/auth/BearerAuthProvider.mjs +39 -0
  218. package/dist/esm/auth/index.d.mts +1 -0
  219. package/dist/esm/auth/index.mjs +1 -0
  220. package/dist/esm/core/auth/AuthProvider.d.mts +4 -1
  221. package/dist/esm/core/auth/BearerToken.d.mts +3 -1
  222. package/dist/esm/core/auth/BearerToken.mjs +7 -6
  223. package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
  224. package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
  225. package/dist/esm/core/auth/index.d.mts +1 -0
  226. package/dist/esm/core/auth/index.mjs +1 -0
  227. package/dist/esm/core/exports.d.mts +1 -0
  228. package/dist/esm/core/exports.mjs +1 -0
  229. package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
  230. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
  231. package/dist/esm/core/fetcher/Fetcher.d.mts +10 -4
  232. package/dist/esm/core/fetcher/Fetcher.mjs +210 -10
  233. package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
  234. package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
  235. package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
  236. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
  237. package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
  238. package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
  239. package/dist/esm/core/fetcher/signals.d.mts +1 -7
  240. package/dist/esm/core/fetcher/signals.mjs +0 -12
  241. package/dist/esm/core/headers.d.mts +2 -2
  242. package/dist/esm/core/headers.mjs +6 -4
  243. package/dist/esm/core/index.d.mts +1 -0
  244. package/dist/esm/core/index.mjs +1 -0
  245. package/dist/esm/core/logging/exports.d.mts +18 -0
  246. package/dist/esm/core/logging/exports.mjs +9 -0
  247. package/dist/esm/core/logging/index.d.mts +1 -0
  248. package/dist/esm/core/logging/index.mjs +1 -0
  249. package/dist/esm/core/logging/logger.d.mts +126 -0
  250. package/dist/esm/core/logging/logger.mjs +138 -0
  251. package/dist/esm/core/runtime/runtime.mjs +11 -10
  252. package/dist/esm/core/schemas/Schema.d.mts +1 -0
  253. package/dist/esm/core/schemas/Schema.mjs +1 -0
  254. package/dist/esm/core/schemas/builders/object/object.mjs +34 -3
  255. package/dist/esm/core/schemas/builders/primitives/index.d.mts +1 -0
  256. package/dist/esm/core/schemas/builders/primitives/index.mjs +1 -0
  257. package/dist/esm/core/schemas/builders/primitives/never.d.mts +2 -0
  258. package/dist/esm/core/schemas/builders/primitives/never.mjs +11 -0
  259. package/dist/esm/core/url/join.mjs +0 -1
  260. package/dist/esm/exports.d.mts +1 -0
  261. package/dist/esm/exports.mjs +1 -0
  262. package/dist/esm/index.d.mts +1 -0
  263. package/dist/esm/index.mjs +1 -0
  264. package/dist/esm/serialization/resources/auth/client/getAutopilotToken.d.mts +10 -0
  265. package/dist/esm/serialization/resources/auth/client/getAutopilotToken.mjs +30 -0
  266. package/dist/esm/serialization/resources/auth/client/getJwt.d.mts +10 -0
  267. package/dist/esm/serialization/resources/auth/client/getJwt.mjs +30 -0
  268. package/dist/esm/serialization/resources/auth/client/getOrgForGithubOwner.d.mts +8 -0
  269. package/dist/esm/serialization/resources/auth/client/getOrgForGithubOwner.mjs +3 -0
  270. package/dist/esm/serialization/resources/auth/client/index.d.mts +4 -0
  271. package/dist/esm/serialization/resources/auth/client/index.mjs +4 -0
  272. package/dist/esm/serialization/resources/auth/client/requests/GetAutopilotTokenRequest.d.mts +11 -0
  273. package/dist/esm/serialization/resources/auth/client/requests/GetAutopilotTokenRequest.mjs +7 -0
  274. package/dist/esm/serialization/resources/auth/client/requests/GetJwtRequest.d.mts +10 -0
  275. package/dist/esm/serialization/resources/auth/client/requests/GetJwtRequest.mjs +6 -0
  276. package/dist/esm/serialization/resources/auth/client/requests/index.d.mts +2 -0
  277. package/dist/esm/serialization/resources/auth/client/requests/index.mjs +2 -0
  278. package/dist/esm/serialization/resources/auth/index.d.mts +2 -0
  279. package/dist/esm/serialization/resources/auth/index.mjs +2 -0
  280. package/dist/esm/serialization/resources/auth/types/JwtResponse.d.mts +10 -0
  281. package/dist/esm/serialization/resources/auth/types/JwtResponse.mjs +6 -0
  282. package/dist/esm/serialization/resources/auth/types/index.d.mts +1 -0
  283. package/dist/esm/serialization/resources/auth/types/index.mjs +1 -0
  284. package/dist/esm/serialization/resources/index.d.mts +3 -0
  285. package/dist/esm/serialization/resources/index.mjs +3 -0
  286. package/dist/esm/serialization/resources/organization/client/getByPostmanTeamId.d.mts +10 -0
  287. package/dist/esm/serialization/resources/organization/client/getByPostmanTeamId.mjs +30 -0
  288. package/dist/esm/serialization/resources/organization/client/index.d.mts +1 -0
  289. package/dist/esm/serialization/resources/organization/client/index.mjs +1 -0
  290. package/dist/esm/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.mts +2 -0
  291. package/dist/esm/serialization/resources/organization/client/requests/CreateOrganizationRequest.mjs +2 -0
  292. package/dist/esm/serialization/resources/organization/types/Organization.d.mts +1 -0
  293. package/dist/esm/serialization/resources/organization/types/Organization.mjs +1 -0
  294. package/dist/esm/serialization/resources/registry/client/generateRegistryTokens.d.mts +4 -1
  295. package/dist/esm/serialization/resources/registry/client/generateRegistryTokens.mjs +3 -0
  296. package/dist/esm/serialization/resources/registry/client/revokeToken.d.mts +4 -1
  297. package/dist/esm/serialization/resources/registry/client/revokeToken.mjs +3 -0
  298. package/dist/esm/version.d.mts +1 -1
  299. package/dist/esm/version.mjs +1 -1
  300. package/package.json +8 -3
  301. package/reference.md +1369 -0
  302. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
  303. package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
  304. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
  305. package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
package/README.md ADDED
@@ -0,0 +1,270 @@
1
+ # Fern TypeScript Library
2
+
3
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Ffern-api%2Fvenus-node)
4
+ [![npm shield](https://img.shields.io/npm/v/@fern-api/venus-api-sdk)](https://www.npmjs.com/package/@fern-api/venus-api-sdk)
5
+
6
+ The Fern TypeScript library provides convenient access to the Fern APIs from TypeScript.
7
+
8
+ ## Table of Contents
9
+
10
+ - [Installation](#installation)
11
+ - [Reference](#reference)
12
+ - [Usage](#usage)
13
+ - [Request and Response Types](#request-and-response-types)
14
+ - [Exception Handling](#exception-handling)
15
+ - [Advanced](#advanced)
16
+ - [Additional Headers](#additional-headers)
17
+ - [Additional Query String Parameters](#additional-query-string-parameters)
18
+ - [Retries](#retries)
19
+ - [Timeouts](#timeouts)
20
+ - [Aborting Requests](#aborting-requests)
21
+ - [Access Raw Response Data](#access-raw-response-data)
22
+ - [Logging](#logging)
23
+ - [Runtime Compatibility](#runtime-compatibility)
24
+ - [Contributing](#contributing)
25
+
26
+ ## Installation
27
+
28
+ ```sh
29
+ npm i -s @fern-api/venus-api-sdk
30
+ ```
31
+
32
+ ## Reference
33
+
34
+ A full reference for this library is available [here](https://github.com/fern-api/venus-node/blob/HEAD/./reference.md).
35
+
36
+ ## Usage
37
+
38
+ Instantiate and use the client with the following:
39
+
40
+ ```typescript
41
+ import { FernVenusApiClient } from "@fern-api/venus-api-sdk";
42
+
43
+ const client = new FernVenusApiClient({ token: "YOUR_TOKEN" });
44
+ await client.apiKeys.create({
45
+ organizationId: "missing-org-id"
46
+ });
47
+ ```
48
+
49
+ ## Request and Response Types
50
+
51
+ The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
52
+ following namespace:
53
+
54
+ ```typescript
55
+ import { FernVenusApi } from "@fern-api/venus-api-sdk";
56
+
57
+ const request: FernVenusApi.CreateApiKeyRequest = {
58
+ ...
59
+ };
60
+ ```
61
+
62
+ ## Exception Handling
63
+
64
+ When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
65
+ will be thrown.
66
+
67
+ ```typescript
68
+ import { FernVenusApiError } from "@fern-api/venus-api-sdk";
69
+
70
+ try {
71
+ await client.apiKeys.create(...);
72
+ } catch (err) {
73
+ if (err instanceof FernVenusApiError) {
74
+ console.log(err.statusCode);
75
+ console.log(err.message);
76
+ console.log(err.body);
77
+ console.log(err.rawResponse);
78
+ }
79
+ }
80
+ ```
81
+
82
+ ## Advanced
83
+
84
+ ### Additional Headers
85
+
86
+ If you would like to send additional headers as part of the request, use the `headers` request option.
87
+
88
+ ```typescript
89
+ import { FernVenusApiClient } from "@fern-api/venus-api-sdk";
90
+
91
+ const client = new FernVenusApiClient({
92
+ ...
93
+ headers: {
94
+ 'X-Custom-Header': 'custom value'
95
+ }
96
+ });
97
+
98
+ const response = await client.apiKeys.create(..., {
99
+ headers: {
100
+ 'X-Custom-Header': 'custom value'
101
+ }
102
+ });
103
+ ```
104
+
105
+ ### Additional Query String Parameters
106
+
107
+ If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
108
+
109
+ ```typescript
110
+ const response = await client.apiKeys.create(..., {
111
+ queryParams: {
112
+ 'customQueryParamKey': 'custom query param value'
113
+ }
114
+ });
115
+ ```
116
+
117
+ ### Retries
118
+
119
+ The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
120
+ as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
121
+ retry limit (default: 2).
122
+
123
+ A request is deemed retryable when any of the following HTTP status codes is returned:
124
+
125
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
126
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
127
+ - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
128
+
129
+ Use the `maxRetries` request option to configure this behavior.
130
+
131
+ ```typescript
132
+ const response = await client.apiKeys.create(..., {
133
+ maxRetries: 0 // override maxRetries at the request level
134
+ });
135
+ ```
136
+
137
+ ### Timeouts
138
+
139
+ The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
140
+
141
+ ```typescript
142
+ const response = await client.apiKeys.create(..., {
143
+ timeoutInSeconds: 30 // override timeout to 30s
144
+ });
145
+ ```
146
+
147
+ ### Aborting Requests
148
+
149
+ The SDK allows users to abort requests at any point by passing in an abort signal.
150
+
151
+ ```typescript
152
+ const controller = new AbortController();
153
+ const response = await client.apiKeys.create(..., {
154
+ abortSignal: controller.signal
155
+ });
156
+ controller.abort(); // aborts the request
157
+ ```
158
+
159
+ ### Access Raw Response Data
160
+
161
+ The SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.
162
+ The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
163
+
164
+ ```typescript
165
+ const { data, rawResponse } = await client.apiKeys.create(...).withRawResponse();
166
+
167
+ console.log(data);
168
+ console.log(rawResponse.headers['X-My-Header']);
169
+ ```
170
+
171
+ ### Logging
172
+
173
+ The SDK supports logging. You can configure the logger by passing in a `logging` object to the client options.
174
+
175
+ ```typescript
176
+ import { FernVenusApiClient, logging } from "@fern-api/venus-api-sdk";
177
+
178
+ const client = new FernVenusApiClient({
179
+ ...
180
+ logging: {
181
+ level: logging.LogLevel.Debug, // defaults to logging.LogLevel.Info
182
+ logger: new logging.ConsoleLogger(), // defaults to ConsoleLogger
183
+ silent: false, // defaults to true, set to false to enable logging
184
+ }
185
+ });
186
+ ```
187
+ The `logging` object can have the following properties:
188
+ - `level`: The log level to use. Defaults to `logging.LogLevel.Info`.
189
+ - `logger`: The logger to use. Defaults to a `logging.ConsoleLogger`.
190
+ - `silent`: Whether to silence the logger. Defaults to `true`.
191
+
192
+ The `level` property can be one of the following values:
193
+ - `logging.LogLevel.Debug`
194
+ - `logging.LogLevel.Info`
195
+ - `logging.LogLevel.Warn`
196
+ - `logging.LogLevel.Error`
197
+
198
+ To provide a custom logger, you can pass in an object that implements the `logging.ILogger` interface.
199
+
200
+ <details>
201
+ <summary>Custom logger examples</summary>
202
+
203
+ Here's an example using the popular `winston` logging library.
204
+ ```ts
205
+ import winston from 'winston';
206
+
207
+ const winstonLogger = winston.createLogger({...});
208
+
209
+ const logger: logging.ILogger = {
210
+ debug: (msg, ...args) => winstonLogger.debug(msg, ...args),
211
+ info: (msg, ...args) => winstonLogger.info(msg, ...args),
212
+ warn: (msg, ...args) => winstonLogger.warn(msg, ...args),
213
+ error: (msg, ...args) => winstonLogger.error(msg, ...args),
214
+ };
215
+ ```
216
+
217
+ Here's an example using the popular `pino` logging library.
218
+
219
+ ```ts
220
+ import pino from 'pino';
221
+
222
+ const pinoLogger = pino({...});
223
+
224
+ const logger: logging.ILogger = {
225
+ debug: (msg, ...args) => pinoLogger.debug(args, msg),
226
+ info: (msg, ...args) => pinoLogger.info(args, msg),
227
+ warn: (msg, ...args) => pinoLogger.warn(args, msg),
228
+ error: (msg, ...args) => pinoLogger.error(args, msg),
229
+ };
230
+ ```
231
+ </details>
232
+
233
+
234
+ ### Runtime Compatibility
235
+
236
+
237
+ The SDK works in the following runtimes:
238
+
239
+
240
+
241
+ - Node.js 18+
242
+ - Vercel
243
+ - Cloudflare Workers
244
+ - Deno v1.25+
245
+ - Bun 1.0+
246
+ - React Native
247
+
248
+ ### Customizing Fetch Client
249
+
250
+ The SDK provides a way for you to customize the underlying HTTP client / Fetch function. If you're running in an
251
+ unsupported environment, this provides a way for you to break glass and ensure the SDK works.
252
+
253
+ ```typescript
254
+ import { FernVenusApiClient } from "@fern-api/venus-api-sdk";
255
+
256
+ const client = new FernVenusApiClient({
257
+ ...
258
+ fetcher: // provide your implementation here
259
+ });
260
+ ```
261
+
262
+ ## Contributing
263
+
264
+ While we value open-source contributions to this SDK, this library is generated programmatically.
265
+ Additions made directly to this library would have to be moved over to our generation code,
266
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
267
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
268
+ an issue first to discuss with us!
269
+
270
+ On the other hand, contributions to the README are always very welcome!
@@ -1,17 +1,21 @@
1
- import type * as core from "./core/index.js";
1
+ import { BearerAuthProvider } from "./auth/BearerAuthProvider.js";
2
+ import * as core from "./core/index.js";
2
3
  import type * as environments from "./environments.js";
3
- export interface BaseClientOptions {
4
+ export type BaseClientOptions = {
4
5
  environment?: core.Supplier<environments.FernVenusApiEnvironment | string>;
5
6
  /** Specify a custom URL to connect the client to. */
6
7
  baseUrl?: core.Supplier<string>;
7
- token?: core.Supplier<core.BearerToken | undefined>;
8
8
  /** Additional headers to include in requests. */
9
9
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
10
10
  /** The default maximum time to wait for a response in seconds. */
11
11
  timeoutInSeconds?: number;
12
12
  /** The default number of times to retry the request. Defaults to 2. */
13
13
  maxRetries?: number;
14
- }
14
+ /** Provide a custom fetch implementation. Useful for platforms that don't have a built-in fetch or need a custom implementation. */
15
+ fetch?: typeof fetch;
16
+ /** Configure logging for the client. */
17
+ logging?: core.logging.LogConfig | core.logging.Logger;
18
+ } & BearerAuthProvider.AuthOptions;
15
19
  export interface BaseRequestOptions {
16
20
  /** The maximum time to wait for a response in seconds. */
17
21
  timeoutInSeconds?: number;
@@ -24,3 +28,12 @@ export interface BaseRequestOptions {
24
28
  /** Additional headers to include in the request. */
25
29
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
26
30
  }
31
+ export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
32
+ logging: core.logging.Logger;
33
+ authProvider?: core.AuthProvider;
34
+ };
35
+ export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions> = NormalizedClientOptions<T> & {
36
+ authProvider: core.AuthProvider;
37
+ };
38
+ export declare function normalizeClientOptions<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptions<T>;
39
+ export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
@@ -1,3 +1,62 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
3
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.normalizeClientOptions = normalizeClientOptions;
38
+ exports.normalizeClientOptionsWithAuth = normalizeClientOptionsWithAuth;
39
+ const BearerAuthProvider_js_1 = require("./auth/BearerAuthProvider.js");
40
+ const headers_js_1 = require("./core/headers.js");
41
+ const core = __importStar(require("./core/index.js"));
42
+ function normalizeClientOptions(options) {
43
+ const headers = (0, headers_js_1.mergeHeaders)({
44
+ "X-Fern-Language": "JavaScript",
45
+ "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
46
+ "X-Fern-SDK-Version": "0.22.34-6-gfbf1677",
47
+ "User-Agent": "@fern-api/venus-api-sdk/0.22.34-6-gfbf1677",
48
+ "X-Fern-Runtime": core.RUNTIME.type,
49
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
50
+ }, options === null || options === void 0 ? void 0 : options.headers);
51
+ return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
52
+ }
53
+ function normalizeClientOptionsWithAuth(options) {
54
+ var _a;
55
+ const normalized = normalizeClientOptions(options);
56
+ const normalizedWithNoOpAuthProvider = withNoOpAuthProvider(normalized);
57
+ (_a = normalized.authProvider) !== null && _a !== void 0 ? _a : (normalized.authProvider = new BearerAuthProvider_js_1.BearerAuthProvider(normalizedWithNoOpAuthProvider));
58
+ return normalized;
59
+ }
60
+ function withNoOpAuthProvider(options) {
61
+ return Object.assign(Object.assign({}, options), { authProvider: new core.NoOpAuthProvider() });
62
+ }
@@ -1,23 +1,26 @@
1
- import { ApiKeys } from "./api/resources/apiKeys/client/Client.js";
2
- import { Organization } from "./api/resources/organization/client/Client.js";
3
- import { Registry } from "./api/resources/registry/client/Client.js";
4
- import { User } from "./api/resources/user/client/Client.js";
1
+ import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.js";
2
+ import { AuthClient } from "./api/resources/auth/client/Client.js";
3
+ import { OrganizationClient } from "./api/resources/organization/client/Client.js";
4
+ import { RegistryClient } from "./api/resources/registry/client/Client.js";
5
+ import { UserClient } from "./api/resources/user/client/Client.js";
5
6
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
7
+ import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
6
8
  export declare namespace FernVenusApiClient {
7
- interface Options extends BaseClientOptions {
8
- }
9
+ type Options = BaseClientOptions;
9
10
  interface RequestOptions extends BaseRequestOptions {
10
11
  }
11
12
  }
12
13
  export declare class FernVenusApiClient {
13
- protected readonly _options: FernVenusApiClient.Options;
14
- protected _apiKeys: ApiKeys | undefined;
15
- protected _organization: Organization | undefined;
16
- protected _registry: Registry | undefined;
17
- protected _user: User | undefined;
18
- constructor(_options?: FernVenusApiClient.Options);
19
- get apiKeys(): ApiKeys;
20
- get organization(): Organization;
21
- get registry(): Registry;
22
- get user(): User;
14
+ protected readonly _options: NormalizedClientOptionsWithAuth<FernVenusApiClient.Options>;
15
+ protected _apiKeys: ApiKeysClient | undefined;
16
+ protected _auth: AuthClient | undefined;
17
+ protected _organization: OrganizationClient | undefined;
18
+ protected _registry: RegistryClient | undefined;
19
+ protected _user: UserClient | undefined;
20
+ constructor(options?: FernVenusApiClient.Options);
21
+ get apiKeys(): ApiKeysClient;
22
+ get auth(): AuthClient;
23
+ get organization(): OrganizationClient;
24
+ get registry(): RegistryClient;
25
+ get user(): UserClient;
23
26
  }
@@ -1,71 +1,36 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
3
  Object.defineProperty(exports, "__esModule", { value: true });
37
4
  exports.FernVenusApiClient = void 0;
38
5
  const Client_js_1 = require("./api/resources/apiKeys/client/Client.js");
39
- const Client_js_2 = require("./api/resources/organization/client/Client.js");
40
- const Client_js_3 = require("./api/resources/registry/client/Client.js");
41
- const Client_js_4 = require("./api/resources/user/client/Client.js");
42
- const headers_js_1 = require("./core/headers.js");
43
- const core = __importStar(require("./core/index.js"));
6
+ const Client_js_2 = require("./api/resources/auth/client/Client.js");
7
+ const Client_js_3 = require("./api/resources/organization/client/Client.js");
8
+ const Client_js_4 = require("./api/resources/registry/client/Client.js");
9
+ const Client_js_5 = require("./api/resources/user/client/Client.js");
10
+ const BaseClient_js_1 = require("./BaseClient.js");
44
11
  class FernVenusApiClient {
45
- constructor(_options = {}) {
46
- this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
47
- "X-Fern-Language": "JavaScript",
48
- "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
49
- "X-Fern-SDK-Version": "0.22.4",
50
- "X-Fern-Runtime": core.RUNTIME.type,
51
- "X-Fern-Runtime-Version": core.RUNTIME.version,
52
- }, _options === null || _options === void 0 ? void 0 : _options.headers) });
12
+ constructor(options = {}) {
13
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
53
14
  }
54
15
  get apiKeys() {
55
16
  var _a;
56
- return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new Client_js_1.ApiKeys(this._options)));
17
+ return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new Client_js_1.ApiKeysClient(this._options)));
18
+ }
19
+ get auth() {
20
+ var _a;
21
+ return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_2.AuthClient(this._options)));
57
22
  }
58
23
  get organization() {
59
24
  var _a;
60
- return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new Client_js_2.Organization(this._options)));
25
+ return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new Client_js_3.OrganizationClient(this._options)));
61
26
  }
62
27
  get registry() {
63
28
  var _a;
64
- return ((_a = this._registry) !== null && _a !== void 0 ? _a : (this._registry = new Client_js_3.Registry(this._options)));
29
+ return ((_a = this._registry) !== null && _a !== void 0 ? _a : (this._registry = new Client_js_4.RegistryClient(this._options)));
65
30
  }
66
31
  get user() {
67
32
  var _a;
68
- return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new Client_js_4.User(this._options)));
33
+ return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new Client_js_5.UserClient(this._options)));
69
34
  }
70
35
  }
71
36
  exports.FernVenusApiClient = FernVenusApiClient;
@@ -1,18 +1,18 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
2
3
  import * as core from "../../../../core/index.js";
3
4
  import * as FernVenusApi from "../../../index.js";
4
- export declare namespace ApiKeys {
5
- interface Options extends BaseClientOptions {
6
- }
5
+ export declare namespace ApiKeysClient {
6
+ type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
9
  }
10
- export declare class ApiKeys {
11
- protected readonly _options: ApiKeys.Options;
12
- constructor(_options?: ApiKeys.Options);
10
+ export declare class ApiKeysClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<ApiKeysClient.Options>;
12
+ constructor(options?: ApiKeysClient.Options);
13
13
  /**
14
14
  * @param {FernVenusApi.CreateApiKeyRequest} request
15
- * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
15
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
16
16
  *
17
17
  * @example
18
18
  * await client.apiKeys.create({
@@ -24,11 +24,11 @@ export declare class ApiKeys {
24
24
  * organizationId: "missing-org-id"
25
25
  * })
26
26
  */
27
- create(request: FernVenusApi.CreateApiKeyRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.CreateTokenResponse, FernVenusApi.apiKeys.create.Error>>;
27
+ create(request: FernVenusApi.CreateApiKeyRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.CreateTokenResponse, FernVenusApi.apiKeys.create.Error>>;
28
28
  private __create;
29
29
  /**
30
30
  * @param {FernVenusApi.GetTokenMetadataRequest} request
31
- * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
31
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
32
32
  *
33
33
  * @example
34
34
  * await client.apiKeys.getTokenMetadata({
@@ -40,11 +40,11 @@ export declare class ApiKeys {
40
40
  * token: "missing-token-value"
41
41
  * })
42
42
  */
43
- getTokenMetadata(request: FernVenusApi.GetTokenMetadataRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TokenMetadata, FernVenusApi.apiKeys.getTokenMetadata.Error>>;
43
+ getTokenMetadata(request: FernVenusApi.GetTokenMetadataRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TokenMetadata, FernVenusApi.apiKeys.getTokenMetadata.Error>>;
44
44
  private __getTokenMetadata;
45
45
  /**
46
46
  * @param {FernVenusApi.OrganizationId} organizationId
47
- * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
47
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
48
48
  *
49
49
  * @example
50
50
  * await client.apiKeys.getTokensForOrganization("some-org-id")
@@ -52,11 +52,11 @@ export declare class ApiKeys {
52
52
  * @example
53
53
  * await client.apiKeys.getTokensForOrganization("missing-org-id")
54
54
  */
55
- getTokensForOrganization(organizationId: FernVenusApi.OrganizationId, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TokenMetadata[], FernVenusApi.apiKeys.getTokensForOrganization.Error>>;
55
+ getTokensForOrganization(organizationId: FernVenusApi.OrganizationId, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TokenMetadata[], FernVenusApi.apiKeys.getTokensForOrganization.Error>>;
56
56
  private __getTokensForOrganization;
57
57
  /**
58
58
  * @param {FernVenusApi.TokenId} tokenId
59
- * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
59
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
60
60
  *
61
61
  * @example
62
62
  * await client.apiKeys.revokeTokenById("some-token-id")
@@ -64,11 +64,11 @@ export declare class ApiKeys {
64
64
  * @example
65
65
  * await client.apiKeys.revokeTokenById("missing-token-id")
66
66
  */
67
- revokeTokenById(tokenId: FernVenusApi.TokenId, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.apiKeys.revokeTokenById.Error>>;
67
+ revokeTokenById(tokenId: FernVenusApi.TokenId, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.apiKeys.revokeTokenById.Error>>;
68
68
  private __revokeTokenById;
69
69
  /**
70
70
  * @param {FernVenusApi.RevokeApiKeyRequest} request
71
- * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
71
+ * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
72
72
  *
73
73
  * @example
74
74
  * await client.apiKeys.revokeToken({
@@ -80,7 +80,6 @@ export declare class ApiKeys {
80
80
  * token: "missing-token-value"
81
81
  * })
82
82
  */
83
- revokeToken(request: FernVenusApi.RevokeApiKeyRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.apiKeys.revokeToken.Error>>;
83
+ revokeToken(request: FernVenusApi.RevokeApiKeyRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.apiKeys.revokeToken.Error>>;
84
84
  private __revokeToken;
85
- protected _getAuthorizationHeader(): Promise<string | undefined>;
86
85
  }