@fern-api/venus-api-sdk 0.10.0 → 0.10.1-2-g8c943d4

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 (577) hide show
  1. package/Client.d.ts +14 -6
  2. package/Client.js +8 -9
  3. package/api/resources/commons/types/OrganizationId.d.ts +1 -1
  4. package/api/resources/commons/types/UserId.d.ts +1 -1
  5. package/api/resources/organization/client/Client.d.ts +116 -13
  6. package/api/resources/organization/client/Client.js +513 -236
  7. package/api/resources/organization/client/addUser.d.ts +1 -1
  8. package/api/resources/organization/client/addUser.js +27 -4
  9. package/api/resources/organization/client/create.d.ts +1 -1
  10. package/api/resources/organization/client/create.js +27 -4
  11. package/api/resources/organization/client/get.d.ts +1 -1
  12. package/api/resources/organization/client/get.js +26 -3
  13. package/api/resources/organization/client/getMyOrganizationFromScopedToken.d.ts +1 -1
  14. package/api/resources/organization/client/getMyOrganizationFromScopedToken.js +26 -3
  15. package/api/resources/organization/client/getOrgIdsFromToken.d.ts +1 -1
  16. package/api/resources/organization/client/getOrgIdsFromToken.js +25 -2
  17. package/api/resources/organization/client/inviteUser.d.ts +1 -1
  18. package/api/resources/organization/client/inviteUser.js +27 -4
  19. package/api/resources/organization/client/isMember.d.ts +1 -1
  20. package/api/resources/organization/client/isMember.js +25 -2
  21. package/api/resources/organization/client/removeUser.d.ts +1 -1
  22. package/api/resources/organization/client/removeUser.js +27 -4
  23. package/api/resources/organization/client/requests/AddUserToOrgRequest.d.ts +8 -1
  24. package/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +15 -1
  25. package/api/resources/organization/client/requests/GetMyOrganizationFromScopedToken.d.ts +6 -0
  26. package/api/resources/organization/client/requests/GetOrganizationRequest.d.ts +6 -0
  27. package/api/resources/organization/client/requests/InviteUserToOrgRequest.d.ts +8 -1
  28. package/api/resources/organization/client/requests/RemoveUserFromOrgRequest.d.ts +8 -1
  29. package/api/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +31 -0
  30. package/api/resources/organization/client/requests/index.d.ts +7 -7
  31. package/api/resources/organization/client/update.d.ts +1 -1
  32. package/api/resources/organization/client/update.js +26 -3
  33. package/api/resources/organization/types/Organization.d.ts +1 -1
  34. package/api/resources/registry/client/Client.d.ts +48 -7
  35. package/api/resources/registry/client/Client.js +198 -87
  36. package/api/resources/registry/client/generateRegistryTokens.d.ts +1 -1
  37. package/api/resources/registry/client/generateRegistryTokens.js +27 -4
  38. package/api/resources/registry/client/hasRegistryPermission.d.ts +1 -1
  39. package/api/resources/registry/client/hasRegistryPermission.js +27 -4
  40. package/api/resources/registry/client/requests/CheckRegistryPermissionRequest.d.ts +11 -1
  41. package/api/resources/registry/client/requests/GenerateRegistryTokensRequest.d.ts +7 -1
  42. package/api/resources/registry/client/requests/RevokeTokenRequest.d.ts +8 -1
  43. package/api/resources/registry/client/requests/index.d.ts +3 -3
  44. package/api/resources/registry/client/revokeToken.d.ts +1 -1
  45. package/api/resources/registry/client/revokeToken.js +27 -4
  46. package/api/resources/registry/types/RegistryToken.d.ts +5 -28
  47. package/api/resources/registry/types/RegistryToken.js +0 -51
  48. package/api/resources/registry/types/RegistryTokens.d.ts +1 -1
  49. package/api/resources/user/client/Client.d.ts +30 -6
  50. package/api/resources/user/client/Client.js +107 -43
  51. package/api/resources/user/client/getMyOrganizations.d.ts +1 -1
  52. package/api/resources/user/client/getMyOrganizations.js +25 -2
  53. package/api/resources/user/client/getMyself.d.ts +1 -1
  54. package/api/resources/user/client/getMyself.js +25 -2
  55. package/api/resources/user/client/requests/GetUserOrganizationsRequest.d.ts +6 -0
  56. package/api/resources/user/client/requests/index.d.ts +1 -1
  57. package/api/resources/user/types/OrganizationsPage.d.ts +1 -1
  58. package/api/resources/user/types/User.d.ts +1 -1
  59. package/core/fetcher/APIResponse.d.ts +1 -0
  60. package/core/fetcher/Fetcher.d.ts +9 -2
  61. package/core/fetcher/Fetcher.js +78 -64
  62. package/core/fetcher/Supplier.js +11 -2
  63. package/core/fetcher/createRequestUrl.d.ts +1 -0
  64. package/core/fetcher/createRequestUrl.js +13 -0
  65. package/core/fetcher/getFetchFn.d.ts +4 -0
  66. package/core/fetcher/getFetchFn.js +59 -0
  67. package/core/fetcher/getHeader.d.ts +1 -0
  68. package/core/fetcher/getHeader.js +12 -0
  69. package/core/fetcher/getRequestBody.d.ts +7 -0
  70. package/core/fetcher/getRequestBody.js +23 -0
  71. package/core/fetcher/getResponseBody.d.ts +1 -0
  72. package/core/fetcher/getResponseBody.js +52 -0
  73. package/core/fetcher/index.d.ts +4 -2
  74. package/core/fetcher/index.js +3 -1
  75. package/core/fetcher/makeRequest.d.ts +1 -0
  76. package/core/fetcher/makeRequest.js +42 -0
  77. package/core/fetcher/requestWithRetries.d.ts +1 -0
  78. package/core/fetcher/requestWithRetries.js +32 -0
  79. package/core/fetcher/signals.d.ts +12 -0
  80. package/core/fetcher/signals.js +37 -0
  81. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  82. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  83. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  84. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
  85. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  86. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  87. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  88. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
  89. package/core/index.d.ts +3 -2
  90. package/core/index.js +6 -5
  91. package/core/runtime/index.d.ts +1 -0
  92. package/core/runtime/index.js +5 -0
  93. package/core/runtime/runtime.d.ts +9 -0
  94. package/core/runtime/runtime.js +93 -0
  95. package/core/schemas/Schema.d.ts +44 -5
  96. package/core/schemas/Schema.js +3 -0
  97. package/core/schemas/builders/bigint/bigint.d.ts +2 -0
  98. package/core/schemas/builders/bigint/bigint.js +50 -0
  99. package/core/schemas/builders/bigint/index.d.ts +1 -0
  100. package/core/schemas/builders/bigint/index.js +5 -0
  101. package/core/schemas/builders/date/date.js +22 -14
  102. package/core/schemas/builders/enum/enum.js +17 -7
  103. package/core/schemas/builders/index.d.ts +2 -0
  104. package/core/schemas/builders/index.js +2 -0
  105. package/core/schemas/builders/lazy/index.d.ts +2 -1
  106. package/core/schemas/builders/lazy/lazy.d.ts +2 -2
  107. package/core/schemas/builders/lazy/lazy.js +6 -9
  108. package/core/schemas/builders/lazy/lazyObject.js +2 -11
  109. package/core/schemas/builders/list/list.js +16 -14
  110. package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
  111. package/core/schemas/builders/literals/booleanLiteral.js +29 -0
  112. package/core/schemas/builders/literals/index.d.ts +1 -0
  113. package/core/schemas/builders/literals/index.js +3 -1
  114. package/core/schemas/builders/literals/stringLiteral.js +4 -3
  115. package/core/schemas/builders/object/index.d.ts +5 -2
  116. package/core/schemas/builders/object/index.js +3 -1
  117. package/core/schemas/builders/object/object.js +65 -63
  118. package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
  119. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
  120. package/core/schemas/builders/object/types.d.ts +2 -2
  121. package/core/schemas/builders/object-like/getObjectLikeUtils.js +9 -17
  122. package/core/schemas/builders/object-like/index.d.ts +1 -1
  123. package/core/schemas/builders/primitives/boolean.js +4 -3
  124. package/core/schemas/builders/primitives/number.js +4 -3
  125. package/core/schemas/builders/primitives/string.js +4 -3
  126. package/core/schemas/builders/record/index.d.ts +1 -1
  127. package/core/schemas/builders/record/record.js +36 -32
  128. package/core/schemas/builders/record/types.d.ts +2 -3
  129. package/core/schemas/builders/schema-utils/JsonError.js +0 -1
  130. package/core/schemas/builders/schema-utils/ParseError.js +0 -1
  131. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  132. package/core/schemas/builders/schema-utils/getSchemaUtils.js +16 -16
  133. package/core/schemas/builders/schema-utils/index.d.ts +2 -1
  134. package/core/schemas/builders/set/set.js +10 -10
  135. package/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
  136. package/core/schemas/builders/undiscriminated-union/index.js +5 -0
  137. package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
  138. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
  139. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +40 -0
  140. package/core/schemas/builders/union/index.d.ts +3 -2
  141. package/core/schemas/builders/union/union.js +61 -31
  142. package/core/schemas/index.d.ts +1 -1
  143. package/core/schemas/utils/createIdentitySchemaCreator.js +2 -4
  144. package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
  145. package/core/schemas/utils/getErrorMessageForIncorrectType.js +28 -0
  146. package/core/schemas/utils/isPlainObject.d.ts +0 -1
  147. package/core/schemas/utils/isPlainObject.js +1 -2
  148. package/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
  149. package/core/schemas/utils/maybeSkipValidation.js +28 -0
  150. package/dist/Client.d.ts +31 -0
  151. package/dist/Client.js +27 -0
  152. package/dist/api/index.d.ts +1 -0
  153. package/dist/api/index.js +17 -0
  154. package/dist/api/resources/commons/index.d.ts +1 -0
  155. package/dist/api/resources/commons/index.js +17 -0
  156. package/dist/api/resources/commons/types/OrganizationId.d.ts +8 -0
  157. package/dist/api/resources/commons/types/OrganizationId.js +10 -0
  158. package/dist/api/resources/commons/types/UserId.d.ts +8 -0
  159. package/dist/api/resources/commons/types/UserId.js +10 -0
  160. package/dist/api/resources/commons/types/index.d.ts +2 -0
  161. package/dist/api/resources/commons/types/index.js +18 -0
  162. package/dist/api/resources/index.d.ts +11 -0
  163. package/dist/api/resources/index.js +40 -0
  164. package/dist/api/resources/organization/client/Client.d.ts +130 -0
  165. package/dist/api/resources/organization/client/Client.js +582 -0
  166. package/dist/api/resources/organization/client/addUser.d.ts +32 -0
  167. package/dist/api/resources/organization/client/addUser.js +67 -0
  168. package/dist/api/resources/organization/client/create.d.ts +32 -0
  169. package/dist/api/resources/organization/client/create.js +67 -0
  170. package/dist/api/resources/organization/client/get.d.ts +27 -0
  171. package/dist/api/resources/organization/client/get.js +57 -0
  172. package/dist/api/resources/organization/client/getMyOrganizationFromScopedToken.d.ts +27 -0
  173. package/dist/api/resources/organization/client/getMyOrganizationFromScopedToken.js +57 -0
  174. package/dist/api/resources/organization/client/getOrgIdsFromToken.d.ts +22 -0
  175. package/dist/api/resources/organization/client/getOrgIdsFromToken.js +47 -0
  176. package/dist/api/resources/organization/client/index.d.ts +10 -0
  177. package/dist/api/resources/organization/client/index.js +39 -0
  178. package/dist/api/resources/organization/client/inviteUser.d.ts +32 -0
  179. package/dist/api/resources/organization/client/inviteUser.js +67 -0
  180. package/dist/api/resources/organization/client/isMember.d.ts +22 -0
  181. package/dist/api/resources/organization/client/isMember.js +47 -0
  182. package/dist/api/resources/organization/client/removeUser.d.ts +32 -0
  183. package/dist/api/resources/organization/client/removeUser.js +67 -0
  184. package/dist/api/resources/organization/client/requests/AddUserToOrgRequest.d.ts +15 -0
  185. package/dist/api/resources/organization/client/requests/AddUserToOrgRequest.js +5 -0
  186. package/dist/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +23 -0
  187. package/dist/api/resources/organization/client/requests/CreateOrganizationRequest.js +5 -0
  188. package/dist/api/resources/organization/client/requests/GetMyOrganizationFromScopedToken.d.ts +12 -0
  189. package/dist/api/resources/organization/client/requests/GetMyOrganizationFromScopedToken.js +5 -0
  190. package/dist/api/resources/organization/client/requests/GetOrganizationRequest.d.ts +12 -0
  191. package/dist/api/resources/organization/client/requests/GetOrganizationRequest.js +5 -0
  192. package/dist/api/resources/organization/client/requests/InviteUserToOrgRequest.d.ts +15 -0
  193. package/dist/api/resources/organization/client/requests/InviteUserToOrgRequest.js +5 -0
  194. package/dist/api/resources/organization/client/requests/RemoveUserFromOrgRequest.d.ts +15 -0
  195. package/dist/api/resources/organization/client/requests/RemoveUserFromOrgRequest.js +5 -0
  196. package/dist/api/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +49 -0
  197. package/dist/api/resources/organization/client/requests/UpdateOrganizationRequest.js +5 -0
  198. package/dist/api/resources/organization/client/requests/index.d.ts +7 -0
  199. package/dist/api/resources/organization/client/requests/index.js +2 -0
  200. package/dist/api/resources/organization/client/update.d.ts +27 -0
  201. package/dist/api/resources/organization/client/update.js +57 -0
  202. package/dist/api/resources/organization/index.d.ts +2 -0
  203. package/dist/api/resources/organization/index.js +18 -0
  204. package/dist/api/resources/organization/types/LightweightUser.d.ts +9 -0
  205. package/dist/api/resources/organization/types/LightweightUser.js +5 -0
  206. package/dist/api/resources/organization/types/Organization.d.ts +35 -0
  207. package/dist/api/resources/organization/types/Organization.js +5 -0
  208. package/dist/api/resources/organization/types/index.d.ts +2 -0
  209. package/dist/api/resources/organization/types/index.js +18 -0
  210. package/dist/api/resources/registry/client/Client.d.ts +59 -0
  211. package/dist/api/resources/registry/client/Client.js +246 -0
  212. package/dist/api/resources/registry/client/generateRegistryTokens.d.ts +32 -0
  213. package/dist/api/resources/registry/client/generateRegistryTokens.js +67 -0
  214. package/dist/api/resources/registry/client/hasRegistryPermission.d.ts +32 -0
  215. package/dist/api/resources/registry/client/hasRegistryPermission.js +67 -0
  216. package/dist/api/resources/registry/client/index.d.ts +4 -0
  217. package/dist/api/resources/registry/client/index.js +33 -0
  218. package/dist/api/resources/registry/client/requests/CheckRegistryPermissionRequest.d.ts +18 -0
  219. package/dist/api/resources/registry/client/requests/CheckRegistryPermissionRequest.js +5 -0
  220. package/dist/api/resources/registry/client/requests/GenerateRegistryTokensRequest.d.ts +13 -0
  221. package/dist/api/resources/registry/client/requests/GenerateRegistryTokensRequest.js +5 -0
  222. package/dist/api/resources/registry/client/requests/RevokeTokenRequest.d.ts +15 -0
  223. package/dist/api/resources/registry/client/requests/RevokeTokenRequest.js +5 -0
  224. package/dist/api/resources/registry/client/requests/index.d.ts +3 -0
  225. package/dist/api/resources/registry/client/requests/index.js +2 -0
  226. package/dist/api/resources/registry/client/revokeToken.d.ts +32 -0
  227. package/dist/api/resources/registry/client/revokeToken.js +67 -0
  228. package/dist/api/resources/registry/index.d.ts +2 -0
  229. package/dist/api/resources/registry/index.js +18 -0
  230. package/dist/api/resources/registry/types/MavenRegistryToken.d.ts +7 -0
  231. package/dist/api/resources/registry/types/MavenRegistryToken.js +5 -0
  232. package/dist/api/resources/registry/types/NpmRegistryToken.d.ts +6 -0
  233. package/dist/api/resources/registry/types/NpmRegistryToken.js +5 -0
  234. package/dist/api/resources/registry/types/PypiRegistryToken.d.ts +7 -0
  235. package/dist/api/resources/registry/types/PypiRegistryToken.js +5 -0
  236. package/dist/api/resources/registry/types/RegistryToken.d.ts +16 -0
  237. package/dist/api/resources/registry/types/RegistryToken.js +5 -0
  238. package/dist/api/resources/registry/types/RegistryTokens.d.ts +9 -0
  239. package/dist/api/resources/registry/types/RegistryTokens.js +5 -0
  240. package/dist/api/resources/registry/types/index.d.ts +5 -0
  241. package/dist/api/resources/registry/types/index.js +21 -0
  242. package/dist/api/resources/user/client/Client.d.ts +41 -0
  243. package/dist/api/resources/user/client/Client.js +151 -0
  244. package/dist/api/resources/user/client/getMyOrganizations.d.ts +22 -0
  245. package/dist/api/resources/user/client/getMyOrganizations.js +47 -0
  246. package/dist/api/resources/user/client/getMyself.d.ts +22 -0
  247. package/dist/api/resources/user/client/getMyself.js +47 -0
  248. package/dist/api/resources/user/client/index.d.ts +3 -0
  249. package/dist/api/resources/user/client/index.js +32 -0
  250. package/dist/api/resources/user/client/requests/GetUserOrganizationsRequest.d.ts +12 -0
  251. package/dist/api/resources/user/client/requests/GetUserOrganizationsRequest.js +5 -0
  252. package/dist/api/resources/user/client/requests/index.d.ts +1 -0
  253. package/dist/api/resources/user/client/requests/index.js +2 -0
  254. package/dist/api/resources/user/index.d.ts +2 -0
  255. package/dist/api/resources/user/index.js +18 -0
  256. package/dist/api/resources/user/types/OrganizationsPage.d.ts +8 -0
  257. package/dist/api/resources/user/types/OrganizationsPage.js +5 -0
  258. package/dist/api/resources/user/types/User.d.ts +10 -0
  259. package/dist/api/resources/user/types/User.js +5 -0
  260. package/dist/api/resources/user/types/index.d.ts +2 -0
  261. package/dist/api/resources/user/types/index.js +18 -0
  262. package/dist/core/auth/BasicAuth.d.ts +8 -0
  263. package/dist/core/auth/BasicAuth.js +26 -0
  264. package/dist/core/auth/BearerToken.d.ts +5 -0
  265. package/dist/core/auth/BearerToken.js +15 -0
  266. package/dist/core/auth/index.d.ts +2 -0
  267. package/dist/core/auth/index.js +7 -0
  268. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  269. package/dist/core/fetcher/APIResponse.js +2 -0
  270. package/dist/core/fetcher/Fetcher.d.ts +39 -0
  271. package/dist/core/fetcher/Fetcher.js +99 -0
  272. package/dist/core/fetcher/Supplier.d.ts +4 -0
  273. package/dist/core/fetcher/Supplier.js +22 -0
  274. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  275. package/dist/core/fetcher/createRequestUrl.js +13 -0
  276. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  277. package/dist/core/fetcher/getFetchFn.js +59 -0
  278. package/dist/core/fetcher/getHeader.d.ts +1 -0
  279. package/dist/core/fetcher/getHeader.js +12 -0
  280. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  281. package/dist/core/fetcher/getRequestBody.js +23 -0
  282. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  283. package/dist/core/fetcher/getResponseBody.js +52 -0
  284. package/dist/core/fetcher/index.d.ts +5 -0
  285. package/dist/core/fetcher/index.js +9 -0
  286. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  287. package/dist/core/fetcher/makeRequest.js +42 -0
  288. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  289. package/dist/core/fetcher/requestWithRetries.js +32 -0
  290. package/dist/core/fetcher/signals.d.ts +12 -0
  291. package/dist/core/fetcher/signals.js +37 -0
  292. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  293. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  294. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  295. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
  296. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  297. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  298. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  299. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
  300. package/dist/core/index.d.ts +4 -0
  301. package/dist/core/index.js +33 -0
  302. package/dist/core/runtime/index.d.ts +1 -0
  303. package/dist/core/runtime/index.js +5 -0
  304. package/dist/core/runtime/runtime.d.ts +9 -0
  305. package/dist/core/runtime/runtime.js +93 -0
  306. package/dist/core/schemas/Schema.d.ts +85 -0
  307. package/dist/core/schemas/Schema.js +22 -0
  308. package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
  309. package/dist/core/schemas/builders/bigint/bigint.js +50 -0
  310. package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
  311. package/dist/core/schemas/builders/bigint/index.js +5 -0
  312. package/dist/core/schemas/builders/date/date.d.ts +2 -0
  313. package/dist/core/schemas/builders/date/date.js +63 -0
  314. package/dist/core/schemas/builders/date/index.d.ts +1 -0
  315. package/dist/core/schemas/builders/date/index.js +5 -0
  316. package/dist/core/schemas/builders/enum/enum.d.ts +2 -0
  317. package/dist/core/schemas/builders/enum/enum.js +39 -0
  318. package/dist/core/schemas/builders/enum/index.d.ts +1 -0
  319. package/dist/core/schemas/builders/enum/index.js +5 -0
  320. package/dist/core/schemas/builders/index.d.ts +14 -0
  321. package/dist/core/schemas/builders/index.js +30 -0
  322. package/dist/core/schemas/builders/lazy/index.d.ts +3 -0
  323. package/dist/core/schemas/builders/lazy/index.js +7 -0
  324. package/dist/core/schemas/builders/lazy/lazy.d.ts +5 -0
  325. package/dist/core/schemas/builders/lazy/lazy.js +25 -0
  326. package/dist/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
  327. package/dist/core/schemas/builders/lazy/lazyObject.js +12 -0
  328. package/dist/core/schemas/builders/list/index.d.ts +1 -0
  329. package/dist/core/schemas/builders/list/index.js +5 -0
  330. package/dist/core/schemas/builders/list/list.d.ts +2 -0
  331. package/dist/core/schemas/builders/list/list.js +55 -0
  332. package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
  333. package/dist/core/schemas/builders/literals/booleanLiteral.js +29 -0
  334. package/dist/core/schemas/builders/literals/index.d.ts +2 -0
  335. package/dist/core/schemas/builders/literals/index.js +7 -0
  336. package/dist/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
  337. package/dist/core/schemas/builders/literals/stringLiteral.js +29 -0
  338. package/dist/core/schemas/builders/object/index.d.ts +6 -0
  339. package/dist/core/schemas/builders/object/index.js +11 -0
  340. package/dist/core/schemas/builders/object/object.d.ts +3 -0
  341. package/dist/core/schemas/builders/object/object.js +233 -0
  342. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
  343. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
  344. package/dist/core/schemas/builders/object/property.d.ts +8 -0
  345. package/dist/core/schemas/builders/object/property.js +16 -0
  346. package/dist/core/schemas/builders/object/types.d.ts +26 -0
  347. package/dist/core/schemas/builders/object/types.js +2 -0
  348. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
  349. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +54 -0
  350. package/dist/core/schemas/builders/object-like/index.d.ts +2 -0
  351. package/dist/core/schemas/builders/object-like/index.js +6 -0
  352. package/dist/core/schemas/builders/object-like/types.d.ts +7 -0
  353. package/dist/core/schemas/builders/object-like/types.js +2 -0
  354. package/dist/core/schemas/builders/primitives/any.d.ts +1 -0
  355. package/dist/core/schemas/builders/primitives/any.js +6 -0
  356. package/dist/core/schemas/builders/primitives/boolean.d.ts +1 -0
  357. package/dist/core/schemas/builders/primitives/boolean.js +25 -0
  358. package/dist/core/schemas/builders/primitives/index.d.ts +5 -0
  359. package/dist/core/schemas/builders/primitives/index.js +13 -0
  360. package/dist/core/schemas/builders/primitives/number.d.ts +1 -0
  361. package/dist/core/schemas/builders/primitives/number.js +25 -0
  362. package/dist/core/schemas/builders/primitives/string.d.ts +1 -0
  363. package/dist/core/schemas/builders/primitives/string.js +25 -0
  364. package/dist/core/schemas/builders/primitives/unknown.d.ts +1 -0
  365. package/dist/core/schemas/builders/primitives/unknown.js +6 -0
  366. package/dist/core/schemas/builders/record/index.d.ts +2 -0
  367. package/dist/core/schemas/builders/record/index.js +5 -0
  368. package/dist/core/schemas/builders/record/record.d.ts +3 -0
  369. package/dist/core/schemas/builders/record/record.js +95 -0
  370. package/dist/core/schemas/builders/record/types.d.ts +4 -0
  371. package/dist/core/schemas/builders/record/types.js +2 -0
  372. package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
  373. package/dist/core/schemas/builders/schema-utils/JsonError.js +12 -0
  374. package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
  375. package/dist/core/schemas/builders/schema-utils/ParseError.js +12 -0
  376. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
  377. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +82 -0
  378. package/dist/core/schemas/builders/schema-utils/index.d.ts +4 -0
  379. package/dist/core/schemas/builders/schema-utils/index.js +11 -0
  380. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
  381. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
  382. package/dist/core/schemas/builders/set/index.d.ts +1 -0
  383. package/dist/core/schemas/builders/set/index.js +5 -0
  384. package/dist/core/schemas/builders/set/set.d.ts +2 -0
  385. package/dist/core/schemas/builders/set/set.js +44 -0
  386. package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
  387. package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -0
  388. package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
  389. package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -0
  390. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
  391. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +40 -0
  392. package/dist/core/schemas/builders/union/discriminant.d.ts +5 -0
  393. package/dist/core/schemas/builders/union/discriminant.js +10 -0
  394. package/dist/core/schemas/builders/union/index.d.ts +4 -0
  395. package/dist/core/schemas/builders/union/index.js +7 -0
  396. package/dist/core/schemas/builders/union/types.d.ts +13 -0
  397. package/dist/core/schemas/builders/union/types.js +2 -0
  398. package/dist/core/schemas/builders/union/union.d.ts +4 -0
  399. package/dist/core/schemas/builders/union/union.js +130 -0
  400. package/dist/core/schemas/index.d.ts +2 -0
  401. package/dist/core/schemas/index.js +17 -0
  402. package/dist/core/schemas/utils/MaybePromise.d.ts +1 -0
  403. package/dist/core/schemas/utils/MaybePromise.js +2 -0
  404. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
  405. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
  406. package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
  407. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
  408. package/dist/core/schemas/utils/entries.d.ts +1 -0
  409. package/dist/core/schemas/utils/entries.js +7 -0
  410. package/dist/core/schemas/utils/filterObject.d.ts +1 -0
  411. package/dist/core/schemas/utils/filterObject.js +14 -0
  412. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
  413. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +28 -0
  414. package/dist/core/schemas/utils/isPlainObject.d.ts +1 -0
  415. package/dist/core/schemas/utils/isPlainObject.js +18 -0
  416. package/dist/core/schemas/utils/keys.d.ts +1 -0
  417. package/dist/core/schemas/utils/keys.js +7 -0
  418. package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
  419. package/dist/core/schemas/utils/maybeSkipValidation.js +28 -0
  420. package/dist/core/schemas/utils/partition.d.ts +1 -0
  421. package/dist/core/schemas/utils/partition.js +16 -0
  422. package/dist/index.d.ts +2 -0
  423. package/dist/index.js +29 -0
  424. package/dist/serialization/index.d.ts +1 -0
  425. package/dist/serialization/index.js +17 -0
  426. package/dist/serialization/resources/commons/index.d.ts +1 -0
  427. package/dist/serialization/resources/commons/index.js +17 -0
  428. package/dist/serialization/resources/commons/types/OrganizationId.d.ts +10 -0
  429. package/dist/serialization/resources/commons/types/OrganizationId.js +35 -0
  430. package/dist/serialization/resources/commons/types/UserId.d.ts +10 -0
  431. package/dist/serialization/resources/commons/types/UserId.js +37 -0
  432. package/dist/serialization/resources/commons/types/index.d.ts +2 -0
  433. package/dist/serialization/resources/commons/types/index.js +18 -0
  434. package/dist/serialization/resources/index.d.ts +10 -0
  435. package/dist/serialization/resources/index.js +39 -0
  436. package/dist/serialization/resources/organization/client/addUser.d.ts +16 -0
  437. package/dist/serialization/resources/organization/client/addUser.js +61 -0
  438. package/dist/serialization/resources/organization/client/create.d.ts +16 -0
  439. package/dist/serialization/resources/organization/client/create.js +61 -0
  440. package/dist/serialization/resources/organization/client/get.d.ts +13 -0
  441. package/dist/serialization/resources/organization/client/get.js +58 -0
  442. package/dist/serialization/resources/organization/client/getMyOrganizationFromScopedToken.d.ts +13 -0
  443. package/dist/serialization/resources/organization/client/getMyOrganizationFromScopedToken.js +58 -0
  444. package/dist/serialization/resources/organization/client/getOrgIdsFromToken.d.ts +11 -0
  445. package/dist/serialization/resources/organization/client/getOrgIdsFromToken.js +32 -0
  446. package/dist/serialization/resources/organization/client/index.d.ts +10 -0
  447. package/dist/serialization/resources/organization/client/index.js +39 -0
  448. package/dist/serialization/resources/organization/client/inviteUser.d.ts +16 -0
  449. package/dist/serialization/resources/organization/client/inviteUser.js +61 -0
  450. package/dist/serialization/resources/organization/client/isMember.d.ts +9 -0
  451. package/dist/serialization/resources/organization/client/isMember.js +31 -0
  452. package/dist/serialization/resources/organization/client/removeUser.d.ts +16 -0
  453. package/dist/serialization/resources/organization/client/removeUser.js +61 -0
  454. package/dist/serialization/resources/organization/client/requests/AddUserToOrgRequest.d.ts +15 -0
  455. package/dist/serialization/resources/organization/client/requests/AddUserToOrgRequest.js +36 -0
  456. package/dist/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +15 -0
  457. package/dist/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +36 -0
  458. package/dist/serialization/resources/organization/client/requests/InviteUserToOrgRequest.d.ts +14 -0
  459. package/dist/serialization/resources/organization/client/requests/InviteUserToOrgRequest.js +35 -0
  460. package/dist/serialization/resources/organization/client/requests/RemoveUserFromOrgRequest.d.ts +14 -0
  461. package/dist/serialization/resources/organization/client/requests/RemoveUserFromOrgRequest.js +35 -0
  462. package/dist/serialization/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +24 -0
  463. package/dist/serialization/resources/organization/client/requests/UpdateOrganizationRequest.js +45 -0
  464. package/dist/serialization/resources/organization/client/requests/index.d.ts +5 -0
  465. package/dist/serialization/resources/organization/client/requests/index.js +13 -0
  466. package/dist/serialization/resources/organization/client/update.d.ts +13 -0
  467. package/dist/serialization/resources/organization/client/update.js +58 -0
  468. package/dist/serialization/resources/organization/index.d.ts +2 -0
  469. package/dist/serialization/resources/organization/index.js +18 -0
  470. package/dist/serialization/resources/organization/types/LightweightUser.d.ts +15 -0
  471. package/dist/serialization/resources/organization/types/LightweightUser.js +36 -0
  472. package/dist/serialization/resources/organization/types/Organization.d.ts +30 -0
  473. package/dist/serialization/resources/organization/types/Organization.js +51 -0
  474. package/dist/serialization/resources/organization/types/index.d.ts +2 -0
  475. package/dist/serialization/resources/organization/types/index.js +18 -0
  476. package/dist/serialization/resources/registry/client/generateRegistryTokens.d.ts +16 -0
  477. package/dist/serialization/resources/registry/client/generateRegistryTokens.js +61 -0
  478. package/dist/serialization/resources/registry/client/hasRegistryPermission.d.ts +20 -0
  479. package/dist/serialization/resources/registry/client/hasRegistryPermission.js +62 -0
  480. package/dist/serialization/resources/registry/client/index.d.ts +4 -0
  481. package/dist/serialization/resources/registry/client/index.js +33 -0
  482. package/dist/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.d.ts +15 -0
  483. package/dist/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.js +36 -0
  484. package/dist/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.d.ts +13 -0
  485. package/dist/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.js +34 -0
  486. package/dist/serialization/resources/registry/client/requests/RevokeTokenRequest.d.ts +14 -0
  487. package/dist/serialization/resources/registry/client/requests/RevokeTokenRequest.js +35 -0
  488. package/dist/serialization/resources/registry/client/requests/index.d.ts +3 -0
  489. package/dist/serialization/resources/registry/client/requests/index.js +9 -0
  490. package/dist/serialization/resources/registry/client/revokeToken.d.ts +16 -0
  491. package/dist/serialization/resources/registry/client/revokeToken.js +61 -0
  492. package/dist/serialization/resources/registry/index.d.ts +2 -0
  493. package/dist/serialization/resources/registry/index.js +18 -0
  494. package/dist/serialization/resources/registry/types/MavenRegistryToken.d.ts +13 -0
  495. package/dist/serialization/resources/registry/types/MavenRegistryToken.js +34 -0
  496. package/dist/serialization/resources/registry/types/NpmRegistryToken.d.ts +12 -0
  497. package/dist/serialization/resources/registry/types/NpmRegistryToken.js +33 -0
  498. package/dist/serialization/resources/registry/types/PypiRegistryToken.d.ts +13 -0
  499. package/dist/serialization/resources/registry/types/PypiRegistryToken.js +34 -0
  500. package/dist/serialization/resources/registry/types/RegistryToken.d.ts +22 -0
  501. package/dist/serialization/resources/registry/types/RegistryToken.js +43 -0
  502. package/dist/serialization/resources/registry/types/RegistryTokens.d.ts +17 -0
  503. package/dist/serialization/resources/registry/types/RegistryTokens.js +38 -0
  504. package/dist/serialization/resources/registry/types/index.d.ts +5 -0
  505. package/dist/serialization/resources/registry/types/index.js +21 -0
  506. package/dist/serialization/resources/user/index.d.ts +1 -0
  507. package/dist/serialization/resources/user/index.js +17 -0
  508. package/dist/serialization/resources/user/types/OrganizationsPage.d.ts +14 -0
  509. package/dist/serialization/resources/user/types/OrganizationsPage.js +35 -0
  510. package/dist/serialization/resources/user/types/User.d.ts +16 -0
  511. package/dist/serialization/resources/user/types/User.js +37 -0
  512. package/dist/serialization/resources/user/types/index.d.ts +2 -0
  513. package/dist/serialization/resources/user/types/index.js +18 -0
  514. package/dist/version.d.ts +1 -0
  515. package/dist/version.js +4 -0
  516. package/jest.config.js +5 -0
  517. package/package.json +28 -18
  518. package/serialization/resources/commons/types/OrganizationId.d.ts +2 -2
  519. package/serialization/resources/commons/types/OrganizationId.js +2 -2
  520. package/serialization/resources/commons/types/UserId.d.ts +2 -2
  521. package/serialization/resources/commons/types/UserId.js +2 -2
  522. package/serialization/resources/organization/client/addUser.d.ts +2 -2
  523. package/serialization/resources/organization/client/addUser.js +18 -4
  524. package/serialization/resources/organization/client/create.d.ts +2 -2
  525. package/serialization/resources/organization/client/create.js +18 -4
  526. package/serialization/resources/organization/client/get.d.ts +2 -2
  527. package/serialization/resources/organization/client/get.js +17 -3
  528. package/serialization/resources/organization/client/getMyOrganizationFromScopedToken.d.ts +2 -2
  529. package/serialization/resources/organization/client/getMyOrganizationFromScopedToken.js +17 -3
  530. package/serialization/resources/organization/client/getOrgIdsFromToken.d.ts +4 -3
  531. package/serialization/resources/organization/client/getOrgIdsFromToken.js +2 -1
  532. package/serialization/resources/organization/client/inviteUser.d.ts +2 -2
  533. package/serialization/resources/organization/client/inviteUser.js +18 -4
  534. package/serialization/resources/organization/client/isMember.d.ts +1 -1
  535. package/serialization/resources/organization/client/removeUser.d.ts +2 -2
  536. package/serialization/resources/organization/client/removeUser.js +18 -4
  537. package/serialization/resources/organization/client/requests/AddUserToOrgRequest.d.ts +6 -4
  538. package/serialization/resources/organization/client/requests/AddUserToOrgRequest.js +4 -2
  539. package/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +4 -3
  540. package/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +2 -1
  541. package/serialization/resources/organization/client/requests/InviteUserToOrgRequest.d.ts +4 -3
  542. package/serialization/resources/organization/client/requests/InviteUserToOrgRequest.js +2 -1
  543. package/serialization/resources/organization/client/requests/RemoveUserFromOrgRequest.d.ts +4 -3
  544. package/serialization/resources/organization/client/requests/RemoveUserFromOrgRequest.js +2 -1
  545. package/serialization/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +2 -2
  546. package/serialization/resources/organization/client/update.d.ts +2 -2
  547. package/serialization/resources/organization/client/update.js +17 -3
  548. package/serialization/resources/organization/types/LightweightUser.d.ts +2 -2
  549. package/serialization/resources/organization/types/Organization.d.ts +6 -4
  550. package/serialization/resources/organization/types/Organization.js +4 -2
  551. package/serialization/resources/registry/client/generateRegistryTokens.d.ts +2 -2
  552. package/serialization/resources/registry/client/generateRegistryTokens.js +18 -4
  553. package/serialization/resources/registry/client/hasRegistryPermission.d.ts +2 -2
  554. package/serialization/resources/registry/client/hasRegistryPermission.js +18 -4
  555. package/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.d.ts +6 -4
  556. package/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.js +4 -2
  557. package/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.d.ts +4 -3
  558. package/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.js +2 -1
  559. package/serialization/resources/registry/client/requests/RevokeTokenRequest.d.ts +4 -3
  560. package/serialization/resources/registry/client/requests/RevokeTokenRequest.js +2 -1
  561. package/serialization/resources/registry/client/revokeToken.d.ts +2 -2
  562. package/serialization/resources/registry/client/revokeToken.js +18 -4
  563. package/serialization/resources/registry/types/MavenRegistryToken.d.ts +2 -2
  564. package/serialization/resources/registry/types/NpmRegistryToken.d.ts +2 -2
  565. package/serialization/resources/registry/types/PypiRegistryToken.d.ts +2 -2
  566. package/serialization/resources/registry/types/RegistryToken.d.ts +8 -5
  567. package/serialization/resources/registry/types/RegistryToken.js +8 -17
  568. package/serialization/resources/registry/types/RegistryTokens.d.ts +8 -5
  569. package/serialization/resources/registry/types/RegistryTokens.js +6 -3
  570. package/serialization/resources/user/types/OrganizationsPage.d.ts +4 -3
  571. package/serialization/resources/user/types/OrganizationsPage.js +2 -1
  572. package/serialization/resources/user/types/User.d.ts +4 -3
  573. package/serialization/resources/user/types/User.js +2 -1
  574. package/version.d.ts +1 -0
  575. package/version.js +4 -0
  576. package/core/schemas/utils/OptionalRecord.d.ts +0 -1
  577. /package/core/schemas/{utils/OptionalRecord.js → builders/undiscriminated-union/types.js} +0 -0
