@fern-api/venus-api-sdk 0.22.4-3-g76792b3 → 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
@@ -43,19 +43,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
43
43
  });
44
44
  };
45
45
  Object.defineProperty(exports, "__esModule", { value: true });
46
- exports.Organization = void 0;
46
+ exports.OrganizationClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
47
48
  const headers_js_1 = require("../../../../core/headers.js");
48
49
  const core = __importStar(require("../../../../core/index.js"));
49
50
  const environments = __importStar(require("../../../../environments.js"));
50
51
  const serializers = __importStar(require("../../../../serialization/index.js"));
51
52
  const FernVenusApi = __importStar(require("../../../index.js"));
52
- class Organization {
53
- constructor(_options = {}) {
54
- this._options = _options;
53
+ class OrganizationClient {
54
+ constructor(options = {}) {
55
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
55
56
  }
56
57
  /**
57
58
  * @param {FernVenusApi.CreateOrganizationRequest} request
58
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
59
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
59
60
  *
60
61
  * @example
61
62
  * await client.organization.create({
@@ -67,8 +68,9 @@ class Organization {
67
68
  }
68
69
  __create(request, requestOptions) {
69
70
  return __awaiter(this, void 0, void 0, function* () {
70
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
71
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
71
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
72
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
73
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
72
74
  const _response = yield core.fetcher({
73
75
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/create"),
74
76
  method: "POST",
@@ -83,6 +85,8 @@ class Organization {
83
85
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
84
86
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
85
87
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
88
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
89
+ logging: this._options.logging,
86
90
  });
87
91
  if (_response.ok) {
88
92
  return {
@@ -102,7 +106,7 @@ class Organization {
102
106
  };
103
107
  }
104
108
  if (_response.error.reason === "status-code") {
105
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
109
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
106
110
  case "UnauthorizedError":
107
111
  case "OrganizationAlreadyExistsError":
108
112
  return {
@@ -134,7 +138,7 @@ class Organization {
134
138
  /**
135
139
  * @param {FernVenusApi.OrganizationId} orgId
136
140
  * @param {FernVenusApi.UpdateOrganizationRequest} request
137
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
141
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
138
142
  *
139
143
  * @example
140
144
  * await client.organization.update("orgId")
@@ -144,8 +148,9 @@ class Organization {
144
148
  }
145
149
  __update(orgId_1) {
146
150
  return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
147
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
148
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
151
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
152
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
153
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
149
154
  const _response = yield core.fetcher({
150
155
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, `/organizations/${core.url.encodePathParam(serializers.OrganizationId.jsonOrThrow(orgId, { omitUndefined: true }))}/update`),
151
156
  method: "POST",
@@ -160,6 +165,8 @@ class Organization {
160
165
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
161
166
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
162
167
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
168
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
169
+ logging: this._options.logging,
163
170
  });
164
171
  if (_response.ok) {
165
172
  return {
@@ -173,7 +180,7 @@ class Organization {
173
180
  };
174
181
  }
175
182
  if (_response.error.reason === "status-code") {
176
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
183
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
177
184
  case "UnauthorizedError":
178
185
  return {
179
186
  data: {
@@ -204,7 +211,7 @@ class Organization {
204
211
  /**
205
212
  * @param {FernVenusApi.OrganizationId} orgId
206
213
  * @param {FernVenusApi.GetOrganizationRequest} request
207
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
214
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
208
215
  *
209
216
  * @example
210
217
  * await client.organization.get("orgId")
@@ -214,13 +221,12 @@ class Organization {
214
221
  }
215
222
  __get(orgId_1) {
216
223
  return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
217
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
224
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
218
225
  const { shouldIncludeFernUsers } = request;
219
- const _queryParams = {};
220
- if (shouldIncludeFernUsers != null) {
221
- _queryParams.shouldIncludeFernUsers = shouldIncludeFernUsers.toString();
222
- }
223
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
226
+ const _queryParams = {
227
+ shouldIncludeFernUsers,
228
+ };
229
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
224
230
  const _response = yield core.fetcher({
225
231
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, `/organizations/${core.url.encodePathParam(serializers.OrganizationId.jsonOrThrow(orgId, { omitUndefined: true }))}`),
226
232
  method: "GET",
@@ -229,6 +235,8 @@ class Organization {
229
235
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
230
236
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
231
237
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
238
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
239
+ logging: this._options.logging,
232
240
  });
233
241
  if (_response.ok) {
234
242
  return {
@@ -248,7 +256,7 @@ class Organization {
248
256
  };
249
257
  }
250
258
  if (_response.error.reason === "status-code") {
251
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
259
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
252
260
  case "UnauthorizedError":
253
261
  return {
254
262
  data: {
@@ -276,9 +284,82 @@ class Organization {
276
284
  };
277
285
  });
278
286
  }
287
+ /**
288
+ * Look up an organization by its associated Postman team ID.
289
+ *
290
+ * @param {string} postmanTeamId - The Postman team ID to look up
291
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
292
+ *
293
+ * @example
294
+ * await client.organization.getByPostmanTeamId("postmanTeamId")
295
+ */
296
+ getByPostmanTeamId(postmanTeamId, requestOptions) {
297
+ return core.HttpResponsePromise.fromPromise(this.__getByPostmanTeamId(postmanTeamId, requestOptions));
298
+ }
299
+ __getByPostmanTeamId(postmanTeamId, requestOptions) {
300
+ return __awaiter(this, void 0, void 0, function* () {
301
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
302
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
303
+ const _response = yield core.fetcher({
304
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, `/organizations/postman-team/${core.url.encodePathParam(postmanTeamId)}`),
305
+ method: "GET",
306
+ headers: _headers,
307
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
308
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
309
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
310
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
311
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
312
+ logging: this._options.logging,
313
+ });
314
+ if (_response.ok) {
315
+ return {
316
+ data: {
317
+ ok: true,
318
+ body: serializers.Organization.parseOrThrow(_response.body, {
319
+ unrecognizedObjectKeys: "passthrough",
320
+ allowUnrecognizedUnionMembers: true,
321
+ allowUnrecognizedEnumValues: true,
322
+ skipValidation: true,
323
+ breadcrumbsPrefix: ["response"],
324
+ }),
325
+ headers: _response.headers,
326
+ rawResponse: _response.rawResponse,
327
+ },
328
+ rawResponse: _response.rawResponse,
329
+ };
330
+ }
331
+ if (_response.error.reason === "status-code") {
332
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
333
+ case "OrganizationNotFoundError":
334
+ return {
335
+ data: {
336
+ ok: false,
337
+ error: serializers.organization.getByPostmanTeamId.Error.parseOrThrow(_response.error.body, {
338
+ unrecognizedObjectKeys: "passthrough",
339
+ allowUnrecognizedUnionMembers: true,
340
+ allowUnrecognizedEnumValues: true,
341
+ skipValidation: true,
342
+ breadcrumbsPrefix: ["response"],
343
+ }),
344
+ rawResponse: _response.rawResponse,
345
+ },
346
+ rawResponse: _response.rawResponse,
347
+ };
348
+ }
349
+ }
350
+ return {
351
+ data: {
352
+ ok: false,
353
+ error: FernVenusApi.organization.getByPostmanTeamId.Error._unknown(_response.error),
354
+ rawResponse: _response.rawResponse,
355
+ },
356
+ rawResponse: _response.rawResponse,
357
+ };
358
+ });
359
+ }
279
360
  /**
280
361
  * @param {FernVenusApi.OrganizationId} organizationId
281
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
362
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
282
363
  *
283
364
  * @example
284
365
  * await client.organization.isMember("organizationId")
@@ -288,8 +369,9 @@ class Organization {
288
369
  }
289
370
  __isMember(organizationId, requestOptions) {
290
371
  return __awaiter(this, void 0, void 0, function* () {
291
- var _a, _b, _c, _d, _e, _f, _g, _h;
292
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
372
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
373
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
374
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
293
375
  const _response = yield core.fetcher({
294
376
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, `/organizations/belongs-to-organization/${core.url.encodePathParam(serializers.OrganizationId.jsonOrThrow(organizationId, { omitUndefined: true }))}`),
295
377
  method: "POST",
@@ -298,6 +380,8 @@ class Organization {
298
380
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
299
381
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
300
382
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
383
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
384
+ logging: this._options.logging,
301
385
  });
302
386
  if (_response.ok) {
303
387
  return {
@@ -330,7 +414,7 @@ class Organization {
330
414
  * Returns the org for a scoped token. The token is limited to one organization.
331
415
  *
332
416
  * @param {FernVenusApi.GetMyOrganizationFromScopedToken} request
333
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
417
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
334
418
  *
335
419
  * @example
336
420
  * await client.organization.getMyOrganizationFromScopedToken()
@@ -340,13 +424,13 @@ class Organization {
340
424
  }
341
425
  __getMyOrganizationFromScopedToken() {
342
426
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
343
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
427
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
344
428
  const { shouldIncludeFernUsers } = request;
345
- const _queryParams = {};
346
- if (shouldIncludeFernUsers != null) {
347
- _queryParams.shouldIncludeFernUsers = shouldIncludeFernUsers.toString();
348
- }
349
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
429
+ const _queryParams = {
430
+ shouldIncludeFernUsers,
431
+ };
432
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
433
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
350
434
  const _response = yield core.fetcher({
351
435
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/myself"),
352
436
  method: "POST",
@@ -355,6 +439,8 @@ class Organization {
355
439
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
356
440
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
357
441
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
442
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
443
+ logging: this._options.logging,
358
444
  });
359
445
  if (_response.ok) {
360
446
  return {
@@ -374,7 +460,7 @@ class Organization {
374
460
  };
375
461
  }
376
462
  if (_response.error.reason === "status-code") {
377
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
463
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
378
464
  case "UnauthorizedError":
379
465
  return {
380
466
  data: {
@@ -404,7 +490,7 @@ class Organization {
404
490
  });
405
491
  }
406
492
  /**
407
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
493
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
408
494
  *
409
495
  * @example
410
496
  * await client.organization.getOrgIdsFromToken()
@@ -414,8 +500,9 @@ class Organization {
414
500
  }
415
501
  __getOrgIdsFromToken(requestOptions) {
416
502
  return __awaiter(this, void 0, void 0, function* () {
417
- var _a, _b, _c, _d, _e, _f, _g, _h;
418
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
503
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
504
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
505
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
419
506
  const _response = yield core.fetcher({
420
507
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations"),
421
508
  method: "POST",
@@ -424,6 +511,8 @@ class Organization {
424
511
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
425
512
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
426
513
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
514
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
515
+ logging: this._options.logging,
427
516
  });
428
517
  if (_response.ok) {
429
518
  return {
@@ -454,7 +543,7 @@ class Organization {
454
543
  }
455
544
  /**
456
545
  * @param {FernVenusApi.AddUserToOrgRequest} request
457
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
546
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
458
547
  *
459
548
  * @example
460
549
  * await client.organization.addUser({
@@ -467,8 +556,9 @@ class Organization {
467
556
  }
468
557
  __addUser(request, requestOptions) {
469
558
  return __awaiter(this, void 0, void 0, function* () {
470
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
471
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
559
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
560
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
561
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
472
562
  const _response = yield core.fetcher({
473
563
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/add-user"),
474
564
  method: "POST",
@@ -483,6 +573,8 @@ class Organization {
483
573
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
484
574
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
485
575
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
576
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
577
+ logging: this._options.logging,
486
578
  });
487
579
  if (_response.ok) {
488
580
  return {
@@ -496,7 +588,7 @@ class Organization {
496
588
  };
497
589
  }
498
590
  if (_response.error.reason === "status-code") {
499
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
591
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
500
592
  case "UnauthorizedError":
501
593
  case "UserIdDoesNotExistError":
502
594
  return {
@@ -527,7 +619,7 @@ class Organization {
527
619
  }
528
620
  /**
529
621
  * @param {FernVenusApi.InviteUserToOrgRequest} request
530
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
622
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
531
623
  *
532
624
  * @example
533
625
  * await client.organization.inviteUser({
@@ -540,8 +632,9 @@ class Organization {
540
632
  }
541
633
  __inviteUser(request, requestOptions) {
542
634
  return __awaiter(this, void 0, void 0, function* () {
543
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
544
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
635
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
636
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
637
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
545
638
  const _response = yield core.fetcher({
546
639
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/invite"),
547
640
  method: "POST",
@@ -556,6 +649,8 @@ class Organization {
556
649
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
557
650
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
558
651
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
652
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
653
+ logging: this._options.logging,
559
654
  });
560
655
  if (_response.ok) {
561
656
  return {
@@ -569,7 +664,7 @@ class Organization {
569
664
  };
570
665
  }
571
666
  if (_response.error.reason === "status-code") {
572
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
667
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
573
668
  case "UnauthorizedError":
574
669
  case "UserIdDoesNotExistError":
575
670
  return {
@@ -600,7 +695,7 @@ class Organization {
600
695
  }
601
696
  /**
602
697
  * @param {FernVenusApi.RemoveUserFromOrgRequest} request
603
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
698
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
604
699
  *
605
700
  * @example
606
701
  * await client.organization.removeUser({
@@ -613,8 +708,9 @@ class Organization {
613
708
  }
614
709
  __removeUser(request, requestOptions) {
615
710
  return __awaiter(this, void 0, void 0, function* () {
616
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
617
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
711
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
712
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
713
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
618
714
  const _response = yield core.fetcher({
619
715
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/organizations/user"),
620
716
  method: "DELETE",
@@ -629,6 +725,8 @@ class Organization {
629
725
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
630
726
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
631
727
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
728
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
729
+ logging: this._options.logging,
632
730
  });
633
731
  if (_response.ok) {
634
732
  return {
@@ -642,7 +740,7 @@ class Organization {
642
740
  };
643
741
  }
644
742
  if (_response.error.reason === "status-code") {
645
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
743
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
646
744
  case "UnauthorizedError":
647
745
  case "UserIdDoesNotExistError":
648
746
  return {
@@ -675,7 +773,7 @@ class Organization {
675
773
  * Deletes an organization. Only users with admin role can delete organizations.
676
774
  *
677
775
  * @param {FernVenusApi.OrganizationId} orgId
678
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
776
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
679
777
  *
680
778
  * @example
681
779
  * await client.organization.delete("orgId")
@@ -685,8 +783,9 @@ class Organization {
685
783
  }
686
784
  __delete(orgId, requestOptions) {
687
785
  return __awaiter(this, void 0, void 0, function* () {
688
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
689
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
786
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
787
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
788
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
690
789
  const _response = yield core.fetcher({
691
790
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, `/organizations/${core.url.encodePathParam(serializers.OrganizationId.jsonOrThrow(orgId, { omitUndefined: true }))}`),
692
791
  method: "DELETE",
@@ -695,6 +794,8 @@ class Organization {
695
794
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
696
795
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
697
796
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
797
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
798
+ logging: this._options.logging,
698
799
  });
699
800
  if (_response.ok) {
700
801
  return {
@@ -708,7 +809,7 @@ class Organization {
708
809
  };
709
810
  }
710
811
  if (_response.error.reason === "status-code") {
711
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
812
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
712
813
  case "UnauthorizedError":
713
814
  case "OrganizationNotFoundError":
714
815
  return {
@@ -737,14 +838,5 @@ class Organization {
737
838
  };
738
839
  });
739
840
  }
740
- _getAuthorizationHeader() {
741
- return __awaiter(this, void 0, void 0, function* () {
742
- const bearer = yield core.Supplier.get(this._options.token);
743
- if (bearer != null) {
744
- return `Bearer ${bearer}`;
745
- }
746
- return undefined;
747
- });
748
- }
749
841
  }
750
- exports.Organization = Organization;
842
+ exports.OrganizationClient = OrganizationClient;
@@ -69,7 +69,7 @@ exports.Error = {
69
69
  case "UserIdDoesNotExistError":
70
70
  return visitor.userIdDoesNotExistError();
71
71
  default:
72
- return visitor._other(value);
72
+ return visitor._other(value.content);
73
73
  }
74
74
  },
75
75
  };
@@ -69,7 +69,7 @@ exports.Error = {
69
69
  case "OrganizationAlreadyExistsError":
70
70
  return visitor.organizationAlreadyExistsError();
71
71
  default:
72
- return visitor._other(value);
72
+ return visitor._other(value.content);
73
73
  }
74
74
  },
75
75
  };
@@ -69,7 +69,7 @@ exports.Error = {
69
69
  case "OrganizationNotFoundError":
70
70
  return visitor.organizationNotFoundError();
71
71
  default:
72
- return visitor._other(value);
72
+ return visitor._other(value.content);
73
73
  }
74
74
  },
75
75
  };
@@ -59,7 +59,7 @@ exports.Error = {
59
59
  case "UnauthorizedError":
60
60
  return visitor.unauthorizedError();
61
61
  default:
62
- return visitor._other(value);
62
+ return visitor._other(value.content);
63
63
  }
64
64
  },
65
65
  };
@@ -0,0 +1,24 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as FernVenusApi from "../../../index.js";
3
+ export type Error = FernVenusApi.organization.getByPostmanTeamId.Error.OrganizationNotFoundError | FernVenusApi.organization.getByPostmanTeamId.Error._Unknown;
4
+ export declare namespace Error {
5
+ interface OrganizationNotFoundError extends _Utils {
6
+ error: "OrganizationNotFoundError";
7
+ }
8
+ interface _Unknown extends _Utils {
9
+ error: void;
10
+ content: core.Fetcher.Error;
11
+ }
12
+ interface _Utils {
13
+ _visit: <_Result>(visitor: FernVenusApi.organization.getByPostmanTeamId.Error._Visitor<_Result>) => _Result;
14
+ }
15
+ interface _Visitor<_Result> {
16
+ organizationNotFoundError: () => _Result;
17
+ _other: (value: core.Fetcher.Error) => _Result;
18
+ }
19
+ }
20
+ export declare const Error: {
21
+ readonly organizationNotFoundError: () => FernVenusApi.organization.getByPostmanTeamId.Error.OrganizationNotFoundError;
22
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.organization.getByPostmanTeamId.Error._Unknown;
23
+ readonly _visit: <_Result>(value: FernVenusApi.organization.getByPostmanTeamId.Error, visitor: FernVenusApi.organization.getByPostmanTeamId.Error._Visitor<_Result>) => _Result;
24
+ };
@@ -0,0 +1,65 @@
1
+ "use strict";
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
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.Error = void 0;
38
+ const FernVenusApi = __importStar(require("../../../index.js"));
39
+ exports.Error = {
40
+ organizationNotFoundError: () => {
41
+ return {
42
+ error: "OrganizationNotFoundError",
43
+ _visit: function (visitor) {
44
+ return FernVenusApi.organization.getByPostmanTeamId.Error._visit(this, visitor);
45
+ },
46
+ };
47
+ },
48
+ _unknown: (fetcherError) => {
49
+ return {
50
+ error: undefined,
51
+ content: fetcherError,
52
+ _visit: function (visitor) {
53
+ return FernVenusApi.organization.getByPostmanTeamId.Error._visit(this, visitor);
54
+ },
55
+ };
56
+ },
57
+ _visit: (value, visitor) => {
58
+ switch (value.error) {
59
+ case "OrganizationNotFoundError":
60
+ return visitor.organizationNotFoundError();
61
+ default:
62
+ return visitor._other(value.content);
63
+ }
64
+ },
65
+ };
@@ -59,7 +59,7 @@ exports.Error = {
59
59
  case "UnauthorizedError":
60
60
  return visitor.unauthorizedError();
61
61
  default:
62
- return visitor._other(value);
62
+ return visitor._other(value.content);
63
63
  }
64
64
  },
65
65
  };
@@ -49,7 +49,7 @@ exports.Error = {
49
49
  _visit: (value, visitor) => {
50
50
  switch (value.error) {
51
51
  default:
52
- return visitor._other(value);
52
+ return visitor._other(value.content);
53
53
  }
54
54
  },
55
55
  };