@fern-api/venus-api-sdk 11.7.0 → 12.1.0

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 (386) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +11 -6
  4. package/dist/cjs/api/resources/guestSession/client/Client.d.ts +53 -0
  5. package/dist/cjs/api/resources/guestSession/client/Client.js +325 -0
  6. package/dist/cjs/api/resources/guestSession/client/claim.d.ts +25 -0
  7. package/dist/cjs/api/resources/guestSession/client/claim.js +66 -0
  8. package/dist/cjs/api/resources/guestSession/client/create.d.ts +13 -1
  9. package/dist/cjs/api/resources/guestSession/client/create.js +22 -0
  10. package/dist/cjs/api/resources/guestSession/client/delete.d.ts +25 -0
  11. package/dist/cjs/api/resources/guestSession/client/delete.js +66 -0
  12. package/dist/cjs/api/resources/guestSession/client/get.d.ts +43 -0
  13. package/dist/cjs/api/resources/guestSession/client/get.js +99 -0
  14. package/dist/cjs/api/resources/guestSession/client/index.d.ts +3 -0
  15. package/dist/cjs/api/resources/guestSession/client/index.js +4 -1
  16. package/dist/cjs/api/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.ts +10 -0
  17. package/dist/cjs/api/resources/guestSession/client/requests/ClaimGuestSessionRequest.js +3 -0
  18. package/dist/cjs/api/resources/guestSession/client/requests/DeleteGuestSessionsSessionIdDeleteRequest.d.ts +9 -0
  19. package/dist/cjs/api/resources/guestSession/client/requests/DeleteGuestSessionsSessionIdDeleteRequest.js +3 -0
  20. package/dist/cjs/api/resources/guestSession/client/requests/GetGuestSessionsSessionIdGetRequest.d.ts +11 -0
  21. package/dist/cjs/api/resources/guestSession/client/requests/GetGuestSessionsSessionIdGetRequest.js +3 -0
  22. package/dist/cjs/api/resources/guestSession/client/requests/index.d.ts +3 -0
  23. package/dist/cjs/api/resources/index.d.ts +3 -0
  24. package/dist/cjs/api/resources/index.js +4 -1
  25. package/dist/cjs/api/resources/internalGuestSession/client/Client.d.ts +55 -0
  26. package/dist/cjs/api/resources/internalGuestSession/client/Client.js +314 -0
  27. package/dist/cjs/api/resources/internalGuestSession/client/index.d.ts +4 -0
  28. package/dist/cjs/api/resources/internalGuestSession/client/index.js +43 -0
  29. package/dist/cjs/api/resources/internalGuestSession/client/readByOrg.d.ts +25 -0
  30. package/dist/cjs/api/resources/internalGuestSession/client/readByOrg.js +66 -0
  31. package/dist/cjs/api/resources/internalGuestSession/client/requests/ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest.d.ts +9 -0
  32. package/dist/cjs/api/resources/internalGuestSession/client/requests/ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest.js +3 -0
  33. package/dist/cjs/api/resources/internalGuestSession/client/requests/ReserveRequest.d.ts +14 -0
  34. package/dist/cjs/api/resources/internalGuestSession/client/requests/ReserveRequest.js +3 -0
  35. package/dist/cjs/api/resources/internalGuestSession/client/requests/SettleRequest.d.ts +14 -0
  36. package/dist/cjs/api/resources/internalGuestSession/client/requests/SettleRequest.js +3 -0
  37. package/dist/cjs/api/resources/internalGuestSession/client/requests/index.d.ts +3 -0
  38. package/dist/cjs/api/resources/internalGuestSession/client/requests/index.js +2 -0
  39. package/dist/cjs/api/resources/internalGuestSession/client/reserve.d.ts +25 -0
  40. package/dist/cjs/api/resources/internalGuestSession/client/reserve.js +66 -0
  41. package/dist/cjs/api/resources/internalGuestSession/client/settle.d.ts +25 -0
  42. package/dist/cjs/api/resources/internalGuestSession/client/settle.js +66 -0
  43. package/dist/cjs/api/resources/internalGuestSession/index.d.ts +2 -0
  44. package/dist/cjs/api/resources/internalGuestSession/index.js +18 -0
  45. package/dist/cjs/api/resources/internalGuestSession/types/ReserveRequestKind.d.ts +5 -0
  46. package/dist/cjs/api/resources/internalGuestSession/types/ReserveRequestKind.js +8 -0
  47. package/dist/cjs/api/resources/internalGuestSession/types/SettleRequestOutcome.d.ts +5 -0
  48. package/dist/cjs/api/resources/internalGuestSession/types/SettleRequestOutcome.js +8 -0
  49. package/dist/cjs/api/resources/internalGuestSession/types/index.d.ts +2 -0
  50. package/dist/cjs/api/resources/internalGuestSession/types/index.js +18 -0
  51. package/dist/cjs/api/types/ClaimGuestSessionResponse.d.ts +10 -0
  52. package/dist/cjs/api/types/ClaimGuestSessionResponse.js +3 -0
  53. package/dist/cjs/api/types/ClaimGuestSessionResponseStatus.d.ts +9 -0
  54. package/dist/cjs/api/types/ClaimGuestSessionResponseStatus.js +12 -0
  55. package/dist/cjs/api/types/CreateGuestSessionResponse.d.ts +2 -0
  56. package/dist/cjs/api/types/DeleteGuestSessionResponse.d.ts +7 -0
  57. package/dist/cjs/api/types/DeleteGuestSessionResponse.js +3 -0
  58. package/dist/cjs/api/types/DeleteGuestSessionResponseStatus.d.ts +9 -0
  59. package/dist/cjs/api/types/DeleteGuestSessionResponseStatus.js +12 -0
  60. package/dist/cjs/api/types/GetGuestSessionResponse.d.ts +13 -0
  61. package/dist/cjs/api/types/GetGuestSessionResponse.js +3 -0
  62. package/dist/cjs/api/types/GetGuestSessionResponseStatus.d.ts +9 -0
  63. package/dist/cjs/api/types/GetGuestSessionResponseStatus.js +12 -0
  64. package/dist/cjs/api/types/GoneErrorBody.d.ts +5 -0
  65. package/dist/cjs/api/types/GoneErrorBody.js +3 -0
  66. package/dist/cjs/api/types/GoneErrorBodyContent.d.ts +8 -0
  67. package/dist/cjs/api/types/GoneErrorBodyContent.js +3 -0
  68. package/dist/cjs/api/types/GoneErrorBodyContentCode.d.ts +5 -0
  69. package/dist/cjs/api/types/GoneErrorBodyContentCode.js +8 -0
  70. package/dist/cjs/api/types/GuestSessionLimits.d.ts +2 -0
  71. package/dist/cjs/api/types/GuestSessionUsage.d.ts +4 -0
  72. package/dist/cjs/api/types/GuestSessionUsage.js +3 -0
  73. package/dist/cjs/api/types/InternalGuestSessionResponse.d.ts +22 -0
  74. package/dist/cjs/api/types/InternalGuestSessionResponse.js +3 -0
  75. package/dist/cjs/api/types/InternalGuestSessionResponseStatus.d.ts +9 -0
  76. package/dist/cjs/api/types/InternalGuestSessionResponseStatus.js +12 -0
  77. package/dist/cjs/api/types/Limit.d.ts +6 -0
  78. package/dist/cjs/api/types/Limit.js +3 -0
  79. package/dist/cjs/api/types/NotFoundErrorBody.d.ts +5 -0
  80. package/dist/cjs/api/types/NotFoundErrorBody.js +3 -0
  81. package/dist/cjs/api/types/NotFoundErrorBodyContent.d.ts +8 -0
  82. package/dist/cjs/api/types/NotFoundErrorBodyContent.js +3 -0
  83. package/dist/cjs/api/types/NotFoundErrorBodyContentCode.d.ts +4 -0
  84. package/dist/cjs/api/types/NotFoundErrorBodyContentCode.js +7 -0
  85. package/dist/cjs/api/types/ReserveResponse.d.ts +12 -0
  86. package/dist/cjs/api/types/ReserveResponse.js +3 -0
  87. package/dist/cjs/api/types/ReserveResponseKind.d.ts +5 -0
  88. package/dist/cjs/api/types/ReserveResponseKind.js +8 -0
  89. package/dist/cjs/api/types/ReserveResponseState.d.ts +6 -0
  90. package/dist/cjs/api/types/ReserveResponseState.js +9 -0
  91. package/dist/cjs/api/types/ServiceUnavailableErrorBody.d.ts +5 -0
  92. package/dist/cjs/api/types/ServiceUnavailableErrorBody.js +3 -0
  93. package/dist/cjs/api/types/ServiceUnavailableErrorBodyContent.d.ts +8 -0
  94. package/dist/cjs/api/types/ServiceUnavailableErrorBodyContent.js +3 -0
  95. package/dist/cjs/api/types/ServiceUnavailableErrorBodyContentCode.d.ts +6 -0
  96. package/dist/cjs/api/types/ServiceUnavailableErrorBodyContentCode.js +9 -0
  97. package/dist/cjs/api/types/SettleResponse.d.ts +5 -0
  98. package/dist/cjs/api/types/SettleResponse.js +3 -0
  99. package/dist/cjs/api/types/SettleResponseReason.d.ts +5 -0
  100. package/dist/cjs/api/types/SettleResponseReason.js +8 -0
  101. package/dist/cjs/api/types/TooManyRequestsErrorBody.d.ts +5 -0
  102. package/dist/cjs/api/types/TooManyRequestsErrorBody.js +3 -0
  103. package/dist/cjs/api/types/TooManyRequestsErrorBodyContent.d.ts +8 -0
  104. package/dist/cjs/api/types/TooManyRequestsErrorBodyContent.js +3 -0
  105. package/dist/cjs/api/types/TooManyRequestsErrorBodyContentCode.d.ts +4 -0
  106. package/dist/cjs/api/types/TooManyRequestsErrorBodyContentCode.js +7 -0
  107. package/dist/cjs/api/types/index.d.ts +27 -0
  108. package/dist/cjs/api/types/index.js +27 -0
  109. package/dist/cjs/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.ts +9 -0
  110. package/dist/cjs/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.js +41 -0
  111. package/dist/cjs/serialization/resources/guestSession/client/requests/index.d.ts +1 -0
  112. package/dist/cjs/serialization/resources/guestSession/client/requests/index.js +3 -1
  113. package/dist/cjs/serialization/resources/index.d.ts +3 -0
  114. package/dist/cjs/serialization/resources/index.js +4 -1
  115. package/dist/cjs/serialization/resources/internalGuestSession/client/index.d.ts +1 -0
  116. package/dist/cjs/serialization/resources/internalGuestSession/client/index.js +17 -0
  117. package/dist/cjs/serialization/resources/internalGuestSession/client/requests/ReserveRequest.d.ts +12 -0
  118. package/dist/cjs/serialization/resources/internalGuestSession/client/requests/ReserveRequest.js +44 -0
  119. package/dist/cjs/serialization/resources/internalGuestSession/client/requests/SettleRequest.d.ts +11 -0
  120. package/dist/cjs/serialization/resources/internalGuestSession/client/requests/SettleRequest.js +43 -0
  121. package/dist/cjs/serialization/resources/internalGuestSession/client/requests/index.d.ts +2 -0
  122. package/dist/cjs/serialization/resources/internalGuestSession/client/requests/index.js +7 -0
  123. package/dist/cjs/serialization/resources/internalGuestSession/index.d.ts +2 -0
  124. package/dist/cjs/serialization/resources/internalGuestSession/index.js +18 -0
  125. package/dist/cjs/serialization/resources/internalGuestSession/types/ReserveRequestKind.d.ts +7 -0
  126. package/dist/cjs/serialization/resources/internalGuestSession/types/ReserveRequestKind.js +39 -0
  127. package/dist/cjs/serialization/resources/internalGuestSession/types/SettleRequestOutcome.d.ts +7 -0
  128. package/dist/cjs/serialization/resources/internalGuestSession/types/SettleRequestOutcome.js +39 -0
  129. package/dist/cjs/serialization/resources/internalGuestSession/types/index.d.ts +2 -0
  130. package/dist/cjs/serialization/resources/internalGuestSession/types/index.js +18 -0
  131. package/dist/cjs/serialization/types/ClaimGuestSessionResponse.d.ts +15 -0
  132. package/dist/cjs/serialization/types/ClaimGuestSessionResponse.js +48 -0
  133. package/dist/cjs/serialization/types/ClaimGuestSessionResponseStatus.d.ts +7 -0
  134. package/dist/cjs/serialization/types/ClaimGuestSessionResponseStatus.js +39 -0
  135. package/dist/cjs/serialization/types/CreateGuestSessionResponse.d.ts +2 -0
  136. package/dist/cjs/serialization/types/CreateGuestSessionResponse.js +2 -0
  137. package/dist/cjs/serialization/types/DeleteGuestSessionResponse.d.ts +12 -0
  138. package/dist/cjs/serialization/types/DeleteGuestSessionResponse.js +45 -0
  139. package/dist/cjs/serialization/types/DeleteGuestSessionResponseStatus.d.ts +7 -0
  140. package/dist/cjs/serialization/types/DeleteGuestSessionResponseStatus.js +39 -0
  141. package/dist/cjs/serialization/types/GetGuestSessionResponse.d.ts +20 -0
  142. package/dist/cjs/serialization/types/GetGuestSessionResponse.js +52 -0
  143. package/dist/cjs/serialization/types/GetGuestSessionResponseStatus.d.ts +7 -0
  144. package/dist/cjs/serialization/types/GetGuestSessionResponseStatus.js +39 -0
  145. package/dist/cjs/serialization/types/GoneErrorBody.d.ts +11 -0
  146. package/dist/cjs/serialization/types/GoneErrorBody.js +43 -0
  147. package/dist/cjs/serialization/types/GoneErrorBodyContent.d.ts +14 -0
  148. package/dist/cjs/serialization/types/GoneErrorBodyContent.js +46 -0
  149. package/dist/cjs/serialization/types/GoneErrorBodyContentCode.d.ts +7 -0
  150. package/dist/cjs/serialization/types/GoneErrorBodyContentCode.js +39 -0
  151. package/dist/cjs/serialization/types/GuestSessionLimits.d.ts +2 -0
  152. package/dist/cjs/serialization/types/GuestSessionLimits.js +2 -0
  153. package/dist/cjs/serialization/types/GuestSessionUsage.d.ts +10 -0
  154. package/dist/cjs/serialization/types/GuestSessionUsage.js +42 -0
  155. package/dist/cjs/serialization/types/InternalGuestSessionResponse.d.ts +16 -0
  156. package/dist/cjs/serialization/types/InternalGuestSessionResponse.js +48 -0
  157. package/dist/cjs/serialization/types/InternalGuestSessionResponseStatus.d.ts +7 -0
  158. package/dist/cjs/serialization/types/InternalGuestSessionResponseStatus.js +39 -0
  159. package/dist/cjs/serialization/types/Limit.d.ts +12 -0
  160. package/dist/cjs/serialization/types/Limit.js +44 -0
  161. package/dist/cjs/serialization/types/NotFoundErrorBody.d.ts +11 -0
  162. package/dist/cjs/serialization/types/NotFoundErrorBody.js +43 -0
  163. package/dist/cjs/serialization/types/NotFoundErrorBodyContent.d.ts +14 -0
  164. package/dist/cjs/serialization/types/NotFoundErrorBodyContent.js +46 -0
  165. package/dist/cjs/serialization/types/NotFoundErrorBodyContentCode.d.ts +7 -0
  166. package/dist/cjs/serialization/types/NotFoundErrorBodyContentCode.js +39 -0
  167. package/dist/cjs/serialization/types/ReserveResponse.d.ts +20 -0
  168. package/dist/cjs/serialization/types/ReserveResponse.js +52 -0
  169. package/dist/cjs/serialization/types/ReserveResponseKind.d.ts +7 -0
  170. package/dist/cjs/serialization/types/ReserveResponseKind.js +39 -0
  171. package/dist/cjs/serialization/types/ReserveResponseState.d.ts +7 -0
  172. package/dist/cjs/serialization/types/ReserveResponseState.js +39 -0
  173. package/dist/cjs/serialization/types/ServiceUnavailableErrorBody.d.ts +11 -0
  174. package/dist/cjs/serialization/types/ServiceUnavailableErrorBody.js +43 -0
  175. package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyContent.d.ts +14 -0
  176. package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyContent.js +46 -0
  177. package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyContentCode.d.ts +7 -0
  178. package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyContentCode.js +39 -0
  179. package/dist/cjs/serialization/types/SettleResponse.d.ts +11 -0
  180. package/dist/cjs/serialization/types/SettleResponse.js +43 -0
  181. package/dist/cjs/serialization/types/SettleResponseReason.d.ts +7 -0
  182. package/dist/cjs/serialization/types/SettleResponseReason.js +39 -0
  183. package/dist/cjs/serialization/types/TooManyRequestsErrorBody.d.ts +11 -0
  184. package/dist/cjs/serialization/types/TooManyRequestsErrorBody.js +43 -0
  185. package/dist/cjs/serialization/types/TooManyRequestsErrorBodyContent.d.ts +14 -0
  186. package/dist/cjs/serialization/types/TooManyRequestsErrorBodyContent.js +46 -0
  187. package/dist/cjs/serialization/types/TooManyRequestsErrorBodyContentCode.d.ts +7 -0
  188. package/dist/cjs/serialization/types/TooManyRequestsErrorBodyContentCode.js +39 -0
  189. package/dist/cjs/serialization/types/index.d.ts +27 -0
  190. package/dist/cjs/serialization/types/index.js +27 -0
  191. package/dist/cjs/version.d.ts +1 -1
  192. package/dist/cjs/version.js +1 -1
  193. package/dist/esm/BaseClient.mjs +2 -2
  194. package/dist/esm/Client.d.mts +3 -0
  195. package/dist/esm/Client.mjs +5 -0
  196. package/dist/esm/api/resources/guestSession/client/Client.d.mts +53 -0
  197. package/dist/esm/api/resources/guestSession/client/Client.mjs +326 -1
  198. package/dist/esm/api/resources/guestSession/client/claim.d.mts +25 -0
  199. package/dist/esm/api/resources/guestSession/client/claim.mjs +30 -0
  200. package/dist/esm/api/resources/guestSession/client/create.d.mts +13 -1
  201. package/dist/esm/api/resources/guestSession/client/create.mjs +22 -0
  202. package/dist/esm/api/resources/guestSession/client/delete.d.mts +25 -0
  203. package/dist/esm/api/resources/guestSession/client/delete.mjs +30 -0
  204. package/dist/esm/api/resources/guestSession/client/get.d.mts +43 -0
  205. package/dist/esm/api/resources/guestSession/client/get.mjs +63 -0
  206. package/dist/esm/api/resources/guestSession/client/index.d.mts +3 -0
  207. package/dist/esm/api/resources/guestSession/client/index.mjs +3 -0
  208. package/dist/esm/api/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.mts +10 -0
  209. package/dist/esm/api/resources/guestSession/client/requests/ClaimGuestSessionRequest.mjs +2 -0
  210. package/dist/esm/api/resources/guestSession/client/requests/DeleteGuestSessionsSessionIdDeleteRequest.d.mts +9 -0
  211. package/dist/esm/api/resources/guestSession/client/requests/DeleteGuestSessionsSessionIdDeleteRequest.mjs +2 -0
  212. package/dist/esm/api/resources/guestSession/client/requests/GetGuestSessionsSessionIdGetRequest.d.mts +11 -0
  213. package/dist/esm/api/resources/guestSession/client/requests/GetGuestSessionsSessionIdGetRequest.mjs +2 -0
  214. package/dist/esm/api/resources/guestSession/client/requests/index.d.mts +3 -0
  215. package/dist/esm/api/resources/index.d.mts +3 -0
  216. package/dist/esm/api/resources/index.mjs +3 -0
  217. package/dist/esm/api/resources/internalGuestSession/client/Client.d.mts +55 -0
  218. package/dist/esm/api/resources/internalGuestSession/client/Client.mjs +277 -0
  219. package/dist/esm/api/resources/internalGuestSession/client/index.d.mts +4 -0
  220. package/dist/esm/api/resources/internalGuestSession/client/index.mjs +4 -0
  221. package/dist/esm/api/resources/internalGuestSession/client/readByOrg.d.mts +25 -0
  222. package/dist/esm/api/resources/internalGuestSession/client/readByOrg.mjs +30 -0
  223. package/dist/esm/api/resources/internalGuestSession/client/requests/ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest.d.mts +9 -0
  224. package/dist/esm/api/resources/internalGuestSession/client/requests/ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest.mjs +2 -0
  225. package/dist/esm/api/resources/internalGuestSession/client/requests/ReserveRequest.d.mts +14 -0
  226. package/dist/esm/api/resources/internalGuestSession/client/requests/ReserveRequest.mjs +2 -0
  227. package/dist/esm/api/resources/internalGuestSession/client/requests/SettleRequest.d.mts +14 -0
  228. package/dist/esm/api/resources/internalGuestSession/client/requests/SettleRequest.mjs +2 -0
  229. package/dist/esm/api/resources/internalGuestSession/client/requests/index.d.mts +3 -0
  230. package/dist/esm/api/resources/internalGuestSession/client/requests/index.mjs +1 -0
  231. package/dist/esm/api/resources/internalGuestSession/client/reserve.d.mts +25 -0
  232. package/dist/esm/api/resources/internalGuestSession/client/reserve.mjs +30 -0
  233. package/dist/esm/api/resources/internalGuestSession/client/settle.d.mts +25 -0
  234. package/dist/esm/api/resources/internalGuestSession/client/settle.mjs +30 -0
  235. package/dist/esm/api/resources/internalGuestSession/index.d.mts +2 -0
  236. package/dist/esm/api/resources/internalGuestSession/index.mjs +2 -0
  237. package/dist/esm/api/resources/internalGuestSession/types/ReserveRequestKind.d.mts +5 -0
  238. package/dist/esm/api/resources/internalGuestSession/types/ReserveRequestKind.mjs +5 -0
  239. package/dist/esm/api/resources/internalGuestSession/types/SettleRequestOutcome.d.mts +5 -0
  240. package/dist/esm/api/resources/internalGuestSession/types/SettleRequestOutcome.mjs +5 -0
  241. package/dist/esm/api/resources/internalGuestSession/types/index.d.mts +2 -0
  242. package/dist/esm/api/resources/internalGuestSession/types/index.mjs +2 -0
  243. package/dist/esm/api/types/ClaimGuestSessionResponse.d.mts +10 -0
  244. package/dist/esm/api/types/ClaimGuestSessionResponse.mjs +2 -0
  245. package/dist/esm/api/types/ClaimGuestSessionResponseStatus.d.mts +9 -0
  246. package/dist/esm/api/types/ClaimGuestSessionResponseStatus.mjs +9 -0
  247. package/dist/esm/api/types/CreateGuestSessionResponse.d.mts +2 -0
  248. package/dist/esm/api/types/DeleteGuestSessionResponse.d.mts +7 -0
  249. package/dist/esm/api/types/DeleteGuestSessionResponse.mjs +2 -0
  250. package/dist/esm/api/types/DeleteGuestSessionResponseStatus.d.mts +9 -0
  251. package/dist/esm/api/types/DeleteGuestSessionResponseStatus.mjs +9 -0
  252. package/dist/esm/api/types/GetGuestSessionResponse.d.mts +13 -0
  253. package/dist/esm/api/types/GetGuestSessionResponse.mjs +2 -0
  254. package/dist/esm/api/types/GetGuestSessionResponseStatus.d.mts +9 -0
  255. package/dist/esm/api/types/GetGuestSessionResponseStatus.mjs +9 -0
  256. package/dist/esm/api/types/GoneErrorBody.d.mts +5 -0
  257. package/dist/esm/api/types/GoneErrorBody.mjs +2 -0
  258. package/dist/esm/api/types/GoneErrorBodyContent.d.mts +8 -0
  259. package/dist/esm/api/types/GoneErrorBodyContent.mjs +2 -0
  260. package/dist/esm/api/types/GoneErrorBodyContentCode.d.mts +5 -0
  261. package/dist/esm/api/types/GoneErrorBodyContentCode.mjs +5 -0
  262. package/dist/esm/api/types/GuestSessionLimits.d.mts +2 -0
  263. package/dist/esm/api/types/GuestSessionUsage.d.mts +4 -0
  264. package/dist/esm/api/types/GuestSessionUsage.mjs +2 -0
  265. package/dist/esm/api/types/InternalGuestSessionResponse.d.mts +22 -0
  266. package/dist/esm/api/types/InternalGuestSessionResponse.mjs +2 -0
  267. package/dist/esm/api/types/InternalGuestSessionResponseStatus.d.mts +9 -0
  268. package/dist/esm/api/types/InternalGuestSessionResponseStatus.mjs +9 -0
  269. package/dist/esm/api/types/Limit.d.mts +6 -0
  270. package/dist/esm/api/types/Limit.mjs +2 -0
  271. package/dist/esm/api/types/NotFoundErrorBody.d.mts +5 -0
  272. package/dist/esm/api/types/NotFoundErrorBody.mjs +2 -0
  273. package/dist/esm/api/types/NotFoundErrorBodyContent.d.mts +8 -0
  274. package/dist/esm/api/types/NotFoundErrorBodyContent.mjs +2 -0
  275. package/dist/esm/api/types/NotFoundErrorBodyContentCode.d.mts +4 -0
  276. package/dist/esm/api/types/NotFoundErrorBodyContentCode.mjs +4 -0
  277. package/dist/esm/api/types/ReserveResponse.d.mts +12 -0
  278. package/dist/esm/api/types/ReserveResponse.mjs +2 -0
  279. package/dist/esm/api/types/ReserveResponseKind.d.mts +5 -0
  280. package/dist/esm/api/types/ReserveResponseKind.mjs +5 -0
  281. package/dist/esm/api/types/ReserveResponseState.d.mts +6 -0
  282. package/dist/esm/api/types/ReserveResponseState.mjs +6 -0
  283. package/dist/esm/api/types/ServiceUnavailableErrorBody.d.mts +5 -0
  284. package/dist/esm/api/types/ServiceUnavailableErrorBody.mjs +2 -0
  285. package/dist/esm/api/types/ServiceUnavailableErrorBodyContent.d.mts +8 -0
  286. package/dist/esm/api/types/ServiceUnavailableErrorBodyContent.mjs +2 -0
  287. package/dist/esm/api/types/ServiceUnavailableErrorBodyContentCode.d.mts +6 -0
  288. package/dist/esm/api/types/ServiceUnavailableErrorBodyContentCode.mjs +6 -0
  289. package/dist/esm/api/types/SettleResponse.d.mts +5 -0
  290. package/dist/esm/api/types/SettleResponse.mjs +2 -0
  291. package/dist/esm/api/types/SettleResponseReason.d.mts +5 -0
  292. package/dist/esm/api/types/SettleResponseReason.mjs +5 -0
  293. package/dist/esm/api/types/TooManyRequestsErrorBody.d.mts +5 -0
  294. package/dist/esm/api/types/TooManyRequestsErrorBody.mjs +2 -0
  295. package/dist/esm/api/types/TooManyRequestsErrorBodyContent.d.mts +8 -0
  296. package/dist/esm/api/types/TooManyRequestsErrorBodyContent.mjs +2 -0
  297. package/dist/esm/api/types/TooManyRequestsErrorBodyContentCode.d.mts +4 -0
  298. package/dist/esm/api/types/TooManyRequestsErrorBodyContentCode.mjs +4 -0
  299. package/dist/esm/api/types/index.d.mts +27 -0
  300. package/dist/esm/api/types/index.mjs +27 -0
  301. package/dist/esm/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.mts +9 -0
  302. package/dist/esm/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.mjs +5 -0
  303. package/dist/esm/serialization/resources/guestSession/client/requests/index.d.mts +1 -0
  304. package/dist/esm/serialization/resources/guestSession/client/requests/index.mjs +1 -0
  305. package/dist/esm/serialization/resources/index.d.mts +3 -0
  306. package/dist/esm/serialization/resources/index.mjs +3 -0
  307. package/dist/esm/serialization/resources/internalGuestSession/client/index.d.mts +1 -0
  308. package/dist/esm/serialization/resources/internalGuestSession/client/index.mjs +1 -0
  309. package/dist/esm/serialization/resources/internalGuestSession/client/requests/ReserveRequest.d.mts +12 -0
  310. package/dist/esm/serialization/resources/internalGuestSession/client/requests/ReserveRequest.mjs +8 -0
  311. package/dist/esm/serialization/resources/internalGuestSession/client/requests/SettleRequest.d.mts +11 -0
  312. package/dist/esm/serialization/resources/internalGuestSession/client/requests/SettleRequest.mjs +7 -0
  313. package/dist/esm/serialization/resources/internalGuestSession/client/requests/index.d.mts +2 -0
  314. package/dist/esm/serialization/resources/internalGuestSession/client/requests/index.mjs +2 -0
  315. package/dist/esm/serialization/resources/internalGuestSession/index.d.mts +2 -0
  316. package/dist/esm/serialization/resources/internalGuestSession/index.mjs +2 -0
  317. package/dist/esm/serialization/resources/internalGuestSession/types/ReserveRequestKind.d.mts +7 -0
  318. package/dist/esm/serialization/resources/internalGuestSession/types/ReserveRequestKind.mjs +3 -0
  319. package/dist/esm/serialization/resources/internalGuestSession/types/SettleRequestOutcome.d.mts +7 -0
  320. package/dist/esm/serialization/resources/internalGuestSession/types/SettleRequestOutcome.mjs +3 -0
  321. package/dist/esm/serialization/resources/internalGuestSession/types/index.d.mts +2 -0
  322. package/dist/esm/serialization/resources/internalGuestSession/types/index.mjs +2 -0
  323. package/dist/esm/serialization/types/ClaimGuestSessionResponse.d.mts +15 -0
  324. package/dist/esm/serialization/types/ClaimGuestSessionResponse.mjs +12 -0
  325. package/dist/esm/serialization/types/ClaimGuestSessionResponseStatus.d.mts +7 -0
  326. package/dist/esm/serialization/types/ClaimGuestSessionResponseStatus.mjs +3 -0
  327. package/dist/esm/serialization/types/CreateGuestSessionResponse.d.mts +2 -0
  328. package/dist/esm/serialization/types/CreateGuestSessionResponse.mjs +2 -0
  329. package/dist/esm/serialization/types/DeleteGuestSessionResponse.d.mts +12 -0
  330. package/dist/esm/serialization/types/DeleteGuestSessionResponse.mjs +9 -0
  331. package/dist/esm/serialization/types/DeleteGuestSessionResponseStatus.d.mts +7 -0
  332. package/dist/esm/serialization/types/DeleteGuestSessionResponseStatus.mjs +3 -0
  333. package/dist/esm/serialization/types/GetGuestSessionResponse.d.mts +20 -0
  334. package/dist/esm/serialization/types/GetGuestSessionResponse.mjs +16 -0
  335. package/dist/esm/serialization/types/GetGuestSessionResponseStatus.d.mts +7 -0
  336. package/dist/esm/serialization/types/GetGuestSessionResponseStatus.mjs +3 -0
  337. package/dist/esm/serialization/types/GoneErrorBody.d.mts +11 -0
  338. package/dist/esm/serialization/types/GoneErrorBody.mjs +7 -0
  339. package/dist/esm/serialization/types/GoneErrorBodyContent.d.mts +14 -0
  340. package/dist/esm/serialization/types/GoneErrorBodyContent.mjs +10 -0
  341. package/dist/esm/serialization/types/GoneErrorBodyContentCode.d.mts +7 -0
  342. package/dist/esm/serialization/types/GoneErrorBodyContentCode.mjs +3 -0
  343. package/dist/esm/serialization/types/GuestSessionLimits.d.mts +2 -0
  344. package/dist/esm/serialization/types/GuestSessionLimits.mjs +2 -0
  345. package/dist/esm/serialization/types/GuestSessionUsage.d.mts +10 -0
  346. package/dist/esm/serialization/types/GuestSessionUsage.mjs +6 -0
  347. package/dist/esm/serialization/types/InternalGuestSessionResponse.d.mts +16 -0
  348. package/dist/esm/serialization/types/InternalGuestSessionResponse.mjs +12 -0
  349. package/dist/esm/serialization/types/InternalGuestSessionResponseStatus.d.mts +7 -0
  350. package/dist/esm/serialization/types/InternalGuestSessionResponseStatus.mjs +3 -0
  351. package/dist/esm/serialization/types/Limit.d.mts +12 -0
  352. package/dist/esm/serialization/types/Limit.mjs +8 -0
  353. package/dist/esm/serialization/types/NotFoundErrorBody.d.mts +11 -0
  354. package/dist/esm/serialization/types/NotFoundErrorBody.mjs +7 -0
  355. package/dist/esm/serialization/types/NotFoundErrorBodyContent.d.mts +14 -0
  356. package/dist/esm/serialization/types/NotFoundErrorBodyContent.mjs +10 -0
  357. package/dist/esm/serialization/types/NotFoundErrorBodyContentCode.d.mts +7 -0
  358. package/dist/esm/serialization/types/NotFoundErrorBodyContentCode.mjs +3 -0
  359. package/dist/esm/serialization/types/ReserveResponse.d.mts +20 -0
  360. package/dist/esm/serialization/types/ReserveResponse.mjs +16 -0
  361. package/dist/esm/serialization/types/ReserveResponseKind.d.mts +7 -0
  362. package/dist/esm/serialization/types/ReserveResponseKind.mjs +3 -0
  363. package/dist/esm/serialization/types/ReserveResponseState.d.mts +7 -0
  364. package/dist/esm/serialization/types/ReserveResponseState.mjs +3 -0
  365. package/dist/esm/serialization/types/ServiceUnavailableErrorBody.d.mts +11 -0
  366. package/dist/esm/serialization/types/ServiceUnavailableErrorBody.mjs +7 -0
  367. package/dist/esm/serialization/types/ServiceUnavailableErrorBodyContent.d.mts +14 -0
  368. package/dist/esm/serialization/types/ServiceUnavailableErrorBodyContent.mjs +10 -0
  369. package/dist/esm/serialization/types/ServiceUnavailableErrorBodyContentCode.d.mts +7 -0
  370. package/dist/esm/serialization/types/ServiceUnavailableErrorBodyContentCode.mjs +3 -0
  371. package/dist/esm/serialization/types/SettleResponse.d.mts +11 -0
  372. package/dist/esm/serialization/types/SettleResponse.mjs +7 -0
  373. package/dist/esm/serialization/types/SettleResponseReason.d.mts +7 -0
  374. package/dist/esm/serialization/types/SettleResponseReason.mjs +3 -0
  375. package/dist/esm/serialization/types/TooManyRequestsErrorBody.d.mts +11 -0
  376. package/dist/esm/serialization/types/TooManyRequestsErrorBody.mjs +7 -0
  377. package/dist/esm/serialization/types/TooManyRequestsErrorBodyContent.d.mts +14 -0
  378. package/dist/esm/serialization/types/TooManyRequestsErrorBodyContent.mjs +10 -0
  379. package/dist/esm/serialization/types/TooManyRequestsErrorBodyContentCode.d.mts +7 -0
  380. package/dist/esm/serialization/types/TooManyRequestsErrorBodyContentCode.mjs +3 -0
  381. package/dist/esm/serialization/types/index.d.mts +27 -0
  382. package/dist/esm/serialization/types/index.mjs +27 -0
  383. package/dist/esm/version.d.mts +1 -1
  384. package/dist/esm/version.mjs +1 -1
  385. package/package.json +1 -1
  386. package/reference.md +384 -0
