@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
@@ -8,18 +8,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
+ import { mergeHeaders } from "../../../../core/headers.mjs";
12
13
  import * as core from "../../../../core/index.mjs";
13
14
  import * as environments from "../../../../environments.mjs";
14
15
  import * as serializers from "../../../../serialization/index.mjs";
15
16
  import * as FernVenusApi from "../../../index.mjs";
16
- export class Organization {
17
- constructor(_options = {}) {
18
- this._options = _options;
17
+ export class OrganizationClient {
18
+ constructor(options = {}) {
19
+ this._options = normalizeClientOptionsWithAuth(options);
19
20
  }
20
21
  /**
21
22
  * @param {FernVenusApi.CreateOrganizationRequest} request
22
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
23
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
23
24
  *
24
25
  * @example
25
26
  * await client.organization.create({
@@ -31,8 +32,9 @@ export class Organization {
31
32
  }
32
33
  __create(request, requestOptions) {
33
34
  return __awaiter(this, void 0, void 0, function* () {
34
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
35
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
35
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
36
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
37
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
36
38
  const _response = yield core.fetcher({
37
39
  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"),
38
40
  method: "POST",
@@ -47,6 +49,8 @@ export class Organization {
47
49
  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,
48
50
  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,
49
51
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
52
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
53
+ logging: this._options.logging,
50
54
  });
51
55
  if (_response.ok) {
52
56
  return {
@@ -66,7 +70,7 @@ export class Organization {
66
70
  };
67
71
  }
68
72
  if (_response.error.reason === "status-code") {
69
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
73
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
70
74
  case "UnauthorizedError":
71
75
  case "OrganizationAlreadyExistsError":
72
76
  return {
@@ -98,7 +102,7 @@ export class Organization {
98
102
  /**
99
103
  * @param {FernVenusApi.OrganizationId} orgId
100
104
  * @param {FernVenusApi.UpdateOrganizationRequest} request
101
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
105
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
102
106
  *
103
107
  * @example
104
108
  * await client.organization.update("orgId")
@@ -108,8 +112,9 @@ export class Organization {
108
112
  }
109
113
  __update(orgId_1) {
110
114
  return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
111
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
112
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
115
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
116
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
117
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
113
118
  const _response = yield core.fetcher({
114
119
  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`),
115
120
  method: "POST",
@@ -124,6 +129,8 @@ export class Organization {
124
129
  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,
125
130
  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,
126
131
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
132
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
133
+ logging: this._options.logging,
127
134
  });
128
135
  if (_response.ok) {
129
136
  return {
@@ -137,7 +144,7 @@ export class Organization {
137
144
  };
138
145
  }
139
146
  if (_response.error.reason === "status-code") {
140
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
147
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
141
148
  case "UnauthorizedError":
142
149
  return {
143
150
  data: {
@@ -168,7 +175,7 @@ export class Organization {
168
175
  /**
169
176
  * @param {FernVenusApi.OrganizationId} orgId
170
177
  * @param {FernVenusApi.GetOrganizationRequest} request
171
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
178
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
172
179
  *
173
180
  * @example
174
181
  * await client.organization.get("orgId")
@@ -178,13 +185,12 @@ export class Organization {
178
185
  }
179
186
  __get(orgId_1) {
180
187
  return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
181
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
188
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
182
189
  const { shouldIncludeFernUsers } = request;
183
- const _queryParams = {};
184
- if (shouldIncludeFernUsers != null) {
185
- _queryParams.shouldIncludeFernUsers = shouldIncludeFernUsers.toString();
186
- }
187
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
190
+ const _queryParams = {
191
+ shouldIncludeFernUsers,
192
+ };
193
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
188
194
  const _response = yield core.fetcher({
189
195
  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 }))}`),
190
196
  method: "GET",
@@ -193,6 +199,8 @@ export class Organization {
193
199
  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,
194
200
  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,
195
201
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
202
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
203
+ logging: this._options.logging,
196
204
  });
197
205
  if (_response.ok) {
198
206
  return {
@@ -212,7 +220,7 @@ export class Organization {
212
220
  };
213
221
  }
214
222
  if (_response.error.reason === "status-code") {
215
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
223
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
216
224
  case "UnauthorizedError":
217
225
  return {
218
226
  data: {
@@ -240,9 +248,82 @@ export class Organization {
240
248
  };
241
249
  });
242
250
  }
251
+ /**
252
+ * Look up an organization by its associated Postman team ID.
253
+ *
254
+ * @param {string} postmanTeamId - The Postman team ID to look up
255
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
256
+ *
257
+ * @example
258
+ * await client.organization.getByPostmanTeamId("postmanTeamId")
259
+ */
260
+ getByPostmanTeamId(postmanTeamId, requestOptions) {
261
+ return core.HttpResponsePromise.fromPromise(this.__getByPostmanTeamId(postmanTeamId, requestOptions));
262
+ }
263
+ __getByPostmanTeamId(postmanTeamId, requestOptions) {
264
+ return __awaiter(this, void 0, void 0, function* () {
265
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
266
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
267
+ const _response = yield core.fetcher({
268
+ 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)}`),
269
+ method: "GET",
270
+ headers: _headers,
271
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
272
+ 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,
273
+ 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,
274
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
275
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
276
+ logging: this._options.logging,
277
+ });
278
+ if (_response.ok) {
279
+ return {
280
+ data: {
281
+ ok: true,
282
+ body: serializers.Organization.parseOrThrow(_response.body, {
283
+ unrecognizedObjectKeys: "passthrough",
284
+ allowUnrecognizedUnionMembers: true,
285
+ allowUnrecognizedEnumValues: true,
286
+ skipValidation: true,
287
+ breadcrumbsPrefix: ["response"],
288
+ }),
289
+ headers: _response.headers,
290
+ rawResponse: _response.rawResponse,
291
+ },
292
+ rawResponse: _response.rawResponse,
293
+ };
294
+ }
295
+ if (_response.error.reason === "status-code") {
296
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
297
+ case "OrganizationNotFoundError":
298
+ return {
299
+ data: {
300
+ ok: false,
301
+ error: serializers.organization.getByPostmanTeamId.Error.parseOrThrow(_response.error.body, {
302
+ unrecognizedObjectKeys: "passthrough",
303
+ allowUnrecognizedUnionMembers: true,
304
+ allowUnrecognizedEnumValues: true,
305
+ skipValidation: true,
306
+ breadcrumbsPrefix: ["response"],
307
+ }),
308
+ rawResponse: _response.rawResponse,
309
+ },
310
+ rawResponse: _response.rawResponse,
311
+ };
312
+ }
313
+ }
314
+ return {
315
+ data: {
316
+ ok: false,
317
+ error: FernVenusApi.organization.getByPostmanTeamId.Error._unknown(_response.error),
318
+ rawResponse: _response.rawResponse,
319
+ },
320
+ rawResponse: _response.rawResponse,
321
+ };
322
+ });
323
+ }
243
324
  /**
244
325
  * @param {FernVenusApi.OrganizationId} organizationId
245
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
326
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
246
327
  *
247
328
  * @example
248
329
  * await client.organization.isMember("organizationId")
@@ -252,8 +333,9 @@ export class Organization {
252
333
  }
253
334
  __isMember(organizationId, requestOptions) {
254
335
  return __awaiter(this, void 0, void 0, function* () {
255
- var _a, _b, _c, _d, _e, _f, _g, _h;
256
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
336
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
337
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
338
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
257
339
  const _response = yield core.fetcher({
258
340
  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 }))}`),
259
341
  method: "POST",
@@ -262,6 +344,8 @@ export class Organization {
262
344
  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,
263
345
  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,
264
346
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
347
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
348
+ logging: this._options.logging,
265
349
  });
266
350
  if (_response.ok) {
267
351
  return {
@@ -294,7 +378,7 @@ export class Organization {
294
378
  * Returns the org for a scoped token. The token is limited to one organization.
295
379
  *
296
380
  * @param {FernVenusApi.GetMyOrganizationFromScopedToken} request
297
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
381
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
298
382
  *
299
383
  * @example
300
384
  * await client.organization.getMyOrganizationFromScopedToken()
@@ -304,13 +388,13 @@ export class Organization {
304
388
  }
305
389
  __getMyOrganizationFromScopedToken() {
306
390
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
307
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
391
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
308
392
  const { shouldIncludeFernUsers } = request;
309
- const _queryParams = {};
310
- if (shouldIncludeFernUsers != null) {
311
- _queryParams.shouldIncludeFernUsers = shouldIncludeFernUsers.toString();
312
- }
313
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
393
+ const _queryParams = {
394
+ shouldIncludeFernUsers,
395
+ };
396
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
397
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
314
398
  const _response = yield core.fetcher({
315
399
  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"),
316
400
  method: "POST",
@@ -319,6 +403,8 @@ export class Organization {
319
403
  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,
320
404
  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,
321
405
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
406
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
407
+ logging: this._options.logging,
322
408
  });
323
409
  if (_response.ok) {
324
410
  return {
@@ -338,7 +424,7 @@ export class Organization {
338
424
  };
339
425
  }
340
426
  if (_response.error.reason === "status-code") {
341
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
427
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
342
428
  case "UnauthorizedError":
343
429
  return {
344
430
  data: {
@@ -368,7 +454,7 @@ export class Organization {
368
454
  });
369
455
  }
370
456
  /**
371
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
457
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
372
458
  *
373
459
  * @example
374
460
  * await client.organization.getOrgIdsFromToken()
@@ -378,8 +464,9 @@ export class Organization {
378
464
  }
379
465
  __getOrgIdsFromToken(requestOptions) {
380
466
  return __awaiter(this, void 0, void 0, function* () {
381
- var _a, _b, _c, _d, _e, _f, _g, _h;
382
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
467
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
468
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
469
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
383
470
  const _response = yield core.fetcher({
384
471
  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"),
385
472
  method: "POST",
@@ -388,6 +475,8 @@ export class Organization {
388
475
  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,
389
476
  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,
390
477
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
478
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
479
+ logging: this._options.logging,
391
480
  });
392
481
  if (_response.ok) {
393
482
  return {
@@ -418,7 +507,7 @@ export class Organization {
418
507
  }
419
508
  /**
420
509
  * @param {FernVenusApi.AddUserToOrgRequest} request
421
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
510
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
422
511
  *
423
512
  * @example
424
513
  * await client.organization.addUser({
@@ -431,8 +520,9 @@ export class Organization {
431
520
  }
432
521
  __addUser(request, requestOptions) {
433
522
  return __awaiter(this, void 0, void 0, function* () {
434
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
435
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
523
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
524
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
525
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
436
526
  const _response = yield core.fetcher({
437
527
  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"),
438
528
  method: "POST",
@@ -447,6 +537,8 @@ export class Organization {
447
537
  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,
448
538
  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,
449
539
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
540
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
541
+ logging: this._options.logging,
450
542
  });
451
543
  if (_response.ok) {
452
544
  return {
@@ -460,7 +552,7 @@ export class Organization {
460
552
  };
461
553
  }
462
554
  if (_response.error.reason === "status-code") {
463
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
555
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
464
556
  case "UnauthorizedError":
465
557
  case "UserIdDoesNotExistError":
466
558
  return {
@@ -491,7 +583,7 @@ export class Organization {
491
583
  }
492
584
  /**
493
585
  * @param {FernVenusApi.InviteUserToOrgRequest} request
494
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
586
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
495
587
  *
496
588
  * @example
497
589
  * await client.organization.inviteUser({
@@ -504,8 +596,9 @@ export class Organization {
504
596
  }
505
597
  __inviteUser(request, requestOptions) {
506
598
  return __awaiter(this, void 0, void 0, function* () {
507
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
508
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
599
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
600
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
601
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
509
602
  const _response = yield core.fetcher({
510
603
  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"),
511
604
  method: "POST",
@@ -520,6 +613,8 @@ export class Organization {
520
613
  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,
521
614
  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,
522
615
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
616
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
617
+ logging: this._options.logging,
523
618
  });
524
619
  if (_response.ok) {
525
620
  return {
@@ -533,7 +628,7 @@ export class Organization {
533
628
  };
534
629
  }
535
630
  if (_response.error.reason === "status-code") {
536
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
631
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
537
632
  case "UnauthorizedError":
538
633
  case "UserIdDoesNotExistError":
539
634
  return {
@@ -564,7 +659,7 @@ export class Organization {
564
659
  }
565
660
  /**
566
661
  * @param {FernVenusApi.RemoveUserFromOrgRequest} request
567
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
662
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
568
663
  *
569
664
  * @example
570
665
  * await client.organization.removeUser({
@@ -577,8 +672,9 @@ export class Organization {
577
672
  }
578
673
  __removeUser(request, requestOptions) {
579
674
  return __awaiter(this, void 0, void 0, function* () {
580
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
581
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
675
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
676
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
677
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
582
678
  const _response = yield core.fetcher({
583
679
  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"),
584
680
  method: "DELETE",
@@ -593,6 +689,8 @@ export class Organization {
593
689
  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,
594
690
  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,
595
691
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
692
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
693
+ logging: this._options.logging,
596
694
  });
597
695
  if (_response.ok) {
598
696
  return {
@@ -606,7 +704,7 @@ export class Organization {
606
704
  };
607
705
  }
608
706
  if (_response.error.reason === "status-code") {
609
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
707
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
610
708
  case "UnauthorizedError":
611
709
  case "UserIdDoesNotExistError":
612
710
  return {
@@ -639,7 +737,7 @@ export class Organization {
639
737
  * Deletes an organization. Only users with admin role can delete organizations.
640
738
  *
641
739
  * @param {FernVenusApi.OrganizationId} orgId
642
- * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
740
+ * @param {OrganizationClient.RequestOptions} requestOptions - Request-specific configuration.
643
741
  *
644
742
  * @example
645
743
  * await client.organization.delete("orgId")
@@ -649,8 +747,9 @@ export class Organization {
649
747
  }
650
748
  __delete(orgId, requestOptions) {
651
749
  return __awaiter(this, void 0, void 0, function* () {
652
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
653
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
750
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
751
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
752
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
654
753
  const _response = yield core.fetcher({
655
754
  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 }))}`),
656
755
  method: "DELETE",
@@ -659,6 +758,8 @@ export class Organization {
659
758
  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,
660
759
  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,
661
760
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
761
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
762
+ logging: this._options.logging,
662
763
  });
663
764
  if (_response.ok) {
664
765
  return {
@@ -672,7 +773,7 @@ export class Organization {
672
773
  };
673
774
  }
674
775
  if (_response.error.reason === "status-code") {
675
- switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.error) {
776
+ switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
676
777
  case "UnauthorizedError":
677
778
  case "OrganizationNotFoundError":
678
779
  return {
@@ -701,13 +802,4 @@ export class Organization {
701
802
  };
702
803
  });
703
804
  }
704
- _getAuthorizationHeader() {
705
- return __awaiter(this, void 0, void 0, function* () {
706
- const bearer = yield core.Supplier.get(this._options.token);
707
- if (bearer != null) {
708
- return `Bearer ${bearer}`;
709
- }
710
- return undefined;
711
- });
712
- }
713
805
  }
@@ -33,7 +33,7 @@ export const Error = {
33
33
  case "UserIdDoesNotExistError":
34
34
  return visitor.userIdDoesNotExistError();
35
35
  default:
36
- return visitor._other(value);
36
+ return visitor._other(value.content);
37
37
  }
38
38
  },
39
39
  };
@@ -33,7 +33,7 @@ export const Error = {
33
33
  case "OrganizationAlreadyExistsError":
34
34
  return visitor.organizationAlreadyExistsError();
35
35
  default:
36
- return visitor._other(value);
36
+ return visitor._other(value.content);
37
37
  }
38
38
  },
39
39
  };
@@ -33,7 +33,7 @@ export const Error = {
33
33
  case "OrganizationNotFoundError":
34
34
  return visitor.organizationNotFoundError();
35
35
  default:
36
- return visitor._other(value);
36
+ return visitor._other(value.content);
37
37
  }
38
38
  },
39
39
  };
@@ -23,7 +23,7 @@ export const Error = {
23
23
  case "UnauthorizedError":
24
24
  return visitor.unauthorizedError();
25
25
  default:
26
- return visitor._other(value);
26
+ return visitor._other(value.content);
27
27
  }
28
28
  },
29
29
  };
@@ -0,0 +1,24 @@
1
+ import type * as core from "../../../../core/index.mjs";
2
+ import * as FernVenusApi from "../../../index.mjs";
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,29 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as FernVenusApi from "../../../index.mjs";
3
+ export const Error = {
4
+ organizationNotFoundError: () => {
5
+ return {
6
+ error: "OrganizationNotFoundError",
7
+ _visit: function (visitor) {
8
+ return FernVenusApi.organization.getByPostmanTeamId.Error._visit(this, visitor);
9
+ },
10
+ };
11
+ },
12
+ _unknown: (fetcherError) => {
13
+ return {
14
+ error: undefined,
15
+ content: fetcherError,
16
+ _visit: function (visitor) {
17
+ return FernVenusApi.organization.getByPostmanTeamId.Error._visit(this, visitor);
18
+ },
19
+ };
20
+ },
21
+ _visit: (value, visitor) => {
22
+ switch (value.error) {
23
+ case "OrganizationNotFoundError":
24
+ return visitor.organizationNotFoundError();
25
+ default:
26
+ return visitor._other(value.content);
27
+ }
28
+ },
29
+ };
@@ -23,7 +23,7 @@ export const Error = {
23
23
  case "UnauthorizedError":
24
24
  return visitor.unauthorizedError();
25
25
  default:
26
- return visitor._other(value);
26
+ return visitor._other(value.content);
27
27
  }
28
28
  },
29
29
  };
@@ -13,7 +13,7 @@ export const Error = {
13
13
  _visit: (value, visitor) => {
14
14
  switch (value.error) {
15
15
  default:
16
- return visitor._other(value);
16
+ return visitor._other(value.content);
17
17
  }
18
18
  },
19
19
  };
@@ -2,6 +2,7 @@ export * as addUser from "./addUser.mjs";
2
2
  export * as create from "./create.mjs";
3
3
  export * as delete from "./delete.mjs";
4
4
  export * as get from "./get.mjs";
5
+ export * as getByPostmanTeamId from "./getByPostmanTeamId.mjs";
5
6
  export * as getMyOrganizationFromScopedToken from "./getMyOrganizationFromScopedToken.mjs";
6
7
  export * as getOrgIdsFromToken from "./getOrgIdsFromToken.mjs";
7
8
  export * as inviteUser from "./inviteUser.mjs";
@@ -2,6 +2,7 @@ export * as addUser from "./addUser.mjs";
2
2
  export * as create from "./create.mjs";
3
3
  export * as delete from "./delete.mjs";
4
4
  export * as get from "./get.mjs";
5
+ export * as getByPostmanTeamId from "./getByPostmanTeamId.mjs";
5
6
  export * as getMyOrganizationFromScopedToken from "./getMyOrganizationFromScopedToken.mjs";
6
7
  export * as getOrgIdsFromToken from "./getOrgIdsFromToken.mjs";
7
8
  export * as inviteUser from "./inviteUser.mjs";
@@ -33,7 +33,7 @@ export const Error = {
33
33
  case "UserIdDoesNotExistError":
34
34
  return visitor.userIdDoesNotExistError();
35
35
  default:
36
- return visitor._other(value);
36
+ return visitor._other(value.content);
37
37
  }
38
38
  },
39
39
  };
@@ -13,7 +13,7 @@ export const Error = {
13
13
  _visit: (value, visitor) => {
14
14
  switch (value.error) {
15
15
  default:
16
- return visitor._other(value);
16
+ return visitor._other(value.content);
17
17
  }
18
18
  },
19
19
  };