@fern-api/venus-api-sdk 0.13.4 → 0.14.0-1-g7a86031

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 (331) hide show
  1. package/Client.d.ts +7 -3
  2. package/api/resources/commons/types/OrganizationId.d.ts +1 -1
  3. package/api/resources/commons/types/OrganizationId.js +1 -2
  4. package/api/resources/commons/types/UserId.d.ts +1 -1
  5. package/api/resources/commons/types/UserId.js +1 -2
  6. package/api/resources/index.js +17 -7
  7. package/api/resources/organization/client/Client.d.ts +8 -1
  8. package/api/resources/organization/client/Client.js +66 -109
  9. package/api/resources/organization/client/addUser.d.ts +1 -1
  10. package/api/resources/organization/client/addUser.js +17 -7
  11. package/api/resources/organization/client/create.d.ts +1 -1
  12. package/api/resources/organization/client/create.js +17 -7
  13. package/api/resources/organization/client/get.d.ts +1 -1
  14. package/api/resources/organization/client/get.js +17 -7
  15. package/api/resources/organization/client/getMyOrganizationFromScopedToken.d.ts +1 -1
  16. package/api/resources/organization/client/getMyOrganizationFromScopedToken.js +17 -7
  17. package/api/resources/organization/client/getOrgIdsFromToken.d.ts +1 -1
  18. package/api/resources/organization/client/getOrgIdsFromToken.js +17 -7
  19. package/api/resources/organization/client/index.js +17 -7
  20. package/api/resources/organization/client/inviteUser.d.ts +1 -1
  21. package/api/resources/organization/client/inviteUser.js +17 -7
  22. package/api/resources/organization/client/isMember.d.ts +1 -1
  23. package/api/resources/organization/client/isMember.js +17 -7
  24. package/api/resources/organization/client/removeUser.d.ts +1 -1
  25. package/api/resources/organization/client/removeUser.js +17 -7
  26. package/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +2 -0
  27. package/api/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +6 -0
  28. package/api/resources/organization/client/update.d.ts +1 -1
  29. package/api/resources/organization/client/update.js +17 -7
  30. package/api/resources/organization/types/CreateOrganizationResponse.d.ts +12 -0
  31. package/api/resources/organization/types/CreateOrganizationResponse.js +5 -0
  32. package/api/resources/organization/types/index.d.ts +1 -0
  33. package/api/resources/organization/types/index.js +1 -0
  34. package/api/resources/registry/client/Client.d.ts +4 -0
  35. package/api/resources/registry/client/Client.js +29 -40
  36. package/api/resources/registry/client/generateRegistryTokens.d.ts +1 -1
  37. package/api/resources/registry/client/generateRegistryTokens.js +17 -7
  38. package/api/resources/registry/client/hasRegistryPermission.d.ts +1 -1
  39. package/api/resources/registry/client/hasRegistryPermission.js +17 -7
  40. package/api/resources/registry/client/index.js +17 -7
  41. package/api/resources/registry/client/revokeToken.d.ts +1 -1
  42. package/api/resources/registry/client/revokeToken.js +17 -7
  43. package/api/resources/registry/types/RegistryToken.d.ts +1 -1
  44. package/api/resources/user/client/Client.d.ts +4 -0
  45. package/api/resources/user/client/Client.js +23 -25
  46. package/api/resources/user/client/getMyOrganizations.d.ts +1 -1
  47. package/api/resources/user/client/getMyOrganizations.js +17 -7
  48. package/api/resources/user/client/getMyself.d.ts +1 -1
  49. package/api/resources/user/client/getMyself.js +17 -7
  50. package/api/resources/user/client/index.js +17 -7
  51. package/core/auth/BearerToken.d.ts +1 -1
  52. package/core/fetcher/APIResponse.d.ts +1 -1
  53. package/core/fetcher/Fetcher.d.ts +3 -3
  54. package/core/fetcher/Fetcher.js +6 -5
  55. package/core/fetcher/Supplier.d.ts +1 -1
  56. package/core/fetcher/createRequestUrl.d.ts +1 -1
  57. package/core/fetcher/createRequestUrl.js +1 -2
  58. package/core/fetcher/getFetchFn.js +18 -9
  59. package/core/fetcher/getHeader.js +1 -2
  60. package/core/fetcher/getRequestBody.js +5 -5
  61. package/core/fetcher/getResponseBody.js +4 -2
  62. package/core/fetcher/makeRequest.d.ts +1 -1
  63. package/core/fetcher/requestWithRetries.js +17 -9
  64. package/core/fetcher/signals.d.ts +0 -1
  65. package/core/fetcher/signals.js +2 -3
  66. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
  67. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
  68. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
  69. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
  70. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
  71. package/core/index.js +17 -7
  72. package/core/json.d.ts +15 -0
  73. package/core/json.js +24 -0
  74. package/core/runtime/runtime.d.ts +1 -1
  75. package/core/runtime/runtime.js +51 -41
  76. package/core/schemas/Schema.d.ts +7 -5
  77. package/core/schemas/Schema.js +2 -0
  78. package/core/schemas/builders/bigint/bigint.d.ts +1 -1
  79. package/core/schemas/builders/bigint/bigint.js +22 -19
  80. package/core/schemas/builders/date/date.js +1 -2
  81. package/core/schemas/builders/enum/enum.js +1 -2
  82. package/core/schemas/builders/lazy/lazy.d.ts +1 -1
  83. package/core/schemas/builders/lazy/lazy.js +3 -4
  84. package/core/schemas/builders/lazy/lazyObject.js +1 -2
  85. package/core/schemas/builders/list/list.js +1 -2
  86. package/core/schemas/builders/literals/booleanLiteral.js +1 -2
  87. package/core/schemas/builders/literals/stringLiteral.js +1 -2
  88. package/core/schemas/builders/object/object.d.ts +1 -1
  89. package/core/schemas/builders/object/object.js +31 -3
  90. package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  91. package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  92. package/core/schemas/builders/object/property.js +2 -3
  93. package/core/schemas/builders/object/types.d.ts +16 -11
  94. package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
  95. package/core/schemas/builders/object-like/types.d.ts +1 -1
  96. package/core/schemas/builders/record/record.js +2 -4
  97. package/core/schemas/builders/record/types.d.ts +2 -2
  98. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  99. package/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
  100. package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  101. package/core/schemas/builders/set/set.js +1 -2
  102. package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  103. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
  104. package/core/schemas/builders/union/discriminant.js +1 -2
  105. package/core/schemas/builders/union/types.d.ts +6 -6
  106. package/core/schemas/builders/union/union.d.ts +1 -1
  107. package/core/schemas/builders/union/union.js +1 -2
  108. package/core/schemas/utils/MaybePromise.d.ts +1 -1
  109. package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
  110. package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  111. package/core/schemas/utils/entries.d.ts +1 -1
  112. package/core/schemas/utils/entries.js +1 -2
  113. package/core/schemas/utils/filterObject.d.ts +1 -1
  114. package/core/schemas/utils/filterObject.js +1 -2
  115. package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
  116. package/core/schemas/utils/isPlainObject.js +1 -2
  117. package/core/schemas/utils/keys.d.ts +1 -1
  118. package/core/schemas/utils/keys.js +1 -2
  119. package/core/schemas/utils/maybeSkipValidation.js +1 -2
  120. package/core/schemas/utils/partition.js +1 -2
  121. package/dist/Client.d.ts +7 -3
  122. package/dist/api/resources/commons/types/OrganizationId.d.ts +1 -1
  123. package/dist/api/resources/commons/types/OrganizationId.js +1 -2
  124. package/dist/api/resources/commons/types/UserId.d.ts +1 -1
  125. package/dist/api/resources/commons/types/UserId.js +1 -2
  126. package/dist/api/resources/index.js +17 -7
  127. package/dist/api/resources/organization/client/Client.d.ts +8 -1
  128. package/dist/api/resources/organization/client/Client.js +66 -109
  129. package/dist/api/resources/organization/client/addUser.d.ts +1 -1
  130. package/dist/api/resources/organization/client/addUser.js +17 -7
  131. package/dist/api/resources/organization/client/create.d.ts +1 -1
  132. package/dist/api/resources/organization/client/create.js +17 -7
  133. package/dist/api/resources/organization/client/get.d.ts +1 -1
  134. package/dist/api/resources/organization/client/get.js +17 -7
  135. package/dist/api/resources/organization/client/getMyOrganizationFromScopedToken.d.ts +1 -1
  136. package/dist/api/resources/organization/client/getMyOrganizationFromScopedToken.js +17 -7
  137. package/dist/api/resources/organization/client/getOrgIdsFromToken.d.ts +1 -1
  138. package/dist/api/resources/organization/client/getOrgIdsFromToken.js +17 -7
  139. package/dist/api/resources/organization/client/index.js +17 -7
  140. package/dist/api/resources/organization/client/inviteUser.d.ts +1 -1
  141. package/dist/api/resources/organization/client/inviteUser.js +17 -7
  142. package/dist/api/resources/organization/client/isMember.d.ts +1 -1
  143. package/dist/api/resources/organization/client/isMember.js +17 -7
  144. package/dist/api/resources/organization/client/removeUser.d.ts +1 -1
  145. package/dist/api/resources/organization/client/removeUser.js +17 -7
  146. package/dist/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +2 -0
  147. package/dist/api/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +6 -0
  148. package/dist/api/resources/organization/client/update.d.ts +1 -1
  149. package/dist/api/resources/organization/client/update.js +17 -7
  150. package/dist/api/resources/organization/types/CreateOrganizationResponse.d.ts +12 -0
  151. package/dist/api/resources/organization/types/CreateOrganizationResponse.js +5 -0
  152. package/dist/api/resources/organization/types/index.d.ts +1 -0
  153. package/dist/api/resources/organization/types/index.js +1 -0
  154. package/dist/api/resources/registry/client/Client.d.ts +4 -0
  155. package/dist/api/resources/registry/client/Client.js +29 -40
  156. package/dist/api/resources/registry/client/generateRegistryTokens.d.ts +1 -1
  157. package/dist/api/resources/registry/client/generateRegistryTokens.js +17 -7
  158. package/dist/api/resources/registry/client/hasRegistryPermission.d.ts +1 -1
  159. package/dist/api/resources/registry/client/hasRegistryPermission.js +17 -7
  160. package/dist/api/resources/registry/client/index.js +17 -7
  161. package/dist/api/resources/registry/client/revokeToken.d.ts +1 -1
  162. package/dist/api/resources/registry/client/revokeToken.js +17 -7
  163. package/dist/api/resources/registry/types/RegistryToken.d.ts +1 -1
  164. package/dist/api/resources/user/client/Client.d.ts +4 -0
  165. package/dist/api/resources/user/client/Client.js +23 -25
  166. package/dist/api/resources/user/client/getMyOrganizations.d.ts +1 -1
  167. package/dist/api/resources/user/client/getMyOrganizations.js +17 -7
  168. package/dist/api/resources/user/client/getMyself.d.ts +1 -1
  169. package/dist/api/resources/user/client/getMyself.js +17 -7
  170. package/dist/api/resources/user/client/index.js +17 -7
  171. package/dist/core/auth/BearerToken.d.ts +1 -1
  172. package/dist/core/fetcher/APIResponse.d.ts +1 -1
  173. package/dist/core/fetcher/Fetcher.d.ts +3 -3
  174. package/dist/core/fetcher/Fetcher.js +6 -5
  175. package/dist/core/fetcher/Supplier.d.ts +1 -1
  176. package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
  177. package/dist/core/fetcher/createRequestUrl.js +1 -2
  178. package/dist/core/fetcher/getFetchFn.js +18 -9
  179. package/dist/core/fetcher/getHeader.js +1 -2
  180. package/dist/core/fetcher/getRequestBody.js +5 -5
  181. package/dist/core/fetcher/getResponseBody.js +4 -2
  182. package/dist/core/fetcher/makeRequest.d.ts +1 -1
  183. package/dist/core/fetcher/requestWithRetries.js +17 -9
  184. package/dist/core/fetcher/signals.d.ts +0 -1
  185. package/dist/core/fetcher/signals.js +2 -3
  186. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
  187. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
  188. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
  189. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
  190. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
  191. package/dist/core/index.js +17 -7
  192. package/dist/core/json.d.ts +15 -0
  193. package/dist/core/json.js +24 -0
  194. package/dist/core/runtime/runtime.d.ts +1 -1
  195. package/dist/core/runtime/runtime.js +51 -41
  196. package/dist/core/schemas/Schema.d.ts +7 -5
  197. package/dist/core/schemas/Schema.js +2 -0
  198. package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
  199. package/dist/core/schemas/builders/bigint/bigint.js +22 -19
  200. package/dist/core/schemas/builders/date/date.js +1 -2
  201. package/dist/core/schemas/builders/enum/enum.js +1 -2
  202. package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
  203. package/dist/core/schemas/builders/lazy/lazy.js +3 -4
  204. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
  205. package/dist/core/schemas/builders/list/list.js +1 -2
  206. package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
  207. package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
  208. package/dist/core/schemas/builders/object/object.d.ts +1 -1
  209. package/dist/core/schemas/builders/object/object.js +31 -3
  210. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  211. package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  212. package/dist/core/schemas/builders/object/property.js +2 -3
  213. package/dist/core/schemas/builders/object/types.d.ts +16 -11
  214. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
  215. package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
  216. package/dist/core/schemas/builders/record/record.js +2 -4
  217. package/dist/core/schemas/builders/record/types.d.ts +2 -2
  218. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  219. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
  220. package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  221. package/dist/core/schemas/builders/set/set.js +1 -2
  222. package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  223. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
  224. package/dist/core/schemas/builders/union/discriminant.js +1 -2
  225. package/dist/core/schemas/builders/union/types.d.ts +6 -6
  226. package/dist/core/schemas/builders/union/union.d.ts +1 -1
  227. package/dist/core/schemas/builders/union/union.js +1 -2
  228. package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
  229. package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
  230. package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  231. package/dist/core/schemas/utils/entries.d.ts +1 -1
  232. package/dist/core/schemas/utils/entries.js +1 -2
  233. package/dist/core/schemas/utils/filterObject.d.ts +1 -1
  234. package/dist/core/schemas/utils/filterObject.js +1 -2
  235. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
  236. package/dist/core/schemas/utils/isPlainObject.js +1 -2
  237. package/dist/core/schemas/utils/keys.d.ts +1 -1
  238. package/dist/core/schemas/utils/keys.js +1 -2
  239. package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
  240. package/dist/core/schemas/utils/partition.js +1 -2
  241. package/dist/index.d.ts +1 -0
  242. package/dist/index.js +19 -8
  243. package/dist/serialization/resources/commons/types/OrganizationId.js +17 -7
  244. package/dist/serialization/resources/commons/types/UserId.js +17 -7
  245. package/dist/serialization/resources/index.js +17 -7
  246. package/dist/serialization/resources/organization/client/addUser.js +17 -7
  247. package/dist/serialization/resources/organization/client/create.js +17 -7
  248. package/dist/serialization/resources/organization/client/get.js +17 -7
  249. package/dist/serialization/resources/organization/client/getMyOrganizationFromScopedToken.js +17 -7
  250. package/dist/serialization/resources/organization/client/getOrgIdsFromToken.js +17 -7
  251. package/dist/serialization/resources/organization/client/index.js +17 -7
  252. package/dist/serialization/resources/organization/client/inviteUser.js +17 -7
  253. package/dist/serialization/resources/organization/client/isMember.js +17 -7
  254. package/dist/serialization/resources/organization/client/removeUser.js +17 -7
  255. package/dist/serialization/resources/organization/client/requests/AddUserToOrgRequest.js +17 -7
  256. package/dist/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +1 -0
  257. package/dist/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +18 -7
  258. package/dist/serialization/resources/organization/client/requests/InviteUserToOrgRequest.js +17 -7
  259. package/dist/serialization/resources/organization/client/requests/RemoveUserFromOrgRequest.js +17 -7
  260. package/dist/serialization/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +2 -0
  261. package/dist/serialization/resources/organization/client/requests/UpdateOrganizationRequest.js +19 -7
  262. package/dist/serialization/resources/organization/client/update.js +17 -7
  263. package/dist/serialization/resources/organization/types/CreateOrganizationResponse.d.ts +13 -0
  264. package/dist/serialization/resources/organization/types/CreateOrganizationResponse.js +44 -0
  265. package/dist/serialization/resources/organization/types/LightweightUser.js +17 -7
  266. package/dist/serialization/resources/organization/types/Organization.js +17 -7
  267. package/dist/serialization/resources/organization/types/index.d.ts +1 -0
  268. package/dist/serialization/resources/organization/types/index.js +1 -0
  269. package/dist/serialization/resources/registry/client/generateRegistryTokens.js +17 -7
  270. package/dist/serialization/resources/registry/client/hasRegistryPermission.js +17 -7
  271. package/dist/serialization/resources/registry/client/index.js +17 -7
  272. package/dist/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.js +17 -7
  273. package/dist/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.js +17 -7
  274. package/dist/serialization/resources/registry/client/requests/RevokeTokenRequest.js +17 -7
  275. package/dist/serialization/resources/registry/client/revokeToken.js +17 -7
  276. package/dist/serialization/resources/registry/types/MavenRegistryToken.js +17 -7
  277. package/dist/serialization/resources/registry/types/NpmRegistryToken.js +17 -7
  278. package/dist/serialization/resources/registry/types/PypiRegistryToken.js +17 -7
  279. package/dist/serialization/resources/registry/types/RegistryToken.js +17 -7
  280. package/dist/serialization/resources/registry/types/RegistryTokens.js +17 -7
  281. package/dist/serialization/resources/user/types/OrganizationsPage.js +17 -7
  282. package/dist/serialization/resources/user/types/User.js +17 -7
  283. package/dist/version.d.ts +1 -1
  284. package/dist/version.js +1 -1
  285. package/index.d.ts +1 -0
  286. package/index.js +19 -8
  287. package/{jest.config.js → jest.config.mjs} +4 -1
  288. package/package.json +16 -17
  289. package/scripts/rename-to-esm-files.js +115 -0
  290. package/serialization/resources/commons/types/OrganizationId.js +17 -7
  291. package/serialization/resources/commons/types/UserId.js +17 -7
  292. package/serialization/resources/index.js +17 -7
  293. package/serialization/resources/organization/client/addUser.js +17 -7
  294. package/serialization/resources/organization/client/create.js +17 -7
  295. package/serialization/resources/organization/client/get.js +17 -7
  296. package/serialization/resources/organization/client/getMyOrganizationFromScopedToken.js +17 -7
  297. package/serialization/resources/organization/client/getOrgIdsFromToken.js +17 -7
  298. package/serialization/resources/organization/client/index.js +17 -7
  299. package/serialization/resources/organization/client/inviteUser.js +17 -7
  300. package/serialization/resources/organization/client/isMember.js +17 -7
  301. package/serialization/resources/organization/client/removeUser.js +17 -7
  302. package/serialization/resources/organization/client/requests/AddUserToOrgRequest.js +17 -7
  303. package/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +1 -0
  304. package/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +18 -7
  305. package/serialization/resources/organization/client/requests/InviteUserToOrgRequest.js +17 -7
  306. package/serialization/resources/organization/client/requests/RemoveUserFromOrgRequest.js +17 -7
  307. package/serialization/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +2 -0
  308. package/serialization/resources/organization/client/requests/UpdateOrganizationRequest.js +19 -7
  309. package/serialization/resources/organization/client/update.js +17 -7
  310. package/serialization/resources/organization/types/CreateOrganizationResponse.d.ts +13 -0
  311. package/serialization/resources/organization/types/CreateOrganizationResponse.js +44 -0
  312. package/serialization/resources/organization/types/LightweightUser.js +17 -7
  313. package/serialization/resources/organization/types/Organization.js +17 -7
  314. package/serialization/resources/organization/types/index.d.ts +1 -0
  315. package/serialization/resources/organization/types/index.js +1 -0
  316. package/serialization/resources/registry/client/generateRegistryTokens.js +17 -7
  317. package/serialization/resources/registry/client/hasRegistryPermission.js +17 -7
  318. package/serialization/resources/registry/client/index.js +17 -7
  319. package/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.js +17 -7
  320. package/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.js +17 -7
  321. package/serialization/resources/registry/client/requests/RevokeTokenRequest.js +17 -7
  322. package/serialization/resources/registry/client/revokeToken.js +17 -7
  323. package/serialization/resources/registry/types/MavenRegistryToken.js +17 -7
  324. package/serialization/resources/registry/types/NpmRegistryToken.js +17 -7
  325. package/serialization/resources/registry/types/PypiRegistryToken.js +17 -7
  326. package/serialization/resources/registry/types/RegistryToken.js +17 -7
  327. package/serialization/resources/registry/types/RegistryTokens.js +17 -7
  328. package/serialization/resources/user/types/OrganizationsPage.js +17 -7
  329. package/serialization/resources/user/types/User.js +17 -7
  330. package/version.d.ts +1 -1
  331. package/version.js +1 -1
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
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
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.Error = void 0;
30
40
  const FernVenusApi = __importStar(require("../../../index"));
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as FernVenusApi from "../../../index";
5
5
  import * as core from "../../../../core";
