@hedra/sdk 4.0.0 → 5.0.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.d.ts +2 -2
- package/dist/cjs/BaseClient.js +3 -3
- package/dist/cjs/api/resources/billing/client/Client.d.ts +22 -0
- package/dist/cjs/api/resources/billing/client/Client.js +78 -2
- package/dist/cjs/api/resources/billing/client/requests/BillingListTransactionsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/billing/client/requests/BillingListTransactionsRequest.js +3 -0
- package/dist/cjs/api/resources/billing/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/files/client/Client.js +1 -1
- package/dist/cjs/api/resources/jobs/client/Client.d.ts +121 -72
- package/dist/cjs/api/resources/jobs/client/Client.js +320 -167
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyElevenlabsMusic.d.ts +17 -0
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyElevenlabsMusic.js +3 -0
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyGptImage2.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyGrokImagine20.d.ts +18 -0
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyGrokImagine20.js +3 -0
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyHidreamO1Image.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyIdeogramV4.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyKlingAiAvatarV2.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyKlingO3.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyKlingV3.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyLtx23.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyLumaRay32.d.ts +1 -1
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyMaiImage25.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyMinimaxH3.d.ts +1 -1
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyMinimaxHailuo02.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyMinimaxHailuo23.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyNanoBanana2.d.ts +2 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyNanoBananaPro.d.ts +1 -1
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyQwenImage2.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodySeedance20.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyVeo3.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyVeo31.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyViduQ3.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/SubmitBodyWan30.d.ts +1 -2
- package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/keys/client/Client.js +4 -4
- package/dist/cjs/api/resources/logDrains/client/Client.js +6 -6
- package/dist/cjs/api/resources/models/client/Client.d.ts +23 -0
- package/dist/cjs/api/resources/models/client/Client.js +85 -6
- package/dist/cjs/api/resources/models/client/requests/ModelsSearchVoicesRequest.d.ts +17 -0
- package/dist/cjs/api/resources/models/client/requests/ModelsSearchVoicesRequest.js +3 -0
- package/dist/cjs/api/resources/models/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tokens/client/Client.js +1 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +7 -7
- package/dist/cjs/api/types/InputElevenlabsMusic.d.ts +13 -0
- package/dist/cjs/api/types/InputElevenlabsMusic.js +3 -0
- package/dist/cjs/api/types/InputFlux3.d.ts +2 -2
- package/dist/cjs/api/types/InputFlux3EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputFlux3StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputGeminiOmniFlash.d.ts +2 -2
- package/dist/cjs/api/types/InputGeminiOmniFlashSourceVideo.d.ts +1 -1
- package/dist/cjs/api/types/InputGeminiOmniFlashStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputGptImage2.d.ts +3 -3
- package/dist/cjs/api/types/InputGptImage2.js +1 -1
- package/dist/cjs/api/types/InputGrokImagine.d.ts +32 -3
- package/dist/cjs/api/types/InputGrokImagine.js +22 -1
- package/dist/cjs/api/types/InputGrokImagine20.d.ts +52 -0
- package/dist/cjs/api/types/InputGrokImagine20.js +34 -0
- package/dist/cjs/api/types/InputGrokImagine20ImagesItem.d.ts +20 -0
- package/dist/cjs/api/types/InputGrokImagine20ImagesItem.js +3 -0
- package/dist/cjs/api/types/InputGrokVideo.d.ts +1 -1
- package/dist/cjs/api/types/InputGrokVideoStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputHappyHorse.d.ts +1 -1
- package/dist/cjs/api/types/InputHappyHorseStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputHedraAvatar.d.ts +1 -1
- package/dist/cjs/api/types/InputHedraAvatarStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputHedraCharacter3.d.ts +1 -1
- package/dist/cjs/api/types/InputHedraCharacter3StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputHidreamO1Image.d.ts +3 -3
- package/dist/cjs/api/types/InputHidreamO1Image.js +1 -1
- package/dist/cjs/api/types/InputIdeogramV4.d.ts +3 -3
- package/dist/cjs/api/types/InputIdeogramV4.js +1 -1
- package/dist/cjs/api/types/InputKling16.d.ts +1 -1
- package/dist/cjs/api/types/InputKling16StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKling21Master.d.ts +1 -1
- package/dist/cjs/api/types/InputKling21MasterStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKling25Turbo.d.ts +1 -1
- package/dist/cjs/api/types/InputKling25TurboStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKling26MotionControl.d.ts +2 -2
- package/dist/cjs/api/types/InputKling26MotionControlSourceVideo.d.ts +1 -1
- package/dist/cjs/api/types/InputKling26MotionControlStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKling26Pro.d.ts +1 -1
- package/dist/cjs/api/types/InputKling26ProStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingAiAvatarV2.d.ts +4 -4
- package/dist/cjs/api/types/InputKlingAiAvatarV2.js +1 -1
- package/dist/cjs/api/types/InputKlingAiAvatarV2StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingO1.d.ts +2 -2
- package/dist/cjs/api/types/InputKlingO1EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingO1StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingO3.d.ts +5 -5
- package/dist/cjs/api/types/InputKlingO3.js +1 -1
- package/dist/cjs/api/types/InputKlingO3Edit.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingO3EditSourceVideo.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingO3EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingO3Reference.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingO3ReferenceSourceVideo.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingO3StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingV3.d.ts +5 -5
- package/dist/cjs/api/types/InputKlingV3.js +1 -1
- package/dist/cjs/api/types/InputKlingV3EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingV3MotionControl.d.ts +2 -2
- package/dist/cjs/api/types/InputKlingV3MotionControlSourceVideo.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingV3MotionControlStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputKlingV3StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputLtx23.d.ts +5 -5
- package/dist/cjs/api/types/InputLtx23.js +1 -1
- package/dist/cjs/api/types/InputLtx23EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputLtx23StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputLumaRay32.d.ts +2 -2
- package/dist/cjs/api/types/InputLumaRay32.js +2 -2
- package/dist/cjs/api/types/InputMaiImage25.d.ts +3 -3
- package/dist/cjs/api/types/InputMaiImage25.js +1 -1
- package/dist/cjs/api/types/InputMinimaxH3.d.ts +3 -2
- package/dist/cjs/api/types/InputMinimaxH3.js +1 -0
- package/dist/cjs/api/types/InputMinimaxH3EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputMinimaxH3StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputMinimaxHailuo02.d.ts +5 -5
- package/dist/cjs/api/types/InputMinimaxHailuo02.js +1 -1
- package/dist/cjs/api/types/InputMinimaxHailuo02EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputMinimaxHailuo02StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputMinimaxHailuo23.d.ts +4 -4
- package/dist/cjs/api/types/InputMinimaxHailuo23.js +1 -1
- package/dist/cjs/api/types/InputMinimaxHailuo23StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputNanoBanana.d.ts +2 -2
- package/dist/cjs/api/types/InputNanoBanana.js +1 -1
- package/dist/cjs/api/types/InputNanoBanana2.d.ts +20 -2
- package/dist/cjs/api/types/InputNanoBanana2.js +12 -1
- package/dist/cjs/api/types/InputNanoBananaPro.d.ts +5 -2
- package/dist/cjs/api/types/InputNanoBananaPro.js +2 -1
- package/dist/cjs/api/types/InputOmnihuman15.d.ts +1 -1
- package/dist/cjs/api/types/InputOmnihuman15StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputPixverseV6.d.ts +1 -1
- package/dist/cjs/api/types/InputPixverseV6StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputQwenImage2.d.ts +3 -3
- package/dist/cjs/api/types/InputQwenImage2.js +1 -1
- package/dist/cjs/api/types/InputSeedance15Pro.d.ts +3 -2
- package/dist/cjs/api/types/InputSeedance15Pro.js +1 -0
- package/dist/cjs/api/types/InputSeedance15ProEndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputSeedance15ProStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputSeedance20.d.ts +6 -5
- package/dist/cjs/api/types/InputSeedance20.js +2 -1
- package/dist/cjs/api/types/InputSeedance20EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputSeedance20Mini.d.ts +3 -2
- package/dist/cjs/api/types/InputSeedance20Mini.js +1 -0
- package/dist/cjs/api/types/InputSeedance20MiniEndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputSeedance20MiniStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputSeedance20StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputSeedance25.d.ts +2 -2
- package/dist/cjs/api/types/InputSeedance25EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputSeedance25StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputSeedream50Lite.d.ts +8 -0
- package/dist/cjs/api/types/InputSeedream50Lite.js +5 -0
- package/dist/cjs/api/types/InputSeedream50Pro.d.ts +8 -0
- package/dist/cjs/api/types/InputSeedream50Pro.js +5 -0
- package/dist/cjs/api/types/InputSora2Pro.d.ts +1 -1
- package/dist/cjs/api/types/InputSora2ProStartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputVeedFabric10.d.ts +1 -1
- package/dist/cjs/api/types/InputVeedFabric10StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputVeo2.d.ts +1 -1
- package/dist/cjs/api/types/InputVeo2StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputVeo3.d.ts +4 -4
- package/dist/cjs/api/types/InputVeo3.js +1 -1
- package/dist/cjs/api/types/InputVeo31.d.ts +6 -6
- package/dist/cjs/api/types/InputVeo31.js +1 -1
- package/dist/cjs/api/types/InputVeo31EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputVeo31SourceVideo.d.ts +1 -1
- package/dist/cjs/api/types/InputVeo31StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputVeo3StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputViduQ3.d.ts +5 -5
- package/dist/cjs/api/types/InputViduQ3.js +1 -1
- package/dist/cjs/api/types/InputViduQ3EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputViduQ3StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputWan27.d.ts +2 -2
- package/dist/cjs/api/types/InputWan27EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputWan27StartImage.d.ts +1 -1
- package/dist/cjs/api/types/InputWan30.d.ts +5 -5
- package/dist/cjs/api/types/InputWan30.js +1 -1
- package/dist/cjs/api/types/InputWan30EndImage.d.ts +1 -1
- package/dist/cjs/api/types/InputWan30StartImage.d.ts +1 -1
- package/dist/cjs/api/types/TransactionListResponse.d.ts +7 -0
- package/dist/cjs/api/types/TransactionListResponse.js +3 -0
- package/dist/cjs/api/types/TransactionRecord.d.ts +15 -0
- package/dist/cjs/api/types/TransactionRecord.js +3 -0
- package/dist/cjs/api/types/VoiceGender.d.ts +12 -0
- package/dist/cjs/api/types/VoiceGender.js +15 -0
- package/dist/cjs/api/types/index.d.ts +6 -0
- package/dist/cjs/api/types/index.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +2 -2
- package/dist/esm/BaseClient.mjs +3 -3
- package/dist/esm/api/resources/billing/client/Client.d.mts +22 -0
- package/dist/esm/api/resources/billing/client/Client.mjs +78 -2
- package/dist/esm/api/resources/billing/client/requests/BillingListTransactionsRequest.d.mts +10 -0
- package/dist/esm/api/resources/billing/client/requests/BillingListTransactionsRequest.mjs +2 -0
- package/dist/esm/api/resources/billing/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/files/client/Client.mjs +1 -1
- package/dist/esm/api/resources/jobs/client/Client.d.mts +121 -72
- package/dist/esm/api/resources/jobs/client/Client.mjs +320 -167
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyElevenlabsMusic.d.mts +17 -0
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyElevenlabsMusic.mjs +2 -0
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyGptImage2.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyGrokImagine20.d.mts +18 -0
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyGrokImagine20.mjs +2 -0
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyHidreamO1Image.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyIdeogramV4.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyKlingAiAvatarV2.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyKlingO3.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyKlingV3.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyLtx23.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyLumaRay32.d.mts +1 -1
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyMaiImage25.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyMinimaxH3.d.mts +1 -1
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyMinimaxHailuo02.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyMinimaxHailuo23.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyNanoBanana2.d.mts +2 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyNanoBananaPro.d.mts +1 -1
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyQwenImage2.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodySeedance20.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyVeo3.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyVeo31.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyViduQ3.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/SubmitBodyWan30.d.mts +1 -2
- package/dist/esm/api/resources/jobs/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/keys/client/Client.mjs +4 -4
- package/dist/esm/api/resources/logDrains/client/Client.mjs +6 -6
- package/dist/esm/api/resources/models/client/Client.d.mts +23 -0
- package/dist/esm/api/resources/models/client/Client.mjs +85 -6
- package/dist/esm/api/resources/models/client/requests/ModelsSearchVoicesRequest.d.mts +17 -0
- package/dist/esm/api/resources/models/client/requests/ModelsSearchVoicesRequest.mjs +2 -0
- package/dist/esm/api/resources/models/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tokens/client/Client.mjs +1 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +7 -7
- package/dist/esm/api/types/InputElevenlabsMusic.d.mts +13 -0
- package/dist/esm/api/types/InputElevenlabsMusic.mjs +2 -0
- package/dist/esm/api/types/InputFlux3.d.mts +2 -2
- package/dist/esm/api/types/InputFlux3EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputFlux3StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputGeminiOmniFlash.d.mts +2 -2
- package/dist/esm/api/types/InputGeminiOmniFlashSourceVideo.d.mts +1 -1
- package/dist/esm/api/types/InputGeminiOmniFlashStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputGptImage2.d.mts +3 -3
- package/dist/esm/api/types/InputGptImage2.mjs +1 -1
- package/dist/esm/api/types/InputGrokImagine.d.mts +32 -3
- package/dist/esm/api/types/InputGrokImagine.mjs +22 -1
- package/dist/esm/api/types/InputGrokImagine20.d.mts +52 -0
- package/dist/esm/api/types/InputGrokImagine20.mjs +31 -0
- package/dist/esm/api/types/InputGrokImagine20ImagesItem.d.mts +20 -0
- package/dist/esm/api/types/InputGrokImagine20ImagesItem.mjs +2 -0
- package/dist/esm/api/types/InputGrokVideo.d.mts +1 -1
- package/dist/esm/api/types/InputGrokVideoStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputHappyHorse.d.mts +1 -1
- package/dist/esm/api/types/InputHappyHorseStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputHedraAvatar.d.mts +1 -1
- package/dist/esm/api/types/InputHedraAvatarStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputHedraCharacter3.d.mts +1 -1
- package/dist/esm/api/types/InputHedraCharacter3StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputHidreamO1Image.d.mts +3 -3
- package/dist/esm/api/types/InputHidreamO1Image.mjs +1 -1
- package/dist/esm/api/types/InputIdeogramV4.d.mts +3 -3
- package/dist/esm/api/types/InputIdeogramV4.mjs +1 -1
- package/dist/esm/api/types/InputKling16.d.mts +1 -1
- package/dist/esm/api/types/InputKling16StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputKling21Master.d.mts +1 -1
- package/dist/esm/api/types/InputKling21MasterStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputKling25Turbo.d.mts +1 -1
- package/dist/esm/api/types/InputKling25TurboStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputKling26MotionControl.d.mts +2 -2
- package/dist/esm/api/types/InputKling26MotionControlSourceVideo.d.mts +1 -1
- package/dist/esm/api/types/InputKling26MotionControlStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputKling26Pro.d.mts +1 -1
- package/dist/esm/api/types/InputKling26ProStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputKlingAiAvatarV2.d.mts +4 -4
- package/dist/esm/api/types/InputKlingAiAvatarV2.mjs +1 -1
- package/dist/esm/api/types/InputKlingAiAvatarV2StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputKlingO1.d.mts +2 -2
- package/dist/esm/api/types/InputKlingO1EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputKlingO1StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputKlingO3.d.mts +5 -5
- package/dist/esm/api/types/InputKlingO3.mjs +1 -1
- package/dist/esm/api/types/InputKlingO3Edit.d.mts +1 -1
- package/dist/esm/api/types/InputKlingO3EditSourceVideo.d.mts +1 -1
- package/dist/esm/api/types/InputKlingO3EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputKlingO3Reference.d.mts +1 -1
- package/dist/esm/api/types/InputKlingO3ReferenceSourceVideo.d.mts +1 -1
- package/dist/esm/api/types/InputKlingO3StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputKlingV3.d.mts +5 -5
- package/dist/esm/api/types/InputKlingV3.mjs +1 -1
- package/dist/esm/api/types/InputKlingV3EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputKlingV3MotionControl.d.mts +2 -2
- package/dist/esm/api/types/InputKlingV3MotionControlSourceVideo.d.mts +1 -1
- package/dist/esm/api/types/InputKlingV3MotionControlStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputKlingV3StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputLtx23.d.mts +5 -5
- package/dist/esm/api/types/InputLtx23.mjs +1 -1
- package/dist/esm/api/types/InputLtx23EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputLtx23StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputLumaRay32.d.mts +2 -2
- package/dist/esm/api/types/InputLumaRay32.mjs +2 -2
- package/dist/esm/api/types/InputMaiImage25.d.mts +3 -3
- package/dist/esm/api/types/InputMaiImage25.mjs +1 -1
- package/dist/esm/api/types/InputMinimaxH3.d.mts +3 -2
- package/dist/esm/api/types/InputMinimaxH3.mjs +1 -0
- package/dist/esm/api/types/InputMinimaxH3EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputMinimaxH3StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputMinimaxHailuo02.d.mts +5 -5
- package/dist/esm/api/types/InputMinimaxHailuo02.mjs +1 -1
- package/dist/esm/api/types/InputMinimaxHailuo02EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputMinimaxHailuo02StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputMinimaxHailuo23.d.mts +4 -4
- package/dist/esm/api/types/InputMinimaxHailuo23.mjs +1 -1
- package/dist/esm/api/types/InputMinimaxHailuo23StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputNanoBanana.d.mts +2 -2
- package/dist/esm/api/types/InputNanoBanana.mjs +1 -1
- package/dist/esm/api/types/InputNanoBanana2.d.mts +20 -2
- package/dist/esm/api/types/InputNanoBanana2.mjs +12 -1
- package/dist/esm/api/types/InputNanoBananaPro.d.mts +5 -2
- package/dist/esm/api/types/InputNanoBananaPro.mjs +2 -1
- package/dist/esm/api/types/InputOmnihuman15.d.mts +1 -1
- package/dist/esm/api/types/InputOmnihuman15StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputPixverseV6.d.mts +1 -1
- package/dist/esm/api/types/InputPixverseV6StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputQwenImage2.d.mts +3 -3
- package/dist/esm/api/types/InputQwenImage2.mjs +1 -1
- package/dist/esm/api/types/InputSeedance15Pro.d.mts +3 -2
- package/dist/esm/api/types/InputSeedance15Pro.mjs +1 -0
- package/dist/esm/api/types/InputSeedance15ProEndImage.d.mts +1 -1
- package/dist/esm/api/types/InputSeedance15ProStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputSeedance20.d.mts +6 -5
- package/dist/esm/api/types/InputSeedance20.mjs +2 -1
- package/dist/esm/api/types/InputSeedance20EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputSeedance20Mini.d.mts +3 -2
- package/dist/esm/api/types/InputSeedance20Mini.mjs +1 -0
- package/dist/esm/api/types/InputSeedance20MiniEndImage.d.mts +1 -1
- package/dist/esm/api/types/InputSeedance20MiniStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputSeedance20StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputSeedance25.d.mts +2 -2
- package/dist/esm/api/types/InputSeedance25EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputSeedance25StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputSeedream50Lite.d.mts +8 -0
- package/dist/esm/api/types/InputSeedream50Lite.mjs +5 -0
- package/dist/esm/api/types/InputSeedream50Pro.d.mts +8 -0
- package/dist/esm/api/types/InputSeedream50Pro.mjs +5 -0
- package/dist/esm/api/types/InputSora2Pro.d.mts +1 -1
- package/dist/esm/api/types/InputSora2ProStartImage.d.mts +1 -1
- package/dist/esm/api/types/InputVeedFabric10.d.mts +1 -1
- package/dist/esm/api/types/InputVeedFabric10StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputVeo2.d.mts +1 -1
- package/dist/esm/api/types/InputVeo2StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputVeo3.d.mts +4 -4
- package/dist/esm/api/types/InputVeo3.mjs +1 -1
- package/dist/esm/api/types/InputVeo31.d.mts +6 -6
- package/dist/esm/api/types/InputVeo31.mjs +1 -1
- package/dist/esm/api/types/InputVeo31EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputVeo31SourceVideo.d.mts +1 -1
- package/dist/esm/api/types/InputVeo31StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputVeo3StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputViduQ3.d.mts +5 -5
- package/dist/esm/api/types/InputViduQ3.mjs +1 -1
- package/dist/esm/api/types/InputViduQ3EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputViduQ3StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputWan27.d.mts +2 -2
- package/dist/esm/api/types/InputWan27EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputWan27StartImage.d.mts +1 -1
- package/dist/esm/api/types/InputWan30.d.mts +5 -5
- package/dist/esm/api/types/InputWan30.mjs +1 -1
- package/dist/esm/api/types/InputWan30EndImage.d.mts +1 -1
- package/dist/esm/api/types/InputWan30StartImage.d.mts +1 -1
- package/dist/esm/api/types/TransactionListResponse.d.mts +7 -0
- package/dist/esm/api/types/TransactionListResponse.mjs +2 -0
- package/dist/esm/api/types/TransactionRecord.d.mts +15 -0
- package/dist/esm/api/types/TransactionRecord.mjs +2 -0
- package/dist/esm/api/types/VoiceGender.d.mts +12 -0
- package/dist/esm/api/types/VoiceGender.mjs +12 -0
- package/dist/esm/api/types/index.d.mts +6 -0
- package/dist/esm/api/types/index.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +341 -72
|
@@ -20,9 +20,9 @@ export interface InputWan27 {
|
|
|
20
20
|
resolution: InputWan27.Resolution;
|
|
21
21
|
/** Duration in ms. */
|
|
22
22
|
duration_ms: number;
|
|
23
|
-
/** Start frame
|
|
23
|
+
/** Start frame. At most 20 MB. */
|
|
24
24
|
start_image?: Hedra.InputWan27StartImage | undefined;
|
|
25
|
-
/** End frame
|
|
25
|
+
/** End frame. At most 20 MB. */
|
|
26
26
|
end_image?: Hedra.InputWan27EndImage | undefined;
|
|
27
27
|
/** Output aspect ratio. */
|
|
28
28
|
aspect_ratio?: InputWan27.AspectRatio | undefined;
|
|
@@ -22,9 +22,9 @@ export interface InputWan30 {
|
|
|
22
22
|
generate_audio?: boolean | undefined;
|
|
23
23
|
/** Seed for reproducible output; omit for a random seed. From 0 to 2147483647. */
|
|
24
24
|
seed?: number | undefined;
|
|
25
|
-
/** Start frame
|
|
25
|
+
/** Start frame. At most 20 MB. */
|
|
26
26
|
start_image?: Hedra.InputWan30StartImage | undefined;
|
|
27
|
-
/** End frame
|
|
27
|
+
/** End frame. At most 20 MB. */
|
|
28
28
|
end_image?: Hedra.InputWan30EndImage | undefined;
|
|
29
29
|
/** Reference images. 1 to 10 images, each at most 20 MB. */
|
|
30
30
|
images?: Hedra.InputWan30ImagesItem[] | undefined;
|
|
@@ -32,8 +32,8 @@ export interface InputWan30 {
|
|
|
32
32
|
videos?: Hedra.InputWan30VideosItem[] | undefined;
|
|
33
33
|
/** Reference audios. 1 to 5 audio files, each at most 15s and at most 104.8 MB, at most 15s in total. */
|
|
34
34
|
audios?: Hedra.InputWan30AudiosItem[] | undefined;
|
|
35
|
-
/** Quality level to generate at. */
|
|
36
|
-
quality
|
|
35
|
+
/** Quality level to generate at. `standard` — the base tier. `prime` — Wan's higher-fidelity tier over the same options, for final output. */
|
|
36
|
+
quality?: InputWan30.Quality | undefined;
|
|
37
37
|
}
|
|
38
38
|
export declare namespace InputWan30 {
|
|
39
39
|
/** Output aspect ratio. */
|
|
@@ -53,7 +53,7 @@ export declare namespace InputWan30 {
|
|
|
53
53
|
readonly OneThousandEightyP: "1080p";
|
|
54
54
|
};
|
|
55
55
|
type Resolution = (typeof Resolution)[keyof typeof Resolution];
|
|
56
|
-
/** Quality level to generate at. */
|
|
56
|
+
/** Quality level to generate at. `standard` — the base tier. `prime` — Wan's higher-fidelity tier over the same options, for final output. */
|
|
57
57
|
const Quality: {
|
|
58
58
|
readonly Standard: "standard";
|
|
59
59
|
readonly Prime: "prime";
|
|
@@ -19,7 +19,7 @@ var InputWan30;
|
|
|
19
19
|
SevenHundredTwentyP: "720p",
|
|
20
20
|
OneThousandEightyP: "1080p",
|
|
21
21
|
};
|
|
22
|
-
/** Quality level to generate at. */
|
|
22
|
+
/** Quality level to generate at. `standard` — the base tier. `prime` — Wan's higher-fidelity tier over the same options, for final output. */
|
|
23
23
|
InputWan30.Quality = {
|
|
24
24
|
Standard: "standard",
|
|
25
25
|
Prime: "prime",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as Hedra from "../index.js";
|
|
2
|
+
export interface TransactionListResponse {
|
|
3
|
+
/** This page of items. */
|
|
4
|
+
data: Hedra.TransactionRecord[];
|
|
5
|
+
/** Opaque cursor for the next page, or null when this response completes the list. Always present. Endpoints that serve the whole collection at once always return null. */
|
|
6
|
+
next_cursor: string | null;
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One movement of the API wallet's balance.
|
|
3
|
+
*/
|
|
4
|
+
export interface TransactionRecord {
|
|
5
|
+
/** The transaction's id. Stable, and the same id the V2 billing history reports for this row. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** What moved the balance: `purchase` when funds were bought, `grant` when they were granted by a plan entitlement, `usage` when a job was charged, `refund` when a charge was returned, `adjustment` when Hedra corrected the balance, and `other` for a movement this API version does not yet name. The list is open and may gain values, so switch on it with a default branch; `amount` is authoritative for a kind you do not recognize. */
|
|
8
|
+
kind: string;
|
|
9
|
+
/** The change to the balance, signed: negative for a charge, positive for funds arriving. Null for a row written before the wallet recorded amounts, whose movement is unknown rather than zero; no such row exists in production. */
|
|
10
|
+
amount: number | null;
|
|
11
|
+
/** ISO-4217 currency code for `amount`; null exactly when `amount` is. */
|
|
12
|
+
currency: string | null;
|
|
13
|
+
/** ISO-8601 instant the balance moved. */
|
|
14
|
+
created_at: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `gender` curation label, as a voice search filter.
|
|
3
|
+
*
|
|
4
|
+
* Two members because the label carries exactly two values across every
|
|
5
|
+
* provider; published as an enum so a generated SDK types the filter rather
|
|
6
|
+
* than taking any string and failing at the boundary.
|
|
7
|
+
*/
|
|
8
|
+
export declare const VoiceGender: {
|
|
9
|
+
readonly Male: "male";
|
|
10
|
+
readonly Female: "female";
|
|
11
|
+
};
|
|
12
|
+
export type VoiceGender = (typeof VoiceGender)[keyof typeof VoiceGender];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.VoiceGender = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* The `gender` curation label, as a voice search filter.
|
|
7
|
+
*
|
|
8
|
+
* Two members because the label carries exactly two values across every
|
|
9
|
+
* provider; published as an enum so a generated SDK types the filter rather
|
|
10
|
+
* than taking any string and failing at the boundary.
|
|
11
|
+
*/
|
|
12
|
+
exports.VoiceGender = {
|
|
13
|
+
Male: "male",
|
|
14
|
+
Female: "female",
|
|
15
|
+
};
|
|
@@ -18,6 +18,7 @@ export * from "./InputElevenlabsFlashV2.js";
|
|
|
18
18
|
export * from "./InputElevenlabsMultilingualStsV2.js";
|
|
19
19
|
export * from "./InputElevenlabsMultilingualStsV2Audio.js";
|
|
20
20
|
export * from "./InputElevenlabsMultilingualV2.js";
|
|
21
|
+
export * from "./InputElevenlabsMusic.js";
|
|
21
22
|
export * from "./InputElevenlabsSoundEffects.js";
|
|
22
23
|
export * from "./InputElevenlabsV3.js";
|
|
23
24
|
export * from "./InputElevenlabsVoiceClone.js";
|
|
@@ -50,6 +51,8 @@ export * from "./InputGptImage2ImagesItem.js";
|
|
|
50
51
|
export * from "./InputGptImage15.js";
|
|
51
52
|
export * from "./InputGptImage15ImagesItem.js";
|
|
52
53
|
export * from "./InputGrokImagine.js";
|
|
54
|
+
export * from "./InputGrokImagine20.js";
|
|
55
|
+
export * from "./InputGrokImagine20ImagesItem.js";
|
|
53
56
|
export * from "./InputGrokImagineImagesItem.js";
|
|
54
57
|
export * from "./InputGrokVideo.js";
|
|
55
58
|
export * from "./InputGrokVideoStartImage.js";
|
|
@@ -245,9 +248,12 @@ export * from "./ResultResponse.js";
|
|
|
245
248
|
export * from "./StatusResponse.js";
|
|
246
249
|
export * from "./SubmitResponse.js";
|
|
247
250
|
export * from "./TokenCreateResponse.js";
|
|
251
|
+
export * from "./TransactionListResponse.js";
|
|
252
|
+
export * from "./TransactionRecord.js";
|
|
248
253
|
export * from "./UsageBucket.js";
|
|
249
254
|
export * from "./UsageGroupBy.js";
|
|
250
255
|
export * from "./UsageResponse.js";
|
|
256
|
+
export * from "./VoiceGender.js";
|
|
251
257
|
export * from "./VoiceListResponse.js";
|
|
252
258
|
export * from "./VoiceSummary.js";
|
|
253
259
|
export * from "./WebhookDefaultConfig.js";
|
|
@@ -34,6 +34,7 @@ __exportStar(require("./InputElevenlabsFlashV2.js"), exports);
|
|
|
34
34
|
__exportStar(require("./InputElevenlabsMultilingualStsV2.js"), exports);
|
|
35
35
|
__exportStar(require("./InputElevenlabsMultilingualStsV2Audio.js"), exports);
|
|
36
36
|
__exportStar(require("./InputElevenlabsMultilingualV2.js"), exports);
|
|
37
|
+
__exportStar(require("./InputElevenlabsMusic.js"), exports);
|
|
37
38
|
__exportStar(require("./InputElevenlabsSoundEffects.js"), exports);
|
|
38
39
|
__exportStar(require("./InputElevenlabsV3.js"), exports);
|
|
39
40
|
__exportStar(require("./InputElevenlabsVoiceClone.js"), exports);
|
|
@@ -66,6 +67,8 @@ __exportStar(require("./InputGptImage2ImagesItem.js"), exports);
|
|
|
66
67
|
__exportStar(require("./InputGptImage15.js"), exports);
|
|
67
68
|
__exportStar(require("./InputGptImage15ImagesItem.js"), exports);
|
|
68
69
|
__exportStar(require("./InputGrokImagine.js"), exports);
|
|
70
|
+
__exportStar(require("./InputGrokImagine20.js"), exports);
|
|
71
|
+
__exportStar(require("./InputGrokImagine20ImagesItem.js"), exports);
|
|
69
72
|
__exportStar(require("./InputGrokImagineImagesItem.js"), exports);
|
|
70
73
|
__exportStar(require("./InputGrokVideo.js"), exports);
|
|
71
74
|
__exportStar(require("./InputGrokVideoStartImage.js"), exports);
|
|
@@ -261,9 +264,12 @@ __exportStar(require("./ResultResponse.js"), exports);
|
|
|
261
264
|
__exportStar(require("./StatusResponse.js"), exports);
|
|
262
265
|
__exportStar(require("./SubmitResponse.js"), exports);
|
|
263
266
|
__exportStar(require("./TokenCreateResponse.js"), exports);
|
|
267
|
+
__exportStar(require("./TransactionListResponse.js"), exports);
|
|
268
|
+
__exportStar(require("./TransactionRecord.js"), exports);
|
|
264
269
|
__exportStar(require("./UsageBucket.js"), exports);
|
|
265
270
|
__exportStar(require("./UsageGroupBy.js"), exports);
|
|
266
271
|
__exportStar(require("./UsageResponse.js"), exports);
|
|
272
|
+
__exportStar(require("./VoiceGender.js"), exports);
|
|
267
273
|
__exportStar(require("./VoiceListResponse.js"), exports);
|
|
268
274
|
__exportStar(require("./VoiceSummary.js"), exports);
|
|
269
275
|
__exportStar(require("./WebhookDefaultConfig.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "5.0.0";
|
package/dist/cjs/version.js
CHANGED
|
@@ -7,7 +7,7 @@ export type BaseClientOptions = {
|
|
|
7
7
|
/** Specify a custom URL to connect the client to. */
|
|
8
8
|
baseUrl?: core.Supplier<string>;
|
|
9
9
|
/** Override the X-Hedra-Spec-Version header */
|
|
10
|
-
specVersion?: "3.
|
|
10
|
+
specVersion?: "3.16.0";
|
|
11
11
|
/** Additional headers to include in requests. */
|
|
12
12
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
13
13
|
/** The default maximum time to wait for a response in seconds. */
|
|
@@ -34,7 +34,7 @@ export interface BaseRequestOptions {
|
|
|
34
34
|
/** A hook to abort the request. */
|
|
35
35
|
abortSignal?: AbortSignal;
|
|
36
36
|
/** Override the X-Hedra-Spec-Version header */
|
|
37
|
-
specVersion?: "3.
|
|
37
|
+
specVersion?: "3.16.0";
|
|
38
38
|
/** Additional query string parameters to include in the request. */
|
|
39
39
|
queryParams?: Record<string, unknown>;
|
|
40
40
|
/** A dictionary containing additional parameters to spread into the request's body. */
|
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -7,11 +7,11 @@ export function normalizeClientOptions(options) {
|
|
|
7
7
|
const headers = mergeHeaders({
|
|
8
8
|
"X-Fern-Language": "JavaScript",
|
|
9
9
|
"X-Fern-SDK-Name": "@hedra/sdk",
|
|
10
|
-
"X-Fern-SDK-Version": "
|
|
11
|
-
"User-Agent": "
|
|
10
|
+
"X-Fern-SDK-Version": "5.0.0",
|
|
11
|
+
"User-Agent": "hedra-node/5.0.0",
|
|
12
12
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
13
13
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
14
|
-
"X-Hedra-Spec-Version": (_a = options === null || options === void 0 ? void 0 : options.specVersion) !== null && _a !== void 0 ? _a : "3.
|
|
14
|
+
"X-Hedra-Spec-Version": (_a = options === null || options === void 0 ? void 0 : options.specVersion) !== null && _a !== void 0 ? _a : "3.16.0",
|
|
15
15
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
16
16
|
return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
|
|
17
17
|
}
|
|
@@ -48,4 +48,26 @@ export declare class BillingClient {
|
|
|
48
48
|
*/
|
|
49
49
|
getUsage(request?: Hedra.BillingGetUsageRequest, requestOptions?: BillingClient.RequestOptions): core.HttpResponsePromise<Hedra.UsageResponse>;
|
|
50
50
|
private __getUsage;
|
|
51
|
+
/**
|
|
52
|
+
* Every movement of the API wallet's balance, newest first: funds added,
|
|
53
|
+
* jobs charged, charges refunded, and corrections. Scoped to the workspace
|
|
54
|
+
* the credential bills, the same one `GET /v3/balance` reports.
|
|
55
|
+
*
|
|
56
|
+
* @param {Hedra.BillingListTransactionsRequest} request
|
|
57
|
+
* @param {BillingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link Hedra.BadRequestError}
|
|
60
|
+
* @throws {@link Hedra.UnauthorizedError}
|
|
61
|
+
* @throws {@link Hedra.ForbiddenError}
|
|
62
|
+
* @throws {@link Hedra.NotFoundError}
|
|
63
|
+
* @throws {@link Hedra.TooManyRequestsError}
|
|
64
|
+
* @throws {@link Hedra.InternalServerError}
|
|
65
|
+
* @throws {@link errors.HedraError}
|
|
66
|
+
* @throws {@link errors.HedraTimeoutError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.billing.listTransactions()
|
|
70
|
+
*/
|
|
71
|
+
listTransactions(request?: Hedra.BillingListTransactionsRequest, requestOptions?: BillingClient.RequestOptions): core.HttpResponsePromise<Hedra.TransactionListResponse>;
|
|
72
|
+
private __listTransactions;
|
|
51
73
|
}
|
|
@@ -44,7 +44,7 @@ export class BillingClient {
|
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46
46
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
47
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Hedra-Spec-Version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.specVersion) !== null && _b !== void 0 ? _b : "3.
|
|
47
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Hedra-Spec-Version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.specVersion) !== null && _b !== void 0 ? _b : "3.16.0" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
48
48
|
const _response = yield core.fetcher({
|
|
49
49
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HedraEnvironment.Production, "balance"),
|
|
50
50
|
method: "GET",
|
|
@@ -113,7 +113,7 @@ export class BillingClient {
|
|
|
113
113
|
group_by: groupBy != null ? groupBy : undefined,
|
|
114
114
|
};
|
|
115
115
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
116
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Hedra-Spec-Version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.specVersion) !== null && _b !== void 0 ? _b : "3.
|
|
116
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Hedra-Spec-Version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.specVersion) !== null && _b !== void 0 ? _b : "3.16.0" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
117
117
|
const _response = yield core.fetcher({
|
|
118
118
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HedraEnvironment.Production, "usage"),
|
|
119
119
|
method: "GET",
|
|
@@ -157,4 +157,80 @@ export class BillingClient {
|
|
|
157
157
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/usage");
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Every movement of the API wallet's balance, newest first: funds added,
|
|
162
|
+
* jobs charged, charges refunded, and corrections. Scoped to the workspace
|
|
163
|
+
* the credential bills, the same one `GET /v3/balance` reports.
|
|
164
|
+
*
|
|
165
|
+
* @param {Hedra.BillingListTransactionsRequest} request
|
|
166
|
+
* @param {BillingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
167
|
+
*
|
|
168
|
+
* @throws {@link Hedra.BadRequestError}
|
|
169
|
+
* @throws {@link Hedra.UnauthorizedError}
|
|
170
|
+
* @throws {@link Hedra.ForbiddenError}
|
|
171
|
+
* @throws {@link Hedra.NotFoundError}
|
|
172
|
+
* @throws {@link Hedra.TooManyRequestsError}
|
|
173
|
+
* @throws {@link Hedra.InternalServerError}
|
|
174
|
+
* @throws {@link errors.HedraError}
|
|
175
|
+
* @throws {@link errors.HedraTimeoutError}
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* await client.billing.listTransactions()
|
|
179
|
+
*/
|
|
180
|
+
listTransactions(request = {}, requestOptions) {
|
|
181
|
+
return core.HttpResponsePromise.fromPromise(this.__listTransactions(request, requestOptions));
|
|
182
|
+
}
|
|
183
|
+
__listTransactions() {
|
|
184
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
185
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
186
|
+
const { limit, cursor } = request;
|
|
187
|
+
const _queryParams = {
|
|
188
|
+
limit,
|
|
189
|
+
cursor,
|
|
190
|
+
};
|
|
191
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
192
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "X-Hedra-Spec-Version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.specVersion) !== null && _b !== void 0 ? _b : "3.16.0" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
193
|
+
const _response = yield core.fetcher({
|
|
194
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HedraEnvironment.Production, "transactions"),
|
|
195
|
+
method: "GET",
|
|
196
|
+
headers: _headers,
|
|
197
|
+
queryString: core.url
|
|
198
|
+
.queryBuilder()
|
|
199
|
+
.addMany(_queryParams)
|
|
200
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
201
|
+
.build(),
|
|
202
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
203
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
204
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
205
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
206
|
+
logging: this._options.logging,
|
|
207
|
+
});
|
|
208
|
+
if (_response.ok) {
|
|
209
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
210
|
+
}
|
|
211
|
+
if (_response.error.reason === "status-code") {
|
|
212
|
+
switch (_response.error.statusCode) {
|
|
213
|
+
case 400:
|
|
214
|
+
throw new Hedra.BadRequestError(_response.error.body, _response.rawResponse);
|
|
215
|
+
case 401:
|
|
216
|
+
throw new Hedra.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
217
|
+
case 403:
|
|
218
|
+
throw new Hedra.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
219
|
+
case 404:
|
|
220
|
+
throw new Hedra.NotFoundError(_response.error.body, _response.rawResponse);
|
|
221
|
+
case 429:
|
|
222
|
+
throw new Hedra.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
223
|
+
case 500:
|
|
224
|
+
throw new Hedra.InternalServerError(_response.error.body, _response.rawResponse);
|
|
225
|
+
default:
|
|
226
|
+
throw new errors.HedraError({
|
|
227
|
+
statusCode: _response.error.statusCode,
|
|
228
|
+
body: _response.error.body,
|
|
229
|
+
rawResponse: _response.rawResponse,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/transactions");
|
|
234
|
+
});
|
|
235
|
+
}
|
|
160
236
|
}
|
|
@@ -54,7 +54,7 @@ export class FilesClient {
|
|
|
54
54
|
yield _body.appendFile("file", request.file);
|
|
55
55
|
const _maybeEncodedRequest = yield _body.getRequest();
|
|
56
56
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
57
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Hedra-Spec-Version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.specVersion) !== null && _b !== void 0 ? _b : "3.
|
|
57
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Hedra-Spec-Version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.specVersion) !== null && _b !== void 0 ? _b : "3.16.0" }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
58
58
|
const _response = yield core.fetcher({
|
|
59
59
|
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HedraEnvironment.Production, "files"),
|
|
60
60
|
method: "POST",
|