@@ -0,0 +1,582 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.Organization = void 0;
42
+ const core = __importStar(require("../../../../core"));
43
+ const FernVenusApi = __importStar(require("../../../index"));
44
+ const serializers = __importStar(require("../../../../serialization/index"));
45
+ const url_join_1 = __importDefault(require("url-join"));
46
+ class Organization {
47
+ constructor(_options) {
48
+ this._options = _options;
49
+ }
50
+ /**
51
+ * @param {FernVenusApi.CreateOrganizationRequest} request
52
+ * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
53
+ *
54
+ * @example
55
+ * await client.organization.create({
56
+ * organizationId: FernVenusApi.OrganizationId("string"),
57
+ * artifactReadRequiresToken: true,
58
+ * enableGithubConnection: true
59
+ * })
60
+ */
61
+ create(request, requestOptions) {
62
+ var _a;
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ const _response = yield core.fetcher({
65
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations/create"),
66
+ method: "POST",
67
+ headers: {
68
+ Authorization: yield this._getAuthorizationHeader(),
69
+ "X-Fern-Language": "JavaScript",
70
+ "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
71
+ "X-Fern-SDK-Version": "0.10.1-2-g8c943d4",
72
+ "X-Fern-Runtime": core.RUNTIME.type,
73
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
74
+ },
75
+ contentType: "application/json",
76
+ requestType: "json",
77
+ body: serializers.CreateOrganizationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
78
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
79
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
80
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
+ });
82
+ if (_response.ok) {
83
+ return {
84
+ ok: true,
85
+ body: undefined,
86
+ };
87
+ }
88
+ if (_response.error.reason === "status-code") {
89
+ switch ((_a = _response.error.body) === null || _a === void 0 ? void 0 : _a.error) {
90
+ case "UnauthorizedError":
91
+ case "OrganizationAlreadyExistsError":
92
+ return {
93
+ ok: false,
94
+ error: serializers.organization.create.Error.parseOrThrow(_response.error.body, {
95
+ unrecognizedObjectKeys: "passthrough",
96
+ allowUnrecognizedUnionMembers: true,
97
+ allowUnrecognizedEnumValues: true,
98
+ breadcrumbsPrefix: ["response"],
99
+ }),
100
+ };
101
+ }
102
+ }
103
+ return {
104
+ ok: false,
105
+ error: FernVenusApi.organization.create.Error._unknown(_response.error),
106
+ };
107
+ });
108
+ }
109
+ /**
110
+ * @param {FernVenusApi.OrganizationId} orgId
111
+ * @param {FernVenusApi.UpdateOrganizationRequest} request
112
+ * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
113
+ *
114
+ * @example
115
+ * await client.organization.update(FernVenusApi.OrganizationId("string"), {
116
+ * artifactReadRequiresToken: true,
117
+ * isWhitelabeled: true,
118
+ * previewEnabled: true,
119
+ * snippetsEnabled: true,
120
+ * snippetUnitTestsEnabled: true,
121
+ * snippetsApiAccessEnabled: true,
122
+ * snippetTemplatesAccessEnabled: true,
123
+ * paginationEnabled: true,
124
+ * changeLogEnabled: true,
125
+ * isFernbotCanary: true,
126
+ * oauthClientEnabled: true,
127
+ * apiPlaygroundEnabled: true,
128
+ * workosOrganizationId: "string"
129
+ * })
130
+ */
131
+ update(orgId, request = {}, requestOptions) {
132
+ var _a;
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ const _response = yield core.fetcher({
135
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/organizations/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId))}/update`),
136
+ method: "POST",
137
+ headers: {
138
+ Authorization: yield this._getAuthorizationHeader(),
139
+ "X-Fern-Language": "JavaScript",
140
+ "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
141
+ "X-Fern-SDK-Version": "0.10.1-2-g8c943d4",
142
+ "X-Fern-Runtime": core.RUNTIME.type,
143
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
144
+ },
145
+ contentType: "application/json",
146
+ requestType: "json",
147
+ body: serializers.UpdateOrganizationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
148
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
149
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
150
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
151
+ });
152
+ if (_response.ok) {
153
+ return {
154
+ ok: true,
155
+ body: undefined,
156
+ };
157
+ }
158
+ if (_response.error.reason === "status-code") {
159
+ switch ((_a = _response.error.body) === null || _a === void 0 ? void 0 : _a.error) {
160
+ case "UnauthorizedError":
161
+ return {
162
+ ok: false,
163
+ error: serializers.organization.update.Error.parseOrThrow(_response.error.body, {
164
+ unrecognizedObjectKeys: "passthrough",
165
+ allowUnrecognizedUnionMembers: true,
166
+ allowUnrecognizedEnumValues: true,
167
+ breadcrumbsPrefix: ["response"],
168
+ }),
169
+ };
170
+ }
171
+ }
172
+ return {
173
+ ok: false,
174
+ error: FernVenusApi.organization.update.Error._unknown(_response.error),
175
+ };
176
+ });
177
+ }
178
+ /**
179
+ * @param {FernVenusApi.OrganizationId} orgId
180
+ * @param {FernVenusApi.GetOrganizationRequest} request
181
+ * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
182
+ *
183
+ * @example
184
+ * await client.organization.get(FernVenusApi.OrganizationId("string"), {
185
+ * shouldIncludeFernUsers: true
186
+ * })
187
+ */
188
+ get(orgId, request = {}, requestOptions) {
189
+ var _a;
190
+ return __awaiter(this, void 0, void 0, function* () {
191
+ const { shouldIncludeFernUsers } = request;
192
+ const _queryParams = {};
193
+ if (shouldIncludeFernUsers != null) {
194
+ _queryParams["shouldIncludeFernUsers"] = shouldIncludeFernUsers.toString();
195
+ }
196
+ const _response = yield core.fetcher({
197
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/organizations/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId))}`),
198
+ method: "GET",
199
+ headers: {
200
+ Authorization: yield this._getAuthorizationHeader(),
201
+ "X-Fern-Language": "JavaScript",
202
+ "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
203
+ "X-Fern-SDK-Version": "0.10.1-2-g8c943d4",
204
+ "X-Fern-Runtime": core.RUNTIME.type,
205
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
206
+ },
207
+ contentType: "application/json",
208
+ queryParameters: _queryParams,
209
+ requestType: "json",
210
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
211
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
212
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
213
+ });
214
+ if (_response.ok) {
215
+ return {
216
+ ok: true,
217
+ body: serializers.Organization.parseOrThrow(_response.body, {
218
+ unrecognizedObjectKeys: "passthrough",
219
+ allowUnrecognizedUnionMembers: true,
220
+ allowUnrecognizedEnumValues: true,
221
+ breadcrumbsPrefix: ["response"],
222
+ }),
223
+ };
224
+ }
225
+ if (_response.error.reason === "status-code") {
226
+ switch ((_a = _response.error.body) === null || _a === void 0 ? void 0 : _a.error) {
227
+ case "UnauthorizedError":
228
+ return {
229
+ ok: false,
230
+ error: serializers.organization.get.Error.parseOrThrow(_response.error.body, {
231
+ unrecognizedObjectKeys: "passthrough",
232
+ allowUnrecognizedUnionMembers: true,
233
+ allowUnrecognizedEnumValues: true,
234
+ breadcrumbsPrefix: ["response"],
235
+ }),
236
+ };
237
+ }
238
+ }
239
+ return {
240
+ ok: false,
241
+ error: FernVenusApi.organization.get.Error._unknown(_response.error),
242
+ };
243
+ });
244
+ }
245
+ /**
246
+ * @param {FernVenusApi.OrganizationId} organizationId
247
+ * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
248
+ *
249
+ * @example
250
+ * await client.organization.isMember(FernVenusApi.OrganizationId("string"))
251
+ */
252
+ isMember(organizationId, requestOptions) {
253
+ return __awaiter(this, void 0, void 0, function* () {
254
+ const _response = yield core.fetcher({
255
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/organizations/belongs-to-organization/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(organizationId))}`),
256
+ method: "POST",
257
+ headers: {
258
+ Authorization: yield this._getAuthorizationHeader(),
259
+ "X-Fern-Language": "JavaScript",
260
+ "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
261
+ "X-Fern-SDK-Version": "0.10.1-2-g8c943d4",
262
+ "X-Fern-Runtime": core.RUNTIME.type,
263
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
264
+ },
265
+ contentType: "application/json",
266
+ requestType: "json",
267
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
268
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
269
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
270
+ });
271
+ if (_response.ok) {
272
+ return {
273
+ ok: true,
274
+ body: serializers.organization.isMember.Response.parseOrThrow(_response.body, {
275
+ unrecognizedObjectKeys: "passthrough",
276
+ allowUnrecognizedUnionMembers: true,
277
+ allowUnrecognizedEnumValues: true,
278
+ breadcrumbsPrefix: ["response"],
279
+ }),
280
+ };
281
+ }
282
+ return {
283
+ ok: false,
284
+ error: FernVenusApi.organization.isMember.Error._unknown(_response.error),
285
+ };
286
+ });
287
+ }
288
+ /**
289
+ * Returns the org for a scoped token. The token is limited to one organization.
290
+ *
291
+ * @param {FernVenusApi.GetMyOrganizationFromScopedToken} request
292
+ * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
293
+ *
294
+ * @example
295
+ * await client.organization.getMyOrganizationFromScopedToken({
296
+ * shouldIncludeFernUsers: true
297
+ * })
298
+ */
299
+ getMyOrganizationFromScopedToken(request = {}, requestOptions) {
300
+ var _a;
301
+ return __awaiter(this, void 0, void 0, function* () {
302
+ const { shouldIncludeFernUsers } = request;
303
+ const _queryParams = {};
304
+ if (shouldIncludeFernUsers != null) {
305
+ _queryParams["shouldIncludeFernUsers"] = shouldIncludeFernUsers.toString();
306
+ }
307
+ const _response = yield core.fetcher({
308
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations/myself"),
309
+ method: "POST",
310
+ headers: {
311
+ Authorization: yield this._getAuthorizationHeader(),
312
+ "X-Fern-Language": "JavaScript",
313
+ "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
314
+ "X-Fern-SDK-Version": "0.10.1-2-g8c943d4",
315
+ "X-Fern-Runtime": core.RUNTIME.type,
316
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
317
+ },
318
+ contentType: "application/json",
319
+ queryParameters: _queryParams,
320
+ requestType: "json",
321
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
322
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
323
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
324
+ });
325
+ if (_response.ok) {
326
+ return {
327
+ ok: true,
328
+ body: serializers.Organization.parseOrThrow(_response.body, {
329
+ unrecognizedObjectKeys: "passthrough",
330
+ allowUnrecognizedUnionMembers: true,
331
+ allowUnrecognizedEnumValues: true,
332
+ breadcrumbsPrefix: ["response"],
333
+ }),
334
+ };
335
+ }
336
+ if (_response.error.reason === "status-code") {
337
+ switch ((_a = _response.error.body) === null || _a === void 0 ? void 0 : _a.error) {
338
+ case "UnauthorizedError":
339
+ return {
340
+ ok: false,
341
+ error: serializers.organization.getMyOrganizationFromScopedToken.Error.parseOrThrow(_response.error.body, {
342
+ unrecognizedObjectKeys: "passthrough",
343
+ allowUnrecognizedUnionMembers: true,
344
+ allowUnrecognizedEnumValues: true,
345
+ breadcrumbsPrefix: ["response"],
346
+ }),
347
+ };
348
+ }
349
+ }
350
+ return {
351
+ ok: false,
352
+ error: FernVenusApi.organization.getMyOrganizationFromScopedToken.Error._unknown(_response.error),
353
+ };
354
+ });
355
+ }
356
+ /**
357
+ * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
358
+ *
359
+ * @example
360
+ * await client.organization.getOrgIdsFromToken()
361
+ */
362
+ getOrgIdsFromToken(requestOptions) {
363
+ return __awaiter(this, void 0, void 0, function* () {
364
+ const _response = yield core.fetcher({
365
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations"),
366
+ method: "POST",
367
+ headers: {
368
+ Authorization: yield this._getAuthorizationHeader(),
369
+ "X-Fern-Language": "JavaScript",
370
+ "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
371
+ "X-Fern-SDK-Version": "0.10.1-2-g8c943d4",
372
+ "X-Fern-Runtime": core.RUNTIME.type,
373
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
374
+ },
375
+ contentType: "application/json",
376
+ requestType: "json",
377
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
378
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
379
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
380
+ });
381
+ if (_response.ok) {
382
+ return {
383
+ ok: true,
384
+ body: serializers.organization.getOrgIdsFromToken.Response.parseOrThrow(_response.body, {
385
+ unrecognizedObjectKeys: "passthrough",
386
+ allowUnrecognizedUnionMembers: true,
387
+ allowUnrecognizedEnumValues: true,
388
+ breadcrumbsPrefix: ["response"],
389
+ }),
390
+ };
391
+ }
392
+ return {
393
+ ok: false,
394
+ error: FernVenusApi.organization.getOrgIdsFromToken.Error._unknown(_response.error),
395
+ };
396
+ });
397
+ }
398
+ /**
399
+ * @param {FernVenusApi.AddUserToOrgRequest} request
400
+ * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
401
+ *
402
+ * @example
403
+ * await client.organization.addUser({
404
+ * userId: FernVenusApi.UserId("string"),
405
+ * orgId: FernVenusApi.OrganizationId("string")
406
+ * })
407
+ */
408
+ addUser(request, requestOptions) {
409
+ var _a;
410
+ return __awaiter(this, void 0, void 0, function* () {
411
+ const _response = yield core.fetcher({
412
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations/add-user"),
413
+ method: "POST",
414
+ headers: {
415
+ Authorization: yield this._getAuthorizationHeader(),
416
+ "X-Fern-Language": "JavaScript",
417
+ "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
418
+ "X-Fern-SDK-Version": "0.10.1-2-g8c943d4",
419
+ "X-Fern-Runtime": core.RUNTIME.type,
420
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
421
+ },
422
+ contentType: "application/json",
423
+ requestType: "json",
424
+ body: serializers.AddUserToOrgRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
425
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
426
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
427
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
428
+ });
429
+ if (_response.ok) {
430
+ return {
431
+ ok: true,
432
+ body: undefined,
433
+ };
434
+ }
435
+ if (_response.error.reason === "status-code") {
436
+ switch ((_a = _response.error.body) === null || _a === void 0 ? void 0 : _a.error) {
437
+ case "UnauthorizedError":
438
+ case "UserIdDoesNotExistError":
439
+ return {
440
+ ok: false,
441
+ error: serializers.organization.addUser.Error.parseOrThrow(_response.error.body, {
442
+ unrecognizedObjectKeys: "passthrough",
443
+ allowUnrecognizedUnionMembers: true,
444
+ allowUnrecognizedEnumValues: true,
445
+ breadcrumbsPrefix: ["response"],
446
+ }),
447
+ };
448
+ }
449
+ }
450
+ return {
451
+ ok: false,
452
+ error: FernVenusApi.organization.addUser.Error._unknown(_response.error),
453
+ };
454
+ });
455
+ }
456
+ /**
457
+ * @param {FernVenusApi.InviteUserToOrgRequest} request
458
+ * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
459
+ *
460
+ * @example
461
+ * await client.organization.inviteUser({
462
+ * emailAddress: "string",
463
+ * auth0OrgId: FernVenusApi.OrganizationId("string")
464
+ * })
465
+ */
466
+ inviteUser(request, requestOptions) {
467
+ var _a;
468
+ return __awaiter(this, void 0, void 0, function* () {
469
+ const _response = yield core.fetcher({
470
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations/invite"),
471
+ method: "POST",
472
+ headers: {
473
+ Authorization: yield this._getAuthorizationHeader(),
474
+ "X-Fern-Language": "JavaScript",
475
+ "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
476
+ "X-Fern-SDK-Version": "0.10.1-2-g8c943d4",
477
+ "X-Fern-Runtime": core.RUNTIME.type,
478
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
479
+ },
480
+ contentType: "application/json",
481
+ requestType: "json",
482
+ body: serializers.InviteUserToOrgRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
483
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
484
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
485
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
486
+ });
487
+ if (_response.ok) {
488
+ return {
489
+ ok: true,
490
+ body: undefined,
491
+ };
492
+ }
493
+ if (_response.error.reason === "status-code") {
494
+ switch ((_a = _response.error.body) === null || _a === void 0 ? void 0 : _a.error) {
495
+ case "UnauthorizedError":
496
+ case "UserIdDoesNotExistError":
497
+ return {
498
+ ok: false,
499
+ error: serializers.organization.inviteUser.Error.parseOrThrow(_response.error.body, {
500
+ unrecognizedObjectKeys: "passthrough",
501
+ allowUnrecognizedUnionMembers: true,
502
+ allowUnrecognizedEnumValues: true,
503
+ breadcrumbsPrefix: ["response"],
504
+ }),
505
+ };
506
+ }
507
+ }
508
+ return {
509
+ ok: false,
510
+ error: FernVenusApi.organization.inviteUser.Error._unknown(_response.error),
511
+ };
512
+ });
513
+ }
514
+ /**
515
+ * @param {FernVenusApi.RemoveUserFromOrgRequest} request
516
+ * @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
517
+ *
518
+ * @example
519
+ * await client.organization.removeUser({
520
+ * userId: "string",
521
+ * auth0OrgId: FernVenusApi.OrganizationId("string")
522
+ * })
523
+ */
524
+ removeUser(request, requestOptions) {
525
+ var _a;
526
+ return __awaiter(this, void 0, void 0, function* () {
527
+ const _response = yield core.fetcher({
528
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations/user"),
529
+ method: "DELETE",
530
+ headers: {
531
+ Authorization: yield this._getAuthorizationHeader(),
532
+ "X-Fern-Language": "JavaScript",
533
+ "X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
534
+ "X-Fern-SDK-Version": "0.10.1-2-g8c943d4",
535
+ "X-Fern-Runtime": core.RUNTIME.type,
536
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
537
+ },
538
+ contentType: "application/json",
539
+ requestType: "json",
540
+ body: serializers.RemoveUserFromOrgRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
541
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
542
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
543
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
544
+ });
545
+ if (_response.ok) {
546
+ return {
547
+ ok: true,
548
+ body: undefined,
549
+ };
550
+ }
551
+ if (_response.error.reason === "status-code") {
552
+ switch ((_a = _response.error.body) === null || _a === void 0 ? void 0 : _a.error) {
553
+ case "UnauthorizedError":
554
+ case "UserIdDoesNotExistError":
555
+ return {
556
+ ok: false,
557
+ error: serializers.organization.removeUser.Error.parseOrThrow(_response.error.body, {
558
+ unrecognizedObjectKeys: "passthrough",
559
+ allowUnrecognizedUnionMembers: true,
560
+ allowUnrecognizedEnumValues: true,
561
+ breadcrumbsPrefix: ["response"],
562
+ }),
563
+ };
564
+ }
565
+ }
566
+ return {
567
+ ok: false,
568
+ error: FernVenusApi.organization.removeUser.Error._unknown(_response.error),
569
+ };
570
+ });
571
+ }
572
+ _getAuthorizationHeader() {
573
+ return __awaiter(this, void 0, void 0, function* () {
574
+ const bearer = yield core.Supplier.get(this._options.token);
575
+ if (bearer != null) {
576
+ return `Bearer ${bearer}`;
577
+ }
578
+ return undefined;
579
+ });
580
+ }
581
+ }
582
+ exports.Organization = Organization;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as FernVenusApi from "../../../index";
5
+ import * as core from "../../../../core";
6
+ export declare type Error = FernVenusApi.organization.addUser.Error.UnauthorizedError | FernVenusApi.organization.addUser.Error.UserIdDoesNotExistError | FernVenusApi.organization.addUser.Error._Unknown;
7
+ export declare namespace Error {
8
+ interface UnauthorizedError extends _Utils {
9
+ error: "UnauthorizedError";
10
+ }
11
+ interface UserIdDoesNotExistError extends _Utils {
12
+ error: "UserIdDoesNotExistError";
13
+ }
14
+ interface _Unknown extends _Utils {
15
+ error: void;
16
+ content: core.Fetcher.Error;
17
+ }
18
+ interface _Utils {
19
+ _visit: <_Result>(visitor: FernVenusApi.organization.addUser.Error._Visitor<_Result>) => _Result;
20
+ }
21
+ interface _Visitor<_Result> {
22
+ unauthorizedError: () => _Result;
23
+ userIdDoesNotExistError: () => _Result;
24
+ _other: (value: core.Fetcher.Error) => _Result;
25
+ }
26
+ }
27
+ export declare const Error: {
28
+ readonly unauthorizedError: () => FernVenusApi.organization.addUser.Error.UnauthorizedError;
29
+ readonly userIdDoesNotExistError: () => FernVenusApi.organization.addUser.Error.UserIdDoesNotExistError;
30
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.organization.addUser.Error._Unknown;
31
+ readonly _visit: <_Result>(value: FernVenusApi.organization.addUser.Error, visitor: FernVenusApi.organization.addUser.Error._Visitor<_Result>) => _Result;
32
+ };
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Error = void 0;
30
+ const FernVenusApi = __importStar(require("../../../index"));
31
+ exports.Error = {
32
+ unauthorizedError: () => {
33
+ return {
34
+ error: "UnauthorizedError",
35
+ _visit: function (visitor) {
36
+ return FernVenusApi.organization.addUser.Error._visit(this, visitor);
37
+ },
38
+ };
39
+ },
40
+ userIdDoesNotExistError: () => {
41
+ return {
42
+ error: "UserIdDoesNotExistError",
43
+ _visit: function (visitor) {
44
+ return FernVenusApi.organization.addUser.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.addUser.Error._visit(this, visitor);
54
+ },
55
+ };
56
+ },
57
+ _visit: (value, visitor) => {
58
+ switch (value.error) {
59
+ case "UnauthorizedError":
60
+ return visitor.unauthorizedError();
61
+ case "UserIdDoesNotExistError":
62
+ return visitor.userIdDoesNotExistError();
63
+ default:
64
+ return visitor._other(value);
65
+ }
66
+ },
67
+ };