6
- export declare type Error = FernVenusApi.user.getMyself.Error._Unknown;
6
+ export type Error = FernVenusApi.user.getMyself.Error._Unknown;
7
7
  export declare namespace Error {
8
8
  interface _Unknown extends _Utils {
9
9
  error: void;
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
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
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.Error = void 0;
30
40
  const FernVenusApi = __importStar(require("../../../index"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
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
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.getMyOrganizations = exports.getMyself = void 0;
30
40
  __exportStar(require("./requests"), exports);
@@ -1,4 +1,4 @@
1
- export declare type BearerToken = string;
1
+ export type BearerToken = string;
2
2
  export declare const BearerToken: {
3
3
  toAuthorizationHeader: (token: BearerToken | undefined) => string | undefined;
4
4
  fromAuthorizationHeader: (header: string) => BearerToken;
@@ -1,4 +1,4 @@
1
- export declare type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
1
+ export type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
2
2
  export interface SuccessfulResponse<T> {
3
3
  ok: true;
4
4
  body: T;
@@ -1,19 +1,19 @@
1
1
  import { APIResponse } from "./APIResponse";
2
- export declare type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
2
+ export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
3
3
  export declare namespace Fetcher {
4
4
  interface Args {
5
5
  url: string;
6
6
  method: string;
7
7
  contentType?: string;
8
8
  headers?: Record<string, string | undefined>;
9
- queryParameters?: Record<string, string | string[] | object | object[]>;
9
+ queryParameters?: Record<string, string | string[] | object | object[] | null>;
10
10
  body?: unknown;
11
11
  timeoutMs?: number;
12
12
  maxRetries?: number;
13
13
  withCredentials?: boolean;
14
14
  abortSignal?: AbortSignal;
15
15
  requestType?: "json" | "file" | "bytes";
16
- responseType?: "json" | "blob" | "sse" | "streaming" | "text";
16
+ responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer";
17
17
  duplex?: "half";
18
18
  }
19
19
  type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
@@ -9,7 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.fetcher = exports.fetcherImpl = void 0;
12
+ exports.fetcher = void 0;
13
+ exports.fetcherImpl = fetcherImpl;
14
+ const json_1 = require("../json");
13
15
  const createRequestUrl_1 = require("./createRequestUrl");
14
16
  const getFetchFn_1 = require("./getFetchFn");
15
17
  const getRequestBody_1 = require("./getRequestBody");
@@ -30,7 +32,7 @@ function fetcherImpl(args) {
30
32
  }
31
33
  }
32
34
  const url = (0, createRequestUrl_1.createRequestUrl)(args.url, args.queryParameters);
33
- let requestBody = yield (0, getRequestBody_1.getRequestBody)({
35
+ const requestBody = yield (0, getRequestBody_1.getRequestBody)({
34
36
  body: args.body,
35
37
  type: args.requestType === "json" ? "json" : "other",
36
38
  });
@@ -39,7 +41,7 @@ function fetcherImpl(args) {
39
41
  const response = yield (0, requestWithRetries_1.requestWithRetries)(() => __awaiter(this, void 0, void 0, function* () {
40
42
  return (0, makeRequest_1.makeRequest)(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
41
43
  }), args.maxRetries);
42
- let responseBody = yield (0, getResponseBody_1.getResponseBody)(response, args.responseType);
44
+ const responseBody = yield (0, getResponseBody_1.getResponseBody)(response, args.responseType);
43
45
  if (response.status >= 200 && response.status < 400) {
44
46
  return {
45
47
  ok: true,
@@ -89,11 +91,10 @@ function fetcherImpl(args) {
89
91
  ok: false,
90
92
  error: {
91
93
  reason: "unknown",
92
- errorMessage: JSON.stringify(error),
94
+ errorMessage: (0, json_1.toJson)(error),
93
95
  },
94
96
  };
95
97
  }
96
98
  });
97
99
  }
98
- exports.fetcherImpl = fetcherImpl;
99
100
  exports.fetcher = fetcherImpl;
@@ -1,4 +1,4 @@
1
- export declare type Supplier<T> = T | Promise<T> | (() => T | Promise<T>);
1
+ export type Supplier<T> = T | Promise<T> | (() => T | Promise<T>);
2
2
  export declare const Supplier: {
3
3
  get: <T>(supplier: Supplier<T>) => Promise<T>;
4
4
  };
@@ -1 +1 @@
1
- export declare function createRequestUrl(baseUrl: string, queryParameters?: Record<string, string | string[] | object | object[]>): string;
1
+ export declare function createRequestUrl(baseUrl: string, queryParameters?: Record<string, string | string[] | object | object[] | null>): string;
@@ -3,11 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createRequestUrl = void 0;
6
+ exports.createRequestUrl = createRequestUrl;
7
7
  const qs_1 = __importDefault(require("qs"));
8
8
  function createRequestUrl(baseUrl, queryParameters) {
9
9
  return Object.keys(queryParameters !== null && queryParameters !== void 0 ? queryParameters : {}).length > 0
10
10
  ? `${baseUrl}?${qs_1.default.stringify(queryParameters, { arrayFormat: "repeat" })}`
11
11
  : baseUrl;
12
12
  }
13
- exports.createRequestUrl = createRequestUrl;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -32,7 +42,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
42
  });
33
43
  };
34
44
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.getFetchFn = void 0;
45
+ exports.getFetchFn = getFetchFn;
36
46
  const runtime_1 = require("../runtime");
37
47
  /**
38
48
  * Returns a fetch function based on the runtime
@@ -56,4 +66,3 @@ function getFetchFn() {
56
66
  return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
57
67
  });
58
68
  }
59
- exports.getFetchFn = getFetchFn;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getHeader = void 0;
3
+ exports.getHeader = getHeader;
4
4
  function getHeader(headers, header) {
5
5
  for (const [headerKey, headerValue] of Object.entries(headers)) {
6
6
  if (headerKey.toLowerCase() === header.toLowerCase()) {
@@ -9,4 +9,3 @@ function getHeader(headers, header) {
9
9
  }
10
10
  return undefined;
11
11
  }
12
- exports.getHeader = getHeader;
@@ -9,15 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getRequestBody = void 0;
13
- function getRequestBody({ body, type }) {
14
- return __awaiter(this, void 0, void 0, function* () {
12
+ exports.getRequestBody = getRequestBody;
13
+ const json_1 = require("../json");
14
+ function getRequestBody(_a) {
15
+ return __awaiter(this, arguments, void 0, function* ({ body, type }) {
15
16
  if (type.includes("json")) {
16
- return JSON.stringify(body);
17
+ return (0, json_1.toJson)(body);
17
18
  }
18
19
  else {
19
20
  return body;
20
21
  }
21
22
  });
22
23
  }
23
- exports.getRequestBody = getRequestBody;
@@ -9,13 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getResponseBody = void 0;
12
+ exports.getResponseBody = getResponseBody;
13
13
  const chooseStreamWrapper_1 = require("./stream-wrappers/chooseStreamWrapper");
14
14
  function getResponseBody(response, responseType) {
15
15
  return __awaiter(this, void 0, void 0, function* () {
16
16
  if (response.body != null && responseType === "blob") {
17
17
  return yield response.blob();
18
18
  }
19
+ else if (response.body != null && responseType === "arrayBuffer") {
20
+ return yield response.arrayBuffer();
21
+ }
19
22
  else if (response.body != null && responseType === "sse") {
20
23
  return response.body;
21
24
  }
@@ -49,4 +52,3 @@ function getResponseBody(response, responseType) {
49
52
  }
50
53
  });
51
54
  }
52
- exports.getResponseBody = getResponseBody;
@@ -1 +1 @@
1
- export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number | undefined, abortSignal?: AbortSignal | undefined, withCredentials?: boolean | undefined, duplex?: "half" | undefined) => Promise<Response>;
1
+ export declare const makeRequest: (fetchFn: (url: string, init: RequestInit) => Promise<Response>, url: string, method: string, headers: Record<string, string>, requestBody: BodyInit | undefined, timeoutMs?: number, abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half") => Promise<Response>;
@@ -9,17 +9,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.requestWithRetries = void 0;
13
- const INITIAL_RETRY_DELAY = 1;
14
- const MAX_RETRY_DELAY = 60;
12
+ exports.requestWithRetries = requestWithRetries;
13
+ const INITIAL_RETRY_DELAY = 1000; // in milliseconds
14
+ const MAX_RETRY_DELAY = 60000; // in milliseconds
15
15
  const DEFAULT_MAX_RETRIES = 2;
16
- function requestWithRetries(requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
17
- return __awaiter(this, void 0, void 0, function* () {
16
+ const JITTER_FACTOR = 0.2; // 20% random jitter
17
+ function addJitter(delay) {
18
+ // Generate a random value between -JITTER_FACTOR and +JITTER_FACTOR
19
+ const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR;
20
+ return delay * jitterMultiplier;
21
+ }
22
+ function requestWithRetries(requestFn_1) {
23
+ return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
18
24
  let response = yield requestFn();
19
25
  for (let i = 0; i < maxRetries; ++i) {
20
- if ([408, 409, 429].includes(response.status) || response.status >= 500) {
21
- const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY);
22
- yield new Promise((resolve) => setTimeout(resolve, delay));
26
+ if ([408, 429].includes(response.status) || response.status >= 500) {
27
+ // Calculate base delay using exponential backoff (in milliseconds)
28
+ const baseDelay = Math.min(INITIAL_RETRY_DELAY * Math.pow(2, i), MAX_RETRY_DELAY);
29
+ // Add jitter to the delay
30
+ const delayWithJitter = addJitter(baseDelay);
31
+ yield new Promise((resolve) => setTimeout(resolve, delayWithJitter));
23
32
  response = yield requestFn();
24
33
  }
25
34
  else {
@@ -29,4 +38,3 @@ function requestWithRetries(requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
29
38
  return response;
30
39
  });
31
40
  }
32
- exports.requestWithRetries = requestWithRetries;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export declare function getTimeoutSignal(timeoutMs: number): {
3
2
  signal: AbortSignal;
4
3
  abortId: NodeJS.Timeout;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.anySignal = exports.getTimeoutSignal = void 0;
3
+ exports.getTimeoutSignal = getTimeoutSignal;
4
+ exports.anySignal = anySignal;
4
5
  const TIMEOUT = "timeout";
5
6
  function getTimeoutSignal(timeoutMs) {
6
7
  const controller = new AbortController();
7
8
  const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
8
9
  return { signal: controller.signal, abortId };
9
10
  }
10
- exports.getTimeoutSignal = getTimeoutSignal;
11
11
  /**
12
12
  * Returns an abort signal that is getting aborted when
13
13
  * at least one of the specified abort signals is aborted.
@@ -34,4 +34,3 @@ function anySignal(...args) {
34
34
  }
35
35
  return controller.signal;
36
36
  }
37
- exports.anySignal = anySignal;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { Readable, Writable } from "readable-stream";
3
2
  import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
4
3
  export declare class NodePre18StreamWrapper implements StreamWrapper<Writable, Buffer> {
@@ -76,21 +76,23 @@ class NodePre18StreamWrapper {
76
76
  this.encoding = encoding;
77
77
  }
78
78
  text() {
79
- var e_1, _a;
80
79
  return __awaiter(this, void 0, void 0, function* () {
80
+ var _a, e_1, _b, _c;
81
81
  const chunks = [];
82
82
  const encoder = new TextEncoder();
83
83
  this.readableStream.setEncoding((this.encoding || "utf-8"));
84
84
  try {
85
- for (var _b = __asyncValues(this.readableStream), _c; _c = yield _b.next(), !_c.done;) {
86
- const chunk = _c.value;
85
+ for (var _d = true, _e = __asyncValues(this.readableStream), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
86
+ _c = _f.value;
87
+ _d = false;
88
+ const chunk = _c;
87
89
  chunks.push(encoder.encode(chunk));
88
90
  }
89
91
  }
90
92
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
91
93
  finally {
92
94
  try {
93
- if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
95
+ if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
94
96
  }
95
97
  finally { if (e_1) throw e_1.error; }
96
98
  }
@@ -1,5 +1,5 @@
1
1
  import { StreamWrapper } from "./chooseStreamWrapper";
2
- declare type EventCallback = (data?: any) => void;
2
+ type EventCallback = (data?: any) => void;
3
3
  export declare class UndiciStreamWrapper<ReadFormat extends Uint8Array | Uint16Array | Uint32Array> implements StreamWrapper<UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>, ReadFormat> {
4
4
  private readableStream;
5
5
  private reader;
@@ -1,4 +1,4 @@
1
- export declare type EventCallback = (data?: any) => void;
1
+ export type EventCallback = (data?: any) => void;
2
2
  export interface StreamWrapper<WritableStream, ReadFormat> {
3
3
  setEncoding(encoding?: string): void;
4
4
  on(event: string, callback: EventCallback): void;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -32,7 +42,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
42
  });
33
43
  };
34
44
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.chooseStreamWrapper = void 0;
45
+ exports.chooseStreamWrapper = chooseStreamWrapper;
36
46
  const runtime_1 = require("../../runtime");
37
47
  function chooseStreamWrapper(responseBody) {
38
48
  return __awaiter(this, void 0, void 0, function* () {
@@ -47,4 +57,3 @@ function chooseStreamWrapper(responseBody) {
47
57
  }
48
58
  });
49
59
  }
50
- exports.chooseStreamWrapper = chooseStreamWrapper;
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
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
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.serialization = void 0;
30
40
  __exportStar(require("./fetcher"), exports);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Serialize a value to JSON
3
+ * @param value A JavaScript value, usually an object or array, to be converted.
4
+ * @param replacer A function that transforms the results.
5
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
6
+ * @returns JSON string
7
+ */
8
+ export declare const toJson: (value: unknown, replacer?: (this: unknown, key: string, value: unknown) => unknown, space?: string | number) => string;
9
+ /**
10
+ * Parse JSON string to object, array, or other type
11
+ * @param text A valid JSON string.
12
+ * @param reviver A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.
13
+ * @returns Parsed object, array, or other type
14
+ */
15
+ export declare function fromJson<T = unknown>(text: string, reviver?: (this: unknown, key: string, value: unknown) => unknown): T;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toJson = void 0;
4
+ exports.fromJson = fromJson;
5
+ /**
6
+ * Serialize a value to JSON
7
+ * @param value A JavaScript value, usually an object or array, to be converted.
8
+ * @param replacer A function that transforms the results.
9
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
10
+ * @returns JSON string
11
+ */
12
+ const toJson = (value, replacer, space) => {
13
+ return JSON.stringify(value, replacer, space);
14
+ };
15
+ exports.toJson = toJson;
16
+ /**
17
+ * Parse JSON string to object, array, or other type
18
+ * @param text A valid JSON string.
19
+ * @param reviver A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.
20
+ * @returns Parsed object, array, or other type
21
+ */
22
+ function fromJson(text, reviver) {
23
+ return JSON.parse(text, reviver);
24
+ }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export declare const RUNTIME: Runtime;
5
5
  export interface Runtime {
6
- type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd";
6
+ type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd" | "edge-runtime";
7
7
  version?: string;
8
8
  parsedVersion?: number;
9
9
  }