@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.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +11 -6
- package/dist/cjs/api/resources/guestSession/client/Client.d.ts +53 -0
- package/dist/cjs/api/resources/guestSession/client/Client.js +325 -0
- package/dist/cjs/api/resources/guestSession/client/claim.d.ts +25 -0
- package/dist/cjs/api/resources/guestSession/client/claim.js +66 -0
- package/dist/cjs/api/resources/guestSession/client/create.d.ts +13 -1
- package/dist/cjs/api/resources/guestSession/client/create.js +22 -0
- package/dist/cjs/api/resources/guestSession/client/delete.d.ts +25 -0
- package/dist/cjs/api/resources/guestSession/client/delete.js +66 -0
- package/dist/cjs/api/resources/guestSession/client/get.d.ts +43 -0
- package/dist/cjs/api/resources/guestSession/client/get.js +99 -0
- package/dist/cjs/api/resources/guestSession/client/index.d.ts +3 -0
- package/dist/cjs/api/resources/guestSession/client/index.js +4 -1
- package/dist/cjs/api/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.ts +10 -0
- package/dist/cjs/api/resources/guestSession/client/requests/ClaimGuestSessionRequest.js +3 -0
- package/dist/cjs/api/resources/guestSession/client/requests/DeleteGuestSessionsSessionIdDeleteRequest.d.ts +9 -0
- package/dist/cjs/api/resources/guestSession/client/requests/DeleteGuestSessionsSessionIdDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/guestSession/client/requests/GetGuestSessionsSessionIdGetRequest.d.ts +11 -0
- package/dist/cjs/api/resources/guestSession/client/requests/GetGuestSessionsSessionIdGetRequest.js +3 -0
- package/dist/cjs/api/resources/guestSession/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/internalGuestSession/client/Client.d.ts +55 -0
- package/dist/cjs/api/resources/internalGuestSession/client/Client.js +314 -0
- package/dist/cjs/api/resources/internalGuestSession/client/index.d.ts +4 -0
- package/dist/cjs/api/resources/internalGuestSession/client/index.js +43 -0
- package/dist/cjs/api/resources/internalGuestSession/client/readByOrg.d.ts +25 -0
- package/dist/cjs/api/resources/internalGuestSession/client/readByOrg.js +66 -0
- package/dist/cjs/api/resources/internalGuestSession/client/requests/ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest.d.ts +9 -0
- package/dist/cjs/api/resources/internalGuestSession/client/requests/ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest.js +3 -0
- package/dist/cjs/api/resources/internalGuestSession/client/requests/ReserveRequest.d.ts +14 -0
- package/dist/cjs/api/resources/internalGuestSession/client/requests/ReserveRequest.js +3 -0
- package/dist/cjs/api/resources/internalGuestSession/client/requests/SettleRequest.d.ts +14 -0
- package/dist/cjs/api/resources/internalGuestSession/client/requests/SettleRequest.js +3 -0
- package/dist/cjs/api/resources/internalGuestSession/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/internalGuestSession/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/internalGuestSession/client/reserve.d.ts +25 -0
- package/dist/cjs/api/resources/internalGuestSession/client/reserve.js +66 -0
- package/dist/cjs/api/resources/internalGuestSession/client/settle.d.ts +25 -0
- package/dist/cjs/api/resources/internalGuestSession/client/settle.js +66 -0
- package/dist/cjs/api/resources/internalGuestSession/index.d.ts +2 -0
- package/dist/cjs/api/resources/internalGuestSession/index.js +18 -0
- package/dist/cjs/api/resources/internalGuestSession/types/ReserveRequestKind.d.ts +5 -0
- package/dist/cjs/api/resources/internalGuestSession/types/ReserveRequestKind.js +8 -0
- package/dist/cjs/api/resources/internalGuestSession/types/SettleRequestOutcome.d.ts +5 -0
- package/dist/cjs/api/resources/internalGuestSession/types/SettleRequestOutcome.js +8 -0
- package/dist/cjs/api/resources/internalGuestSession/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/internalGuestSession/types/index.js +18 -0
- package/dist/cjs/api/types/ClaimGuestSessionResponse.d.ts +10 -0
- package/dist/cjs/api/types/ClaimGuestSessionResponse.js +3 -0
- package/dist/cjs/api/types/ClaimGuestSessionResponseStatus.d.ts +9 -0
- package/dist/cjs/api/types/ClaimGuestSessionResponseStatus.js +12 -0
- package/dist/cjs/api/types/CreateGuestSessionResponse.d.ts +2 -0
- package/dist/cjs/api/types/DeleteGuestSessionResponse.d.ts +7 -0
- package/dist/cjs/api/types/DeleteGuestSessionResponse.js +3 -0
- package/dist/cjs/api/types/DeleteGuestSessionResponseStatus.d.ts +9 -0
- package/dist/cjs/api/types/DeleteGuestSessionResponseStatus.js +12 -0
- package/dist/cjs/api/types/GetGuestSessionResponse.d.ts +13 -0
- package/dist/cjs/api/types/GetGuestSessionResponse.js +3 -0
- package/dist/cjs/api/types/GetGuestSessionResponseStatus.d.ts +9 -0
- package/dist/cjs/api/types/GetGuestSessionResponseStatus.js +12 -0
- package/dist/cjs/api/types/GoneErrorBody.d.ts +5 -0
- package/dist/cjs/api/types/GoneErrorBody.js +3 -0
- package/dist/cjs/api/types/GoneErrorBodyContent.d.ts +8 -0
- package/dist/cjs/api/types/GoneErrorBodyContent.js +3 -0
- package/dist/cjs/api/types/GoneErrorBodyContentCode.d.ts +5 -0
- package/dist/cjs/api/types/GoneErrorBodyContentCode.js +8 -0
- package/dist/cjs/api/types/GuestSessionLimits.d.ts +2 -0
- package/dist/cjs/api/types/GuestSessionUsage.d.ts +4 -0
- package/dist/cjs/api/types/GuestSessionUsage.js +3 -0
- package/dist/cjs/api/types/InternalGuestSessionResponse.d.ts +22 -0
- package/dist/cjs/api/types/InternalGuestSessionResponse.js +3 -0
- package/dist/cjs/api/types/InternalGuestSessionResponseStatus.d.ts +9 -0
- package/dist/cjs/api/types/InternalGuestSessionResponseStatus.js +12 -0
- package/dist/cjs/api/types/Limit.d.ts +6 -0
- package/dist/cjs/api/types/Limit.js +3 -0
- package/dist/cjs/api/types/NotFoundErrorBody.d.ts +5 -0
- package/dist/cjs/api/types/NotFoundErrorBody.js +3 -0
- package/dist/cjs/api/types/NotFoundErrorBodyContent.d.ts +8 -0
- package/dist/cjs/api/types/NotFoundErrorBodyContent.js +3 -0
- package/dist/cjs/api/types/NotFoundErrorBodyContentCode.d.ts +4 -0
- package/dist/cjs/api/types/NotFoundErrorBodyContentCode.js +7 -0
- package/dist/cjs/api/types/ReserveResponse.d.ts +12 -0
- package/dist/cjs/api/types/ReserveResponse.js +3 -0
- package/dist/cjs/api/types/ReserveResponseKind.d.ts +5 -0
- package/dist/cjs/api/types/ReserveResponseKind.js +8 -0
- package/dist/cjs/api/types/ReserveResponseState.d.ts +6 -0
- package/dist/cjs/api/types/ReserveResponseState.js +9 -0
- package/dist/cjs/api/types/ServiceUnavailableErrorBody.d.ts +5 -0
- package/dist/cjs/api/types/ServiceUnavailableErrorBody.js +3 -0
- package/dist/cjs/api/types/ServiceUnavailableErrorBodyContent.d.ts +8 -0
- package/dist/cjs/api/types/ServiceUnavailableErrorBodyContent.js +3 -0
- package/dist/cjs/api/types/ServiceUnavailableErrorBodyContentCode.d.ts +6 -0
- package/dist/cjs/api/types/ServiceUnavailableErrorBodyContentCode.js +9 -0
- package/dist/cjs/api/types/SettleResponse.d.ts +5 -0
- package/dist/cjs/api/types/SettleResponse.js +3 -0
- package/dist/cjs/api/types/SettleResponseReason.d.ts +5 -0
- package/dist/cjs/api/types/SettleResponseReason.js +8 -0
- package/dist/cjs/api/types/TooManyRequestsErrorBody.d.ts +5 -0
- package/dist/cjs/api/types/TooManyRequestsErrorBody.js +3 -0
- package/dist/cjs/api/types/TooManyRequestsErrorBodyContent.d.ts +8 -0
- package/dist/cjs/api/types/TooManyRequestsErrorBodyContent.js +3 -0
- package/dist/cjs/api/types/TooManyRequestsErrorBodyContentCode.d.ts +4 -0
- package/dist/cjs/api/types/TooManyRequestsErrorBodyContentCode.js +7 -0
- package/dist/cjs/api/types/index.d.ts +27 -0
- package/dist/cjs/api/types/index.js +27 -0
- package/dist/cjs/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.ts +9 -0
- package/dist/cjs/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.js +41 -0
- package/dist/cjs/serialization/resources/guestSession/client/requests/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/guestSession/client/requests/index.js +3 -1
- package/dist/cjs/serialization/resources/index.d.ts +3 -0
- package/dist/cjs/serialization/resources/index.js +4 -1
- package/dist/cjs/serialization/resources/internalGuestSession/client/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/internalGuestSession/client/index.js +17 -0
- package/dist/cjs/serialization/resources/internalGuestSession/client/requests/ReserveRequest.d.ts +12 -0
- package/dist/cjs/serialization/resources/internalGuestSession/client/requests/ReserveRequest.js +44 -0
- package/dist/cjs/serialization/resources/internalGuestSession/client/requests/SettleRequest.d.ts +11 -0
- package/dist/cjs/serialization/resources/internalGuestSession/client/requests/SettleRequest.js +43 -0
- package/dist/cjs/serialization/resources/internalGuestSession/client/requests/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/internalGuestSession/client/requests/index.js +7 -0
- package/dist/cjs/serialization/resources/internalGuestSession/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/internalGuestSession/index.js +18 -0
- package/dist/cjs/serialization/resources/internalGuestSession/types/ReserveRequestKind.d.ts +7 -0
- package/dist/cjs/serialization/resources/internalGuestSession/types/ReserveRequestKind.js +39 -0
- package/dist/cjs/serialization/resources/internalGuestSession/types/SettleRequestOutcome.d.ts +7 -0
- package/dist/cjs/serialization/resources/internalGuestSession/types/SettleRequestOutcome.js +39 -0
- package/dist/cjs/serialization/resources/internalGuestSession/types/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/internalGuestSession/types/index.js +18 -0
- package/dist/cjs/serialization/types/ClaimGuestSessionResponse.d.ts +15 -0
- package/dist/cjs/serialization/types/ClaimGuestSessionResponse.js +48 -0
- package/dist/cjs/serialization/types/ClaimGuestSessionResponseStatus.d.ts +7 -0
- package/dist/cjs/serialization/types/ClaimGuestSessionResponseStatus.js +39 -0
- package/dist/cjs/serialization/types/CreateGuestSessionResponse.d.ts +2 -0
- package/dist/cjs/serialization/types/CreateGuestSessionResponse.js +2 -0
- package/dist/cjs/serialization/types/DeleteGuestSessionResponse.d.ts +12 -0
- package/dist/cjs/serialization/types/DeleteGuestSessionResponse.js +45 -0
- package/dist/cjs/serialization/types/DeleteGuestSessionResponseStatus.d.ts +7 -0
- package/dist/cjs/serialization/types/DeleteGuestSessionResponseStatus.js +39 -0
- package/dist/cjs/serialization/types/GetGuestSessionResponse.d.ts +20 -0
- package/dist/cjs/serialization/types/GetGuestSessionResponse.js +52 -0
- package/dist/cjs/serialization/types/GetGuestSessionResponseStatus.d.ts +7 -0
- package/dist/cjs/serialization/types/GetGuestSessionResponseStatus.js +39 -0
- package/dist/cjs/serialization/types/GoneErrorBody.d.ts +11 -0
- package/dist/cjs/serialization/types/GoneErrorBody.js +43 -0
- package/dist/cjs/serialization/types/GoneErrorBodyContent.d.ts +14 -0
- package/dist/cjs/serialization/types/GoneErrorBodyContent.js +46 -0
- package/dist/cjs/serialization/types/GoneErrorBodyContentCode.d.ts +7 -0
- package/dist/cjs/serialization/types/GoneErrorBodyContentCode.js +39 -0
- package/dist/cjs/serialization/types/GuestSessionLimits.d.ts +2 -0
- package/dist/cjs/serialization/types/GuestSessionLimits.js +2 -0
- package/dist/cjs/serialization/types/GuestSessionUsage.d.ts +10 -0
- package/dist/cjs/serialization/types/GuestSessionUsage.js +42 -0
- package/dist/cjs/serialization/types/InternalGuestSessionResponse.d.ts +16 -0
- package/dist/cjs/serialization/types/InternalGuestSessionResponse.js +48 -0
- package/dist/cjs/serialization/types/InternalGuestSessionResponseStatus.d.ts +7 -0
- package/dist/cjs/serialization/types/InternalGuestSessionResponseStatus.js +39 -0
- package/dist/cjs/serialization/types/Limit.d.ts +12 -0
- package/dist/cjs/serialization/types/Limit.js +44 -0
- package/dist/cjs/serialization/types/NotFoundErrorBody.d.ts +11 -0
- package/dist/cjs/serialization/types/NotFoundErrorBody.js +43 -0
- package/dist/cjs/serialization/types/NotFoundErrorBodyContent.d.ts +14 -0
- package/dist/cjs/serialization/types/NotFoundErrorBodyContent.js +46 -0
- package/dist/cjs/serialization/types/NotFoundErrorBodyContentCode.d.ts +7 -0
- package/dist/cjs/serialization/types/NotFoundErrorBodyContentCode.js +39 -0
- package/dist/cjs/serialization/types/ReserveResponse.d.ts +20 -0
- package/dist/cjs/serialization/types/ReserveResponse.js +52 -0
- package/dist/cjs/serialization/types/ReserveResponseKind.d.ts +7 -0
- package/dist/cjs/serialization/types/ReserveResponseKind.js +39 -0
- package/dist/cjs/serialization/types/ReserveResponseState.d.ts +7 -0
- package/dist/cjs/serialization/types/ReserveResponseState.js +39 -0
- package/dist/cjs/serialization/types/ServiceUnavailableErrorBody.d.ts +11 -0
- package/dist/cjs/serialization/types/ServiceUnavailableErrorBody.js +43 -0
- package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyContent.d.ts +14 -0
- package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyContent.js +46 -0
- package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyContentCode.d.ts +7 -0
- package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyContentCode.js +39 -0
- package/dist/cjs/serialization/types/SettleResponse.d.ts +11 -0
- package/dist/cjs/serialization/types/SettleResponse.js +43 -0
- package/dist/cjs/serialization/types/SettleResponseReason.d.ts +7 -0
- package/dist/cjs/serialization/types/SettleResponseReason.js +39 -0
- package/dist/cjs/serialization/types/TooManyRequestsErrorBody.d.ts +11 -0
- package/dist/cjs/serialization/types/TooManyRequestsErrorBody.js +43 -0
- package/dist/cjs/serialization/types/TooManyRequestsErrorBodyContent.d.ts +14 -0
- package/dist/cjs/serialization/types/TooManyRequestsErrorBodyContent.js +46 -0
- package/dist/cjs/serialization/types/TooManyRequestsErrorBodyContentCode.d.ts +7 -0
- package/dist/cjs/serialization/types/TooManyRequestsErrorBodyContentCode.js +39 -0
- package/dist/cjs/serialization/types/index.d.ts +27 -0
- package/dist/cjs/serialization/types/index.js +27 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/guestSession/client/Client.d.mts +53 -0
- package/dist/esm/api/resources/guestSession/client/Client.mjs +326 -1
- package/dist/esm/api/resources/guestSession/client/claim.d.mts +25 -0
- package/dist/esm/api/resources/guestSession/client/claim.mjs +30 -0
- package/dist/esm/api/resources/guestSession/client/create.d.mts +13 -1
- package/dist/esm/api/resources/guestSession/client/create.mjs +22 -0
- package/dist/esm/api/resources/guestSession/client/delete.d.mts +25 -0
- package/dist/esm/api/resources/guestSession/client/delete.mjs +30 -0
- package/dist/esm/api/resources/guestSession/client/get.d.mts +43 -0
- package/dist/esm/api/resources/guestSession/client/get.mjs +63 -0
- package/dist/esm/api/resources/guestSession/client/index.d.mts +3 -0
- package/dist/esm/api/resources/guestSession/client/index.mjs +3 -0
- package/dist/esm/api/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.mts +10 -0
- package/dist/esm/api/resources/guestSession/client/requests/ClaimGuestSessionRequest.mjs +2 -0
- package/dist/esm/api/resources/guestSession/client/requests/DeleteGuestSessionsSessionIdDeleteRequest.d.mts +9 -0
- package/dist/esm/api/resources/guestSession/client/requests/DeleteGuestSessionsSessionIdDeleteRequest.mjs +2 -0
- package/dist/esm/api/resources/guestSession/client/requests/GetGuestSessionsSessionIdGetRequest.d.mts +11 -0
- package/dist/esm/api/resources/guestSession/client/requests/GetGuestSessionsSessionIdGetRequest.mjs +2 -0
- package/dist/esm/api/resources/guestSession/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/internalGuestSession/client/Client.d.mts +55 -0
- package/dist/esm/api/resources/internalGuestSession/client/Client.mjs +277 -0
- package/dist/esm/api/resources/internalGuestSession/client/index.d.mts +4 -0
- package/dist/esm/api/resources/internalGuestSession/client/index.mjs +4 -0
- package/dist/esm/api/resources/internalGuestSession/client/readByOrg.d.mts +25 -0
- package/dist/esm/api/resources/internalGuestSession/client/readByOrg.mjs +30 -0
- package/dist/esm/api/resources/internalGuestSession/client/requests/ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest.d.mts +9 -0
- package/dist/esm/api/resources/internalGuestSession/client/requests/ReadByOrgInternalGuestSessionsByOrgOrgIdGetRequest.mjs +2 -0
- package/dist/esm/api/resources/internalGuestSession/client/requests/ReserveRequest.d.mts +14 -0
- package/dist/esm/api/resources/internalGuestSession/client/requests/ReserveRequest.mjs +2 -0
- package/dist/esm/api/resources/internalGuestSession/client/requests/SettleRequest.d.mts +14 -0
- package/dist/esm/api/resources/internalGuestSession/client/requests/SettleRequest.mjs +2 -0
- package/dist/esm/api/resources/internalGuestSession/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/internalGuestSession/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/internalGuestSession/client/reserve.d.mts +25 -0
- package/dist/esm/api/resources/internalGuestSession/client/reserve.mjs +30 -0
- package/dist/esm/api/resources/internalGuestSession/client/settle.d.mts +25 -0
- package/dist/esm/api/resources/internalGuestSession/client/settle.mjs +30 -0
- package/dist/esm/api/resources/internalGuestSession/index.d.mts +2 -0
- package/dist/esm/api/resources/internalGuestSession/index.mjs +2 -0
- package/dist/esm/api/resources/internalGuestSession/types/ReserveRequestKind.d.mts +5 -0
- package/dist/esm/api/resources/internalGuestSession/types/ReserveRequestKind.mjs +5 -0
- package/dist/esm/api/resources/internalGuestSession/types/SettleRequestOutcome.d.mts +5 -0
- package/dist/esm/api/resources/internalGuestSession/types/SettleRequestOutcome.mjs +5 -0
- package/dist/esm/api/resources/internalGuestSession/types/index.d.mts +2 -0
- package/dist/esm/api/resources/internalGuestSession/types/index.mjs +2 -0
- package/dist/esm/api/types/ClaimGuestSessionResponse.d.mts +10 -0
- package/dist/esm/api/types/ClaimGuestSessionResponse.mjs +2 -0
- package/dist/esm/api/types/ClaimGuestSessionResponseStatus.d.mts +9 -0
- package/dist/esm/api/types/ClaimGuestSessionResponseStatus.mjs +9 -0
- package/dist/esm/api/types/CreateGuestSessionResponse.d.mts +2 -0
- package/dist/esm/api/types/DeleteGuestSessionResponse.d.mts +7 -0
- package/dist/esm/api/types/DeleteGuestSessionResponse.mjs +2 -0
- package/dist/esm/api/types/DeleteGuestSessionResponseStatus.d.mts +9 -0
- package/dist/esm/api/types/DeleteGuestSessionResponseStatus.mjs +9 -0
- package/dist/esm/api/types/GetGuestSessionResponse.d.mts +13 -0
- package/dist/esm/api/types/GetGuestSessionResponse.mjs +2 -0
- package/dist/esm/api/types/GetGuestSessionResponseStatus.d.mts +9 -0
- package/dist/esm/api/types/GetGuestSessionResponseStatus.mjs +9 -0
- package/dist/esm/api/types/GoneErrorBody.d.mts +5 -0
- package/dist/esm/api/types/GoneErrorBody.mjs +2 -0
- package/dist/esm/api/types/GoneErrorBodyContent.d.mts +8 -0
- package/dist/esm/api/types/GoneErrorBodyContent.mjs +2 -0
- package/dist/esm/api/types/GoneErrorBodyContentCode.d.mts +5 -0
- package/dist/esm/api/types/GoneErrorBodyContentCode.mjs +5 -0
- package/dist/esm/api/types/GuestSessionLimits.d.mts +2 -0
- package/dist/esm/api/types/GuestSessionUsage.d.mts +4 -0
- package/dist/esm/api/types/GuestSessionUsage.mjs +2 -0
- package/dist/esm/api/types/InternalGuestSessionResponse.d.mts +22 -0
- package/dist/esm/api/types/InternalGuestSessionResponse.mjs +2 -0
- package/dist/esm/api/types/InternalGuestSessionResponseStatus.d.mts +9 -0
- package/dist/esm/api/types/InternalGuestSessionResponseStatus.mjs +9 -0
- package/dist/esm/api/types/Limit.d.mts +6 -0
- package/dist/esm/api/types/Limit.mjs +2 -0
- package/dist/esm/api/types/NotFoundErrorBody.d.mts +5 -0
- package/dist/esm/api/types/NotFoundErrorBody.mjs +2 -0
- package/dist/esm/api/types/NotFoundErrorBodyContent.d.mts +8 -0
- package/dist/esm/api/types/NotFoundErrorBodyContent.mjs +2 -0
- package/dist/esm/api/types/NotFoundErrorBodyContentCode.d.mts +4 -0
- package/dist/esm/api/types/NotFoundErrorBodyContentCode.mjs +4 -0
- package/dist/esm/api/types/ReserveResponse.d.mts +12 -0
- package/dist/esm/api/types/ReserveResponse.mjs +2 -0
- package/dist/esm/api/types/ReserveResponseKind.d.mts +5 -0
- package/dist/esm/api/types/ReserveResponseKind.mjs +5 -0
- package/dist/esm/api/types/ReserveResponseState.d.mts +6 -0
- package/dist/esm/api/types/ReserveResponseState.mjs +6 -0
- package/dist/esm/api/types/ServiceUnavailableErrorBody.d.mts +5 -0
- package/dist/esm/api/types/ServiceUnavailableErrorBody.mjs +2 -0
- package/dist/esm/api/types/ServiceUnavailableErrorBodyContent.d.mts +8 -0
- package/dist/esm/api/types/ServiceUnavailableErrorBodyContent.mjs +2 -0
- package/dist/esm/api/types/ServiceUnavailableErrorBodyContentCode.d.mts +6 -0
- package/dist/esm/api/types/ServiceUnavailableErrorBodyContentCode.mjs +6 -0
- package/dist/esm/api/types/SettleResponse.d.mts +5 -0
- package/dist/esm/api/types/SettleResponse.mjs +2 -0
- package/dist/esm/api/types/SettleResponseReason.d.mts +5 -0
- package/dist/esm/api/types/SettleResponseReason.mjs +5 -0
- package/dist/esm/api/types/TooManyRequestsErrorBody.d.mts +5 -0
- package/dist/esm/api/types/TooManyRequestsErrorBody.mjs +2 -0
- package/dist/esm/api/types/TooManyRequestsErrorBodyContent.d.mts +8 -0
- package/dist/esm/api/types/TooManyRequestsErrorBodyContent.mjs +2 -0
- package/dist/esm/api/types/TooManyRequestsErrorBodyContentCode.d.mts +4 -0
- package/dist/esm/api/types/TooManyRequestsErrorBodyContentCode.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +27 -0
- package/dist/esm/api/types/index.mjs +27 -0
- package/dist/esm/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.d.mts +9 -0
- package/dist/esm/serialization/resources/guestSession/client/requests/ClaimGuestSessionRequest.mjs +5 -0
- package/dist/esm/serialization/resources/guestSession/client/requests/index.d.mts +1 -0
- package/dist/esm/serialization/resources/guestSession/client/requests/index.mjs +1 -0
- package/dist/esm/serialization/resources/index.d.mts +3 -0
- package/dist/esm/serialization/resources/index.mjs +3 -0
- package/dist/esm/serialization/resources/internalGuestSession/client/index.d.mts +1 -0
- package/dist/esm/serialization/resources/internalGuestSession/client/index.mjs +1 -0
- package/dist/esm/serialization/resources/internalGuestSession/client/requests/ReserveRequest.d.mts +12 -0
- package/dist/esm/serialization/resources/internalGuestSession/client/requests/ReserveRequest.mjs +8 -0
- package/dist/esm/serialization/resources/internalGuestSession/client/requests/SettleRequest.d.mts +11 -0
- package/dist/esm/serialization/resources/internalGuestSession/client/requests/SettleRequest.mjs +7 -0
- package/dist/esm/serialization/resources/internalGuestSession/client/requests/index.d.mts +2 -0
- package/dist/esm/serialization/resources/internalGuestSession/client/requests/index.mjs +2 -0
- package/dist/esm/serialization/resources/internalGuestSession/index.d.mts +2 -0
- package/dist/esm/serialization/resources/internalGuestSession/index.mjs +2 -0
- package/dist/esm/serialization/resources/internalGuestSession/types/ReserveRequestKind.d.mts +7 -0
- package/dist/esm/serialization/resources/internalGuestSession/types/ReserveRequestKind.mjs +3 -0
- package/dist/esm/serialization/resources/internalGuestSession/types/SettleRequestOutcome.d.mts +7 -0
- package/dist/esm/serialization/resources/internalGuestSession/types/SettleRequestOutcome.mjs +3 -0
- package/dist/esm/serialization/resources/internalGuestSession/types/index.d.mts +2 -0
- package/dist/esm/serialization/resources/internalGuestSession/types/index.mjs +2 -0
- package/dist/esm/serialization/types/ClaimGuestSessionResponse.d.mts +15 -0
- package/dist/esm/serialization/types/ClaimGuestSessionResponse.mjs +12 -0
- package/dist/esm/serialization/types/ClaimGuestSessionResponseStatus.d.mts +7 -0
- package/dist/esm/serialization/types/ClaimGuestSessionResponseStatus.mjs +3 -0
- package/dist/esm/serialization/types/CreateGuestSessionResponse.d.mts +2 -0
- package/dist/esm/serialization/types/CreateGuestSessionResponse.mjs +2 -0
- package/dist/esm/serialization/types/DeleteGuestSessionResponse.d.mts +12 -0
- package/dist/esm/serialization/types/DeleteGuestSessionResponse.mjs +9 -0
- package/dist/esm/serialization/types/DeleteGuestSessionResponseStatus.d.mts +7 -0
- package/dist/esm/serialization/types/DeleteGuestSessionResponseStatus.mjs +3 -0
- package/dist/esm/serialization/types/GetGuestSessionResponse.d.mts +20 -0
- package/dist/esm/serialization/types/GetGuestSessionResponse.mjs +16 -0
- package/dist/esm/serialization/types/GetGuestSessionResponseStatus.d.mts +7 -0
- package/dist/esm/serialization/types/GetGuestSessionResponseStatus.mjs +3 -0
- package/dist/esm/serialization/types/GoneErrorBody.d.mts +11 -0
- package/dist/esm/serialization/types/GoneErrorBody.mjs +7 -0
- package/dist/esm/serialization/types/GoneErrorBodyContent.d.mts +14 -0
- package/dist/esm/serialization/types/GoneErrorBodyContent.mjs +10 -0
- package/dist/esm/serialization/types/GoneErrorBodyContentCode.d.mts +7 -0
- package/dist/esm/serialization/types/GoneErrorBodyContentCode.mjs +3 -0
- package/dist/esm/serialization/types/GuestSessionLimits.d.mts +2 -0
- package/dist/esm/serialization/types/GuestSessionLimits.mjs +2 -0
- package/dist/esm/serialization/types/GuestSessionUsage.d.mts +10 -0
- package/dist/esm/serialization/types/GuestSessionUsage.mjs +6 -0
- package/dist/esm/serialization/types/InternalGuestSessionResponse.d.mts +16 -0
- package/dist/esm/serialization/types/InternalGuestSessionResponse.mjs +12 -0
- package/dist/esm/serialization/types/InternalGuestSessionResponseStatus.d.mts +7 -0
- package/dist/esm/serialization/types/InternalGuestSessionResponseStatus.mjs +3 -0
- package/dist/esm/serialization/types/Limit.d.mts +12 -0
- package/dist/esm/serialization/types/Limit.mjs +8 -0
- package/dist/esm/serialization/types/NotFoundErrorBody.d.mts +11 -0
- package/dist/esm/serialization/types/NotFoundErrorBody.mjs +7 -0
- package/dist/esm/serialization/types/NotFoundErrorBodyContent.d.mts +14 -0
- package/dist/esm/serialization/types/NotFoundErrorBodyContent.mjs +10 -0
- package/dist/esm/serialization/types/NotFoundErrorBodyContentCode.d.mts +7 -0
- package/dist/esm/serialization/types/NotFoundErrorBodyContentCode.mjs +3 -0
- package/dist/esm/serialization/types/ReserveResponse.d.mts +20 -0
- package/dist/esm/serialization/types/ReserveResponse.mjs +16 -0
- package/dist/esm/serialization/types/ReserveResponseKind.d.mts +7 -0
- package/dist/esm/serialization/types/ReserveResponseKind.mjs +3 -0
- package/dist/esm/serialization/types/ReserveResponseState.d.mts +7 -0
- package/dist/esm/serialization/types/ReserveResponseState.mjs +3 -0
- package/dist/esm/serialization/types/ServiceUnavailableErrorBody.d.mts +11 -0
- package/dist/esm/serialization/types/ServiceUnavailableErrorBody.mjs +7 -0
- package/dist/esm/serialization/types/ServiceUnavailableErrorBodyContent.d.mts +14 -0
- package/dist/esm/serialization/types/ServiceUnavailableErrorBodyContent.mjs +10 -0
- package/dist/esm/serialization/types/ServiceUnavailableErrorBodyContentCode.d.mts +7 -0
- package/dist/esm/serialization/types/ServiceUnavailableErrorBodyContentCode.mjs +3 -0
- package/dist/esm/serialization/types/SettleResponse.d.mts +11 -0
- package/dist/esm/serialization/types/SettleResponse.mjs +7 -0
- package/dist/esm/serialization/types/SettleResponseReason.d.mts +7 -0
- package/dist/esm/serialization/types/SettleResponseReason.mjs +3 -0
- package/dist/esm/serialization/types/TooManyRequestsErrorBody.d.mts +11 -0
- package/dist/esm/serialization/types/TooManyRequestsErrorBody.mjs +7 -0
- package/dist/esm/serialization/types/TooManyRequestsErrorBodyContent.d.mts +14 -0
- package/dist/esm/serialization/types/TooManyRequestsErrorBodyContent.mjs +10 -0
- package/dist/esm/serialization/types/TooManyRequestsErrorBodyContentCode.d.mts +7 -0
- package/dist/esm/serialization/types/TooManyRequestsErrorBodyContentCode.mjs +3 -0
- package/dist/esm/serialization/types/index.d.mts +27 -0
- package/dist/esm/serialization/types/index.mjs +27 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +384 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "
|
|
47
|
-
"User-Agent": "@fern-api/venus-api-sdk/
|
|
46
|
+
"X-Fern-SDK-Version": "12.1.0",
|
|
47
|
+
"User-Agent": "@fern-api/venus-api-sdk/12.1.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as FernVenusApi from "./api/index.js";
|
|
|
2
2
|
import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.js";
|
|
3
3
|
import { AuthClient } from "./api/resources/auth/client/Client.js";
|
|
4
4
|
import { GuestSessionClient } from "./api/resources/guestSession/client/Client.js";
|
|
5
|
+
import { InternalGuestSessionClient } from "./api/resources/internalGuestSession/client/Client.js";
|
|
5
6
|
import { OrganizationClient } from "./api/resources/organization/client/Client.js";
|
|
6
7
|
import { RegistryClient } from "./api/resources/registry/client/Client.js";
|
|
7
8
|
import { UserClient } from "./api/resources/user/client/Client.js";
|
|
@@ -21,6 +22,7 @@ export declare class FernVenusApiClient {
|
|
|
21
22
|
protected _organization: OrganizationClient | undefined;
|
|
22
23
|
protected _registry: RegistryClient | undefined;
|
|
23
24
|
protected _user: UserClient | undefined;
|
|
25
|
+
protected _internalGuestSession: InternalGuestSessionClient | undefined;
|
|
24
26
|
constructor(options: FernVenusApiClient.Options);
|
|
25
27
|
get apiKeys(): ApiKeysClient;
|
|
26
28
|
get auth(): AuthClient;
|
|
@@ -28,6 +30,7 @@ export declare class FernVenusApiClient {
|
|
|
28
30
|
get organization(): OrganizationClient;
|
|
29
31
|
get registry(): RegistryClient;
|
|
30
32
|
get user(): UserClient;
|
|
33
|
+
get internalGuestSession(): InternalGuestSessionClient;
|
|
31
34
|
/**
|
|
32
35
|
* @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
36
|
*
|
package/dist/cjs/Client.js
CHANGED
|
@@ -48,9 +48,10 @@ const FernVenusApi = __importStar(require("./api/index.js"));
|
|
|
48
48
|
const Client_js_1 = require("./api/resources/apiKeys/client/Client.js");
|
|
49
49
|
const Client_js_2 = require("./api/resources/auth/client/Client.js");
|
|
50
50
|
const Client_js_3 = require("./api/resources/guestSession/client/Client.js");
|
|
51
|
-
const Client_js_4 = require("./api/resources/
|
|
52
|
-
const Client_js_5 = require("./api/resources/
|
|
53
|
-
const Client_js_6 = require("./api/resources/
|
|
51
|
+
const Client_js_4 = require("./api/resources/internalGuestSession/client/Client.js");
|
|
52
|
+
const Client_js_5 = require("./api/resources/organization/client/Client.js");
|
|
53
|
+
const Client_js_6 = require("./api/resources/registry/client/Client.js");
|
|
54
|
+
const Client_js_7 = require("./api/resources/user/client/Client.js");
|
|
54
55
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
55
56
|
const headers_js_1 = require("./core/headers.js");
|
|
56
57
|
const core = __importStar(require("./core/index.js"));
|
|
@@ -72,15 +73,19 @@ class FernVenusApiClient {
|
|
|
72
73
|
}
|
|
73
74
|
get organization() {
|
|
74
75
|
var _a;
|
|
75
|
-
return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new
|
|
76
|
+
return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new Client_js_5.OrganizationClient(this._options)));
|
|
76
77
|
}
|
|
77
78
|
get registry() {
|
|
78
79
|
var _a;
|
|
79
|
-
return ((_a = this._registry) !== null && _a !== void 0 ? _a : (this._registry = new
|
|
80
|
+
return ((_a = this._registry) !== null && _a !== void 0 ? _a : (this._registry = new Client_js_6.RegistryClient(this._options)));
|
|
80
81
|
}
|
|
81
82
|
get user() {
|
|
82
83
|
var _a;
|
|
83
|
-
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new
|
|
84
|
+
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new Client_js_7.UserClient(this._options)));
|
|
85
|
+
}
|
|
86
|
+
get internalGuestSession() {
|
|
87
|
+
var _a;
|
|
88
|
+
return ((_a = this._internalGuestSession) !== null && _a !== void 0 ? _a : (this._internalGuestSession = new Client_js_4.InternalGuestSessionClient(this._options)));
|
|
84
89
|
}
|
|
85
90
|
/**
|
|
86
91
|
* @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -28,4 +28,57 @@ export declare class GuestSessionClient {
|
|
|
28
28
|
*/
|
|
29
29
|
create(request: FernVenusApi.CreateGuestSessionRequest, requestOptions?: GuestSessionClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.CreateGuestSessionResponse, FernVenusApi.guestSession.create.Error>>;
|
|
30
30
|
private __create;
|
|
31
|
+
/**
|
|
32
|
+
* Read a guest session: where it is in its life, when it runs out and how much of its
|
|
33
|
+
* budget is spent.
|
|
34
|
+
* Opened by the session's own token, by the claim secret (sent as `X-Fern-Claim-Secret`,
|
|
35
|
+
* which is what the claim page holds), or by the user who claimed it. Anything else is
|
|
36
|
+
* told the session does not exist.
|
|
37
|
+
*
|
|
38
|
+
* @param {FernVenusApi.GetGuestSessionsSessionIdGetRequest} request
|
|
39
|
+
* @param {GuestSessionClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.guestSession.get({
|
|
43
|
+
* sessionId: "session_id"
|
|
44
|
+
* })
|
|
45
|
+
*/
|
|
46
|
+
get(request: FernVenusApi.GetGuestSessionsSessionIdGetRequest, requestOptions?: GuestSessionClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.GetGuestSessionResponse, FernVenusApi.guestSession.get.Error>>;
|
|
47
|
+
private __get;
|
|
48
|
+
/**
|
|
49
|
+
* Take a guest session down. Its token stops working at once and nothing more can be
|
|
50
|
+
* built or published with it.
|
|
51
|
+
* The session's own token or its claim secret takes it down (`deleted`); a Fern operator's
|
|
52
|
+
* service credential takes it down for abuse (`takenDown`). Anything else is told the
|
|
53
|
+
* session does not exist. Calling it again answers the same; a claimed session cannot be
|
|
54
|
+
* taken down here, its work belongs to an organization now.
|
|
55
|
+
*
|
|
56
|
+
* @param {FernVenusApi.DeleteGuestSessionsSessionIdDeleteRequest} request
|
|
57
|
+
* @param {GuestSessionClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* await client.guestSession.delete({
|
|
61
|
+
* sessionId: "session_id"
|
|
62
|
+
* })
|
|
63
|
+
*/
|
|
64
|
+
delete(request: FernVenusApi.DeleteGuestSessionsSessionIdDeleteRequest, requestOptions?: GuestSessionClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.DeleteGuestSessionResponse, FernVenusApi.guestSession.delete.Error>>;
|
|
65
|
+
private __delete;
|
|
66
|
+
/**
|
|
67
|
+
* Claim a guest session: make its work the caller's, for keeps.
|
|
68
|
+
* Needs two things: the claim secret (`X-Fern-Claim-Secret`, from the claim URL) and a
|
|
69
|
+
* signed-in person (`Authorization`). With `organizationId`, the caller must already be an
|
|
70
|
+
* admin of that organization and the session's work is moved into it. Without, the
|
|
71
|
+
* session's own organization becomes the caller's, with them as its first admin.
|
|
72
|
+
* Claiming revokes the guest token. Safe to retry: the claimant may call it again.
|
|
73
|
+
*
|
|
74
|
+
* @param {FernVenusApi.ClaimGuestSessionRequest} request
|
|
75
|
+
* @param {GuestSessionClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.guestSession.claim({
|
|
79
|
+
* sessionId: "session_id"
|
|
80
|
+
* })
|
|
81
|
+
*/
|
|
82
|
+
claim(request: FernVenusApi.ClaimGuestSessionRequest, requestOptions?: GuestSessionClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.ClaimGuestSessionResponse, FernVenusApi.guestSession.claim.Error>>;
|
|
83
|
+
private __claim;
|
|
31
84
|
}
|
|
@@ -42,6 +42,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
43
|
});
|
|
44
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
|
+
};
|
|
45
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
57
|
exports.GuestSessionClient = void 0;
|
|
47
58
|
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
@@ -128,6 +139,30 @@ class GuestSessionClient {
|
|
|
128
139
|
},
|
|
129
140
|
rawResponse: _response.rawResponse,
|
|
130
141
|
};
|
|
142
|
+
case 429:
|
|
143
|
+
return {
|
|
144
|
+
data: {
|
|
145
|
+
ok: false,
|
|
146
|
+
error: FernVenusApi.guestSession.create.Error.tooManyRequestsError(serializers.TooManyRequestsErrorBody.parseOrThrow(_response.error.body, {
|
|
147
|
+
unrecognizedObjectKeys: "passthrough",
|
|
148
|
+
allowUnrecognizedUnionMembers: true,
|
|
149
|
+
allowUnrecognizedEnumValues: true,
|
|
150
|
+
skipValidation: true,
|
|
151
|
+
breadcrumbsPrefix: ["response"],
|
|
152
|
+
})),
|
|
153
|
+
rawResponse: _response.rawResponse,
|
|
154
|
+
},
|
|
155
|
+
rawResponse: _response.rawResponse,
|
|
156
|
+
};
|
|
157
|
+
case 503:
|
|
158
|
+
return {
|
|
159
|
+
data: {
|
|
160
|
+
ok: false,
|
|
161
|
+
error: FernVenusApi.guestSession.create.Error.serviceUnavailableError(_response.error.body),
|
|
162
|
+
rawResponse: _response.rawResponse,
|
|
163
|
+
},
|
|
164
|
+
rawResponse: _response.rawResponse,
|
|
165
|
+
};
|
|
131
166
|
}
|
|
132
167
|
}
|
|
133
168
|
return {
|
|
@@ -140,5 +175,295 @@ class GuestSessionClient {
|
|
|
140
175
|
};
|
|
141
176
|
});
|
|
142
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* Read a guest session: where it is in its life, when it runs out and how much of its
|
|
180
|
+
* budget is spent.
|
|
181
|
+
* Opened by the session's own token, by the claim secret (sent as `X-Fern-Claim-Secret`,
|
|
182
|
+
* which is what the claim page holds), or by the user who claimed it. Anything else is
|
|
183
|
+
* told the session does not exist.
|
|
184
|
+
*
|
|
185
|
+
* @param {FernVenusApi.GetGuestSessionsSessionIdGetRequest} request
|
|
186
|
+
* @param {GuestSessionClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* await client.guestSession.get({
|
|
190
|
+
* sessionId: "session_id"
|
|
191
|
+
* })
|
|
192
|
+
*/
|
|
193
|
+
get(request, requestOptions) {
|
|
194
|
+
return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
|
|
195
|
+
}
|
|
196
|
+
__get(request, requestOptions) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
199
|
+
const { sessionId, fernClaimSecret } = request;
|
|
200
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
201
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Fern-Claim-Secret": fernClaimSecret }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
202
|
+
const _response = yield core.fetcher({
|
|
203
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `guest-sessions/${core.url.encodePathParam(sessionId)}`),
|
|
204
|
+
method: "GET",
|
|
205
|
+
headers: _headers,
|
|
206
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
207
|
+
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,
|
|
208
|
+
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,
|
|
209
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
210
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
211
|
+
logging: this._options.logging,
|
|
212
|
+
});
|
|
213
|
+
if (_response.ok) {
|
|
214
|
+
return {
|
|
215
|
+
data: {
|
|
216
|
+
ok: true,
|
|
217
|
+
body: serializers.GetGuestSessionResponse.parseOrThrow(_response.body, {
|
|
218
|
+
unrecognizedObjectKeys: "passthrough",
|
|
219
|
+
allowUnrecognizedUnionMembers: true,
|
|
220
|
+
allowUnrecognizedEnumValues: true,
|
|
221
|
+
skipValidation: true,
|
|
222
|
+
breadcrumbsPrefix: ["response"],
|
|
223
|
+
}),
|
|
224
|
+
headers: _response.headers,
|
|
225
|
+
rawResponse: _response.rawResponse,
|
|
226
|
+
},
|
|
227
|
+
rawResponse: _response.rawResponse,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
if (_response.error.reason === "status-code") {
|
|
231
|
+
switch (_response.error.statusCode) {
|
|
232
|
+
case 404:
|
|
233
|
+
return {
|
|
234
|
+
data: {
|
|
235
|
+
ok: false,
|
|
236
|
+
error: FernVenusApi.guestSession.get.Error.notFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
|
|
237
|
+
unrecognizedObjectKeys: "passthrough",
|
|
238
|
+
allowUnrecognizedUnionMembers: true,
|
|
239
|
+
allowUnrecognizedEnumValues: true,
|
|
240
|
+
skipValidation: true,
|
|
241
|
+
breadcrumbsPrefix: ["response"],
|
|
242
|
+
})),
|
|
243
|
+
rawResponse: _response.rawResponse,
|
|
244
|
+
},
|
|
245
|
+
rawResponse: _response.rawResponse,
|
|
246
|
+
};
|
|
247
|
+
case 410:
|
|
248
|
+
return {
|
|
249
|
+
data: {
|
|
250
|
+
ok: false,
|
|
251
|
+
error: FernVenusApi.guestSession.get.Error.goneError(serializers.GoneErrorBody.parseOrThrow(_response.error.body, {
|
|
252
|
+
unrecognizedObjectKeys: "passthrough",
|
|
253
|
+
allowUnrecognizedUnionMembers: true,
|
|
254
|
+
allowUnrecognizedEnumValues: true,
|
|
255
|
+
skipValidation: true,
|
|
256
|
+
breadcrumbsPrefix: ["response"],
|
|
257
|
+
})),
|
|
258
|
+
rawResponse: _response.rawResponse,
|
|
259
|
+
},
|
|
260
|
+
rawResponse: _response.rawResponse,
|
|
261
|
+
};
|
|
262
|
+
case 422:
|
|
263
|
+
return {
|
|
264
|
+
data: {
|
|
265
|
+
ok: false,
|
|
266
|
+
error: FernVenusApi.guestSession.get.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
267
|
+
unrecognizedObjectKeys: "passthrough",
|
|
268
|
+
allowUnrecognizedUnionMembers: true,
|
|
269
|
+
allowUnrecognizedEnumValues: true,
|
|
270
|
+
skipValidation: true,
|
|
271
|
+
breadcrumbsPrefix: ["response"],
|
|
272
|
+
})),
|
|
273
|
+
rawResponse: _response.rawResponse,
|
|
274
|
+
},
|
|
275
|
+
rawResponse: _response.rawResponse,
|
|
276
|
+
};
|
|
277
|
+
case 503:
|
|
278
|
+
return {
|
|
279
|
+
data: {
|
|
280
|
+
ok: false,
|
|
281
|
+
error: FernVenusApi.guestSession.get.Error.serviceUnavailableError(_response.error.body),
|
|
282
|
+
rawResponse: _response.rawResponse,
|
|
283
|
+
},
|
|
284
|
+
rawResponse: _response.rawResponse,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return {
|
|
289
|
+
data: {
|
|
290
|
+
ok: false,
|
|
291
|
+
error: FernVenusApi.guestSession.get.Error._unknown(_response.error),
|
|
292
|
+
rawResponse: _response.rawResponse,
|
|
293
|
+
},
|
|
294
|
+
rawResponse: _response.rawResponse,
|
|
295
|
+
};
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Take a guest session down. Its token stops working at once and nothing more can be
|
|
300
|
+
* built or published with it.
|
|
301
|
+
* The session's own token or its claim secret takes it down (`deleted`); a Fern operator's
|
|
302
|
+
* service credential takes it down for abuse (`takenDown`). Anything else is told the
|
|
303
|
+
* session does not exist. Calling it again answers the same; a claimed session cannot be
|
|
304
|
+
* taken down here, its work belongs to an organization now.
|
|
305
|
+
*
|
|
306
|
+
* @param {FernVenusApi.DeleteGuestSessionsSessionIdDeleteRequest} request
|
|
307
|
+
* @param {GuestSessionClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* await client.guestSession.delete({
|
|
311
|
+
* sessionId: "session_id"
|
|
312
|
+
* })
|
|
313
|
+
*/
|
|
314
|
+
delete(request, requestOptions) {
|
|
315
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
|
|
316
|
+
}
|
|
317
|
+
__delete(request, requestOptions) {
|
|
318
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
319
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
320
|
+
const { sessionId } = request;
|
|
321
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
322
|
+
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);
|
|
323
|
+
const _response = yield core.fetcher({
|
|
324
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `guest-sessions/${core.url.encodePathParam(sessionId)}`),
|
|
325
|
+
method: "DELETE",
|
|
326
|
+
headers: _headers,
|
|
327
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
328
|
+
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,
|
|
329
|
+
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,
|
|
330
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
331
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
332
|
+
logging: this._options.logging,
|
|
333
|
+
});
|
|
334
|
+
if (_response.ok) {
|
|
335
|
+
return {
|
|
336
|
+
data: {
|
|
337
|
+
ok: true,
|
|
338
|
+
body: serializers.DeleteGuestSessionResponse.parseOrThrow(_response.body, {
|
|
339
|
+
unrecognizedObjectKeys: "passthrough",
|
|
340
|
+
allowUnrecognizedUnionMembers: true,
|
|
341
|
+
allowUnrecognizedEnumValues: true,
|
|
342
|
+
skipValidation: true,
|
|
343
|
+
breadcrumbsPrefix: ["response"],
|
|
344
|
+
}),
|
|
345
|
+
headers: _response.headers,
|
|
346
|
+
rawResponse: _response.rawResponse,
|
|
347
|
+
},
|
|
348
|
+
rawResponse: _response.rawResponse,
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
if (_response.error.reason === "status-code") {
|
|
352
|
+
switch (_response.error.statusCode) {
|
|
353
|
+
case 422:
|
|
354
|
+
return {
|
|
355
|
+
data: {
|
|
356
|
+
ok: false,
|
|
357
|
+
error: FernVenusApi.guestSession.delete.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
358
|
+
unrecognizedObjectKeys: "passthrough",
|
|
359
|
+
allowUnrecognizedUnionMembers: true,
|
|
360
|
+
allowUnrecognizedEnumValues: true,
|
|
361
|
+
skipValidation: true,
|
|
362
|
+
breadcrumbsPrefix: ["response"],
|
|
363
|
+
})),
|
|
364
|
+
rawResponse: _response.rawResponse,
|
|
365
|
+
},
|
|
366
|
+
rawResponse: _response.rawResponse,
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return {
|
|
371
|
+
data: {
|
|
372
|
+
ok: false,
|
|
373
|
+
error: FernVenusApi.guestSession.delete.Error._unknown(_response.error),
|
|
374
|
+
rawResponse: _response.rawResponse,
|
|
375
|
+
},
|
|
376
|
+
rawResponse: _response.rawResponse,
|
|
377
|
+
};
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Claim a guest session: make its work the caller's, for keeps.
|
|
382
|
+
* Needs two things: the claim secret (`X-Fern-Claim-Secret`, from the claim URL) and a
|
|
383
|
+
* signed-in person (`Authorization`). With `organizationId`, the caller must already be an
|
|
384
|
+
* admin of that organization and the session's work is moved into it. Without, the
|
|
385
|
+
* session's own organization becomes the caller's, with them as its first admin.
|
|
386
|
+
* Claiming revokes the guest token. Safe to retry: the claimant may call it again.
|
|
387
|
+
*
|
|
388
|
+
* @param {FernVenusApi.ClaimGuestSessionRequest} request
|
|
389
|
+
* @param {GuestSessionClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
390
|
+
*
|
|
391
|
+
* @example
|
|
392
|
+
* await client.guestSession.claim({
|
|
393
|
+
* sessionId: "session_id"
|
|
394
|
+
* })
|
|
395
|
+
*/
|
|
396
|
+
claim(request, requestOptions) {
|
|
397
|
+
return core.HttpResponsePromise.fromPromise(this.__claim(request, requestOptions));
|
|
398
|
+
}
|
|
399
|
+
__claim(request, requestOptions) {
|
|
400
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
401
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
402
|
+
const { sessionId } = request, _body = __rest(request, ["sessionId"]);
|
|
403
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
404
|
+
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);
|
|
405
|
+
const _response = yield core.fetcher({
|
|
406
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `guest-sessions/${core.url.encodePathParam(sessionId)}/claim`),
|
|
407
|
+
method: "POST",
|
|
408
|
+
headers: _headers,
|
|
409
|
+
contentType: "application/json",
|
|
410
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
411
|
+
requestType: "json",
|
|
412
|
+
body: serializers.ClaimGuestSessionRequest.jsonOrThrow(_body, {
|
|
413
|
+
unrecognizedObjectKeys: "strip",
|
|
414
|
+
omitUndefined: true,
|
|
415
|
+
}),
|
|
416
|
+
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,
|
|
417
|
+
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,
|
|
418
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
419
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
420
|
+
logging: this._options.logging,
|
|
421
|
+
});
|
|
422
|
+
if (_response.ok) {
|
|
423
|
+
return {
|
|
424
|
+
data: {
|
|
425
|
+
ok: true,
|
|
426
|
+
body: serializers.ClaimGuestSessionResponse.parseOrThrow(_response.body, {
|
|
427
|
+
unrecognizedObjectKeys: "passthrough",
|
|
428
|
+
allowUnrecognizedUnionMembers: true,
|
|
429
|
+
allowUnrecognizedEnumValues: true,
|
|
430
|
+
skipValidation: true,
|
|
431
|
+
breadcrumbsPrefix: ["response"],
|
|
432
|
+
}),
|
|
433
|
+
headers: _response.headers,
|
|
434
|
+
rawResponse: _response.rawResponse,
|
|
435
|
+
},
|
|
436
|
+
rawResponse: _response.rawResponse,
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
if (_response.error.reason === "status-code") {
|
|
440
|
+
switch (_response.error.statusCode) {
|
|
441
|
+
case 422:
|
|
442
|
+
return {
|
|
443
|
+
data: {
|
|
444
|
+
ok: false,
|
|
445
|
+
error: FernVenusApi.guestSession.claim.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
446
|
+
unrecognizedObjectKeys: "passthrough",
|
|
447
|
+
allowUnrecognizedUnionMembers: true,
|
|
448
|
+
allowUnrecognizedEnumValues: true,
|
|
449
|
+
skipValidation: true,
|
|
450
|
+
breadcrumbsPrefix: ["response"],
|
|
451
|
+
})),
|
|
452
|
+
rawResponse: _response.rawResponse,
|
|
453
|
+
},
|
|
454
|
+
rawResponse: _response.rawResponse,
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
return {
|
|
459
|
+
data: {
|
|
460
|
+
ok: false,
|
|
461
|
+
error: FernVenusApi.guestSession.claim.Error._unknown(_response.error),
|
|
462
|
+
rawResponse: _response.rawResponse,
|
|
463
|
+
},
|
|
464
|
+
rawResponse: _response.rawResponse,
|
|
465
|
+
};
|
|
466
|
+
});
|
|
467
|
+
}
|
|
143
468
|
}
|
|
144
469
|
exports.GuestSessionClient = GuestSessionClient;
|
|
@@ -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.guestSession.claim.Error.UnprocessableEntityError | FernVenusApi.guestSession.claim.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.guestSession.claim.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.guestSession.claim.Error.UnprocessableEntityError;
|
|
23
|
+
readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.guestSession.claim.Error._Unknown;
|
|
24
|
+
readonly _visit: <_Result>(value: FernVenusApi.guestSession.claim.Error, visitor: FernVenusApi.guestSession.claim.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.guestSession.claim.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.guestSession.claim.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
|
+
};
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import type * as core from "../../../../core/index.js";
|
|
2
2
|
import * as FernVenusApi from "../../../index.js";
|
|
3
|
-
export type Error = FernVenusApi.guestSession.create.Error.UnprocessableEntityError | FernVenusApi.guestSession.create.Error._Unknown;
|
|
3
|
+
export type Error = FernVenusApi.guestSession.create.Error.UnprocessableEntityError | FernVenusApi.guestSession.create.Error.TooManyRequestsError | FernVenusApi.guestSession.create.Error.ServiceUnavailableError | FernVenusApi.guestSession.create.Error._Unknown;
|
|
4
4
|
export declare namespace Error {
|
|
5
5
|
interface UnprocessableEntityError extends _Utils {
|
|
6
6
|
statusCode: 422;
|
|
7
7
|
content: FernVenusApi.HttpValidationError;
|
|
8
8
|
}
|
|
9
|
+
interface TooManyRequestsError extends _Utils {
|
|
10
|
+
statusCode: 429;
|
|
11
|
+
content: FernVenusApi.TooManyRequestsErrorBody;
|
|
12
|
+
}
|
|
13
|
+
interface ServiceUnavailableError extends _Utils {
|
|
14
|
+
statusCode: 503;
|
|
15
|
+
content?: unknown;
|
|
16
|
+
}
|
|
9
17
|
interface _Unknown extends _Utils {
|
|
10
18
|
statusCode: void;
|
|
11
19
|
content: core.Fetcher.Error;
|
|
@@ -15,11 +23,15 @@ export declare namespace Error {
|
|
|
15
23
|
}
|
|
16
24
|
interface _Visitor<_Result> {
|
|
17
25
|
unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => _Result;
|
|
26
|
+
tooManyRequestsError: (value: FernVenusApi.TooManyRequestsErrorBody) => _Result;
|
|
27
|
+
serviceUnavailableError: (value: unknown) => _Result;
|
|
18
28
|
_other: (value: core.Fetcher.Error) => _Result;
|
|
19
29
|
}
|
|
20
30
|
}
|
|
21
31
|
export declare const Error: {
|
|
22
32
|
readonly unprocessableEntityError: (value: FernVenusApi.HttpValidationError) => FernVenusApi.guestSession.create.Error.UnprocessableEntityError;
|
|
33
|
+
readonly tooManyRequestsError: (value: FernVenusApi.TooManyRequestsErrorBody) => FernVenusApi.guestSession.create.Error.TooManyRequestsError;
|
|
34
|
+
readonly serviceUnavailableError: (value?: unknown) => FernVenusApi.guestSession.create.Error.ServiceUnavailableError;
|
|
23
35
|
readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.guestSession.create.Error._Unknown;
|
|
24
36
|
readonly _visit: <_Result>(value: FernVenusApi.guestSession.create.Error, visitor: FernVenusApi.guestSession.create.Error._Visitor<_Result>) => _Result;
|
|
25
37
|
};
|
|
@@ -46,6 +46,24 @@ exports.Error = {
|
|
|
46
46
|
},
|
|
47
47
|
};
|
|
48
48
|
},
|
|
49
|
+
tooManyRequestsError: (value) => {
|
|
50
|
+
return {
|
|
51
|
+
content: value,
|
|
52
|
+
statusCode: 429,
|
|
53
|
+
_visit: function (visitor) {
|
|
54
|
+
return FernVenusApi.guestSession.create.Error._visit(this, visitor);
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
serviceUnavailableError: (value) => {
|
|
59
|
+
return {
|
|
60
|
+
content: value,
|
|
61
|
+
statusCode: 503,
|
|
62
|
+
_visit: function (visitor) {
|
|
63
|
+
return FernVenusApi.guestSession.create.Error._visit(this, visitor);
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
},
|
|
49
67
|
_unknown: (fetcherError) => {
|
|
50
68
|
return {
|
|
51
69
|
statusCode: undefined,
|
|
@@ -59,6 +77,10 @@ exports.Error = {
|
|
|
59
77
|
switch (value.statusCode) {
|
|
60
78
|
case 422:
|
|
61
79
|
return visitor.unprocessableEntityError(value.content);
|
|
80
|
+
case 429:
|
|
81
|
+
return visitor.tooManyRequestsError(value.content);
|
|
82
|
+
case 503:
|
|
83
|
+
return visitor.serviceUnavailableError(value.content);
|
|
62
84
|
default:
|
|
63
85
|
return visitor._other(value.content);
|
|
64
86
|
}
|