@@ -0,0 +1,314 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.InternalGuestSessionClient = void 0;
58
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
59
+ const headers_js_1 = require("../../../../core/headers.js");
60
+ const core = __importStar(require("../../../../core/index.js"));
61
+ const serializers = __importStar(require("../../../../serialization/index.js"));
62
+ const FernVenusApi = __importStar(require("../../../index.js"));
63
+ class InternalGuestSessionClient {
64
+ constructor(options) {
65
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
66
+ }
67
+ /**
68
+ * The session behind a guest organization, for the service holding
69
+ * its work. This is the read the pull model in ``guest_resources`` rests
70
+ * on: FDR and Fiddle know the ``guest-<id>`` org their rows belong to, not
71
+ * the session ID, token or claim secret, so this is keyed by the org and
72
+ * opened by the service credential alone.
73
+ *
74
+ * @param {FernVenusApi.ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest} request
75
+ * @param {InternalGuestSessionClient.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @example
78
+ * await client.internalGuestSession.readByOrg({
79
+ * orgId: "org_id"
80
+ * })
81
+ */
82
+ readByOrg(request, requestOptions) {
83
+ return core.HttpResponsePromise.fromPromise(this.__readByOrg(request, requestOptions));
84
+ }
85
+ __readByOrg(request, requestOptions) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ var _a, _b, _c, _d, _e, _f, _g, _h;
88
+ const { orgId } = request;
89
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
90
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
91
+ const _response = yield core.fetcher({
92
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `internal/guest-sessions/by-org/${core.url.encodePathParam(orgId)}`),
93
+ method: "GET",
94
+ headers: _headers,
95
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
96
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
97
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
98
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
99
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
100
+ logging: this._options.logging,
101
+ });
102
+ if (_response.ok) {
103
+ return {
104
+ data: {
105
+ ok: true,
106
+ body: serializers.InternalGuestSessionResponse.parseOrThrow(_response.body, {
107
+ unrecognizedObjectKeys: "passthrough",
108
+ allowUnrecognizedUnionMembers: true,
109
+ allowUnrecognizedEnumValues: true,
110
+ skipValidation: true,
111
+ breadcrumbsPrefix: ["response"],
112
+ }),
113
+ headers: _response.headers,
114
+ rawResponse: _response.rawResponse,
115
+ },
116
+ rawResponse: _response.rawResponse,
117
+ };
118
+ }
119
+ if (_response.error.reason === "status-code") {
120
+ switch (_response.error.statusCode) {
121
+ case 422:
122
+ return {
123
+ data: {
124
+ ok: false,
125
+ error: FernVenusApi.internalGuestSession.readByOrg.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
126
+ unrecognizedObjectKeys: "passthrough",
127
+ allowUnrecognizedUnionMembers: true,
128
+ allowUnrecognizedEnumValues: true,
129
+ skipValidation: true,
130
+ breadcrumbsPrefix: ["response"],
131
+ })),
132
+ rawResponse: _response.rawResponse,
133
+ },
134
+ rawResponse: _response.rawResponse,
135
+ };
136
+ }
137
+ }
138
+ return {
139
+ data: {
140
+ ok: false,
141
+ error: FernVenusApi.internalGuestSession.readByOrg.Error._unknown(_response.error),
142
+ rawResponse: _response.rawResponse,
143
+ },
144
+ rawResponse: _response.rawResponse,
145
+ };
146
+ });
147
+ }
148
+ /**
149
+ * @param {FernVenusApi.ReserveRequest} request
150
+ * @param {InternalGuestSessionClient.RequestOptions} requestOptions - Request-specific configuration.
151
+ *
152
+ * @example
153
+ * await client.internalGuestSession.reserve({
154
+ * sessionId: "session_id",
155
+ * kind: "sdkBuild"
156
+ * })
157
+ */
158
+ reserve(request, requestOptions) {
159
+ return core.HttpResponsePromise.fromPromise(this.__reserve(request, requestOptions));
160
+ }
161
+ __reserve(request, requestOptions) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ var _a, _b, _c, _d, _e, _f, _g, _h;
164
+ const { sessionId } = request, _body = __rest(request, ["sessionId"]);
165
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
166
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
167
+ const _response = yield core.fetcher({
168
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `internal/guest-sessions/${core.url.encodePathParam(sessionId)}/quota/reserve`),
169
+ method: "POST",
170
+ headers: _headers,
171
+ contentType: "application/json",
172
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
173
+ requestType: "json",
174
+ body: serializers.ReserveRequest.jsonOrThrow(_body, {
175
+ unrecognizedObjectKeys: "strip",
176
+ omitUndefined: true,
177
+ }),
178
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
179
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
180
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
181
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
182
+ logging: this._options.logging,
183
+ });
184
+ if (_response.ok) {
185
+ return {
186
+ data: {
187
+ ok: true,
188
+ body: serializers.ReserveResponse.parseOrThrow(_response.body, {
189
+ unrecognizedObjectKeys: "passthrough",
190
+ allowUnrecognizedUnionMembers: true,
191
+ allowUnrecognizedEnumValues: true,
192
+ skipValidation: true,
193
+ breadcrumbsPrefix: ["response"],
194
+ }),
195
+ headers: _response.headers,
196
+ rawResponse: _response.rawResponse,
197
+ },
198
+ rawResponse: _response.rawResponse,
199
+ };
200
+ }
201
+ if (_response.error.reason === "status-code") {
202
+ switch (_response.error.statusCode) {
203
+ case 422:
204
+ return {
205
+ data: {
206
+ ok: false,
207
+ error: FernVenusApi.internalGuestSession.reserve.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
208
+ unrecognizedObjectKeys: "passthrough",
209
+ allowUnrecognizedUnionMembers: true,
210
+ allowUnrecognizedEnumValues: true,
211
+ skipValidation: true,
212
+ breadcrumbsPrefix: ["response"],
213
+ })),
214
+ rawResponse: _response.rawResponse,
215
+ },
216
+ rawResponse: _response.rawResponse,
217
+ };
218
+ }
219
+ }
220
+ return {
221
+ data: {
222
+ ok: false,
223
+ error: FernVenusApi.internalGuestSession.reserve.Error._unknown(_response.error),
224
+ rawResponse: _response.rawResponse,
225
+ },
226
+ rawResponse: _response.rawResponse,
227
+ };
228
+ });
229
+ }
230
+ /**
231
+ * @param {FernVenusApi.SettleRequest} request
232
+ * @param {InternalGuestSessionClient.RequestOptions} requestOptions - Request-specific configuration.
233
+ *
234
+ * @example
235
+ * await client.internalGuestSession.settle({
236
+ * sessionId: "session_id",
237
+ * reservationId: "reservationId",
238
+ * outcome: "succeeded"
239
+ * })
240
+ */
241
+ settle(request, requestOptions) {
242
+ return core.HttpResponsePromise.fromPromise(this.__settle(request, requestOptions));
243
+ }
244
+ __settle(request, requestOptions) {
245
+ return __awaiter(this, void 0, void 0, function* () {
246
+ var _a, _b, _c, _d, _e, _f, _g, _h;
247
+ const { sessionId } = request, _body = __rest(request, ["sessionId"]);
248
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
249
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
250
+ const _response = yield core.fetcher({
251
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `internal/guest-sessions/${core.url.encodePathParam(sessionId)}/quota/settle`),
252
+ method: "POST",
253
+ headers: _headers,
254
+ contentType: "application/json",
255
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
256
+ requestType: "json",
257
+ body: serializers.SettleRequest.jsonOrThrow(_body, {
258
+ unrecognizedObjectKeys: "strip",
259
+ omitUndefined: true,
260
+ }),
261
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
262
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
263
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
264
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
265
+ logging: this._options.logging,
266
+ });
267
+ if (_response.ok) {
268
+ return {
269
+ data: {
270
+ ok: true,
271
+ body: serializers.SettleResponse.parseOrThrow(_response.body, {
272
+ unrecognizedObjectKeys: "passthrough",
273
+ allowUnrecognizedUnionMembers: true,
274
+ allowUnrecognizedEnumValues: true,
275
+ skipValidation: true,
276
+ breadcrumbsPrefix: ["response"],
277
+ }),
278
+ headers: _response.headers,
279
+ rawResponse: _response.rawResponse,
280
+ },
281
+ rawResponse: _response.rawResponse,
282
+ };
283
+ }
284
+ if (_response.error.reason === "status-code") {
285
+ switch (_response.error.statusCode) {
286
+ case 422:
287
+ return {
288
+ data: {
289
+ ok: false,
290
+ error: FernVenusApi.internalGuestSession.settle.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
291
+ unrecognizedObjectKeys: "passthrough",
292
+ allowUnrecognizedUnionMembers: true,
293
+ allowUnrecognizedEnumValues: true,
294
+ skipValidation: true,
295
+ breadcrumbsPrefix: ["response"],
296
+ })),
297
+ rawResponse: _response.rawResponse,
298
+ },
299
+ rawResponse: _response.rawResponse,
300
+ };
301
+ }
302
+ }
303
+ return {
304
+ data: {
305
+ ok: false,
306
+ error: FernVenusApi.internalGuestSession.settle.Error._unknown(_response.error),
307
+ rawResponse: _response.rawResponse,
308
+ },
309
+ rawResponse: _response.rawResponse,
310
+ };
311
+ });
312
+ }
313
+ }
314
+ exports.InternalGuestSessionClient = InternalGuestSessionClient;
@@ -0,0 +1,4 @@
1
+ export * as readByOrg from "./readByOrg.js";
2
+ export * from "./requests/index.js";
3
+ export * as reserve from "./reserve.js";
4
+ export * as settle from "./settle.js";
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
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
+ })();
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.settle = exports.reserve = exports.readByOrg = void 0;
40
+ exports.readByOrg = __importStar(require("./readByOrg.js"));
41
+ __exportStar(require("./requests/index.js"), exports);
42
+ exports.reserve = __importStar(require("./reserve.js"));
43
+ exports.settle = __importStar(require("./settle.js"));
@@ -0,0 +1,25 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as FernVenusApi from "../../../index.js";
3
+ export type Error = FernVenusApi.internalGuestSession.readByOrg.Error.UnprocessableEntityError | FernVenusApi.internalGuestSession.readByOrg.Error._Unknown;
4
+ export declare namespace Error {
5
+ interface UnprocessableEntityError extends _Utils {
6
+ statusCode: 422;
7
+ content: FernVenusApi.HttpValidationError;
8
+ }
9
+ interface _Unknown extends _Utils {
10
+ statusCode: void;
11
+ content: core.Fetcher.Error;
12
+ }
13
+ interface _Utils {
14
+ _visit: <_Result>(visitor: FernVenusApi.internalGuestSession.readByOrg.Error._Visitor<_Result>) => _Result;
15
+ }
16
+ interface _Visitor<_Result> {
17
+ unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => _Result;
18
+ _other: (value: core.Fetcher.Error) => _Result;
19
+ }
20
+ }
21
+ export declare const Error: {
22
+ readonly unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => FernVenusApi.internalGuestSession.readByOrg.Error.UnprocessableEntityError;
23
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.internalGuestSession.readByOrg.Error._Unknown;
24
+ readonly _visit: <_Result>(value: FernVenusApi.internalGuestSession.readByOrg.Error, visitor: FernVenusApi.internalGuestSession.readByOrg.Error._Visitor<_Result>) => _Result;
25
+ };
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.Error = void 0;
38
+ const FernVenusApi = __importStar(require("../../../index.js"));
39
+ exports.Error = {
40
+ unprocessableEntityError: (value) => {
41
+ return {
42
+ content: value,
43
+ statusCode: 422,
44
+ _visit: function (visitor) {
45
+ return FernVenusApi.internalGuestSession.readByOrg.Error._visit(this, visitor);
46
+ },
47
+ };
48
+ },
49
+ _unknown: (fetcherError) => {
50
+ return {
51
+ statusCode: undefined,
52
+ content: fetcherError,
53
+ _visit: function (visitor) {
54
+ return FernVenusApi.internalGuestSession.readByOrg.Error._visit(this, visitor);
55
+ },
56
+ };
57
+ },
58
+ _visit: (value, visitor) => {
59
+ switch (value.statusCode) {
60
+ case 422:
61
+ return visitor.unprocessableEntityError(value.content);
62
+ default:
63
+ return visitor._other(value.content);
64
+ }
65
+ },
66
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * orgId: "org_id"
5
+ * }
6
+ */
7
+ export interface ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest {
8
+ orgId: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import type * as FernVenusApi from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * sessionId: "session_id",
6
+ * kind: "sdkBuild"
7
+ * }
8
+ */
9
+ export interface ReserveRequest {
10
+ sessionId: string;
11
+ kind: FernVenusApi.ReserveRequestKind;
12
+ idempotencyKey?: string | null;
13
+ leaseSeconds?: number;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import type * as FernVenusApi from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * sessionId: "session_id",
6
+ * reservationId: "reservationId",
7
+ * outcome: "succeeded"
8
+ * }
9
+ */
10
+ export interface SettleRequest {
11
+ sessionId: string;
12
+ reservationId: string;
13
+ outcome: FernVenusApi.SettleRequestOutcome;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export type { ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest } from "./ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest.js";
2
+ export type { ReserveRequest } from "./ReserveRequest.js";
3
+ export type { SettleRequest } from "./SettleRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as FernVenusApi from "../../../index.js";
3
+ export type Error = FernVenusApi.internalGuestSession.reserve.Error.UnprocessableEntityError | FernVenusApi.internalGuestSession.reserve.Error._Unknown;
4
+ export declare namespace Error {
5
+ interface UnprocessableEntityError extends _Utils {
6
+ statusCode: 422;
7
+ content: FernVenusApi.HttpValidationError;
8
+ }
9
+ interface _Unknown extends _Utils {
10
+ statusCode: void;
11
+ content: core.Fetcher.Error;
12
+ }
13
+ interface _Utils {
14
+ _visit: <_Result>(visitor: FernVenusApi.internalGuestSession.reserve.Error._Visitor<_Result>) => _Result;
15
+ }
16
+ interface _Visitor<_Result> {
17
+ unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => _Result;
18
+ _other: (value: core.Fetcher.Error) => _Result;
19
+ }
20
+ }
21
+ export declare const Error: {
22
+ readonly unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => FernVenusApi.internalGuestSession.reserve.Error.UnprocessableEntityError;
23
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.internalGuestSession.reserve.Error._Unknown;
24
+ readonly _visit: <_Result>(value: FernVenusApi.internalGuestSession.reserve.Error, visitor: FernVenusApi.internalGuestSession.reserve.Error._Visitor<_Result>) => _Result;
25
+ };
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.Error = void 0;
38
+ const FernVenusApi = __importStar(require("../../../index.js"));
39
+ exports.Error = {
40
+ unprocessableEntityError: (value) => {
41
+ return {
42
+ content: value,
43
+ statusCode: 422,
44
+ _visit: function (visitor) {
45
+ return FernVenusApi.internalGuestSession.reserve.Error._visit(this, visitor);
46
+ },
47
+ };
48
+ },
49
+ _unknown: (fetcherError) => {
50
+ return {
51
+ statusCode: undefined,
52
+ content: fetcherError,
53
+ _visit: function (visitor) {
54
+ return FernVenusApi.internalGuestSession.reserve.Error._visit(this, visitor);
55
+ },
56
+ };
57
+ },
58
+ _visit: (value, visitor) => {
59
+ switch (value.statusCode) {
60
+ case 422:
61
+ return visitor.unprocessableEntityError(value.content);
62
+ default:
63
+ return visitor._other(value.content);
64
+ }
65
+ },
66
+ };
@@ -0,0 +1,25 @@
1
+ import type * as core from "../../../../core/index.js";
2
+ import * as FernVenusApi from "../../../index.js";
3
+ export type Error = FernVenusApi.internalGuestSession.settle.Error.UnprocessableEntityError | FernVenusApi.internalGuestSession.settle.Error._Unknown;
4
+ export declare namespace Error {
5
+ interface UnprocessableEntityError extends _Utils {
6
+ statusCode: 422;
7
+ content: FernVenusApi.HttpValidationError;
8
+ }
9
+ interface _Unknown extends _Utils {
10
+ statusCode: void;
11
+ content: core.Fetcher.Error;
12
+ }
13
+ interface _Utils {
14
+ _visit: <_Result>(visitor: FernVenusApi.internalGuestSession.settle.Error._Visitor<_Result>) => _Result;
15
+ }
16
+ interface _Visitor<_Result> {
17
+ unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => _Result;
18
+ _other: (value: core.Fetcher.Error) => _Result;
19
+ }
20
+ }
21
+ export declare const Error: {
22
+ readonly unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => FernVenusApi.internalGuestSession.settle.Error.UnprocessableEntityError;
23
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.internalGuestSession.settle.Error._Unknown;
24
+ readonly _visit: <_Result>(value: FernVenusApi.internalGuestSession.settle.Error, visitor: FernVenusApi.internalGuestSession.settle.Error._Visitor<_Result>) => _Result;
25
+ };