From 95e5c0ea318ee5d92e4eaad9965a8316bfdd75b3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 May 2026 13:55:01 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...ent.AuthJwtLoginApiV1AuthJwtLoginPost.g.cs | 65 +- ...t.AuthJwtLogoutApiV1AuthJwtLogoutPost.g.cs | 56 +- ....AuthorizeApiV1AuthGoogleAuthorizeGet.g.cs | 67 +- ...nt.CallbackApiV1AuthGoogleCallbackGet.g.cs | 70 +- ...t.CreateTokenApiV1AuthTokenCreatePost.g.cs | 60 +- ...erProfileApiV1AuthProfileDeleteDelete.g.cs | 50 +- ...priseLoginApiV1AuthEnterpriseLoginGet.g.cs | 75 +- ...n.AuthClient.GetMeApiV1AuthProfileGet.g.cs | 60 +- ...lient.ListTokensApiV1AuthTokenListGet.g.cs | 60 +- ...nt.PatchMeApiV1AuthProfileUpdatePatch.g.cs | 993 +++++++++++++- ...RegisterRegisterApiV1AuthRegisterPost.g.cs | 65 +- ...otPasswordApiV1AuthForgotPasswordPost.g.cs | 61 +- ...setPasswordApiV1AuthResetPasswordPost.g.cs | 61 +- ...t.RevokeTokenApiV1AuthTokenRevokePost.g.cs | 61 +- ...t.UsersCurrentUserApiV1AuthUsersMeGet.g.cs | 60 +- ...UsersDeleteUserApiV1AuthUsersIdDelete.g.cs | 53 +- ...PatchCurrentUserApiV1AuthUsersMePatch.g.cs | 65 +- ...t.UsersPatchUserApiV1AuthUsersIdPatch.g.cs | 68 +- ...thClient.UsersUserApiV1AuthUsersIdGet.g.cs | 63 +- ...tTokenApiV1AuthRequestVerifyTokenPost.g.cs | 61 +- ...lient.VerifyVerifyApiV1AuthVerifyPost.g.cs | 65 +- .../Generated/Presenton.AuthClient.g.cs | 8 +- .../Presenton.AutoSDKHttpResponse.g.cs | 121 ++ ...essionApiV1BillingCheckoutSessionPost.g.cs | 65 +- ...lSessionApiV1BillingPortalSessionPost.g.cs | 65 +- ...tionStatusApiV1BillingSubscriptionGet.g.cs | 69 +- ...lient.ListPricesApiV1BillingPricesGet.g.cs | 60 +- ...ionApiV1BillingSubscriptionModifyPost.g.cs | 65 +- ...reditsApiV1BillingCreditsPurchasePost.g.cs | 65 +- ...piV1BillingSubscriptionReactivatePost.g.cs | 60 +- ....StripeWebhookApiV1BillingWebhookPost.g.cs | 56 +- .../Generated/Presenton.BillingClient.g.cs | 8 +- ...nt.GetAddedCreditsApiV1CreditAddedGet.g.cs | 74 +- ...lient.GetBalanceApiV1CreditBalanceGet.g.cs | 60 +- ...GetCreditAccountApiV1CreditAccountGet.g.cs | 60 +- ...tesAndAutoTopupInfoApiV1CreditInfoGet.g.cs | 60 +- ...ransactionsApiV1CreditTransactionsGet.g.cs | 74 +- ...tUsedCreditsApiV1CreditAddedIdUsedGet.g.cs | 77 +- ....SetAutoTopupApiV1CreditAutoTopupPost.g.cs | 65 +- .../Generated/Presenton.CreditClient.g.cs | 8 +- ...nt.AddCreditsApiV1DebugAddCreditsPost.g.cs | 55 +- ...criptionApiV1DebugAddSubscriptionPost.g.cs | 65 +- ...ugClient.AddUserApiV1DebugAddUserPost.g.cs | 65 +- ...lanceApiV1DebugCheckCreditBalancePost.g.cs | 65 +- ....DeleteUserApiV1DebugDeleteUserDelete.g.cs | 55 +- ...criptionApiV1DebugEndSubscriptionPost.g.cs | 55 +- ....GetJwtTokenApiV1DebugGetJwtTokenPost.g.cs | 65 +- ...ExceptionApiV1DebugRaiseExceptionPost.g.cs | 61 +- ...mailApiV1DebugSendLowBalanceEmailPost.g.cs | 55 +- ...lApiV1DebugSendPasswordResetEmailPost.g.cs | 55 +- ...lApiV1DebugSendPaymentFailedEmailPost.g.cs | 55 +- ...ilApiV1DebugSendVerificationEmailPost.g.cs | 55 +- ...meEmailApiV1DebugSendWelcomeEmailPost.g.cs | 55 +- ...ugClient.TestJobApiV1DebugTestJobPost.g.cs | 55 +- .../Generated/Presenton.DebugClient.g.cs | 8 +- ...SystemApiV1PptDesignSystemExtractPost.g.cs | 68 +- .../Presenton.DesignSystemClient.g.cs | 8 +- ...ient.AddDownloadApiV3DownloadsAddPost.g.cs | 66 +- .../Generated/Presenton.DownloadsClient.g.cs | 8 +- ...omposeFilesApiV1PptFilesDecomposePost.g.cs | 65 +- ...PptFilesUploadAndGetTemporaryUrlsPost.g.cs | 71 +- ...adFilesForUiApiV1PptFilesUploadUiPost.g.cs | 71 +- ....UploadFilesV1ApiV1PptFilesUploadPost.g.cs | 74 +- .../Generated/Presenton.FilesClient.g.cs | 8 +- ...heckFontsInPptxApiV1PptFontsCheckPost.g.cs | 975 +++++++++++++- ...t.DeleteFontApiV1PptFontsFontIdDelete.g.cs | 53 +- ...ent.ListFontsApiV1PptFontsUploadedGet.g.cs | 60 +- ...ent.UploadFontApiV1PptFontsUploadPost.g.cs | 975 +++++++++++++- .../Generated/Presenton.FontsClient.g.cs | 8 +- ...ton.HealthClient.HealthApiV1HealthGet.g.cs | 60 +- .../Generated/Presenton.HealthClient.g.cs | 8 +- ...tHtmlCreateApiV1PptHtmlCreateInitPost.g.cs | 1084 ++++++++++++++- ...eApiV1PptHtmlCreateStreamSessionIdGet.g.cs | 59 +- .../Generated/Presenton.HtmlCreateClient.g.cs | 8 +- ...ithImagesEndpointApiV1PptHtmlEditPost.g.cs | 1172 +++++++++++++++- ....InitHtmlEditApiV1PptHtmlEditInitPost.g.cs | 1173 ++++++++++++++++- ...ditApiV1PptHtmlEditStreamSessionIdGet.g.cs | 59 +- .../Generated/Presenton.HtmlEditClient.g.cs | 8 +- ...ertHtmlToReactApiV1PptHtmlToReactPost.g.cs | 70 +- .../Presenton.HtmlToReactClient.g.cs | 8 +- ...ent.AuthJwtLoginApiV1AuthJwtLoginPost.g.cs | 12 + ...t.AuthJwtLogoutApiV1AuthJwtLogoutPost.g.cs | 9 + ....AuthorizeApiV1AuthGoogleAuthorizeGet.g.cs | 11 + ...nt.CallbackApiV1AuthGoogleCallbackGet.g.cs | 16 + ...t.CreateTokenApiV1AuthTokenCreatePost.g.cs | 9 + ...erProfileApiV1AuthProfileDeleteDelete.g.cs | 9 + ...priseLoginApiV1AuthEnterpriseLoginGet.g.cs | 17 + ....IAuthClient.GetMeApiV1AuthProfileGet.g.cs | 9 + ...lient.ListTokensApiV1AuthTokenListGet.g.cs | 9 + ...nt.PatchMeApiV1AuthProfileUpdatePatch.g.cs | 47 + ...RegisterRegisterApiV1AuthRegisterPost.g.cs | 12 + ...otPasswordApiV1AuthForgotPasswordPost.g.cs | 12 + ...setPasswordApiV1AuthResetPasswordPost.g.cs | 12 + ...t.RevokeTokenApiV1AuthTokenRevokePost.g.cs | 12 + ...t.UsersCurrentUserApiV1AuthUsersMeGet.g.cs | 9 + ...UsersDeleteUserApiV1AuthUsersIdDelete.g.cs | 11 + ...PatchCurrentUserApiV1AuthUsersMePatch.g.cs | 12 + ...t.UsersPatchUserApiV1AuthUsersIdPatch.g.cs | 14 + ...thClient.UsersUserApiV1AuthUsersIdGet.g.cs | 11 + ...tTokenApiV1AuthRequestVerifyTokenPost.g.cs | 12 + ...lient.VerifyVerifyApiV1AuthVerifyPost.g.cs | 12 + ...essionApiV1BillingCheckoutSessionPost.g.cs | 12 + ...lSessionApiV1BillingPortalSessionPost.g.cs | 12 + ...tionStatusApiV1BillingSubscriptionGet.g.cs | 13 + ...lient.ListPricesApiV1BillingPricesGet.g.cs | 9 + ...ionApiV1BillingSubscriptionModifyPost.g.cs | 12 + ...reditsApiV1BillingCreditsPurchasePost.g.cs | 12 + ...piV1BillingSubscriptionReactivatePost.g.cs | 9 + ....StripeWebhookApiV1BillingWebhookPost.g.cs | 9 + ...nt.GetAddedCreditsApiV1CreditAddedGet.g.cs | 17 + ...lient.GetBalanceApiV1CreditBalanceGet.g.cs | 9 + ...GetCreditAccountApiV1CreditAccountGet.g.cs | 9 + ...tesAndAutoTopupInfoApiV1CreditInfoGet.g.cs | 9 + ...ransactionsApiV1CreditTransactionsGet.g.cs | 17 + ...tUsedCreditsApiV1CreditAddedIdUsedGet.g.cs | 19 + ....SetAutoTopupApiV1CreditAutoTopupPost.g.cs | 12 + ...nt.AddCreditsApiV1DebugAddCreditsPost.g.cs | 12 + ...criptionApiV1DebugAddSubscriptionPost.g.cs | 12 + ...ugClient.AddUserApiV1DebugAddUserPost.g.cs | 12 + ...lanceApiV1DebugCheckCreditBalancePost.g.cs | 12 + ....DeleteUserApiV1DebugDeleteUserDelete.g.cs | 12 + ...criptionApiV1DebugEndSubscriptionPost.g.cs | 12 + ....GetJwtTokenApiV1DebugGetJwtTokenPost.g.cs | 12 + ...ExceptionApiV1DebugRaiseExceptionPost.g.cs | 12 + ...mailApiV1DebugSendLowBalanceEmailPost.g.cs | 12 + ...lApiV1DebugSendPasswordResetEmailPost.g.cs | 12 + ...lApiV1DebugSendPaymentFailedEmailPost.g.cs | 12 + ...ilApiV1DebugSendVerificationEmailPost.g.cs | 12 + ...meEmailApiV1DebugSendWelcomeEmailPost.g.cs | 12 + ...ugClient.TestJobApiV1DebugTestJobPost.g.cs | 12 + ...SystemApiV1PptDesignSystemExtractPost.g.cs | 15 + ...ient.AddDownloadApiV3DownloadsAddPost.g.cs | 13 + ...omposeFilesApiV1PptFilesDecomposePost.g.cs | 12 + ...PptFilesUploadAndGetTemporaryUrlsPost.g.cs | 12 + ...adFilesForUiApiV1PptFilesUploadUiPost.g.cs | 12 + ....UploadFilesV1ApiV1PptFilesUploadPost.g.cs | 15 + ...heckFontsInPptxApiV1PptFontsCheckPost.g.cs | 47 + ...t.DeleteFontApiV1PptFontsFontIdDelete.g.cs | 11 + ...ent.ListFontsApiV1PptFontsUploadedGet.g.cs | 9 + ...ent.UploadFontApiV1PptFontsUploadPost.g.cs | 47 + ...on.IHealthClient.HealthApiV1HealthGet.g.cs | 9 + ...tHtmlCreateApiV1PptHtmlCreateInitPost.g.cs | 75 ++ ...eApiV1PptHtmlCreateStreamSessionIdGet.g.cs | 11 + ...ithImagesEndpointApiV1PptHtmlEditPost.g.cs | 111 ++ ....InitHtmlEditApiV1PptHtmlEditInitPost.g.cs | 91 ++ ...ditApiV1PptHtmlEditStreamSessionIdGet.g.cs | 11 + ...ertHtmlToReactApiV1PptHtmlToReactPost.g.cs | 17 + ...ent.SearchIconsApiV1PptIconsSearchGet.g.cs | 15 + ...mageByIdForUiApiV1PptImagesIdUiDelete.g.cs | 11 + ...adedImageByIdV1ApiV1PptImagesIdDelete.g.cs | 14 + ...enerateImageApiV1PptImagesGenerateGet.g.cs | 15 + ...nerateImagesApiV2PptImagesGenerateGet.g.cs | 19 + ...ratedImagesApiV1PptImagesGeneratedGet.g.cs | 17 + ...magesForUiApiV1PptImagesUploadedUiGet.g.cs | 9 + ...adedImagesV1ApiV1PptImagesUploadedGet.g.cs | 12 + ...dImageForUiApiV1PptImagesUploadUiPost.g.cs | 43 + ...UploadImageV1ApiV1PptImagesUploadPost.g.cs | 52 + ...ockPresentationGenerationCompletedGet.g.cs | 9 + ...V1MockPresentationGenerationFailedGet.g.cs | 9 + ...nesSyncV1ApiV1PptOutlinesGeneratePost.g.cs | 12 + ...amOutlinesApiV1PptOutlinesStreamIdGet.g.cs | 11 + ...PdfSlidesApiV1PptPdfSlidesProcessPost.g.cs | 65 + ...PptxFontsApiV1PptPptxFontsProcessPost.g.cs | 53 + ...txSlidesApiV1PptPptxSlidesProcessPost.g.cs | 76 ++ ...StatusApiV1PptPresentationStatusIdGet.g.cs | 17 + ...ntationApiV1PptPresentationCreatePost.g.cs | 12 + ...ptPresentationCreateFromJsonAsyncPost.g.cs | 16 + ...piV1PptPresentationCreateFromJsonPost.g.cs | 15 + ...ationByIdApiV1PptPresentationIdDelete.g.cs | 14 + ...IdForUiApiV1PptPresentationIdUiDelete.g.cs | 11 + ...tingOneApiV1PptPresentationDerivePost.g.cs | 15 + ...ewContentApiV1PptPresentationEditPost.g.cs | 15 + ...OrPdfV1ApiV1PptPresentationExportPost.g.cs | 15 + ...ApiV1PptPresentationGenerateAsyncPost.g.cs | 16 + ...yncV1ApiV1PptPresentationGeneratePost.g.cs | 15 + ...esentationsApiV1PptPresentationAllGet.g.cs | 20 + ...ionsForUiApiV1PptPresentationAllUiGet.g.cs | 17 + ...ndSlidesByIdApiV1PptPresentationIdGet.g.cs | 14 + ...ationForUiApiV1PptPresentationIdUiGet.g.cs | 11 + ...tationApiV1PptPresentationPreparePost.g.cs | 12 + ...tationApiV1PptPresentationStreamIdGet.g.cs | 11 + ...tationApiV1PptPresentationUpdatePatch.g.cs | 12 + ...ithImageEndpointApiV1PptReactEditPost.g.cs | 87 ++ ...Client.EditSlideApiV1PptSlideEditPost.g.cs | 19 + ...ditSlideHtmlApiV1PptSlideEditHtmlPost.g.cs | 12 + ...ertSlideToHtmlApiV1PptSlideToHtmlPost.g.cs | 17 + ...tSlideToReactApiV1PptSlideToReactPost.g.cs | 12 + ...tApiV1PptTemplateSlideLayoutClonePost.g.cs | 12 + ...loneTemplateApiV1PptTemplateClonePost.g.cs | 12 + ...ApiV1PptTemplateSlideLayoutCreatePost.g.cs | 17 + ...ApiV1PptTemplateCreateSlideLayoutPost.g.cs | 17 + ...utApiV1PptTemplateSlideLayoutEditPost.g.cs | 12 + ...PptTemplateSlideLayoutEditSectionPost.g.cs | 12 + ...GetAllTemplatesApiV1PptTemplateAllGet.g.cs | 14 + ...sApiV1PptTemplateTemplateIdLayoutsGet.g.cs | 13 + ....GetTemplateByIdApiV1PptTemplateIdGet.g.cs | 13 + ...teExampleApiV1PptTemplateIdExampleGet.g.cs | 15 + ...emplateApiV1PptTemplateCreateInitPost.g.cs | 12 + ...utApiV1PptTemplateSlideLayoutSavePost.g.cs | 12 + ....SaveTemplateApiV1PptTemplateSavePost.g.cs | 12 + ...dateTemplateApiV1PptTemplateUpdatePut.g.cs | 12 + ...mplateFontsUploadAndSlidesPreviewPost.g.cs | 63 + ...iV1PptTemplateManagementTemplatesPost.g.cs | 12 + ...gementDeleteTemplatesTemplateIdDelete.g.cs | 11 + ...ManagementGetTemplatesPresentationGet.g.cs | 19 + ...yApiV1PptTemplateManagementSummaryGet.g.cs | 10 + ...ptTemplateManagementSaveTemplatesPost.g.cs | 20 + ...t.CreateThemeApiV1PptThemesCreatePost.g.cs | 12 + ...hemeApiV1PptThemesDeleteThemeIdDelete.g.cs | 11 + ...DefaultThemesApiV1PptThemesDefaultGet.g.cs | 9 + ...sClient.GetThemesApiV1PptThemesAllGet.g.cs | 9 + ...ThemeApiV1PptThemesUpdateThemeIdPatch.g.cs | 14 + ...onExportApiV1OnPresentationExportPost.g.cs | 12 + ...mV2AsyncApiV2PptDesignCreateAsyncPost.g.cs | 13 + ...2ApiV2PptDesignDesignSystemIdUiDelete.g.cs | 11 + ...ignSystemsForUiApiV2PptDesignAllUiGet.g.cs | 17 + ...nSystemsForUiApiV2PptDesignDefaultGet.g.cs | 17 + ...actionStatusApiV2PptDesignStatusIdGet.g.cs | 11 + ...2PptDesignDesignSystemIdExportInfoGet.g.cs | 11 + ...ient.GetFixHtmlApiV2PptFixSlideFixGet.g.cs | 13 + ...GetFixStatusApiV2PptFixSlideStatusGet.g.cs | 13 + ....InitFixSlideApiV2PptFixSlideInitPost.g.cs | 55 + ...heckFontsInPptxApiV2PptFontsCheckPost.g.cs | 47 + ...viewApiV2PptFontsUploadAndPreviewPost.g.cs | 63 + ...onExportApiV2OnPresentationExportPost.g.cs | 12 + ...gQuestionsApiV2OnboardingQuestionsGet.g.cs | 9 + ...swersApiV2OnboardingAnswersSubmitPost.g.cs | 12 + ...IdForUiApiV2PptPresentationIdUiDelete.g.cs | 11 + ...tHtmlApiV2PptPresentationEditHtmlPost.g.cs | 13 + ...neApiV2PptPresentationOutlineEditPost.g.cs | 13 + ...onApiV2PptPresentationEditSectionPost.g.cs | 13 + ...OrPdfV2ApiV2PptPresentationExportPost.g.cs | 15 + ...V2PptPresentationGenerateHtmlInitPost.g.cs | 13 + ...ApiV2PptPresentationGenerateAsyncPost.g.cs | 12 + ...yncV2ApiV2PptPresentationGeneratePost.g.cs | 12 + ...ionsForUiApiV2PptPresentationAllUiGet.g.cs | 17 + ...nByIdForUiApiV2PptPresentationIdUiGet.g.cs | 11 + ...StatusApiV2PptPresentationStatusIdGet.g.cs | 11 + ...iV2PptPresentationOutlinesStreamIdGet.g.cs | 11 + ...onHtmlApiV2PptPresentationStreamIdGet.g.cs | 11 + ...eApiV2PptPresentationStreamLargeIdGet.g.cs | 11 + ...entationApiV2PptPresentationUpdatePut.g.cs | 12 + ...rateNewSlideApiV2PptSlideGeneratePost.g.cs | 13 + ...tSlideIdSegmentVariationsGeneratePost.g.cs | 15 + ...ariationsApiV2PptSlideIdVariationsGet.g.cs | 20 + ...sApiV2PptSlideIdVariationsGenerateGet.g.cs | 16 + ...ncTaskStatusApiV3AsyncTaskStatusIdGet.g.cs | 16 + ...rpriseUserApiV3EnterpriseUsersAddPost.g.cs | 12 + ...rCreditsApiV3EnterpriseCreditsAddPost.g.cs | 12 + ...EnterpriseUsersUserIdAccessTokensPost.g.cs | 11 + ...iseUsersUserIdAccessTokensTokenDelete.g.cs | 13 + ...erpriseApiV3EnterpriseEnterpriseIdGet.g.cs | 11 + ...ditsInfoApiV3EnterpriseCreditsInfoGet.g.cs | 13 + ...foApiV3EnterprisePresentationsInfoGet.g.cs | 13 + ...riseUserApiV3EnterpriseUsersUserIdGet.g.cs | 11 + ...V3EnterpriseUsersUserIdCreditsInfoGet.g.cs | 11 + ...rpriseUsersUserIdPresentationsInfoGet.g.cs | 11 + ...eUsersInfoApiV3EnterpriseUsersInfoGet.g.cs | 13 + ...editAddsApiV3EnterpriseCreditsAddsGet.g.cs | 23 + ...ationsApiV3EnterprisePresentationsGet.g.cs | 27 + ...3EnterpriseUsersUserIdAccessTokensGet.g.cs | 11 + ...EnterpriseUsersUserIdPresentationsGet.g.cs | 25 + ...nterpriseUsersApiV3EnterpriseUsersGet.g.cs | 27 + ...nterpriseUsersUserIdResetPasswordPost.g.cs | 14 + ...ent.UploadFilesV3ApiV3FilesUploadPost.g.cs | 15 + ...tGithubMetadataApiV3GithubMetadataGet.g.cs | 9 + ...ploadedImageByIdV3ApiV3ImagesIdDelete.g.cs | 14 + ...ploadedImagesV3ApiV3ImagesUploadedGet.g.cs | 12 + ...nt.UploadImageV3ApiV3ImagesUploadPost.g.cs | 52 + ...iV3PlaygroundPresentationGeneratePost.g.cs | 12 + ...cV3ApiV3PresentationFromJsonAsyncPost.g.cs | 16 + ...onSyncV3ApiV3PresentationFromJsonPost.g.cs | 15 + ...ptxOrPdfV3ApiV3PresentationExportPost.g.cs | 15 + ...ApiV3PresentationOutlinesGeneratePost.g.cs | 15 + ...cV3ApiV3PresentationGenerateAsyncPost.g.cs | 16 + ...onSyncV3ApiV3PresentationGeneratePost.g.cs | 15 + ...entationsForUiApiV3PresentationAllGet.g.cs | 20 + ...UiWithSlidesApiV3PresentationAllUiGet.g.cs | 17 + ...rSchemaApiV3SchemaContentGeneratePost.g.cs | 12 + ...AllSmartDesignsApiV3SmartDesignAllGet.g.cs | 20 + ...dTemplatesApiV3StandardTemplateAllGet.g.cs | 17 + ...emplateByIdApiV3StandardTemplateIdGet.g.cs | 14 + ...mpleApiV3StandardTemplateIdExampleGet.g.cs | 14 + ...GenerateThemeV3ApiV3ThemeGeneratePost.g.cs | 12 + ...hookSubscriptionsV3ApiV3WebhookAllGet.g.cs | 12 + ...eToWebhookV3ApiV3WebhookSubscribePost.g.cs | 15 + ...onsV3ApiV3WebhookUnsubscribeAllDelete.g.cs | 12 + ...ebhookV3ApiV3WebhookUnsubscribeDelete.g.cs | 15 + ...eToWebhookV1ApiV1WebhookSubscribePost.g.cs | 15 + ...ebhookV1ApiV1WebhookUnsubscribeDelete.g.cs | 15 + ...ent.SearchIconsApiV1PptIconsSearchGet.g.cs | 72 +- .../Generated/Presenton.IconsClient.g.cs | 8 +- ...mageByIdForUiApiV1PptImagesIdUiDelete.g.cs | 53 +- ...adedImageByIdV1ApiV1PptImagesIdDelete.g.cs | 56 +- ...enerateImageApiV1PptImagesGenerateGet.g.cs | 68 +- ...nerateImagesApiV2PptImagesGenerateGet.g.cs | 73 +- ...ratedImagesApiV1PptImagesGeneratedGet.g.cs | 74 +- ...magesForUiApiV1PptImagesUploadedUiGet.g.cs | 56 +- ...adedImagesV1ApiV1PptImagesUploadedGet.g.cs | 59 +- ...dImageForUiApiV1PptImagesUploadUiPost.g.cs | 959 +++++++++++++- ...UploadImageV1ApiV1PptImagesUploadPost.g.cs | 980 +++++++++++++- .../Generated/Presenton.ImagesClient.g.cs | 8 +- ...ockPresentationGenerationCompletedGet.g.cs | 60 +- ...V1MockPresentationGenerationFailedGet.g.cs | 60 +- .../Generated/Presenton.MockClient.g.cs | 8 +- .../Generated/Presenton.OptionsSupport.g.cs | 231 +++- ...nesSyncV1ApiV1PptOutlinesGeneratePost.g.cs | 65 +- ...amOutlinesApiV1PptOutlinesStreamIdGet.g.cs | 59 +- .../Generated/Presenton.OutlinesClient.g.cs | 8 +- ...PdfSlidesApiV1PptPdfSlidesProcessPost.g.cs | 993 +++++++++++++- .../Generated/Presenton.PdfSlidesClient.g.cs | 8 +- ...PptxFontsApiV1PptPptxFontsProcessPost.g.cs | 981 +++++++++++++- .../Generated/Presenton.PptxFontsClient.g.cs | 8 +- ...txSlidesApiV1PptPptxSlidesProcessPost.g.cs | 1026 +++++++++++++- .../Generated/Presenton.PptxSlidesClient.g.cs | 8 +- ...StatusApiV1PptPresentationStatusIdGet.g.cs | 69 +- ...ntationApiV1PptPresentationCreatePost.g.cs | 65 +- ...ptPresentationCreateFromJsonAsyncPost.g.cs | 69 +- ...piV1PptPresentationCreateFromJsonPost.g.cs | 68 +- ...ationByIdApiV1PptPresentationIdDelete.g.cs | 56 +- ...IdForUiApiV1PptPresentationIdUiDelete.g.cs | 53 +- ...tingOneApiV1PptPresentationDerivePost.g.cs | 68 +- ...ewContentApiV1PptPresentationEditPost.g.cs | 68 +- ...OrPdfV1ApiV1PptPresentationExportPost.g.cs | 68 +- ...ApiV1PptPresentationGenerateAsyncPost.g.cs | 69 +- ...yncV1ApiV1PptPresentationGeneratePost.g.cs | 68 +- ...esentationsApiV1PptPresentationAllGet.g.cs | 77 +- ...ionsForUiApiV1PptPresentationAllUiGet.g.cs | 74 +- ...ndSlidesByIdApiV1PptPresentationIdGet.g.cs | 66 +- ...ationForUiApiV1PptPresentationIdUiGet.g.cs | 63 +- ...tationApiV1PptPresentationPreparePost.g.cs | 65 +- ...tationApiV1PptPresentationStreamIdGet.g.cs | 63 +- ...tationApiV1PptPresentationUpdatePatch.g.cs | 65 +- .../Presenton.PresentationClient.g.cs | 8 +- .../Generated/Presenton.PresentonClient.g.cs | 104 +- ...ithImageEndpointApiV1PptReactEditPost.g.cs | 1156 +++++++++++++++- .../Generated/Presenton.ReactEditClient.g.cs | 8 +- ...Client.EditSlideApiV1PptSlideEditPost.g.cs | 72 +- ...ditSlideHtmlApiV1PptSlideEditHtmlPost.g.cs | 65 +- .../Generated/Presenton.SlideClient.g.cs | 8 +- ...ertSlideToHtmlApiV1PptSlideToHtmlPost.g.cs | 70 +- .../Presenton.SlideToHtmlClient.g.cs | 8 +- ...tSlideToReactApiV1PptSlideToReactPost.g.cs | 65 +- .../Presenton.SlideToReactClient.g.cs | 8 +- ...tApiV1PptTemplateSlideLayoutClonePost.g.cs | 65 +- ...loneTemplateApiV1PptTemplateClonePost.g.cs | 65 +- ...ApiV1PptTemplateSlideLayoutCreatePost.g.cs | 75 +- ...ApiV1PptTemplateCreateSlideLayoutPost.g.cs | 75 +- ...utApiV1PptTemplateSlideLayoutEditPost.g.cs | 65 +- ...PptTemplateSlideLayoutEditSectionPost.g.cs | 65 +- ...GetAllTemplatesApiV1PptTemplateAllGet.g.cs | 70 +- ...sApiV1PptTemplateTemplateIdLayoutsGet.g.cs | 65 +- ....GetTemplateByIdApiV1PptTemplateIdGet.g.cs | 65 +- ...teExampleApiV1PptTemplateIdExampleGet.g.cs | 67 +- ...emplateApiV1PptTemplateCreateInitPost.g.cs | 65 +- ...utApiV1PptTemplateSlideLayoutSavePost.g.cs | 61 +- ....SaveTemplateApiV1PptTemplateSavePost.g.cs | 65 +- ...dateTemplateApiV1PptTemplateUpdatePut.g.cs | 65 +- ...mplateFontsUploadAndSlidesPreviewPost.g.cs | 1034 ++++++++++++++- .../Generated/Presenton.TemplateClient.g.cs | 8 +- ...iV1PptTemplateManagementTemplatesPost.g.cs | 65 +- ...gementDeleteTemplatesTemplateIdDelete.g.cs | 53 +- ...ManagementGetTemplatesPresentationGet.g.cs | 71 +- ...yApiV1PptTemplateManagementSummaryGet.g.cs | 61 +- ...ptTemplateManagementSaveTemplatesPost.g.cs | 73 +- .../Presenton.TemplateManagementClient.g.cs | 8 +- ...t.CreateThemeApiV1PptThemesCreatePost.g.cs | 65 +- ...hemeApiV1PptThemesDeleteThemeIdDelete.g.cs | 53 +- ...DefaultThemesApiV1PptThemesDefaultGet.g.cs | 60 +- ...sClient.GetThemesApiV1PptThemesAllGet.g.cs | 60 +- ...ThemeApiV1PptThemesUpdateThemeIdPatch.g.cs | 68 +- .../Generated/Presenton.ThemesClient.g.cs | 8 +- ...onExportApiV1OnPresentationExportPost.g.cs | 61 +- .../Generated/Presenton.V1OnClient.g.cs | 8 +- ...mV2AsyncApiV2PptDesignCreateAsyncPost.g.cs | 66 +- ...2ApiV2PptDesignDesignSystemIdUiDelete.g.cs | 53 +- ...ignSystemsForUiApiV2PptDesignAllUiGet.g.cs | 74 +- ...nSystemsForUiApiV2PptDesignDefaultGet.g.cs | 74 +- ...actionStatusApiV2PptDesignStatusIdGet.g.cs | 63 +- ...2PptDesignDesignSystemIdExportInfoGet.g.cs | 63 +- .../Generated/Presenton.V2DesignClient.g.cs | 8 +- ...ient.GetFixHtmlApiV2PptFixSlideFixGet.g.cs | 65 +- ...GetFixStatusApiV2PptFixSlideStatusGet.g.cs | 65 +- ....InitFixSlideApiV2PptFixSlideInitPost.g.cs | 982 +++++++++++++- .../Generated/Presenton.V2FixSlideClient.g.cs | 8 +- ...heckFontsInPptxApiV2PptFontsCheckPost.g.cs | 975 +++++++++++++- ...viewApiV2PptFontsUploadAndPreviewPost.g.cs | 1034 ++++++++++++++- .../Generated/Presenton.V2FontsClient.g.cs | 8 +- ...onExportApiV2OnPresentationExportPost.g.cs | 61 +- .../Generated/Presenton.V2OnClient.g.cs | 8 +- ...gQuestionsApiV2OnboardingQuestionsGet.g.cs | 60 +- ...swersApiV2OnboardingAnswersSubmitPost.g.cs | 61 +- .../Presenton.V2OnboardingClient.g.cs | 8 +- ...IdForUiApiV2PptPresentationIdUiDelete.g.cs | 53 +- ...tHtmlApiV2PptPresentationEditHtmlPost.g.cs | 66 +- ...neApiV2PptPresentationOutlineEditPost.g.cs | 62 +- ...onApiV2PptPresentationEditSectionPost.g.cs | 66 +- ...OrPdfV2ApiV2PptPresentationExportPost.g.cs | 68 +- ...V2PptPresentationGenerateHtmlInitPost.g.cs | 66 +- ...ApiV2PptPresentationGenerateAsyncPost.g.cs | 65 +- ...yncV2ApiV2PptPresentationGeneratePost.g.cs | 65 +- ...ionsForUiApiV2PptPresentationAllUiGet.g.cs | 74 +- ...nByIdForUiApiV2PptPresentationIdUiGet.g.cs | 63 +- ...StatusApiV2PptPresentationStatusIdGet.g.cs | 63 +- ...iV2PptPresentationOutlinesStreamIdGet.g.cs | 59 +- ...onHtmlApiV2PptPresentationStreamIdGet.g.cs | 59 +- ...eApiV2PptPresentationStreamLargeIdGet.g.cs | 59 +- ...entationApiV2PptPresentationUpdatePut.g.cs | 65 +- .../Presenton.V2PresentationClient.g.cs | 8 +- ...rateNewSlideApiV2PptSlideGeneratePost.g.cs | 66 +- ...tSlideIdSegmentVariationsGeneratePost.g.cs | 69 +- ...ariationsApiV2PptSlideIdVariationsGet.g.cs | 78 +- ...sApiV2PptSlideIdVariationsGenerateGet.g.cs | 69 +- .../Generated/Presenton.V2SlideClient.g.cs | 8 +- ...ncTaskStatusApiV3AsyncTaskStatusIdGet.g.cs | 68 +- .../Presenton.V3AsyncTaskClient.g.cs | 8 +- ...rpriseUserApiV3EnterpriseUsersAddPost.g.cs | 65 +- ...rCreditsApiV3EnterpriseCreditsAddPost.g.cs | 65 +- ...EnterpriseUsersUserIdAccessTokensPost.g.cs | 63 +- ...iseUsersUserIdAccessTokensTokenDelete.g.cs | 56 +- ...erpriseApiV3EnterpriseEnterpriseIdGet.g.cs | 63 +- ...ditsInfoApiV3EnterpriseCreditsInfoGet.g.cs | 69 +- ...foApiV3EnterprisePresentationsInfoGet.g.cs | 69 +- ...riseUserApiV3EnterpriseUsersUserIdGet.g.cs | 63 +- ...V3EnterpriseUsersUserIdCreditsInfoGet.g.cs | 63 +- ...rpriseUsersUserIdPresentationsInfoGet.g.cs | 63 +- ...eUsersInfoApiV3EnterpriseUsersInfoGet.g.cs | 69 +- ...editAddsApiV3EnterpriseCreditsAddsGet.g.cs | 81 +- ...ationsApiV3EnterprisePresentationsGet.g.cs | 86 +- ...3EnterpriseUsersUserIdAccessTokensGet.g.cs | 63 +- ...EnterpriseUsersUserIdPresentationsGet.g.cs | 84 +- ...nterpriseUsersApiV3EnterpriseUsersGet.g.cs | 86 +- ...nterpriseUsersUserIdResetPasswordPost.g.cs | 58 +- .../Presenton.V3EnterpriseClient.g.cs | 8 +- ...ent.UploadFilesV3ApiV3FilesUploadPost.g.cs | 74 +- .../Generated/Presenton.V3FilesClient.g.cs | 8 +- ...tGithubMetadataApiV3GithubMetadataGet.g.cs | 56 +- .../Generated/Presenton.V3GitHubClient.g.cs | 8 +- ...ploadedImageByIdV3ApiV3ImagesIdDelete.g.cs | 56 +- ...ploadedImagesV3ApiV3ImagesUploadedGet.g.cs | 59 +- ...nt.UploadImageV3ApiV3ImagesUploadPost.g.cs | 980 +++++++++++++- .../Generated/Presenton.V3ImagesClient.g.cs | 8 +- ...iV3PlaygroundPresentationGeneratePost.g.cs | 65 +- .../Presenton.V3PlaygroundClient.g.cs | 8 +- ...cV3ApiV3PresentationFromJsonAsyncPost.g.cs | 69 +- ...onSyncV3ApiV3PresentationFromJsonPost.g.cs | 68 +- ...ptxOrPdfV3ApiV3PresentationExportPost.g.cs | 68 +- ...ApiV3PresentationOutlinesGeneratePost.g.cs | 68 +- ...cV3ApiV3PresentationGenerateAsyncPost.g.cs | 69 +- ...onSyncV3ApiV3PresentationGeneratePost.g.cs | 68 +- ...entationsForUiApiV3PresentationAllGet.g.cs | 77 +- ...UiWithSlidesApiV3PresentationAllUiGet.g.cs | 74 +- .../Presenton.V3PresentationClient.g.cs | 8 +- ...rSchemaApiV3SchemaContentGeneratePost.g.cs | 65 +- .../Generated/Presenton.V3SchemaClient.g.cs | 8 +- ...AllSmartDesignsApiV3SmartDesignAllGet.g.cs | 77 +- .../Presenton.V3SmartDesignClient.g.cs | 8 +- ...dTemplatesApiV3StandardTemplateAllGet.g.cs | 73 +- ...emplateByIdApiV3StandardTemplateIdGet.g.cs | 66 +- ...mpleApiV3StandardTemplateIdExampleGet.g.cs | 66 +- .../Presenton.V3StandardTemplateClient.g.cs | 8 +- ...GenerateThemeV3ApiV3ThemeGeneratePost.g.cs | 65 +- .../Generated/Presenton.V3ThemeClient.g.cs | 8 +- ...hookSubscriptionsV3ApiV3WebhookAllGet.g.cs | 63 +- ...eToWebhookV3ApiV3WebhookSubscribePost.g.cs | 68 +- ...onsV3ApiV3WebhookUnsubscribeAllDelete.g.cs | 53 +- ...ebhookV3ApiV3WebhookUnsubscribeDelete.g.cs | 58 +- .../Generated/Presenton.V3WebhookClient.g.cs | 8 +- ...eToWebhookV1ApiV1WebhookSubscribePost.g.cs | 68 +- ...ebhookV1ApiV1WebhookUnsubscribeDelete.g.cs | 58 +- .../Generated/Presenton.WebhookClient.g.cs | 8 +- 471 files changed, 32555 insertions(+), 1860 deletions(-) create mode 100644 src/libs/Presenton/Generated/Presenton.AutoSDKHttpResponse.g.cs diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.AuthJwtLoginApiV1AuthJwtLoginPost.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.AuthJwtLoginApiV1AuthJwtLoginPost.g.cs index ecaa2d0..a6f7811 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.AuthJwtLoginApiV1AuthJwtLoginPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.AuthJwtLoginApiV1AuthJwtLoginPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( /// public async global::System.Threading.Tasks.Task AuthJwtLoginApiV1AuthJwtLoginPostAsync( + global::Presenton.BodyAuthJwtLoginApiV1AuthJwtLoginPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AuthJwtLoginApiV1AuthJwtLoginPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Auth:Jwt.Login + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> AuthJwtLoginApiV1AuthJwtLoginPostAsResponseAsync( + global::Presenton.BodyAuthJwtLoginApiV1AuthJwtLoginPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/jwt/login", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request @@ -392,9 +433,13 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.BearerResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.BearerResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -422,9 +467,13 @@ partial void ProcessAuthJwtLoginApiV1AuthJwtLoginPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.BearerResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.BearerResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.AuthJwtLogoutApiV1AuthJwtLogoutPost.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.AuthJwtLogoutApiV1AuthJwtLogoutPost.g.cs index 401eb77..2113532 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.AuthJwtLogoutApiV1AuthJwtLogoutPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.AuthJwtLogoutApiV1AuthJwtLogoutPost.g.cs @@ -48,6 +48,23 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( public async global::System.Threading.Tasks.Task AuthJwtLogoutApiV1AuthJwtLogoutPostAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AuthJwtLogoutApiV1AuthJwtLogoutPostAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Auth:Jwt.Logout + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> AuthJwtLogoutApiV1AuthJwtLogoutPostAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/jwt/logout", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -334,7 +370,11 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -362,7 +402,11 @@ partial void ProcessAuthJwtLogoutApiV1AuthJwtLogoutPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.AuthorizeApiV1AuthGoogleAuthorizeGet.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.AuthorizeApiV1AuthGoogleAuthorizeGet.g.cs index f44f8fe..37f51c2 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.AuthorizeApiV1AuthGoogleAuthorizeGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.AuthorizeApiV1AuthGoogleAuthorizeGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( global::System.Collections.Generic.IList? scopes = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AuthorizeApiV1AuthGoogleAuthorizeGetAsResponseAsync( + scopes: scopes, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Authorize + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> AuthorizeApiV1AuthGoogleAuthorizeGetAsResponseAsync( + global::System.Collections.Generic.IList? scopes = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,11 +101,12 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/google/authorize", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("scopes", scopes, delimiter: ",", explode: true) + .AddOptionalParameter("scopes", scopes, delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -157,6 +178,8 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -167,6 +190,11 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -184,6 +212,8 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -193,8 +223,7 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -203,6 +232,11 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -219,14 +253,15 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -266,6 +301,8 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -286,6 +323,8 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -348,9 +387,13 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.OAuth2AuthorizeResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.OAuth2AuthorizeResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -378,9 +421,13 @@ partial void ProcessAuthorizeApiV1AuthGoogleAuthorizeGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.OAuth2AuthorizeResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.OAuth2AuthorizeResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.CallbackApiV1AuthGoogleCallbackGet.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.CallbackApiV1AuthGoogleCallbackGet.g.cs index 467bf57..e7b0ff1 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.CallbackApiV1AuthGoogleCallbackGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.CallbackApiV1AuthGoogleCallbackGet.g.cs @@ -61,6 +61,33 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( string? error = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallbackApiV1AuthGoogleCallbackGetAsResponseAsync( + code: code, + state: state, + error: error, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Callback
+ /// The response varies based on the authentication backend used. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CallbackApiV1AuthGoogleCallbackGetAsResponseAsync( + string? code = default, + string? state = default, + string? error = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -92,13 +119,14 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/google/callback", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("code", code) .AddOptionalParameter("state", state) - .AddOptionalParameter("error", error) + .AddOptionalParameter("error", error) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -172,6 +200,8 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -182,6 +212,11 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -199,6 +234,8 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -208,8 +245,7 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -218,6 +254,11 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -234,14 +275,15 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -281,6 +323,8 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -301,6 +345,8 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request @@ -401,7 +447,11 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -429,7 +479,11 @@ partial void ProcessCallbackApiV1AuthGoogleCallbackGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.CreateTokenApiV1AuthTokenCreatePost.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.CreateTokenApiV1AuthTokenCreatePost.g.cs index 1d2b02b..5564fb0 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.CreateTokenApiV1AuthTokenCreatePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.CreateTokenApiV1AuthTokenCreatePost.g.cs @@ -48,6 +48,23 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( public async global::System.Threading.Tasks.Task CreateTokenApiV1AuthTokenCreatePostAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateTokenApiV1AuthTokenCreatePostAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Token + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateTokenApiV1AuthTokenCreatePostAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/token/create", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AccessToken.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AccessToken.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessCreateTokenApiV1AuthTokenCreatePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.AccessToken.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AccessToken.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.DeleteUserProfileApiV1AuthProfileDeleteDelete.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.DeleteUserProfileApiV1AuthProfileDeleteDelete.g.cs index d66c612..599aa78 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.DeleteUserProfileApiV1AuthProfileDeleteDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.DeleteUserProfileApiV1AuthProfileDeleteDelete.g.cs @@ -43,6 +43,21 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( public async global::System.Threading.Tasks.Task DeleteUserProfileApiV1AuthProfileDeleteDeleteAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteUserProfileApiV1AuthProfileDeleteDeleteAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete User Profile + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteUserProfileApiV1AuthProfileDeleteDeleteAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -71,6 +86,7 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/profile/delete", baseUri: HttpClient.BaseAddress); @@ -143,6 +159,8 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -153,6 +171,11 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -170,6 +193,8 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -179,8 +204,7 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -189,6 +213,11 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -205,14 +234,15 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -252,6 +282,8 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -272,6 +304,8 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -292,6 +326,10 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -313,6 +351,10 @@ partial void ProcessDeleteUserProfileApiV1AuthProfileDeleteDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.EnterpriseLoginApiV1AuthEnterpriseLoginGet.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.EnterpriseLoginApiV1AuthEnterpriseLoginGet.g.cs index a4c5e0c..5739fdc 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.EnterpriseLoginApiV1AuthEnterpriseLoginGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.EnterpriseLoginApiV1AuthEnterpriseLoginGet.g.cs @@ -62,6 +62,34 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( string? lastName = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EnterpriseLoginApiV1AuthEnterpriseLoginGetAsResponseAsync( + email: email, + firstName: firstName, + lastName: lastName, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Enterprise Login + /// + /// + /// Work email (must be @exlservice.com) + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EnterpriseLoginApiV1AuthEnterpriseLoginGetAsResponseAsync( + string email, + string? firstName = default, + string? lastName = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -93,13 +121,14 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/enterprise-login", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("email", email) .AddOptionalParameter("first_name", firstName) - .AddOptionalParameter("last_name", lastName) + .AddOptionalParameter("last_name", lastName) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -173,6 +202,8 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -183,6 +214,11 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -200,6 +236,8 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -209,8 +247,7 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -219,6 +256,11 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -235,14 +277,15 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -282,6 +325,8 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -302,6 +347,8 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -364,9 +411,13 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterpriseLoginResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterpriseLoginResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -394,9 +445,13 @@ partial void ProcessEnterpriseLoginApiV1AuthEnterpriseLoginGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterpriseLoginResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterpriseLoginResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.GetMeApiV1AuthProfileGet.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.GetMeApiV1AuthProfileGet.g.cs index 347c5ee..345134b 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.GetMeApiV1AuthProfileGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.GetMeApiV1AuthProfileGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( public async global::System.Threading.Tasks.Task GetMeApiV1AuthProfileGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetMeApiV1AuthProfileGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Me + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetMeApiV1AuthProfileGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/profile", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -339,9 +375,13 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.GetMeResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.GetMeResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -369,9 +409,13 @@ partial void ProcessGetMeApiV1AuthProfileGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.GetMeResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.GetMeResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.ListTokensApiV1AuthTokenListGet.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.ListTokensApiV1AuthTokenListGet.g.cs index 507b23e..44a45cf 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.ListTokensApiV1AuthTokenListGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.ListTokensApiV1AuthTokenListGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( public async global::System.Threading.Tasks.Task> ListTokensApiV1AuthTokenListGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListTokensApiV1AuthTokenListGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Tokens + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListTokensApiV1AuthTokenListGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/token/list", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessListTokensApiV1AuthTokenListGetResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.PatchMeApiV1AuthProfileUpdatePatch.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.PatchMeApiV1AuthProfileUpdatePatch.g.cs index 5cf71d8..ea813dc 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.PatchMeApiV1AuthProfileUpdatePatch.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.PatchMeApiV1AuthProfileUpdatePatch.g.cs @@ -50,6 +50,28 @@ partial void ProcessPatchMeApiV1AuthProfileUpdatePatchResponseContent( /// public async global::System.Threading.Tasks.Task PatchMeApiV1AuthProfileUpdatePatchAsync( + global::Presenton.BodyPatchMeApiV1AuthProfileUpdatePatch request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PatchMeApiV1AuthProfileUpdatePatchAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Patch Me + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> PatchMeApiV1AuthProfileUpdatePatchAsResponseAsync( + global::Presenton.BodyPatchMeApiV1AuthProfileUpdatePatch request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessPatchMeApiV1AuthProfileUpdatePatchResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/profile/update", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessPatchMeApiV1AuthProfileUpdatePatchResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); if (request.ProfilePicture != default) { @@ -157,15 +181,19 @@ request.ProfilePicturename is null { __contentProfilePicture.Headers.ContentDisposition.FileNameStar = null; } - } + + } if (request.Name != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty), name: "\"name\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -207,6 +235,8 @@ request.ProfilePicturename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -217,6 +247,11 @@ request.ProfilePicturename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -234,6 +269,8 @@ request.ProfilePicturename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -243,8 +280,7 @@ request.ProfilePicturename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -253,6 +289,11 @@ request.ProfilePicturename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -269,14 +310,15 @@ request.ProfilePicturename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -316,6 +358,8 @@ request.ProfilePicturename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -336,6 +380,8 @@ request.ProfilePicturename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -398,7 +444,11 @@ request.ProfilePicturename is null { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -426,7 +476,11 @@ request.ProfilePicturename is null #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -492,5 +546,928 @@ request.ProfilePicturename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Patch Me + /// + /// + /// The stream to send as the multipart 'profile_picture' file part. + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task PatchMeApiV1AuthProfileUpdatePatchAsync( + global::System.IO.Stream? profilePicture = default, + string? profilePicturename = default, + string? name = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + var request = new global::Presenton.BodyPatchMeApiV1AuthProfileUpdatePatch + { + ProfilePicture = global::System.Array.Empty(), + ProfilePicturename = profilePicturename, + Name = name, + }; + PrepareArguments( + client: HttpClient); + PreparePatchMeApiV1AuthProfileUpdatePatchArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_PatchMeApiV1AuthProfileUpdatePatchSecurityRequirements, + operationName: "PatchMeApiV1AuthProfileUpdatePatchAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/auth/profile/update", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + if (profilePicture != default) + { + + var __contentProfilePicture = new global::System.Net.Http.StreamContent(profilePicture); + __contentProfilePicture.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.ProfilePicturename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.ProfilePicturename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentProfilePicture, + name: "\"profile_picture\"", + fileName: request.ProfilePicturename != null ? $"\"{request.ProfilePicturename}\"" : string.Empty); + if (__contentProfilePicture.Headers.ContentDisposition != null) + { + __contentProfilePicture.Headers.ContentDisposition.FileNameStar = null; + } + + } + if (request.Name != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty), + name: "\"name\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PreparePatchMeApiV1AuthProfileUpdatePatchRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchMeApiV1AuthProfileUpdatePatch", + methodName: "PatchMeApiV1AuthProfileUpdatePatchAsync", + pathTemplate: "\"/api/v1/auth/profile/update\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchMeApiV1AuthProfileUpdatePatch", + methodName: "PatchMeApiV1AuthProfileUpdatePatchAsync", + pathTemplate: "\"/api/v1/auth/profile/update\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchMeApiV1AuthProfileUpdatePatch", + methodName: "PatchMeApiV1AuthProfileUpdatePatchAsync", + pathTemplate: "\"/api/v1/auth/profile/update\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessPatchMeApiV1AuthProfileUpdatePatchResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchMeApiV1AuthProfileUpdatePatch", + methodName: "PatchMeApiV1AuthProfileUpdatePatchAsync", + pathTemplate: "\"/api/v1/auth/profile/update\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchMeApiV1AuthProfileUpdatePatch", + methodName: "PatchMeApiV1AuthProfileUpdatePatchAsync", + pathTemplate: "\"/api/v1/auth/profile/update\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessPatchMeApiV1AuthProfileUpdatePatchResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return __content; + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return __content; + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Patch Me + /// + /// + /// The stream to send as the multipart 'profile_picture' file part. + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> PatchMeApiV1AuthProfileUpdatePatchAsResponseAsync( + global::System.IO.Stream? profilePicture = default, + string? profilePicturename = default, + string? name = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + var request = new global::Presenton.BodyPatchMeApiV1AuthProfileUpdatePatch + { + ProfilePicture = global::System.Array.Empty(), + ProfilePicturename = profilePicturename, + Name = name, + }; + PrepareArguments( + client: HttpClient); + PreparePatchMeApiV1AuthProfileUpdatePatchArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_PatchMeApiV1AuthProfileUpdatePatchSecurityRequirements, + operationName: "PatchMeApiV1AuthProfileUpdatePatchAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/auth/profile/update", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + if (profilePicture != default) + { + + var __contentProfilePicture = new global::System.Net.Http.StreamContent(profilePicture); + __contentProfilePicture.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.ProfilePicturename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.ProfilePicturename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentProfilePicture, + name: "\"profile_picture\"", + fileName: request.ProfilePicturename != null ? $"\"{request.ProfilePicturename}\"" : string.Empty); + if (__contentProfilePicture.Headers.ContentDisposition != null) + { + __contentProfilePicture.Headers.ContentDisposition.FileNameStar = null; + } + + } + if (request.Name != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Name ?? string.Empty), + name: "\"name\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PreparePatchMeApiV1AuthProfileUpdatePatchRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchMeApiV1AuthProfileUpdatePatch", + methodName: "PatchMeApiV1AuthProfileUpdatePatchAsync", + pathTemplate: "\"/api/v1/auth/profile/update\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchMeApiV1AuthProfileUpdatePatch", + methodName: "PatchMeApiV1AuthProfileUpdatePatchAsync", + pathTemplate: "\"/api/v1/auth/profile/update\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchMeApiV1AuthProfileUpdatePatch", + methodName: "PatchMeApiV1AuthProfileUpdatePatchAsync", + pathTemplate: "\"/api/v1/auth/profile/update\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessPatchMeApiV1AuthProfileUpdatePatchResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchMeApiV1AuthProfileUpdatePatch", + methodName: "PatchMeApiV1AuthProfileUpdatePatchAsync", + pathTemplate: "\"/api/v1/auth/profile/update\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "PatchMeApiV1AuthProfileUpdatePatch", + methodName: "PatchMeApiV1AuthProfileUpdatePatchAsync", + pathTemplate: "\"/api/v1/auth/profile/update\"", + httpMethod: "PATCH", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessPatchMeApiV1AuthProfileUpdatePatchResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.RegisterRegisterApiV1AuthRegisterPost.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.RegisterRegisterApiV1AuthRegisterPost.g.cs index 52756de..d073fe2 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.RegisterRegisterApiV1AuthRegisterPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.RegisterRegisterApiV1AuthRegisterPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( /// public async global::System.Threading.Tasks.Task RegisterRegisterApiV1AuthRegisterPostAsync( + global::Presenton.UserCreate request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RegisterRegisterApiV1AuthRegisterPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Register:Register + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> RegisterRegisterApiV1AuthRegisterPostAsResponseAsync( + global::Presenton.UserCreate request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/register", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request @@ -392,9 +433,13 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -422,9 +467,13 @@ partial void ProcessRegisterRegisterApiV1AuthRegisterPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.ResetForgotPasswordApiV1AuthForgotPasswordPost.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.ResetForgotPasswordApiV1AuthForgotPasswordPost.g.cs index beb7c07..f64d34f 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.ResetForgotPasswordApiV1AuthForgotPasswordPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.ResetForgotPasswordApiV1AuthForgotPasswordPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten /// public async global::System.Threading.Tasks.Task ResetForgotPasswordApiV1AuthForgotPasswordPostAsync( + global::Presenton.BodyResetForgotPasswordApiV1AuthForgotPasswordPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ResetForgotPasswordApiV1AuthForgotPasswordPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Reset:Forgot Password + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ResetForgotPasswordApiV1AuthForgotPasswordPostAsResponseAsync( + global::Presenton.BodyResetForgotPasswordApiV1AuthForgotPasswordPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/forgot-password", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,7 +395,11 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -382,7 +427,11 @@ partial void ProcessResetForgotPasswordApiV1AuthForgotPasswordPostResponseConten #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.ResetResetPasswordApiV1AuthResetPasswordPost.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.ResetResetPasswordApiV1AuthResetPasswordPost.g.cs index 5ec87d0..7ca3539 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.ResetResetPasswordApiV1AuthResetPasswordPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.ResetResetPasswordApiV1AuthResetPasswordPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( /// public async global::System.Threading.Tasks.Task ResetResetPasswordApiV1AuthResetPasswordPostAsync( + global::Presenton.BodyResetResetPasswordApiV1AuthResetPasswordPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ResetResetPasswordApiV1AuthResetPasswordPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Reset:Reset Password + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ResetResetPasswordApiV1AuthResetPasswordPostAsResponseAsync( + global::Presenton.BodyResetResetPasswordApiV1AuthResetPasswordPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/reset-password", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request @@ -392,7 +433,11 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -420,7 +465,11 @@ partial void ProcessResetResetPasswordApiV1AuthResetPasswordPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.RevokeTokenApiV1AuthTokenRevokePost.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.RevokeTokenApiV1AuthTokenRevokePost.g.cs index 1feb65e..8727b3a 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.RevokeTokenApiV1AuthTokenRevokePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.RevokeTokenApiV1AuthTokenRevokePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( /// public async global::System.Threading.Tasks.Task RevokeTokenApiV1AuthTokenRevokePostAsync( + global::Presenton.BodyRevokeTokenApiV1AuthTokenRevokePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RevokeTokenApiV1AuthTokenRevokePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Revoke Token + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> RevokeTokenApiV1AuthTokenRevokePostAsResponseAsync( + global::Presenton.BodyRevokeTokenApiV1AuthTokenRevokePost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/token/revoke", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,7 +395,11 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -382,7 +427,11 @@ partial void ProcessRevokeTokenApiV1AuthTokenRevokePostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.UsersCurrentUserApiV1AuthUsersMeGet.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.UsersCurrentUserApiV1AuthUsersMeGet.g.cs index 4089f80..ca3e824 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.UsersCurrentUserApiV1AuthUsersMeGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.UsersCurrentUserApiV1AuthUsersMeGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( public async global::System.Threading.Tasks.Task UsersCurrentUserApiV1AuthUsersMeGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UsersCurrentUserApiV1AuthUsersMeGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Users:Current User + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UsersCurrentUserApiV1AuthUsersMeGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/users/me", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -334,9 +370,13 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -364,9 +404,13 @@ partial void ProcessUsersCurrentUserApiV1AuthUsersMeGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.UsersDeleteUserApiV1AuthUsersIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.UsersDeleteUserApiV1AuthUsersIdDelete.g.cs index 9e8811d..7921264 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.UsersDeleteUserApiV1AuthUsersIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.UsersDeleteUserApiV1AuthUsersIdDelete.g.cs @@ -47,6 +47,24 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await UsersDeleteUserApiV1AuthUsersIdDeleteAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Users:Delete User + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UsersDeleteUserApiV1AuthUsersIdDeleteAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/auth/users/{id}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -435,6 +472,10 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -456,6 +497,10 @@ partial void ProcessUsersDeleteUserApiV1AuthUsersIdDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.UsersPatchCurrentUserApiV1AuthUsersMePatch.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.UsersPatchCurrentUserApiV1AuthUsersMePatch.g.cs index 4ec18d1..0d152cd 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.UsersPatchCurrentUserApiV1AuthUsersMePatch.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.UsersPatchCurrentUserApiV1AuthUsersMePatch.g.cs @@ -50,6 +50,28 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( /// public async global::System.Threading.Tasks.Task UsersPatchCurrentUserApiV1AuthUsersMePatchAsync( + global::Presenton.UserUpdate request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UsersPatchCurrentUserApiV1AuthUsersMePatchAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Users:Patch Current User + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UsersPatchCurrentUserApiV1AuthUsersMePatchAsResponseAsync( + global::Presenton.UserUpdate request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/users/me", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request @@ -425,9 +466,13 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -455,9 +500,13 @@ partial void ProcessUsersPatchCurrentUserApiV1AuthUsersMePatchResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.UsersPatchUserApiV1AuthUsersIdPatch.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.UsersPatchUserApiV1AuthUsersIdPatch.g.cs index 04627b2..787911f 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.UsersPatchUserApiV1AuthUsersIdPatch.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.UsersPatchUserApiV1AuthUsersIdPatch.g.cs @@ -54,6 +54,31 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( public async global::System.Threading.Tasks.Task UsersPatchUserApiV1AuthUsersIdPatchAsync( string id, + global::Presenton.UserUpdate request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UsersPatchUserApiV1AuthUsersIdPatchAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Users:Patch User + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UsersPatchUserApiV1AuthUsersIdPatchAsResponseAsync( + string id, + global::Presenton.UserUpdate request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/auth/users/{id}", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request @@ -497,9 +541,13 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -527,9 +575,13 @@ partial void ProcessUsersPatchUserApiV1AuthUsersIdPatchResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.UsersUserApiV1AuthUsersIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.UsersUserApiV1AuthUsersIdGet.g.cs index e2b3ca8..5136a37 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.UsersUserApiV1AuthUsersIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.UsersUserApiV1AuthUsersIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UsersUserApiV1AuthUsersIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Users:User + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UsersUserApiV1AuthUsersIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/auth/users/{id}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // @@ -444,9 +483,13 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -474,9 +517,13 @@ partial void ProcessUsersUserApiV1AuthUsersIdGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.VerifyRequestTokenApiV1AuthRequestVerifyTokenPost.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.VerifyRequestTokenApiV1AuthRequestVerifyTokenPost.g.cs index fad4048..e65c7c2 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.VerifyRequestTokenApiV1AuthRequestVerifyTokenPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.VerifyRequestTokenApiV1AuthRequestVerifyTokenPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon /// public async global::System.Threading.Tasks.Task VerifyRequestTokenApiV1AuthRequestVerifyTokenPostAsync( + global::Presenton.BodyVerifyRequestTokenApiV1AuthRequestVerifyTokenPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await VerifyRequestTokenApiV1AuthRequestVerifyTokenPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Verify:Request-Token + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> VerifyRequestTokenApiV1AuthRequestVerifyTokenPostAsResponseAsync( + global::Presenton.BodyVerifyRequestTokenApiV1AuthRequestVerifyTokenPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/request-verify-token", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,7 +395,11 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -382,7 +427,11 @@ partial void ProcessVerifyRequestTokenApiV1AuthRequestVerifyTokenPostResponseCon #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.VerifyVerifyApiV1AuthVerifyPost.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.VerifyVerifyApiV1AuthVerifyPost.g.cs index a6878d8..09673ec 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.VerifyVerifyApiV1AuthVerifyPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.VerifyVerifyApiV1AuthVerifyPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( /// public async global::System.Threading.Tasks.Task VerifyVerifyApiV1AuthVerifyPostAsync( + global::Presenton.BodyVerifyVerifyApiV1AuthVerifyPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await VerifyVerifyApiV1AuthVerifyPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Verify:Verify + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> VerifyVerifyApiV1AuthVerifyPostAsResponseAsync( + global::Presenton.BodyVerifyVerifyApiV1AuthVerifyPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/auth/verify", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Bad Request @@ -392,9 +433,13 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -422,9 +467,13 @@ partial void ProcessVerifyVerifyApiV1AuthVerifyPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.AuthClient.g.cs b/src/libs/Presenton/Generated/Presenton.AuthClient.g.cs index ab38c05..1ab0379 100644 --- a/src/libs/Presenton/Generated/Presenton.AuthClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.AuthClient.g.cs @@ -72,10 +72,10 @@ public AuthClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public AuthClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.AutoSDKHttpResponse.g.cs b/src/libs/Presenton/Generated/Presenton.AutoSDKHttpResponse.g.cs new file mode 100644 index 0000000..97a2688 --- /dev/null +++ b/src/libs/Presenton/Generated/Presenton.AutoSDKHttpResponse.g.cs @@ -0,0 +1,121 @@ + +#nullable enable + +namespace Presenton +{ + /// + /// Represents a successful HTTP response with status code and headers. + /// + public partial class AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri) + { + StatusCode = statusCode; + Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers)); + RequestUri = requestUri; + } + + /// + /// Gets the HTTP status code. + /// + public global::System.Net.HttpStatusCode StatusCode { get; } + /// + /// Gets the response headers. + /// + public global::System.Collections.Generic.Dictionary> Headers { get; } + /// + /// Gets the final request URI associated with the response. + /// + public global::System.Uri? RequestUri { get; } + + internal static global::System.Collections.Generic.Dictionary> CreateHeaders( + global::System.Net.Http.HttpResponseMessage response) + { + response = response ?? throw new global::System.ArgumentNullException(nameof(response)); + + var headers = global::System.Linq.Enumerable.ToDictionary( + response.Headers, + static header => header.Key, + static header => (global::System.Collections.Generic.IEnumerable)global::System.Linq.Enumerable.ToArray(header.Value), + global::System.StringComparer.OrdinalIgnoreCase); + + if (response.Content?.Headers == null) + { + return headers; + } + + foreach (var header in response.Content.Headers) + { + if (headers.TryGetValue(header.Key, out var existingValues)) + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray( + global::System.Linq.Enumerable.Concat(existingValues, header.Value)); + } + else + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value); + } + } + + return headers; + } + } + + /// + /// Represents a successful HTTP response with status code, headers, and body. + /// + public partial class AutoSDKHttpResponse : AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + T body) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null, + body: body) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri, + T body) + : base(statusCode, headers, requestUri) + { + Body = body; + } + + /// + /// Gets the response body. + /// + public T Body { get; } + } +} \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.BillingClient.CreateCheckoutSessionApiV1BillingCheckoutSessionPost.g.cs b/src/libs/Presenton/Generated/Presenton.BillingClient.CreateCheckoutSessionApiV1BillingCheckoutSessionPost.g.cs index f8e1a5c..51f175f 100644 --- a/src/libs/Presenton/Generated/Presenton.BillingClient.CreateCheckoutSessionApiV1BillingCheckoutSessionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.BillingClient.CreateCheckoutSessionApiV1BillingCheckoutSessionPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse /// public async global::System.Threading.Tasks.Task CreateCheckoutSessionApiV1BillingCheckoutSessionPostAsync( + global::Presenton.CreateCheckoutSessionRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateCheckoutSessionApiV1BillingCheckoutSessionPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Checkout Session + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateCheckoutSessionApiV1BillingCheckoutSessionPostAsResponseAsync( + global::Presenton.CreateCheckoutSessionRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/billing/checkout/session", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse { __response.EnsureSuccessStatusCode(); - return - global::Presenton.CreateCheckoutSessionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.CreateCheckoutSessionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCreateCheckoutSessionApiV1BillingCheckoutSessionPostResponse #endif ).ConfigureAwait(false); - return - await global::Presenton.CreateCheckoutSessionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.CreateCheckoutSessionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.BillingClient.CreatePortalSessionApiV1BillingPortalSessionPost.g.cs b/src/libs/Presenton/Generated/Presenton.BillingClient.CreatePortalSessionApiV1BillingPortalSessionPost.g.cs index 44e3039..77df178 100644 --- a/src/libs/Presenton/Generated/Presenton.BillingClient.CreatePortalSessionApiV1BillingPortalSessionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.BillingClient.CreatePortalSessionApiV1BillingPortalSessionPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont /// public async global::System.Threading.Tasks.Task CreatePortalSessionApiV1BillingPortalSessionPostAsync( + global::Presenton.BodyCreatePortalSessionApiV1BillingPortalSessionPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreatePortalSessionApiV1BillingPortalSessionPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Portal Session + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreatePortalSessionApiV1BillingPortalSessionPostAsResponseAsync( + global::Presenton.BodyCreatePortalSessionApiV1BillingPortalSessionPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/billing/portal/session", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont { __response.EnsureSuccessStatusCode(); - return - global::Presenton.CreatePortalSessionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.CreatePortalSessionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCreatePortalSessionApiV1BillingPortalSessionPostResponseCont #endif ).ConfigureAwait(false); - return - await global::Presenton.CreatePortalSessionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.CreatePortalSessionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.BillingClient.GetSubscriptionStatusApiV1BillingSubscriptionGet.g.cs b/src/libs/Presenton/Generated/Presenton.BillingClient.GetSubscriptionStatusApiV1BillingSubscriptionGet.g.cs index 90e9824..0418052 100644 --- a/src/libs/Presenton/Generated/Presenton.BillingClient.GetSubscriptionStatusApiV1BillingSubscriptionGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.BillingClient.GetSubscriptionStatusApiV1BillingSubscriptionGet.g.cs @@ -54,6 +54,28 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont bool? refresh = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSubscriptionStatusApiV1BillingSubscriptionGetAsResponseAsync( + refresh: refresh, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Subscription Status + /// + /// + /// Default Value: false + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetSubscriptionStatusApiV1BillingSubscriptionGetAsResponseAsync( + bool? refresh = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -83,11 +105,12 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/billing/subscription", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("refresh", refresh?.ToString().ToLowerInvariant()) + .AddOptionalParameter("refresh", refresh?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -159,6 +182,8 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +194,11 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +216,8 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +227,7 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +236,11 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +257,15 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +305,8 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +327,8 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -350,9 +391,13 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont { __response.EnsureSuccessStatusCode(); - return - global::Presenton.Subscription.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.Subscription.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -380,9 +425,13 @@ partial void ProcessGetSubscriptionStatusApiV1BillingSubscriptionGetResponseCont #endif ).ConfigureAwait(false); - return - await global::Presenton.Subscription.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.Subscription.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.BillingClient.ListPricesApiV1BillingPricesGet.g.cs b/src/libs/Presenton/Generated/Presenton.BillingClient.ListPricesApiV1BillingPricesGet.g.cs index a8afc58..7bbf087 100644 --- a/src/libs/Presenton/Generated/Presenton.BillingClient.ListPricesApiV1BillingPricesGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.BillingClient.ListPricesApiV1BillingPricesGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( public async global::System.Threading.Tasks.Task> ListPricesApiV1BillingPricesGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListPricesApiV1BillingPricesGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Prices + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListPricesApiV1BillingPricesGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/billing/prices", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessListPricesApiV1BillingPricesGetResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.BillingClient.ModifySubscriptionApiV1BillingSubscriptionModifyPost.g.cs b/src/libs/Presenton/Generated/Presenton.BillingClient.ModifySubscriptionApiV1BillingSubscriptionModifyPost.g.cs index c3a6c56..a3f7f4e 100644 --- a/src/libs/Presenton/Generated/Presenton.BillingClient.ModifySubscriptionApiV1BillingSubscriptionModifyPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.BillingClient.ModifySubscriptionApiV1BillingSubscriptionModifyPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse /// public async global::System.Threading.Tasks.Task ModifySubscriptionApiV1BillingSubscriptionModifyPostAsync( + global::Presenton.BodyModifySubscriptionApiV1BillingSubscriptionModifyPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ModifySubscriptionApiV1BillingSubscriptionModifyPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Modify Subscription + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ModifySubscriptionApiV1BillingSubscriptionModifyPostAsResponseAsync( + global::Presenton.BodyModifySubscriptionApiV1BillingSubscriptionModifyPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/billing/subscription/modify", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse { __response.EnsureSuccessStatusCode(); - return - global::Presenton.ModifySubscriptionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.ModifySubscriptionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessModifySubscriptionApiV1BillingSubscriptionModifyPostResponse #endif ).ConfigureAwait(false); - return - await global::Presenton.ModifySubscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.ModifySubscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.BillingClient.PurchaseCreditsApiV1BillingCreditsPurchasePost.g.cs b/src/libs/Presenton/Generated/Presenton.BillingClient.PurchaseCreditsApiV1BillingCreditsPurchasePost.g.cs index 88d8f9c..3cfcda6 100644 --- a/src/libs/Presenton/Generated/Presenton.BillingClient.PurchaseCreditsApiV1BillingCreditsPurchasePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.BillingClient.PurchaseCreditsApiV1BillingCreditsPurchasePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten /// public async global::System.Threading.Tasks.Task PurchaseCreditsApiV1BillingCreditsPurchasePostAsync( + global::Presenton.PurchaseCreditsRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PurchaseCreditsApiV1BillingCreditsPurchasePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Purchase Credits + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> PurchaseCreditsApiV1BillingCreditsPurchasePostAsResponseAsync( + global::Presenton.PurchaseCreditsRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/billing/credits/purchase", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Presenton.CreateCheckoutSessionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.CreateCheckoutSessionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessPurchaseCreditsApiV1BillingCreditsPurchasePostResponseConten #endif ).ConfigureAwait(false); - return - await global::Presenton.CreateCheckoutSessionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.CreateCheckoutSessionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.BillingClient.ReactivateSubscriptionApiV1BillingSubscriptionReactivatePost.g.cs b/src/libs/Presenton/Generated/Presenton.BillingClient.ReactivateSubscriptionApiV1BillingSubscriptionReactivatePost.g.cs index f932859..7641ef7 100644 --- a/src/libs/Presenton/Generated/Presenton.BillingClient.ReactivateSubscriptionApiV1BillingSubscriptionReactivatePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.BillingClient.ReactivateSubscriptionApiV1BillingSubscriptionReactivatePost.g.cs @@ -48,6 +48,23 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost public async global::System.Threading.Tasks.Task ReactivateSubscriptionApiV1BillingSubscriptionReactivatePostAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ReactivateSubscriptionApiV1BillingSubscriptionReactivatePostAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Reactivate Subscription + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ReactivateSubscriptionApiV1BillingSubscriptionReactivatePostAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/billing/subscription/reactivate", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost { __response.EnsureSuccessStatusCode(); - return - global::Presenton.ReactivateSubscriptionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.ReactivateSubscriptionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessReactivateSubscriptionApiV1BillingSubscriptionReactivatePost #endif ).ConfigureAwait(false); - return - await global::Presenton.ReactivateSubscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.ReactivateSubscriptionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.BillingClient.StripeWebhookApiV1BillingWebhookPost.g.cs b/src/libs/Presenton/Generated/Presenton.BillingClient.StripeWebhookApiV1BillingWebhookPost.g.cs index 8e06b99..2ec6e47 100644 --- a/src/libs/Presenton/Generated/Presenton.BillingClient.StripeWebhookApiV1BillingWebhookPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.BillingClient.StripeWebhookApiV1BillingWebhookPost.g.cs @@ -48,6 +48,23 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( public async global::System.Threading.Tasks.Task StripeWebhookApiV1BillingWebhookPostAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await StripeWebhookApiV1BillingWebhookPostAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Stripe Webhook + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> StripeWebhookApiV1BillingWebhookPostAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/billing/webhook", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,7 +337,11 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -329,7 +369,11 @@ partial void ProcessStripeWebhookApiV1BillingWebhookPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.BillingClient.g.cs b/src/libs/Presenton/Generated/Presenton.BillingClient.g.cs index 586c5c3..2b2abee 100644 --- a/src/libs/Presenton/Generated/Presenton.BillingClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.BillingClient.g.cs @@ -72,10 +72,10 @@ public BillingClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public BillingClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.CreditClient.GetAddedCreditsApiV1CreditAddedGet.g.cs b/src/libs/Presenton/Generated/Presenton.CreditClient.GetAddedCreditsApiV1CreditAddedGet.g.cs index f41b30c..fe79f5e 100644 --- a/src/libs/Presenton/Generated/Presenton.CreditClient.GetAddedCreditsApiV1CreditAddedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.CreditClient.GetAddedCreditsApiV1CreditAddedGet.g.cs @@ -60,6 +60,33 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAddedCreditsApiV1CreditAddedGetAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Added Credits + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAddedCreditsApiV1CreditAddedGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -90,12 +117,13 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/credit/added", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -168,6 +196,8 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +208,11 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +230,8 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +241,7 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +250,11 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +271,15 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +319,8 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +341,8 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -359,9 +405,13 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -389,9 +439,13 @@ partial void ProcessGetAddedCreditsApiV1CreditAddedGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.CreditClient.GetBalanceApiV1CreditBalanceGet.g.cs b/src/libs/Presenton/Generated/Presenton.CreditClient.GetBalanceApiV1CreditBalanceGet.g.cs index ea078dd..a9910ba 100644 --- a/src/libs/Presenton/Generated/Presenton.CreditClient.GetBalanceApiV1CreditBalanceGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.CreditClient.GetBalanceApiV1CreditBalanceGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( public async global::System.Threading.Tasks.Task GetBalanceApiV1CreditBalanceGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetBalanceApiV1CreditBalanceGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Balance + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetBalanceApiV1CreditBalanceGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/credit/balance", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.CreditAccountWithBalance.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.CreditAccountWithBalance.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessGetBalanceApiV1CreditBalanceGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.CreditAccountWithBalance.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.CreditAccountWithBalance.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.CreditClient.GetCreditAccountApiV1CreditAccountGet.g.cs b/src/libs/Presenton/Generated/Presenton.CreditClient.GetCreditAccountApiV1CreditAccountGet.g.cs index fc3e08c..e11a247 100644 --- a/src/libs/Presenton/Generated/Presenton.CreditClient.GetCreditAccountApiV1CreditAccountGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.CreditClient.GetCreditAccountApiV1CreditAccountGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( public async global::System.Threading.Tasks.Task GetCreditAccountApiV1CreditAccountGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCreditAccountApiV1CreditAccountGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Credit Account + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetCreditAccountApiV1CreditAccountGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/credit/account", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.CreditAccount.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.CreditAccount.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessGetCreditAccountApiV1CreditAccountGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.CreditAccount.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.CreditAccount.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.CreditClient.GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.CreditClient.GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGet.g.cs index 47c039a..e3adce7 100644 --- a/src/libs/Presenton/Generated/Presenton.CreditClient.GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.CreditClient.GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon public async global::System.Threading.Tasks.Task GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Credits Rates And Auto Topup Info + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/credit/info", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -339,9 +375,13 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon { __response.EnsureSuccessStatusCode(); - return - global::Presenton.CreditsRatesAndAutoTopupInfoResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.CreditsRatesAndAutoTopupInfoResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -369,9 +409,13 @@ partial void ProcessGetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetResponseCon #endif ).ConfigureAwait(false); - return - await global::Presenton.CreditsRatesAndAutoTopupInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.CreditsRatesAndAutoTopupInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.CreditClient.GetTransactionsApiV1CreditTransactionsGet.g.cs b/src/libs/Presenton/Generated/Presenton.CreditClient.GetTransactionsApiV1CreditTransactionsGet.g.cs index d573833..8613ae9 100644 --- a/src/libs/Presenton/Generated/Presenton.CreditClient.GetTransactionsApiV1CreditTransactionsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.CreditClient.GetTransactionsApiV1CreditTransactionsGet.g.cs @@ -60,6 +60,33 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTransactionsApiV1CreditTransactionsGetAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Transactions + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetTransactionsApiV1CreditTransactionsGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -90,12 +117,13 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/credit/transactions", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -168,6 +196,8 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +208,11 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +230,8 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +241,7 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +250,11 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +271,15 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +319,8 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +341,8 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -359,9 +405,13 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -389,9 +439,13 @@ partial void ProcessGetTransactionsApiV1CreditTransactionsGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.CreditClient.GetUsedCreditsApiV1CreditAddedIdUsedGet.g.cs b/src/libs/Presenton/Generated/Presenton.CreditClient.GetUsedCreditsApiV1CreditAddedIdUsedGet.g.cs index 409bb8b..7ae5cf0 100644 --- a/src/libs/Presenton/Generated/Presenton.CreditClient.GetUsedCreditsApiV1CreditAddedIdUsedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.CreditClient.GetUsedCreditsApiV1CreditAddedIdUsedGet.g.cs @@ -64,6 +64,36 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetUsedCreditsApiV1CreditAddedIdUsedGetAsResponseAsync( + id: id, + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Used Credits + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetUsedCreditsApiV1CreditAddedIdUsedGetAsResponseAsync( + global::System.Guid id, + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -95,12 +125,13 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/credit/added/{id}/used", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -174,6 +205,8 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -184,6 +217,11 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -201,6 +239,8 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -210,8 +250,7 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -220,6 +259,11 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -236,14 +280,15 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -283,6 +328,8 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -303,6 +350,8 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -365,9 +414,13 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -395,9 +448,13 @@ partial void ProcessGetUsedCreditsApiV1CreditAddedIdUsedGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.CreditClient.SetAutoTopupApiV1CreditAutoTopupPost.g.cs b/src/libs/Presenton/Generated/Presenton.CreditClient.SetAutoTopupApiV1CreditAutoTopupPost.g.cs index aecf7d8..c2cd28b 100644 --- a/src/libs/Presenton/Generated/Presenton.CreditClient.SetAutoTopupApiV1CreditAutoTopupPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.CreditClient.SetAutoTopupApiV1CreditAutoTopupPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( /// public async global::System.Threading.Tasks.Task SetAutoTopupApiV1CreditAutoTopupPostAsync( + global::Presenton.TopupInfo request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetAutoTopupApiV1CreditAutoTopupPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Set Auto Topup + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SetAutoTopupApiV1CreditAutoTopupPostAsResponseAsync( + global::Presenton.TopupInfo request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/credit/auto-topup", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.TopupInfo.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.TopupInfo.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessSetAutoTopupApiV1CreditAutoTopupPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.TopupInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.TopupInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.CreditClient.g.cs b/src/libs/Presenton/Generated/Presenton.CreditClient.g.cs index 3d38030..4f795ec 100644 --- a/src/libs/Presenton/Generated/Presenton.CreditClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.CreditClient.g.cs @@ -72,10 +72,10 @@ public CreditClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public CreditClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.AddCreditsApiV1DebugAddCreditsPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.AddCreditsApiV1DebugAddCreditsPost.g.cs index 7815ef1..ab7470b 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.AddCreditsApiV1DebugAddCreditsPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.AddCreditsApiV1DebugAddCreditsPost.g.cs @@ -45,6 +45,26 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( /// public async global::System.Threading.Tasks.Task AddCreditsApiV1DebugAddCreditsPostAsync( + global::Presenton.BodyAddCreditsApiV1DebugAddCreditsPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await AddCreditsApiV1DebugAddCreditsPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Add Credits + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task AddCreditsApiV1DebugAddCreditsPostAsResponseAsync( + global::Presenton.BodyAddCreditsApiV1DebugAddCreditsPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -79,6 +99,7 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/add-credits", baseUri: HttpClient.BaseAddress); @@ -158,6 +179,8 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +191,11 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +213,8 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +224,7 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +233,11 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +254,15 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +302,8 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +324,8 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,6 +384,10 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -366,6 +409,10 @@ partial void ProcessAddCreditsApiV1DebugAddCreditsPostResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.AddSubscriptionApiV1DebugAddSubscriptionPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.AddSubscriptionApiV1DebugAddSubscriptionPost.g.cs index 3456fb8..34df98e 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.AddSubscriptionApiV1DebugAddSubscriptionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.AddSubscriptionApiV1DebugAddSubscriptionPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( /// public async global::System.Threading.Tasks.Task AddSubscriptionApiV1DebugAddSubscriptionPostAsync( + global::Presenton.BodyAddSubscriptionApiV1DebugAddSubscriptionPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddSubscriptionApiV1DebugAddSubscriptionPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Add Subscription + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> AddSubscriptionApiV1DebugAddSubscriptionPostAsResponseAsync( + global::Presenton.BodyAddSubscriptionApiV1DebugAddSubscriptionPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/add-subscription", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.Subscription.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.Subscription.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessAddSubscriptionApiV1DebugAddSubscriptionPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.Subscription.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.Subscription.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.AddUserApiV1DebugAddUserPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.AddUserApiV1DebugAddUserPost.g.cs index 0bdb128..c6b1511 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.AddUserApiV1DebugAddUserPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.AddUserApiV1DebugAddUserPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( /// public async global::System.Threading.Tasks.Task AddUserApiV1DebugAddUserPostAsync( + global::Presenton.BodyAddUserApiV1DebugAddUserPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddUserApiV1DebugAddUserPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Add User + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> AddUserApiV1DebugAddUserPostAsResponseAsync( + global::Presenton.BodyAddUserApiV1DebugAddUserPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/add-user", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessAddUserApiV1DebugAddUserPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.CheckCreditBalanceApiV1DebugCheckCreditBalancePost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.CheckCreditBalanceApiV1DebugCheckCreditBalancePost.g.cs index fad0e85..1102f10 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.CheckCreditBalanceApiV1DebugCheckCreditBalancePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.CheckCreditBalanceApiV1DebugCheckCreditBalancePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo /// public async global::System.Threading.Tasks.Task CheckCreditBalanceApiV1DebugCheckCreditBalancePostAsync( + global::Presenton.BodyCheckCreditBalanceApiV1DebugCheckCreditBalancePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CheckCreditBalanceApiV1DebugCheckCreditBalancePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Check Credit Balance + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CheckCreditBalanceApiV1DebugCheckCreditBalancePostAsResponseAsync( + global::Presenton.BodyCheckCreditBalanceApiV1DebugCheckCreditBalancePost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/check-credit-balance", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo { __response.EnsureSuccessStatusCode(); - return - global::Presenton.CheckCreditBalanceResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.CheckCreditBalanceResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCheckCreditBalanceApiV1DebugCheckCreditBalancePostResponseCo #endif ).ConfigureAwait(false); - return - await global::Presenton.CheckCreditBalanceResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.CheckCreditBalanceResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.DeleteUserApiV1DebugDeleteUserDelete.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.DeleteUserApiV1DebugDeleteUserDelete.g.cs index 131dc2f..ee187e5 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.DeleteUserApiV1DebugDeleteUserDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.DeleteUserApiV1DebugDeleteUserDelete.g.cs @@ -45,6 +45,26 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( /// public async global::System.Threading.Tasks.Task DeleteUserApiV1DebugDeleteUserDeleteAsync( + global::Presenton.BodyDeleteUserApiV1DebugDeleteUserDelete request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteUserApiV1DebugDeleteUserDeleteAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete User + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteUserApiV1DebugDeleteUserDeleteAsResponseAsync( + global::Presenton.BodyDeleteUserApiV1DebugDeleteUserDelete request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -79,6 +99,7 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/delete-user", baseUri: HttpClient.BaseAddress); @@ -158,6 +179,8 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +191,11 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +213,8 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +224,7 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +233,11 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +254,15 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +302,8 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +324,8 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,6 +384,10 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -366,6 +409,10 @@ partial void ProcessDeleteUserApiV1DebugDeleteUserDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.EndSubscriptionApiV1DebugEndSubscriptionPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.EndSubscriptionApiV1DebugEndSubscriptionPost.g.cs index 3397b90..1123e70 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.EndSubscriptionApiV1DebugEndSubscriptionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.EndSubscriptionApiV1DebugEndSubscriptionPost.g.cs @@ -45,6 +45,26 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( /// public async global::System.Threading.Tasks.Task EndSubscriptionApiV1DebugEndSubscriptionPostAsync( + global::Presenton.BodyEndSubscriptionApiV1DebugEndSubscriptionPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await EndSubscriptionApiV1DebugEndSubscriptionPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// End Subscription + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task EndSubscriptionApiV1DebugEndSubscriptionPostAsResponseAsync( + global::Presenton.BodyEndSubscriptionApiV1DebugEndSubscriptionPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -79,6 +99,7 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/end-subscription", baseUri: HttpClient.BaseAddress); @@ -158,6 +179,8 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +191,11 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +213,8 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +224,7 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +233,11 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +254,15 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +302,8 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +324,8 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,6 +384,10 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -366,6 +409,10 @@ partial void ProcessEndSubscriptionApiV1DebugEndSubscriptionPostResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.GetJwtTokenApiV1DebugGetJwtTokenPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.GetJwtTokenApiV1DebugGetJwtTokenPost.g.cs index 62364d8..7989bd6 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.GetJwtTokenApiV1DebugGetJwtTokenPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.GetJwtTokenApiV1DebugGetJwtTokenPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( /// public async global::System.Threading.Tasks.Task GetJwtTokenApiV1DebugGetJwtTokenPostAsync( + global::Presenton.BodyGetJwtTokenApiV1DebugGetJwtTokenPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetJwtTokenApiV1DebugGetJwtTokenPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Jwt Token + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetJwtTokenApiV1DebugGetJwtTokenPostAsResponseAsync( + global::Presenton.BodyGetJwtTokenApiV1DebugGetJwtTokenPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/get-jwt-token", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.GetJwtTokenResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.GetJwtTokenResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessGetJwtTokenApiV1DebugGetJwtTokenPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.GetJwtTokenResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.GetJwtTokenResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.RaiseExceptionApiV1DebugRaiseExceptionPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.RaiseExceptionApiV1DebugRaiseExceptionPost.g.cs index da68593..7cede7f 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.RaiseExceptionApiV1DebugRaiseExceptionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.RaiseExceptionApiV1DebugRaiseExceptionPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( /// public async global::System.Threading.Tasks.Task RaiseExceptionApiV1DebugRaiseExceptionPostAsync( + global::Presenton.BodyRaiseExceptionApiV1DebugRaiseExceptionPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RaiseExceptionApiV1DebugRaiseExceptionPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Raise Exception + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> RaiseExceptionApiV1DebugRaiseExceptionPostAsResponseAsync( + global::Presenton.BodyRaiseExceptionApiV1DebugRaiseExceptionPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/raise-exception", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,7 +395,11 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -382,7 +427,11 @@ partial void ProcessRaiseExceptionApiV1DebugRaiseExceptionPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPost.g.cs index 0d9795a..5724dae 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPost.g.cs @@ -45,6 +45,26 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse /// public async global::System.Threading.Tasks.Task SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostAsync( + global::Presenton.BodySendLowBalanceEmailApiV1DebugSendLowBalanceEmailPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Send Low Balance Email + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostAsResponseAsync( + global::Presenton.BodySendLowBalanceEmailApiV1DebugSendLowBalanceEmailPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -79,6 +99,7 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/send-low-balance-email", baseUri: HttpClient.BaseAddress); @@ -158,6 +179,8 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +191,11 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +213,8 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +224,7 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +233,11 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +254,15 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +302,8 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +324,8 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,6 +384,10 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -366,6 +409,10 @@ partial void ProcessSendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostResponse try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPost.g.cs index 0ffb5c8..898b221 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPost.g.cs @@ -45,6 +45,26 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe /// public async global::System.Threading.Tasks.Task SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostAsync( + global::Presenton.BodySendPasswordResetEmailApiV1DebugSendPasswordResetEmailPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Send Password Reset Email + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostAsResponseAsync( + global::Presenton.BodySendPasswordResetEmailApiV1DebugSendPasswordResetEmailPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -79,6 +99,7 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/send-password-reset-email", baseUri: HttpClient.BaseAddress); @@ -158,6 +179,8 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +191,11 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +213,8 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +224,7 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +233,11 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +254,15 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +302,8 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +324,8 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,6 +384,10 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -366,6 +409,10 @@ partial void ProcessSendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostRe try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPost.g.cs index 53efbe8..e55e1a7 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPost.g.cs @@ -45,6 +45,26 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe /// public async global::System.Threading.Tasks.Task SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostAsync( + global::Presenton.BodySendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Send Payment Failed Email + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostAsResponseAsync( + global::Presenton.BodySendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -79,6 +99,7 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/send-payment-failed-email", baseUri: HttpClient.BaseAddress); @@ -158,6 +179,8 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +191,11 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +213,8 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +224,7 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +233,11 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +254,15 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +302,8 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +324,8 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,6 +384,10 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -366,6 +409,10 @@ partial void ProcessSendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostRe try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.SendVerificationEmailApiV1DebugSendVerificationEmailPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.SendVerificationEmailApiV1DebugSendVerificationEmailPost.g.cs index 592c032..8328a7d 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.SendVerificationEmailApiV1DebugSendVerificationEmailPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.SendVerificationEmailApiV1DebugSendVerificationEmailPost.g.cs @@ -45,6 +45,26 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp /// public async global::System.Threading.Tasks.Task SendVerificationEmailApiV1DebugSendVerificationEmailPostAsync( + global::Presenton.BodySendVerificationEmailApiV1DebugSendVerificationEmailPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await SendVerificationEmailApiV1DebugSendVerificationEmailPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Send Verification Email + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SendVerificationEmailApiV1DebugSendVerificationEmailPostAsResponseAsync( + global::Presenton.BodySendVerificationEmailApiV1DebugSendVerificationEmailPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -79,6 +99,7 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/send-verification-email", baseUri: HttpClient.BaseAddress); @@ -158,6 +179,8 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +191,11 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +213,8 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +224,7 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +233,11 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +254,15 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +302,8 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +324,8 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,6 +384,10 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -366,6 +409,10 @@ partial void ProcessSendVerificationEmailApiV1DebugSendVerificationEmailPostResp try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.SendWelcomeEmailApiV1DebugSendWelcomeEmailPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.SendWelcomeEmailApiV1DebugSendWelcomeEmailPost.g.cs index 9353fe4..1bce6d3 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.SendWelcomeEmailApiV1DebugSendWelcomeEmailPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.SendWelcomeEmailApiV1DebugSendWelcomeEmailPost.g.cs @@ -45,6 +45,26 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( /// public async global::System.Threading.Tasks.Task SendWelcomeEmailApiV1DebugSendWelcomeEmailPostAsync( + global::Presenton.BodySendWelcomeEmailApiV1DebugSendWelcomeEmailPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await SendWelcomeEmailApiV1DebugSendWelcomeEmailPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Send Welcome Email + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task SendWelcomeEmailApiV1DebugSendWelcomeEmailPostAsResponseAsync( + global::Presenton.BodySendWelcomeEmailApiV1DebugSendWelcomeEmailPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -79,6 +99,7 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/send-welcome-email", baseUri: HttpClient.BaseAddress); @@ -158,6 +179,8 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +191,11 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +213,8 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +224,7 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +233,11 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +254,15 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +302,8 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +324,8 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,6 +384,10 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -366,6 +409,10 @@ partial void ProcessSendWelcomeEmailApiV1DebugSendWelcomeEmailPostResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.TestJobApiV1DebugTestJobPost.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.TestJobApiV1DebugTestJobPost.g.cs index d1811ff..0a87780 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.TestJobApiV1DebugTestJobPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.TestJobApiV1DebugTestJobPost.g.cs @@ -45,6 +45,26 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( /// public async global::System.Threading.Tasks.Task TestJobApiV1DebugTestJobPostAsync( + global::Presenton.BodyTestJobApiV1DebugTestJobPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await TestJobApiV1DebugTestJobPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Test Job + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task TestJobApiV1DebugTestJobPostAsResponseAsync( + global::Presenton.BodyTestJobApiV1DebugTestJobPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -79,6 +99,7 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/debug/test-job", baseUri: HttpClient.BaseAddress); @@ -158,6 +179,8 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +191,11 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +213,8 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +224,7 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +233,11 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +254,15 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +302,8 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +324,8 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,6 +384,10 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -366,6 +409,10 @@ partial void ProcessTestJobApiV1DebugTestJobPostResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DebugClient.g.cs b/src/libs/Presenton/Generated/Presenton.DebugClient.g.cs index a87e7f6..1782bde 100644 --- a/src/libs/Presenton/Generated/Presenton.DebugClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DebugClient.g.cs @@ -72,10 +72,10 @@ public DebugClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public DebugClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.DesignSystemClient.ExtractDesignSystemApiV1PptDesignSystemExtractPost.g.cs b/src/libs/Presenton/Generated/Presenton.DesignSystemClient.ExtractDesignSystemApiV1PptDesignSystemExtractPost.g.cs index f55a4ec..baa783a 100644 --- a/src/libs/Presenton/Generated/Presenton.DesignSystemClient.ExtractDesignSystemApiV1PptDesignSystemExtractPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DesignSystemClient.ExtractDesignSystemApiV1PptDesignSystemExtractPost.g.cs @@ -53,6 +53,31 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo /// public async global::System.Threading.Tasks.Task ExtractDesignSystemApiV1PptDesignSystemExtractPostAsync( + global::Presenton.ExtractDesignSystemRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ExtractDesignSystemApiV1PptDesignSystemExtractPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Extract Design System
+ /// Accepts an array of slides (image + markdown_content), concatenates markdown,
+ /// sends all images and the markdown to OpenAI Responses API with EXTRACT_DESIGN_SYSTEM_PROMPT,
+ /// and returns the extracted design system JSON. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ExtractDesignSystemApiV1PptDesignSystemExtractPostAsResponseAsync( + global::Presenton.ExtractDesignSystemRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/design-system/extract", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo { __response.EnsureSuccessStatusCode(); - return - global::Presenton.ExtractDesignSystemResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.ExtractDesignSystemResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessExtractDesignSystemApiV1PptDesignSystemExtractPostResponseCo #endif ).ConfigureAwait(false); - return - await global::Presenton.ExtractDesignSystemResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.ExtractDesignSystemResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DesignSystemClient.g.cs b/src/libs/Presenton/Generated/Presenton.DesignSystemClient.g.cs index 477a217..0b60e70 100644 --- a/src/libs/Presenton/Generated/Presenton.DesignSystemClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DesignSystemClient.g.cs @@ -72,10 +72,10 @@ public DesignSystemClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public DesignSystemClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.DownloadsClient.AddDownloadApiV3DownloadsAddPost.g.cs b/src/libs/Presenton/Generated/Presenton.DownloadsClient.AddDownloadApiV3DownloadsAddPost.g.cs index 2f634c4..ba17fe5 100644 --- a/src/libs/Presenton/Generated/Presenton.DownloadsClient.AddDownloadApiV3DownloadsAddPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DownloadsClient.AddDownloadApiV3DownloadsAddPost.g.cs @@ -56,6 +56,29 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( global::Presenton.DownloadFormat format, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddDownloadApiV3DownloadsAddPostAsResponseAsync( + device: device, + format: format, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Add Download + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> AddDownloadApiV3DownloadsAddPostAsResponseAsync( + global::Presenton.Device device, + global::Presenton.DownloadFormat format, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,12 +109,13 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/downloads/add", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("device", device.ToValueString()) - .AddRequiredParameter("format", format.ToValueString()) + .AddRequiredParameter("format", format.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -164,6 +188,8 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,7 +397,11 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -383,7 +429,11 @@ partial void ProcessAddDownloadApiV3DownloadsAddPostResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.DownloadsClient.g.cs b/src/libs/Presenton/Generated/Presenton.DownloadsClient.g.cs index 3930111..4f4e05e 100644 --- a/src/libs/Presenton/Generated/Presenton.DownloadsClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.DownloadsClient.g.cs @@ -72,10 +72,10 @@ public DownloadsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public DownloadsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.FilesClient.DecomposeFilesApiV1PptFilesDecomposePost.g.cs b/src/libs/Presenton/Generated/Presenton.FilesClient.DecomposeFilesApiV1PptFilesDecomposePost.g.cs index bc000f4..cb981b3 100644 --- a/src/libs/Presenton/Generated/Presenton.FilesClient.DecomposeFilesApiV1PptFilesDecomposePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.FilesClient.DecomposeFilesApiV1PptFilesDecomposePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( /// public async global::System.Threading.Tasks.Task> DecomposeFilesApiV1PptFilesDecomposePostAsync( + global::Presenton.BodyDecomposeFilesApiV1PptFilesDecomposePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DecomposeFilesApiV1PptFilesDecomposePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Decompose Files + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> DecomposeFilesApiV1PptFilesDecomposePostAsResponseAsync( + global::Presenton.BodyDecomposeFilesApiV1PptFilesDecomposePost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/files/decompose", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessDecomposeFilesApiV1PptFilesDecomposePostResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPost.g.cs b/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPost.g.cs index f2184af..b6a10bf 100644 --- a/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo /// public async global::System.Threading.Tasks.Task> UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPostAsync( + global::Presenton.BodyUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upload Files And Get Temporary Urls + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPostAsResponseAsync( + global::Presenton.BodyUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/files/upload-and-get-temporary-urls", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); if (request.Files != default) { @@ -123,8 +147,11 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Files.ToString() ?? string.Empty), name: "\"files\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -166,6 +193,8 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +205,11 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +227,8 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +238,7 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +247,11 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +268,15 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +316,8 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +338,8 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +402,13 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +436,13 @@ partial void ProcessUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTempo #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesForUiApiV1PptFilesUploadUiPost.g.cs b/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesForUiApiV1PptFilesUploadUiPost.g.cs index 066aaa9..f9a9852 100644 --- a/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesForUiApiV1PptFilesUploadUiPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesForUiApiV1PptFilesUploadUiPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( /// public async global::System.Threading.Tasks.Task> UploadFilesForUiApiV1PptFilesUploadUiPostAsync( + global::Presenton.BodyUploadFilesForUiApiV1PptFilesUploadUiPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UploadFilesForUiApiV1PptFilesUploadUiPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upload Files For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> UploadFilesForUiApiV1PptFilesUploadUiPostAsResponseAsync( + global::Presenton.BodyUploadFilesForUiApiV1PptFilesUploadUiPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/files/upload/ui", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); if (request.Files != default) { @@ -123,8 +147,11 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Files.ToString() ?? string.Empty), name: "\"files\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -166,6 +193,8 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +205,11 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +227,8 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +238,7 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +247,11 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +268,15 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +316,8 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +338,8 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +402,13 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +436,13 @@ partial void ProcessUploadFilesForUiApiV1PptFilesUploadUiPostResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesV1ApiV1PptFilesUploadPost.g.cs b/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesV1ApiV1PptFilesUploadPost.g.cs index 6243955..af22856 100644 --- a/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesV1ApiV1PptFilesUploadPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.FilesClient.UploadFilesV1ApiV1PptFilesUploadPost.g.cs @@ -53,6 +53,31 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( /// public async global::System.Threading.Tasks.Task> UploadFilesV1ApiV1PptFilesUploadPostAsync( + global::Presenton.BodyUploadFilesV1ApiV1PptFilesUploadPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UploadFilesV1ApiV1PptFilesUploadPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upload Files V1
+ /// Upload files to be used later.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> UploadFilesV1ApiV1PptFilesUploadPostAsResponseAsync( + global::Presenton.BodyUploadFilesV1ApiV1PptFilesUploadPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -83,10 +108,11 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/files/upload", baseUri: HttpClient.BaseAddress); @@ -119,6 +145,7 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); if (request.Files != default) { @@ -126,8 +153,11 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Files.ToString() ?? string.Empty), name: "\"files\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -169,6 +199,8 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +211,11 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +233,8 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +244,7 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +253,11 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +274,15 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +322,8 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +344,8 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -360,9 +408,13 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -390,9 +442,13 @@ partial void ProcessUploadFilesV1ApiV1PptFilesUploadPostResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.FilesClient.g.cs b/src/libs/Presenton/Generated/Presenton.FilesClient.g.cs index d0ee294..81d1713 100644 --- a/src/libs/Presenton/Generated/Presenton.FilesClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.FilesClient.g.cs @@ -72,10 +72,10 @@ public FilesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public FilesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.FontsClient.CheckFontsInPptxApiV1PptFontsCheckPost.g.cs b/src/libs/Presenton/Generated/Presenton.FontsClient.CheckFontsInPptxApiV1PptFontsCheckPost.g.cs index 9568ce1..5f2dd5f 100644 --- a/src/libs/Presenton/Generated/Presenton.FontsClient.CheckFontsInPptxApiV1PptFontsCheckPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.FontsClient.CheckFontsInPptxApiV1PptFontsCheckPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCheckFontsInPptxApiV1PptFontsCheckPostResponseContent( /// public async global::System.Threading.Tasks.Task CheckFontsInPptxApiV1PptFontsCheckPostAsync( + global::Presenton.BodyCheckFontsInPptxApiV1PptFontsCheckPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CheckFontsInPptxApiV1PptFontsCheckPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Check Fonts In Pptx + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CheckFontsInPptxApiV1PptFontsCheckPostAsResponseAsync( + global::Presenton.BodyCheckFontsInPptxApiV1PptFontsCheckPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessCheckFontsInPptxApiV1PptFontsCheckPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/fonts/check", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessCheckFontsInPptxApiV1PptFontsCheckPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentPptxFile = new global::System.Net.Http.ByteArrayContent(request.PptxFile ?? global::System.Array.Empty()); __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -154,7 +178,9 @@ request.PptxFilename is null { __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -196,6 +222,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -206,6 +234,11 @@ request.PptxFilename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -223,6 +256,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -232,8 +267,7 @@ request.PptxFilename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -242,6 +276,11 @@ request.PptxFilename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -258,14 +297,15 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -305,6 +345,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -325,6 +367,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -387,9 +431,13 @@ request.PptxFilename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.FontCheckResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.FontCheckResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -417,9 +465,13 @@ request.PptxFilename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.FontCheckResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.FontCheckResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -486,5 +538,910 @@ request.PptxFilename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Check Fonts In Pptx + /// + /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CheckFontsInPptxApiV1PptFontsCheckPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyCheckFontsInPptxApiV1PptFontsCheckPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + }; + PrepareArguments( + client: HttpClient); + PrepareCheckFontsInPptxApiV1PptFontsCheckPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CheckFontsInPptxApiV1PptFontsCheckPostSecurityRequirements, + operationName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/fonts/check", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCheckFontsInPptxApiV1PptFontsCheckPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV1PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV1PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV1PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCheckFontsInPptxApiV1PptFontsCheckPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV1PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV1PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCheckFontsInPptxApiV1PptFontsCheckPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.FontCheckResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.FontCheckResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Check Fonts In Pptx + /// + /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CheckFontsInPptxApiV1PptFontsCheckPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyCheckFontsInPptxApiV1PptFontsCheckPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + }; + PrepareArguments( + client: HttpClient); + PrepareCheckFontsInPptxApiV1PptFontsCheckPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CheckFontsInPptxApiV1PptFontsCheckPostSecurityRequirements, + operationName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/fonts/check", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCheckFontsInPptxApiV1PptFontsCheckPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV1PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV1PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV1PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCheckFontsInPptxApiV1PptFontsCheckPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV1PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV1PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV1PptFontsCheckPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCheckFontsInPptxApiV1PptFontsCheckPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.FontCheckResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.FontCheckResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.FontsClient.DeleteFontApiV1PptFontsFontIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.FontsClient.DeleteFontApiV1PptFontsFontIdDelete.g.cs index 515b3aa..50e8ef1 100644 --- a/src/libs/Presenton/Generated/Presenton.FontsClient.DeleteFontApiV1PptFontsFontIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.FontsClient.DeleteFontApiV1PptFontsFontIdDelete.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( global::System.Guid fontId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteFontApiV1PptFontsFontIdDeleteAsResponseAsync( + fontId: fontId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Font + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteFontApiV1PptFontsFontIdDeleteAsResponseAsync( + global::System.Guid fontId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/fonts/{fontId}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -336,6 +373,10 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -357,6 +398,10 @@ partial void ProcessDeleteFontApiV1PptFontsFontIdDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.FontsClient.ListFontsApiV1PptFontsUploadedGet.g.cs b/src/libs/Presenton/Generated/Presenton.FontsClient.ListFontsApiV1PptFontsUploadedGet.g.cs index 809b9f4..e777bcb 100644 --- a/src/libs/Presenton/Generated/Presenton.FontsClient.ListFontsApiV1PptFontsUploadedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.FontsClient.ListFontsApiV1PptFontsUploadedGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( public async global::System.Threading.Tasks.Task ListFontsApiV1PptFontsUploadedGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListFontsApiV1PptFontsUploadedGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Fonts + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListFontsApiV1PptFontsUploadedGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/fonts/uploaded", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -339,9 +375,13 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.FontListResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.FontListResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -369,9 +409,13 @@ partial void ProcessListFontsApiV1PptFontsUploadedGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.FontListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.FontListResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.FontsClient.UploadFontApiV1PptFontsUploadPost.g.cs b/src/libs/Presenton/Generated/Presenton.FontsClient.UploadFontApiV1PptFontsUploadPost.g.cs index 9eb488a..86521ce 100644 --- a/src/libs/Presenton/Generated/Presenton.FontsClient.UploadFontApiV1PptFontsUploadPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.FontsClient.UploadFontApiV1PptFontsUploadPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessUploadFontApiV1PptFontsUploadPostResponseContent( /// public async global::System.Threading.Tasks.Task UploadFontApiV1PptFontsUploadPostAsync( + global::Presenton.BodyUploadFontApiV1PptFontsUploadPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UploadFontApiV1PptFontsUploadPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upload Font + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadFontApiV1PptFontsUploadPostAsResponseAsync( + global::Presenton.BodyUploadFontApiV1PptFontsUploadPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessUploadFontApiV1PptFontsUploadPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/fonts/upload", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessUploadFontApiV1PptFontsUploadPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -154,7 +178,9 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -196,6 +222,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -206,6 +234,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -223,6 +256,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -232,8 +267,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -242,6 +276,11 @@ request.Filename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -258,14 +297,15 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -305,6 +345,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -325,6 +367,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -387,9 +431,13 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.FontDetail.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.FontDetail.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -417,9 +465,13 @@ request.Filename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.FontDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.FontDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -486,5 +538,910 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Upload Font + /// + /// + /// Font file to upload (.ttf, .otf, .woff, .woff2, .eot) + /// + /// + /// Font file to upload (.ttf, .otf, .woff, .woff2, .eot) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UploadFontApiV1PptFontsUploadPostAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Presenton.BodyUploadFontApiV1PptFontsUploadPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadFontApiV1PptFontsUploadPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadFontApiV1PptFontsUploadPostSecurityRequirements, + operationName: "UploadFontApiV1PptFontsUploadPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/fonts/upload", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadFontApiV1PptFontsUploadPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontApiV1PptFontsUploadPost", + methodName: "UploadFontApiV1PptFontsUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontApiV1PptFontsUploadPost", + methodName: "UploadFontApiV1PptFontsUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontApiV1PptFontsUploadPost", + methodName: "UploadFontApiV1PptFontsUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadFontApiV1PptFontsUploadPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontApiV1PptFontsUploadPost", + methodName: "UploadFontApiV1PptFontsUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontApiV1PptFontsUploadPost", + methodName: "UploadFontApiV1PptFontsUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadFontApiV1PptFontsUploadPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.FontDetail.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.FontDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Upload Font + /// + /// + /// Font file to upload (.ttf, .otf, .woff, .woff2, .eot) + /// + /// + /// Font file to upload (.ttf, .otf, .woff, .woff2, .eot) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadFontApiV1PptFontsUploadPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Presenton.BodyUploadFontApiV1PptFontsUploadPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadFontApiV1PptFontsUploadPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadFontApiV1PptFontsUploadPostSecurityRequirements, + operationName: "UploadFontApiV1PptFontsUploadPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/fonts/upload", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadFontApiV1PptFontsUploadPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontApiV1PptFontsUploadPost", + methodName: "UploadFontApiV1PptFontsUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontApiV1PptFontsUploadPost", + methodName: "UploadFontApiV1PptFontsUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontApiV1PptFontsUploadPost", + methodName: "UploadFontApiV1PptFontsUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadFontApiV1PptFontsUploadPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontApiV1PptFontsUploadPost", + methodName: "UploadFontApiV1PptFontsUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontApiV1PptFontsUploadPost", + methodName: "UploadFontApiV1PptFontsUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/fonts/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadFontApiV1PptFontsUploadPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.FontDetail.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.FontDetail.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.FontsClient.g.cs b/src/libs/Presenton/Generated/Presenton.FontsClient.g.cs index 89e9a5e..6bdc9da 100644 --- a/src/libs/Presenton/Generated/Presenton.FontsClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.FontsClient.g.cs @@ -72,10 +72,10 @@ public FontsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public FontsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.HealthClient.HealthApiV1HealthGet.g.cs b/src/libs/Presenton/Generated/Presenton.HealthClient.HealthApiV1HealthGet.g.cs index 5fa9962..133b7a7 100644 --- a/src/libs/Presenton/Generated/Presenton.HealthClient.HealthApiV1HealthGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.HealthClient.HealthApiV1HealthGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessHealthApiV1HealthGetResponseContent( public async global::System.Threading.Tasks.Task HealthApiV1HealthGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await HealthApiV1HealthGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Health + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> HealthApiV1HealthGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessHealthApiV1HealthGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/health", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessHealthApiV1HealthGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessHealthApiV1HealthGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessHealthApiV1HealthGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessHealthApiV1HealthGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessHealthApiV1HealthGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessHealthApiV1HealthGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessHealthApiV1HealthGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessHealthApiV1HealthGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessHealthApiV1HealthGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.HealthResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.HealthResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessHealthApiV1HealthGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.HealthResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.HealthResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.HealthClient.g.cs b/src/libs/Presenton/Generated/Presenton.HealthClient.g.cs index d043a14..ce1b511 100644 --- a/src/libs/Presenton/Generated/Presenton.HealthClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.HealthClient.g.cs @@ -72,10 +72,10 @@ public HealthClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public HealthClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.InitHtmlCreateApiV1PptHtmlCreateInitPost.g.cs b/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.InitHtmlCreateApiV1PptHtmlCreateInitPost.g.cs index 69d68e3..0575a7b 100644 --- a/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.InitHtmlCreateApiV1PptHtmlCreateInitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.InitHtmlCreateApiV1PptHtmlCreateInitPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessInitHtmlCreateApiV1PptHtmlCreateInitPostResponseContent( /// public async global::System.Threading.Tasks.Task InitHtmlCreateApiV1PptHtmlCreateInitPostAsync( + global::Presenton.BodyInitHtmlCreateApiV1PptHtmlCreateInitPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await InitHtmlCreateApiV1PptHtmlCreateInitPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Init Html Create + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> InitHtmlCreateApiV1PptHtmlCreateInitPostAsResponseAsync( + global::Presenton.BodyInitHtmlCreateApiV1PptHtmlCreateInitPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessInitHtmlCreateApiV1PptHtmlCreateInitPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/html-create/init", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessInitHtmlCreateApiV1PptHtmlCreateInitPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); if (request.SketchImage != default) { @@ -157,32 +181,39 @@ request.SketchImagename is null { __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; } - } + + } if (request.AdditionalImages != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.AdditionalImages.ToString() ?? string.Empty), name: "\"additional_images\""); - } + + } if (request.Html != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), name: "\"html\""); + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), name: "\"prompt\""); + if (request.TemplateId != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.TemplateId ?? string.Empty), name: "\"template_id\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -224,6 +255,8 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -234,6 +267,11 @@ request.SketchImagename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -251,6 +289,8 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -260,8 +300,7 @@ request.SketchImagename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +309,11 @@ request.SketchImagename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -286,14 +330,15 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -333,6 +378,8 @@ request.SketchImagename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -353,6 +400,8 @@ request.SketchImagename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -415,9 +464,13 @@ request.SketchImagename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.HtmlEditInitResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.HtmlEditInitResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -445,9 +498,13 @@ request.SketchImagename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.HtmlEditInitResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.HtmlEditInitResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -532,5 +589,1010 @@ request.SketchImagename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Init Html Create + /// + /// + /// Primary reference/sketch image (optional) + /// + /// + /// Primary reference/sketch image (optional) + /// + /// + /// + /// Optional existing HTML content to inform create + /// + /// + /// Text prompt describing the slide to create + /// + /// + /// Template identifier (any string) whose design system should guide create + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task InitHtmlCreateApiV1PptHtmlCreateInitPostAsync( + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + global::System.Collections.Generic.IList? additionalImages = default, + string? html = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + var request = new global::Presenton.BodyInitHtmlCreateApiV1PptHtmlCreateInitPost + { + SketchImage = global::System.Array.Empty(), + SketchImagename = sketchImagename, + AdditionalImages = additionalImages, + Html = html, + Prompt = prompt, + TemplateId = templateId, + }; + PrepareArguments( + client: HttpClient); + PrepareInitHtmlCreateApiV1PptHtmlCreateInitPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_InitHtmlCreateApiV1PptHtmlCreateInitPostSecurityRequirements, + operationName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/html-create/init", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + if (sketchImage != default) + { + + var __contentSketchImage = new global::System.Net.Http.StreamContent(sketchImage); + __contentSketchImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.SketchImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.SketchImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSketchImage, + name: "\"sketch_image\"", + fileName: request.SketchImagename != null ? $"\"{request.SketchImagename}\"" : string.Empty); + if (__contentSketchImage.Headers.ContentDisposition != null) + { + __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; + } + + } + if (request.AdditionalImages != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.AdditionalImages.ToString() ?? string.Empty), + name: "\"additional_images\""); + + } + if (request.Html != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), + name: "\"html\""); + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), + name: "\"prompt\""); + + if (request.TemplateId != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.TemplateId ?? string.Empty), + name: "\"template_id\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareInitHtmlCreateApiV1PptHtmlCreateInitPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlCreateApiV1PptHtmlCreateInitPost", + methodName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-create/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlCreateApiV1PptHtmlCreateInitPost", + methodName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-create/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlCreateApiV1PptHtmlCreateInitPost", + methodName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-create/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessInitHtmlCreateApiV1PptHtmlCreateInitPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlCreateApiV1PptHtmlCreateInitPost", + methodName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-create/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlCreateApiV1PptHtmlCreateInitPost", + methodName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-create/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessInitHtmlCreateApiV1PptHtmlCreateInitPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.HtmlEditInitResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.HtmlEditInitResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Init Html Create + /// + /// + /// Primary reference/sketch image (optional) + /// + /// + /// Primary reference/sketch image (optional) + /// + /// + /// + /// Optional existing HTML content to inform create + /// + /// + /// Text prompt describing the slide to create + /// + /// + /// Template identifier (any string) whose design system should guide create + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> InitHtmlCreateApiV1PptHtmlCreateInitPostAsResponseAsync( + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + global::System.Collections.Generic.IList? additionalImages = default, + string? html = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + var request = new global::Presenton.BodyInitHtmlCreateApiV1PptHtmlCreateInitPost + { + SketchImage = global::System.Array.Empty(), + SketchImagename = sketchImagename, + AdditionalImages = additionalImages, + Html = html, + Prompt = prompt, + TemplateId = templateId, + }; + PrepareArguments( + client: HttpClient); + PrepareInitHtmlCreateApiV1PptHtmlCreateInitPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_InitHtmlCreateApiV1PptHtmlCreateInitPostSecurityRequirements, + operationName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/html-create/init", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + if (sketchImage != default) + { + + var __contentSketchImage = new global::System.Net.Http.StreamContent(sketchImage); + __contentSketchImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.SketchImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.SketchImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSketchImage, + name: "\"sketch_image\"", + fileName: request.SketchImagename != null ? $"\"{request.SketchImagename}\"" : string.Empty); + if (__contentSketchImage.Headers.ContentDisposition != null) + { + __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; + } + + } + if (request.AdditionalImages != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.AdditionalImages.ToString() ?? string.Empty), + name: "\"additional_images\""); + + } + if (request.Html != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), + name: "\"html\""); + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), + name: "\"prompt\""); + + if (request.TemplateId != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.TemplateId ?? string.Empty), + name: "\"template_id\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareInitHtmlCreateApiV1PptHtmlCreateInitPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlCreateApiV1PptHtmlCreateInitPost", + methodName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-create/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlCreateApiV1PptHtmlCreateInitPost", + methodName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-create/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlCreateApiV1PptHtmlCreateInitPost", + methodName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-create/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessInitHtmlCreateApiV1PptHtmlCreateInitPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlCreateApiV1PptHtmlCreateInitPost", + methodName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-create/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlCreateApiV1PptHtmlCreateInitPost", + methodName: "InitHtmlCreateApiV1PptHtmlCreateInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-create/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessInitHtmlCreateApiV1PptHtmlCreateInitPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.HtmlEditInitResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.HtmlEditInitResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.StreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.StreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGet.g.cs index 85b8a07..16c8964 100644 --- a/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.StreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.StreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse global::System.Guid sessionId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await StreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetAsResponseAsync( + sessionId: sessionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Stream Html Create + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> StreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetAsResponseAsync( + global::System.Guid sessionId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/html-create/stream/{sessionId}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,7 +384,11 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -373,7 +416,11 @@ partial void ProcessStreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetResponse #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.g.cs b/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.g.cs index 4222ca3..eaa42df 100644 --- a/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.HtmlCreateClient.g.cs @@ -72,10 +72,10 @@ public HtmlCreateClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public HtmlCreateClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.HtmlEditClient.EditHtmlWithImagesEndpointApiV1PptHtmlEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.HtmlEditClient.EditHtmlWithImagesEndpointApiV1PptHtmlEditPost.g.cs index 30bdde7..4779147 100644 --- a/src/libs/Presenton/Generated/Presenton.HtmlEditClient.EditHtmlWithImagesEndpointApiV1PptHtmlEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.HtmlEditClient.EditHtmlWithImagesEndpointApiV1PptHtmlEditPost.g.cs @@ -58,6 +58,36 @@ partial void ProcessEditHtmlWithImagesEndpointApiV1PptHtmlEditPostResponseConten /// public async global::System.Threading.Tasks.Task EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync( + global::Presenton.BodyEditHtmlWithImagesEndpointApiV1PptHtmlEditPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Edit Html With Images Endpoint
+ /// Edit HTML content based on one or two uploaded images and a text prompt using Anthropic Claude API.
+ /// Args:
+ /// current_ui_image: Uploaded current UI image file
+ /// sketch_image: Uploaded sketch/indication image file (optional)
+ /// html: Current HTML content to edit (form data)
+ /// prompt: Text prompt describing the changes (form data)
+ /// Returns:
+ /// HtmlEditResponse with edited HTML + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsResponseAsync( + global::Presenton.BodyEditHtmlWithImagesEndpointApiV1PptHtmlEditPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -88,10 +118,11 @@ partial void ProcessEditHtmlWithImagesEndpointApiV1PptHtmlEditPostResponseConten var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/html-edit/", baseUri: HttpClient.BaseAddress); @@ -124,6 +155,7 @@ partial void ProcessEditHtmlWithImagesEndpointApiV1PptHtmlEditPostResponseConten __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentCurrentUiImage = new global::System.Net.Http.ByteArrayContent(request.CurrentUiImage ?? global::System.Array.Empty()); __contentCurrentUiImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -162,6 +194,7 @@ request.CurrentUiImagename is null { __contentCurrentUiImage.Headers.ContentDisposition.FileNameStar = null; } + if (request.SketchImage != default) { @@ -202,21 +235,27 @@ request.SketchImagename is null { __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; } + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), name: "\"html\""); + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), name: "\"prompt\""); + if (request.TemplateId != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.TemplateId ?? string.Empty), name: "\"template_id\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -258,6 +297,8 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -268,6 +309,11 @@ request.SketchImagename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -285,6 +331,8 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -294,8 +342,7 @@ request.SketchImagename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -304,6 +351,11 @@ request.SketchImagename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -320,14 +372,15 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -367,6 +420,8 @@ request.SketchImagename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -387,6 +442,8 @@ request.SketchImagename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -449,9 +506,13 @@ request.SketchImagename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.HtmlEditResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.HtmlEditResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -479,9 +540,13 @@ request.SketchImagename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.HtmlEditResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.HtmlEditResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -581,5 +646,1094 @@ request.SketchImagename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Edit Html With Images Endpoint
+ /// Edit HTML content based on one or two uploaded images and a text prompt using Anthropic Claude API.
+ /// Args:
+ /// current_ui_image: Uploaded current UI image file
+ /// sketch_image: Uploaded sketch/indication image file (optional)
+ /// html: Current HTML content to edit (form data)
+ /// prompt: Text prompt describing the changes (form data)
+ /// Returns:
+ /// HtmlEditResponse with edited HTML + ///
+ /// + /// Current UI image file + /// + /// + /// Current UI image file + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Current HTML content to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Template identifier (any string) whose design system should guide edits + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync( + global::System.IO.Stream currentUiImage, + string currentUiImagename, + string html, + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + currentUiImage = currentUiImage ?? throw new global::System.ArgumentNullException(nameof(currentUiImage)); + var request = new global::Presenton.BodyEditHtmlWithImagesEndpointApiV1PptHtmlEditPost + { + CurrentUiImage = global::System.Array.Empty(), + CurrentUiImagename = currentUiImagename, + SketchImage = global::System.Array.Empty(), + SketchImagename = sketchImagename, + Html = html, + Prompt = prompt, + TemplateId = templateId, + }; + PrepareArguments( + client: HttpClient); + PrepareEditHtmlWithImagesEndpointApiV1PptHtmlEditPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_EditHtmlWithImagesEndpointApiV1PptHtmlEditPostSecurityRequirements, + operationName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/html-edit/", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentCurrentUiImage = new global::System.Net.Http.StreamContent(currentUiImage); + __contentCurrentUiImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.CurrentUiImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.CurrentUiImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentCurrentUiImage, + name: "\"current_ui_image\"", + fileName: request.CurrentUiImagename != null ? $"\"{request.CurrentUiImagename}\"" : string.Empty); + if (__contentCurrentUiImage.Headers.ContentDisposition != null) + { + __contentCurrentUiImage.Headers.ContentDisposition.FileNameStar = null; + } + + if (sketchImage != default) + { + + var __contentSketchImage = new global::System.Net.Http.StreamContent(sketchImage); + __contentSketchImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.SketchImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.SketchImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSketchImage, + name: "\"sketch_image\"", + fileName: request.SketchImagename != null ? $"\"{request.SketchImagename}\"" : string.Empty); + if (__contentSketchImage.Headers.ContentDisposition != null) + { + __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; + } + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), + name: "\"html\""); + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), + name: "\"prompt\""); + + if (request.TemplateId != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.TemplateId ?? string.Empty), + name: "\"template_id\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareEditHtmlWithImagesEndpointApiV1PptHtmlEditPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPost", + methodName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPost", + methodName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPost", + methodName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessEditHtmlWithImagesEndpointApiV1PptHtmlEditPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPost", + methodName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPost", + methodName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessEditHtmlWithImagesEndpointApiV1PptHtmlEditPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.HtmlEditResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.HtmlEditResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Edit Html With Images Endpoint
+ /// Edit HTML content based on one or two uploaded images and a text prompt using Anthropic Claude API.
+ /// Args:
+ /// current_ui_image: Uploaded current UI image file
+ /// sketch_image: Uploaded sketch/indication image file (optional)
+ /// html: Current HTML content to edit (form data)
+ /// prompt: Text prompt describing the changes (form data)
+ /// Returns:
+ /// HtmlEditResponse with edited HTML + ///
+ /// + /// Current UI image file + /// + /// + /// Current UI image file + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Current HTML content to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Template identifier (any string) whose design system should guide edits + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsResponseAsync( + global::System.IO.Stream currentUiImage, + string currentUiImagename, + string html, + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + currentUiImage = currentUiImage ?? throw new global::System.ArgumentNullException(nameof(currentUiImage)); + var request = new global::Presenton.BodyEditHtmlWithImagesEndpointApiV1PptHtmlEditPost + { + CurrentUiImage = global::System.Array.Empty(), + CurrentUiImagename = currentUiImagename, + SketchImage = global::System.Array.Empty(), + SketchImagename = sketchImagename, + Html = html, + Prompt = prompt, + TemplateId = templateId, + }; + PrepareArguments( + client: HttpClient); + PrepareEditHtmlWithImagesEndpointApiV1PptHtmlEditPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_EditHtmlWithImagesEndpointApiV1PptHtmlEditPostSecurityRequirements, + operationName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/html-edit/", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentCurrentUiImage = new global::System.Net.Http.StreamContent(currentUiImage); + __contentCurrentUiImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.CurrentUiImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.CurrentUiImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentCurrentUiImage, + name: "\"current_ui_image\"", + fileName: request.CurrentUiImagename != null ? $"\"{request.CurrentUiImagename}\"" : string.Empty); + if (__contentCurrentUiImage.Headers.ContentDisposition != null) + { + __contentCurrentUiImage.Headers.ContentDisposition.FileNameStar = null; + } + + if (sketchImage != default) + { + + var __contentSketchImage = new global::System.Net.Http.StreamContent(sketchImage); + __contentSketchImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.SketchImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.SketchImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSketchImage, + name: "\"sketch_image\"", + fileName: request.SketchImagename != null ? $"\"{request.SketchImagename}\"" : string.Empty); + if (__contentSketchImage.Headers.ContentDisposition != null) + { + __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; + } + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), + name: "\"html\""); + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), + name: "\"prompt\""); + + if (request.TemplateId != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.TemplateId ?? string.Empty), + name: "\"template_id\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareEditHtmlWithImagesEndpointApiV1PptHtmlEditPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPost", + methodName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPost", + methodName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPost", + methodName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessEditHtmlWithImagesEndpointApiV1PptHtmlEditPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPost", + methodName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPost", + methodName: "EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessEditHtmlWithImagesEndpointApiV1PptHtmlEditPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.HtmlEditResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.HtmlEditResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.HtmlEditClient.InitHtmlEditApiV1PptHtmlEditInitPost.g.cs b/src/libs/Presenton/Generated/Presenton.HtmlEditClient.InitHtmlEditApiV1PptHtmlEditInitPost.g.cs index cafbfd3..d4a1eb0 100644 --- a/src/libs/Presenton/Generated/Presenton.HtmlEditClient.InitHtmlEditApiV1PptHtmlEditInitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.HtmlEditClient.InitHtmlEditApiV1PptHtmlEditInitPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessInitHtmlEditApiV1PptHtmlEditInitPostResponseContent( /// public async global::System.Threading.Tasks.Task InitHtmlEditApiV1PptHtmlEditInitPostAsync( + global::Presenton.BodyInitHtmlEditApiV1PptHtmlEditInitPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await InitHtmlEditApiV1PptHtmlEditInitPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Init Html Edit + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> InitHtmlEditApiV1PptHtmlEditInitPostAsResponseAsync( + global::Presenton.BodyInitHtmlEditApiV1PptHtmlEditInitPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessInitHtmlEditApiV1PptHtmlEditInitPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/html-edit/init", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessInitHtmlEditApiV1PptHtmlEditInitPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentCurrentUiImage = new global::System.Net.Http.ByteArrayContent(request.CurrentUiImage ?? global::System.Array.Empty()); __contentCurrentUiImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -154,6 +178,7 @@ request.CurrentUiImagename is null { __contentCurrentUiImage.Headers.ContentDisposition.FileNameStar = null; } + if (request.SketchImage != default) { @@ -194,28 +219,35 @@ request.SketchImagename is null { __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; } - } + + } if (request.AdditionalImages != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.AdditionalImages.ToString() ?? string.Empty), name: "\"additional_images\""); + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), name: "\"html\""); + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), name: "\"prompt\""); + if (request.TemplateId != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.TemplateId ?? string.Empty), name: "\"template_id\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -257,6 +289,8 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -267,6 +301,11 @@ request.SketchImagename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -284,6 +323,8 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -293,8 +334,7 @@ request.SketchImagename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -303,6 +343,11 @@ request.SketchImagename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -319,14 +364,15 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -366,6 +412,8 @@ request.SketchImagename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -386,6 +434,8 @@ request.SketchImagename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -448,9 +498,13 @@ request.SketchImagename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.HtmlEditInitResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.HtmlEditInitResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -478,9 +532,13 @@ request.SketchImagename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.HtmlEditInitResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.HtmlEditInitResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -575,5 +633,1100 @@ request.SketchImagename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Init Html Edit + /// + /// + /// Current UI image file + /// + /// + /// Current UI image file + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// + /// Current HTML content to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Template identifier (any string) whose design system should guide edits + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task InitHtmlEditApiV1PptHtmlEditInitPostAsync( + global::System.IO.Stream currentUiImage, + string currentUiImagename, + string html, + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + global::System.Collections.Generic.IList? additionalImages = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + currentUiImage = currentUiImage ?? throw new global::System.ArgumentNullException(nameof(currentUiImage)); + var request = new global::Presenton.BodyInitHtmlEditApiV1PptHtmlEditInitPost + { + CurrentUiImage = global::System.Array.Empty(), + CurrentUiImagename = currentUiImagename, + SketchImage = global::System.Array.Empty(), + SketchImagename = sketchImagename, + AdditionalImages = additionalImages, + Html = html, + Prompt = prompt, + TemplateId = templateId, + }; + PrepareArguments( + client: HttpClient); + PrepareInitHtmlEditApiV1PptHtmlEditInitPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_InitHtmlEditApiV1PptHtmlEditInitPostSecurityRequirements, + operationName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/html-edit/init", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentCurrentUiImage = new global::System.Net.Http.StreamContent(currentUiImage); + __contentCurrentUiImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.CurrentUiImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.CurrentUiImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentCurrentUiImage, + name: "\"current_ui_image\"", + fileName: request.CurrentUiImagename != null ? $"\"{request.CurrentUiImagename}\"" : string.Empty); + if (__contentCurrentUiImage.Headers.ContentDisposition != null) + { + __contentCurrentUiImage.Headers.ContentDisposition.FileNameStar = null; + } + + if (sketchImage != default) + { + + var __contentSketchImage = new global::System.Net.Http.StreamContent(sketchImage); + __contentSketchImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.SketchImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.SketchImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSketchImage, + name: "\"sketch_image\"", + fileName: request.SketchImagename != null ? $"\"{request.SketchImagename}\"" : string.Empty); + if (__contentSketchImage.Headers.ContentDisposition != null) + { + __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; + } + + } + if (request.AdditionalImages != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.AdditionalImages.ToString() ?? string.Empty), + name: "\"additional_images\""); + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), + name: "\"html\""); + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), + name: "\"prompt\""); + + if (request.TemplateId != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.TemplateId ?? string.Empty), + name: "\"template_id\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareInitHtmlEditApiV1PptHtmlEditInitPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlEditApiV1PptHtmlEditInitPost", + methodName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlEditApiV1PptHtmlEditInitPost", + methodName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlEditApiV1PptHtmlEditInitPost", + methodName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessInitHtmlEditApiV1PptHtmlEditInitPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlEditApiV1PptHtmlEditInitPost", + methodName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlEditApiV1PptHtmlEditInitPost", + methodName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessInitHtmlEditApiV1PptHtmlEditInitPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.HtmlEditInitResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.HtmlEditInitResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Init Html Edit + /// + /// + /// Current UI image file + /// + /// + /// Current UI image file + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// + /// Current HTML content to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Template identifier (any string) whose design system should guide edits + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> InitHtmlEditApiV1PptHtmlEditInitPostAsResponseAsync( + global::System.IO.Stream currentUiImage, + string currentUiImagename, + string html, + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + global::System.Collections.Generic.IList? additionalImages = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + currentUiImage = currentUiImage ?? throw new global::System.ArgumentNullException(nameof(currentUiImage)); + var request = new global::Presenton.BodyInitHtmlEditApiV1PptHtmlEditInitPost + { + CurrentUiImage = global::System.Array.Empty(), + CurrentUiImagename = currentUiImagename, + SketchImage = global::System.Array.Empty(), + SketchImagename = sketchImagename, + AdditionalImages = additionalImages, + Html = html, + Prompt = prompt, + TemplateId = templateId, + }; + PrepareArguments( + client: HttpClient); + PrepareInitHtmlEditApiV1PptHtmlEditInitPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_InitHtmlEditApiV1PptHtmlEditInitPostSecurityRequirements, + operationName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/html-edit/init", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentCurrentUiImage = new global::System.Net.Http.StreamContent(currentUiImage); + __contentCurrentUiImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.CurrentUiImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.CurrentUiImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentCurrentUiImage, + name: "\"current_ui_image\"", + fileName: request.CurrentUiImagename != null ? $"\"{request.CurrentUiImagename}\"" : string.Empty); + if (__contentCurrentUiImage.Headers.ContentDisposition != null) + { + __contentCurrentUiImage.Headers.ContentDisposition.FileNameStar = null; + } + + if (sketchImage != default) + { + + var __contentSketchImage = new global::System.Net.Http.StreamContent(sketchImage); + __contentSketchImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.SketchImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.SketchImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSketchImage, + name: "\"sketch_image\"", + fileName: request.SketchImagename != null ? $"\"{request.SketchImagename}\"" : string.Empty); + if (__contentSketchImage.Headers.ContentDisposition != null) + { + __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; + } + + } + if (request.AdditionalImages != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.AdditionalImages.ToString() ?? string.Empty), + name: "\"additional_images\""); + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), + name: "\"html\""); + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), + name: "\"prompt\""); + + if (request.TemplateId != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.TemplateId ?? string.Empty), + name: "\"template_id\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareInitHtmlEditApiV1PptHtmlEditInitPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlEditApiV1PptHtmlEditInitPost", + methodName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlEditApiV1PptHtmlEditInitPost", + methodName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlEditApiV1PptHtmlEditInitPost", + methodName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessInitHtmlEditApiV1PptHtmlEditInitPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlEditApiV1PptHtmlEditInitPost", + methodName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitHtmlEditApiV1PptHtmlEditInitPost", + methodName: "InitHtmlEditApiV1PptHtmlEditInitPostAsync", + pathTemplate: "\"/api/v1/ppt/html-edit/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessInitHtmlEditApiV1PptHtmlEditInitPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.HtmlEditInitResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.HtmlEditInitResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.HtmlEditClient.StreamHtmlEditApiV1PptHtmlEditStreamSessionIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.HtmlEditClient.StreamHtmlEditApiV1PptHtmlEditStreamSessionIdGet.g.cs index 0495d3d..588441e 100644 --- a/src/libs/Presenton/Generated/Presenton.HtmlEditClient.StreamHtmlEditApiV1PptHtmlEditStreamSessionIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.HtmlEditClient.StreamHtmlEditApiV1PptHtmlEditStreamSessionIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont global::System.Guid sessionId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await StreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetAsResponseAsync( + sessionId: sessionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Stream Html Edit + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> StreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetAsResponseAsync( + global::System.Guid sessionId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/html-edit/stream/{sessionId}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,7 +384,11 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -373,7 +416,11 @@ partial void ProcessStreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetResponseCont #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.HtmlEditClient.g.cs b/src/libs/Presenton/Generated/Presenton.HtmlEditClient.g.cs index 237dab9..a1b767f 100644 --- a/src/libs/Presenton/Generated/Presenton.HtmlEditClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.HtmlEditClient.g.cs @@ -72,10 +72,10 @@ public HtmlEditClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public HtmlEditClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.HtmlToReactClient.ConvertHtmlToReactApiV1PptHtmlToReactPost.g.cs b/src/libs/Presenton/Generated/Presenton.HtmlToReactClient.ConvertHtmlToReactApiV1PptHtmlToReactPost.g.cs index 3ec9a3f..808b61b 100644 --- a/src/libs/Presenton/Generated/Presenton.HtmlToReactClient.ConvertHtmlToReactApiV1PptHtmlToReactPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.HtmlToReactClient.ConvertHtmlToReactApiV1PptHtmlToReactPost.g.cs @@ -55,6 +55,33 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( /// public async global::System.Threading.Tasks.Task ConvertHtmlToReactApiV1PptHtmlToReactPostAsync( + global::Presenton.HtmlToReactRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ConvertHtmlToReactApiV1PptHtmlToReactPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Convert Html To React
+ /// Convert HTML content to TSX React component using Anthropic Claude API.
+ /// Args:
+ /// request: JSON request containing HTML content
+ /// Returns:
+ /// HtmlToReactResponse with generated React component + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ConvertHtmlToReactApiV1PptHtmlToReactPostAsResponseAsync( + global::Presenton.HtmlToReactRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +116,7 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/html-to-react/", baseUri: HttpClient.BaseAddress); @@ -168,6 +196,8 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +208,11 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +230,8 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +241,7 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +250,11 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +271,15 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +319,8 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +341,8 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -359,9 +405,13 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.HtmlToReactResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.HtmlToReactResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -389,9 +439,13 @@ partial void ProcessConvertHtmlToReactApiV1PptHtmlToReactPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.HtmlToReactResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.HtmlToReactResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.HtmlToReactClient.g.cs b/src/libs/Presenton/Generated/Presenton.HtmlToReactClient.g.cs index 21033e6..d7f239d 100644 --- a/src/libs/Presenton/Generated/Presenton.HtmlToReactClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.HtmlToReactClient.g.cs @@ -72,10 +72,10 @@ public HtmlToReactClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public HtmlToReactClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthJwtLoginApiV1AuthJwtLoginPost.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthJwtLoginApiV1AuthJwtLoginPost.g.cs index 205663b..dd9ef43 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthJwtLoginApiV1AuthJwtLoginPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthJwtLoginApiV1AuthJwtLoginPost.g.cs @@ -19,6 +19,18 @@ public partial interface IAuthClient /// /// Auth:Jwt.Login /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> AuthJwtLoginApiV1AuthJwtLoginPostAsResponseAsync( + + global::Presenton.BodyAuthJwtLoginApiV1AuthJwtLoginPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Auth:Jwt.Login + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthJwtLogoutApiV1AuthJwtLogoutPost.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthJwtLogoutApiV1AuthJwtLogoutPost.g.cs index 49012fc..f327bb9 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthJwtLogoutApiV1AuthJwtLogoutPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthJwtLogoutApiV1AuthJwtLogoutPost.g.cs @@ -13,5 +13,14 @@ public partial interface IAuthClient global::System.Threading.Tasks.Task AuthJwtLogoutApiV1AuthJwtLogoutPostAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Auth:Jwt.Logout + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> AuthJwtLogoutApiV1AuthJwtLogoutPostAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthorizeApiV1AuthGoogleAuthorizeGet.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthorizeApiV1AuthGoogleAuthorizeGet.g.cs index 92714fe..90fe4d7 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthorizeApiV1AuthGoogleAuthorizeGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.AuthorizeApiV1AuthGoogleAuthorizeGet.g.cs @@ -15,5 +15,16 @@ public partial interface IAuthClient global::System.Collections.Generic.IList? scopes = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Authorize + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> AuthorizeApiV1AuthGoogleAuthorizeGetAsResponseAsync( + global::System.Collections.Generic.IList? scopes = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.CallbackApiV1AuthGoogleCallbackGet.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.CallbackApiV1AuthGoogleCallbackGet.g.cs index 817b30a..103e175 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.CallbackApiV1AuthGoogleCallbackGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.CallbackApiV1AuthGoogleCallbackGet.g.cs @@ -20,5 +20,21 @@ public partial interface IAuthClient string? error = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Callback
+ /// The response varies based on the authentication backend used. + ///
+ /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CallbackApiV1AuthGoogleCallbackGetAsResponseAsync( + string? code = default, + string? state = default, + string? error = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.CreateTokenApiV1AuthTokenCreatePost.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.CreateTokenApiV1AuthTokenCreatePost.g.cs index 458e285..2380d11 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.CreateTokenApiV1AuthTokenCreatePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.CreateTokenApiV1AuthTokenCreatePost.g.cs @@ -13,5 +13,14 @@ public partial interface IAuthClient global::System.Threading.Tasks.Task CreateTokenApiV1AuthTokenCreatePostAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Token + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateTokenApiV1AuthTokenCreatePostAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.DeleteUserProfileApiV1AuthProfileDeleteDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.DeleteUserProfileApiV1AuthProfileDeleteDelete.g.cs index 6bdbefc..1c078f9 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.DeleteUserProfileApiV1AuthProfileDeleteDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.DeleteUserProfileApiV1AuthProfileDeleteDelete.g.cs @@ -13,5 +13,14 @@ public partial interface IAuthClient global::System.Threading.Tasks.Task DeleteUserProfileApiV1AuthProfileDeleteDeleteAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete User Profile + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteUserProfileApiV1AuthProfileDeleteDeleteAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.EnterpriseLoginApiV1AuthEnterpriseLoginGet.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.EnterpriseLoginApiV1AuthEnterpriseLoginGet.g.cs index 76930e8..e609d64 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.EnterpriseLoginApiV1AuthEnterpriseLoginGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.EnterpriseLoginApiV1AuthEnterpriseLoginGet.g.cs @@ -21,5 +21,22 @@ public partial interface IAuthClient string? lastName = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Enterprise Login + /// + /// + /// Work email (must be @exlservice.com) + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EnterpriseLoginApiV1AuthEnterpriseLoginGetAsResponseAsync( + string email, + string? firstName = default, + string? lastName = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.GetMeApiV1AuthProfileGet.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.GetMeApiV1AuthProfileGet.g.cs index 1f3c5ec..64b2b2c 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.GetMeApiV1AuthProfileGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.GetMeApiV1AuthProfileGet.g.cs @@ -13,5 +13,14 @@ public partial interface IAuthClient global::System.Threading.Tasks.Task GetMeApiV1AuthProfileGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Me + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetMeApiV1AuthProfileGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.ListTokensApiV1AuthTokenListGet.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.ListTokensApiV1AuthTokenListGet.g.cs index ab2581f..2df4d97 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.ListTokensApiV1AuthTokenListGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.ListTokensApiV1AuthTokenListGet.g.cs @@ -13,5 +13,14 @@ public partial interface IAuthClient global::System.Threading.Tasks.Task> ListTokensApiV1AuthTokenListGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Tokens + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListTokensApiV1AuthTokenListGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.PatchMeApiV1AuthProfileUpdatePatch.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.PatchMeApiV1AuthProfileUpdatePatch.g.cs index b2fbfea..76fe312 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.PatchMeApiV1AuthProfileUpdatePatch.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.PatchMeApiV1AuthProfileUpdatePatch.g.cs @@ -19,6 +19,18 @@ public partial interface IAuthClient /// /// Patch Me /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> PatchMeApiV1AuthProfileUpdatePatchAsResponseAsync( + + global::Presenton.BodyPatchMeApiV1AuthProfileUpdatePatch request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Patch Me + /// /// /// /// @@ -31,5 +43,40 @@ public partial interface IAuthClient string? name = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Patch Me + /// + /// + /// The stream to send as the multipart 'profile_picture' file part. + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task PatchMeApiV1AuthProfileUpdatePatchAsync( + global::System.IO.Stream? profilePicture = default, + string? profilePicturename = default, + string? name = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Patch Me + /// + /// + /// The stream to send as the multipart 'profile_picture' file part. + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> PatchMeApiV1AuthProfileUpdatePatchAsResponseAsync( + global::System.IO.Stream? profilePicture = default, + string? profilePicturename = default, + string? name = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.RegisterRegisterApiV1AuthRegisterPost.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.RegisterRegisterApiV1AuthRegisterPost.g.cs index 58a5c1b..398bf9c 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.RegisterRegisterApiV1AuthRegisterPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.RegisterRegisterApiV1AuthRegisterPost.g.cs @@ -19,6 +19,18 @@ public partial interface IAuthClient /// /// Register:Register /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> RegisterRegisterApiV1AuthRegisterPostAsResponseAsync( + + global::Presenton.UserCreate request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Register:Register + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.ResetForgotPasswordApiV1AuthForgotPasswordPost.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.ResetForgotPasswordApiV1AuthForgotPasswordPost.g.cs index f1d4bfa..103ebd3 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.ResetForgotPasswordApiV1AuthForgotPasswordPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.ResetForgotPasswordApiV1AuthForgotPasswordPost.g.cs @@ -19,6 +19,18 @@ public partial interface IAuthClient /// /// Reset:Forgot Password /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ResetForgotPasswordApiV1AuthForgotPasswordPostAsResponseAsync( + + global::Presenton.BodyResetForgotPasswordApiV1AuthForgotPasswordPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Reset:Forgot Password + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.ResetResetPasswordApiV1AuthResetPasswordPost.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.ResetResetPasswordApiV1AuthResetPasswordPost.g.cs index 51dd7bb..34d39d9 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.ResetResetPasswordApiV1AuthResetPasswordPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.ResetResetPasswordApiV1AuthResetPasswordPost.g.cs @@ -19,6 +19,18 @@ public partial interface IAuthClient /// /// Reset:Reset Password /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ResetResetPasswordApiV1AuthResetPasswordPostAsResponseAsync( + + global::Presenton.BodyResetResetPasswordApiV1AuthResetPasswordPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Reset:Reset Password + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.RevokeTokenApiV1AuthTokenRevokePost.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.RevokeTokenApiV1AuthTokenRevokePost.g.cs index 8498e9a..2be45f3 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.RevokeTokenApiV1AuthTokenRevokePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.RevokeTokenApiV1AuthTokenRevokePost.g.cs @@ -19,6 +19,18 @@ public partial interface IAuthClient /// /// Revoke Token /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> RevokeTokenApiV1AuthTokenRevokePostAsResponseAsync( + + global::Presenton.BodyRevokeTokenApiV1AuthTokenRevokePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Revoke Token + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersCurrentUserApiV1AuthUsersMeGet.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersCurrentUserApiV1AuthUsersMeGet.g.cs index f748dc3..6731d51 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersCurrentUserApiV1AuthUsersMeGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersCurrentUserApiV1AuthUsersMeGet.g.cs @@ -13,5 +13,14 @@ public partial interface IAuthClient global::System.Threading.Tasks.Task UsersCurrentUserApiV1AuthUsersMeGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Users:Current User + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UsersCurrentUserApiV1AuthUsersMeGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersDeleteUserApiV1AuthUsersIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersDeleteUserApiV1AuthUsersIdDelete.g.cs index 05fa8b6..d7d44d2 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersDeleteUserApiV1AuthUsersIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersDeleteUserApiV1AuthUsersIdDelete.g.cs @@ -15,5 +15,16 @@ public partial interface IAuthClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Users:Delete User + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UsersDeleteUserApiV1AuthUsersIdDeleteAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersPatchCurrentUserApiV1AuthUsersMePatch.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersPatchCurrentUserApiV1AuthUsersMePatch.g.cs index 1c9b7bf..5235794 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersPatchCurrentUserApiV1AuthUsersMePatch.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersPatchCurrentUserApiV1AuthUsersMePatch.g.cs @@ -19,6 +19,18 @@ public partial interface IAuthClient /// /// Users:Patch Current User /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UsersPatchCurrentUserApiV1AuthUsersMePatchAsResponseAsync( + + global::Presenton.UserUpdate request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Users:Patch Current User + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersPatchUserApiV1AuthUsersIdPatch.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersPatchUserApiV1AuthUsersIdPatch.g.cs index a6ab2eb..2df08ee 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersPatchUserApiV1AuthUsersIdPatch.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersPatchUserApiV1AuthUsersIdPatch.g.cs @@ -22,6 +22,20 @@ public partial interface IAuthClient /// Users:Patch User /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UsersPatchUserApiV1AuthUsersIdPatchAsResponseAsync( + string id, + + global::Presenton.UserUpdate request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Users:Patch User + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersUserApiV1AuthUsersIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersUserApiV1AuthUsersIdGet.g.cs index 342da0d..202e359 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersUserApiV1AuthUsersIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.UsersUserApiV1AuthUsersIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IAuthClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Users:User + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UsersUserApiV1AuthUsersIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.VerifyRequestTokenApiV1AuthRequestVerifyTokenPost.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.VerifyRequestTokenApiV1AuthRequestVerifyTokenPost.g.cs index 0f6de82..0eec030 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.VerifyRequestTokenApiV1AuthRequestVerifyTokenPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.VerifyRequestTokenApiV1AuthRequestVerifyTokenPost.g.cs @@ -19,6 +19,18 @@ public partial interface IAuthClient /// /// Verify:Request-Token /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> VerifyRequestTokenApiV1AuthRequestVerifyTokenPostAsResponseAsync( + + global::Presenton.BodyVerifyRequestTokenApiV1AuthRequestVerifyTokenPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Verify:Request-Token + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IAuthClient.VerifyVerifyApiV1AuthVerifyPost.g.cs b/src/libs/Presenton/Generated/Presenton.IAuthClient.VerifyVerifyApiV1AuthVerifyPost.g.cs index e6ef36c..5cdaf90 100644 --- a/src/libs/Presenton/Generated/Presenton.IAuthClient.VerifyVerifyApiV1AuthVerifyPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IAuthClient.VerifyVerifyApiV1AuthVerifyPost.g.cs @@ -19,6 +19,18 @@ public partial interface IAuthClient /// /// Verify:Verify /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> VerifyVerifyApiV1AuthVerifyPostAsResponseAsync( + + global::Presenton.BodyVerifyVerifyApiV1AuthVerifyPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Verify:Verify + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IBillingClient.CreateCheckoutSessionApiV1BillingCheckoutSessionPost.g.cs b/src/libs/Presenton/Generated/Presenton.IBillingClient.CreateCheckoutSessionApiV1BillingCheckoutSessionPost.g.cs index e87b943..2f346a3 100644 --- a/src/libs/Presenton/Generated/Presenton.IBillingClient.CreateCheckoutSessionApiV1BillingCheckoutSessionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IBillingClient.CreateCheckoutSessionApiV1BillingCheckoutSessionPost.g.cs @@ -19,6 +19,18 @@ public partial interface IBillingClient /// /// Create Checkout Session /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateCheckoutSessionApiV1BillingCheckoutSessionPostAsResponseAsync( + + global::Presenton.CreateCheckoutSessionRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Checkout Session + /// /// /// /// Default Value: subscription diff --git a/src/libs/Presenton/Generated/Presenton.IBillingClient.CreatePortalSessionApiV1BillingPortalSessionPost.g.cs b/src/libs/Presenton/Generated/Presenton.IBillingClient.CreatePortalSessionApiV1BillingPortalSessionPost.g.cs index 8337015..c9b8694 100644 --- a/src/libs/Presenton/Generated/Presenton.IBillingClient.CreatePortalSessionApiV1BillingPortalSessionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IBillingClient.CreatePortalSessionApiV1BillingPortalSessionPost.g.cs @@ -19,6 +19,18 @@ public partial interface IBillingClient /// /// Create Portal Session /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreatePortalSessionApiV1BillingPortalSessionPostAsResponseAsync( + + global::Presenton.BodyCreatePortalSessionApiV1BillingPortalSessionPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Portal Session + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IBillingClient.GetSubscriptionStatusApiV1BillingSubscriptionGet.g.cs b/src/libs/Presenton/Generated/Presenton.IBillingClient.GetSubscriptionStatusApiV1BillingSubscriptionGet.g.cs index 7ce8d27..93de8b1 100644 --- a/src/libs/Presenton/Generated/Presenton.IBillingClient.GetSubscriptionStatusApiV1BillingSubscriptionGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IBillingClient.GetSubscriptionStatusApiV1BillingSubscriptionGet.g.cs @@ -17,5 +17,18 @@ public partial interface IBillingClient bool? refresh = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Subscription Status + /// + /// + /// Default Value: false + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetSubscriptionStatusApiV1BillingSubscriptionGetAsResponseAsync( + bool? refresh = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IBillingClient.ListPricesApiV1BillingPricesGet.g.cs b/src/libs/Presenton/Generated/Presenton.IBillingClient.ListPricesApiV1BillingPricesGet.g.cs index 6278ab4..22f1322 100644 --- a/src/libs/Presenton/Generated/Presenton.IBillingClient.ListPricesApiV1BillingPricesGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IBillingClient.ListPricesApiV1BillingPricesGet.g.cs @@ -13,5 +13,14 @@ public partial interface IBillingClient global::System.Threading.Tasks.Task> ListPricesApiV1BillingPricesGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Prices + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListPricesApiV1BillingPricesGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IBillingClient.ModifySubscriptionApiV1BillingSubscriptionModifyPost.g.cs b/src/libs/Presenton/Generated/Presenton.IBillingClient.ModifySubscriptionApiV1BillingSubscriptionModifyPost.g.cs index 1d16556..b3d6e15 100644 --- a/src/libs/Presenton/Generated/Presenton.IBillingClient.ModifySubscriptionApiV1BillingSubscriptionModifyPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IBillingClient.ModifySubscriptionApiV1BillingSubscriptionModifyPost.g.cs @@ -19,6 +19,18 @@ public partial interface IBillingClient /// /// Modify Subscription /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ModifySubscriptionApiV1BillingSubscriptionModifyPostAsResponseAsync( + + global::Presenton.BodyModifySubscriptionApiV1BillingSubscriptionModifyPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Modify Subscription + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IBillingClient.PurchaseCreditsApiV1BillingCreditsPurchasePost.g.cs b/src/libs/Presenton/Generated/Presenton.IBillingClient.PurchaseCreditsApiV1BillingCreditsPurchasePost.g.cs index b33ce5f..d6dbe0a 100644 --- a/src/libs/Presenton/Generated/Presenton.IBillingClient.PurchaseCreditsApiV1BillingCreditsPurchasePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IBillingClient.PurchaseCreditsApiV1BillingCreditsPurchasePost.g.cs @@ -19,6 +19,18 @@ public partial interface IBillingClient /// /// Purchase Credits /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> PurchaseCreditsApiV1BillingCreditsPurchasePostAsResponseAsync( + + global::Presenton.PurchaseCreditsRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Purchase Credits + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IBillingClient.ReactivateSubscriptionApiV1BillingSubscriptionReactivatePost.g.cs b/src/libs/Presenton/Generated/Presenton.IBillingClient.ReactivateSubscriptionApiV1BillingSubscriptionReactivatePost.g.cs index 79bd8b1..95b055c 100644 --- a/src/libs/Presenton/Generated/Presenton.IBillingClient.ReactivateSubscriptionApiV1BillingSubscriptionReactivatePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IBillingClient.ReactivateSubscriptionApiV1BillingSubscriptionReactivatePost.g.cs @@ -13,5 +13,14 @@ public partial interface IBillingClient global::System.Threading.Tasks.Task ReactivateSubscriptionApiV1BillingSubscriptionReactivatePostAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Reactivate Subscription + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ReactivateSubscriptionApiV1BillingSubscriptionReactivatePostAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IBillingClient.StripeWebhookApiV1BillingWebhookPost.g.cs b/src/libs/Presenton/Generated/Presenton.IBillingClient.StripeWebhookApiV1BillingWebhookPost.g.cs index 44de9af..c5d3b13 100644 --- a/src/libs/Presenton/Generated/Presenton.IBillingClient.StripeWebhookApiV1BillingWebhookPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IBillingClient.StripeWebhookApiV1BillingWebhookPost.g.cs @@ -13,5 +13,14 @@ public partial interface IBillingClient global::System.Threading.Tasks.Task StripeWebhookApiV1BillingWebhookPostAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stripe Webhook + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> StripeWebhookApiV1BillingWebhookPostAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetAddedCreditsApiV1CreditAddedGet.g.cs b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetAddedCreditsApiV1CreditAddedGet.g.cs index c62029f..6ff8d8f 100644 --- a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetAddedCreditsApiV1CreditAddedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetAddedCreditsApiV1CreditAddedGet.g.cs @@ -21,5 +21,22 @@ public partial interface ICreditClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Added Credits + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAddedCreditsApiV1CreditAddedGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetBalanceApiV1CreditBalanceGet.g.cs b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetBalanceApiV1CreditBalanceGet.g.cs index ca1df24..ae97dd0 100644 --- a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetBalanceApiV1CreditBalanceGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetBalanceApiV1CreditBalanceGet.g.cs @@ -13,5 +13,14 @@ public partial interface ICreditClient global::System.Threading.Tasks.Task GetBalanceApiV1CreditBalanceGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Balance + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetBalanceApiV1CreditBalanceGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetCreditAccountApiV1CreditAccountGet.g.cs b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetCreditAccountApiV1CreditAccountGet.g.cs index cfad7ee..13c63e8 100644 --- a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetCreditAccountApiV1CreditAccountGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetCreditAccountApiV1CreditAccountGet.g.cs @@ -13,5 +13,14 @@ public partial interface ICreditClient global::System.Threading.Tasks.Task GetCreditAccountApiV1CreditAccountGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Credit Account + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetCreditAccountApiV1CreditAccountGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGet.g.cs index 57c7a23..d85a201 100644 --- a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGet.g.cs @@ -13,5 +13,14 @@ public partial interface ICreditClient global::System.Threading.Tasks.Task GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Credits Rates And Auto Topup Info + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetCreditsRatesAndAutoTopupInfoApiV1CreditInfoGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetTransactionsApiV1CreditTransactionsGet.g.cs b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetTransactionsApiV1CreditTransactionsGet.g.cs index a6f15bb..ac106ab 100644 --- a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetTransactionsApiV1CreditTransactionsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetTransactionsApiV1CreditTransactionsGet.g.cs @@ -21,5 +21,22 @@ public partial interface ICreditClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Transactions + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetTransactionsApiV1CreditTransactionsGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetUsedCreditsApiV1CreditAddedIdUsedGet.g.cs b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetUsedCreditsApiV1CreditAddedIdUsedGet.g.cs index 873cfb9..c6f1928 100644 --- a/src/libs/Presenton/Generated/Presenton.ICreditClient.GetUsedCreditsApiV1CreditAddedIdUsedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ICreditClient.GetUsedCreditsApiV1CreditAddedIdUsedGet.g.cs @@ -23,5 +23,24 @@ public partial interface ICreditClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Used Credits + /// + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetUsedCreditsApiV1CreditAddedIdUsedGetAsResponseAsync( + global::System.Guid id, + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ICreditClient.SetAutoTopupApiV1CreditAutoTopupPost.g.cs b/src/libs/Presenton/Generated/Presenton.ICreditClient.SetAutoTopupApiV1CreditAutoTopupPost.g.cs index 31bc227..acbda34 100644 --- a/src/libs/Presenton/Generated/Presenton.ICreditClient.SetAutoTopupApiV1CreditAutoTopupPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ICreditClient.SetAutoTopupApiV1CreditAutoTopupPost.g.cs @@ -19,6 +19,18 @@ public partial interface ICreditClient /// /// Set Auto Topup /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SetAutoTopupApiV1CreditAutoTopupPostAsResponseAsync( + + global::Presenton.TopupInfo request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Auto Topup + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.AddCreditsApiV1DebugAddCreditsPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.AddCreditsApiV1DebugAddCreditsPost.g.cs index b49daa8..a1cd3d8 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.AddCreditsApiV1DebugAddCreditsPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.AddCreditsApiV1DebugAddCreditsPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Add Credits /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task AddCreditsApiV1DebugAddCreditsPostAsResponseAsync( + + global::Presenton.BodyAddCreditsApiV1DebugAddCreditsPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Credits + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.AddSubscriptionApiV1DebugAddSubscriptionPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.AddSubscriptionApiV1DebugAddSubscriptionPost.g.cs index 3e312fc..b23ccb7 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.AddSubscriptionApiV1DebugAddSubscriptionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.AddSubscriptionApiV1DebugAddSubscriptionPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Add Subscription /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> AddSubscriptionApiV1DebugAddSubscriptionPostAsResponseAsync( + + global::Presenton.BodyAddSubscriptionApiV1DebugAddSubscriptionPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Subscription + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.AddUserApiV1DebugAddUserPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.AddUserApiV1DebugAddUserPost.g.cs index 93555d5..3f34ff6 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.AddUserApiV1DebugAddUserPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.AddUserApiV1DebugAddUserPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Add User /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> AddUserApiV1DebugAddUserPostAsResponseAsync( + + global::Presenton.BodyAddUserApiV1DebugAddUserPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add User + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.CheckCreditBalanceApiV1DebugCheckCreditBalancePost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.CheckCreditBalanceApiV1DebugCheckCreditBalancePost.g.cs index 1f0f39f..4f7db07 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.CheckCreditBalanceApiV1DebugCheckCreditBalancePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.CheckCreditBalanceApiV1DebugCheckCreditBalancePost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Check Credit Balance /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CheckCreditBalanceApiV1DebugCheckCreditBalancePostAsResponseAsync( + + global::Presenton.BodyCheckCreditBalanceApiV1DebugCheckCreditBalancePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Check Credit Balance + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.DeleteUserApiV1DebugDeleteUserDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.DeleteUserApiV1DebugDeleteUserDelete.g.cs index 0c5a550..bbe7796 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.DeleteUserApiV1DebugDeleteUserDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.DeleteUserApiV1DebugDeleteUserDelete.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Delete User /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteUserApiV1DebugDeleteUserDeleteAsResponseAsync( + + global::Presenton.BodyDeleteUserApiV1DebugDeleteUserDelete request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete User + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.EndSubscriptionApiV1DebugEndSubscriptionPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.EndSubscriptionApiV1DebugEndSubscriptionPost.g.cs index 3f4a337..95cd88c 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.EndSubscriptionApiV1DebugEndSubscriptionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.EndSubscriptionApiV1DebugEndSubscriptionPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// End Subscription /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task EndSubscriptionApiV1DebugEndSubscriptionPostAsResponseAsync( + + global::Presenton.BodyEndSubscriptionApiV1DebugEndSubscriptionPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// End Subscription + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.GetJwtTokenApiV1DebugGetJwtTokenPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.GetJwtTokenApiV1DebugGetJwtTokenPost.g.cs index 438bbc1..e82edfb 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.GetJwtTokenApiV1DebugGetJwtTokenPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.GetJwtTokenApiV1DebugGetJwtTokenPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Get Jwt Token /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetJwtTokenApiV1DebugGetJwtTokenPostAsResponseAsync( + + global::Presenton.BodyGetJwtTokenApiV1DebugGetJwtTokenPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Jwt Token + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.RaiseExceptionApiV1DebugRaiseExceptionPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.RaiseExceptionApiV1DebugRaiseExceptionPost.g.cs index 7118595..4da5081 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.RaiseExceptionApiV1DebugRaiseExceptionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.RaiseExceptionApiV1DebugRaiseExceptionPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Raise Exception /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> RaiseExceptionApiV1DebugRaiseExceptionPostAsResponseAsync( + + global::Presenton.BodyRaiseExceptionApiV1DebugRaiseExceptionPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Raise Exception + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPost.g.cs index abecfce..3dabe3a 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Send Low Balance Email /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task SendLowBalanceEmailApiV1DebugSendLowBalanceEmailPostAsResponseAsync( + + global::Presenton.BodySendLowBalanceEmailApiV1DebugSendLowBalanceEmailPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Send Low Balance Email + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPost.g.cs index 3e09924..9bef42e 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Send Password Reset Email /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task SendPasswordResetEmailApiV1DebugSendPasswordResetEmailPostAsResponseAsync( + + global::Presenton.BodySendPasswordResetEmailApiV1DebugSendPasswordResetEmailPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Send Password Reset Email + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPost.g.cs index e5de1fb..657b33b 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Send Payment Failed Email /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task SendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPostAsResponseAsync( + + global::Presenton.BodySendPaymentFailedEmailApiV1DebugSendPaymentFailedEmailPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Send Payment Failed Email + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.SendVerificationEmailApiV1DebugSendVerificationEmailPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.SendVerificationEmailApiV1DebugSendVerificationEmailPost.g.cs index 77d3996..5f52fa8 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.SendVerificationEmailApiV1DebugSendVerificationEmailPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.SendVerificationEmailApiV1DebugSendVerificationEmailPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Send Verification Email /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task SendVerificationEmailApiV1DebugSendVerificationEmailPostAsResponseAsync( + + global::Presenton.BodySendVerificationEmailApiV1DebugSendVerificationEmailPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Send Verification Email + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.SendWelcomeEmailApiV1DebugSendWelcomeEmailPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.SendWelcomeEmailApiV1DebugSendWelcomeEmailPost.g.cs index 6b79b15..bde5590 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.SendWelcomeEmailApiV1DebugSendWelcomeEmailPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.SendWelcomeEmailApiV1DebugSendWelcomeEmailPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Send Welcome Email /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task SendWelcomeEmailApiV1DebugSendWelcomeEmailPostAsResponseAsync( + + global::Presenton.BodySendWelcomeEmailApiV1DebugSendWelcomeEmailPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Send Welcome Email + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IDebugClient.TestJobApiV1DebugTestJobPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDebugClient.TestJobApiV1DebugTestJobPost.g.cs index 97bf243..ddafefa 100644 --- a/src/libs/Presenton/Generated/Presenton.IDebugClient.TestJobApiV1DebugTestJobPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDebugClient.TestJobApiV1DebugTestJobPost.g.cs @@ -19,6 +19,18 @@ public partial interface IDebugClient /// /// Test Job /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task TestJobApiV1DebugTestJobPostAsResponseAsync( + + global::Presenton.BodyTestJobApiV1DebugTestJobPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Test Job + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IDesignSystemClient.ExtractDesignSystemApiV1PptDesignSystemExtractPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDesignSystemClient.ExtractDesignSystemApiV1PptDesignSystemExtractPost.g.cs index fe88f25..7b16033 100644 --- a/src/libs/Presenton/Generated/Presenton.IDesignSystemClient.ExtractDesignSystemApiV1PptDesignSystemExtractPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDesignSystemClient.ExtractDesignSystemApiV1PptDesignSystemExtractPost.g.cs @@ -25,6 +25,21 @@ public partial interface IDesignSystemClient /// sends all images and the markdown to OpenAI Responses API with EXTRACT_DESIGN_SYSTEM_PROMPT,
/// and returns the extracted design system JSON. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ExtractDesignSystemApiV1PptDesignSystemExtractPostAsResponseAsync( + + global::Presenton.ExtractDesignSystemRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Extract Design System
+ /// Accepts an array of slides (image + markdown_content), concatenates markdown,
+ /// sends all images and the markdown to OpenAI Responses API with EXTRACT_DESIGN_SYSTEM_PROMPT,
+ /// and returns the extracted design system JSON. + ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IDownloadsClient.AddDownloadApiV3DownloadsAddPost.g.cs b/src/libs/Presenton/Generated/Presenton.IDownloadsClient.AddDownloadApiV3DownloadsAddPost.g.cs index 33e25df..cc33c4a 100644 --- a/src/libs/Presenton/Generated/Presenton.IDownloadsClient.AddDownloadApiV3DownloadsAddPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IDownloadsClient.AddDownloadApiV3DownloadsAddPost.g.cs @@ -17,5 +17,18 @@ public partial interface IDownloadsClient global::Presenton.DownloadFormat format, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Download + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> AddDownloadApiV3DownloadsAddPostAsResponseAsync( + global::Presenton.Device device, + global::Presenton.DownloadFormat format, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IFilesClient.DecomposeFilesApiV1PptFilesDecomposePost.g.cs b/src/libs/Presenton/Generated/Presenton.IFilesClient.DecomposeFilesApiV1PptFilesDecomposePost.g.cs index c492077..d2aefa8 100644 --- a/src/libs/Presenton/Generated/Presenton.IFilesClient.DecomposeFilesApiV1PptFilesDecomposePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IFilesClient.DecomposeFilesApiV1PptFilesDecomposePost.g.cs @@ -19,6 +19,18 @@ public partial interface IFilesClient /// /// Decompose Files /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> DecomposeFilesApiV1PptFilesDecomposePostAsResponseAsync( + + global::Presenton.BodyDecomposeFilesApiV1PptFilesDecomposePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Decompose Files + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPost.g.cs b/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPost.g.cs index 2aadca8..073666e 100644 --- a/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPost.g.cs @@ -19,6 +19,18 @@ public partial interface IFilesClient /// /// Upload Files And Get Temporary Urls /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> UploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPostAsResponseAsync( + + global::Presenton.BodyUploadFilesAndGetTemporaryUrlsApiV1PptFilesUploadAndGetTemporaryUrlsPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Files And Get Temporary Urls + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesForUiApiV1PptFilesUploadUiPost.g.cs b/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesForUiApiV1PptFilesUploadUiPost.g.cs index 96fbb16..0ad4386 100644 --- a/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesForUiApiV1PptFilesUploadUiPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesForUiApiV1PptFilesUploadUiPost.g.cs @@ -19,6 +19,18 @@ public partial interface IFilesClient /// /// Upload Files For Ui /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> UploadFilesForUiApiV1PptFilesUploadUiPostAsResponseAsync( + + global::Presenton.BodyUploadFilesForUiApiV1PptFilesUploadUiPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Files For Ui + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesV1ApiV1PptFilesUploadPost.g.cs b/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesV1ApiV1PptFilesUploadPost.g.cs index d364c3d..11a08d7 100644 --- a/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesV1ApiV1PptFilesUploadPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IFilesClient.UploadFilesV1ApiV1PptFilesUploadPost.g.cs @@ -25,6 +25,21 @@ public partial interface IFilesClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> UploadFilesV1ApiV1PptFilesUploadPostAsResponseAsync( + + global::Presenton.BodyUploadFilesV1ApiV1PptFilesUploadPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Files V1
+ /// Upload files to be used later.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IFontsClient.CheckFontsInPptxApiV1PptFontsCheckPost.g.cs b/src/libs/Presenton/Generated/Presenton.IFontsClient.CheckFontsInPptxApiV1PptFontsCheckPost.g.cs index 43d98f2..50cee57 100644 --- a/src/libs/Presenton/Generated/Presenton.IFontsClient.CheckFontsInPptxApiV1PptFontsCheckPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IFontsClient.CheckFontsInPptxApiV1PptFontsCheckPost.g.cs @@ -19,6 +19,18 @@ public partial interface IFontsClient /// /// Check Fonts In Pptx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CheckFontsInPptxApiV1PptFontsCheckPostAsResponseAsync( + + global::Presenton.BodyCheckFontsInPptxApiV1PptFontsCheckPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Check Fonts In Pptx + /// /// /// PPTX file to analyze fonts from /// @@ -33,5 +45,40 @@ public partial interface IFontsClient string pptxFilename, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Check Fonts In Pptx + /// + /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CheckFontsInPptxApiV1PptFontsCheckPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Check Fonts In Pptx + /// + /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CheckFontsInPptxApiV1PptFontsCheckPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IFontsClient.DeleteFontApiV1PptFontsFontIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IFontsClient.DeleteFontApiV1PptFontsFontIdDelete.g.cs index b5273af..aa3fc4b 100644 --- a/src/libs/Presenton/Generated/Presenton.IFontsClient.DeleteFontApiV1PptFontsFontIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IFontsClient.DeleteFontApiV1PptFontsFontIdDelete.g.cs @@ -15,5 +15,16 @@ public partial interface IFontsClient global::System.Guid fontId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Font + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteFontApiV1PptFontsFontIdDeleteAsResponseAsync( + global::System.Guid fontId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IFontsClient.ListFontsApiV1PptFontsUploadedGet.g.cs b/src/libs/Presenton/Generated/Presenton.IFontsClient.ListFontsApiV1PptFontsUploadedGet.g.cs index b6d9521..0418a25 100644 --- a/src/libs/Presenton/Generated/Presenton.IFontsClient.ListFontsApiV1PptFontsUploadedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IFontsClient.ListFontsApiV1PptFontsUploadedGet.g.cs @@ -13,5 +13,14 @@ public partial interface IFontsClient global::System.Threading.Tasks.Task ListFontsApiV1PptFontsUploadedGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Fonts + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListFontsApiV1PptFontsUploadedGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IFontsClient.UploadFontApiV1PptFontsUploadPost.g.cs b/src/libs/Presenton/Generated/Presenton.IFontsClient.UploadFontApiV1PptFontsUploadPost.g.cs index 21e629d..3d7315f 100644 --- a/src/libs/Presenton/Generated/Presenton.IFontsClient.UploadFontApiV1PptFontsUploadPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IFontsClient.UploadFontApiV1PptFontsUploadPost.g.cs @@ -19,6 +19,18 @@ public partial interface IFontsClient /// /// Upload Font /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadFontApiV1PptFontsUploadPostAsResponseAsync( + + global::Presenton.BodyUploadFontApiV1PptFontsUploadPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Font + /// /// /// Font file to upload (.ttf, .otf, .woff, .woff2, .eot) /// @@ -33,5 +45,40 @@ public partial interface IFontsClient string filename, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Upload Font + /// + /// + /// Font file to upload (.ttf, .otf, .woff, .woff2, .eot) + /// + /// + /// Font file to upload (.ttf, .otf, .woff, .woff2, .eot) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UploadFontApiV1PptFontsUploadPostAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Font + /// + /// + /// Font file to upload (.ttf, .otf, .woff, .woff2, .eot) + /// + /// + /// Font file to upload (.ttf, .otf, .woff, .woff2, .eot) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadFontApiV1PptFontsUploadPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IHealthClient.HealthApiV1HealthGet.g.cs b/src/libs/Presenton/Generated/Presenton.IHealthClient.HealthApiV1HealthGet.g.cs index a7f232a..a9c544a 100644 --- a/src/libs/Presenton/Generated/Presenton.IHealthClient.HealthApiV1HealthGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IHealthClient.HealthApiV1HealthGet.g.cs @@ -13,5 +13,14 @@ public partial interface IHealthClient global::System.Threading.Tasks.Task HealthApiV1HealthGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Health + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> HealthApiV1HealthGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IHtmlCreateClient.InitHtmlCreateApiV1PptHtmlCreateInitPost.g.cs b/src/libs/Presenton/Generated/Presenton.IHtmlCreateClient.InitHtmlCreateApiV1PptHtmlCreateInitPost.g.cs index c9daae3..8807aae 100644 --- a/src/libs/Presenton/Generated/Presenton.IHtmlCreateClient.InitHtmlCreateApiV1PptHtmlCreateInitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IHtmlCreateClient.InitHtmlCreateApiV1PptHtmlCreateInitPost.g.cs @@ -19,6 +19,18 @@ public partial interface IHtmlCreateClient /// /// Init Html Create /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> InitHtmlCreateApiV1PptHtmlCreateInitPostAsResponseAsync( + + global::Presenton.BodyInitHtmlCreateApiV1PptHtmlCreateInitPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Init Html Create + /// /// /// Primary reference/sketch image (optional) /// @@ -47,5 +59,68 @@ public partial interface IHtmlCreateClient string? templateId = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Init Html Create + /// + /// + /// Primary reference/sketch image (optional) + /// + /// + /// Primary reference/sketch image (optional) + /// + /// + /// + /// Optional existing HTML content to inform create + /// + /// + /// Text prompt describing the slide to create + /// + /// + /// Template identifier (any string) whose design system should guide create + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task InitHtmlCreateApiV1PptHtmlCreateInitPostAsync( + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + global::System.Collections.Generic.IList? additionalImages = default, + string? html = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Init Html Create + /// + /// + /// Primary reference/sketch image (optional) + /// + /// + /// Primary reference/sketch image (optional) + /// + /// + /// + /// Optional existing HTML content to inform create + /// + /// + /// Text prompt describing the slide to create + /// + /// + /// Template identifier (any string) whose design system should guide create + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> InitHtmlCreateApiV1PptHtmlCreateInitPostAsResponseAsync( + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + global::System.Collections.Generic.IList? additionalImages = default, + string? html = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IHtmlCreateClient.StreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IHtmlCreateClient.StreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGet.g.cs index 240e1f8..1e9f54c 100644 --- a/src/libs/Presenton/Generated/Presenton.IHtmlCreateClient.StreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IHtmlCreateClient.StreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IHtmlCreateClient global::System.Guid sessionId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream Html Create + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> StreamHtmlCreateApiV1PptHtmlCreateStreamSessionIdGetAsResponseAsync( + global::System.Guid sessionId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.EditHtmlWithImagesEndpointApiV1PptHtmlEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.EditHtmlWithImagesEndpointApiV1PptHtmlEditPost.g.cs index 62e10a3..868cdb7 100644 --- a/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.EditHtmlWithImagesEndpointApiV1PptHtmlEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.EditHtmlWithImagesEndpointApiV1PptHtmlEditPost.g.cs @@ -35,6 +35,26 @@ public partial interface IHtmlEditClient /// Returns:
/// HtmlEditResponse with edited HTML /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsResponseAsync( + + global::Presenton.BodyEditHtmlWithImagesEndpointApiV1PptHtmlEditPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit Html With Images Endpoint
+ /// Edit HTML content based on one or two uploaded images and a text prompt using Anthropic Claude API.
+ /// Args:
+ /// current_ui_image: Uploaded current UI image file
+ /// sketch_image: Uploaded sketch/indication image file (optional)
+ /// html: Current HTML content to edit (form data)
+ /// prompt: Text prompt describing the changes (form data)
+ /// Returns:
+ /// HtmlEditResponse with edited HTML + ///
/// /// Current UI image file /// @@ -69,5 +89,96 @@ public partial interface IHtmlEditClient string? templateId = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Edit Html With Images Endpoint
+ /// Edit HTML content based on one or two uploaded images and a text prompt using Anthropic Claude API.
+ /// Args:
+ /// current_ui_image: Uploaded current UI image file
+ /// sketch_image: Uploaded sketch/indication image file (optional)
+ /// html: Current HTML content to edit (form data)
+ /// prompt: Text prompt describing the changes (form data)
+ /// Returns:
+ /// HtmlEditResponse with edited HTML + ///
+ /// + /// Current UI image file + /// + /// + /// Current UI image file + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Current HTML content to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Template identifier (any string) whose design system should guide edits + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsync( + global::System.IO.Stream currentUiImage, + string currentUiImagename, + string html, + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit Html With Images Endpoint
+ /// Edit HTML content based on one or two uploaded images and a text prompt using Anthropic Claude API.
+ /// Args:
+ /// current_ui_image: Uploaded current UI image file
+ /// sketch_image: Uploaded sketch/indication image file (optional)
+ /// html: Current HTML content to edit (form data)
+ /// prompt: Text prompt describing the changes (form data)
+ /// Returns:
+ /// HtmlEditResponse with edited HTML + ///
+ /// + /// Current UI image file + /// + /// + /// Current UI image file + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Current HTML content to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Template identifier (any string) whose design system should guide edits + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EditHtmlWithImagesEndpointApiV1PptHtmlEditPostAsResponseAsync( + global::System.IO.Stream currentUiImage, + string currentUiImagename, + string html, + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.InitHtmlEditApiV1PptHtmlEditInitPost.g.cs b/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.InitHtmlEditApiV1PptHtmlEditInitPost.g.cs index 6c242d2..ccfa22b 100644 --- a/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.InitHtmlEditApiV1PptHtmlEditInitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.InitHtmlEditApiV1PptHtmlEditInitPost.g.cs @@ -19,6 +19,18 @@ public partial interface IHtmlEditClient /// /// Init Html Edit /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> InitHtmlEditApiV1PptHtmlEditInitPostAsResponseAsync( + + global::Presenton.BodyInitHtmlEditApiV1PptHtmlEditInitPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Init Html Edit + /// /// /// Current UI image file /// @@ -55,5 +67,84 @@ public partial interface IHtmlEditClient string? templateId = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Init Html Edit + /// + /// + /// Current UI image file + /// + /// + /// Current UI image file + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// + /// Current HTML content to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Template identifier (any string) whose design system should guide edits + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task InitHtmlEditApiV1PptHtmlEditInitPostAsync( + global::System.IO.Stream currentUiImage, + string currentUiImagename, + string html, + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + global::System.Collections.Generic.IList? additionalImages = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Init Html Edit + /// + /// + /// Current UI image file + /// + /// + /// Current UI image file + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// + /// Current HTML content to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Template identifier (any string) whose design system should guide edits + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> InitHtmlEditApiV1PptHtmlEditInitPostAsResponseAsync( + global::System.IO.Stream currentUiImage, + string currentUiImagename, + string html, + string prompt, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + global::System.Collections.Generic.IList? additionalImages = default, + string? templateId = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.StreamHtmlEditApiV1PptHtmlEditStreamSessionIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.StreamHtmlEditApiV1PptHtmlEditStreamSessionIdGet.g.cs index dfc9ed1..1c3273a 100644 --- a/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.StreamHtmlEditApiV1PptHtmlEditStreamSessionIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IHtmlEditClient.StreamHtmlEditApiV1PptHtmlEditStreamSessionIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IHtmlEditClient global::System.Guid sessionId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream Html Edit + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> StreamHtmlEditApiV1PptHtmlEditStreamSessionIdGetAsResponseAsync( + global::System.Guid sessionId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IHtmlToReactClient.ConvertHtmlToReactApiV1PptHtmlToReactPost.g.cs b/src/libs/Presenton/Generated/Presenton.IHtmlToReactClient.ConvertHtmlToReactApiV1PptHtmlToReactPost.g.cs index da8d050..aac9afd 100644 --- a/src/libs/Presenton/Generated/Presenton.IHtmlToReactClient.ConvertHtmlToReactApiV1PptHtmlToReactPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IHtmlToReactClient.ConvertHtmlToReactApiV1PptHtmlToReactPost.g.cs @@ -29,6 +29,23 @@ public partial interface IHtmlToReactClient /// Returns:
/// HtmlToReactResponse with generated React component /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ConvertHtmlToReactApiV1PptHtmlToReactPostAsResponseAsync( + + global::Presenton.HtmlToReactRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Convert Html To React
+ /// Convert HTML content to TSX React component using Anthropic Claude API.
+ /// Args:
+ /// request: JSON request containing HTML content
+ /// Returns:
+ /// HtmlToReactResponse with generated React component + ///
/// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IIconsClient.SearchIconsApiV1PptIconsSearchGet.g.cs b/src/libs/Presenton/Generated/Presenton.IIconsClient.SearchIconsApiV1PptIconsSearchGet.g.cs index 8389c58..4912cd0 100644 --- a/src/libs/Presenton/Generated/Presenton.IIconsClient.SearchIconsApiV1PptIconsSearchGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IIconsClient.SearchIconsApiV1PptIconsSearchGet.g.cs @@ -19,5 +19,20 @@ public partial interface IIconsClient int? limit = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Search Icons + /// + /// + /// + /// Default Value: 20 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> SearchIconsApiV1PptIconsSearchGetAsResponseAsync( + string query, + int? limit = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IImagesClient.DeleteUploadedImageByIdForUiApiV1PptImagesIdUiDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IImagesClient.DeleteUploadedImageByIdForUiApiV1PptImagesIdUiDelete.g.cs index 8d9cbd7..8b3ff76 100644 --- a/src/libs/Presenton/Generated/Presenton.IImagesClient.DeleteUploadedImageByIdForUiApiV1PptImagesIdUiDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IImagesClient.DeleteUploadedImageByIdForUiApiV1PptImagesIdUiDelete.g.cs @@ -15,5 +15,16 @@ public partial interface IImagesClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Uploaded Image By Id For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IImagesClient.DeleteUploadedImageByIdV1ApiV1PptImagesIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IImagesClient.DeleteUploadedImageByIdV1ApiV1PptImagesIdDelete.g.cs index d0bb3b8..440f093 100644 --- a/src/libs/Presenton/Generated/Presenton.IImagesClient.DeleteUploadedImageByIdV1ApiV1PptImagesIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IImagesClient.DeleteUploadedImageByIdV1ApiV1PptImagesIdDelete.g.cs @@ -18,5 +18,19 @@ public partial interface IImagesClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Uploaded Image By Id V1
+ /// Delete an uploaded image by id.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IImagesClient.GenerateImageApiV1PptImagesGenerateGet.g.cs b/src/libs/Presenton/Generated/Presenton.IImagesClient.GenerateImageApiV1PptImagesGenerateGet.g.cs index db78c99..d2e82b4 100644 --- a/src/libs/Presenton/Generated/Presenton.IImagesClient.GenerateImageApiV1PptImagesGenerateGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IImagesClient.GenerateImageApiV1PptImagesGenerateGet.g.cs @@ -19,5 +19,20 @@ public partial interface IImagesClient global::Presenton.GenerateImageApiV1PptImagesGenerateGetImageType? imageType = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Image + /// + /// + /// + /// Default Value: stock + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GenerateImageApiV1PptImagesGenerateGetAsResponseAsync( + string prompt, + global::Presenton.GenerateImageApiV1PptImagesGenerateGetImageType? imageType = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IImagesClient.GenerateImagesApiV2PptImagesGenerateGet.g.cs b/src/libs/Presenton/Generated/Presenton.IImagesClient.GenerateImagesApiV2PptImagesGenerateGet.g.cs index 38ae98a..7e1e2b3 100644 --- a/src/libs/Presenton/Generated/Presenton.IImagesClient.GenerateImagesApiV2PptImagesGenerateGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IImagesClient.GenerateImagesApiV2PptImagesGenerateGet.g.cs @@ -23,5 +23,24 @@ public partial interface IImagesClient int? count = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Images + /// + /// + /// + /// Default Value: stock + /// + /// + /// Default Value: 1 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GenerateImagesApiV2PptImagesGenerateGetAsResponseAsync( + string prompt, + global::Presenton.GenerateImagesApiV2PptImagesGenerateGetImageType? imageType = default, + int? count = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IImagesClient.GetGeneratedImagesApiV1PptImagesGeneratedGet.g.cs b/src/libs/Presenton/Generated/Presenton.IImagesClient.GetGeneratedImagesApiV1PptImagesGeneratedGet.g.cs index 71b84b8..cfa52d2 100644 --- a/src/libs/Presenton/Generated/Presenton.IImagesClient.GetGeneratedImagesApiV1PptImagesGeneratedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IImagesClient.GetGeneratedImagesApiV1PptImagesGeneratedGet.g.cs @@ -21,5 +21,22 @@ public partial interface IImagesClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Generated Images + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetGeneratedImagesApiV1PptImagesGeneratedGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IImagesClient.GetUploadedImagesForUiApiV1PptImagesUploadedUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.IImagesClient.GetUploadedImagesForUiApiV1PptImagesUploadedUiGet.g.cs index f5be7bf..8b34bfb 100644 --- a/src/libs/Presenton/Generated/Presenton.IImagesClient.GetUploadedImagesForUiApiV1PptImagesUploadedUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IImagesClient.GetUploadedImagesForUiApiV1PptImagesUploadedUiGet.g.cs @@ -13,5 +13,14 @@ public partial interface IImagesClient global::System.Threading.Tasks.Task GetUploadedImagesForUiApiV1PptImagesUploadedUiGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Uploaded Images For Ui + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetUploadedImagesForUiApiV1PptImagesUploadedUiGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IImagesClient.GetUploadedImagesV1ApiV1PptImagesUploadedGet.g.cs b/src/libs/Presenton/Generated/Presenton.IImagesClient.GetUploadedImagesV1ApiV1PptImagesUploadedGet.g.cs index efd4e0a..0711a34 100644 --- a/src/libs/Presenton/Generated/Presenton.IImagesClient.GetUploadedImagesV1ApiV1PptImagesUploadedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IImagesClient.GetUploadedImagesV1ApiV1PptImagesUploadedGet.g.cs @@ -16,5 +16,17 @@ public partial interface IImagesClient global::System.Threading.Tasks.Task GetUploadedImagesV1ApiV1PptImagesUploadedGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Uploaded Images V1
+ /// Get all uploaded images.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetUploadedImagesV1ApiV1PptImagesUploadedGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IImagesClient.UploadImageForUiApiV1PptImagesUploadUiPost.g.cs b/src/libs/Presenton/Generated/Presenton.IImagesClient.UploadImageForUiApiV1PptImagesUploadUiPost.g.cs index 8c33c4f..6146a51 100644 --- a/src/libs/Presenton/Generated/Presenton.IImagesClient.UploadImageForUiApiV1PptImagesUploadUiPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IImagesClient.UploadImageForUiApiV1PptImagesUploadUiPost.g.cs @@ -19,6 +19,18 @@ public partial interface IImagesClient /// /// Upload Image For Ui /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadImageForUiApiV1PptImagesUploadUiPostAsResponseAsync( + + global::Presenton.BodyUploadImageForUiApiV1PptImagesUploadUiPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Image For Ui + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -29,5 +41,36 @@ public partial interface IImagesClient string filename, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Upload Image For Ui + /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UploadImageForUiApiV1PptImagesUploadUiPostAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Image For Ui + /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadImageForUiApiV1PptImagesUploadUiPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IImagesClient.UploadImageV1ApiV1PptImagesUploadPost.g.cs b/src/libs/Presenton/Generated/Presenton.IImagesClient.UploadImageV1ApiV1PptImagesUploadPost.g.cs index 7e00434..e6efdf3 100644 --- a/src/libs/Presenton/Generated/Presenton.IImagesClient.UploadImageV1ApiV1PptImagesUploadPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IImagesClient.UploadImageV1ApiV1PptImagesUploadPost.g.cs @@ -25,6 +25,21 @@ public partial interface IImagesClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadImageV1ApiV1PptImagesUploadPostAsResponseAsync( + + global::Presenton.BodyUploadImageV1ApiV1PptImagesUploadPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Image V1
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -35,5 +50,42 @@ public partial interface IImagesClient string filename, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Upload Image V1
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UploadImageV1ApiV1PptImagesUploadPostAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Image V1
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadImageV1ApiV1PptImagesUploadPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IMockClient.MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGet.g.cs b/src/libs/Presenton/Generated/Presenton.IMockClient.MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGet.g.cs index 0796adc..38db23a 100644 --- a/src/libs/Presenton/Generated/Presenton.IMockClient.MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IMockClient.MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGet.g.cs @@ -13,5 +13,14 @@ public partial interface IMockClient global::System.Threading.Tasks.Task> MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Mock Presentation Generation Completed + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IMockClient.MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGet.g.cs b/src/libs/Presenton/Generated/Presenton.IMockClient.MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGet.g.cs index e58e64e..46bc141 100644 --- a/src/libs/Presenton/Generated/Presenton.IMockClient.MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IMockClient.MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGet.g.cs @@ -13,5 +13,14 @@ public partial interface IMockClient global::System.Threading.Tasks.Task> MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Mock Presentation Generation Failed + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IOutlinesClient.GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.IOutlinesClient.GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePost.g.cs index b015be4..6a1eee8 100644 --- a/src/libs/Presenton/Generated/Presenton.IOutlinesClient.GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IOutlinesClient.GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePost.g.cs @@ -19,6 +19,18 @@ public partial interface IOutlinesClient /// /// Generate Outlines Sync V1 /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostAsResponseAsync( + + global::Presenton.GenerateOutlinesRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Outlines Sync V1 + /// /// /// The content for generating the presentation /// diff --git a/src/libs/Presenton/Generated/Presenton.IOutlinesClient.StreamOutlinesApiV1PptOutlinesStreamIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IOutlinesClient.StreamOutlinesApiV1PptOutlinesStreamIdGet.g.cs index c8edaed..29702fc 100644 --- a/src/libs/Presenton/Generated/Presenton.IOutlinesClient.StreamOutlinesApiV1PptOutlinesStreamIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IOutlinesClient.StreamOutlinesApiV1PptOutlinesStreamIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IOutlinesClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream Outlines + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> StreamOutlinesApiV1PptOutlinesStreamIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPdfSlidesClient.ProcessPdfSlidesApiV1PptPdfSlidesProcessPost.g.cs b/src/libs/Presenton/Generated/Presenton.IPdfSlidesClient.ProcessPdfSlidesApiV1PptPdfSlidesProcessPost.g.cs index f78aa4b..e34a59b 100644 --- a/src/libs/Presenton/Generated/Presenton.IPdfSlidesClient.ProcessPdfSlidesApiV1PptPdfSlidesProcessPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPdfSlidesClient.ProcessPdfSlidesApiV1PptPdfSlidesProcessPost.g.cs @@ -31,6 +31,24 @@ public partial interface IPdfSlidesClient /// 3. Returns screenshot URLs for each slide/page
/// Note: Font installation is not needed since PDFs already have fonts embedded. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsResponseAsync( + + global::Presenton.BodyProcessPdfSlidesApiV1PptPdfSlidesProcessPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Process Pdf Slides
+ /// Process a PDF file to extract slide screenshots.
+ /// This endpoint:
+ /// 1. Validates the uploaded PDF file
+ /// 2. Uses ImageMagick to convert PDF pages to PNG images
+ /// 3. Returns screenshot URLs for each slide/page
+ /// Note: Font installation is not needed since PDFs already have fonts embedded. + ///
/// /// PDF file to process /// @@ -45,5 +63,52 @@ public partial interface IPdfSlidesClient string pdfFilename, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Process Pdf Slides
+ /// Process a PDF file to extract slide screenshots.
+ /// This endpoint:
+ /// 1. Validates the uploaded PDF file
+ /// 2. Uses ImageMagick to convert PDF pages to PNG images
+ /// 3. Returns screenshot URLs for each slide/page
+ /// Note: Font installation is not needed since PDFs already have fonts embedded. + ///
+ /// + /// PDF file to process + /// + /// + /// PDF file to process + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync( + global::System.IO.Stream pdfFile, + string pdfFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Process Pdf Slides
+ /// Process a PDF file to extract slide screenshots.
+ /// This endpoint:
+ /// 1. Validates the uploaded PDF file
+ /// 2. Uses ImageMagick to convert PDF pages to PNG images
+ /// 3. Returns screenshot URLs for each slide/page
+ /// Note: Font installation is not needed since PDFs already have fonts embedded. + ///
+ /// + /// PDF file to process + /// + /// + /// PDF file to process + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsResponseAsync( + global::System.IO.Stream pdfFile, + string pdfFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPptxFontsClient.ProcessPptxFontsApiV1PptPptxFontsProcessPost.g.cs b/src/libs/Presenton/Generated/Presenton.IPptxFontsClient.ProcessPptxFontsApiV1PptPptxFontsProcessPost.g.cs index ee05dc3..1160ac2 100644 --- a/src/libs/Presenton/Generated/Presenton.IPptxFontsClient.ProcessPptxFontsApiV1PptPptxFontsProcessPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPptxFontsClient.ProcessPptxFontsApiV1PptPptxFontsProcessPost.g.cs @@ -23,6 +23,20 @@ public partial interface IPptxFontsClient /// Analyze a PPTX file and return only the fonts used in the document.
/// Uses the exact same font extraction and analysis utilities as the /pptx-slides endpoint. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ProcessPptxFontsApiV1PptPptxFontsProcessPostAsResponseAsync( + + global::Presenton.BodyProcessPptxFontsApiV1PptPptxFontsProcessPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Process Pptx Fonts
+ /// Analyze a PPTX file and return only the fonts used in the document.
+ /// Uses the exact same font extraction and analysis utilities as the /pptx-slides endpoint. + ///
/// /// PPTX file to analyze fonts from /// @@ -37,5 +51,44 @@ public partial interface IPptxFontsClient string pptxFilename, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Process Pptx Fonts
+ /// Analyze a PPTX file and return only the fonts used in the document.
+ /// Uses the exact same font extraction and analysis utilities as the /pptx-slides endpoint. + ///
+ /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Process Pptx Fonts
+ /// Analyze a PPTX file and return only the fonts used in the document.
+ /// Uses the exact same font extraction and analysis utilities as the /pptx-slides endpoint. + ///
+ /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ProcessPptxFontsApiV1PptPptxFontsProcessPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPptxSlidesClient.ProcessPptxSlidesApiV1PptPptxSlidesProcessPost.g.cs b/src/libs/Presenton/Generated/Presenton.IPptxSlidesClient.ProcessPptxSlidesApiV1PptPptxSlidesProcessPost.g.cs index b017401..64bde95 100644 --- a/src/libs/Presenton/Generated/Presenton.IPptxSlidesClient.ProcessPptxSlidesApiV1PptPptxSlidesProcessPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPptxSlidesClient.ProcessPptxSlidesApiV1PptPptxSlidesProcessPost.g.cs @@ -33,6 +33,25 @@ public partial interface IPptxSlidesClient /// 4. Uses LibreOffice to generate slide screenshots
/// 5. Returns both screenshot URLs and XML content for each slide /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsResponseAsync( + + global::Presenton.BodyProcessPptxSlidesApiV1PptPptxSlidesProcessPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Process Pptx Slides
+ /// Process a PPTX file to extract slide screenshots and XML content.
+ /// This endpoint:
+ /// 1. Validates the uploaded PPTX file
+ /// 2. Installs any provided font files
+ /// 3. Unzips the PPTX to extract slide XMLs
+ /// 4. Uses LibreOffice to generate slide screenshots
+ /// 5. Returns both screenshot URLs and XML content for each slide + ///
/// /// PPTX file to process /// @@ -51,5 +70,62 @@ public partial interface IPptxSlidesClient global::System.Collections.Generic.IList? fonts = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Process Pptx Slides
+ /// Process a PPTX file to extract slide screenshots and XML content.
+ /// This endpoint:
+ /// 1. Validates the uploaded PPTX file
+ /// 2. Installs any provided font files
+ /// 3. Unzips the PPTX to extract slide XMLs
+ /// 4. Uses LibreOffice to generate slide screenshots
+ /// 5. Returns both screenshot URLs and XML content for each slide + ///
+ /// + /// PPTX file to process + /// + /// + /// PPTX file to process + /// + /// + /// Optional font files + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fonts = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Process Pptx Slides
+ /// Process a PPTX file to extract slide screenshots and XML content.
+ /// This endpoint:
+ /// 1. Validates the uploaded PPTX file
+ /// 2. Installs any provided font files
+ /// 3. Unzips the PPTX to extract slide XMLs
+ /// 4. Uses LibreOffice to generate slide screenshots
+ /// 5. Returns both screenshot URLs and XML content for each slide + ///
+ /// + /// PPTX file to process + /// + /// + /// PPTX file to process + /// + /// + /// Optional font files + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fonts = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.CheckAsyncPresentationGenerationStatusApiV1PptPresentationStatusIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.CheckAsyncPresentationGenerationStatusApiV1PptPresentationStatusIdGet.g.cs index ceb39f4..e67aa33 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.CheckAsyncPresentationGenerationStatusApiV1PptPresentationStatusIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.CheckAsyncPresentationGenerationStatusApiV1PptPresentationStatusIdGet.g.cs @@ -21,5 +21,22 @@ public partial interface IPresentationClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Check Async Presentation Generation Status
+ /// Check the status of a presentation being generated asynchronously.
+ /// Use /api/v1/ppt/presentation/status/task-xxxxxxxxxx to get the status of presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// ID of the presentation generation task + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CheckAsyncPresentationGenerationStatusApiV1PptPresentationStatusIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationApiV1PptPresentationCreatePost.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationApiV1PptPresentationCreatePost.g.cs index 0f88e10..ae60337 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationApiV1PptPresentationCreatePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationApiV1PptPresentationCreatePost.g.cs @@ -19,6 +19,18 @@ public partial interface IPresentationClient /// /// Create Presentation /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreatePresentationApiV1PptPresentationCreatePostAsResponseAsync( + + global::Presenton.BodyCreatePresentationApiV1PptPresentationCreatePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Presentation + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPost.g.cs index 8dc0eb8..0fd9794 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPost.g.cs @@ -27,6 +27,22 @@ public partial interface IPresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPostAsResponseAsync( + + global::Presenton.CreatePresentationFromJsonRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Presentation From Json Async V1
+ /// Create a presentation from JSON asynchronously.
+ /// Use /api/v1/ppt/presentation/status/task-xxxxxxxxxx to get the status of presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The language of the presentation
/// Default Value: English diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPost.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPost.g.cs index 1df6ef0..75e3782 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPost.g.cs @@ -25,6 +25,21 @@ public partial interface IPresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPostAsResponseAsync( + + global::Presenton.CreatePresentationFromJsonRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Presentation From Json Sync V1
+ /// Create a presentation from JSON synchronously.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The language of the presentation
/// Default Value: English diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.DeletePresentationByIdApiV1PptPresentationIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.DeletePresentationByIdApiV1PptPresentationIdDelete.g.cs index 2d9a447..b72961b 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.DeletePresentationByIdApiV1PptPresentationIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.DeletePresentationByIdApiV1PptPresentationIdDelete.g.cs @@ -18,5 +18,19 @@ public partial interface IPresentationClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Presentation By Id
+ /// Delete a presentation by id.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeletePresentationByIdApiV1PptPresentationIdDeleteAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.DeletePresentationByIdForUiApiV1PptPresentationIdUiDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.DeletePresentationByIdForUiApiV1PptPresentationIdUiDelete.g.cs index 75bb5e1..dc3cb33 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.DeletePresentationByIdForUiApiV1PptPresentationIdUiDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.DeletePresentationByIdForUiApiV1PptPresentationIdUiDelete.g.cs @@ -15,5 +15,16 @@ public partial interface IPresentationClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Presentation By Id For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.DerivePresentationFromExistingOneApiV1PptPresentationDerivePost.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.DerivePresentationFromExistingOneApiV1PptPresentationDerivePost.g.cs index 09db0b8..4e43b42 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.DerivePresentationFromExistingOneApiV1PptPresentationDerivePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.DerivePresentationFromExistingOneApiV1PptPresentationDerivePost.g.cs @@ -25,6 +25,21 @@ public partial interface IPresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> DerivePresentationFromExistingOneApiV1PptPresentationDerivePostAsResponseAsync( + + global::Presenton.EditPresentationRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Derive Presentation From Existing One
+ /// Derive a new presentation from your existing presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The id of the presentation to use /// diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.EditPresentationWithNewContentApiV1PptPresentationEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.EditPresentationWithNewContentApiV1PptPresentationEditPost.g.cs index b1dfbb9..00b2a8e 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.EditPresentationWithNewContentApiV1PptPresentationEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.EditPresentationWithNewContentApiV1PptPresentationEditPost.g.cs @@ -25,6 +25,21 @@ public partial interface IPresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EditPresentationWithNewContentApiV1PptPresentationEditPostAsResponseAsync( + + global::Presenton.EditPresentationRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit Presentation With New Content
+ /// Edit presentation with new content.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The id of the presentation to use /// diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPost.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPost.g.cs index a66fc3e..895d5e2 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPost.g.cs @@ -25,6 +25,21 @@ public partial interface IPresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPostAsResponseAsync( + + global::Presenton.BodyExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Export Presentation As Pptx Or Pdf V1
+ /// Export presentation as PPTX, PDF or PNG using API.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// Presentation ID to export /// diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPost.g.cs index a7ebdf2..99ebf4f 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPost.g.cs @@ -27,6 +27,22 @@ public partial interface IPresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPostAsResponseAsync( + + global::Presenton.GeneratePresentationRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Presentation Async V1
+ /// Generate a presentation asynchronously.
+ /// Use /api/v1/ppt/presentation/status/task-xxxxxxxxxx to get the status of presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The content for generating the presentation /// diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GeneratePresentationSyncV1ApiV1PptPresentationGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GeneratePresentationSyncV1ApiV1PptPresentationGeneratePost.g.cs index 77f996a..ac47008 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GeneratePresentationSyncV1ApiV1PptPresentationGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GeneratePresentationSyncV1ApiV1PptPresentationGeneratePost.g.cs @@ -25,6 +25,21 @@ public partial interface IPresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GeneratePresentationSyncV1ApiV1PptPresentationGeneratePostAsResponseAsync( + + global::Presenton.GeneratePresentationRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Presentation Sync V1
+ /// Generate a presentation synchronously.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The content for generating the presentation /// diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetAllUserPresentationsApiV1PptPresentationAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetAllUserPresentationsApiV1PptPresentationAllGet.g.cs index 4d743b0..be8c427 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetAllUserPresentationsApiV1PptPresentationAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetAllUserPresentationsApiV1PptPresentationAllGet.g.cs @@ -24,5 +24,25 @@ public partial interface IPresentationClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get All User Presentations
+ /// Get all presentations of the user.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAllUserPresentationsApiV1PptPresentationAllGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetAllUserPresentationsForUiApiV1PptPresentationAllUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetAllUserPresentationsForUiApiV1PptPresentationAllUiGet.g.cs index 286640c..ecd3fb1 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetAllUserPresentationsForUiApiV1PptPresentationAllUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetAllUserPresentationsForUiApiV1PptPresentationAllUiGet.g.cs @@ -21,5 +21,22 @@ public partial interface IPresentationClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get All User Presentations For Ui + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAllUserPresentationsForUiApiV1PptPresentationAllUiGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetPresentationAndSlidesByIdApiV1PptPresentationIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetPresentationAndSlidesByIdApiV1PptPresentationIdGet.g.cs index e7f1e4f..598756c 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetPresentationAndSlidesByIdApiV1PptPresentationIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetPresentationAndSlidesByIdApiV1PptPresentationIdGet.g.cs @@ -18,5 +18,19 @@ public partial interface IPresentationClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Presentation And Slides By Id
+ /// Get a presentation and its slides by id.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetPresentationAndSlidesByIdApiV1PptPresentationIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetPresentationForUiApiV1PptPresentationIdUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetPresentationForUiApiV1PptPresentationIdUiGet.g.cs index 1deb17d..45bd38f 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetPresentationForUiApiV1PptPresentationIdUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.GetPresentationForUiApiV1PptPresentationIdUiGet.g.cs @@ -15,5 +15,16 @@ public partial interface IPresentationClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Presentation For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetPresentationForUiApiV1PptPresentationIdUiGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.PreparePresentationApiV1PptPresentationPreparePost.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.PreparePresentationApiV1PptPresentationPreparePost.g.cs index a42d7c3..14bba2a 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.PreparePresentationApiV1PptPresentationPreparePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.PreparePresentationApiV1PptPresentationPreparePost.g.cs @@ -19,6 +19,18 @@ public partial interface IPresentationClient /// /// Prepare Presentation /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> PreparePresentationApiV1PptPresentationPreparePostAsResponseAsync( + + global::Presenton.BodyPreparePresentationApiV1PptPresentationPreparePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Prepare Presentation + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.StreamPresentationApiV1PptPresentationStreamIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.StreamPresentationApiV1PptPresentationStreamIdGet.g.cs index 69af463..0d3b041 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.StreamPresentationApiV1PptPresentationStreamIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.StreamPresentationApiV1PptPresentationStreamIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IPresentationClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream Presentation + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> StreamPresentationApiV1PptPresentationStreamIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IPresentationClient.UpdatePresentationApiV1PptPresentationUpdatePatch.g.cs b/src/libs/Presenton/Generated/Presenton.IPresentationClient.UpdatePresentationApiV1PptPresentationUpdatePatch.g.cs index e2eb28d..bb8ceee 100644 --- a/src/libs/Presenton/Generated/Presenton.IPresentationClient.UpdatePresentationApiV1PptPresentationUpdatePatch.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IPresentationClient.UpdatePresentationApiV1PptPresentationUpdatePatch.g.cs @@ -19,6 +19,18 @@ public partial interface IPresentationClient /// /// Update Presentation /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdatePresentationApiV1PptPresentationUpdatePatchAsResponseAsync( + + global::Presenton.BodyUpdatePresentationApiV1PptPresentationUpdatePatch request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Presentation + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IReactEditClient.EditReactWithImageEndpointApiV1PptReactEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.IReactEditClient.EditReactWithImageEndpointApiV1PptReactEditPost.g.cs index 6d8a775..f1fbf82 100644 --- a/src/libs/Presenton/Generated/Presenton.IReactEditClient.EditReactWithImageEndpointApiV1PptReactEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IReactEditClient.EditReactWithImageEndpointApiV1PptReactEditPost.g.cs @@ -19,6 +19,18 @@ public partial interface IReactEditClient /// /// Edit React With Image Endpoint /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EditReactWithImageEndpointApiV1PptReactEditPostAsResponseAsync( + + global::Presenton.BodyEditReactWithImageEndpointApiV1PptReactEditPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit React With Image Endpoint + /// /// /// Current UI image file (optional) /// @@ -53,5 +65,80 @@ public partial interface IReactEditClient string? designSystem = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Edit React With Image Endpoint + /// + /// + /// Current UI image file (optional) + /// + /// + /// Current UI image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Current React component code to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Optional design system JSON to guide the edit + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task EditReactWithImageEndpointApiV1PptReactEditPostAsync( + string react, + string prompt, + global::System.IO.Stream? currentUiImage = default, + string? currentUiImagename = default, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + string? designSystem = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit React With Image Endpoint + /// + /// + /// Current UI image file (optional) + /// + /// + /// Current UI image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Current React component code to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Optional design system JSON to guide the edit + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EditReactWithImageEndpointApiV1PptReactEditPostAsResponseAsync( + string react, + string prompt, + global::System.IO.Stream? currentUiImage = default, + string? currentUiImagename = default, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + string? designSystem = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ISlideClient.EditSlideApiV1PptSlideEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.ISlideClient.EditSlideApiV1PptSlideEditPost.g.cs index 539f2cb..5590ae8 100644 --- a/src/libs/Presenton/Generated/Presenton.ISlideClient.EditSlideApiV1PptSlideEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ISlideClient.EditSlideApiV1PptSlideEditPost.g.cs @@ -33,6 +33,25 @@ public partial interface ISlideClient /// inferred from the prompt.
/// - Provide `export_as` to export the edited presentation as `pptx` or `pdf`. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> EditSlideApiV1PptSlideEditPostAsResponseAsync( + + global::Presenton.EditSlideRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit Slide
+ /// Edit a slide with a prompt.
+ /// Usage options:
+ /// - Provide `id` + `prompt` to edit a specific slide by id.
+ /// - Provide `presentation_id` + `prompt` to edit by presentation. You can also
+ /// pass `slide_index` to target a specific slide; if omitted, the index is
+ /// inferred from the prompt.
+ /// - Provide `export_as` to export the edited presentation as `pptx` or `pdf`. + ///
/// /// The id of the slide to edit /// diff --git a/src/libs/Presenton/Generated/Presenton.ISlideClient.EditSlideHtmlApiV1PptSlideEditHtmlPost.g.cs b/src/libs/Presenton/Generated/Presenton.ISlideClient.EditSlideHtmlApiV1PptSlideEditHtmlPost.g.cs index 00f44e2..8c74524 100644 --- a/src/libs/Presenton/Generated/Presenton.ISlideClient.EditSlideHtmlApiV1PptSlideEditHtmlPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ISlideClient.EditSlideHtmlApiV1PptSlideEditHtmlPost.g.cs @@ -19,6 +19,18 @@ public partial interface ISlideClient /// /// Edit Slide Html /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EditSlideHtmlApiV1PptSlideEditHtmlPostAsResponseAsync( + + global::Presenton.BodyEditSlideHtmlApiV1PptSlideEditHtmlPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit Slide Html + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.ISlideToHtmlClient.ConvertSlideToHtmlApiV1PptSlideToHtmlPost.g.cs b/src/libs/Presenton/Generated/Presenton.ISlideToHtmlClient.ConvertSlideToHtmlApiV1PptSlideToHtmlPost.g.cs index 3029eb7..d5b6140 100644 --- a/src/libs/Presenton/Generated/Presenton.ISlideToHtmlClient.ConvertSlideToHtmlApiV1PptSlideToHtmlPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ISlideToHtmlClient.ConvertSlideToHtmlApiV1PptSlideToHtmlPost.g.cs @@ -29,6 +29,23 @@ public partial interface ISlideToHtmlClient /// Returns:
/// SlideToHtmlResponse with generated HTML /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ConvertSlideToHtmlApiV1PptSlideToHtmlPostAsResponseAsync( + + global::Presenton.SlideToHtmlRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Convert Slide To Html
+ /// Convert a slide image and its OXML data to HTML using Anthropic Claude API.
+ /// Args:
+ /// request: JSON request containing image path and XML content
+ /// Returns:
+ /// SlideToHtmlResponse with generated HTML + ///
/// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.ISlideToReactClient.ConvertSlideToReactApiV1PptSlideToReactPost.g.cs b/src/libs/Presenton/Generated/Presenton.ISlideToReactClient.ConvertSlideToReactApiV1PptSlideToReactPost.g.cs index b2b8355..b09e86b 100644 --- a/src/libs/Presenton/Generated/Presenton.ISlideToReactClient.ConvertSlideToReactApiV1PptSlideToReactPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ISlideToReactClient.ConvertSlideToReactApiV1PptSlideToReactPost.g.cs @@ -19,6 +19,18 @@ public partial interface ISlideToReactClient /// /// Convert Slide To React /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ConvertSlideToReactApiV1PptSlideToReactPostAsResponseAsync( + + global::Presenton.SlideToReactRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Convert Slide To React + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePost.g.cs index 1195ad7..a4dd7f7 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePost.g.cs @@ -19,6 +19,18 @@ public partial interface ITemplateClient /// /// Clone Slide Layout /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostAsResponseAsync( + + global::Presenton.CloneSlideLayoutRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Clone Slide Layout + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.CloneTemplateApiV1PptTemplateClonePost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.CloneTemplateApiV1PptTemplateClonePost.g.cs index b513c1e..76bdf67 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.CloneTemplateApiV1PptTemplateClonePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.CloneTemplateApiV1PptTemplateClonePost.g.cs @@ -19,6 +19,18 @@ public partial interface ITemplateClient /// /// Clone Template /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CloneTemplateApiV1PptTemplateClonePostAsResponseAsync( + + global::Presenton.CloneTemplateRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Clone Template + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePost.g.cs index 9885805..6384caa 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePost.g.cs @@ -28,6 +28,23 @@ public partial interface ITemplateClient /// Whether the slide layout is being reconstructed
/// Default Value: false /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostAsResponseAsync( + + global::Presenton.CreateSlideLayoutRequest request, + bool? isReconstruct = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Slide Layout + /// + /// + /// Whether the slide layout is being reconstructed
+ /// Default Value: false + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPost.g.cs index 962ed80..e6d53f5 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPost.g.cs @@ -28,6 +28,23 @@ public partial interface ITemplateClient /// Whether the slide layout is being reconstructed
/// Default Value: false /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostAsResponseAsync( + + global::Presenton.CreateSlideLayoutRequest request, + bool? isReconstruct = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Slide Layout Old + /// + /// + /// Whether the slide layout is being reconstructed
+ /// Default Value: false + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.EditSlideLayoutApiV1PptTemplateSlideLayoutEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.EditSlideLayoutApiV1PptTemplateSlideLayoutEditPost.g.cs index cc96f0d..6412caf 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.EditSlideLayoutApiV1PptTemplateSlideLayoutEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.EditSlideLayoutApiV1PptTemplateSlideLayoutEditPost.g.cs @@ -19,6 +19,18 @@ public partial interface ITemplateClient /// /// Edit Slide Layout /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EditSlideLayoutApiV1PptTemplateSlideLayoutEditPostAsResponseAsync( + + global::Presenton.EditSlideLayoutRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit Slide Layout + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPost.g.cs index cc798ee..fafbdaa 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPost.g.cs @@ -19,6 +19,18 @@ public partial interface ITemplateClient /// /// Edit Slide Layout Section /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPostAsResponseAsync( + + global::Presenton.EditSlideLayoutSectionRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit Slide Layout Section + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetAllTemplatesApiV1PptTemplateAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetAllTemplatesApiV1PptTemplateAllGet.g.cs index bc0ee4d..3bc2e70 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetAllTemplatesApiV1PptTemplateAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetAllTemplatesApiV1PptTemplateAllGet.g.cs @@ -18,5 +18,19 @@ public partial interface ITemplateClient bool? includeDefaults = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get All Templates + /// + /// + /// Whether to include default templates
+ /// Default Value: true + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetAllTemplatesApiV1PptTemplateAllGetAsResponseAsync( + bool? includeDefaults = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetLayoutsApiV1PptTemplateTemplateIdLayoutsGet.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetLayoutsApiV1PptTemplateTemplateIdLayoutsGet.g.cs index 55e163f..1692c92 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetLayoutsApiV1PptTemplateTemplateIdLayoutsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetLayoutsApiV1PptTemplateTemplateIdLayoutsGet.g.cs @@ -17,5 +17,18 @@ public partial interface ITemplateClient string templateId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Layouts + /// + /// + /// The id of the template + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetLayoutsApiV1PptTemplateTemplateIdLayoutsGetAsResponseAsync( + string templateId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetTemplateByIdApiV1PptTemplateIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetTemplateByIdApiV1PptTemplateIdGet.g.cs index ccac217..af50d21 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetTemplateByIdApiV1PptTemplateIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetTemplateByIdApiV1PptTemplateIdGet.g.cs @@ -17,5 +17,18 @@ public partial interface ITemplateClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Template By Id + /// + /// + /// The id of the template, must be one of neo-general, neo-modern, neo-standard, neo-swift, general, modern, standard, swift or your custom template + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetTemplateByIdApiV1PptTemplateIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetTemplateExampleApiV1PptTemplateIdExampleGet.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetTemplateExampleApiV1PptTemplateIdExampleGet.g.cs index 9631b50..446afb6 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetTemplateExampleApiV1PptTemplateIdExampleGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.GetTemplateExampleApiV1PptTemplateIdExampleGet.g.cs @@ -19,5 +19,20 @@ public partial interface ITemplateClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Template Example
+ /// Get a example slides content data for a template.
+ /// This data can be used to create presentation from json. + ///
+ /// + /// The id of the template, must be one of neo-general, neo-modern, neo-standard, neo-swift, general, modern, standard, swift or your custom template + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetTemplateExampleApiV1PptTemplateIdExampleGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.InitCreateTemplateApiV1PptTemplateCreateInitPost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.InitCreateTemplateApiV1PptTemplateCreateInitPost.g.cs index 18528d0..5098800 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.InitCreateTemplateApiV1PptTemplateCreateInitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.InitCreateTemplateApiV1PptTemplateCreateInitPost.g.cs @@ -19,6 +19,18 @@ public partial interface ITemplateClient /// /// Init Create Template /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> InitCreateTemplateApiV1PptTemplateCreateInitPostAsResponseAsync( + + global::Presenton.CreateTemplateInitRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Init Create Template + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePost.g.cs index 80bf8f5..de76f37 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePost.g.cs @@ -19,6 +19,18 @@ public partial interface ITemplateClient /// /// Save Slide Layout /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostAsResponseAsync( + + global::Presenton.SaveSlideLayoutRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Save Slide Layout + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.SaveTemplateApiV1PptTemplateSavePost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.SaveTemplateApiV1PptTemplateSavePost.g.cs index 229162d..48ccd1f 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.SaveTemplateApiV1PptTemplateSavePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.SaveTemplateApiV1PptTemplateSavePost.g.cs @@ -19,6 +19,18 @@ public partial interface ITemplateClient /// /// Save Template /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SaveTemplateApiV1PptTemplateSavePostAsResponseAsync( + + global::Presenton.SaveTemplateRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Save Template + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.UpdateTemplateApiV1PptTemplateUpdatePut.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.UpdateTemplateApiV1PptTemplateUpdatePut.g.cs index 9a2e40f..967faab 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.UpdateTemplateApiV1PptTemplateUpdatePut.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.UpdateTemplateApiV1PptTemplateUpdatePut.g.cs @@ -19,6 +19,18 @@ public partial interface ITemplateClient /// /// Update Template /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateTemplateApiV1PptTemplateUpdatePutAsResponseAsync( + + global::Presenton.UpdateTemplateRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Template + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateClient.UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateClient.UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost.g.cs index 2f6a4fd..693f423 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateClient.UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateClient.UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost.g.cs @@ -19,6 +19,18 @@ public partial interface ITemplateClient /// /// Upload Fonts And Slides Preview /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsResponseAsync( + + global::Presenton.BodyUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Fonts And Slides Preview + /// /// /// PPTX file to modify /// @@ -41,5 +53,56 @@ public partial interface ITemplateClient global::System.Collections.Generic.IList? originalFontNames = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Upload Fonts And Slides Preview + /// + /// + /// PPTX file to modify + /// + /// + /// PPTX file to modify + /// + /// + /// Font files to upload + /// + /// + /// Original font names to replace (same order as font_files) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fontFiles = default, + global::System.Collections.Generic.IList? originalFontNames = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Fonts And Slides Preview + /// + /// + /// PPTX file to modify + /// + /// + /// PPTX file to modify + /// + /// + /// Font files to upload + /// + /// + /// Original font names to replace (same order as font_files) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fontFiles = default, + global::System.Collections.Generic.IList? originalFontNames = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.CreateTemplateApiV1PptTemplateManagementTemplatesPost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.CreateTemplateApiV1PptTemplateManagementTemplatesPost.g.cs index cdb20ac..878873b 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.CreateTemplateApiV1PptTemplateManagementTemplatesPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.CreateTemplateApiV1PptTemplateManagementTemplatesPost.g.cs @@ -19,6 +19,18 @@ public partial interface ITemplateManagementClient /// /// Create Template /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateTemplateApiV1PptTemplateManagementTemplatesPostAsResponseAsync( + + global::Presenton.TemplateCreateRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Template + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.DeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTemplateIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.DeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTemplateIdDelete.g.cs index 536df3c..d07dadc 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.DeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTemplateIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.DeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTemplateIdDelete.g.cs @@ -15,5 +15,16 @@ public partial interface ITemplateManagementClient global::System.Guid templateId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Template + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTemplateIdDeleteAsResponseAsync( + global::System.Guid templateId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.GetLayoutsApiV1PptTemplateManagementGetTemplatesPresentationGet.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.GetLayoutsApiV1PptTemplateManagementGetTemplatesPresentationGet.g.cs index 4792a70..d99a203 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.GetLayoutsApiV1PptTemplateManagementGetTemplatesPresentationGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.GetLayoutsApiV1PptTemplateManagementGetTemplatesPresentationGet.g.cs @@ -23,5 +23,24 @@ public partial interface ITemplateManagementClient global::System.Guid presentation, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Layouts
+ /// Retrieve all layouts for a specific presentation.
+ /// Args:
+ /// presentation: UUID of the presentation
+ /// session: Database session
+ /// Returns:
+ /// GetLayoutsResponse with layouts data
+ /// Raises:
+ /// HTTPException: 404 if no layouts found, 400 for invalid UUID, 500 for server errors + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetLayoutsApiV1PptTemplateManagementGetTemplatesPresentationGetAsResponseAsync( + global::System.Guid presentation, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.GetPresentationsSummaryApiV1PptTemplateManagementSummaryGet.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.GetPresentationsSummaryApiV1PptTemplateManagementSummaryGet.g.cs index b28ee5f..6b43518 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.GetPresentationsSummaryApiV1PptTemplateManagementSummaryGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.GetPresentationsSummaryApiV1PptTemplateManagementSummaryGet.g.cs @@ -14,5 +14,15 @@ public partial interface ITemplateManagementClient global::System.Threading.Tasks.Task GetPresentationsSummaryApiV1PptTemplateManagementSummaryGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get all presentations with layout counts
+ /// Retrieve a summary of all presentations and the number of layouts in each + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetPresentationsSummaryApiV1PptTemplateManagementSummaryGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPost.g.cs b/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPost.g.cs index e485c6a..a04721e 100644 --- a/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ITemplateManagementClient.SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPost.g.cs @@ -35,6 +35,26 @@ public partial interface ITemplateManagementClient /// Raises:
/// HTTPException: 400 for validation errors, 500 for server errors /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostAsResponseAsync( + + global::Presenton.SaveLayoutsRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Save Layouts
+ /// Save multiple layouts for presentations.
+ /// Args:
+ /// request: JSON request containing array of layout data
+ /// session: Database session
+ /// Returns:
+ /// SaveLayoutsResponse with success status and count of saved layouts
+ /// Raises:
+ /// HTTPException: 400 for validation errors, 500 for server errors + ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IThemesClient.CreateThemeApiV1PptThemesCreatePost.g.cs b/src/libs/Presenton/Generated/Presenton.IThemesClient.CreateThemeApiV1PptThemesCreatePost.g.cs index 2fd3e6f..5e6c6a6 100644 --- a/src/libs/Presenton/Generated/Presenton.IThemesClient.CreateThemeApiV1PptThemesCreatePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IThemesClient.CreateThemeApiV1PptThemesCreatePost.g.cs @@ -19,6 +19,18 @@ public partial interface IThemesClient /// /// Create Theme /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateThemeApiV1PptThemesCreatePostAsResponseAsync( + + global::Presenton.BodyCreateThemeApiV1PptThemesCreatePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Theme + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IThemesClient.DeleteThemeApiV1PptThemesDeleteThemeIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IThemesClient.DeleteThemeApiV1PptThemesDeleteThemeIdDelete.g.cs index 65fc5de..925ec3d 100644 --- a/src/libs/Presenton/Generated/Presenton.IThemesClient.DeleteThemeApiV1PptThemesDeleteThemeIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IThemesClient.DeleteThemeApiV1PptThemesDeleteThemeIdDelete.g.cs @@ -15,5 +15,16 @@ public partial interface IThemesClient global::System.Guid themeId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Theme + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteThemeApiV1PptThemesDeleteThemeIdDeleteAsResponseAsync( + global::System.Guid themeId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IThemesClient.GetDefaultThemesApiV1PptThemesDefaultGet.g.cs b/src/libs/Presenton/Generated/Presenton.IThemesClient.GetDefaultThemesApiV1PptThemesDefaultGet.g.cs index ac45b5e..a500340 100644 --- a/src/libs/Presenton/Generated/Presenton.IThemesClient.GetDefaultThemesApiV1PptThemesDefaultGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IThemesClient.GetDefaultThemesApiV1PptThemesDefaultGet.g.cs @@ -13,5 +13,14 @@ public partial interface IThemesClient global::System.Threading.Tasks.Task> GetDefaultThemesApiV1PptThemesDefaultGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Default Themes + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetDefaultThemesApiV1PptThemesDefaultGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IThemesClient.GetThemesApiV1PptThemesAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.IThemesClient.GetThemesApiV1PptThemesAllGet.g.cs index 78f6d08..d20b538 100644 --- a/src/libs/Presenton/Generated/Presenton.IThemesClient.GetThemesApiV1PptThemesAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IThemesClient.GetThemesApiV1PptThemesAllGet.g.cs @@ -13,5 +13,14 @@ public partial interface IThemesClient global::System.Threading.Tasks.Task> GetThemesApiV1PptThemesAllGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Themes + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetThemesApiV1PptThemesAllGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IThemesClient.UpdateThemeApiV1PptThemesUpdateThemeIdPatch.g.cs b/src/libs/Presenton/Generated/Presenton.IThemesClient.UpdateThemeApiV1PptThemesUpdateThemeIdPatch.g.cs index bb463ec..519c16f 100644 --- a/src/libs/Presenton/Generated/Presenton.IThemesClient.UpdateThemeApiV1PptThemesUpdateThemeIdPatch.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IThemesClient.UpdateThemeApiV1PptThemesUpdateThemeIdPatch.g.cs @@ -22,6 +22,20 @@ public partial interface IThemesClient /// Update Theme /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateThemeApiV1PptThemesUpdateThemeIdPatchAsResponseAsync( + global::System.Guid themeId, + + global::Presenton.BodyUpdateThemeApiV1PptThemesUpdateThemeIdPatch request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Theme + /// + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV1OnClient.PresentationExportApiV1OnPresentationExportPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV1OnClient.PresentationExportApiV1OnPresentationExportPost.g.cs index f5e1d67..08effe6 100644 --- a/src/libs/Presenton/Generated/Presenton.IV1OnClient.PresentationExportApiV1OnPresentationExportPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV1OnClient.PresentationExportApiV1OnPresentationExportPost.g.cs @@ -19,6 +19,18 @@ public partial interface IV1OnClient /// /// Presentation Export /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> PresentationExportApiV1OnPresentationExportPostAsResponseAsync( + + global::Presenton.BodyPresentationExportApiV1OnPresentationExportPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Presentation Export + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPost.g.cs index a813cd5..4ad349c 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPost.g.cs @@ -21,6 +21,19 @@ public partial interface IV2DesignClient /// Create Design System V2 Async
/// Kicks off asynchronous design system extraction. Poll status via /design/status/{id}. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostAsResponseAsync( + + global::Presenton.CreateDesignSystemRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Design System V2 Async
+ /// Kicks off asynchronous design system extraction. Poll status via /design/status/{id}. + ///
/// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.DeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.DeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDelete.g.cs index 3d1729c..982f2d0 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.DeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.DeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDelete.g.cs @@ -15,5 +15,16 @@ public partial interface IV2DesignClient global::System.Guid designSystemId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Design System V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteAsResponseAsync( + global::System.Guid designSystemId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetAllDesignSystemsForUiApiV2PptDesignAllUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetAllDesignSystemsForUiApiV2PptDesignAllUiGet.g.cs index 47016d3..caad063 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetAllDesignSystemsForUiApiV2PptDesignAllUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetAllDesignSystemsForUiApiV2PptDesignAllUiGet.g.cs @@ -21,5 +21,22 @@ public partial interface IV2DesignClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get All Design Systems For Ui + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAllDesignSystemsForUiApiV2PptDesignAllUiGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDefaultDesignSystemsForUiApiV2PptDesignDefaultGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDefaultDesignSystemsForUiApiV2PptDesignDefaultGet.g.cs index bb9321d..ec4245c 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDefaultDesignSystemsForUiApiV2PptDesignDefaultGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDefaultDesignSystemsForUiApiV2PptDesignDefaultGet.g.cs @@ -21,5 +21,22 @@ public partial interface IV2DesignClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Default Design Systems For Ui + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDesignExtractionStatusApiV2PptDesignStatusIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDesignExtractionStatusApiV2PptDesignStatusIdGet.g.cs index 2a7d892..142a9b9 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDesignExtractionStatusApiV2PptDesignStatusIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDesignExtractionStatusApiV2PptDesignStatusIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV2DesignClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Design Extraction Status + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetDesignExtractionStatusApiV2PptDesignStatusIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportInfoGet.g.cs index 1ebc9f5..70f30f4 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2DesignClient.GetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportInfoGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV2DesignClient global::System.Guid designSystemId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Design System Export Info + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportInfoGetAsResponseAsync( + global::System.Guid designSystemId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.GetFixHtmlApiV2PptFixSlideFixGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.GetFixHtmlApiV2PptFixSlideFixGet.g.cs index 8f85921..758b2e4 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.GetFixHtmlApiV2PptFixSlideFixGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.GetFixHtmlApiV2PptFixSlideFixGet.g.cs @@ -17,5 +17,18 @@ public partial interface IV2FixSlideClient global::System.Guid key, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Fix Html + /// + /// + /// Slide fix task id + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetFixHtmlApiV2PptFixSlideFixGetAsResponseAsync( + global::System.Guid key, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.GetFixStatusApiV2PptFixSlideStatusGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.GetFixStatusApiV2PptFixSlideStatusGet.g.cs index 9b17522..bd10af1 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.GetFixStatusApiV2PptFixSlideStatusGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.GetFixStatusApiV2PptFixSlideStatusGet.g.cs @@ -17,5 +17,18 @@ public partial interface IV2FixSlideClient global::System.Guid key, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Fix Status + /// + /// + /// Slide fix task id + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetFixStatusApiV2PptFixSlideStatusGetAsResponseAsync( + global::System.Guid key, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.InitFixSlideApiV2PptFixSlideInitPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.InitFixSlideApiV2PptFixSlideInitPost.g.cs index 8b7b00e..b605e8a 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.InitFixSlideApiV2PptFixSlideInitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2FixSlideClient.InitFixSlideApiV2PptFixSlideInitPost.g.cs @@ -19,6 +19,18 @@ public partial interface IV2FixSlideClient /// /// Init Fix Slide /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> InitFixSlideApiV2PptFixSlideInitPostAsResponseAsync( + + global::Presenton.BodyInitFixSlideApiV2PptFixSlideInitPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Init Fix Slide + /// /// /// HTML of the slide to potentially fix /// @@ -37,5 +49,48 @@ public partial interface IV2FixSlideClient string slideImagename, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Init Fix Slide + /// + /// + /// HTML of the slide to potentially fix + /// + /// + /// Slide image (png/jpeg) + /// + /// + /// Slide image (png/jpeg) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task InitFixSlideApiV2PptFixSlideInitPostAsync( + string html, + global::System.IO.Stream slideImage, + string slideImagename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Init Fix Slide + /// + /// + /// HTML of the slide to potentially fix + /// + /// + /// Slide image (png/jpeg) + /// + /// + /// Slide image (png/jpeg) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> InitFixSlideApiV2PptFixSlideInitPostAsResponseAsync( + string html, + global::System.IO.Stream slideImage, + string slideImagename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2FontsClient.CheckFontsInPptxApiV2PptFontsCheckPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2FontsClient.CheckFontsInPptxApiV2PptFontsCheckPost.g.cs index 0fefe29..f39925a 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2FontsClient.CheckFontsInPptxApiV2PptFontsCheckPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2FontsClient.CheckFontsInPptxApiV2PptFontsCheckPost.g.cs @@ -19,6 +19,18 @@ public partial interface IV2FontsClient /// /// Check Fonts In Pptx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CheckFontsInPptxApiV2PptFontsCheckPostAsResponseAsync( + + global::Presenton.BodyCheckFontsInPptxApiV2PptFontsCheckPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Check Fonts In Pptx + /// /// /// PPTX file to analyze fonts from /// @@ -33,5 +45,40 @@ public partial interface IV2FontsClient string pptxFilename, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Check Fonts In Pptx + /// + /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CheckFontsInPptxApiV2PptFontsCheckPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Check Fonts In Pptx + /// + /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CheckFontsInPptxApiV2PptFontsCheckPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2FontsClient.UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2FontsClient.UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost.g.cs index 5bfe873..547aa05 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2FontsClient.UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2FontsClient.UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost.g.cs @@ -19,6 +19,18 @@ public partial interface IV2FontsClient /// /// Upload Fonts And Slides Preview /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsResponseAsync( + + global::Presenton.BodyUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Fonts And Slides Preview + /// /// /// PPTX file to modify /// @@ -41,5 +53,56 @@ public partial interface IV2FontsClient global::System.Collections.Generic.IList? originalFontNames = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Upload Fonts And Slides Preview + /// + /// + /// PPTX file to modify + /// + /// + /// PPTX file to modify + /// + /// + /// Font files to upload + /// + /// + /// Original font names to replace (same order as font_files) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fontFiles = default, + global::System.Collections.Generic.IList? originalFontNames = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Fonts And Slides Preview + /// + /// + /// PPTX file to modify + /// + /// + /// PPTX file to modify + /// + /// + /// Font files to upload + /// + /// + /// Original font names to replace (same order as font_files) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fontFiles = default, + global::System.Collections.Generic.IList? originalFontNames = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2OnClient.PresentationExportApiV2OnPresentationExportPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2OnClient.PresentationExportApiV2OnPresentationExportPost.g.cs index 2a3e214..9fd495c 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2OnClient.PresentationExportApiV2OnPresentationExportPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2OnClient.PresentationExportApiV2OnPresentationExportPost.g.cs @@ -19,6 +19,18 @@ public partial interface IV2OnClient /// /// Presentation Export /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> PresentationExportApiV2OnPresentationExportPostAsResponseAsync( + + global::Presenton.BodyPresentationExportApiV2OnPresentationExportPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Presentation Export + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV2OnboardingClient.GetOnboardingQuestionsApiV2OnboardingQuestionsGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2OnboardingClient.GetOnboardingQuestionsApiV2OnboardingQuestionsGet.g.cs index d99335f..6760c97 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2OnboardingClient.GetOnboardingQuestionsApiV2OnboardingQuestionsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2OnboardingClient.GetOnboardingQuestionsApiV2OnboardingQuestionsGet.g.cs @@ -13,5 +13,14 @@ public partial interface IV2OnboardingClient global::System.Threading.Tasks.Task> GetOnboardingQuestionsApiV2OnboardingQuestionsGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Onboarding Questions + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetOnboardingQuestionsApiV2OnboardingQuestionsGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2OnboardingClient.SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2OnboardingClient.SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPost.g.cs index 6229730..4d41f03 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2OnboardingClient.SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2OnboardingClient.SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPost.g.cs @@ -13,6 +13,18 @@ public partial interface IV2OnboardingClient /// global::System.Threading.Tasks.Task SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostAsync( + global::System.Collections.Generic.IList request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Submit Onboarding Answers + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostAsResponseAsync( + global::System.Collections.Generic.IList request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.DeletePresentationByIdForUiApiV2PptPresentationIdUiDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.DeletePresentationByIdForUiApiV2PptPresentationIdUiDelete.g.cs index 5da52ee..b9a12f6 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.DeletePresentationByIdForUiApiV2PptPresentationIdUiDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.DeletePresentationByIdForUiApiV2PptPresentationIdUiDelete.g.cs @@ -15,5 +15,16 @@ public partial interface IV2PresentationClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Presentation By Id For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditHtmlApiV2PptPresentationEditHtmlPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditHtmlApiV2PptPresentationEditHtmlPost.g.cs index 2d98947..361d943 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditHtmlApiV2PptPresentationEditHtmlPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditHtmlApiV2PptPresentationEditHtmlPost.g.cs @@ -21,6 +21,19 @@ public partial interface IV2PresentationClient /// Edit Html
/// Edit HTML using qwen-3-coder-480b model. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EditHtmlApiV2PptPresentationEditHtmlPostAsResponseAsync( + + global::Presenton.EditSlideHTMLRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit Html
+ /// Edit HTML using qwen-3-coder-480b model. + ///
/// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditOutlineApiV2PptPresentationOutlineEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditOutlineApiV2PptPresentationOutlineEditPost.g.cs index 565199c..c95dd98 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditOutlineApiV2PptPresentationOutlineEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditOutlineApiV2PptPresentationOutlineEditPost.g.cs @@ -21,6 +21,19 @@ public partial interface IV2PresentationClient /// Edit Outline
/// Edit the outline of a presentation. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EditOutlineApiV2PptPresentationOutlineEditPostAsResponseAsync( + + global::Presenton.EditOutlineRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit Outline
+ /// Edit the outline of a presentation. + ///
/// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditSectionApiV2PptPresentationEditSectionPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditSectionApiV2PptPresentationEditSectionPost.g.cs index bb60723..23cc3d2 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditSectionApiV2PptPresentationEditSectionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.EditSectionApiV2PptPresentationEditSectionPost.g.cs @@ -21,6 +21,19 @@ public partial interface IV2PresentationClient /// Edit Section
/// Edit a specific section of the slide code using Zai and return full updated HTML. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> EditSectionApiV2PptPresentationEditSectionPostAsResponseAsync( + + global::Presenton.EditSectionHTMLRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Edit Section
+ /// Edit a specific section of the slide code using Zai and return full updated HTML. + ///
/// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPost.g.cs index 36c407f..fa67ff0 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPost.g.cs @@ -25,6 +25,21 @@ public partial interface IV2PresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPostAsResponseAsync( + + global::Presenton.BodyExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Export Presentation As Pptx Or Pdf V2
+ /// Export presentation as PPTX, PDF or PNG using API.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// Presentation ID to export /// diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPost.g.cs index 499a63b..62304f7 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPost.g.cs @@ -21,6 +21,19 @@ public partial interface IV2PresentationClient /// Generate Html Presentation V2
/// Create and store presentation; return its id. No SSE or generation here. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPostAsResponseAsync( + + global::Presenton.GenerateHTMLPresentationRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Html Presentation V2
+ /// Create and store presentation; return its id. No SSE or generation here. + ///
/// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPost.g.cs index d4b92df..3e9018f 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPost.g.cs @@ -19,6 +19,18 @@ public partial interface IV2PresentationClient /// /// Generate Presentation Async V2 /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPostAsResponseAsync( + + global::Presenton.GeneratePresentationRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Presentation Async V2 + /// /// /// The content for generating the presentation /// diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GeneratePresentationSyncV2ApiV2PptPresentationGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GeneratePresentationSyncV2ApiV2PptPresentationGeneratePost.g.cs index db0e33c..fa55d07 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GeneratePresentationSyncV2ApiV2PptPresentationGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GeneratePresentationSyncV2ApiV2PptPresentationGeneratePost.g.cs @@ -19,6 +19,18 @@ public partial interface IV2PresentationClient /// /// Generate Presentation Sync V2 /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GeneratePresentationSyncV2ApiV2PptPresentationGeneratePostAsResponseAsync( + + global::Presenton.GeneratePresentationRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Presentation Sync V2 + /// /// /// The content for generating the presentation /// diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetAllUserPresentationsForUiApiV2PptPresentationAllUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetAllUserPresentationsForUiApiV2PptPresentationAllUiGet.g.cs index bed162d..8161531 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetAllUserPresentationsForUiApiV2PptPresentationAllUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetAllUserPresentationsForUiApiV2PptPresentationAllUiGet.g.cs @@ -21,5 +21,22 @@ public partial interface IV2PresentationClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get All User Presentations For Ui + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAllUserPresentationsForUiApiV2PptPresentationAllUiGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetPresentationByIdForUiApiV2PptPresentationIdUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetPresentationByIdForUiApiV2PptPresentationIdUiGet.g.cs index 875f5c4..62c6084 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetPresentationByIdForUiApiV2PptPresentationIdUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetPresentationByIdForUiApiV2PptPresentationIdUiGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV2PresentationClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Presentation By Id For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetPresentationByIdForUiApiV2PptPresentationIdUiGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetPresentationStatusApiV2PptPresentationStatusIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetPresentationStatusApiV2PptPresentationStatusIdGet.g.cs index 803c9f7..5bbead9 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetPresentationStatusApiV2PptPresentationStatusIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.GetPresentationStatusApiV2PptPresentationStatusIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV2PresentationClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Presentation Status + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetPresentationStatusApiV2PptPresentationStatusIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGet.g.cs index 3e06fa5..3f3099d 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV2PresentationClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream Outlines V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> StreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamPresentationHtmlApiV2PptPresentationStreamIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamPresentationHtmlApiV2PptPresentationStreamIdGet.g.cs index 690226d..ffece61 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamPresentationHtmlApiV2PptPresentationStreamIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamPresentationHtmlApiV2PptPresentationStreamIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV2PresentationClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream Presentation Html + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> StreamPresentationHtmlApiV2PptPresentationStreamIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamPresentationHtmlLargeApiV2PptPresentationStreamLargeIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamPresentationHtmlLargeApiV2PptPresentationStreamLargeIdGet.g.cs index c079b10..5eaa459 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamPresentationHtmlLargeApiV2PptPresentationStreamLargeIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.StreamPresentationHtmlLargeApiV2PptPresentationStreamLargeIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV2PresentationClient global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream Presentation Html Large + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> StreamPresentationHtmlLargeApiV2PptPresentationStreamLargeIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.UpdatePresentationApiV2PptPresentationUpdatePut.g.cs b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.UpdatePresentationApiV2PptPresentationUpdatePut.g.cs index 91cec26..76443b8 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.UpdatePresentationApiV2PptPresentationUpdatePut.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2PresentationClient.UpdatePresentationApiV2PptPresentationUpdatePut.g.cs @@ -19,6 +19,18 @@ public partial interface IV2PresentationClient /// /// Update Presentation /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdatePresentationApiV2PptPresentationUpdatePutAsResponseAsync( + + global::Presenton.UpdatePresentationRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Presentation + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GenerateNewSlideApiV2PptSlideGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GenerateNewSlideApiV2PptSlideGeneratePost.g.cs index 5472a1f..d4d7584 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GenerateNewSlideApiV2PptSlideGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GenerateNewSlideApiV2PptSlideGeneratePost.g.cs @@ -21,6 +21,19 @@ public partial interface IV2SlideClient /// Generate New Slide
/// Generate a new slide for a presentation using a user prompt. Does not persist to DB. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GenerateNewSlideApiV2PptSlideGeneratePostAsResponseAsync( + + global::Presenton.GenerateSlideRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate New Slide
+ /// Generate a new slide for a presentation using a user prompt. Does not persist to DB. + ///
/// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePost.g.cs index 16dd395..912e779 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePost.g.cs @@ -24,6 +24,21 @@ public partial interface IV2SlideClient /// Generate alternative code segments using Zai and return full slide variations. Persist them on the slide. /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePostAsResponseAsync( + global::System.Guid id, + + global::Presenton.SegmentVariationsRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Segment Variations
+ /// Generate alternative code segments using Zai and return full slide variations. Persist them on the slide. + ///
+ /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GetSlideVariationsApiV2PptSlideIdVariationsGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GetSlideVariationsApiV2PptSlideIdVariationsGet.g.cs index 7bbbe76..87d828d 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GetSlideVariationsApiV2PptSlideIdVariationsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2SlideClient.GetSlideVariationsApiV2PptSlideIdVariationsGet.g.cs @@ -24,5 +24,25 @@ public partial interface IV2SlideClient int? page = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Slide Variations
+ /// Return persisted HTML variations for a slide by its UUID with pagination (simple JSON, no SSE). + ///
+ /// + /// + /// Default Value: 3 + /// + /// + /// Default Value: 1 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetSlideVariationsApiV2PptSlideIdVariationsGetAsResponseAsync( + global::System.Guid id, + int? count = default, + int? page = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV2SlideClient.StreamSlideVariationsApiV2PptSlideIdVariationsGenerateGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV2SlideClient.StreamSlideVariationsApiV2PptSlideIdVariationsGenerateGet.g.cs index 6e2bbbb..e67e482 100644 --- a/src/libs/Presenton/Generated/Presenton.IV2SlideClient.StreamSlideVariationsApiV2PptSlideIdVariationsGenerateGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV2SlideClient.StreamSlideVariationsApiV2PptSlideIdVariationsGenerateGet.g.cs @@ -20,5 +20,21 @@ public partial interface IV2SlideClient int? count = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Stream Slide Variations
+ /// SSE: Stream HTML variations for a slide by its UUID, matching legacy format, and persist after generation. + ///
+ /// + /// + /// Default Value: 3 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> StreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetAsResponseAsync( + global::System.Guid id, + int? count = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3AsyncTaskClient.GetAsyncTaskStatusApiV3AsyncTaskStatusIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3AsyncTaskClient.GetAsyncTaskStatusApiV3AsyncTaskStatusIdGet.g.cs index 499b00d..bd3b9b6 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3AsyncTaskClient.GetAsyncTaskStatusApiV3AsyncTaskStatusIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3AsyncTaskClient.GetAsyncTaskStatusApiV3AsyncTaskStatusIdGet.g.cs @@ -20,5 +20,21 @@ public partial interface IV3AsyncTaskClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Async Task Status
+ /// Check the status of an async task.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// ID of the async task + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAsyncTaskStatusApiV3AsyncTaskStatusIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.AddEnterpriseUserApiV3EnterpriseUsersAddPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.AddEnterpriseUserApiV3EnterpriseUsersAddPost.g.cs index def3d30..ce4160c 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.AddEnterpriseUserApiV3EnterpriseUsersAddPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.AddEnterpriseUserApiV3EnterpriseUsersAddPost.g.cs @@ -19,6 +19,18 @@ public partial interface IV3EnterpriseClient /// /// Add Enterprise User /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> AddEnterpriseUserApiV3EnterpriseUsersAddPostAsResponseAsync( + + global::Presenton.EnterpriseUserAddRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Enterprise User + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPost.g.cs index cf7cd56..effc383 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPost.g.cs @@ -19,6 +19,18 @@ public partial interface IV3EnterpriseClient /// /// Add Enterprise User Credits /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostAsResponseAsync( + + global::Presenton.EnterpriseUserCreditsAddRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Add Enterprise User Credits + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.CreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.CreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensPost.g.cs index 78a7cbf..a793789 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.CreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.CreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensPost.g.cs @@ -15,5 +15,16 @@ public partial interface IV3EnterpriseClient global::System.Guid userId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Enterprise User Access Token + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensPostAsResponseAsync( + global::System.Guid userId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.DeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensTokenDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.DeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensTokenDelete.g.cs index ee4a6a7..fa26e14 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.DeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensTokenDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.DeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensTokenDelete.g.cs @@ -17,5 +17,18 @@ public partial interface IV3EnterpriseClient string token, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Enterprise User Access Token + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensTokenDeleteAsResponseAsync( + global::System.Guid userId, + string token, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseApiV3EnterpriseEnterpriseIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseApiV3EnterpriseEnterpriseIdGet.g.cs index fe45605..2e4d486 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseApiV3EnterpriseEnterpriseIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseApiV3EnterpriseEnterpriseIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV3EnterpriseClient string enterpriseId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Enterprise + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetEnterpriseApiV3EnterpriseEnterpriseIdGetAsResponseAsync( + string enterpriseId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGet.g.cs index 5214f43..cf49399 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGet.g.cs @@ -17,5 +17,18 @@ public partial interface IV3EnterpriseClient string enterprise, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Enterprise Credits Info + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetAsResponseAsync( + string enterprise, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterprisePresentationsInfoApiV3EnterprisePresentationsInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterprisePresentationsInfoApiV3EnterprisePresentationsInfoGet.g.cs index bb2de7d..be1b77e 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterprisePresentationsInfoApiV3EnterprisePresentationsInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterprisePresentationsInfoApiV3EnterprisePresentationsInfoGet.g.cs @@ -17,5 +17,18 @@ public partial interface IV3EnterpriseClient string enterprise, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Enterprise Presentations Info + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetEnterprisePresentationsInfoApiV3EnterprisePresentationsInfoGetAsResponseAsync( + string enterprise, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserApiV3EnterpriseUsersUserIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserApiV3EnterpriseUsersUserIdGet.g.cs index 46dedd3..cdcc462 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserApiV3EnterpriseUsersUserIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserApiV3EnterpriseUsersUserIdGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV3EnterpriseClient global::System.Guid userId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Enterprise User + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetEnterpriseUserApiV3EnterpriseUsersUserIdGetAsResponseAsync( + global::System.Guid userId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCreditsInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCreditsInfoGet.g.cs index fa6a3d3..7436998 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCreditsInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCreditsInfoGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV3EnterpriseClient global::System.Guid userId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Enterprise User Credits Info + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCreditsInfoGetAsResponseAsync( + global::System.Guid userId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserIdPresentationsInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserIdPresentationsInfoGet.g.cs index c65d171..4d8455a 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserIdPresentationsInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserIdPresentationsInfoGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV3EnterpriseClient global::System.Guid userId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Enterprise User Presentations Info + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserIdPresentationsInfoGetAsResponseAsync( + global::System.Guid userId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGet.g.cs index 8e53eb7..a8a4096 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.GetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGet.g.cs @@ -17,5 +17,18 @@ public partial interface IV3EnterpriseClient string enterprise, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Enterprise Users Info + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetAsResponseAsync( + string enterprise, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGet.g.cs index aca1212..0ed0952 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGet.g.cs @@ -27,5 +27,28 @@ public partial interface IV3EnterpriseClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Enterprise Credit Adds + /// + /// + /// Page number starting from 1
+ /// Default Value: 1 + /// + /// + /// Number of transactions per page
+ /// Default Value: 25 + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetAsResponseAsync( + string enterprise, + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterprisePresentationsApiV3EnterprisePresentationsGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterprisePresentationsApiV3EnterprisePresentationsGet.g.cs index 0e2b556..3346515 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterprisePresentationsApiV3EnterprisePresentationsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterprisePresentationsApiV3EnterprisePresentationsGet.g.cs @@ -31,5 +31,32 @@ public partial interface IV3EnterpriseClient string? search = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Enterprise Presentations + /// + /// + /// Page number starting from 1
+ /// Default Value: 1 + /// + /// + /// Number of presentations per page
+ /// Default Value: 25 + /// + /// + /// Search by presentation title or presentation id + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListEnterprisePresentationsApiV3EnterprisePresentationsGetAsResponseAsync( + string enterprise, + int? page = default, + int? pageSize = default, + string? search = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAccessTokensGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAccessTokensGet.g.cs index 4bf93ad..19f2a95 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAccessTokensGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAccessTokensGet.g.cs @@ -15,5 +15,16 @@ public partial interface IV3EnterpriseClient global::System.Guid userId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Enterprise User Access Tokens + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAccessTokensGetAsResponseAsync( + global::System.Guid userId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPresentationsGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPresentationsGet.g.cs index e8ba172..8534b3b 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPresentationsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPresentationsGet.g.cs @@ -29,5 +29,30 @@ public partial interface IV3EnterpriseClient string? search = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Enterprise User Presentations + /// + /// + /// + /// Page number starting from 1
+ /// Default Value: 1 + /// + /// + /// Number of presentations per page
+ /// Default Value: 25 + /// + /// + /// Search by presentation title or presentation id + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPresentationsGetAsResponseAsync( + global::System.Guid userId, + int? page = default, + int? pageSize = default, + string? search = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUsersApiV3EnterpriseUsersGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUsersApiV3EnterpriseUsersGet.g.cs index e81e964..337ef1f 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUsersApiV3EnterpriseUsersGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ListEnterpriseUsersApiV3EnterpriseUsersGet.g.cs @@ -31,5 +31,32 @@ public partial interface IV3EnterpriseClient string? search = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Enterprise Users + /// + /// + /// Page number starting from 1
+ /// Default Value: 1 + /// + /// + /// Number of users per page
+ /// Default Value: 25 + /// + /// + /// Search by user name, email, or id + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListEnterpriseUsersApiV3EnterpriseUsersGetAsResponseAsync( + string enterprise, + int? page = default, + int? pageSize = default, + string? search = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPost.g.cs index 2d82386..1c7ba4e 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3EnterpriseClient.ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPost.g.cs @@ -22,6 +22,20 @@ public partial interface IV3EnterpriseClient /// Reset Enterprise User Password /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPostAsResponseAsync( + global::System.Guid userId, + + global::Presenton.EnterpriseUserPasswordResetRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Reset Enterprise User Password + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IV3FilesClient.UploadFilesV3ApiV3FilesUploadPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3FilesClient.UploadFilesV3ApiV3FilesUploadPost.g.cs index 37bbebe..3bc3393 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3FilesClient.UploadFilesV3ApiV3FilesUploadPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3FilesClient.UploadFilesV3ApiV3FilesUploadPost.g.cs @@ -25,6 +25,21 @@ public partial interface IV3FilesClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> UploadFilesV3ApiV3FilesUploadPostAsResponseAsync( + + global::Presenton.BodyUploadFilesV3ApiV3FilesUploadPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Files V3
+ /// Upload files to be used later.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Presenton/Generated/Presenton.IV3GitHubClient.GetGithubMetadataApiV3GithubMetadataGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3GitHubClient.GetGithubMetadataApiV3GithubMetadataGet.g.cs index 58a5302..4e17e38 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3GitHubClient.GetGithubMetadataApiV3GithubMetadataGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3GitHubClient.GetGithubMetadataApiV3GithubMetadataGet.g.cs @@ -13,5 +13,14 @@ public partial interface IV3GitHubClient global::System.Threading.Tasks.Task GetGithubMetadataApiV3GithubMetadataGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Github Metadata + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetGithubMetadataApiV3GithubMetadataGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.DeleteUploadedImageByIdV3ApiV3ImagesIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.DeleteUploadedImageByIdV3ApiV3ImagesIdDelete.g.cs index c8af00e..b542373 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.DeleteUploadedImageByIdV3ApiV3ImagesIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.DeleteUploadedImageByIdV3ApiV3ImagesIdDelete.g.cs @@ -18,5 +18,19 @@ public partial interface IV3ImagesClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Uploaded Image By Id V3
+ /// Delete an uploaded image by id.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteUploadedImageByIdV3ApiV3ImagesIdDeleteAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.GetUploadedImagesV3ApiV3ImagesUploadedGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.GetUploadedImagesV3ApiV3ImagesUploadedGet.g.cs index d0faa75..149961d 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.GetUploadedImagesV3ApiV3ImagesUploadedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.GetUploadedImagesV3ApiV3ImagesUploadedGet.g.cs @@ -16,5 +16,17 @@ public partial interface IV3ImagesClient global::System.Threading.Tasks.Task GetUploadedImagesV3ApiV3ImagesUploadedGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Uploaded Images V3
+ /// Get all uploaded images of the user.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetUploadedImagesV3ApiV3ImagesUploadedGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.UploadImageV3ApiV3ImagesUploadPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.UploadImageV3ApiV3ImagesUploadPost.g.cs index 9a0cff2..1b7e3b3 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.UploadImageV3ApiV3ImagesUploadPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3ImagesClient.UploadImageV3ApiV3ImagesUploadPost.g.cs @@ -25,6 +25,21 @@ public partial interface IV3ImagesClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadImageV3ApiV3ImagesUploadPostAsResponseAsync( + + global::Presenton.BodyUploadImageV3ApiV3ImagesUploadPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Image V3
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -35,5 +50,42 @@ public partial interface IV3ImagesClient string filename, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Upload Image V3
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UploadImageV3ApiV3ImagesUploadPostAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upload Image V3
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UploadImageV3ApiV3ImagesUploadPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3PlaygroundClient.GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3PlaygroundClient.GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePost.g.cs index 0d79d0d..896743c 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3PlaygroundClient.GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3PlaygroundClient.GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePost.g.cs @@ -19,6 +19,18 @@ public partial interface IV3PlaygroundClient /// /// Generate Presentation For Playground /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePostAsResponseAsync( + + global::Presenton.GeneratePresentationRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Presentation For Playground + /// /// /// The content for generating the presentation /// diff --git a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPost.g.cs index 5851c96..5cfafff 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPost.g.cs @@ -27,6 +27,22 @@ public partial interface IV3PresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPostAsResponseAsync( + + global::Presenton.CreatePresentationFromJsonRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Presentation From Json Async V3
+ /// Create a presentation from JSON asynchronously.
+ /// Use /api/v3/async-task/status/task-xxxxxxxxxx to get the status of presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The language of the presentation
/// Default Value: English diff --git a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPost.g.cs index 3fbd1c0..40a6291 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPost.g.cs @@ -25,6 +25,21 @@ public partial interface IV3PresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPostAsResponseAsync( + + global::Presenton.CreatePresentationFromJsonRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Presentation From Json Sync V3
+ /// Create a presentation from JSON synchronously.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The language of the presentation
/// Default Value: English diff --git a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPost.g.cs index 19ddd57..fcb6c9c 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPost.g.cs @@ -25,6 +25,21 @@ public partial interface IV3PresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostAsResponseAsync( + + global::Presenton.BodyExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Export Presentation As Pptx Or Pdf V3
+ /// Export a presentation as PPTX, PDF or PNG.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// Presentation ID to export /// diff --git a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePost.g.cs index a8ff43a..6caeb36 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePost.g.cs @@ -25,6 +25,21 @@ public partial interface IV3PresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostAsResponseAsync( + + global::Presenton.GenerateOutlinesRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Outlines Sync V3
+ /// Generate outlines for a presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The content for generating the presentation /// diff --git a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPost.g.cs index ad82d9b..6341804 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPost.g.cs @@ -27,6 +27,22 @@ public partial interface IV3PresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPostAsResponseAsync( + + global::Presenton.GeneratePresentationRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Presentation Async V3
+ /// Generate a presentation asynchronously.
+ /// Use /api/v3/async-task/status/task-xxxxxxxxxx to get the status of presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The content for generating the presentation /// diff --git a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GeneratePresentationSyncV3ApiV3PresentationGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GeneratePresentationSyncV3ApiV3PresentationGeneratePost.g.cs index 8bf19c9..b8d9b85 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GeneratePresentationSyncV3ApiV3PresentationGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GeneratePresentationSyncV3ApiV3PresentationGeneratePost.g.cs @@ -25,6 +25,21 @@ public partial interface IV3PresentationClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GeneratePresentationSyncV3ApiV3PresentationGeneratePostAsResponseAsync( + + global::Presenton.GeneratePresentationRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Presentation Sync V3
+ /// Generate a presentation synchronously.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The content for generating the presentation /// diff --git a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GetAllUserPresentationsForUiApiV3PresentationAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GetAllUserPresentationsForUiApiV3PresentationAllGet.g.cs index fc22841..39193f8 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GetAllUserPresentationsForUiApiV3PresentationAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GetAllUserPresentationsForUiApiV3PresentationAllGet.g.cs @@ -24,5 +24,25 @@ public partial interface IV3PresentationClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get All User Presentations For Ui
+ /// Get all presentations of the user.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAllUserPresentationsForUiApiV3PresentationAllGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUiGet.g.cs index 1cae142..49b1ada 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3PresentationClient.GetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUiGet.g.cs @@ -21,5 +21,22 @@ public partial interface IV3PresentationClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get All User Presentations For Ui With Slides + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUiGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3SchemaClient.GenerateContentForSchemaApiV3SchemaContentGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3SchemaClient.GenerateContentForSchemaApiV3SchemaContentGeneratePost.g.cs index 318a0ac..938a3f4 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3SchemaClient.GenerateContentForSchemaApiV3SchemaContentGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3SchemaClient.GenerateContentForSchemaApiV3SchemaContentGeneratePost.g.cs @@ -19,6 +19,18 @@ public partial interface IV3SchemaClient /// /// Generate Content For Schema /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GenerateContentForSchemaApiV3SchemaContentGeneratePostAsResponseAsync( + + global::Presenton.GenerateContentForSchemaRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Content For Schema + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Presenton/Generated/Presenton.IV3SmartDesignClient.GetAllSmartDesignsApiV3SmartDesignAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3SmartDesignClient.GetAllSmartDesignsApiV3SmartDesignAllGet.g.cs index 772c04f..2487a6d 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3SmartDesignClient.GetAllSmartDesignsApiV3SmartDesignAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3SmartDesignClient.GetAllSmartDesignsApiV3SmartDesignAllGet.g.cs @@ -24,5 +24,25 @@ public partial interface IV3SmartDesignClient int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get All Smart Designs
+ /// Get all smart designs.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAllSmartDesignsApiV3SmartDesignAllGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetAllStandardTemplatesApiV3StandardTemplateAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetAllStandardTemplatesApiV3StandardTemplateAllGet.g.cs index 0efcb3d..edc804b 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetAllStandardTemplatesApiV3StandardTemplateAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetAllStandardTemplatesApiV3StandardTemplateAllGet.g.cs @@ -21,5 +21,22 @@ public partial interface IV3StandardTemplateClient bool? includeDefaults = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get All Standard Templates
+ /// Get all standard templates.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Whether to include default templates
+ /// Default Value: true + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetAllStandardTemplatesApiV3StandardTemplateAllGetAsResponseAsync( + bool? includeDefaults = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetStandardTemplateByIdApiV3StandardTemplateIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetStandardTemplateByIdApiV3StandardTemplateIdGet.g.cs index 108e55f..8a8c46d 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetStandardTemplateByIdApiV3StandardTemplateIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetStandardTemplateByIdApiV3StandardTemplateIdGet.g.cs @@ -18,5 +18,19 @@ public partial interface IV3StandardTemplateClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Standard Template By Id
+ /// Get a standard template by id.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetStandardTemplateByIdApiV3StandardTemplateIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetStandardTemplateExampleApiV3StandardTemplateIdExampleGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetStandardTemplateExampleApiV3StandardTemplateIdExampleGet.g.cs index 6b62716..f11cb1e 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetStandardTemplateExampleApiV3StandardTemplateIdExampleGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3StandardTemplateClient.GetStandardTemplateExampleApiV3StandardTemplateIdExampleGet.g.cs @@ -18,5 +18,19 @@ public partial interface IV3StandardTemplateClient string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Standard Template Example
+ /// Get a example slides content data for a standard template.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetStandardTemplateExampleApiV3StandardTemplateIdExampleGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3ThemeClient.GenerateThemeV3ApiV3ThemeGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3ThemeClient.GenerateThemeV3ApiV3ThemeGeneratePost.g.cs index 25dbc74..b8aec0c 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3ThemeClient.GenerateThemeV3ApiV3ThemeGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3ThemeClient.GenerateThemeV3ApiV3ThemeGeneratePost.g.cs @@ -19,6 +19,18 @@ public partial interface IV3ThemeClient /// /// Generate Theme V3 /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GenerateThemeV3ApiV3ThemeGeneratePostAsResponseAsync( + + global::Presenton.GenerateThemeRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Generate Theme V3 + /// /// /// /// diff --git a/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.GetAllWebhookSubscriptionsV3ApiV3WebhookAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.GetAllWebhookSubscriptionsV3ApiV3WebhookAllGet.g.cs index 849ba8c..e41854b 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.GetAllWebhookSubscriptionsV3ApiV3WebhookAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.GetAllWebhookSubscriptionsV3ApiV3WebhookAllGet.g.cs @@ -16,5 +16,17 @@ public partial interface IV3WebhookClient global::System.Threading.Tasks.Task> GetAllWebhookSubscriptionsV3ApiV3WebhookAllGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get All Webhook Subscriptions V3
+ /// Get all webhook subscriptions of the user.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> GetAllWebhookSubscriptionsV3ApiV3WebhookAllGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.SubscribeToWebhookV3ApiV3WebhookSubscribePost.g.cs b/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.SubscribeToWebhookV3ApiV3WebhookSubscribePost.g.cs index b1cc8cb..b29225c 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.SubscribeToWebhookV3ApiV3WebhookSubscribePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.SubscribeToWebhookV3ApiV3WebhookSubscribePost.g.cs @@ -25,6 +25,21 @@ public partial interface IV3WebhookClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SubscribeToWebhookV3ApiV3WebhookSubscribePostAsResponseAsync( + + global::Presenton.SubscribeToWebhookRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Subscribe To Webhook V3
+ /// Subscribe to a webhook.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The URL to send the webhook to /// diff --git a/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDelete.g.cs index 30fdb55..435ea47 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDelete.g.cs @@ -16,5 +16,17 @@ public partial interface IV3WebhookClient global::System.Threading.Tasks.Task UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDeleteAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Unsubscribe All Webhook Subscriptions V3
+ /// Unsubscribe from all webhook subscriptions of the user.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDeleteAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDelete.g.cs index df9de53..c7b2f2d 100644 --- a/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IV3WebhookClient.UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDelete.g.cs @@ -25,6 +25,21 @@ public partial interface IV3WebhookClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteAsResponseAsync( + + global::Presenton.BodyUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDelete request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Unsubscribe To Webhook V3
+ /// Unsubscribe from a webhook.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The ID of the webhook subscription to unsubscribe from /// diff --git a/src/libs/Presenton/Generated/Presenton.IWebhookClient.SubscribeToWebhookV1ApiV1WebhookSubscribePost.g.cs b/src/libs/Presenton/Generated/Presenton.IWebhookClient.SubscribeToWebhookV1ApiV1WebhookSubscribePost.g.cs index 39e39bc..a7cc8c8 100644 --- a/src/libs/Presenton/Generated/Presenton.IWebhookClient.SubscribeToWebhookV1ApiV1WebhookSubscribePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IWebhookClient.SubscribeToWebhookV1ApiV1WebhookSubscribePost.g.cs @@ -25,6 +25,21 @@ public partial interface IWebhookClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SubscribeToWebhookV1ApiV1WebhookSubscribePostAsResponseAsync( + + global::Presenton.SubscribeToWebhookRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Subscribe To Webhook V1
+ /// Subscribe to a webhook.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The URL to send the webhook to /// diff --git a/src/libs/Presenton/Generated/Presenton.IWebhookClient.UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDelete.g.cs b/src/libs/Presenton/Generated/Presenton.IWebhookClient.UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDelete.g.cs index 2953cf1..24cd966 100644 --- a/src/libs/Presenton/Generated/Presenton.IWebhookClient.UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IWebhookClient.UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDelete.g.cs @@ -25,6 +25,21 @@ public partial interface IWebhookClient /// Create an API Key from your account to access this endpoint.
/// Authorization: Bearer sk-presenton-xxxxxxxx /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteAsResponseAsync( + + global::Presenton.BodyUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDelete request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Unsubscribe To Webhook V1
+ /// Unsubscribe from a webhook.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
/// /// The ID of the webhook subscription to unsubscribe from /// diff --git a/src/libs/Presenton/Generated/Presenton.IconsClient.SearchIconsApiV1PptIconsSearchGet.g.cs b/src/libs/Presenton/Generated/Presenton.IconsClient.SearchIconsApiV1PptIconsSearchGet.g.cs index 9259de4..8313651 100644 --- a/src/libs/Presenton/Generated/Presenton.IconsClient.SearchIconsApiV1PptIconsSearchGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IconsClient.SearchIconsApiV1PptIconsSearchGet.g.cs @@ -58,6 +58,31 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( int? limit = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SearchIconsApiV1PptIconsSearchGetAsResponseAsync( + query: query, + limit: limit, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Search Icons + /// + /// + /// + /// Default Value: 20 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> SearchIconsApiV1PptIconsSearchGetAsResponseAsync( + string query, + int? limit = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -88,12 +113,13 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/icons/search", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("query", query) - .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("limit", limit?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -166,6 +192,8 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessSearchIconsApiV1PptIconsSearchGetResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.IconsClient.g.cs b/src/libs/Presenton/Generated/Presenton.IconsClient.g.cs index 5e17d01..cc62ced 100644 --- a/src/libs/Presenton/Generated/Presenton.IconsClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.IconsClient.g.cs @@ -72,10 +72,10 @@ public IconsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public IconsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.ImagesClient.DeleteUploadedImageByIdForUiApiV1PptImagesIdUiDelete.g.cs b/src/libs/Presenton/Generated/Presenton.ImagesClient.DeleteUploadedImageByIdForUiApiV1PptImagesIdUiDelete.g.cs index 86a78db..cbaf96e 100644 --- a/src/libs/Presenton/Generated/Presenton.ImagesClient.DeleteUploadedImageByIdForUiApiV1PptImagesIdUiDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ImagesClient.DeleteUploadedImageByIdForUiApiV1PptImagesIdUiDelete.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Uploaded Image By Id For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/images/{id}/ui", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -336,6 +373,10 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -357,6 +398,10 @@ partial void ProcessDeleteUploadedImageByIdForUiApiV1PptImagesIdUiDeleteResponse try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ImagesClient.DeleteUploadedImageByIdV1ApiV1PptImagesIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.ImagesClient.DeleteUploadedImageByIdV1ApiV1PptImagesIdDelete.g.cs index dae4637..bc9421b 100644 --- a/src/libs/Presenton/Generated/Presenton.ImagesClient.DeleteUploadedImageByIdV1ApiV1PptImagesIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ImagesClient.DeleteUploadedImageByIdV1ApiV1PptImagesIdDelete.g.cs @@ -50,6 +50,27 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Uploaded Image By Id V1
+ /// Delete an uploaded image by id.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -79,6 +100,7 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/images/{id}", baseUri: HttpClient.BaseAddress); @@ -152,6 +174,8 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -162,6 +186,11 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -179,6 +208,8 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -188,8 +219,7 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -198,6 +228,11 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -214,14 +249,15 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -261,6 +297,8 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -281,6 +319,8 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -339,6 +379,10 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -360,6 +404,10 @@ partial void ProcessDeleteUploadedImageByIdV1ApiV1PptImagesIdDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ImagesClient.GenerateImageApiV1PptImagesGenerateGet.g.cs b/src/libs/Presenton/Generated/Presenton.ImagesClient.GenerateImageApiV1PptImagesGenerateGet.g.cs index 2da7db0..902e556 100644 --- a/src/libs/Presenton/Generated/Presenton.ImagesClient.GenerateImageApiV1PptImagesGenerateGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ImagesClient.GenerateImageApiV1PptImagesGenerateGet.g.cs @@ -58,6 +58,31 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( global::Presenton.GenerateImageApiV1PptImagesGenerateGetImageType? imageType = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateImageApiV1PptImagesGenerateGetAsResponseAsync( + prompt: prompt, + imageType: imageType, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Image + /// + /// + /// + /// Default Value: stock + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GenerateImageApiV1PptImagesGenerateGetAsResponseAsync( + string prompt, + global::Presenton.GenerateImageApiV1PptImagesGenerateGetImageType? imageType = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -88,12 +113,13 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/images/generate", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("prompt", prompt) - .AddOptionalParameter("image_type", imageType?.ToValueString()) + .AddOptionalParameter("image_type", imageType?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -166,6 +192,8 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,7 +401,11 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -385,7 +433,11 @@ partial void ProcessGenerateImageApiV1PptImagesGenerateGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ImagesClient.GenerateImagesApiV2PptImagesGenerateGet.g.cs b/src/libs/Presenton/Generated/Presenton.ImagesClient.GenerateImagesApiV2PptImagesGenerateGet.g.cs index b9edbd9..013b14a 100644 --- a/src/libs/Presenton/Generated/Presenton.ImagesClient.GenerateImagesApiV2PptImagesGenerateGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ImagesClient.GenerateImagesApiV2PptImagesGenerateGet.g.cs @@ -64,6 +64,36 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( int? count = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateImagesApiV2PptImagesGenerateGetAsResponseAsync( + prompt: prompt, + imageType: imageType, + count: count, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Images + /// + /// + /// + /// Default Value: stock + /// + /// + /// Default Value: 1 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GenerateImagesApiV2PptImagesGenerateGetAsResponseAsync( + string prompt, + global::Presenton.GenerateImagesApiV2PptImagesGenerateGetImageType? imageType = default, + int? count = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -95,13 +125,14 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/images/generate", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("prompt", prompt) .AddOptionalParameter("image_type", imageType?.ToValueString()) - .AddOptionalParameter("count", count?.ToString()) + .AddOptionalParameter("count", count?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -175,6 +206,8 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +218,11 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +240,8 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +251,7 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +260,11 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +281,15 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +329,8 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +351,8 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -366,7 +415,11 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -394,7 +447,11 @@ partial void ProcessGenerateImagesApiV2PptImagesGenerateGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ImagesClient.GetGeneratedImagesApiV1PptImagesGeneratedGet.g.cs b/src/libs/Presenton/Generated/Presenton.ImagesClient.GetGeneratedImagesApiV1PptImagesGeneratedGet.g.cs index 7507150..42d8d11 100644 --- a/src/libs/Presenton/Generated/Presenton.ImagesClient.GetGeneratedImagesApiV1PptImagesGeneratedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ImagesClient.GetGeneratedImagesApiV1PptImagesGeneratedGet.g.cs @@ -60,6 +60,33 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetGeneratedImagesApiV1PptImagesGeneratedGetAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Generated Images + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetGeneratedImagesApiV1PptImagesGeneratedGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -90,12 +117,13 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/images/generated", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -168,6 +196,8 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +208,11 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +230,8 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +241,7 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +250,11 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +271,15 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +319,8 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +341,8 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -359,9 +405,13 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -389,9 +439,13 @@ partial void ProcessGetGeneratedImagesApiV1PptImagesGeneratedGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ImagesClient.GetUploadedImagesForUiApiV1PptImagesUploadedUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.ImagesClient.GetUploadedImagesForUiApiV1PptImagesUploadedUiGet.g.cs index abc09e4..72f4fad 100644 --- a/src/libs/Presenton/Generated/Presenton.ImagesClient.GetUploadedImagesForUiApiV1PptImagesUploadedUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ImagesClient.GetUploadedImagesForUiApiV1PptImagesUploadedUiGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon public async global::System.Threading.Tasks.Task GetUploadedImagesForUiApiV1PptImagesUploadedUiGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetUploadedImagesForUiApiV1PptImagesUploadedUiGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Uploaded Images For Ui + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetUploadedImagesForUiApiV1PptImagesUploadedUiGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/images/uploaded/ui", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,7 +337,11 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -329,7 +369,11 @@ partial void ProcessGetUploadedImagesForUiApiV1PptImagesUploadedUiGetResponseCon #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ImagesClient.GetUploadedImagesV1ApiV1PptImagesUploadedGet.g.cs b/src/libs/Presenton/Generated/Presenton.ImagesClient.GetUploadedImagesV1ApiV1PptImagesUploadedGet.g.cs index 3ab16b5..e921982 100644 --- a/src/libs/Presenton/Generated/Presenton.ImagesClient.GetUploadedImagesV1ApiV1PptImagesUploadedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ImagesClient.GetUploadedImagesV1ApiV1PptImagesUploadedGet.g.cs @@ -51,6 +51,26 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( public async global::System.Threading.Tasks.Task GetUploadedImagesV1ApiV1PptImagesUploadedGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetUploadedImagesV1ApiV1PptImagesUploadedGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Uploaded Images V1
+ /// Get all uploaded images.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetUploadedImagesV1ApiV1PptImagesUploadedGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -79,6 +99,7 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/images/uploaded", baseUri: HttpClient.BaseAddress); @@ -151,6 +172,8 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -161,6 +184,11 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -178,6 +206,8 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -187,8 +217,7 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -197,6 +226,11 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -213,14 +247,15 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -260,6 +295,8 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -280,6 +317,8 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -342,7 +381,11 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -370,7 +413,11 @@ partial void ProcessGetUploadedImagesV1ApiV1PptImagesUploadedGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ImagesClient.UploadImageForUiApiV1PptImagesUploadUiPost.g.cs b/src/libs/Presenton/Generated/Presenton.ImagesClient.UploadImageForUiApiV1PptImagesUploadUiPost.g.cs index 4746f58..62de1f2 100644 --- a/src/libs/Presenton/Generated/Presenton.ImagesClient.UploadImageForUiApiV1PptImagesUploadUiPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ImagesClient.UploadImageForUiApiV1PptImagesUploadUiPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessUploadImageForUiApiV1PptImagesUploadUiPostResponseContent( /// public async global::System.Threading.Tasks.Task UploadImageForUiApiV1PptImagesUploadUiPostAsync( + global::Presenton.BodyUploadImageForUiApiV1PptImagesUploadUiPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UploadImageForUiApiV1PptImagesUploadUiPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upload Image For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadImageForUiApiV1PptImagesUploadUiPostAsResponseAsync( + global::Presenton.BodyUploadImageForUiApiV1PptImagesUploadUiPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessUploadImageForUiApiV1PptImagesUploadUiPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/images/upload/ui", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessUploadImageForUiApiV1PptImagesUploadUiPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -154,7 +178,9 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -196,6 +222,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -206,6 +234,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -223,6 +256,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -232,8 +267,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -242,6 +276,11 @@ request.Filename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -258,14 +297,15 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -305,6 +345,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -325,6 +367,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -387,7 +431,11 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -415,7 +463,11 @@ request.Filename is null #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -478,5 +530,898 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Upload Image For Ui + /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UploadImageForUiApiV1PptImagesUploadUiPostAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Presenton.BodyUploadImageForUiApiV1PptImagesUploadUiPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadImageForUiApiV1PptImagesUploadUiPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadImageForUiApiV1PptImagesUploadUiPostSecurityRequirements, + operationName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/images/upload/ui", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadImageForUiApiV1PptImagesUploadUiPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageForUiApiV1PptImagesUploadUiPost", + methodName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload/ui\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageForUiApiV1PptImagesUploadUiPost", + methodName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload/ui\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageForUiApiV1PptImagesUploadUiPost", + methodName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload/ui\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadImageForUiApiV1PptImagesUploadUiPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageForUiApiV1PptImagesUploadUiPost", + methodName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload/ui\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageForUiApiV1PptImagesUploadUiPost", + methodName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload/ui\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadImageForUiApiV1PptImagesUploadUiPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return __content; + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return __content; + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Upload Image For Ui + /// + /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadImageForUiApiV1PptImagesUploadUiPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Presenton.BodyUploadImageForUiApiV1PptImagesUploadUiPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadImageForUiApiV1PptImagesUploadUiPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadImageForUiApiV1PptImagesUploadUiPostSecurityRequirements, + operationName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/images/upload/ui", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadImageForUiApiV1PptImagesUploadUiPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageForUiApiV1PptImagesUploadUiPost", + methodName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload/ui\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageForUiApiV1PptImagesUploadUiPost", + methodName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload/ui\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageForUiApiV1PptImagesUploadUiPost", + methodName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload/ui\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadImageForUiApiV1PptImagesUploadUiPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageForUiApiV1PptImagesUploadUiPost", + methodName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload/ui\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageForUiApiV1PptImagesUploadUiPost", + methodName: "UploadImageForUiApiV1PptImagesUploadUiPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload/ui\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadImageForUiApiV1PptImagesUploadUiPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ImagesClient.UploadImageV1ApiV1PptImagesUploadPost.g.cs b/src/libs/Presenton/Generated/Presenton.ImagesClient.UploadImageV1ApiV1PptImagesUploadPost.g.cs index de61cca..44007a2 100644 --- a/src/libs/Presenton/Generated/Presenton.ImagesClient.UploadImageV1ApiV1PptImagesUploadPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ImagesClient.UploadImageV1ApiV1PptImagesUploadPost.g.cs @@ -53,6 +53,31 @@ partial void ProcessUploadImageV1ApiV1PptImagesUploadPostResponseContent( /// public async global::System.Threading.Tasks.Task UploadImageV1ApiV1PptImagesUploadPostAsync( + global::Presenton.BodyUploadImageV1ApiV1PptImagesUploadPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UploadImageV1ApiV1PptImagesUploadPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upload Image V1
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadImageV1ApiV1PptImagesUploadPostAsResponseAsync( + global::Presenton.BodyUploadImageV1ApiV1PptImagesUploadPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -83,10 +108,11 @@ partial void ProcessUploadImageV1ApiV1PptImagesUploadPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/images/upload", baseUri: HttpClient.BaseAddress); @@ -119,6 +145,7 @@ partial void ProcessUploadImageV1ApiV1PptImagesUploadPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -157,7 +184,9 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -199,6 +228,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -209,6 +240,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -226,6 +262,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -235,8 +273,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -245,6 +282,11 @@ request.Filename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -261,14 +303,15 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -308,6 +351,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -328,6 +373,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -390,9 +437,13 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.ImageAsset.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.ImageAsset.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -420,9 +471,13 @@ request.Filename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.ImageAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.ImageAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -488,5 +543,912 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Upload Image V1
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UploadImageV1ApiV1PptImagesUploadPostAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Presenton.BodyUploadImageV1ApiV1PptImagesUploadPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadImageV1ApiV1PptImagesUploadPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadImageV1ApiV1PptImagesUploadPostSecurityRequirements, + operationName: "UploadImageV1ApiV1PptImagesUploadPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/images/upload", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadImageV1ApiV1PptImagesUploadPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV1ApiV1PptImagesUploadPost", + methodName: "UploadImageV1ApiV1PptImagesUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV1ApiV1PptImagesUploadPost", + methodName: "UploadImageV1ApiV1PptImagesUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV1ApiV1PptImagesUploadPost", + methodName: "UploadImageV1ApiV1PptImagesUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadImageV1ApiV1PptImagesUploadPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV1ApiV1PptImagesUploadPost", + methodName: "UploadImageV1ApiV1PptImagesUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV1ApiV1PptImagesUploadPost", + methodName: "UploadImageV1ApiV1PptImagesUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadImageV1ApiV1PptImagesUploadPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.ImageAsset.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.ImageAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Upload Image V1
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadImageV1ApiV1PptImagesUploadPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Presenton.BodyUploadImageV1ApiV1PptImagesUploadPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadImageV1ApiV1PptImagesUploadPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadImageV1ApiV1PptImagesUploadPostSecurityRequirements, + operationName: "UploadImageV1ApiV1PptImagesUploadPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/images/upload", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadImageV1ApiV1PptImagesUploadPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV1ApiV1PptImagesUploadPost", + methodName: "UploadImageV1ApiV1PptImagesUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV1ApiV1PptImagesUploadPost", + methodName: "UploadImageV1ApiV1PptImagesUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV1ApiV1PptImagesUploadPost", + methodName: "UploadImageV1ApiV1PptImagesUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadImageV1ApiV1PptImagesUploadPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV1ApiV1PptImagesUploadPost", + methodName: "UploadImageV1ApiV1PptImagesUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV1ApiV1PptImagesUploadPost", + methodName: "UploadImageV1ApiV1PptImagesUploadPostAsync", + pathTemplate: "\"/api/v1/ppt/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadImageV1ApiV1PptImagesUploadPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.ImageAsset.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.ImageAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ImagesClient.g.cs b/src/libs/Presenton/Generated/Presenton.ImagesClient.g.cs index 524bd5d..339e6e6 100644 --- a/src/libs/Presenton/Generated/Presenton.ImagesClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ImagesClient.g.cs @@ -72,10 +72,10 @@ public ImagesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ImagesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.MockClient.MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGet.g.cs b/src/libs/Presenton/Generated/Presenton.MockClient.MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGet.g.cs index 0294d26..1cbc390 100644 --- a/src/libs/Presenton/Generated/Presenton.MockClient.MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.MockClient.MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene public async global::System.Threading.Tasks.Task> MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Mock Presentation Generation Completed + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> MockPresentationGenerationCompletedApiV1MockPresentationGenerationCompletedGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/mock/presentation-generation-completed", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessMockPresentationGenerationCompletedApiV1MockPresentationGene #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.MockClient.MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGet.g.cs b/src/libs/Presenton/Generated/Presenton.MockClient.MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGet.g.cs index 4779728..e1b14a7 100644 --- a/src/libs/Presenton/Generated/Presenton.MockClient.MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.MockClient.MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat public async global::System.Threading.Tasks.Task> MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Mock Presentation Generation Failed + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> MockPresentationGenerationFailedApiV1MockPresentationGenerationFailedGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/mock/presentation-generation-failed", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessMockPresentationGenerationFailedApiV1MockPresentationGenerat #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.MockClient.g.cs b/src/libs/Presenton/Generated/Presenton.MockClient.g.cs index ca2f3fc..15fdc00 100644 --- a/src/libs/Presenton/Generated/Presenton.MockClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.MockClient.g.cs @@ -72,10 +72,10 @@ public MockClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public MockClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.OptionsSupport.g.cs b/src/libs/Presenton/Generated/Presenton.OptionsSupport.g.cs index 62e0e11..29d23dd 100644 --- a/src/libs/Presenton/Generated/Presenton.OptionsSupport.g.cs +++ b/src/libs/Presenton/Generated/Presenton.OptionsSupport.g.cs @@ -101,9 +101,45 @@ public sealed class AutoSDKRetryOptions public int MaxAttempts { get; set; } = 1; /// - /// Optional fixed delay between retry attempts. + /// Optional fixed delay between retry attempts. When set, this takes precedence over exponential backoff. /// public global::System.TimeSpan? Delay { get; set; } + + /// + /// Initial exponential backoff delay used when is not set. + /// + public global::System.TimeSpan InitialDelay { get; set; } = global::System.TimeSpan.FromSeconds(1); + + /// + /// Maximum retry delay after applying retry headers, backoff, and jitter. + /// + public global::System.TimeSpan MaxDelay { get; set; } = global::System.TimeSpan.FromSeconds(30); + + /// + /// Multiplier applied to exponential backoff after each failed attempt. + /// Values below 1 are normalized to 1. + /// + public double BackoffMultiplier { get; set; } = 2D; + + /// + /// Randomizes computed backoff by plus or minus this ratio. Values are clamped to 0..1. + /// + public double JitterRatio { get; set; } = 0.2D; + + /// + /// Whether Retry-After response headers should control retry delay when present. + /// + public bool UseRetryAfterHeader { get; set; } = true; + + /// + /// Whether a rate-limit reset response header should control retry delay when present. + /// + public bool UseRateLimitResetHeader { get; set; } + + /// + /// Optional provider-specific rate-limit reset header name. Values may be Unix seconds or an HTTP date. + /// + public string? RateLimitResetHeaderName { get; set; } = "X-RateLimit-Reset"; } @@ -231,6 +267,16 @@ public sealed class AutoSDKHookContext /// public bool WillRetry { get; set; } + /// + /// The computed retry delay when is true. + /// + public global::System.TimeSpan? RetryDelay { get; set; } + + /// + /// A short retry reason such as exception or status:429. + /// + public string RetryReason { get; set; } = string.Empty; + /// /// The effective cancellation token for the current request attempt. /// @@ -254,6 +300,8 @@ internal static class AutoSDKRequestOptionsSupport int attempt, int maxAttempts, bool willRetry, + global::System.TimeSpan? retryDelay, + string retryReason, global::System.Threading.CancellationToken cancellationToken) { return new global::Presenton.AutoSDKHookContext @@ -271,6 +319,8 @@ internal static class AutoSDKRequestOptionsSupport Attempt = attempt, MaxAttempts = maxAttempts, WillRetry = willRetry, + RetryDelay = retryDelay, + RetryReason = retryReason ?? string.Empty, CancellationToken = cancellationToken, }; } @@ -338,19 +388,188 @@ internal static int GetMaxAttempts( return maxAttempts < 1 ? 1 : maxAttempts; } - internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + internal static global::System.TimeSpan GetRetryDelay( global::Presenton.AutoSDKClientOptions clientOptions, global::Presenton.AutoSDKRequestOptions? requestOptions, + global::System.Net.Http.HttpResponseMessage? response, + int attempt) + { + var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::Presenton.AutoSDKRetryOptions(); + + if (retryOptions.UseRetryAfterHeader && + TryGetRetryAfterDelay(response, out var retryAfterDelay)) + { + return ClampRetryDelay(retryAfterDelay, retryOptions); + } + + if (retryOptions.UseRateLimitResetHeader && + TryGetRateLimitResetDelay(response, retryOptions.RateLimitResetHeaderName, out var rateLimitResetDelay)) + { + return ClampRetryDelay(rateLimitResetDelay, retryOptions); + } + + if (retryOptions.Delay.HasValue) + { + return ClampRetryDelay(retryOptions.Delay.Value, retryOptions); + } + + var initialDelay = retryOptions.InitialDelay; + if (initialDelay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var multiplier = retryOptions.BackoffMultiplier < 1D ? 1D : retryOptions.BackoffMultiplier; + var exponent = attempt <= 1 ? 0 : attempt - 1; + var delayMilliseconds = initialDelay.TotalMilliseconds * global::System.Math.Pow(multiplier, exponent); + if (double.IsNaN(delayMilliseconds) || double.IsInfinity(delayMilliseconds) || delayMilliseconds < 0D) + { + delayMilliseconds = 0D; + } + + var delay = global::System.TimeSpan.FromMilliseconds(delayMilliseconds); + delay = ApplyJitter(delay, retryOptions.JitterRatio); + return ClampRetryDelay(delay, retryOptions); + } + + internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + global::System.TimeSpan retryDelay, global::System.Threading.CancellationToken cancellationToken) { - var delay = requestOptions?.Retry?.Delay ?? - clientOptions.Retry?.Delay; - if (!delay.HasValue || delay.Value <= global::System.TimeSpan.Zero) + if (retryDelay <= global::System.TimeSpan.Zero) { return; } - await global::System.Threading.Tasks.Task.Delay(delay.Value, cancellationToken).ConfigureAwait(false); + await global::System.Threading.Tasks.Task.Delay(retryDelay, cancellationToken).ConfigureAwait(false); + } + + private static bool TryGetRetryAfterDelay( + global::System.Net.Http.HttpResponseMessage? response, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + var retryAfter = response?.Headers.RetryAfter; + if (retryAfter == null) + { + return false; + } + + if (retryAfter.Delta.HasValue) + { + delay = retryAfter.Delta.Value; + return delay > global::System.TimeSpan.Zero; + } + + if (retryAfter.Date.HasValue) + { + delay = retryAfter.Date.Value - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static bool TryGetRateLimitResetDelay( + global::System.Net.Http.HttpResponseMessage? response, + string? headerName, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + if (response == null || string.IsNullOrWhiteSpace(headerName)) + { + return false; + } + + if (!response.Headers.TryGetValues(headerName, out var values) && + (response.Content?.Headers == null || !response.Content.Headers.TryGetValues(headerName, out values))) + { + return false; + } + + var value = global::System.Linq.Enumerable.FirstOrDefault(values); + if (string.IsNullOrWhiteSpace(value)) + { + return false; + } + + value = value.Trim(); + if (long.TryParse( + value, + global::System.Globalization.NumberStyles.Integer, + global::System.Globalization.CultureInfo.InvariantCulture, + out var unixSeconds)) + { + delay = global::System.DateTimeOffset.FromUnixTimeSeconds(unixSeconds) - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + if (global::System.DateTimeOffset.TryParse( + value, + global::System.Globalization.CultureInfo.InvariantCulture, + global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal, + out var resetAt)) + { + delay = resetAt - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static global::System.TimeSpan ApplyJitter( + global::System.TimeSpan delay, + double jitterRatio) + { + if (delay <= global::System.TimeSpan.Zero || jitterRatio <= 0D) + { + return delay; + } + + if (jitterRatio > 1D) + { + jitterRatio = 1D; + } + + var sample = NextJitterSample(); + var multiplier = 1D - jitterRatio + (sample * jitterRatio * 2D); + var milliseconds = delay.TotalMilliseconds * multiplier; + if (double.IsNaN(milliseconds) || double.IsInfinity(milliseconds) || milliseconds < 0D) + { + milliseconds = 0D; + } + + return global::System.TimeSpan.FromMilliseconds(milliseconds); + } + + private static double NextJitterSample() + { + var bytes = new byte[8]; + using (var randomNumberGenerator = global::System.Security.Cryptography.RandomNumberGenerator.Create()) + { + randomNumberGenerator.GetBytes(bytes); + } + + var value = global::System.BitConverter.ToUInt64(bytes, 0); + return value / (double)ulong.MaxValue; + } + + private static global::System.TimeSpan ClampRetryDelay( + global::System.TimeSpan delay, + global::Presenton.AutoSDKRetryOptions retryOptions) + { + if (delay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var maxDelay = retryOptions.MaxDelay; + if (maxDelay > global::System.TimeSpan.Zero && delay > maxDelay) + { + return maxDelay; + } + + return delay; } internal static bool ShouldRetryStatusCode( diff --git a/src/libs/Presenton/Generated/Presenton.OutlinesClient.GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.OutlinesClient.GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePost.g.cs index bff79a3..05f5665 100644 --- a/src/libs/Presenton/Generated/Presenton.OutlinesClient.GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.OutlinesClient.GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo /// public async global::System.Threading.Tasks.Task> GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostAsync( + global::Presenton.GenerateOutlinesRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Outlines Sync V1 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostAsResponseAsync( + global::Presenton.GenerateOutlinesRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/outlines/generate", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessGenerateOutlinesSyncV1ApiV1PptOutlinesGeneratePostResponseCo #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.OutlinesClient.StreamOutlinesApiV1PptOutlinesStreamIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.OutlinesClient.StreamOutlinesApiV1PptOutlinesStreamIdGet.g.cs index 30741b7..0f5ba75 100644 --- a/src/libs/Presenton/Generated/Presenton.OutlinesClient.StreamOutlinesApiV1PptOutlinesStreamIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.OutlinesClient.StreamOutlinesApiV1PptOutlinesStreamIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await StreamOutlinesApiV1PptOutlinesStreamIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Stream Outlines + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> StreamOutlinesApiV1PptOutlinesStreamIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/outlines/stream/{id}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,7 +384,11 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -373,7 +416,11 @@ partial void ProcessStreamOutlinesApiV1PptOutlinesStreamIdGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.OutlinesClient.g.cs b/src/libs/Presenton/Generated/Presenton.OutlinesClient.g.cs index b8a6f06..4864be3 100644 --- a/src/libs/Presenton/Generated/Presenton.OutlinesClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.OutlinesClient.g.cs @@ -72,10 +72,10 @@ public OutlinesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public OutlinesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.PdfSlidesClient.ProcessPdfSlidesApiV1PptPdfSlidesProcessPost.g.cs b/src/libs/Presenton/Generated/Presenton.PdfSlidesClient.ProcessPdfSlidesApiV1PptPdfSlidesProcessPost.g.cs index 36bd06c..f097c33 100644 --- a/src/libs/Presenton/Generated/Presenton.PdfSlidesClient.ProcessPdfSlidesApiV1PptPdfSlidesProcessPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PdfSlidesClient.ProcessPdfSlidesApiV1PptPdfSlidesProcessPost.g.cs @@ -56,6 +56,34 @@ partial void ProcessProcessPdfSlidesApiV1PptPdfSlidesProcessPostResponseContent( /// public async global::System.Threading.Tasks.Task ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync( + global::Presenton.BodyProcessPdfSlidesApiV1PptPdfSlidesProcessPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Process Pdf Slides
+ /// Process a PDF file to extract slide screenshots.
+ /// This endpoint:
+ /// 1. Validates the uploaded PDF file
+ /// 2. Uses ImageMagick to convert PDF pages to PNG images
+ /// 3. Returns screenshot URLs for each slide/page
+ /// Note: Font installation is not needed since PDFs already have fonts embedded. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsResponseAsync( + global::Presenton.BodyProcessPdfSlidesApiV1PptPdfSlidesProcessPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -86,10 +114,11 @@ partial void ProcessProcessPdfSlidesApiV1PptPdfSlidesProcessPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/pdf-slides/process", baseUri: HttpClient.BaseAddress); @@ -122,6 +151,7 @@ partial void ProcessProcessPdfSlidesApiV1PptPdfSlidesProcessPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentPdfFile = new global::System.Net.Http.ByteArrayContent(request.PdfFile ?? global::System.Array.Empty()); __contentPdfFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -160,7 +190,9 @@ request.PdfFilename is null { __contentPdfFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -202,6 +234,8 @@ request.PdfFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -212,6 +246,11 @@ request.PdfFilename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -229,6 +268,8 @@ request.PdfFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -238,8 +279,7 @@ request.PdfFilename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -248,6 +288,11 @@ request.PdfFilename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -264,14 +309,15 @@ request.PdfFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -311,6 +357,8 @@ request.PdfFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -331,6 +379,8 @@ request.PdfFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -393,9 +443,13 @@ request.PdfFilename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PdfSlidesResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PdfSlidesResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -423,9 +477,13 @@ request.PdfFilename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.PdfSlidesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PdfSlidesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -498,5 +556,922 @@ request.PdfFilename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Process Pdf Slides
+ /// Process a PDF file to extract slide screenshots.
+ /// This endpoint:
+ /// 1. Validates the uploaded PDF file
+ /// 2. Uses ImageMagick to convert PDF pages to PNG images
+ /// 3. Returns screenshot URLs for each slide/page
+ /// Note: Font installation is not needed since PDFs already have fonts embedded. + ///
+ /// + /// PDF file to process + /// + /// + /// PDF file to process + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync( + global::System.IO.Stream pdfFile, + string pdfFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pdfFile = pdfFile ?? throw new global::System.ArgumentNullException(nameof(pdfFile)); + var request = new global::Presenton.BodyProcessPdfSlidesApiV1PptPdfSlidesProcessPost + { + PdfFile = global::System.Array.Empty(), + PdfFilename = pdfFilename, + }; + PrepareArguments( + client: HttpClient); + PrepareProcessPdfSlidesApiV1PptPdfSlidesProcessPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ProcessPdfSlidesApiV1PptPdfSlidesProcessPostSecurityRequirements, + operationName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/pdf-slides/process", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPdfFile = new global::System.Net.Http.StreamContent(pdfFile); + __contentPdfFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PdfFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PdfFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPdfFile, + name: "\"pdf_file\"", + fileName: request.PdfFilename != null ? $"\"{request.PdfFilename}\"" : string.Empty); + if (__contentPdfFile.Headers.ContentDisposition != null) + { + __contentPdfFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareProcessPdfSlidesApiV1PptPdfSlidesProcessPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPost", + methodName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pdf-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPost", + methodName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pdf-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPost", + methodName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pdf-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessProcessPdfSlidesApiV1PptPdfSlidesProcessPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPost", + methodName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pdf-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPost", + methodName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pdf-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessProcessPdfSlidesApiV1PptPdfSlidesProcessPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.PdfSlidesResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.PdfSlidesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Process Pdf Slides
+ /// Process a PDF file to extract slide screenshots.
+ /// This endpoint:
+ /// 1. Validates the uploaded PDF file
+ /// 2. Uses ImageMagick to convert PDF pages to PNG images
+ /// 3. Returns screenshot URLs for each slide/page
+ /// Note: Font installation is not needed since PDFs already have fonts embedded. + ///
+ /// + /// PDF file to process + /// + /// + /// PDF file to process + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsResponseAsync( + global::System.IO.Stream pdfFile, + string pdfFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pdfFile = pdfFile ?? throw new global::System.ArgumentNullException(nameof(pdfFile)); + var request = new global::Presenton.BodyProcessPdfSlidesApiV1PptPdfSlidesProcessPost + { + PdfFile = global::System.Array.Empty(), + PdfFilename = pdfFilename, + }; + PrepareArguments( + client: HttpClient); + PrepareProcessPdfSlidesApiV1PptPdfSlidesProcessPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ProcessPdfSlidesApiV1PptPdfSlidesProcessPostSecurityRequirements, + operationName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/pdf-slides/process", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPdfFile = new global::System.Net.Http.StreamContent(pdfFile); + __contentPdfFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PdfFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PdfFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPdfFile, + name: "\"pdf_file\"", + fileName: request.PdfFilename != null ? $"\"{request.PdfFilename}\"" : string.Empty); + if (__contentPdfFile.Headers.ContentDisposition != null) + { + __contentPdfFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareProcessPdfSlidesApiV1PptPdfSlidesProcessPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPost", + methodName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pdf-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPost", + methodName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pdf-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPost", + methodName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pdf-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessProcessPdfSlidesApiV1PptPdfSlidesProcessPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPost", + methodName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pdf-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPost", + methodName: "ProcessPdfSlidesApiV1PptPdfSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pdf-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessProcessPdfSlidesApiV1PptPdfSlidesProcessPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.PdfSlidesResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.PdfSlidesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.PdfSlidesClient.g.cs b/src/libs/Presenton/Generated/Presenton.PdfSlidesClient.g.cs index c3b4dee..0ee4a77 100644 --- a/src/libs/Presenton/Generated/Presenton.PdfSlidesClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PdfSlidesClient.g.cs @@ -72,10 +72,10 @@ public PdfSlidesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PdfSlidesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.PptxFontsClient.ProcessPptxFontsApiV1PptPptxFontsProcessPost.g.cs b/src/libs/Presenton/Generated/Presenton.PptxFontsClient.ProcessPptxFontsApiV1PptPptxFontsProcessPost.g.cs index 65dcf2b..cc55289 100644 --- a/src/libs/Presenton/Generated/Presenton.PptxFontsClient.ProcessPptxFontsApiV1PptPptxFontsProcessPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PptxFontsClient.ProcessPptxFontsApiV1PptPptxFontsProcessPost.g.cs @@ -52,6 +52,30 @@ partial void ProcessProcessPptxFontsApiV1PptPptxFontsProcessPostResponseContent( /// public async global::System.Threading.Tasks.Task ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync( + global::Presenton.BodyProcessPptxFontsApiV1PptPptxFontsProcessPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ProcessPptxFontsApiV1PptPptxFontsProcessPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Process Pptx Fonts
+ /// Analyze a PPTX file and return only the fonts used in the document.
+ /// Uses the exact same font extraction and analysis utilities as the /pptx-slides endpoint. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ProcessPptxFontsApiV1PptPptxFontsProcessPostAsResponseAsync( + global::Presenton.BodyProcessPptxFontsApiV1PptPptxFontsProcessPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -82,10 +106,11 @@ partial void ProcessProcessPptxFontsApiV1PptPptxFontsProcessPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/pptx-fonts/process", baseUri: HttpClient.BaseAddress); @@ -118,6 +143,7 @@ partial void ProcessProcessPptxFontsApiV1PptPptxFontsProcessPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentPptxFile = new global::System.Net.Http.ByteArrayContent(request.PptxFile ?? global::System.Array.Empty()); __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -156,7 +182,9 @@ request.PptxFilename is null { __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -198,6 +226,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -208,6 +238,11 @@ request.PptxFilename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -225,6 +260,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -234,8 +271,7 @@ request.PptxFilename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -244,6 +280,11 @@ request.PptxFilename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -260,14 +301,15 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -307,6 +349,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -327,6 +371,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -389,9 +435,13 @@ request.PptxFilename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PptxFontsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PptxFontsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -419,9 +469,13 @@ request.PptxFilename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.PptxFontsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PptxFontsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -490,5 +544,914 @@ request.PptxFilename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Process Pptx Fonts
+ /// Analyze a PPTX file and return only the fonts used in the document.
+ /// Uses the exact same font extraction and analysis utilities as the /pptx-slides endpoint. + ///
+ /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyProcessPptxFontsApiV1PptPptxFontsProcessPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + }; + PrepareArguments( + client: HttpClient); + PrepareProcessPptxFontsApiV1PptPptxFontsProcessPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ProcessPptxFontsApiV1PptPptxFontsProcessPostSecurityRequirements, + operationName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/pptx-fonts/process", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareProcessPptxFontsApiV1PptPptxFontsProcessPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxFontsApiV1PptPptxFontsProcessPost", + methodName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-fonts/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxFontsApiV1PptPptxFontsProcessPost", + methodName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-fonts/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxFontsApiV1PptPptxFontsProcessPost", + methodName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-fonts/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessProcessPptxFontsApiV1PptPptxFontsProcessPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxFontsApiV1PptPptxFontsProcessPost", + methodName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-fonts/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxFontsApiV1PptPptxFontsProcessPost", + methodName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-fonts/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessProcessPptxFontsApiV1PptPptxFontsProcessPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.PptxFontsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.PptxFontsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Process Pptx Fonts
+ /// Analyze a PPTX file and return only the fonts used in the document.
+ /// Uses the exact same font extraction and analysis utilities as the /pptx-slides endpoint. + ///
+ /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ProcessPptxFontsApiV1PptPptxFontsProcessPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyProcessPptxFontsApiV1PptPptxFontsProcessPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + }; + PrepareArguments( + client: HttpClient); + PrepareProcessPptxFontsApiV1PptPptxFontsProcessPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ProcessPptxFontsApiV1PptPptxFontsProcessPostSecurityRequirements, + operationName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/pptx-fonts/process", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareProcessPptxFontsApiV1PptPptxFontsProcessPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxFontsApiV1PptPptxFontsProcessPost", + methodName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-fonts/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxFontsApiV1PptPptxFontsProcessPost", + methodName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-fonts/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxFontsApiV1PptPptxFontsProcessPost", + methodName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-fonts/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessProcessPptxFontsApiV1PptPptxFontsProcessPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxFontsApiV1PptPptxFontsProcessPost", + methodName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-fonts/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxFontsApiV1PptPptxFontsProcessPost", + methodName: "ProcessPptxFontsApiV1PptPptxFontsProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-fonts/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessProcessPptxFontsApiV1PptPptxFontsProcessPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.PptxFontsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.PptxFontsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.PptxFontsClient.g.cs b/src/libs/Presenton/Generated/Presenton.PptxFontsClient.g.cs index ecd8620..f0f113e 100644 --- a/src/libs/Presenton/Generated/Presenton.PptxFontsClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PptxFontsClient.g.cs @@ -72,10 +72,10 @@ public PptxFontsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PptxFontsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.PptxSlidesClient.ProcessPptxSlidesApiV1PptPptxSlidesProcessPost.g.cs b/src/libs/Presenton/Generated/Presenton.PptxSlidesClient.ProcessPptxSlidesApiV1PptPptxSlidesProcessPost.g.cs index 45b1886..5ba875f 100644 --- a/src/libs/Presenton/Generated/Presenton.PptxSlidesClient.ProcessPptxSlidesApiV1PptPptxSlidesProcessPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PptxSlidesClient.ProcessPptxSlidesApiV1PptPptxSlidesProcessPost.g.cs @@ -57,6 +57,35 @@ partial void ProcessProcessPptxSlidesApiV1PptPptxSlidesProcessPostResponseConten /// public async global::System.Threading.Tasks.Task ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync( + global::Presenton.BodyProcessPptxSlidesApiV1PptPptxSlidesProcessPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Process Pptx Slides
+ /// Process a PPTX file to extract slide screenshots and XML content.
+ /// This endpoint:
+ /// 1. Validates the uploaded PPTX file
+ /// 2. Installs any provided font files
+ /// 3. Unzips the PPTX to extract slide XMLs
+ /// 4. Uses LibreOffice to generate slide screenshots
+ /// 5. Returns both screenshot URLs and XML content for each slide + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsResponseAsync( + global::Presenton.BodyProcessPptxSlidesApiV1PptPptxSlidesProcessPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,10 +116,11 @@ partial void ProcessProcessPptxSlidesApiV1PptPptxSlidesProcessPostResponseConten var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/pptx-slides/process", baseUri: HttpClient.BaseAddress); @@ -123,6 +153,7 @@ partial void ProcessProcessPptxSlidesApiV1PptPptxSlidesProcessPostResponseConten __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentPptxFile = new global::System.Net.Http.ByteArrayContent(request.PptxFile ?? global::System.Array.Empty()); __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -161,14 +192,18 @@ request.PptxFilename is null { __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; } + if (request.Fonts != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Fonts.ToString() ?? string.Empty), name: "\"fonts\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -210,6 +245,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -220,6 +257,11 @@ request.PptxFilename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -237,6 +279,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -246,8 +290,7 @@ request.PptxFilename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -256,6 +299,11 @@ request.PptxFilename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -272,14 +320,15 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -319,6 +368,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -339,6 +390,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -401,9 +454,13 @@ request.PptxFilename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PptxSlidesResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PptxSlidesResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -431,9 +488,13 @@ request.PptxFilename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.PptxSlidesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PptxSlidesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -512,5 +573,952 @@ request.PptxFilename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Process Pptx Slides
+ /// Process a PPTX file to extract slide screenshots and XML content.
+ /// This endpoint:
+ /// 1. Validates the uploaded PPTX file
+ /// 2. Installs any provided font files
+ /// 3. Unzips the PPTX to extract slide XMLs
+ /// 4. Uses LibreOffice to generate slide screenshots
+ /// 5. Returns both screenshot URLs and XML content for each slide + ///
+ /// + /// PPTX file to process + /// + /// + /// PPTX file to process + /// + /// + /// Optional font files + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fonts = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyProcessPptxSlidesApiV1PptPptxSlidesProcessPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + Fonts = fonts, + }; + PrepareArguments( + client: HttpClient); + PrepareProcessPptxSlidesApiV1PptPptxSlidesProcessPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ProcessPptxSlidesApiV1PptPptxSlidesProcessPostSecurityRequirements, + operationName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/pptx-slides/process", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.Fonts != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Fonts.ToString() ?? string.Empty), + name: "\"fonts\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareProcessPptxSlidesApiV1PptPptxSlidesProcessPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPost", + methodName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPost", + methodName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPost", + methodName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessProcessPptxSlidesApiV1PptPptxSlidesProcessPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPost", + methodName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPost", + methodName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessProcessPptxSlidesApiV1PptPptxSlidesProcessPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.PptxSlidesResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.PptxSlidesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Process Pptx Slides
+ /// Process a PPTX file to extract slide screenshots and XML content.
+ /// This endpoint:
+ /// 1. Validates the uploaded PPTX file
+ /// 2. Installs any provided font files
+ /// 3. Unzips the PPTX to extract slide XMLs
+ /// 4. Uses LibreOffice to generate slide screenshots
+ /// 5. Returns both screenshot URLs and XML content for each slide + ///
+ /// + /// PPTX file to process + /// + /// + /// PPTX file to process + /// + /// + /// Optional font files + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fonts = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyProcessPptxSlidesApiV1PptPptxSlidesProcessPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + Fonts = fonts, + }; + PrepareArguments( + client: HttpClient); + PrepareProcessPptxSlidesApiV1PptPptxSlidesProcessPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ProcessPptxSlidesApiV1PptPptxSlidesProcessPostSecurityRequirements, + operationName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/pptx-slides/process", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.Fonts != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Fonts.ToString() ?? string.Empty), + name: "\"fonts\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareProcessPptxSlidesApiV1PptPptxSlidesProcessPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPost", + methodName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPost", + methodName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPost", + methodName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessProcessPptxSlidesApiV1PptPptxSlidesProcessPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPost", + methodName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPost", + methodName: "ProcessPptxSlidesApiV1PptPptxSlidesProcessPostAsync", + pathTemplate: "\"/api/v1/ppt/pptx-slides/process\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessProcessPptxSlidesApiV1PptPptxSlidesProcessPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.PptxSlidesResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.PptxSlidesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.PptxSlidesClient.g.cs b/src/libs/Presenton/Generated/Presenton.PptxSlidesClient.g.cs index 5392212..301018e 100644 --- a/src/libs/Presenton/Generated/Presenton.PptxSlidesClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PptxSlidesClient.g.cs @@ -72,10 +72,10 @@ public PptxSlidesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PptxSlidesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.CheckAsyncPresentationGenerationStatusApiV1PptPresentationStatusIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.CheckAsyncPresentationGenerationStatusApiV1PptPresentationStatusIdGet.g.cs index 6fceba2..0d72378 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.CheckAsyncPresentationGenerationStatusApiV1PptPresentationStatusIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.CheckAsyncPresentationGenerationStatusApiV1PptPresentationStatusIdGet.g.cs @@ -58,6 +58,32 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CheckAsyncPresentationGenerationStatusApiV1PptPresentationStatusIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Check Async Presentation Generation Status
+ /// Check the status of a presentation being generated asynchronously.
+ /// Use /api/v1/ppt/presentation/status/task-xxxxxxxxxx to get the status of presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// ID of the presentation generation task + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CheckAsyncPresentationGenerationStatusApiV1PptPresentationStatusIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,6 +113,7 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/presentation/status/{id}", baseUri: HttpClient.BaseAddress); @@ -160,6 +187,8 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -170,6 +199,11 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -187,6 +221,8 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -196,8 +232,7 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -206,6 +241,11 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -222,14 +262,15 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -269,6 +310,8 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -289,6 +332,8 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -351,9 +396,13 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -381,9 +430,13 @@ partial void ProcessCheckAsyncPresentationGenerationStatusApiV1PptPresentationSt #endif ).ConfigureAwait(false); - return - await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationApiV1PptPresentationCreatePost.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationApiV1PptPresentationCreatePost.g.cs index 51c937f..754cb61 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationApiV1PptPresentationCreatePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationApiV1PptPresentationCreatePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont /// public async global::System.Threading.Tasks.Task CreatePresentationApiV1PptPresentationCreatePostAsync( + global::Presenton.BodyCreatePresentationApiV1PptPresentationCreatePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreatePresentationApiV1PptPresentationCreatePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Presentation + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreatePresentationApiV1PptPresentationCreatePostAsResponseAsync( + global::Presenton.BodyCreatePresentationApiV1PptPresentationCreatePost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/create", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCreatePresentationApiV1PptPresentationCreatePostResponseCont #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPost.g.cs index 86e667d..0806c92 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPost.g.cs @@ -54,6 +54,32 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF /// public async global::System.Threading.Tasks.Task CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPostAsync( + global::Presenton.CreatePresentationFromJsonRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Presentation From Json Async V1
+ /// Create a presentation from JSON asynchronously.
+ /// Use /api/v1/ppt/presentation/status/task-xxxxxxxxxx to get the status of presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateFromJsonAsyncPostAsResponseAsync( + global::Presenton.CreatePresentationFromJsonRequestV1 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -88,6 +114,7 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/create/from-json/async", baseUri: HttpClient.BaseAddress); @@ -167,6 +194,8 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -177,6 +206,11 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -194,6 +228,8 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -203,8 +239,7 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -213,6 +248,11 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -229,14 +269,15 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +317,8 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -296,6 +339,8 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -358,9 +403,13 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AsyncPresentationGenerationTaskModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AsyncPresentationGenerationTaskModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -388,9 +437,13 @@ partial void ProcessCreatePresentationFromJsonAsyncV1ApiV1PptPresentationCreateF #endif ).ConfigureAwait(false); - return - await global::Presenton.AsyncPresentationGenerationTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AsyncPresentationGenerationTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPost.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPost.g.cs index 2c7fe2e..8059fcd 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPost.g.cs @@ -53,6 +53,31 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr /// public async global::System.Threading.Tasks.Task CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPostAsync( + global::Presenton.CreatePresentationFromJsonRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Presentation From Json Sync V1
+ /// Create a presentation from JSON synchronously.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFromJsonPostAsResponseAsync( + global::Presenton.CreatePresentationFromJsonRequestV1 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/create/from-json", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessCreatePresentationFromJsonSyncV1ApiV1PptPresentationCreateFr #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.DeletePresentationByIdApiV1PptPresentationIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.DeletePresentationByIdApiV1PptPresentationIdDelete.g.cs index 0410f24..08be3d4 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.DeletePresentationByIdApiV1PptPresentationIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.DeletePresentationByIdApiV1PptPresentationIdDelete.g.cs @@ -50,6 +50,27 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeletePresentationByIdApiV1PptPresentationIdDeleteAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Presentation By Id
+ /// Delete a presentation by id.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeletePresentationByIdApiV1PptPresentationIdDeleteAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -79,6 +100,7 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/presentation/{id}", baseUri: HttpClient.BaseAddress); @@ -152,6 +174,8 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -162,6 +186,11 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -179,6 +208,8 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -188,8 +219,7 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -198,6 +228,11 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -214,14 +249,15 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -261,6 +297,8 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -281,6 +319,8 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -339,6 +379,10 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -360,6 +404,10 @@ partial void ProcessDeletePresentationByIdApiV1PptPresentationIdDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.DeletePresentationByIdForUiApiV1PptPresentationIdUiDelete.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.DeletePresentationByIdForUiApiV1PptPresentationIdUiDelete.g.cs index 4fb99cc..b6b16c8 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.DeletePresentationByIdForUiApiV1PptPresentationIdUiDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.DeletePresentationByIdForUiApiV1PptPresentationIdUiDelete.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Presentation By Id For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/presentation/{id}/ui", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -336,6 +373,10 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -357,6 +398,10 @@ partial void ProcessDeletePresentationByIdForUiApiV1PptPresentationIdUiDeleteRes try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.DerivePresentationFromExistingOneApiV1PptPresentationDerivePost.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.DerivePresentationFromExistingOneApiV1PptPresentationDerivePost.g.cs index bcc6adf..0dc9655 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.DerivePresentationFromExistingOneApiV1PptPresentationDerivePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.DerivePresentationFromExistingOneApiV1PptPresentationDerivePost.g.cs @@ -53,6 +53,31 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP /// public async global::System.Threading.Tasks.Task DerivePresentationFromExistingOneApiV1PptPresentationDerivePostAsync( + global::Presenton.EditPresentationRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DerivePresentationFromExistingOneApiV1PptPresentationDerivePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Derive Presentation From Existing One
+ /// Derive a new presentation from your existing presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> DerivePresentationFromExistingOneApiV1PptPresentationDerivePostAsResponseAsync( + global::Presenton.EditPresentationRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/derive", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessDerivePresentationFromExistingOneApiV1PptPresentationDeriveP #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.EditPresentationWithNewContentApiV1PptPresentationEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.EditPresentationWithNewContentApiV1PptPresentationEditPost.g.cs index 2b3151f..ac81177 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.EditPresentationWithNewContentApiV1PptPresentationEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.EditPresentationWithNewContentApiV1PptPresentationEditPost.g.cs @@ -53,6 +53,31 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe /// public async global::System.Threading.Tasks.Task EditPresentationWithNewContentApiV1PptPresentationEditPostAsync( + global::Presenton.EditPresentationRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditPresentationWithNewContentApiV1PptPresentationEditPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Edit Presentation With New Content
+ /// Edit presentation with new content.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EditPresentationWithNewContentApiV1PptPresentationEditPostAsResponseAsync( + global::Presenton.EditPresentationRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/edit", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessEditPresentationWithNewContentApiV1PptPresentationEditPostRe #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPost.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPost.g.cs index e835389..0cd9a4e 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPost.g.cs @@ -53,6 +53,31 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos /// public async global::System.Threading.Tasks.Task ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPostAsync( + global::Presenton.BodyExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Export Presentation As Pptx Or Pdf V1
+ /// Export presentation as PPTX, PDF or PNG using API.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPostAsResponseAsync( + global::Presenton.BodyExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/export", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessExportPresentationAsPptxOrPdfV1ApiV1PptPresentationExportPos #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPost.g.cs index 37a054c..b592847 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPost.g.cs @@ -54,6 +54,32 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync /// public async global::System.Threading.Tasks.Task GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPostAsync( + global::Presenton.GeneratePresentationRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Presentation Async V1
+ /// Generate a presentation asynchronously.
+ /// Use /api/v1/ppt/presentation/status/task-xxxxxxxxxx to get the status of presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsyncPostAsResponseAsync( + global::Presenton.GeneratePresentationRequestV1 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -88,6 +114,7 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/generate/async", baseUri: HttpClient.BaseAddress); @@ -167,6 +194,8 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -177,6 +206,11 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -194,6 +228,8 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -203,8 +239,7 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -213,6 +248,11 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -229,14 +269,15 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +317,8 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -296,6 +339,8 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -358,9 +403,13 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -388,9 +437,13 @@ partial void ProcessGeneratePresentationAsyncV1ApiV1PptPresentationGenerateAsync #endif ).ConfigureAwait(false); - return - await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.GeneratePresentationSyncV1ApiV1PptPresentationGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.GeneratePresentationSyncV1ApiV1PptPresentationGeneratePost.g.cs index 9d61340..cb9560f 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.GeneratePresentationSyncV1ApiV1PptPresentationGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.GeneratePresentationSyncV1ApiV1PptPresentationGeneratePost.g.cs @@ -53,6 +53,31 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe /// public async global::System.Threading.Tasks.Task GeneratePresentationSyncV1ApiV1PptPresentationGeneratePostAsync( + global::Presenton.GeneratePresentationRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GeneratePresentationSyncV1ApiV1PptPresentationGeneratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Presentation Sync V1
+ /// Generate a presentation synchronously.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GeneratePresentationSyncV1ApiV1PptPresentationGeneratePostAsResponseAsync( + global::Presenton.GeneratePresentationRequestV1 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/generate", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessGeneratePresentationSyncV1ApiV1PptPresentationGeneratePostRe #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.GetAllUserPresentationsApiV1PptPresentationAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.GetAllUserPresentationsApiV1PptPresentationAllGet.g.cs index b351c22..4bd0904 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.GetAllUserPresentationsApiV1PptPresentationAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.GetAllUserPresentationsApiV1PptPresentationAllGet.g.cs @@ -63,6 +63,36 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllUserPresentationsApiV1PptPresentationAllGetAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get All User Presentations
+ /// Get all presentations of the user.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAllUserPresentationsApiV1PptPresentationAllGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -93,12 +123,13 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/all", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -171,6 +202,8 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +214,11 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +236,8 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +247,7 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +256,11 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +277,15 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +325,8 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +347,8 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -362,9 +411,13 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -392,9 +445,13 @@ partial void ProcessGetAllUserPresentationsApiV1PptPresentationAllGetResponseCon #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.GetAllUserPresentationsForUiApiV1PptPresentationAllUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.GetAllUserPresentationsForUiApiV1PptPresentationAllUiGet.g.cs index 543195c..f12a996 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.GetAllUserPresentationsForUiApiV1PptPresentationAllUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.GetAllUserPresentationsForUiApiV1PptPresentationAllUiGet.g.cs @@ -60,6 +60,33 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllUserPresentationsForUiApiV1PptPresentationAllUiGetAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get All User Presentations For Ui + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAllUserPresentationsForUiApiV1PptPresentationAllUiGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -90,12 +117,13 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/all/ui", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -168,6 +196,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +208,11 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +230,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +241,7 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +250,11 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +271,15 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +319,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +341,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -359,9 +405,13 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -389,9 +439,13 @@ partial void ProcessGetAllUserPresentationsForUiApiV1PptPresentationAllUiGetResp #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.GetPresentationAndSlidesByIdApiV1PptPresentationIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.GetPresentationAndSlidesByIdApiV1PptPresentationIdGet.g.cs index f293714..b44646a 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.GetPresentationAndSlidesByIdApiV1PptPresentationIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.GetPresentationAndSlidesByIdApiV1PptPresentationIdGet.g.cs @@ -55,6 +55,29 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPresentationAndSlidesByIdApiV1PptPresentationIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Presentation And Slides By Id
+ /// Get a presentation and its slides by id.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetPresentationAndSlidesByIdApiV1PptPresentationIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -84,6 +107,7 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/presentation/{id}", baseUri: HttpClient.BaseAddress); @@ -157,6 +181,8 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -167,6 +193,11 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -184,6 +215,8 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -193,8 +226,7 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -203,6 +235,11 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -219,14 +256,15 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -266,6 +304,8 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -286,6 +326,8 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -348,9 +390,13 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationWithSlidesV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationWithSlidesV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -378,9 +424,13 @@ partial void ProcessGetPresentationAndSlidesByIdApiV1PptPresentationIdGetRespons #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationWithSlidesV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationWithSlidesV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.GetPresentationForUiApiV1PptPresentationIdUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.GetPresentationForUiApiV1PptPresentationIdUiGet.g.cs index 805f2e8..0878a74 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.GetPresentationForUiApiV1PptPresentationIdUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.GetPresentationForUiApiV1PptPresentationIdUiGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPresentationForUiApiV1PptPresentationIdUiGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Presentation For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetPresentationForUiApiV1PptPresentationIdUiGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/presentation/{id}/ui", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationWithSlidesV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationWithSlidesV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessGetPresentationForUiApiV1PptPresentationIdUiGetResponseConte #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationWithSlidesV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationWithSlidesV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.PreparePresentationApiV1PptPresentationPreparePost.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.PreparePresentationApiV1PptPresentationPreparePost.g.cs index 8e98192..8299239 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.PreparePresentationApiV1PptPresentationPreparePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.PreparePresentationApiV1PptPresentationPreparePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo /// public async global::System.Threading.Tasks.Task PreparePresentationApiV1PptPresentationPreparePostAsync( + global::Presenton.BodyPreparePresentationApiV1PptPresentationPreparePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PreparePresentationApiV1PptPresentationPreparePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Prepare Presentation + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> PreparePresentationApiV1PptPresentationPreparePostAsResponseAsync( + global::Presenton.BodyPreparePresentationApiV1PptPresentationPreparePost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/prepare", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessPreparePresentationApiV1PptPresentationPreparePostResponseCo #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.StreamPresentationApiV1PptPresentationStreamIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.StreamPresentationApiV1PptPresentationStreamIdGet.g.cs index c65a811..4ee7c73 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.StreamPresentationApiV1PptPresentationStreamIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.StreamPresentationApiV1PptPresentationStreamIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await StreamPresentationApiV1PptPresentationStreamIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Stream Presentation + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> StreamPresentationApiV1PptPresentationStreamIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/presentation/stream/{id}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationWithSlidesV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationWithSlidesV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessStreamPresentationApiV1PptPresentationStreamIdGetResponseCon #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationWithSlidesV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationWithSlidesV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.UpdatePresentationApiV1PptPresentationUpdatePatch.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.UpdatePresentationApiV1PptPresentationUpdatePatch.g.cs index da118c7..393de78 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.UpdatePresentationApiV1PptPresentationUpdatePatch.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.UpdatePresentationApiV1PptPresentationUpdatePatch.g.cs @@ -50,6 +50,28 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon /// public async global::System.Threading.Tasks.Task UpdatePresentationApiV1PptPresentationUpdatePatchAsync( + global::Presenton.BodyUpdatePresentationApiV1PptPresentationUpdatePatch request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdatePresentationApiV1PptPresentationUpdatePatchAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Presentation + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdatePresentationApiV1PptPresentationUpdatePatchAsResponseAsync( + global::Presenton.BodyUpdatePresentationApiV1PptPresentationUpdatePatch request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/presentation/update", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationWithSlidesV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationWithSlidesV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessUpdatePresentationApiV1PptPresentationUpdatePatchResponseCon #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationWithSlidesV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationWithSlidesV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentationClient.g.cs b/src/libs/Presenton/Generated/Presenton.PresentationClient.g.cs index 596a15f..99b04e6 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentationClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentationClient.g.cs @@ -72,10 +72,10 @@ public PresentationClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PresentationClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.PresentonClient.g.cs b/src/libs/Presenton/Generated/Presenton.PresentonClient.g.cs index 40200c1..b1c0535 100644 --- a/src/libs/Presenton/Generated/Presenton.PresentonClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.PresentonClient.g.cs @@ -42,7 +42,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public AuthClient Auth => new AuthClient(HttpClient, authorizations: Authorizations, options: Options) + public AuthClient Auth => new AuthClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -51,7 +51,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public BillingClient Billing => new BillingClient(HttpClient, authorizations: Authorizations, options: Options) + public BillingClient Billing => new BillingClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -60,7 +60,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public CreditClient Credit => new CreditClient(HttpClient, authorizations: Authorizations, options: Options) + public CreditClient Credit => new CreditClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -69,7 +69,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public DebugClient Debug => new DebugClient(HttpClient, authorizations: Authorizations, options: Options) + public DebugClient Debug => new DebugClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -78,7 +78,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public DesignSystemClient DesignSystem => new DesignSystemClient(HttpClient, authorizations: Authorizations, options: Options) + public DesignSystemClient DesignSystem => new DesignSystemClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -87,7 +87,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public DownloadsClient Downloads => new DownloadsClient(HttpClient, authorizations: Authorizations, options: Options) + public DownloadsClient Downloads => new DownloadsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -96,7 +96,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public FilesClient Files => new FilesClient(HttpClient, authorizations: Authorizations, options: Options) + public FilesClient Files => new FilesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -105,7 +105,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public FontsClient Fonts => new FontsClient(HttpClient, authorizations: Authorizations, options: Options) + public FontsClient Fonts => new FontsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -114,7 +114,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public HealthClient Health => new HealthClient(HttpClient, authorizations: Authorizations, options: Options) + public HealthClient Health => new HealthClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -123,7 +123,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public HtmlCreateClient HtmlCreate => new HtmlCreateClient(HttpClient, authorizations: Authorizations, options: Options) + public HtmlCreateClient HtmlCreate => new HtmlCreateClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -132,7 +132,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public HtmlEditClient HtmlEdit => new HtmlEditClient(HttpClient, authorizations: Authorizations, options: Options) + public HtmlEditClient HtmlEdit => new HtmlEditClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -141,7 +141,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public HtmlToReactClient HtmlToReact => new HtmlToReactClient(HttpClient, authorizations: Authorizations, options: Options) + public HtmlToReactClient HtmlToReact => new HtmlToReactClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -150,7 +150,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public IconsClient Icons => new IconsClient(HttpClient, authorizations: Authorizations, options: Options) + public IconsClient Icons => new IconsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -159,7 +159,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public ImagesClient Images => new ImagesClient(HttpClient, authorizations: Authorizations, options: Options) + public ImagesClient Images => new ImagesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -168,7 +168,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public MockClient Mock => new MockClient(HttpClient, authorizations: Authorizations, options: Options) + public MockClient Mock => new MockClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -177,7 +177,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public OutlinesClient Outlines => new OutlinesClient(HttpClient, authorizations: Authorizations, options: Options) + public OutlinesClient Outlines => new OutlinesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -186,7 +186,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public PdfSlidesClient PdfSlides => new PdfSlidesClient(HttpClient, authorizations: Authorizations, options: Options) + public PdfSlidesClient PdfSlides => new PdfSlidesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -195,7 +195,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public PptxFontsClient PptxFonts => new PptxFontsClient(HttpClient, authorizations: Authorizations, options: Options) + public PptxFontsClient PptxFonts => new PptxFontsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -204,7 +204,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public PptxSlidesClient PptxSlides => new PptxSlidesClient(HttpClient, authorizations: Authorizations, options: Options) + public PptxSlidesClient PptxSlides => new PptxSlidesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -213,7 +213,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public PresentationClient Presentation => new PresentationClient(HttpClient, authorizations: Authorizations, options: Options) + public PresentationClient Presentation => new PresentationClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -222,7 +222,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public ReactEditClient ReactEdit => new ReactEditClient(HttpClient, authorizations: Authorizations, options: Options) + public ReactEditClient ReactEdit => new ReactEditClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -231,7 +231,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public SlideClient Slide => new SlideClient(HttpClient, authorizations: Authorizations, options: Options) + public SlideClient Slide => new SlideClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -240,7 +240,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public SlideToHtmlClient SlideToHtml => new SlideToHtmlClient(HttpClient, authorizations: Authorizations, options: Options) + public SlideToHtmlClient SlideToHtml => new SlideToHtmlClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -249,7 +249,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public SlideToReactClient SlideToReact => new SlideToReactClient(HttpClient, authorizations: Authorizations, options: Options) + public SlideToReactClient SlideToReact => new SlideToReactClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -258,7 +258,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public TemplateClient Template => new TemplateClient(HttpClient, authorizations: Authorizations, options: Options) + public TemplateClient Template => new TemplateClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -267,7 +267,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public TemplateManagementClient TemplateManagement => new TemplateManagementClient(HttpClient, authorizations: Authorizations, options: Options) + public TemplateManagementClient TemplateManagement => new TemplateManagementClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -276,7 +276,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public ThemesClient Themes => new ThemesClient(HttpClient, authorizations: Authorizations, options: Options) + public ThemesClient Themes => new ThemesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -285,7 +285,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V1OnClient V1On => new V1OnClient(HttpClient, authorizations: Authorizations, options: Options) + public V1OnClient V1On => new V1OnClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -294,7 +294,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V2DesignClient V2Design => new V2DesignClient(HttpClient, authorizations: Authorizations, options: Options) + public V2DesignClient V2Design => new V2DesignClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -303,7 +303,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V2FixSlideClient V2FixSlide => new V2FixSlideClient(HttpClient, authorizations: Authorizations, options: Options) + public V2FixSlideClient V2FixSlide => new V2FixSlideClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -312,7 +312,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V2FontsClient V2Fonts => new V2FontsClient(HttpClient, authorizations: Authorizations, options: Options) + public V2FontsClient V2Fonts => new V2FontsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -321,7 +321,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V2OnClient V2On => new V2OnClient(HttpClient, authorizations: Authorizations, options: Options) + public V2OnClient V2On => new V2OnClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -330,7 +330,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V2OnboardingClient V2Onboarding => new V2OnboardingClient(HttpClient, authorizations: Authorizations, options: Options) + public V2OnboardingClient V2Onboarding => new V2OnboardingClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -339,7 +339,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V2PresentationClient V2Presentation => new V2PresentationClient(HttpClient, authorizations: Authorizations, options: Options) + public V2PresentationClient V2Presentation => new V2PresentationClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -348,7 +348,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V2SlideClient V2Slide => new V2SlideClient(HttpClient, authorizations: Authorizations, options: Options) + public V2SlideClient V2Slide => new V2SlideClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -357,7 +357,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3AsyncTaskClient V3AsyncTask => new V3AsyncTaskClient(HttpClient, authorizations: Authorizations, options: Options) + public V3AsyncTaskClient V3AsyncTask => new V3AsyncTaskClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -366,7 +366,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3EnterpriseClient V3Enterprise => new V3EnterpriseClient(HttpClient, authorizations: Authorizations, options: Options) + public V3EnterpriseClient V3Enterprise => new V3EnterpriseClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -375,7 +375,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3FilesClient V3Files => new V3FilesClient(HttpClient, authorizations: Authorizations, options: Options) + public V3FilesClient V3Files => new V3FilesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -384,7 +384,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3GitHubClient V3GitHub => new V3GitHubClient(HttpClient, authorizations: Authorizations, options: Options) + public V3GitHubClient V3GitHub => new V3GitHubClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -393,7 +393,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3ImagesClient V3Images => new V3ImagesClient(HttpClient, authorizations: Authorizations, options: Options) + public V3ImagesClient V3Images => new V3ImagesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -402,7 +402,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3PlaygroundClient V3Playground => new V3PlaygroundClient(HttpClient, authorizations: Authorizations, options: Options) + public V3PlaygroundClient V3Playground => new V3PlaygroundClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -411,7 +411,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3PresentationClient V3Presentation => new V3PresentationClient(HttpClient, authorizations: Authorizations, options: Options) + public V3PresentationClient V3Presentation => new V3PresentationClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -420,7 +420,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3SchemaClient V3Schema => new V3SchemaClient(HttpClient, authorizations: Authorizations, options: Options) + public V3SchemaClient V3Schema => new V3SchemaClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -429,7 +429,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3SmartDesignClient V3SmartDesign => new V3SmartDesignClient(HttpClient, authorizations: Authorizations, options: Options) + public V3SmartDesignClient V3SmartDesign => new V3SmartDesignClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -438,7 +438,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3StandardTemplateClient V3StandardTemplate => new V3StandardTemplateClient(HttpClient, authorizations: Authorizations, options: Options) + public V3StandardTemplateClient V3StandardTemplate => new V3StandardTemplateClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -447,7 +447,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3ThemeClient V3Theme => new V3ThemeClient(HttpClient, authorizations: Authorizations, options: Options) + public V3ThemeClient V3Theme => new V3ThemeClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -456,7 +456,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public V3WebhookClient V3Webhook => new V3WebhookClient(HttpClient, authorizations: Authorizations, options: Options) + public V3WebhookClient V3Webhook => new V3WebhookClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -465,7 +465,7 @@ public sealed partial class PresentonClient : global::Presenton.IPresentonClient /// /// /// - public WebhookClient Webhook => new WebhookClient(HttpClient, authorizations: Authorizations, options: Options) + public WebhookClient Webhook => new WebhookClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -504,10 +504,10 @@ public PresentonClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PresentonClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.ReactEditClient.EditReactWithImageEndpointApiV1PptReactEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.ReactEditClient.EditReactWithImageEndpointApiV1PptReactEditPost.g.cs index 332c8cc..11544f1 100644 --- a/src/libs/Presenton/Generated/Presenton.ReactEditClient.EditReactWithImageEndpointApiV1PptReactEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ReactEditClient.EditReactWithImageEndpointApiV1PptReactEditPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessEditReactWithImageEndpointApiV1PptReactEditPostResponseConte /// public async global::System.Threading.Tasks.Task EditReactWithImageEndpointApiV1PptReactEditPostAsync( + global::Presenton.BodyEditReactWithImageEndpointApiV1PptReactEditPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditReactWithImageEndpointApiV1PptReactEditPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Edit React With Image Endpoint + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EditReactWithImageEndpointApiV1PptReactEditPostAsResponseAsync( + global::Presenton.BodyEditReactWithImageEndpointApiV1PptReactEditPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessEditReactWithImageEndpointApiV1PptReactEditPostResponseConte var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/react-edit/", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessEditReactWithImageEndpointApiV1PptReactEditPostResponseConte __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); if (request.CurrentUiImage != default) { @@ -157,7 +181,8 @@ request.CurrentUiImagename is null { __contentCurrentUiImage.Headers.ContentDisposition.FileNameStar = null; } - } + + } if (request.SketchImage != default) { @@ -198,21 +223,27 @@ request.SketchImagename is null { __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; } + } __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.React ?? string.Empty), name: "\"react\""); + __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), name: "\"prompt\""); + if (request.DesignSystem != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.DesignSystem ?? string.Empty), name: "\"design_system\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -254,6 +285,8 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -264,6 +297,11 @@ request.SketchImagename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -281,6 +319,8 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -290,8 +330,7 @@ request.SketchImagename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -300,6 +339,11 @@ request.SketchImagename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -316,14 +360,15 @@ request.SketchImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -363,6 +408,8 @@ request.SketchImagename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -383,6 +430,8 @@ request.SketchImagename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -445,9 +494,13 @@ request.SketchImagename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.HtmlEditResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.HtmlEditResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -475,9 +528,13 @@ request.SketchImagename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.HtmlEditResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.HtmlEditResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -569,5 +626,1084 @@ request.SketchImagename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Edit React With Image Endpoint + /// + /// + /// Current UI image file (optional) + /// + /// + /// Current UI image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Current React component code to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Optional design system JSON to guide the edit + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task EditReactWithImageEndpointApiV1PptReactEditPostAsync( + string react, + string prompt, + global::System.IO.Stream? currentUiImage = default, + string? currentUiImagename = default, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + string? designSystem = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + var request = new global::Presenton.BodyEditReactWithImageEndpointApiV1PptReactEditPost + { + CurrentUiImage = global::System.Array.Empty(), + CurrentUiImagename = currentUiImagename, + SketchImage = global::System.Array.Empty(), + SketchImagename = sketchImagename, + React = react, + Prompt = prompt, + DesignSystem = designSystem, + }; + PrepareArguments( + client: HttpClient); + PrepareEditReactWithImageEndpointApiV1PptReactEditPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_EditReactWithImageEndpointApiV1PptReactEditPostSecurityRequirements, + operationName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/react-edit/", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + if (currentUiImage != default) + { + + var __contentCurrentUiImage = new global::System.Net.Http.StreamContent(currentUiImage); + __contentCurrentUiImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.CurrentUiImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.CurrentUiImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentCurrentUiImage, + name: "\"current_ui_image\"", + fileName: request.CurrentUiImagename != null ? $"\"{request.CurrentUiImagename}\"" : string.Empty); + if (__contentCurrentUiImage.Headers.ContentDisposition != null) + { + __contentCurrentUiImage.Headers.ContentDisposition.FileNameStar = null; + } + + } + if (sketchImage != default) + { + + var __contentSketchImage = new global::System.Net.Http.StreamContent(sketchImage); + __contentSketchImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.SketchImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.SketchImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSketchImage, + name: "\"sketch_image\"", + fileName: request.SketchImagename != null ? $"\"{request.SketchImagename}\"" : string.Empty); + if (__contentSketchImage.Headers.ContentDisposition != null) + { + __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; + } + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.React ?? string.Empty), + name: "\"react\""); + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), + name: "\"prompt\""); + + if (request.DesignSystem != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.DesignSystem ?? string.Empty), + name: "\"design_system\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareEditReactWithImageEndpointApiV1PptReactEditPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditReactWithImageEndpointApiV1PptReactEditPost", + methodName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync", + pathTemplate: "\"/api/v1/ppt/react-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditReactWithImageEndpointApiV1PptReactEditPost", + methodName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync", + pathTemplate: "\"/api/v1/ppt/react-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditReactWithImageEndpointApiV1PptReactEditPost", + methodName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync", + pathTemplate: "\"/api/v1/ppt/react-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessEditReactWithImageEndpointApiV1PptReactEditPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditReactWithImageEndpointApiV1PptReactEditPost", + methodName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync", + pathTemplate: "\"/api/v1/ppt/react-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditReactWithImageEndpointApiV1PptReactEditPost", + methodName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync", + pathTemplate: "\"/api/v1/ppt/react-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessEditReactWithImageEndpointApiV1PptReactEditPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.HtmlEditResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.HtmlEditResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Edit React With Image Endpoint + /// + /// + /// Current UI image file (optional) + /// + /// + /// Current UI image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Sketch/indication image file (optional) + /// + /// + /// Current React component code to edit + /// + /// + /// Text prompt describing the changes + /// + /// + /// Optional design system JSON to guide the edit + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EditReactWithImageEndpointApiV1PptReactEditPostAsResponseAsync( + string react, + string prompt, + global::System.IO.Stream? currentUiImage = default, + string? currentUiImagename = default, + global::System.IO.Stream? sketchImage = default, + string? sketchImagename = default, + string? designSystem = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + var request = new global::Presenton.BodyEditReactWithImageEndpointApiV1PptReactEditPost + { + CurrentUiImage = global::System.Array.Empty(), + CurrentUiImagename = currentUiImagename, + SketchImage = global::System.Array.Empty(), + SketchImagename = sketchImagename, + React = react, + Prompt = prompt, + DesignSystem = designSystem, + }; + PrepareArguments( + client: HttpClient); + PrepareEditReactWithImageEndpointApiV1PptReactEditPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_EditReactWithImageEndpointApiV1PptReactEditPostSecurityRequirements, + operationName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/react-edit/", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + if (currentUiImage != default) + { + + var __contentCurrentUiImage = new global::System.Net.Http.StreamContent(currentUiImage); + __contentCurrentUiImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.CurrentUiImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.CurrentUiImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentCurrentUiImage, + name: "\"current_ui_image\"", + fileName: request.CurrentUiImagename != null ? $"\"{request.CurrentUiImagename}\"" : string.Empty); + if (__contentCurrentUiImage.Headers.ContentDisposition != null) + { + __contentCurrentUiImage.Headers.ContentDisposition.FileNameStar = null; + } + + } + if (sketchImage != default) + { + + var __contentSketchImage = new global::System.Net.Http.StreamContent(sketchImage); + __contentSketchImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.SketchImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.SketchImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSketchImage, + name: "\"sketch_image\"", + fileName: request.SketchImagename != null ? $"\"{request.SketchImagename}\"" : string.Empty); + if (__contentSketchImage.Headers.ContentDisposition != null) + { + __contentSketchImage.Headers.ContentDisposition.FileNameStar = null; + } + + } + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.React ?? string.Empty), + name: "\"react\""); + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty), + name: "\"prompt\""); + + if (request.DesignSystem != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.DesignSystem ?? string.Empty), + name: "\"design_system\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareEditReactWithImageEndpointApiV1PptReactEditPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditReactWithImageEndpointApiV1PptReactEditPost", + methodName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync", + pathTemplate: "\"/api/v1/ppt/react-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditReactWithImageEndpointApiV1PptReactEditPost", + methodName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync", + pathTemplate: "\"/api/v1/ppt/react-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditReactWithImageEndpointApiV1PptReactEditPost", + methodName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync", + pathTemplate: "\"/api/v1/ppt/react-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessEditReactWithImageEndpointApiV1PptReactEditPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditReactWithImageEndpointApiV1PptReactEditPost", + methodName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync", + pathTemplate: "\"/api/v1/ppt/react-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "EditReactWithImageEndpointApiV1PptReactEditPost", + methodName: "EditReactWithImageEndpointApiV1PptReactEditPostAsync", + pathTemplate: "\"/api/v1/ppt/react-edit/\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessEditReactWithImageEndpointApiV1PptReactEditPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.HtmlEditResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.HtmlEditResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.ReactEditClient.g.cs b/src/libs/Presenton/Generated/Presenton.ReactEditClient.g.cs index e99d0f8..eb138aa 100644 --- a/src/libs/Presenton/Generated/Presenton.ReactEditClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ReactEditClient.g.cs @@ -72,10 +72,10 @@ public ReactEditClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ReactEditClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.SlideClient.EditSlideApiV1PptSlideEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.SlideClient.EditSlideApiV1PptSlideEditPost.g.cs index 893d727..9c22755 100644 --- a/src/libs/Presenton/Generated/Presenton.SlideClient.EditSlideApiV1PptSlideEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.SlideClient.EditSlideApiV1PptSlideEditPost.g.cs @@ -57,6 +57,35 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( /// public async global::System.Threading.Tasks.Task> EditSlideApiV1PptSlideEditPostAsync( + global::Presenton.EditSlideRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditSlideApiV1PptSlideEditPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Edit Slide
+ /// Edit a slide with a prompt.
+ /// Usage options:
+ /// - Provide `id` + `prompt` to edit a specific slide by id.
+ /// - Provide `presentation_id` + `prompt` to edit by presentation. You can also
+ /// pass `slide_index` to target a specific slide; if omitted, the index is
+ /// inferred from the prompt.
+ /// - Provide `export_as` to export the edited presentation as `pptx` or `pdf`. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> EditSlideApiV1PptSlideEditPostAsResponseAsync( + global::Presenton.EditSlideRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -91,6 +120,7 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/slide/edit", baseUri: HttpClient.BaseAddress); @@ -170,6 +200,8 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +212,11 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +234,8 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +245,7 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +254,11 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +275,15 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +323,8 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +345,8 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -361,9 +409,13 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -391,9 +443,13 @@ partial void ProcessEditSlideApiV1PptSlideEditPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.SlideClient.EditSlideHtmlApiV1PptSlideEditHtmlPost.g.cs b/src/libs/Presenton/Generated/Presenton.SlideClient.EditSlideHtmlApiV1PptSlideEditHtmlPost.g.cs index b37da15..4d7597f 100644 --- a/src/libs/Presenton/Generated/Presenton.SlideClient.EditSlideHtmlApiV1PptSlideEditHtmlPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.SlideClient.EditSlideHtmlApiV1PptSlideEditHtmlPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( /// public async global::System.Threading.Tasks.Task EditSlideHtmlApiV1PptSlideEditHtmlPostAsync( + global::Presenton.BodyEditSlideHtmlApiV1PptSlideEditHtmlPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditSlideHtmlApiV1PptSlideEditHtmlPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Edit Slide Html + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EditSlideHtmlApiV1PptSlideEditHtmlPostAsResponseAsync( + global::Presenton.BodyEditSlideHtmlApiV1PptSlideEditHtmlPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/slide/edit-html", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.SlideModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.SlideModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessEditSlideHtmlApiV1PptSlideEditHtmlPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.SlideModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.SlideModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.SlideClient.g.cs b/src/libs/Presenton/Generated/Presenton.SlideClient.g.cs index 1a4660f..c83f049 100644 --- a/src/libs/Presenton/Generated/Presenton.SlideClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.SlideClient.g.cs @@ -72,10 +72,10 @@ public SlideClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SlideClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.SlideToHtmlClient.ConvertSlideToHtmlApiV1PptSlideToHtmlPost.g.cs b/src/libs/Presenton/Generated/Presenton.SlideToHtmlClient.ConvertSlideToHtmlApiV1PptSlideToHtmlPost.g.cs index 2d41e5a..a252289 100644 --- a/src/libs/Presenton/Generated/Presenton.SlideToHtmlClient.ConvertSlideToHtmlApiV1PptSlideToHtmlPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.SlideToHtmlClient.ConvertSlideToHtmlApiV1PptSlideToHtmlPost.g.cs @@ -55,6 +55,33 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( /// public async global::System.Threading.Tasks.Task ConvertSlideToHtmlApiV1PptSlideToHtmlPostAsync( + global::Presenton.SlideToHtmlRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ConvertSlideToHtmlApiV1PptSlideToHtmlPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Convert Slide To Html
+ /// Convert a slide image and its OXML data to HTML using Anthropic Claude API.
+ /// Args:
+ /// request: JSON request containing image path and XML content
+ /// Returns:
+ /// SlideToHtmlResponse with generated HTML + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ConvertSlideToHtmlApiV1PptSlideToHtmlPostAsResponseAsync( + global::Presenton.SlideToHtmlRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +116,7 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/slide-to-html/", baseUri: HttpClient.BaseAddress); @@ -168,6 +196,8 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +208,11 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +230,8 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +241,7 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +250,11 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +271,15 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +319,8 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +341,8 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -359,9 +405,13 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.SlideToHtmlResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.SlideToHtmlResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -389,9 +439,13 @@ partial void ProcessConvertSlideToHtmlApiV1PptSlideToHtmlPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.SlideToHtmlResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.SlideToHtmlResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.SlideToHtmlClient.g.cs b/src/libs/Presenton/Generated/Presenton.SlideToHtmlClient.g.cs index 4ae9d67..6392a51 100644 --- a/src/libs/Presenton/Generated/Presenton.SlideToHtmlClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.SlideToHtmlClient.g.cs @@ -72,10 +72,10 @@ public SlideToHtmlClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SlideToHtmlClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.SlideToReactClient.ConvertSlideToReactApiV1PptSlideToReactPost.g.cs b/src/libs/Presenton/Generated/Presenton.SlideToReactClient.ConvertSlideToReactApiV1PptSlideToReactPost.g.cs index e714b6d..0d32f0a 100644 --- a/src/libs/Presenton/Generated/Presenton.SlideToReactClient.ConvertSlideToReactApiV1PptSlideToReactPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.SlideToReactClient.ConvertSlideToReactApiV1PptSlideToReactPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( /// public async global::System.Threading.Tasks.Task ConvertSlideToReactApiV1PptSlideToReactPostAsync( + global::Presenton.SlideToReactRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ConvertSlideToReactApiV1PptSlideToReactPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Convert Slide To React + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ConvertSlideToReactApiV1PptSlideToReactPostAsResponseAsync( + global::Presenton.SlideToReactRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/slide-to-react/", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.SlideToReactResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.SlideToReactResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessConvertSlideToReactApiV1PptSlideToReactPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.SlideToReactResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.SlideToReactResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.SlideToReactClient.g.cs b/src/libs/Presenton/Generated/Presenton.SlideToReactClient.g.cs index c4bc4dc..d75684e 100644 --- a/src/libs/Presenton/Generated/Presenton.SlideToReactClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.SlideToReactClient.g.cs @@ -72,10 +72,10 @@ public SlideToReactClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public SlideToReactClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePost.g.cs index 1ad58d4..ae82d85 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse /// public async global::System.Threading.Tasks.Task CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostAsync( + global::Presenton.CloneSlideLayoutRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Clone Slide Layout + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostAsResponseAsync( + global::Presenton.CloneSlideLayoutRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/slide-layout/clone", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse { __response.EnsureSuccessStatusCode(); - return - global::Presenton.SaveTemplateLayoutData.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.SaveTemplateLayoutData.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCloneSlideLayoutApiV1PptTemplateSlideLayoutClonePostResponse #endif ).ConfigureAwait(false); - return - await global::Presenton.SaveTemplateLayoutData.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.SaveTemplateLayoutData.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.CloneTemplateApiV1PptTemplateClonePost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.CloneTemplateApiV1PptTemplateClonePost.g.cs index 39aacdf..d61e6d6 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.CloneTemplateApiV1PptTemplateClonePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.CloneTemplateApiV1PptTemplateClonePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( /// public async global::System.Threading.Tasks.Task CloneTemplateApiV1PptTemplateClonePostAsync( + global::Presenton.CloneTemplateRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CloneTemplateApiV1PptTemplateClonePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Clone Template + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CloneTemplateApiV1PptTemplateClonePostAsResponseAsync( + global::Presenton.CloneTemplateRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/clone", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.SaveTemplateResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.SaveTemplateResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCloneTemplateApiV1PptTemplateClonePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.SaveTemplateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.SaveTemplateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePost.g.cs index 21758f3..a63f297 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePost.g.cs @@ -56,6 +56,34 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon /// public async global::System.Threading.Tasks.Task CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostAsync( + global::Presenton.CreateSlideLayoutRequest request, + bool? isReconstruct = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostAsResponseAsync( + + request: request, + isReconstruct: isReconstruct, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Slide Layout + /// + /// + /// Whether the slide layout is being reconstructed
+ /// Default Value: false + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostAsResponseAsync( + global::Presenton.CreateSlideLayoutRequest request, bool? isReconstruct = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, @@ -92,11 +120,12 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/slide-layout/create", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("is_reconstruct", isReconstruct?.ToString().ToLowerInvariant()) + .AddOptionalParameter("is_reconstruct", isReconstruct?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -175,6 +204,8 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +216,11 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +238,8 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +249,7 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +258,11 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +279,15 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +327,8 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +349,8 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -366,9 +413,13 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon { __response.EnsureSuccessStatusCode(); - return - global::Presenton.CreateSlideLayoutResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.CreateSlideLayoutResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -396,9 +447,13 @@ partial void ProcessCreateSlideLayoutApiV1PptTemplateSlideLayoutCreatePostRespon #endif ).ConfigureAwait(false); - return - await global::Presenton.CreateSlideLayoutResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.CreateSlideLayoutResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPost.g.cs index a0feea6..38da35a 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPost.g.cs @@ -56,6 +56,34 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes /// public async global::System.Threading.Tasks.Task CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostAsync( + global::Presenton.CreateSlideLayoutRequest request, + bool? isReconstruct = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostAsResponseAsync( + + request: request, + isReconstruct: isReconstruct, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Slide Layout Old + /// + /// + /// Whether the slide layout is being reconstructed
+ /// Default Value: false + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostAsResponseAsync( + global::Presenton.CreateSlideLayoutRequest request, bool? isReconstruct = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, @@ -92,11 +120,12 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/create/slide-layout", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("is_reconstruct", isReconstruct?.ToString().ToLowerInvariant()) + .AddOptionalParameter("is_reconstruct", isReconstruct?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -175,6 +204,8 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +216,11 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +238,8 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +249,7 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +258,11 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +279,15 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +327,8 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +349,8 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -366,9 +413,13 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes { __response.EnsureSuccessStatusCode(); - return - global::Presenton.CreateSlideLayoutResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.CreateSlideLayoutResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -396,9 +447,13 @@ partial void ProcessCreateSlideLayoutOldApiV1PptTemplateCreateSlideLayoutPostRes #endif ).ConfigureAwait(false); - return - await global::Presenton.CreateSlideLayoutResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.CreateSlideLayoutResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.EditSlideLayoutApiV1PptTemplateSlideLayoutEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.EditSlideLayoutApiV1PptTemplateSlideLayoutEditPost.g.cs index a57bd08..b62ccca 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.EditSlideLayoutApiV1PptTemplateSlideLayoutEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.EditSlideLayoutApiV1PptTemplateSlideLayoutEditPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo /// public async global::System.Threading.Tasks.Task EditSlideLayoutApiV1PptTemplateSlideLayoutEditPostAsync( + global::Presenton.EditSlideLayoutRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditSlideLayoutApiV1PptTemplateSlideLayoutEditPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Edit Slide Layout + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EditSlideLayoutApiV1PptTemplateSlideLayoutEditPostAsResponseAsync( + global::Presenton.EditSlideLayoutRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/slide-layout/edit", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EditSlideLayoutResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EditSlideLayoutResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessEditSlideLayoutApiV1PptTemplateSlideLayoutEditPostResponseCo #endif ).ConfigureAwait(false); - return - await global::Presenton.EditSlideLayoutResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EditSlideLayoutResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPost.g.cs index 31d5818..4319031 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection /// public async global::System.Threading.Tasks.Task EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPostAsync( + global::Presenton.EditSlideLayoutSectionRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Edit Slide Layout Section + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSectionPostAsResponseAsync( + global::Presenton.EditSlideLayoutSectionRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/slide-layout/edit-section", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EditSlideLayoutSectionResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EditSlideLayoutSectionResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessEditSlideLayoutSectionApiV1PptTemplateSlideLayoutEditSection #endif ).ConfigureAwait(false); - return - await global::Presenton.EditSlideLayoutSectionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EditSlideLayoutSectionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.GetAllTemplatesApiV1PptTemplateAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.GetAllTemplatesApiV1PptTemplateAllGet.g.cs index 19de492..98b1130 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.GetAllTemplatesApiV1PptTemplateAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.GetAllTemplatesApiV1PptTemplateAllGet.g.cs @@ -55,6 +55,29 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( bool? includeDefaults = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllTemplatesApiV1PptTemplateAllGetAsResponseAsync( + includeDefaults: includeDefaults, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get All Templates + /// + /// + /// Whether to include default templates
+ /// Default Value: true + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetAllTemplatesApiV1PptTemplateAllGetAsResponseAsync( + bool? includeDefaults = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -84,11 +107,12 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/all", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("include_defaults", includeDefaults?.ToString().ToLowerInvariant()) + .AddOptionalParameter("include_defaults", includeDefaults?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -160,6 +184,8 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -170,6 +196,11 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -187,6 +218,8 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -196,8 +229,7 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -206,6 +238,11 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -222,14 +259,15 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -269,6 +307,8 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -289,6 +329,8 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -351,9 +393,13 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -381,9 +427,13 @@ partial void ProcessGetAllTemplatesApiV1PptTemplateAllGetResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.GetLayoutsApiV1PptTemplateTemplateIdLayoutsGet.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.GetLayoutsApiV1PptTemplateTemplateIdLayoutsGet.g.cs index a44bb37..535dfbd 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.GetLayoutsApiV1PptTemplateTemplateIdLayoutsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.GetLayoutsApiV1PptTemplateTemplateIdLayoutsGet.g.cs @@ -54,6 +54,28 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten string templateId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetLayoutsApiV1PptTemplateTemplateIdLayoutsGetAsResponseAsync( + templateId: templateId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Layouts + /// + /// + /// The id of the template + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetLayoutsApiV1PptTemplateTemplateIdLayoutsGetAsResponseAsync( + string templateId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -83,6 +105,7 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/template/{templateId}/layouts", baseUri: HttpClient.BaseAddress); @@ -156,6 +179,8 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -166,6 +191,11 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -183,6 +213,8 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -192,8 +224,7 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -202,6 +233,11 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -218,14 +254,15 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -265,6 +302,8 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -285,6 +324,8 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -347,9 +388,13 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Presenton.GetTemplateLayoutsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.GetTemplateLayoutsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -377,9 +422,13 @@ partial void ProcessGetLayoutsApiV1PptTemplateTemplateIdLayoutsGetResponseConten #endif ).ConfigureAwait(false); - return - await global::Presenton.GetTemplateLayoutsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.GetTemplateLayoutsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.GetTemplateByIdApiV1PptTemplateIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.GetTemplateByIdApiV1PptTemplateIdGet.g.cs index a42281d..de673bb 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.GetTemplateByIdApiV1PptTemplateIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.GetTemplateByIdApiV1PptTemplateIdGet.g.cs @@ -54,6 +54,28 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTemplateByIdApiV1PptTemplateIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Template By Id + /// + /// + /// The id of the template, must be one of neo-general, neo-modern, neo-standard, neo-swift, general, modern, standard, swift or your custom template + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetTemplateByIdApiV1PptTemplateIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -83,6 +105,7 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/template/{id}", baseUri: HttpClient.BaseAddress); @@ -156,6 +179,8 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -166,6 +191,11 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -183,6 +213,8 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -192,8 +224,7 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -202,6 +233,11 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -218,14 +254,15 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -265,6 +302,8 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -285,6 +324,8 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -347,9 +388,13 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationLayoutModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationLayoutModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -377,9 +422,13 @@ partial void ProcessGetTemplateByIdApiV1PptTemplateIdGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationLayoutModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationLayoutModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.GetTemplateExampleApiV1PptTemplateIdExampleGet.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.GetTemplateExampleApiV1PptTemplateIdExampleGet.g.cs index 83fd3b1..39cd5dd 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.GetTemplateExampleApiV1PptTemplateIdExampleGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.GetTemplateExampleApiV1PptTemplateIdExampleGet.g.cs @@ -56,6 +56,30 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetTemplateExampleApiV1PptTemplateIdExampleGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Template Example
+ /// Get a example slides content data for a template.
+ /// This data can be used to create presentation from json. + ///
+ /// + /// The id of the template, must be one of neo-general, neo-modern, neo-standard, neo-swift, general, modern, standard, swift or your custom template + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetTemplateExampleApiV1PptTemplateIdExampleGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -85,6 +109,7 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/template/{id}/example", baseUri: HttpClient.BaseAddress); @@ -158,6 +183,8 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -168,6 +195,11 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -185,6 +217,8 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -194,8 +228,7 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -204,6 +237,11 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -220,14 +258,15 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -267,6 +306,8 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -287,6 +328,8 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -349,9 +392,13 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Presenton.TemplateExample.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.TemplateExample.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -379,9 +426,13 @@ partial void ProcessGetTemplateExampleApiV1PptTemplateIdExampleGetResponseConten #endif ).ConfigureAwait(false); - return - await global::Presenton.TemplateExample.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.TemplateExample.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.InitCreateTemplateApiV1PptTemplateCreateInitPost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.InitCreateTemplateApiV1PptTemplateCreateInitPost.g.cs index 9d308e6..00adce1 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.InitCreateTemplateApiV1PptTemplateCreateInitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.InitCreateTemplateApiV1PptTemplateCreateInitPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont /// public async global::System.Threading.Tasks.Task InitCreateTemplateApiV1PptTemplateCreateInitPostAsync( + global::Presenton.CreateTemplateInitRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await InitCreateTemplateApiV1PptTemplateCreateInitPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Init Create Template + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> InitCreateTemplateApiV1PptTemplateCreateInitPostAsResponseAsync( + global::Presenton.CreateTemplateInitRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/create/init", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont { __response.EnsureSuccessStatusCode(); - return - (global::System.Guid?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Guid?), JsonSerializerContext) ?? + var __value = (global::System.Guid?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Guid?), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessInitCreateTemplateApiV1PptTemplateCreateInitPostResponseCont #endif ).ConfigureAwait(false); - return - (global::System.Guid?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Guid?), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Guid?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Guid?), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePost.g.cs index 13a525d..f9416cf 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo /// public async global::System.Threading.Tasks.Task SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostAsync( + global::Presenton.SaveSlideLayoutRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Save Slide Layout + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostAsResponseAsync( + global::Presenton.SaveSlideLayoutRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/slide-layout/save", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,7 +395,11 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -382,7 +427,11 @@ partial void ProcessSaveSlideLayoutApiV1PptTemplateSlideLayoutSavePostResponseCo #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.SaveTemplateApiV1PptTemplateSavePost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.SaveTemplateApiV1PptTemplateSavePost.g.cs index 7c2f0e0..5cecbb5 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.SaveTemplateApiV1PptTemplateSavePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.SaveTemplateApiV1PptTemplateSavePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( /// public async global::System.Threading.Tasks.Task SaveTemplateApiV1PptTemplateSavePostAsync( + global::Presenton.SaveTemplateRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SaveTemplateApiV1PptTemplateSavePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Save Template + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SaveTemplateApiV1PptTemplateSavePostAsResponseAsync( + global::Presenton.SaveTemplateRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/save", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.SaveTemplateResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.SaveTemplateResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessSaveTemplateApiV1PptTemplateSavePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.SaveTemplateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.SaveTemplateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.UpdateTemplateApiV1PptTemplateUpdatePut.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.UpdateTemplateApiV1PptTemplateUpdatePut.g.cs index 8c99b40..c0e2ad1 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.UpdateTemplateApiV1PptTemplateUpdatePut.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.UpdateTemplateApiV1PptTemplateUpdatePut.g.cs @@ -50,6 +50,28 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( /// public async global::System.Threading.Tasks.Task UpdateTemplateApiV1PptTemplateUpdatePutAsync( + global::Presenton.UpdateTemplateRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateTemplateApiV1PptTemplateUpdatePutAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Template + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateTemplateApiV1PptTemplateUpdatePutAsResponseAsync( + global::Presenton.UpdateTemplateRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/update", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.SaveTemplateResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.SaveTemplateResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessUpdateTemplateApiV1PptTemplateUpdatePutResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.SaveTemplateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.SaveTemplateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost.g.cs index 287e935..beaf959 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSli /// public async global::System.Threading.Tasks.Task UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync( + global::Presenton.BodyUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upload Fonts And Slides Preview + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsResponseAsync( + global::Presenton.BodyUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSli var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template/fonts-upload-and-slides-preview", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSli __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentPptxFile = new global::System.Net.Http.ByteArrayContent(request.PptxFile ?? global::System.Array.Empty()); __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -154,21 +178,26 @@ request.PptxFilename is null { __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; } + if (request.FontFiles != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.FontFiles.ToString() ?? string.Empty), name: "\"font_files\""); - } + + } if (request.OriginalFontNames != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.OriginalFontNames.ToString() ?? string.Empty), name: "\"original_font_names\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -210,6 +239,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -220,6 +251,11 @@ request.PptxFilename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -237,6 +273,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -246,8 +284,7 @@ request.PptxFilename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -256,6 +293,11 @@ request.PptxFilename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -272,14 +314,15 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -319,6 +362,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -339,6 +384,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -401,9 +448,13 @@ request.PptxFilename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -431,9 +482,13 @@ request.PptxFilename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -510,5 +565,964 @@ request.PptxFilename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Upload Fonts And Slides Preview + /// + /// + /// PPTX file to modify + /// + /// + /// PPTX file to modify + /// + /// + /// Font files to upload + /// + /// + /// Original font names to replace (same order as font_files) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fontFiles = default, + global::System.Collections.Generic.IList? originalFontNames = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + FontFiles = fontFiles, + OriginalFontNames = originalFontNames, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostSecurityRequirements, + operationName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/template/fonts-upload-and-slides-preview", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.FontFiles != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.FontFiles.ToString() ?? string.Empty), + name: "\"font_files\""); + + } + if (request.OriginalFontNames != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.OriginalFontNames.ToString() ?? string.Empty), + name: "\"original_font_names\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync", + pathTemplate: "\"/api/v1/ppt/template/fonts-upload-and-slides-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync", + pathTemplate: "\"/api/v1/ppt/template/fonts-upload-and-slides-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync", + pathTemplate: "\"/api/v1/ppt/template/fonts-upload-and-slides-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync", + pathTemplate: "\"/api/v1/ppt/template/fonts-upload-and-slides-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync", + pathTemplate: "\"/api/v1/ppt/template/fonts-upload-and-slides-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Upload Fonts And Slides Preview + /// + /// + /// PPTX file to modify + /// + /// + /// PPTX file to modify + /// + /// + /// Font files to upload + /// + /// + /// Original font names to replace (same order as font_files) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fontFiles = default, + global::System.Collections.Generic.IList? originalFontNames = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + FontFiles = fontFiles, + OriginalFontNames = originalFontNames, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostSecurityRequirements, + operationName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v1/ppt/template/fonts-upload-and-slides-preview", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.FontFiles != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.FontFiles.ToString() ?? string.Empty), + name: "\"font_files\""); + + } + if (request.OriginalFontNames != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.OriginalFontNames.ToString() ?? string.Empty), + name: "\"original_font_names\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync", + pathTemplate: "\"/api/v1/ppt/template/fonts-upload-and-slides-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync", + pathTemplate: "\"/api/v1/ppt/template/fonts-upload-and-slides-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync", + pathTemplate: "\"/api/v1/ppt/template/fonts-upload-and-slides-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync", + pathTemplate: "\"/api/v1/ppt/template/fonts-upload-and-slides-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostAsync", + pathTemplate: "\"/api/v1/ppt/template/fonts-upload-and-slides-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadFontsAndSlidesPreviewApiV1PptTemplateFontsUploadAndSlidesPreviewPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.TemplateClient.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateClient.g.cs index d65088e..2150b3e 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateClient.g.cs @@ -72,10 +72,10 @@ public TemplateClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TemplateClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.CreateTemplateApiV1PptTemplateManagementTemplatesPost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.CreateTemplateApiV1PptTemplateManagementTemplatesPost.g.cs index 8e5a3eb..ba7c1d4 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.CreateTemplateApiV1PptTemplateManagementTemplatesPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.CreateTemplateApiV1PptTemplateManagementTemplatesPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons /// public async global::System.Threading.Tasks.Task CreateTemplateApiV1PptTemplateManagementTemplatesPostAsync( + global::Presenton.TemplateCreateRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateTemplateApiV1PptTemplateManagementTemplatesPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Template + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateTemplateApiV1PptTemplateManagementTemplatesPostAsResponseAsync( + global::Presenton.TemplateCreateRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template-management/templates", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation error @@ -430,9 +471,13 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons { __response.EnsureSuccessStatusCode(); - return - global::Presenton.TemplateCreateResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.TemplateCreateResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -460,9 +505,13 @@ partial void ProcessCreateTemplateApiV1PptTemplateManagementTemplatesPostRespons #endif ).ConfigureAwait(false); - return - await global::Presenton.TemplateCreateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.TemplateCreateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.DeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTemplateIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.DeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTemplateIdDelete.g.cs index cebef7e..b3667b6 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.DeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTemplateIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.DeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTemplateIdDelete.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl global::System.Guid templateId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTemplateIdDeleteAsResponseAsync( + templateId: templateId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Template + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTemplateIdDeleteAsResponseAsync( + global::System.Guid templateId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/template-management/delete-templates/{templateId}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -336,6 +373,10 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -357,6 +398,10 @@ partial void ProcessDeleteTemplateApiV1PptTemplateManagementDeleteTemplatesTempl try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.GetLayoutsApiV1PptTemplateManagementGetTemplatesPresentationGet.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.GetLayoutsApiV1PptTemplateManagementGetTemplatesPresentationGet.g.cs index 0f8be44..42ff554 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.GetLayoutsApiV1PptTemplateManagementGetTemplatesPresentationGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.GetLayoutsApiV1PptTemplateManagementGetTemplatesPresentationGet.g.cs @@ -60,6 +60,34 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation global::System.Guid presentation, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetLayoutsApiV1PptTemplateManagementGetTemplatesPresentationGetAsResponseAsync( + presentation: presentation, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Layouts
+ /// Retrieve all layouts for a specific presentation.
+ /// Args:
+ /// presentation: UUID of the presentation
+ /// session: Database session
+ /// Returns:
+ /// GetLayoutsResponse with layouts data
+ /// Raises:
+ /// HTTPException: 404 if no layouts found, 400 for invalid UUID, 500 for server errors + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetLayoutsApiV1PptTemplateManagementGetTemplatesPresentationGetAsResponseAsync( + global::System.Guid presentation, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,6 +117,7 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/template-management/get-templates/{presentation}", baseUri: HttpClient.BaseAddress); @@ -162,6 +191,8 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -172,6 +203,11 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -189,6 +225,8 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -198,8 +236,7 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -208,6 +245,11 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -224,14 +266,15 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -271,6 +314,8 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -291,6 +336,8 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Invalid presentation ID @@ -467,9 +514,13 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation { __response.EnsureSuccessStatusCode(); - return - global::Presenton.GetLayoutsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.GetLayoutsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -497,9 +548,13 @@ partial void ProcessGetLayoutsApiV1PptTemplateManagementGetTemplatesPresentation #endif ).ConfigureAwait(false); - return - await global::Presenton.GetLayoutsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.GetLayoutsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.GetPresentationsSummaryApiV1PptTemplateManagementSummaryGet.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.GetPresentationsSummaryApiV1PptTemplateManagementSummaryGet.g.cs index 5a1ded1..9f1bd9f 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.GetPresentationsSummaryApiV1PptTemplateManagementSummaryGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.GetPresentationsSummaryApiV1PptTemplateManagementSummaryGet.g.cs @@ -49,6 +49,24 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR public async global::System.Threading.Tasks.Task GetPresentationsSummaryApiV1PptTemplateManagementSummaryGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPresentationsSummaryApiV1PptTemplateManagementSummaryGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get all presentations with layout counts
+ /// Retrieve a summary of all presentations and the number of layouts in each + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetPresentationsSummaryApiV1PptTemplateManagementSummaryGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -77,6 +95,7 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template-management/summary", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Internal server error @@ -340,9 +377,13 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR { __response.EnsureSuccessStatusCode(); - return - global::Presenton.GetPresentationSummaryResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.GetPresentationSummaryResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -370,9 +411,13 @@ partial void ProcessGetPresentationsSummaryApiV1PptTemplateManagementSummaryGetR #endif ).ConfigureAwait(false); - return - await global::Presenton.GetPresentationSummaryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.GetPresentationSummaryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPost.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPost.g.cs index fb2f6af..e24e962 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPost.g.cs @@ -58,6 +58,36 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon /// public async global::System.Threading.Tasks.Task SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostAsync( + global::Presenton.SaveLayoutsRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Save Layouts
+ /// Save multiple layouts for presentations.
+ /// Args:
+ /// request: JSON request containing array of layout data
+ /// session: Database session
+ /// Returns:
+ /// SaveLayoutsResponse with success status and count of saved layouts
+ /// Raises:
+ /// HTTPException: 400 for validation errors, 500 for server errors + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostAsResponseAsync( + global::Presenton.SaveLayoutsRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -92,6 +122,7 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/template-management/save-templates", baseUri: HttpClient.BaseAddress); @@ -171,6 +202,8 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +214,11 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +236,8 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +247,7 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +256,11 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +277,15 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +325,8 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +347,8 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation error @@ -438,9 +487,13 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon { __response.EnsureSuccessStatusCode(); - return - global::Presenton.SaveLayoutsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.SaveLayoutsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -468,9 +521,13 @@ partial void ProcessSaveLayoutsApiV1PptTemplateManagementSaveTemplatesPostRespon #endif ).ConfigureAwait(false); - return - await global::Presenton.SaveLayoutsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.SaveLayoutsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.g.cs b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.g.cs index f86ea93..b2dded2 100644 --- a/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.TemplateManagementClient.g.cs @@ -72,10 +72,10 @@ public TemplateManagementClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public TemplateManagementClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.ThemesClient.CreateThemeApiV1PptThemesCreatePost.g.cs b/src/libs/Presenton/Generated/Presenton.ThemesClient.CreateThemeApiV1PptThemesCreatePost.g.cs index 9e658c3..e9866e0 100644 --- a/src/libs/Presenton/Generated/Presenton.ThemesClient.CreateThemeApiV1PptThemesCreatePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ThemesClient.CreateThemeApiV1PptThemesCreatePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( /// public async global::System.Threading.Tasks.Task CreateThemeApiV1PptThemesCreatePostAsync( + global::Presenton.BodyCreateThemeApiV1PptThemesCreatePost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateThemeApiV1PptThemesCreatePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Theme + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateThemeApiV1PptThemesCreatePostAsResponseAsync( + global::Presenton.BodyCreateThemeApiV1PptThemesCreatePost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/themes/create", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationThemeModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationThemeModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessCreateThemeApiV1PptThemesCreatePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationThemeModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationThemeModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ThemesClient.DeleteThemeApiV1PptThemesDeleteThemeIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.ThemesClient.DeleteThemeApiV1PptThemesDeleteThemeIdDelete.g.cs index e01dd05..d876edc 100644 --- a/src/libs/Presenton/Generated/Presenton.ThemesClient.DeleteThemeApiV1PptThemesDeleteThemeIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ThemesClient.DeleteThemeApiV1PptThemesDeleteThemeIdDelete.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( global::System.Guid themeId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteThemeApiV1PptThemesDeleteThemeIdDeleteAsResponseAsync( + themeId: themeId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Theme + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteThemeApiV1PptThemesDeleteThemeIdDeleteAsResponseAsync( + global::System.Guid themeId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/themes/delete/{themeId}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -336,6 +373,10 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -357,6 +398,10 @@ partial void ProcessDeleteThemeApiV1PptThemesDeleteThemeIdDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ThemesClient.GetDefaultThemesApiV1PptThemesDefaultGet.g.cs b/src/libs/Presenton/Generated/Presenton.ThemesClient.GetDefaultThemesApiV1PptThemesDefaultGet.g.cs index f0e6c78..07340aa 100644 --- a/src/libs/Presenton/Generated/Presenton.ThemesClient.GetDefaultThemesApiV1PptThemesDefaultGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ThemesClient.GetDefaultThemesApiV1PptThemesDefaultGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( public async global::System.Threading.Tasks.Task> GetDefaultThemesApiV1PptThemesDefaultGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetDefaultThemesApiV1PptThemesDefaultGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Default Themes + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetDefaultThemesApiV1PptThemesDefaultGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/themes/default", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessGetDefaultThemesApiV1PptThemesDefaultGetResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ThemesClient.GetThemesApiV1PptThemesAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.ThemesClient.GetThemesApiV1PptThemesAllGet.g.cs index 1344bc6..50f4d31 100644 --- a/src/libs/Presenton/Generated/Presenton.ThemesClient.GetThemesApiV1PptThemesAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ThemesClient.GetThemesApiV1PptThemesAllGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( public async global::System.Threading.Tasks.Task> GetThemesApiV1PptThemesAllGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetThemesApiV1PptThemesAllGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Themes + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetThemesApiV1PptThemesAllGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/ppt/themes/all", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessGetThemesApiV1PptThemesAllGetResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ThemesClient.UpdateThemeApiV1PptThemesUpdateThemeIdPatch.g.cs b/src/libs/Presenton/Generated/Presenton.ThemesClient.UpdateThemeApiV1PptThemesUpdateThemeIdPatch.g.cs index 9316f6d..297a992 100644 --- a/src/libs/Presenton/Generated/Presenton.ThemesClient.UpdateThemeApiV1PptThemesUpdateThemeIdPatch.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ThemesClient.UpdateThemeApiV1PptThemesUpdateThemeIdPatch.g.cs @@ -54,6 +54,31 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( public async global::System.Threading.Tasks.Task UpdateThemeApiV1PptThemesUpdateThemeIdPatchAsync( global::System.Guid themeId, + global::Presenton.BodyUpdateThemeApiV1PptThemesUpdateThemeIdPatch request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateThemeApiV1PptThemesUpdateThemeIdPatchAsResponseAsync( + themeId: themeId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Theme + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateThemeApiV1PptThemesUpdateThemeIdPatchAsResponseAsync( + global::System.Guid themeId, + global::Presenton.BodyUpdateThemeApiV1PptThemesUpdateThemeIdPatch request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v1/ppt/themes/update/{themeId}", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -360,9 +404,13 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationThemeModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationThemeModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -390,9 +438,13 @@ partial void ProcessUpdateThemeApiV1PptThemesUpdateThemeIdPatchResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationThemeModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationThemeModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.ThemesClient.g.cs b/src/libs/Presenton/Generated/Presenton.ThemesClient.g.cs index bceeb9f..7ff50b4 100644 --- a/src/libs/Presenton/Generated/Presenton.ThemesClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.ThemesClient.g.cs @@ -72,10 +72,10 @@ public ThemesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ThemesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V1OnClient.PresentationExportApiV1OnPresentationExportPost.g.cs b/src/libs/Presenton/Generated/Presenton.V1OnClient.PresentationExportApiV1OnPresentationExportPost.g.cs index 48c0934..41837ec 100644 --- a/src/libs/Presenton/Generated/Presenton.V1OnClient.PresentationExportApiV1OnPresentationExportPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V1OnClient.PresentationExportApiV1OnPresentationExportPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte /// public async global::System.Threading.Tasks.Task PresentationExportApiV1OnPresentationExportPostAsync( + global::Presenton.BodyPresentationExportApiV1OnPresentationExportPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PresentationExportApiV1OnPresentationExportPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Presentation Export + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> PresentationExportApiV1OnPresentationExportPostAsResponseAsync( + global::Presenton.BodyPresentationExportApiV1OnPresentationExportPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/on/presentation/export", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,7 +395,11 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -382,7 +427,11 @@ partial void ProcessPresentationExportApiV1OnPresentationExportPostResponseConte #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V1OnClient.g.cs b/src/libs/Presenton/Generated/Presenton.V1OnClient.g.cs index b28c32e..5e6d5e3 100644 --- a/src/libs/Presenton/Generated/Presenton.V1OnClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V1OnClient.g.cs @@ -72,10 +72,10 @@ public V1OnClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V1OnClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V2DesignClient.CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2DesignClient.CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPost.g.cs index 993d768..85e77db 100644 --- a/src/libs/Presenton/Generated/Presenton.V2DesignClient.CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2DesignClient.CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPost.g.cs @@ -51,6 +51,29 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon /// public async global::System.Threading.Tasks.Task CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostAsync( + global::Presenton.CreateDesignSystemRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Design System V2 Async
+ /// Kicks off asynchronous design system extraction. Poll status via /design/status/{id}. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostAsResponseAsync( + global::Presenton.CreateDesignSystemRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/design/create/async", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AsyncDesignExtractionTaskModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AsyncDesignExtractionTaskModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessCreateDesignSystemV2AsyncApiV2PptDesignCreateAsyncPostRespon #endif ).ConfigureAwait(false); - return - await global::Presenton.AsyncDesignExtractionTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AsyncDesignExtractionTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2DesignClient.DeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDelete.g.cs b/src/libs/Presenton/Generated/Presenton.V2DesignClient.DeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDelete.g.cs index c4ea5be..97f9afd 100644 --- a/src/libs/Presenton/Generated/Presenton.V2DesignClient.DeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2DesignClient.DeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDelete.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp global::System.Guid designSystemId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteAsResponseAsync( + designSystemId: designSystemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Design System V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteAsResponseAsync( + global::System.Guid designSystemId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/design/{designSystemId}/ui", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -336,6 +373,10 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -357,6 +398,10 @@ partial void ProcessDeleteDesignSystemV2ApiV2PptDesignDesignSystemIdUiDeleteResp try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetAllDesignSystemsForUiApiV2PptDesignAllUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetAllDesignSystemsForUiApiV2PptDesignAllUiGet.g.cs index 930d5e4..1520656 100644 --- a/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetAllDesignSystemsForUiApiV2PptDesignAllUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetAllDesignSystemsForUiApiV2PptDesignAllUiGet.g.cs @@ -60,6 +60,33 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllDesignSystemsForUiApiV2PptDesignAllUiGetAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get All Design Systems For Ui + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAllDesignSystemsForUiApiV2PptDesignAllUiGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -90,12 +117,13 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/design/all/ui", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -168,6 +196,8 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +208,11 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +230,8 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +241,7 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +250,11 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +271,15 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +319,8 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +341,8 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -359,9 +405,13 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -389,9 +439,13 @@ partial void ProcessGetAllDesignSystemsForUiApiV2PptDesignAllUiGetResponseConten #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDefaultDesignSystemsForUiApiV2PptDesignDefaultGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDefaultDesignSystemsForUiApiV2PptDesignDefaultGet.g.cs index cbf2eff..64be525 100644 --- a/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDefaultDesignSystemsForUiApiV2PptDesignDefaultGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDefaultDesignSystemsForUiApiV2PptDesignDefaultGet.g.cs @@ -60,6 +60,33 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Default Design Systems For Ui + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -90,12 +117,13 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/design/default", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -168,6 +196,8 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +208,11 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +230,8 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +241,7 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +250,11 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +271,15 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +319,8 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +341,8 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -359,9 +405,13 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -389,9 +439,13 @@ partial void ProcessGetDefaultDesignSystemsForUiApiV2PptDesignDefaultGetResponse #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDesignExtractionStatusApiV2PptDesignStatusIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDesignExtractionStatusApiV2PptDesignStatusIdGet.g.cs index 188d890..c63288e 100644 --- a/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDesignExtractionStatusApiV2PptDesignStatusIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDesignExtractionStatusApiV2PptDesignStatusIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetDesignExtractionStatusApiV2PptDesignStatusIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Design Extraction Status + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetDesignExtractionStatusApiV2PptDesignStatusIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/design/status/{id}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AsyncDesignExtractionTaskModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AsyncDesignExtractionTaskModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessGetDesignExtractionStatusApiV2PptDesignStatusIdGetResponseCo #endif ).ConfigureAwait(false); - return - await global::Presenton.AsyncDesignExtractionTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AsyncDesignExtractionTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportInfoGet.g.cs index 988f1ce..78008a4 100644 --- a/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2DesignClient.GetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportInfoGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI global::System.Guid designSystemId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportInfoGetAsResponseAsync( + designSystemId: designSystemId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Design System Export Info + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportInfoGetAsResponseAsync( + global::System.Guid designSystemId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/design/{designSystemId}/export-info", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI { __response.EnsureSuccessStatusCode(); - return - global::Presenton.DesignSystemExportInfo.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.DesignSystemExportInfo.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessGetDesignSystemExportInfoApiV2PptDesignDesignSystemIdExportI #endif ).ConfigureAwait(false); - return - await global::Presenton.DesignSystemExportInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.DesignSystemExportInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2DesignClient.g.cs b/src/libs/Presenton/Generated/Presenton.V2DesignClient.g.cs index c6c85af..20f7946 100644 --- a/src/libs/Presenton/Generated/Presenton.V2DesignClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2DesignClient.g.cs @@ -72,10 +72,10 @@ public V2DesignClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V2DesignClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.GetFixHtmlApiV2PptFixSlideFixGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.GetFixHtmlApiV2PptFixSlideFixGet.g.cs index 51c4cf9..d4c3d99 100644 --- a/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.GetFixHtmlApiV2PptFixSlideFixGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.GetFixHtmlApiV2PptFixSlideFixGet.g.cs @@ -54,6 +54,28 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( global::System.Guid key, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetFixHtmlApiV2PptFixSlideFixGetAsResponseAsync( + key: key, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Fix Html + /// + /// + /// Slide fix task id + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetFixHtmlApiV2PptFixSlideFixGetAsResponseAsync( + global::System.Guid key, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -83,11 +105,12 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/fix-slide/fix", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("key", key.ToString()!) + .AddRequiredParameter("key", key.ToString()!) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -159,6 +182,8 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +194,11 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +216,8 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +227,7 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +236,11 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +257,15 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +305,8 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +327,8 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -350,7 +391,11 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -378,7 +423,11 @@ partial void ProcessGetFixHtmlApiV2PptFixSlideFixGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.GetFixStatusApiV2PptFixSlideStatusGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.GetFixStatusApiV2PptFixSlideStatusGet.g.cs index 7c7f963..949b2e4 100644 --- a/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.GetFixStatusApiV2PptFixSlideStatusGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.GetFixStatusApiV2PptFixSlideStatusGet.g.cs @@ -54,6 +54,28 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( global::System.Guid key, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetFixStatusApiV2PptFixSlideStatusGetAsResponseAsync( + key: key, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Fix Status + /// + /// + /// Slide fix task id + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetFixStatusApiV2PptFixSlideStatusGetAsResponseAsync( + global::System.Guid key, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -83,11 +105,12 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/fix-slide/status", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("key", key.ToString()!) + .AddRequiredParameter("key", key.ToString()!) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -159,6 +182,8 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +194,11 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +216,8 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +227,7 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +236,11 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +257,15 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +305,8 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +327,8 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -350,7 +391,11 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -378,7 +423,11 @@ partial void ProcessGetFixStatusApiV2PptFixSlideStatusGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.InitFixSlideApiV2PptFixSlideInitPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.InitFixSlideApiV2PptFixSlideInitPost.g.cs index 72f51ac..f5ff880 100644 --- a/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.InitFixSlideApiV2PptFixSlideInitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.InitFixSlideApiV2PptFixSlideInitPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessInitFixSlideApiV2PptFixSlideInitPostResponseContent( /// public async global::System.Threading.Tasks.Task InitFixSlideApiV2PptFixSlideInitPostAsync( + global::Presenton.BodyInitFixSlideApiV2PptFixSlideInitPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await InitFixSlideApiV2PptFixSlideInitPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Init Fix Slide + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> InitFixSlideApiV2PptFixSlideInitPostAsResponseAsync( + global::Presenton.BodyInitFixSlideApiV2PptFixSlideInitPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessInitFixSlideApiV2PptFixSlideInitPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/fix-slide/init", baseUri: HttpClient.BaseAddress); @@ -116,10 +139,12 @@ partial void ProcessInitFixSlideApiV2PptFixSlideInitPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), name: "\"html\""); + var __contentSlideImage = new global::System.Net.Http.ByteArrayContent(request.SlideImage ?? global::System.Array.Empty()); __contentSlideImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( request.SlideImagename is null @@ -157,7 +182,9 @@ request.SlideImagename is null { __contentSlideImage.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -199,6 +226,8 @@ request.SlideImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -209,6 +238,11 @@ request.SlideImagename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -226,6 +260,8 @@ request.SlideImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -235,8 +271,7 @@ request.SlideImagename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -245,6 +280,11 @@ request.SlideImagename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -261,14 +301,15 @@ request.SlideImagename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -308,6 +349,8 @@ request.SlideImagename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -328,6 +371,8 @@ request.SlideImagename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -390,7 +435,11 @@ request.SlideImagename is null { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -418,7 +467,11 @@ request.SlideImagename is null #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -490,5 +543,920 @@ request.SlideImagename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Init Fix Slide + /// + /// + /// HTML of the slide to potentially fix + /// + /// + /// Slide image (png/jpeg) + /// + /// + /// Slide image (png/jpeg) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task InitFixSlideApiV2PptFixSlideInitPostAsync( + string html, + global::System.IO.Stream slideImage, + string slideImagename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + slideImage = slideImage ?? throw new global::System.ArgumentNullException(nameof(slideImage)); + var request = new global::Presenton.BodyInitFixSlideApiV2PptFixSlideInitPost + { + Html = html, + SlideImage = global::System.Array.Empty(), + SlideImagename = slideImagename, + }; + PrepareArguments( + client: HttpClient); + PrepareInitFixSlideApiV2PptFixSlideInitPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_InitFixSlideApiV2PptFixSlideInitPostSecurityRequirements, + operationName: "InitFixSlideApiV2PptFixSlideInitPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v2/ppt/fix-slide/init", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), + name: "\"html\""); + + var __contentSlideImage = new global::System.Net.Http.StreamContent(slideImage); + __contentSlideImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.SlideImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.SlideImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSlideImage, + name: "\"slide_image\"", + fileName: request.SlideImagename != null ? $"\"{request.SlideImagename}\"" : string.Empty); + if (__contentSlideImage.Headers.ContentDisposition != null) + { + __contentSlideImage.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareInitFixSlideApiV2PptFixSlideInitPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitFixSlideApiV2PptFixSlideInitPost", + methodName: "InitFixSlideApiV2PptFixSlideInitPostAsync", + pathTemplate: "\"/api/v2/ppt/fix-slide/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitFixSlideApiV2PptFixSlideInitPost", + methodName: "InitFixSlideApiV2PptFixSlideInitPostAsync", + pathTemplate: "\"/api/v2/ppt/fix-slide/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitFixSlideApiV2PptFixSlideInitPost", + methodName: "InitFixSlideApiV2PptFixSlideInitPostAsync", + pathTemplate: "\"/api/v2/ppt/fix-slide/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessInitFixSlideApiV2PptFixSlideInitPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitFixSlideApiV2PptFixSlideInitPost", + methodName: "InitFixSlideApiV2PptFixSlideInitPostAsync", + pathTemplate: "\"/api/v2/ppt/fix-slide/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitFixSlideApiV2PptFixSlideInitPost", + methodName: "InitFixSlideApiV2PptFixSlideInitPostAsync", + pathTemplate: "\"/api/v2/ppt/fix-slide/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessInitFixSlideApiV2PptFixSlideInitPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return __content; + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return __content; + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Init Fix Slide + /// + /// + /// HTML of the slide to potentially fix + /// + /// + /// Slide image (png/jpeg) + /// + /// + /// Slide image (png/jpeg) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> InitFixSlideApiV2PptFixSlideInitPostAsResponseAsync( + string html, + global::System.IO.Stream slideImage, + string slideImagename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + slideImage = slideImage ?? throw new global::System.ArgumentNullException(nameof(slideImage)); + var request = new global::Presenton.BodyInitFixSlideApiV2PptFixSlideInitPost + { + Html = html, + SlideImage = global::System.Array.Empty(), + SlideImagename = slideImagename, + }; + PrepareArguments( + client: HttpClient); + PrepareInitFixSlideApiV2PptFixSlideInitPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_InitFixSlideApiV2PptFixSlideInitPostSecurityRequirements, + operationName: "InitFixSlideApiV2PptFixSlideInitPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v2/ppt/fix-slide/init", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.Html ?? string.Empty), + name: "\"html\""); + + var __contentSlideImage = new global::System.Net.Http.StreamContent(slideImage); + __contentSlideImage.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.SlideImagename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.SlideImagename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentSlideImage, + name: "\"slide_image\"", + fileName: request.SlideImagename != null ? $"\"{request.SlideImagename}\"" : string.Empty); + if (__contentSlideImage.Headers.ContentDisposition != null) + { + __contentSlideImage.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareInitFixSlideApiV2PptFixSlideInitPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitFixSlideApiV2PptFixSlideInitPost", + methodName: "InitFixSlideApiV2PptFixSlideInitPostAsync", + pathTemplate: "\"/api/v2/ppt/fix-slide/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitFixSlideApiV2PptFixSlideInitPost", + methodName: "InitFixSlideApiV2PptFixSlideInitPostAsync", + pathTemplate: "\"/api/v2/ppt/fix-slide/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitFixSlideApiV2PptFixSlideInitPost", + methodName: "InitFixSlideApiV2PptFixSlideInitPostAsync", + pathTemplate: "\"/api/v2/ppt/fix-slide/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessInitFixSlideApiV2PptFixSlideInitPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitFixSlideApiV2PptFixSlideInitPost", + methodName: "InitFixSlideApiV2PptFixSlideInitPostAsync", + pathTemplate: "\"/api/v2/ppt/fix-slide/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "InitFixSlideApiV2PptFixSlideInitPost", + methodName: "InitFixSlideApiV2PptFixSlideInitPostAsync", + pathTemplate: "\"/api/v2/ppt/fix-slide/init\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessInitFixSlideApiV2PptFixSlideInitPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.g.cs b/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.g.cs index 7720663..09c596d 100644 --- a/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2FixSlideClient.g.cs @@ -72,10 +72,10 @@ public V2FixSlideClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V2FixSlideClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V2FontsClient.CheckFontsInPptxApiV2PptFontsCheckPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2FontsClient.CheckFontsInPptxApiV2PptFontsCheckPost.g.cs index 94b27bf..88ee75e 100644 --- a/src/libs/Presenton/Generated/Presenton.V2FontsClient.CheckFontsInPptxApiV2PptFontsCheckPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2FontsClient.CheckFontsInPptxApiV2PptFontsCheckPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessCheckFontsInPptxApiV2PptFontsCheckPostResponseContent( /// public async global::System.Threading.Tasks.Task CheckFontsInPptxApiV2PptFontsCheckPostAsync( + global::Presenton.BodyCheckFontsInPptxApiV2PptFontsCheckPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CheckFontsInPptxApiV2PptFontsCheckPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Check Fonts In Pptx + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CheckFontsInPptxApiV2PptFontsCheckPostAsResponseAsync( + global::Presenton.BodyCheckFontsInPptxApiV2PptFontsCheckPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessCheckFontsInPptxApiV2PptFontsCheckPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/fonts/check", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessCheckFontsInPptxApiV2PptFontsCheckPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentPptxFile = new global::System.Net.Http.ByteArrayContent(request.PptxFile ?? global::System.Array.Empty()); __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -154,7 +178,9 @@ request.PptxFilename is null { __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -196,6 +222,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -206,6 +234,11 @@ request.PptxFilename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -223,6 +256,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -232,8 +267,7 @@ request.PptxFilename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -242,6 +276,11 @@ request.PptxFilename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -258,14 +297,15 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -305,6 +345,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -325,6 +367,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -387,9 +431,13 @@ request.PptxFilename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.FontCheckResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.FontCheckResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -417,9 +465,13 @@ request.PptxFilename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.FontCheckResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.FontCheckResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -486,5 +538,910 @@ request.PptxFilename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Check Fonts In Pptx + /// + /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CheckFontsInPptxApiV2PptFontsCheckPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyCheckFontsInPptxApiV2PptFontsCheckPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + }; + PrepareArguments( + client: HttpClient); + PrepareCheckFontsInPptxApiV2PptFontsCheckPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CheckFontsInPptxApiV2PptFontsCheckPostSecurityRequirements, + operationName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v2/ppt/fonts/check", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCheckFontsInPptxApiV2PptFontsCheckPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV2PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV2PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV2PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCheckFontsInPptxApiV2PptFontsCheckPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV2PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV2PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCheckFontsInPptxApiV2PptFontsCheckPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.FontCheckResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.FontCheckResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Check Fonts In Pptx + /// + /// + /// PPTX file to analyze fonts from + /// + /// + /// PPTX file to analyze fonts from + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CheckFontsInPptxApiV2PptFontsCheckPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyCheckFontsInPptxApiV2PptFontsCheckPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + }; + PrepareArguments( + client: HttpClient); + PrepareCheckFontsInPptxApiV2PptFontsCheckPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CheckFontsInPptxApiV2PptFontsCheckPostSecurityRequirements, + operationName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v2/ppt/fonts/check", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCheckFontsInPptxApiV2PptFontsCheckPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV2PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV2PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV2PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCheckFontsInPptxApiV2PptFontsCheckPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV2PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "CheckFontsInPptxApiV2PptFontsCheckPost", + methodName: "CheckFontsInPptxApiV2PptFontsCheckPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/check\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCheckFontsInPptxApiV2PptFontsCheckPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.FontCheckResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.FontCheckResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.V2FontsClient.UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2FontsClient.UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost.g.cs index 52df3c4..f919cbd 100644 --- a/src/libs/Presenton/Generated/Presenton.V2FontsClient.UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2FontsClient.UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost /// public async global::System.Threading.Tasks.Task UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync( + global::Presenton.BodyUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upload Fonts And Slides Preview + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsResponseAsync( + global::Presenton.BodyUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -80,10 +102,11 @@ partial void ProcessUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/fonts/upload-and-preview", baseUri: HttpClient.BaseAddress); @@ -116,6 +139,7 @@ partial void ProcessUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentPptxFile = new global::System.Net.Http.ByteArrayContent(request.PptxFile ?? global::System.Array.Empty()); __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -154,21 +178,26 @@ request.PptxFilename is null { __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; } + if (request.FontFiles != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.FontFiles.ToString() ?? string.Empty), name: "\"font_files\""); - } + + } if (request.OriginalFontNames != default) { __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.OriginalFontNames.ToString() ?? string.Empty), name: "\"original_font_names\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -210,6 +239,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -220,6 +251,11 @@ request.PptxFilename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -237,6 +273,8 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -246,8 +284,7 @@ request.PptxFilename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -256,6 +293,11 @@ request.PptxFilename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -272,14 +314,15 @@ request.PptxFilename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -319,6 +362,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -339,6 +384,8 @@ request.PptxFilename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -401,9 +448,13 @@ request.PptxFilename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -431,9 +482,13 @@ request.PptxFilename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -510,5 +565,964 @@ request.PptxFilename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Upload Fonts And Slides Preview + /// + /// + /// PPTX file to modify + /// + /// + /// PPTX file to modify + /// + /// + /// Font files to upload + /// + /// + /// Original font names to replace (same order as font_files) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fontFiles = default, + global::System.Collections.Generic.IList? originalFontNames = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + FontFiles = fontFiles, + OriginalFontNames = originalFontNames, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostSecurityRequirements, + operationName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v2/ppt/fonts/upload-and-preview", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.FontFiles != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.FontFiles.ToString() ?? string.Empty), + name: "\"font_files\""); + + } + if (request.OriginalFontNames != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.OriginalFontNames.ToString() ?? string.Empty), + name: "\"original_font_names\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/upload-and-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/upload-and-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/upload-and-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/upload-and-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/upload-and-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Upload Fonts And Slides Preview + /// + /// + /// PPTX file to modify + /// + /// + /// PPTX file to modify + /// + /// + /// Font files to upload + /// + /// + /// Original font names to replace (same order as font_files) + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsResponseAsync( + global::System.IO.Stream pptxFile, + string pptxFilename, + global::System.Collections.Generic.IList? fontFiles = default, + global::System.Collections.Generic.IList? originalFontNames = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + pptxFile = pptxFile ?? throw new global::System.ArgumentNullException(nameof(pptxFile)); + var request = new global::Presenton.BodyUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost + { + PptxFile = global::System.Array.Empty(), + PptxFilename = pptxFilename, + FontFiles = fontFiles, + OriginalFontNames = originalFontNames, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostSecurityRequirements, + operationName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v2/ppt/fonts/upload-and-preview", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentPptxFile = new global::System.Net.Http.StreamContent(pptxFile); + __contentPptxFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.PptxFilename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.PptxFilename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentPptxFile, + name: "\"pptx_file\"", + fileName: request.PptxFilename != null ? $"\"{request.PptxFilename}\"" : string.Empty); + if (__contentPptxFile.Headers.ContentDisposition != null) + { + __contentPptxFile.Headers.ContentDisposition.FileNameStar = null; + } + + if (request.FontFiles != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.FontFiles.ToString() ?? string.Empty), + name: "\"font_files\""); + + } + if (request.OriginalFontNames != default) + { + + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent(request.OriginalFontNames.ToString() ?? string.Empty), + name: "\"original_font_names\""); + + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/upload-and-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/upload-and-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/upload-and-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/upload-and-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPost", + methodName: "UploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostAsync", + pathTemplate: "\"/api/v2/ppt/fonts/upload-and-preview\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadFontsAndSlidesPreviewApiV2PptFontsUploadAndPreviewPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.FontsUploadAndSlidesPreviewResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.V2FontsClient.g.cs b/src/libs/Presenton/Generated/Presenton.V2FontsClient.g.cs index e6a08a2..365c7e9 100644 --- a/src/libs/Presenton/Generated/Presenton.V2FontsClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2FontsClient.g.cs @@ -72,10 +72,10 @@ public V2FontsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V2FontsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V2OnClient.PresentationExportApiV2OnPresentationExportPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2OnClient.PresentationExportApiV2OnPresentationExportPost.g.cs index 2b8b367..ce4e42e 100644 --- a/src/libs/Presenton/Generated/Presenton.V2OnClient.PresentationExportApiV2OnPresentationExportPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2OnClient.PresentationExportApiV2OnPresentationExportPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte /// public async global::System.Threading.Tasks.Task PresentationExportApiV2OnPresentationExportPostAsync( + global::Presenton.BodyPresentationExportApiV2OnPresentationExportPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PresentationExportApiV2OnPresentationExportPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Presentation Export + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> PresentationExportApiV2OnPresentationExportPostAsResponseAsync( + global::Presenton.BodyPresentationExportApiV2OnPresentationExportPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/on/presentation/export", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,7 +395,11 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -382,7 +427,11 @@ partial void ProcessPresentationExportApiV2OnPresentationExportPostResponseConte #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2OnClient.g.cs b/src/libs/Presenton/Generated/Presenton.V2OnClient.g.cs index d76ffe4..d0b0e3b 100644 --- a/src/libs/Presenton/Generated/Presenton.V2OnClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2OnClient.g.cs @@ -72,10 +72,10 @@ public V2OnClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V2OnClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.GetOnboardingQuestionsApiV2OnboardingQuestionsGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.GetOnboardingQuestionsApiV2OnboardingQuestionsGet.g.cs index 1322dac..cb94c7d 100644 --- a/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.GetOnboardingQuestionsApiV2OnboardingQuestionsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.GetOnboardingQuestionsApiV2OnboardingQuestionsGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon public async global::System.Threading.Tasks.Task> GetOnboardingQuestionsApiV2OnboardingQuestionsGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetOnboardingQuestionsApiV2OnboardingQuestionsGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Onboarding Questions + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetOnboardingQuestionsApiV2OnboardingQuestionsGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/onboarding/questions", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessGetOnboardingQuestionsApiV2OnboardingQuestionsGetResponseCon #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPost.g.cs index 73662eb..107555f 100644 --- a/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo /// public async global::System.Threading.Tasks.Task SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostAsync( + global::System.Collections.Generic.IList request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Submit Onboarding Answers + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostAsResponseAsync( + global::System.Collections.Generic.IList request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/onboarding/answers/submit", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,7 +395,11 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -382,7 +427,11 @@ partial void ProcessSubmitOnboardingAnswersApiV2OnboardingAnswersSubmitPostRespo #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.g.cs b/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.g.cs index e282b77..eb6d2e6 100644 --- a/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2OnboardingClient.g.cs @@ -72,10 +72,10 @@ public V2OnboardingClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V2OnboardingClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.DeletePresentationByIdForUiApiV2PptPresentationIdUiDelete.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.DeletePresentationByIdForUiApiV2PptPresentationIdUiDelete.g.cs index e4b637e..6eec7b5 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.DeletePresentationByIdForUiApiV2PptPresentationIdUiDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.DeletePresentationByIdForUiApiV2PptPresentationIdUiDelete.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Presentation By Id For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/presentation/{id}/ui", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -336,6 +373,10 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -357,6 +398,10 @@ partial void ProcessDeletePresentationByIdForUiApiV2PptPresentationIdUiDeleteRes try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditHtmlApiV2PptPresentationEditHtmlPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditHtmlApiV2PptPresentationEditHtmlPost.g.cs index 47520ee..4c44839 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditHtmlApiV2PptPresentationEditHtmlPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditHtmlApiV2PptPresentationEditHtmlPost.g.cs @@ -51,6 +51,29 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( /// public async global::System.Threading.Tasks.Task EditHtmlApiV2PptPresentationEditHtmlPostAsync( + global::Presenton.EditSlideHTMLRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditHtmlApiV2PptPresentationEditHtmlPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Edit Html
+ /// Edit HTML using qwen-3-coder-480b model. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EditHtmlApiV2PptPresentationEditHtmlPostAsResponseAsync( + global::Presenton.EditSlideHTMLRequestV2 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/presentation/edit-html", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EditSlideHTMLResponseV2.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EditSlideHTMLResponseV2.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessEditHtmlApiV2PptPresentationEditHtmlPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.EditSlideHTMLResponseV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EditSlideHTMLResponseV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditOutlineApiV2PptPresentationOutlineEditPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditOutlineApiV2PptPresentationOutlineEditPost.g.cs index a3dfb75..bbd6462 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditOutlineApiV2PptPresentationOutlineEditPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditOutlineApiV2PptPresentationOutlineEditPost.g.cs @@ -51,6 +51,29 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten /// public async global::System.Threading.Tasks.Task EditOutlineApiV2PptPresentationOutlineEditPostAsync( + global::Presenton.EditOutlineRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditOutlineApiV2PptPresentationOutlineEditPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Edit Outline
+ /// Edit the outline of a presentation. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EditOutlineApiV2PptPresentationOutlineEditPostAsResponseAsync( + global::Presenton.EditOutlineRequestV2 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/presentation/outline/edit", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,7 +397,11 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -383,7 +429,11 @@ partial void ProcessEditOutlineApiV2PptPresentationOutlineEditPostResponseConten #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditSectionApiV2PptPresentationEditSectionPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditSectionApiV2PptPresentationEditSectionPost.g.cs index 07957ec..f64c534 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditSectionApiV2PptPresentationEditSectionPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.EditSectionApiV2PptPresentationEditSectionPost.g.cs @@ -51,6 +51,29 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten /// public async global::System.Threading.Tasks.Task EditSectionApiV2PptPresentationEditSectionPostAsync( + global::Presenton.EditSectionHTMLRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await EditSectionApiV2PptPresentationEditSectionPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Edit Section
+ /// Edit a specific section of the slide code using Zai and return full updated HTML. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> EditSectionApiV2PptPresentationEditSectionPostAsResponseAsync( + global::Presenton.EditSectionHTMLRequestV2 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/presentation/edit-section", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EditSectionHTMLResponseV2.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EditSectionHTMLResponseV2.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessEditSectionApiV2PptPresentationEditSectionPostResponseConten #endif ).ConfigureAwait(false); - return - await global::Presenton.EditSectionHTMLResponseV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EditSectionHTMLResponseV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPost.g.cs index 1b5603f..02bf1cc 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPost.g.cs @@ -53,6 +53,31 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos /// public async global::System.Threading.Tasks.Task ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPostAsync( + global::Presenton.BodyExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Export Presentation As Pptx Or Pdf V2
+ /// Export presentation as PPTX, PDF or PNG using API.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPostAsResponseAsync( + global::Presenton.BodyExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/presentation/export", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessExportPresentationAsPptxOrPdfV2ApiV2PptPresentationExportPos #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPost.g.cs index f51d803..911f9ad 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPost.g.cs @@ -51,6 +51,29 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn /// public async global::System.Threading.Tasks.Task GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPostAsync( + global::Presenton.GenerateHTMLPresentationRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Html Presentation V2
+ /// Create and store presentation; return its id. No SSE or generation here. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlInitPostAsResponseAsync( + global::Presenton.GenerateHTMLPresentationRequestV2 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/presentation/generate-html/init", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn { __response.EnsureSuccessStatusCode(); - return - global::Presenton.GenerateHTMLPresentationResponseV2.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.GenerateHTMLPresentationResponseV2.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessGenerateHtmlPresentationV2ApiV2PptPresentationGenerateHtmlIn #endif ).ConfigureAwait(false); - return - await global::Presenton.GenerateHTMLPresentationResponseV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.GenerateHTMLPresentationResponseV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPost.g.cs index 946b5a8..ddb1367 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync /// public async global::System.Threading.Tasks.Task GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPostAsync( + global::Presenton.GeneratePresentationRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Presentation Async V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsyncPostAsResponseAsync( + global::Presenton.GeneratePresentationRequestV2 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/presentation/generate/async", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessGeneratePresentationAsyncV2ApiV2PptPresentationGenerateAsync #endif ).ConfigureAwait(false); - return - await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GeneratePresentationSyncV2ApiV2PptPresentationGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GeneratePresentationSyncV2ApiV2PptPresentationGeneratePost.g.cs index eda7714..7d67a30 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GeneratePresentationSyncV2ApiV2PptPresentationGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GeneratePresentationSyncV2ApiV2PptPresentationGeneratePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe /// public async global::System.Threading.Tasks.Task GeneratePresentationSyncV2ApiV2PptPresentationGeneratePostAsync( + global::Presenton.GeneratePresentationRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GeneratePresentationSyncV2ApiV2PptPresentationGeneratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Presentation Sync V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GeneratePresentationSyncV2ApiV2PptPresentationGeneratePostAsResponseAsync( + global::Presenton.GeneratePresentationRequestV2 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/presentation/generate", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessGeneratePresentationSyncV2ApiV2PptPresentationGeneratePostRe #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetAllUserPresentationsForUiApiV2PptPresentationAllUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetAllUserPresentationsForUiApiV2PptPresentationAllUiGet.g.cs index 2d9cd33..5f7085d 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetAllUserPresentationsForUiApiV2PptPresentationAllUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetAllUserPresentationsForUiApiV2PptPresentationAllUiGet.g.cs @@ -60,6 +60,33 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllUserPresentationsForUiApiV2PptPresentationAllUiGetAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get All User Presentations For Ui + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAllUserPresentationsForUiApiV2PptPresentationAllUiGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -90,12 +117,13 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/presentation/all/ui", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -168,6 +196,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +208,11 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +230,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +241,7 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +250,11 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +271,15 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +319,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +341,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -359,9 +405,13 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -389,9 +439,13 @@ partial void ProcessGetAllUserPresentationsForUiApiV2PptPresentationAllUiGetResp #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetPresentationByIdForUiApiV2PptPresentationIdUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetPresentationByIdForUiApiV2PptPresentationIdUiGet.g.cs index 917dce1..152ab35 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetPresentationByIdForUiApiV2PptPresentationIdUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetPresentationByIdForUiApiV2PptPresentationIdUiGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPresentationByIdForUiApiV2PptPresentationIdUiGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Presentation By Id For Ui + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetPresentationByIdForUiApiV2PptPresentationIdUiGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/presentation/{id}/ui", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationWithSlidesV2.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationWithSlidesV2.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessGetPresentationByIdForUiApiV2PptPresentationIdUiGetResponseC #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationWithSlidesV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationWithSlidesV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetPresentationStatusApiV2PptPresentationStatusIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetPresentationStatusApiV2PptPresentationStatusIdGet.g.cs index ca66e64..338c15c 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetPresentationStatusApiV2PptPresentationStatusIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.GetPresentationStatusApiV2PptPresentationStatusIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPresentationStatusApiV2PptPresentationStatusIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Presentation Status + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetPresentationStatusApiV2PptPresentationStatusIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/presentation/status/{id}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse { __response.EnsureSuccessStatusCode(); - return - global::Presenton.GetPresentationStatusResponseV2.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.GetPresentationStatusResponseV2.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessGetPresentationStatusApiV2PptPresentationStatusIdGetResponse #endif ).ConfigureAwait(false); - return - await global::Presenton.GetPresentationStatusResponseV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.GetPresentationStatusResponseV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGet.g.cs index 4b3b9a9..5dab9c3 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await StreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Stream Outlines V2 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> StreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/presentation/outlines/stream/{id}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,7 +384,11 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -373,7 +416,11 @@ partial void ProcessStreamOutlinesV2ApiV2PptPresentationOutlinesStreamIdGetRespo #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamPresentationHtmlApiV2PptPresentationStreamIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamPresentationHtmlApiV2PptPresentationStreamIdGet.g.cs index 69df9d3..6e62267 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamPresentationHtmlApiV2PptPresentationStreamIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamPresentationHtmlApiV2PptPresentationStreamIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await StreamPresentationHtmlApiV2PptPresentationStreamIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Stream Presentation Html + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> StreamPresentationHtmlApiV2PptPresentationStreamIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/presentation/stream/{id}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,7 +384,11 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -373,7 +416,11 @@ partial void ProcessStreamPresentationHtmlApiV2PptPresentationStreamIdGetRespons #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamPresentationHtmlLargeApiV2PptPresentationStreamLargeIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamPresentationHtmlLargeApiV2PptPresentationStreamLargeIdGet.g.cs index 24f2adc..4c1bc12 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamPresentationHtmlLargeApiV2PptPresentationStreamLargeIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.StreamPresentationHtmlLargeApiV2PptPresentationStreamLargeIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId global::System.Guid id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await StreamPresentationHtmlLargeApiV2PptPresentationStreamLargeIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Stream Presentation Html Large + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> StreamPresentationHtmlLargeApiV2PptPresentationStreamLargeIdGetAsResponseAsync( + global::System.Guid id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/presentation/stream-large/{id}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,7 +384,11 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -373,7 +416,11 @@ partial void ProcessStreamPresentationHtmlLargeApiV2PptPresentationStreamLargeId #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.UpdatePresentationApiV2PptPresentationUpdatePut.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.UpdatePresentationApiV2PptPresentationUpdatePut.g.cs index 3fc6af2..642a272 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.UpdatePresentationApiV2PptPresentationUpdatePut.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.UpdatePresentationApiV2PptPresentationUpdatePut.g.cs @@ -50,6 +50,28 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte /// public async global::System.Threading.Tasks.Task UpdatePresentationApiV2PptPresentationUpdatePutAsync( + global::Presenton.UpdatePresentationRequestV2 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdatePresentationApiV2PptPresentationUpdatePutAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Presentation + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdatePresentationApiV2PptPresentationUpdatePutAsResponseAsync( + global::Presenton.UpdatePresentationRequestV2 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/presentation/update", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationWithSlidesV2.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationWithSlidesV2.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessUpdatePresentationApiV2PptPresentationUpdatePutResponseConte #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationWithSlidesV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationWithSlidesV2.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.g.cs b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.g.cs index f8a1542..bac9a7f 100644 --- a/src/libs/Presenton/Generated/Presenton.V2PresentationClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2PresentationClient.g.cs @@ -72,10 +72,10 @@ public V2PresentationClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V2PresentationClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V2SlideClient.GenerateNewSlideApiV2PptSlideGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.V2SlideClient.GenerateNewSlideApiV2PptSlideGeneratePost.g.cs index 45e8d78..ffb969f 100644 --- a/src/libs/Presenton/Generated/Presenton.V2SlideClient.GenerateNewSlideApiV2PptSlideGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2SlideClient.GenerateNewSlideApiV2PptSlideGeneratePost.g.cs @@ -51,6 +51,29 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( /// public async global::System.Threading.Tasks.Task GenerateNewSlideApiV2PptSlideGeneratePostAsync( + global::Presenton.GenerateSlideRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateNewSlideApiV2PptSlideGeneratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate New Slide
+ /// Generate a new slide for a presentation using a user prompt. Does not persist to DB. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GenerateNewSlideApiV2PptSlideGeneratePostAsResponseAsync( + global::Presenton.GenerateSlideRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v2/ppt/slide/generate", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -355,9 +397,13 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.GenerateSlideResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.GenerateSlideResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -385,9 +431,13 @@ partial void ProcessGenerateNewSlideApiV2PptSlideGeneratePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.GenerateSlideResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.GenerateSlideResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2SlideClient.GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.V2SlideClient.GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePost.g.cs index 3e204f6..2babb3f 100644 --- a/src/libs/Presenton/Generated/Presenton.V2SlideClient.GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2SlideClient.GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePost.g.cs @@ -55,6 +55,32 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen public async global::System.Threading.Tasks.Task GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePostAsync( global::System.Guid id, + global::Presenton.SegmentVariationsRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePostAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Segment Variations
+ /// Generate alternative code segments using Zai and return full slide variations. Persist them on the slide. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGeneratePostAsResponseAsync( + global::System.Guid id, + global::Presenton.SegmentVariationsRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -90,6 +116,7 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/slide/{id}/segment-variations/generate", baseUri: HttpClient.BaseAddress); @@ -170,6 +197,8 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +209,11 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +231,8 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +242,7 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +251,11 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +272,15 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +320,8 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +342,8 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -361,9 +406,13 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen { __response.EnsureSuccessStatusCode(); - return - global::Presenton.VariationsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.VariationsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -391,9 +440,13 @@ partial void ProcessGenerateSegmentVariationsApiV2PptSlideIdSegmentVariationsGen #endif ).ConfigureAwait(false); - return - await global::Presenton.VariationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.VariationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2SlideClient.GetSlideVariationsApiV2PptSlideIdVariationsGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2SlideClient.GetSlideVariationsApiV2PptSlideIdVariationsGet.g.cs index 210b7a4..2cef468 100644 --- a/src/libs/Presenton/Generated/Presenton.V2SlideClient.GetSlideVariationsApiV2PptSlideIdVariationsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2SlideClient.GetSlideVariationsApiV2PptSlideIdVariationsGet.g.cs @@ -65,6 +65,37 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten int? page = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetSlideVariationsApiV2PptSlideIdVariationsGetAsResponseAsync( + id: id, + count: count, + page: page, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Slide Variations
+ /// Return persisted HTML variations for a slide by its UUID with pagination (simple JSON, no SSE). + ///
+ /// + /// + /// Default Value: 3 + /// + /// + /// Default Value: 1 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetSlideVariationsApiV2PptSlideIdVariationsGetAsResponseAsync( + global::System.Guid id, + int? count = default, + int? page = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -96,12 +127,13 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/slide/{id}/variations", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("count", count?.ToString()) - .AddOptionalParameter("page", page?.ToString()) + .AddOptionalParameter("page", page?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -175,6 +207,8 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +219,11 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +241,8 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +252,7 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +261,11 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +282,15 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +330,8 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +352,8 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -366,9 +416,13 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedVariationsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedVariationsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -396,9 +450,13 @@ partial void ProcessGetSlideVariationsApiV2PptSlideIdVariationsGetResponseConten #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedVariationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedVariationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2SlideClient.StreamSlideVariationsApiV2PptSlideIdVariationsGenerateGet.g.cs b/src/libs/Presenton/Generated/Presenton.V2SlideClient.StreamSlideVariationsApiV2PptSlideIdVariationsGenerateGet.g.cs index 50273c9..70e683f 100644 --- a/src/libs/Presenton/Generated/Presenton.V2SlideClient.StreamSlideVariationsApiV2PptSlideIdVariationsGenerateGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2SlideClient.StreamSlideVariationsApiV2PptSlideIdVariationsGenerateGet.g.cs @@ -59,6 +59,32 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes int? count = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await StreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetAsResponseAsync( + id: id, + count: count, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Stream Slide Variations
+ /// SSE: Stream HTML variations for a slide by its UUID, matching legacy format, and persist after generation. + ///
+ /// + /// + /// Default Value: 3 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> StreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetAsResponseAsync( + global::System.Guid id, + int? count = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -89,11 +115,12 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v2/ppt/slide/{id}/variations/generate", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("count", count?.ToString()) + .AddOptionalParameter("count", count?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -166,6 +193,8 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +205,11 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +227,8 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +238,7 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +247,11 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +268,15 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +316,8 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +338,8 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,7 +402,11 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -385,7 +434,11 @@ partial void ProcessStreamSlideVariationsApiV2PptSlideIdVariationsGenerateGetRes #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V2SlideClient.g.cs b/src/libs/Presenton/Generated/Presenton.V2SlideClient.g.cs index f84eee4..822dba0 100644 --- a/src/libs/Presenton/Generated/Presenton.V2SlideClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V2SlideClient.g.cs @@ -72,10 +72,10 @@ public V2SlideClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V2SlideClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3AsyncTaskClient.GetAsyncTaskStatusApiV3AsyncTaskStatusIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3AsyncTaskClient.GetAsyncTaskStatusApiV3AsyncTaskStatusIdGet.g.cs index 5c89785..2e0df19 100644 --- a/src/libs/Presenton/Generated/Presenton.V3AsyncTaskClient.GetAsyncTaskStatusApiV3AsyncTaskStatusIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3AsyncTaskClient.GetAsyncTaskStatusApiV3AsyncTaskStatusIdGet.g.cs @@ -57,6 +57,31 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAsyncTaskStatusApiV3AsyncTaskStatusIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Async Task Status
+ /// Check the status of an async task.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// ID of the async task + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAsyncTaskStatusApiV3AsyncTaskStatusIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,6 +111,7 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/async-task/status/{id}", baseUri: HttpClient.BaseAddress); @@ -159,6 +185,8 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +197,11 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +219,8 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +230,7 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +239,11 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +260,15 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +308,8 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +330,8 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -350,9 +394,13 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -380,9 +428,13 @@ partial void ProcessGetAsyncTaskStatusApiV3AsyncTaskStatusIdGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3AsyncTaskClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3AsyncTaskClient.g.cs index c6b5a29..cefe7d0 100644 --- a/src/libs/Presenton/Generated/Presenton.V3AsyncTaskClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3AsyncTaskClient.g.cs @@ -72,10 +72,10 @@ public V3AsyncTaskClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3AsyncTaskClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.AddEnterpriseUserApiV3EnterpriseUsersAddPost.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.AddEnterpriseUserApiV3EnterpriseUsersAddPost.g.cs index ea99402..40b4f6e 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.AddEnterpriseUserApiV3EnterpriseUsersAddPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.AddEnterpriseUserApiV3EnterpriseUsersAddPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( /// public async global::System.Threading.Tasks.Task AddEnterpriseUserApiV3EnterpriseUsersAddPostAsync( + global::Presenton.EnterpriseUserAddRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddEnterpriseUserApiV3EnterpriseUsersAddPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Add Enterprise User + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> AddEnterpriseUserApiV3EnterpriseUsersAddPostAsResponseAsync( + global::Presenton.EnterpriseUserAddRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/enterprise/users/add", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessAddEnterpriseUserApiV3EnterpriseUsersAddPostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPost.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPost.g.cs index 91e33e4..292db7f 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPost.g.cs @@ -50,6 +50,28 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons /// public async global::System.Threading.Tasks.Task AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostAsync( + global::Presenton.EnterpriseUserCreditsAddRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Add Enterprise User Credits + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> AddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostAsResponseAsync( + global::Presenton.EnterpriseUserCreditsAddRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/enterprise/credits/add", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterpriseCreditsAddResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterpriseCreditsAddResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessAddEnterpriseUserCreditsApiV3EnterpriseCreditsAddPostRespons #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterpriseCreditsAddResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterpriseCreditsAddResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.CreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensPost.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.CreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensPost.g.cs index accd794..4cd6e60 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.CreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.CreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensPost.g.cs @@ -52,6 +52,26 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc global::System.Guid userId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensPostAsResponseAsync( + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Enterprise User Access Token + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensPostAsResponseAsync( + global::System.Guid userId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/enterprise/users/{userId}/access-tokens", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterpriseUserAccessTokenRead.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterpriseUserAccessTokenRead.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessCreateEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterpriseUserAccessTokenRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterpriseUserAccessTokenRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.DeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensTokenDelete.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.DeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensTokenDelete.g.cs index e502918..726d75a 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.DeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensTokenDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.DeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensTokenDelete.g.cs @@ -51,6 +51,27 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc string token, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensTokenDeleteAsResponseAsync( + userId: userId, + token: token, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Enterprise User Access Token + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAccessTokensTokenDeleteAsResponseAsync( + global::System.Guid userId, + string token, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/enterprise/users/{userId}/access-tokens/{token}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -342,6 +382,10 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -363,6 +407,10 @@ partial void ProcessDeleteEnterpriseUserAccessTokenApiV3EnterpriseUsersUserIdAcc try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseApiV3EnterpriseEnterpriseIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseApiV3EnterpriseEnterpriseIdGet.g.cs index 605e910..700fbf8 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseApiV3EnterpriseEnterpriseIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseApiV3EnterpriseEnterpriseIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( string enterpriseId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEnterpriseApiV3EnterpriseEnterpriseIdGetAsResponseAsync( + enterpriseId: enterpriseId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Enterprise + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetEnterpriseApiV3EnterpriseEnterpriseIdGetAsResponseAsync( + string enterpriseId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/enterprise/{enterpriseId}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterpriseRead.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterpriseRead.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessGetEnterpriseApiV3EnterpriseEnterpriseIdGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterpriseRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterpriseRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGet.g.cs index 970cf4b..405f912 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGet.g.cs @@ -54,6 +54,28 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons string enterprise, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetAsResponseAsync( + enterprise: enterprise, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Enterprise Credits Info + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetAsResponseAsync( + string enterprise, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -83,11 +105,12 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/enterprise/credits/info", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("enterprise", enterprise) + .AddRequiredParameter("enterprise", enterprise) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -159,6 +182,8 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +194,11 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +216,8 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +227,7 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +236,11 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +257,15 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +305,8 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +327,8 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -350,9 +391,13 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterpriseCreditsInfoResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterpriseCreditsInfoResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -380,9 +425,13 @@ partial void ProcessGetEnterpriseCreditsInfoApiV3EnterpriseCreditsInfoGetRespons #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterpriseCreditsInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterpriseCreditsInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterprisePresentationsInfoApiV3EnterprisePresentationsInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterprisePresentationsInfoApiV3EnterprisePresentationsInfoGet.g.cs index d671628..e0e7929 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterprisePresentationsInfoApiV3EnterprisePresentationsInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterprisePresentationsInfoApiV3EnterprisePresentationsInfoGet.g.cs @@ -54,6 +54,28 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn string enterprise, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEnterprisePresentationsInfoApiV3EnterprisePresentationsInfoGetAsResponseAsync( + enterprise: enterprise, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Enterprise Presentations Info + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetEnterprisePresentationsInfoApiV3EnterprisePresentationsInfoGetAsResponseAsync( + string enterprise, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -83,11 +105,12 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/enterprise/presentations/info", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("enterprise", enterprise) + .AddRequiredParameter("enterprise", enterprise) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -159,6 +182,8 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +194,11 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +216,8 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +227,7 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +236,11 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +257,15 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +305,8 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +327,8 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -350,9 +391,13 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterprisePresentationsInfoResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterprisePresentationsInfoResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -380,9 +425,13 @@ partial void ProcessGetEnterprisePresentationsInfoApiV3EnterprisePresentationsIn #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterprisePresentationsInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterprisePresentationsInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserApiV3EnterpriseUsersUserIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserApiV3EnterpriseUsersUserIdGet.g.cs index b9f48d1..edea296 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserApiV3EnterpriseUsersUserIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserApiV3EnterpriseUsersUserIdGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten global::System.Guid userId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEnterpriseUserApiV3EnterpriseUsersUserIdGetAsResponseAsync( + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Enterprise User + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetEnterpriseUserApiV3EnterpriseUsersUserIdGetAsResponseAsync( + global::System.Guid userId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/enterprise/users/{userId}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten { __response.EnsureSuccessStatusCode(); - return - global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.UserRead.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessGetEnterpriseUserApiV3EnterpriseUsersUserIdGetResponseConten #endif ).ConfigureAwait(false); - return - await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.UserRead.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCreditsInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCreditsInfoGet.g.cs index 1b076b1..4270525 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCreditsInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCreditsInfoGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit global::System.Guid userId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCreditsInfoGetAsResponseAsync( + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Enterprise User Credits Info + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCreditsInfoGetAsResponseAsync( + global::System.Guid userId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/enterprise/users/{userId}/credits/info", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterpriseUserCreditsInfoResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterpriseUserCreditsInfoResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessGetEnterpriseUserCreditsInfoApiV3EnterpriseUsersUserIdCredit #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterpriseUserCreditsInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterpriseUserCreditsInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserIdPresentationsInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserIdPresentationsInfoGet.g.cs index a86c430..2229a5f 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserIdPresentationsInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserIdPresentationsInfoGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId global::System.Guid userId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserIdPresentationsInfoGetAsResponseAsync( + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Enterprise User Presentations Info + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserIdPresentationsInfoGetAsResponseAsync( + global::System.Guid userId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/enterprise/users/{userId}/presentations/info", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterpriseUserPresentationsInfoResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterpriseUserPresentationsInfoResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessGetEnterpriseUserPresentationsInfoApiV3EnterpriseUsersUserId #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterpriseUserPresentationsInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterpriseUserPresentationsInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGet.g.cs index 0270153..338a5bf 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.GetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGet.g.cs @@ -54,6 +54,28 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon string enterprise, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetAsResponseAsync( + enterprise: enterprise, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Enterprise Users Info + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetAsResponseAsync( + string enterprise, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -83,11 +105,12 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/enterprise/users/info", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("enterprise", enterprise) + .AddRequiredParameter("enterprise", enterprise) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -159,6 +182,8 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -169,6 +194,11 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -186,6 +216,8 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -195,8 +227,7 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -205,6 +236,11 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -221,14 +257,15 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -268,6 +305,8 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -288,6 +327,8 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -350,9 +391,13 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterpriseUsersInfoResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterpriseUsersInfoResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -380,9 +425,13 @@ partial void ProcessGetEnterpriseUsersInfoApiV3EnterpriseUsersInfoGetResponseCon #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterpriseUsersInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterpriseUsersInfoResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGet.g.cs index 93b9161..6828e2c 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGet.g.cs @@ -68,6 +68,40 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetAsResponseAsync( + enterprise: enterprise, + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Enterprise Credit Adds + /// + /// + /// Page number starting from 1
+ /// Default Value: 1 + /// + /// + /// Number of transactions per page
+ /// Default Value: 25 + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetAsResponseAsync( + string enterprise, + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -99,13 +133,14 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/enterprise/credits/adds", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("page_size", pageSize?.ToString()) - .AddRequiredParameter("enterprise", enterprise) + .AddRequiredParameter("enterprise", enterprise) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -179,6 +214,8 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -189,6 +226,11 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -206,6 +248,8 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -215,8 +259,7 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -225,6 +268,11 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -241,14 +289,15 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -288,6 +337,8 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -308,6 +359,8 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -370,9 +423,13 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterpriseCreditsAddsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterpriseCreditsAddsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -400,9 +457,13 @@ partial void ProcessListEnterpriseCreditAddsApiV3EnterpriseCreditsAddsGetRespons #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterpriseCreditsAddsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterpriseCreditsAddsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterprisePresentationsApiV3EnterprisePresentationsGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterprisePresentationsApiV3EnterprisePresentationsGet.g.cs index 3c04b80..0b6b4a4 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterprisePresentationsApiV3EnterprisePresentationsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterprisePresentationsApiV3EnterprisePresentationsGet.g.cs @@ -74,6 +74,45 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe string? search = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEnterprisePresentationsApiV3EnterprisePresentationsGetAsResponseAsync( + enterprise: enterprise, + page: page, + pageSize: pageSize, + search: search, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Enterprise Presentations + /// + /// + /// Page number starting from 1
+ /// Default Value: 1 + /// + /// + /// Number of presentations per page
+ /// Default Value: 25 + /// + /// + /// Search by presentation title or presentation id + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListEnterprisePresentationsApiV3EnterprisePresentationsGetAsResponseAsync( + string enterprise, + int? page = default, + int? pageSize = default, + string? search = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,14 +145,15 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/enterprise/presentations", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("page_size", pageSize?.ToString()) .AddOptionalParameter("search", search) - .AddRequiredParameter("enterprise", enterprise) + .AddRequiredParameter("enterprise", enterprise) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -188,6 +228,8 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -198,6 +240,11 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -215,6 +262,8 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -224,8 +273,7 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -234,6 +282,11 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -250,14 +303,15 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -297,6 +351,8 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -317,6 +373,8 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -379,9 +437,13 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterprisePresentationsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterprisePresentationsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -409,9 +471,13 @@ partial void ProcessListEnterprisePresentationsApiV3EnterprisePresentationsGetRe #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterprisePresentationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterprisePresentationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAccessTokensGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAccessTokensGet.g.cs index 19058a8..ed33c99 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAccessTokensGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAccessTokensGet.g.cs @@ -52,6 +52,26 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce global::System.Guid userId, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAccessTokensGetAsResponseAsync( + userId: userId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Enterprise User Access Tokens + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAccessTokensGetAsResponseAsync( + global::System.Guid userId, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/enterprise/users/{userId}/access-tokens", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -345,9 +384,13 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterpriseUserAccessTokensResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterpriseUserAccessTokensResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +418,13 @@ partial void ProcessListEnterpriseUserAccessTokensApiV3EnterpriseUsersUserIdAcce #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterpriseUserAccessTokensResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterpriseUserAccessTokensResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPresentationsGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPresentationsGet.g.cs index e6308fe..e1d991f 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPresentationsGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPresentationsGet.g.cs @@ -72,6 +72,43 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre string? search = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPresentationsGetAsResponseAsync( + userId: userId, + page: page, + pageSize: pageSize, + search: search, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Enterprise User Presentations + /// + /// + /// + /// Page number starting from 1
+ /// Default Value: 1 + /// + /// + /// Number of presentations per page
+ /// Default Value: 25 + /// + /// + /// Search by presentation title or presentation id + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPresentationsGetAsResponseAsync( + global::System.Guid userId, + int? page = default, + int? pageSize = default, + string? search = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -104,13 +141,14 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/enterprise/users/{userId}/presentations", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("page_size", pageSize?.ToString()) - .AddOptionalParameter("search", search) + .AddOptionalParameter("search", search) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -185,6 +223,8 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -195,6 +235,11 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -212,6 +257,8 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -221,8 +268,7 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -231,6 +277,11 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -247,14 +298,15 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -294,6 +346,8 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -314,6 +368,8 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -376,9 +432,13 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterprisePresentationsResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterprisePresentationsResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -406,9 +466,13 @@ partial void ProcessListEnterpriseUserPresentationsApiV3EnterpriseUsersUserIdPre #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterprisePresentationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterprisePresentationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUsersApiV3EnterpriseUsersGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUsersApiV3EnterpriseUsersGet.g.cs index aea346b..e881f27 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUsersApiV3EnterpriseUsersGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ListEnterpriseUsersApiV3EnterpriseUsersGet.g.cs @@ -74,6 +74,45 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( string? search = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEnterpriseUsersApiV3EnterpriseUsersGetAsResponseAsync( + enterprise: enterprise, + page: page, + pageSize: pageSize, + search: search, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Enterprise Users + /// + /// + /// Page number starting from 1
+ /// Default Value: 1 + /// + /// + /// Number of users per page
+ /// Default Value: 25 + /// + /// + /// Search by user name, email, or id + /// + /// + /// Enterprise ID + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListEnterpriseUsersApiV3EnterpriseUsersGetAsResponseAsync( + string enterprise, + int? page = default, + int? pageSize = default, + string? search = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,14 +145,15 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/enterprise/users", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("page_size", pageSize?.ToString()) .AddOptionalParameter("search", search) - .AddRequiredParameter("enterprise", enterprise) + .AddRequiredParameter("enterprise", enterprise) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -188,6 +228,8 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -198,6 +240,11 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -215,6 +262,8 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -224,8 +273,7 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -234,6 +282,11 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -250,14 +303,15 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -297,6 +351,8 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -317,6 +373,8 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -379,9 +437,13 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.EnterpriseUsersResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.EnterpriseUsersResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -409,9 +471,13 @@ partial void ProcessListEnterpriseUsersApiV3EnterpriseUsersGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.EnterpriseUsersResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.EnterpriseUsersResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPost.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPost.g.cs index 262352c..fac0f27 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPost.g.cs @@ -49,6 +49,29 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa public async global::System.Threading.Tasks.Task ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPostAsync( global::System.Guid userId, + global::Presenton.EnterpriseUserPasswordResetRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPostAsResponseAsync( + userId: userId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Reset Enterprise User Password + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPasswordPostAsResponseAsync( + global::System.Guid userId, + global::Presenton.EnterpriseUserPasswordResetRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +107,7 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/enterprise/users/{userId}/reset-password", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -351,6 +393,10 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -372,6 +418,10 @@ partial void ProcessResetEnterpriseUserPasswordApiV3EnterpriseUsersUserIdResetPa try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.g.cs index 5929ff7..8202b29 100644 --- a/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3EnterpriseClient.g.cs @@ -72,10 +72,10 @@ public V3EnterpriseClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3EnterpriseClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3FilesClient.UploadFilesV3ApiV3FilesUploadPost.g.cs b/src/libs/Presenton/Generated/Presenton.V3FilesClient.UploadFilesV3ApiV3FilesUploadPost.g.cs index 4ffcb84..f58ef52 100644 --- a/src/libs/Presenton/Generated/Presenton.V3FilesClient.UploadFilesV3ApiV3FilesUploadPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3FilesClient.UploadFilesV3ApiV3FilesUploadPost.g.cs @@ -53,6 +53,31 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( /// public async global::System.Threading.Tasks.Task> UploadFilesV3ApiV3FilesUploadPostAsync( + global::Presenton.BodyUploadFilesV3ApiV3FilesUploadPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UploadFilesV3ApiV3FilesUploadPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upload Files V3
+ /// Upload files to be used later.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> UploadFilesV3ApiV3FilesUploadPostAsResponseAsync( + global::Presenton.BodyUploadFilesV3ApiV3FilesUploadPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -83,10 +108,11 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/files/upload", baseUri: HttpClient.BaseAddress); @@ -119,6 +145,7 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); if (request.Files != default) { @@ -126,8 +153,11 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( __httpRequestContent.Add( content: new global::System.Net.Http.StringContent(request.Files.ToString() ?? string.Empty), name: "\"files\""); + } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -169,6 +199,8 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +211,11 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +233,8 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +244,7 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +253,11 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +274,15 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +322,8 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +344,8 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -360,9 +408,13 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -390,9 +442,13 @@ partial void ProcessUploadFilesV3ApiV3FilesUploadPostResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3FilesClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3FilesClient.g.cs index 5ad7654..3a33568 100644 --- a/src/libs/Presenton/Generated/Presenton.V3FilesClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3FilesClient.g.cs @@ -72,10 +72,10 @@ public V3FilesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3FilesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3GitHubClient.GetGithubMetadataApiV3GithubMetadataGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3GitHubClient.GetGithubMetadataApiV3GithubMetadataGet.g.cs index 6958858..76e26d7 100644 --- a/src/libs/Presenton/Generated/Presenton.V3GitHubClient.GetGithubMetadataApiV3GithubMetadataGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3GitHubClient.GetGithubMetadataApiV3GithubMetadataGet.g.cs @@ -48,6 +48,23 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( public async global::System.Threading.Tasks.Task GetGithubMetadataApiV3GithubMetadataGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetGithubMetadataApiV3GithubMetadataGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Github Metadata + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetGithubMetadataApiV3GithubMetadataGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/github/metadata", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,7 +337,11 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -329,7 +369,11 @@ partial void ProcessGetGithubMetadataApiV3GithubMetadataGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3GitHubClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3GitHubClient.g.cs index be7d02c..88e661a 100644 --- a/src/libs/Presenton/Generated/Presenton.V3GitHubClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3GitHubClient.g.cs @@ -72,10 +72,10 @@ public V3GitHubClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3GitHubClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3ImagesClient.DeleteUploadedImageByIdV3ApiV3ImagesIdDelete.g.cs b/src/libs/Presenton/Generated/Presenton.V3ImagesClient.DeleteUploadedImageByIdV3ApiV3ImagesIdDelete.g.cs index f6c2d0a..f5695b1 100644 --- a/src/libs/Presenton/Generated/Presenton.V3ImagesClient.DeleteUploadedImageByIdV3ApiV3ImagesIdDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3ImagesClient.DeleteUploadedImageByIdV3ApiV3ImagesIdDelete.g.cs @@ -50,6 +50,27 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteUploadedImageByIdV3ApiV3ImagesIdDeleteAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Uploaded Image By Id V3
+ /// Delete an uploaded image by id.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteUploadedImageByIdV3ApiV3ImagesIdDeleteAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -79,6 +100,7 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/images/{id}", baseUri: HttpClient.BaseAddress); @@ -152,6 +174,8 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -162,6 +186,11 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -179,6 +208,8 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -188,8 +219,7 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -198,6 +228,11 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -214,14 +249,15 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -261,6 +297,8 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -281,6 +319,8 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -339,6 +379,10 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -360,6 +404,10 @@ partial void ProcessDeleteUploadedImageByIdV3ApiV3ImagesIdDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3ImagesClient.GetUploadedImagesV3ApiV3ImagesUploadedGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3ImagesClient.GetUploadedImagesV3ApiV3ImagesUploadedGet.g.cs index a0a1f78..8279e53 100644 --- a/src/libs/Presenton/Generated/Presenton.V3ImagesClient.GetUploadedImagesV3ApiV3ImagesUploadedGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3ImagesClient.GetUploadedImagesV3ApiV3ImagesUploadedGet.g.cs @@ -51,6 +51,26 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( public async global::System.Threading.Tasks.Task GetUploadedImagesV3ApiV3ImagesUploadedGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetUploadedImagesV3ApiV3ImagesUploadedGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Uploaded Images V3
+ /// Get all uploaded images of the user.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetUploadedImagesV3ApiV3ImagesUploadedGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -79,6 +99,7 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/images/uploaded", baseUri: HttpClient.BaseAddress); @@ -151,6 +172,8 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -161,6 +184,11 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -178,6 +206,8 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -187,8 +217,7 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -197,6 +226,11 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -213,14 +247,15 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -260,6 +295,8 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -280,6 +317,8 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -342,7 +381,11 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -370,7 +413,11 @@ partial void ProcessGetUploadedImagesV3ApiV3ImagesUploadedGetResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3ImagesClient.UploadImageV3ApiV3ImagesUploadPost.g.cs b/src/libs/Presenton/Generated/Presenton.V3ImagesClient.UploadImageV3ApiV3ImagesUploadPost.g.cs index e04c906..2f85666 100644 --- a/src/libs/Presenton/Generated/Presenton.V3ImagesClient.UploadImageV3ApiV3ImagesUploadPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3ImagesClient.UploadImageV3ApiV3ImagesUploadPost.g.cs @@ -53,6 +53,31 @@ partial void ProcessUploadImageV3ApiV3ImagesUploadPostResponseContent( /// public async global::System.Threading.Tasks.Task UploadImageV3ApiV3ImagesUploadPostAsync( + global::Presenton.BodyUploadImageV3ApiV3ImagesUploadPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UploadImageV3ApiV3ImagesUploadPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upload Image V3
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadImageV3ApiV3ImagesUploadPostAsResponseAsync( + global::Presenton.BodyUploadImageV3ApiV3ImagesUploadPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -83,10 +108,11 @@ partial void ProcessUploadImageV3ApiV3ImagesUploadPostResponseContent( var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( clientOptions: Options, requestOptions: requestOptions, - supportsRetry: true); + supportsRetry: false); global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/images/upload", baseUri: HttpClient.BaseAddress); @@ -119,6 +145,7 @@ partial void ProcessUploadImageV3ApiV3ImagesUploadPostResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( @@ -157,7 +184,9 @@ request.Filename is null { __contentFile.Headers.ContentDisposition.FileNameStar = null; } + __httpRequest.Content = __httpRequestContent; + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -199,6 +228,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -209,6 +240,11 @@ request.Filename is null } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -226,6 +262,8 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -235,8 +273,7 @@ request.Filename is null __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -245,6 +282,11 @@ request.Filename is null __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -261,14 +303,15 @@ request.Filename is null attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -308,6 +351,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -328,6 +373,8 @@ request.Filename is null attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -390,9 +437,13 @@ request.Filename is null { __response.EnsureSuccessStatusCode(); - return - global::Presenton.ImageAsset.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.ImageAsset.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -420,9 +471,13 @@ request.Filename is null #endif ).ConfigureAwait(false); - return - await global::Presenton.ImageAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.ImageAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -488,5 +543,912 @@ request.Filename is null requestOptions: requestOptions, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// Upload Image V3
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UploadImageV3ApiV3ImagesUploadPostAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Presenton.BodyUploadImageV3ApiV3ImagesUploadPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadImageV3ApiV3ImagesUploadPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadImageV3ApiV3ImagesUploadPostSecurityRequirements, + operationName: "UploadImageV3ApiV3ImagesUploadPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v3/images/upload", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadImageV3ApiV3ImagesUploadPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV3ApiV3ImagesUploadPost", + methodName: "UploadImageV3ApiV3ImagesUploadPostAsync", + pathTemplate: "\"/api/v3/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV3ApiV3ImagesUploadPost", + methodName: "UploadImageV3ApiV3ImagesUploadPostAsync", + pathTemplate: "\"/api/v3/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV3ApiV3ImagesUploadPost", + methodName: "UploadImageV3ApiV3ImagesUploadPostAsync", + pathTemplate: "\"/api/v3/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadImageV3ApiV3ImagesUploadPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV3ApiV3ImagesUploadPost", + methodName: "UploadImageV3ApiV3ImagesUploadPostAsync", + pathTemplate: "\"/api/v3/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV3ApiV3ImagesUploadPost", + methodName: "UploadImageV3ApiV3ImagesUploadPostAsync", + pathTemplate: "\"/api/v3/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadImageV3ApiV3ImagesUploadPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Presenton.ImageAsset.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + return + await global::Presenton.ImageAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Upload Image V3
+ /// Upload an image.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// The stream to send as the multipart 'file' file part. + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UploadImageV3ApiV3ImagesUploadPostAsResponseAsync( + global::System.IO.Stream file, + string filename, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + + file = file ?? throw new global::System.ArgumentNullException(nameof(file)); + var request = new global::Presenton.BodyUploadImageV3ApiV3ImagesUploadPost + { + File = global::System.Array.Empty(), + Filename = filename, + }; + PrepareArguments( + client: HttpClient); + PrepareUploadImageV3ApiV3ImagesUploadPostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Presenton.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_UploadImageV3ApiV3ImagesUploadPostSecurityRequirements, + operationName: "UploadImageV3ApiV3ImagesUploadPostAsync"); + + using var __timeoutCancellationTokenSource = global::Presenton.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Presenton.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Presenton.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: false); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Presenton.PathBuilder( + path: "/api/v3/images/upload", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); + var __contentFile = new global::System.Net.Http.StreamContent(file); + __contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue( + request.Filename is null + ? "application/octet-stream" + : (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch + { + ".aac" => "audio/aac", + ".flac" => "audio/flac", + ".gif" => "image/gif", + ".jpeg" => "image/jpeg", + ".jpg" => "image/jpeg", + ".json" => "application/json", + ".m4a" => "audio/mp4", + ".mp3" => "audio/mpeg", + ".mp4" => "video/mp4", + ".mpeg" => "audio/mpeg", + ".mpga" => "audio/mpeg", + ".oga" => "audio/ogg", + ".ogg" => "audio/ogg", + ".opus" => "audio/ogg", + ".pdf" => "application/pdf", + ".png" => "image/png", + ".txt" => "text/plain", + ".wav" => "audio/wav", + ".weba" => "audio/webm", + ".webm" => "video/webm", + ".webp" => "image/webp", + _ => "application/octet-stream", + }); + __httpRequestContent.Add( + content: __contentFile, + name: "\"file\"", + fileName: request.Filename != null ? $"\"{request.Filename}\"" : string.Empty); + if (__contentFile.Headers.ContentDisposition != null) + { + __contentFile.Headers.ContentDisposition.FileNameStar = null; + } + + __httpRequest.Content = __httpRequestContent; + + global::Presenton.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUploadImageV3ApiV3ImagesUploadPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Presenton.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV3ApiV3ImagesUploadPost", + methodName: "UploadImageV3ApiV3ImagesUploadPostAsync", + pathTemplate: "\"/api/v3/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV3ApiV3ImagesUploadPost", + methodName: "UploadImageV3ApiV3ImagesUploadPostAsync", + pathTemplate: "\"/api/v3/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV3ApiV3ImagesUploadPost", + methodName: "UploadImageV3ApiV3ImagesUploadPostAsync", + pathTemplate: "\"/api/v3/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUploadImageV3ApiV3ImagesUploadPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV3ApiV3ImagesUploadPost", + methodName: "UploadImageV3ApiV3ImagesUploadPostAsync", + pathTemplate: "\"/api/v3/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "UploadImageV3ApiV3ImagesUploadPost", + methodName: "UploadImageV3ApiV3ImagesUploadPostAsync", + pathTemplate: "\"/api/v3/images/upload\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Presenton.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Presenton.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::Presenton.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUploadImageV3ApiV3ImagesUploadPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Presenton.ImageAsset.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Presenton.ImageAsset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Presenton.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/libs/Presenton/Generated/Presenton.V3ImagesClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3ImagesClient.g.cs index 1ecdd83..60cb236 100644 --- a/src/libs/Presenton/Generated/Presenton.V3ImagesClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3ImagesClient.g.cs @@ -72,10 +72,10 @@ public V3ImagesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3ImagesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3PlaygroundClient.GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.V3PlaygroundClient.GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePost.g.cs index 29571a9..6638a0a 100644 --- a/src/libs/Presenton/Generated/Presenton.V3PlaygroundClient.GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3PlaygroundClient.GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation /// public async global::System.Threading.Tasks.Task> GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePostAsync( + global::Presenton.GeneratePresentationRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Presentation For Playground + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GeneratePresentationForPlaygroundApiV3PlaygroundPresentationGeneratePostAsResponseAsync( + global::Presenton.GeneratePresentationRequestV3 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/playground/presentation/generate", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AnyOf.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AnyOf.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessGeneratePresentationForPlaygroundApiV3PlaygroundPresentation #endif ).ConfigureAwait(false); - return - await global::Presenton.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AnyOf.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3PlaygroundClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3PlaygroundClient.g.cs index b7690ad..a3ae7cf 100644 --- a/src/libs/Presenton/Generated/Presenton.V3PlaygroundClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3PlaygroundClient.g.cs @@ -72,10 +72,10 @@ public V3PlaygroundClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3PlaygroundClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPost.g.cs index 15c9d46..09f649d 100644 --- a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPost.g.cs @@ -54,6 +54,32 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs /// public async global::System.Threading.Tasks.Task CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPostAsync( + global::Presenton.CreatePresentationFromJsonRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Presentation From Json Async V3
+ /// Create a presentation from JSON asynchronously.
+ /// Use /api/v3/async-task/status/task-xxxxxxxxxx to get the status of presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAsyncPostAsResponseAsync( + global::Presenton.CreatePresentationFromJsonRequestV3 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -88,6 +114,7 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/presentation/from-json/async", baseUri: HttpClient.BaseAddress); @@ -167,6 +194,8 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -177,6 +206,11 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -194,6 +228,8 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -203,8 +239,7 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -213,6 +248,11 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -229,14 +269,15 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +317,8 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -296,6 +339,8 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -358,9 +403,13 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -388,9 +437,13 @@ partial void ProcessCreatePresentationFromJsonAsyncV3ApiV3PresentationFromJsonAs #endif ).ConfigureAwait(false); - return - await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPost.g.cs b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPost.g.cs index 4557a0c..570e31e 100644 --- a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPost.g.cs @@ -53,6 +53,31 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos /// public async global::System.Threading.Tasks.Task CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPostAsync( + global::Presenton.CreatePresentationFromJsonRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Presentation From Json Sync V3
+ /// Create a presentation from JSON synchronously.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPostAsResponseAsync( + global::Presenton.CreatePresentationFromJsonRequestV3 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/presentation/from-json", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessCreatePresentationFromJsonSyncV3ApiV3PresentationFromJsonPos #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPost.g.cs b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPost.g.cs index 2d466db..d6102dd 100644 --- a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPost.g.cs @@ -53,6 +53,31 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe /// public async global::System.Threading.Tasks.Task ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostAsync( + global::Presenton.BodyExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPost request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Export Presentation As Pptx Or Pdf V3
+ /// Export a presentation as PPTX, PDF or PNG.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostAsResponseAsync( + global::Presenton.BodyExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPost request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/presentation/export", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessExportPresentationAsPptxOrPdfV3ApiV3PresentationExportPostRe #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePost.g.cs index ca3e7cc..7c1f8e7 100644 --- a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePost.g.cs @@ -53,6 +53,31 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR /// public async global::System.Threading.Tasks.Task> GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostAsync( + global::Presenton.GenerateOutlinesRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Outlines Sync V3
+ /// Generate outlines for a presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostAsResponseAsync( + global::Presenton.GenerateOutlinesRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/presentation/outlines/generate", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessGenerateOutlinesSyncV3ApiV3PresentationOutlinesGeneratePostR #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPost.g.cs b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPost.g.cs index 6a3a802..5cd045b 100644 --- a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPost.g.cs @@ -54,6 +54,32 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos /// public async global::System.Threading.Tasks.Task GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPostAsync( + global::Presenton.GeneratePresentationRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Presentation Async V3
+ /// Generate a presentation asynchronously.
+ /// Use /api/v3/async-task/status/task-xxxxxxxxxx to get the status of presentation.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPostAsResponseAsync( + global::Presenton.GeneratePresentationRequestV3 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -88,6 +114,7 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/presentation/generate/async", baseUri: HttpClient.BaseAddress); @@ -167,6 +194,8 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -177,6 +206,11 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -194,6 +228,8 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -203,8 +239,7 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -213,6 +248,11 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -229,14 +269,15 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -276,6 +317,8 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -296,6 +339,8 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -358,9 +403,13 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos { __response.EnsureSuccessStatusCode(); - return - global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.AsyncTaskModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -388,9 +437,13 @@ partial void ProcessGeneratePresentationAsyncV3ApiV3PresentationGenerateAsyncPos #endif ).ConfigureAwait(false); - return - await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.AsyncTaskModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GeneratePresentationSyncV3ApiV3PresentationGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GeneratePresentationSyncV3ApiV3PresentationGeneratePost.g.cs index 5482f49..93d5619 100644 --- a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GeneratePresentationSyncV3ApiV3PresentationGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GeneratePresentationSyncV3ApiV3PresentationGeneratePost.g.cs @@ -53,6 +53,31 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo /// public async global::System.Threading.Tasks.Task GeneratePresentationSyncV3ApiV3PresentationGeneratePostAsync( + global::Presenton.GeneratePresentationRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GeneratePresentationSyncV3ApiV3PresentationGeneratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Presentation Sync V3
+ /// Generate a presentation synchronously.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GeneratePresentationSyncV3ApiV3PresentationGeneratePostAsResponseAsync( + global::Presenton.GeneratePresentationRequestV3 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/presentation/generate", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationPathAndEditPath.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessGeneratePresentationSyncV3ApiV3PresentationGeneratePostRespo #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationPathAndEditPath.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GetAllUserPresentationsForUiApiV3PresentationAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GetAllUserPresentationsForUiApiV3PresentationAllGet.g.cs index 9402b84..5dbda18 100644 --- a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GetAllUserPresentationsForUiApiV3PresentationAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GetAllUserPresentationsForUiApiV3PresentationAllGet.g.cs @@ -63,6 +63,36 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllUserPresentationsForUiApiV3PresentationAllGetAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get All User Presentations For Ui
+ /// Get all presentations of the user.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAllUserPresentationsForUiApiV3PresentationAllGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -93,12 +123,13 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/presentation/all", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -171,6 +202,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +214,11 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +236,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +247,7 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +256,11 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +277,15 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +325,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +347,8 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -362,9 +411,13 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -392,9 +445,13 @@ partial void ProcessGetAllUserPresentationsForUiApiV3PresentationAllGetResponseC #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUiGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUiGet.g.cs index 5f8af51..d9de1d6 100644 --- a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUiGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.GetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUiGet.g.cs @@ -60,6 +60,33 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUiGetAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get All User Presentations For Ui With Slides + /// + /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUiGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -90,12 +117,13 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/presentation/all/ui", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -168,6 +196,8 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -178,6 +208,11 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -195,6 +230,8 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -204,8 +241,7 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -214,6 +250,11 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -230,14 +271,15 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -277,6 +319,8 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -297,6 +341,8 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -359,9 +405,13 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -389,9 +439,13 @@ partial void ProcessGetAllUserPresentationsForUiWithSlidesApiV3PresentationAllUi #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.g.cs index 7bba012..a6b38de 100644 --- a/src/libs/Presenton/Generated/Presenton.V3PresentationClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3PresentationClient.g.cs @@ -72,10 +72,10 @@ public V3PresentationClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3PresentationClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3SchemaClient.GenerateContentForSchemaApiV3SchemaContentGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.V3SchemaClient.GenerateContentForSchemaApiV3SchemaContentGeneratePost.g.cs index 41ff9f9..1d09e9c 100644 --- a/src/libs/Presenton/Generated/Presenton.V3SchemaClient.GenerateContentForSchemaApiV3SchemaContentGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3SchemaClient.GenerateContentForSchemaApiV3SchemaContentGeneratePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon /// public async global::System.Threading.Tasks.Task GenerateContentForSchemaApiV3SchemaContentGeneratePostAsync( + global::Presenton.GenerateContentForSchemaRequest request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateContentForSchemaApiV3SchemaContentGeneratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Content For Schema + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GenerateContentForSchemaApiV3SchemaContentGeneratePostAsResponseAsync( + global::Presenton.GenerateContentForSchemaRequest request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/schema/content/generate", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon { __response.EnsureSuccessStatusCode(); - return - global::Presenton.GenerateContentForSchemaResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.GenerateContentForSchemaResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessGenerateContentForSchemaApiV3SchemaContentGeneratePostRespon #endif ).ConfigureAwait(false); - return - await global::Presenton.GenerateContentForSchemaResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.GenerateContentForSchemaResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3SchemaClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3SchemaClient.g.cs index 3923124..35b857f 100644 --- a/src/libs/Presenton/Generated/Presenton.V3SchemaClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3SchemaClient.g.cs @@ -72,10 +72,10 @@ public V3SchemaClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3SchemaClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3SmartDesignClient.GetAllSmartDesignsApiV3SmartDesignAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3SmartDesignClient.GetAllSmartDesignsApiV3SmartDesignAllGet.g.cs index 1a236c9..b899fb6 100644 --- a/src/libs/Presenton/Generated/Presenton.V3SmartDesignClient.GetAllSmartDesignsApiV3SmartDesignAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3SmartDesignClient.GetAllSmartDesignsApiV3SmartDesignAllGet.g.cs @@ -63,6 +63,36 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( int? pageSize = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllSmartDesignsApiV3SmartDesignAllGetAsResponseAsync( + page: page, + pageSize: pageSize, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get All Smart Designs
+ /// Get all smart designs.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Default Value: 1 + /// + /// + /// Default Value: 10 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAllSmartDesignsApiV3SmartDesignAllGetAsResponseAsync( + int? page = default, + int? pageSize = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -93,12 +123,13 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/smart-design/all", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("page_size", pageSize?.ToString()) + .AddOptionalParameter("page_size", pageSize?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -171,6 +202,8 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +214,11 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +236,8 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +247,7 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +256,11 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +277,15 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +325,8 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +347,8 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -362,9 +411,13 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PaginatedResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -392,9 +445,13 @@ partial void ProcessGetAllSmartDesignsApiV3SmartDesignAllGetResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PaginatedResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3SmartDesignClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3SmartDesignClient.g.cs index b4fbb69..dac06a5 100644 --- a/src/libs/Presenton/Generated/Presenton.V3SmartDesignClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3SmartDesignClient.g.cs @@ -72,10 +72,10 @@ public V3SmartDesignClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3SmartDesignClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetAllStandardTemplatesApiV3StandardTemplateAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetAllStandardTemplatesApiV3StandardTemplateAllGet.g.cs index 2ce4db5..9719973 100644 --- a/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetAllStandardTemplatesApiV3StandardTemplateAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetAllStandardTemplatesApiV3StandardTemplateAllGet.g.cs @@ -58,6 +58,32 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo bool? includeDefaults = default, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllStandardTemplatesApiV3StandardTemplateAllGetAsResponseAsync( + includeDefaults: includeDefaults, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get All Standard Templates
+ /// Get all standard templates.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Whether to include default templates
+ /// Default Value: true + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetAllStandardTemplatesApiV3StandardTemplateAllGetAsResponseAsync( + bool? includeDefaults = default, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -87,11 +113,12 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/standard-template/all", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("include_defaults", includeDefaults?.ToString().ToLowerInvariant()) + .AddOptionalParameter("include_defaults", includeDefaults?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::Presenton.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -163,6 +190,8 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +202,11 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +224,8 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +235,7 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +244,11 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +265,15 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +313,8 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +335,8 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +399,13 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +433,13 @@ partial void ProcessGetAllStandardTemplatesApiV3StandardTemplateAllGetResponseCo #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetStandardTemplateByIdApiV3StandardTemplateIdGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetStandardTemplateByIdApiV3StandardTemplateIdGet.g.cs index ff06e31..1d53e11 100644 --- a/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetStandardTemplateByIdApiV3StandardTemplateIdGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetStandardTemplateByIdApiV3StandardTemplateIdGet.g.cs @@ -55,6 +55,29 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetStandardTemplateByIdApiV3StandardTemplateIdGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Standard Template By Id
+ /// Get a standard template by id.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetStandardTemplateByIdApiV3StandardTemplateIdGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -84,6 +107,7 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/standard-template/{id}", baseUri: HttpClient.BaseAddress); @@ -157,6 +181,8 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -167,6 +193,11 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -184,6 +215,8 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -193,8 +226,7 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -203,6 +235,11 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -219,14 +256,15 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -266,6 +304,8 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -286,6 +326,8 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -348,9 +390,13 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon { __response.EnsureSuccessStatusCode(); - return - global::Presenton.PresentationLayoutModel.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.PresentationLayoutModel.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -378,9 +424,13 @@ partial void ProcessGetStandardTemplateByIdApiV3StandardTemplateIdGetResponseCon #endif ).ConfigureAwait(false); - return - await global::Presenton.PresentationLayoutModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.PresentationLayoutModel.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetStandardTemplateExampleApiV3StandardTemplateIdExampleGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetStandardTemplateExampleApiV3StandardTemplateIdExampleGet.g.cs index 08c3285..0045853 100644 --- a/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetStandardTemplateExampleApiV3StandardTemplateIdExampleGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.GetStandardTemplateExampleApiV3StandardTemplateIdExampleGet.g.cs @@ -55,6 +55,29 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR string id, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetStandardTemplateExampleApiV3StandardTemplateIdExampleGetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Standard Template Example
+ /// Get a example slides content data for a standard template.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetStandardTemplateExampleApiV3StandardTemplateIdExampleGetAsResponseAsync( + string id, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -84,6 +107,7 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: $"/api/v3/standard-template/{id}/example", baseUri: HttpClient.BaseAddress); @@ -157,6 +181,8 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -167,6 +193,11 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -184,6 +215,8 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -193,8 +226,7 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -203,6 +235,11 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -219,14 +256,15 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -266,6 +304,8 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -286,6 +326,8 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -348,9 +390,13 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR { __response.EnsureSuccessStatusCode(); - return - global::Presenton.TemplateExampleV3.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.TemplateExampleV3.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -378,9 +424,13 @@ partial void ProcessGetStandardTemplateExampleApiV3StandardTemplateIdExampleGetR #endif ).ConfigureAwait(false); - return - await global::Presenton.TemplateExampleV3.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.TemplateExampleV3.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.g.cs index 9fe0ee5..ab2d415 100644 --- a/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3StandardTemplateClient.g.cs @@ -72,10 +72,10 @@ public V3StandardTemplateClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3StandardTemplateClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3ThemeClient.GenerateThemeV3ApiV3ThemeGeneratePost.g.cs b/src/libs/Presenton/Generated/Presenton.V3ThemeClient.GenerateThemeV3ApiV3ThemeGeneratePost.g.cs index b01d8d2..f89870d 100644 --- a/src/libs/Presenton/Generated/Presenton.V3ThemeClient.GenerateThemeV3ApiV3ThemeGeneratePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3ThemeClient.GenerateThemeV3ApiV3ThemeGeneratePost.g.cs @@ -50,6 +50,28 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( /// public async global::System.Threading.Tasks.Task GenerateThemeV3ApiV3ThemeGeneratePostAsync( + global::Presenton.GenerateThemeRequestV3 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GenerateThemeV3ApiV3ThemeGeneratePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Generate Theme V3 + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GenerateThemeV3ApiV3ThemeGeneratePostAsResponseAsync( + global::Presenton.GenerateThemeRequestV3 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/theme/generate", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -354,9 +395,13 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::Presenton.ThemeData.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.ThemeData.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -384,9 +429,13 @@ partial void ProcessGenerateThemeV3ApiV3ThemeGeneratePostResponseContent( #endif ).ConfigureAwait(false); - return - await global::Presenton.ThemeData.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.ThemeData.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3ThemeClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3ThemeClient.g.cs index 68d49b5..5135a3a 100644 --- a/src/libs/Presenton/Generated/Presenton.V3ThemeClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3ThemeClient.g.cs @@ -72,10 +72,10 @@ public V3ThemeClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3ThemeClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.V3WebhookClient.GetAllWebhookSubscriptionsV3ApiV3WebhookAllGet.g.cs b/src/libs/Presenton/Generated/Presenton.V3WebhookClient.GetAllWebhookSubscriptionsV3ApiV3WebhookAllGet.g.cs index a168257..4a84500 100644 --- a/src/libs/Presenton/Generated/Presenton.V3WebhookClient.GetAllWebhookSubscriptionsV3ApiV3WebhookAllGet.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3WebhookClient.GetAllWebhookSubscriptionsV3ApiV3WebhookAllGet.g.cs @@ -51,6 +51,26 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten public async global::System.Threading.Tasks.Task> GetAllWebhookSubscriptionsV3ApiV3WebhookAllGetAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAllWebhookSubscriptionsV3ApiV3WebhookAllGetAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get All Webhook Subscriptions V3
+ /// Get all webhook subscriptions of the user.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> GetAllWebhookSubscriptionsV3ApiV3WebhookAllGetAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -79,6 +99,7 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/webhook/all", baseUri: HttpClient.BaseAddress); @@ -151,6 +172,8 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -161,6 +184,11 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -178,6 +206,8 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -187,8 +217,7 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -197,6 +226,11 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -213,14 +247,15 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -260,6 +295,8 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -280,6 +317,8 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -342,9 +381,13 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -372,9 +415,13 @@ partial void ProcessGetAllWebhookSubscriptionsV3ApiV3WebhookAllGetResponseConten #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3WebhookClient.SubscribeToWebhookV3ApiV3WebhookSubscribePost.g.cs b/src/libs/Presenton/Generated/Presenton.V3WebhookClient.SubscribeToWebhookV3ApiV3WebhookSubscribePost.g.cs index c46e56e..ae8b28b 100644 --- a/src/libs/Presenton/Generated/Presenton.V3WebhookClient.SubscribeToWebhookV3ApiV3WebhookSubscribePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3WebhookClient.SubscribeToWebhookV3ApiV3WebhookSubscribePost.g.cs @@ -53,6 +53,31 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent /// public async global::System.Threading.Tasks.Task SubscribeToWebhookV3ApiV3WebhookSubscribePostAsync( + global::Presenton.SubscribeToWebhookRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SubscribeToWebhookV3ApiV3WebhookSubscribePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Subscribe To Webhook V3
+ /// Subscribe to a webhook.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SubscribeToWebhookV3ApiV3WebhookSubscribePostAsResponseAsync( + global::Presenton.SubscribeToWebhookRequestV1 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/webhook/subscribe", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent { __response.EnsureSuccessStatusCode(); - return - global::Presenton.SubscribeToWebhookResponseV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.SubscribeToWebhookResponseV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessSubscribeToWebhookV3ApiV3WebhookSubscribePostResponseContent #endif ).ConfigureAwait(false); - return - await global::Presenton.SubscribeToWebhookResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.SubscribeToWebhookResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3WebhookClient.UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDelete.g.cs b/src/libs/Presenton/Generated/Presenton.V3WebhookClient.UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDelete.g.cs index 9a041b1..7b01894 100644 --- a/src/libs/Presenton/Generated/Presenton.V3WebhookClient.UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3WebhookClient.UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDelete.g.cs @@ -46,6 +46,24 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA public async global::System.Threading.Tasks.Task UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDeleteAsync( global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDeleteAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Unsubscribe All Webhook Subscriptions V3
+ /// Unsubscribe from all webhook subscriptions of the user.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeAllDeleteAsResponseAsync( + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -74,6 +92,7 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/webhook/unsubscribe/all", baseUri: HttpClient.BaseAddress); @@ -146,6 +165,8 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -156,6 +177,11 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -173,6 +199,8 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -182,8 +210,7 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -192,6 +219,11 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -208,14 +240,15 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -255,6 +288,8 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -275,6 +310,8 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -333,6 +370,10 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -354,6 +395,10 @@ partial void ProcessUnsubscribeAllWebhookSubscriptionsV3ApiV3WebhookUnsubscribeA try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3WebhookClient.UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDelete.g.cs b/src/libs/Presenton/Generated/Presenton.V3WebhookClient.UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDelete.g.cs index 849c25c..fe41994 100644 --- a/src/libs/Presenton/Generated/Presenton.V3WebhookClient.UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3WebhookClient.UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDelete.g.cs @@ -48,6 +48,29 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( /// public async global::System.Threading.Tasks.Task UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteAsync( + global::Presenton.BodyUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDelete request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Unsubscribe To Webhook V3
+ /// Unsubscribe from a webhook.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteAsResponseAsync( + global::Presenton.BodyUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDelete request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -82,6 +105,7 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v3/webhook/unsubscribe", baseUri: HttpClient.BaseAddress); @@ -161,6 +185,8 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +197,11 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +219,8 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +230,7 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +239,11 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +260,15 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +308,8 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +330,8 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -348,6 +390,10 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -369,6 +415,10 @@ partial void ProcessUnsubscribeToWebhookV3ApiV3WebhookUnsubscribeDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.V3WebhookClient.g.cs b/src/libs/Presenton/Generated/Presenton.V3WebhookClient.g.cs index b09e540..fc3e133 100644 --- a/src/libs/Presenton/Generated/Presenton.V3WebhookClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.V3WebhookClient.g.cs @@ -72,10 +72,10 @@ public V3WebhookClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public V3WebhookClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Presenton/Generated/Presenton.WebhookClient.SubscribeToWebhookV1ApiV1WebhookSubscribePost.g.cs b/src/libs/Presenton/Generated/Presenton.WebhookClient.SubscribeToWebhookV1ApiV1WebhookSubscribePost.g.cs index 8bd4071..5dc9f5c 100644 --- a/src/libs/Presenton/Generated/Presenton.WebhookClient.SubscribeToWebhookV1ApiV1WebhookSubscribePost.g.cs +++ b/src/libs/Presenton/Generated/Presenton.WebhookClient.SubscribeToWebhookV1ApiV1WebhookSubscribePost.g.cs @@ -53,6 +53,31 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent /// public async global::System.Threading.Tasks.Task SubscribeToWebhookV1ApiV1WebhookSubscribePostAsync( + global::Presenton.SubscribeToWebhookRequestV1 request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SubscribeToWebhookV1ApiV1WebhookSubscribePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Subscribe To Webhook V1
+ /// Subscribe to a webhook.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SubscribeToWebhookV1ApiV1WebhookSubscribePostAsResponseAsync( + global::Presenton.SubscribeToWebhookRequestV1 request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -87,6 +112,7 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/webhook/subscribe", baseUri: HttpClient.BaseAddress); @@ -166,6 +192,8 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -176,6 +204,11 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -193,6 +226,8 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -202,8 +237,7 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -212,6 +246,11 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -228,14 +267,15 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -275,6 +315,8 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -295,6 +337,8 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -357,9 +401,13 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent { __response.EnsureSuccessStatusCode(); - return - global::Presenton.SubscribeToWebhookResponseV1.FromJson(__content, JsonSerializerContext) ?? + var __value = global::Presenton.SubscribeToWebhookResponseV1.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -387,9 +435,13 @@ partial void ProcessSubscribeToWebhookV1ApiV1WebhookSubscribePostResponseContent #endif ).ConfigureAwait(false); - return - await global::Presenton.SubscribeToWebhookResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::Presenton.SubscribeToWebhookResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.WebhookClient.UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDelete.g.cs b/src/libs/Presenton/Generated/Presenton.WebhookClient.UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDelete.g.cs index 58bc31d..2d4bba9 100644 --- a/src/libs/Presenton/Generated/Presenton.WebhookClient.UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDelete.g.cs +++ b/src/libs/Presenton/Generated/Presenton.WebhookClient.UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDelete.g.cs @@ -48,6 +48,29 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( /// public async global::System.Threading.Tasks.Task UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteAsync( + global::Presenton.BodyUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDelete request, + global::Presenton.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Unsubscribe To Webhook V1
+ /// Unsubscribe from a webhook.
+ /// Create an API Key from your account to access this endpoint.
+ /// Authorization: Bearer sk-presenton-xxxxxxxx + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteAsResponseAsync( + global::Presenton.BodyUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDelete request, global::Presenton.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -82,6 +105,7 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::Presenton.PathBuilder( path: "/api/v1/webhook/unsubscribe", baseUri: HttpClient.BaseAddress); @@ -161,6 +185,8 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -171,6 +197,11 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -188,6 +219,8 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -197,8 +230,7 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -207,6 +239,11 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( __attempt < __maxAttempts && global::Presenton.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::Presenton.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::Presenton.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::Presenton.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -223,14 +260,15 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::Presenton.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -270,6 +308,8 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -290,6 +330,8 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } // Validation Error @@ -348,6 +390,10 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -369,6 +415,10 @@ partial void ProcessUnsubscribeToWebhookV1ApiV1WebhookUnsubscribeDeleteResponse( try { __response.EnsureSuccessStatusCode(); + return new global::Presenton.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Presenton.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Presenton/Generated/Presenton.WebhookClient.g.cs b/src/libs/Presenton/Generated/Presenton.WebhookClient.g.cs index 27dabbb..40e31b0 100644 --- a/src/libs/Presenton/Generated/Presenton.WebhookClient.g.cs +++ b/src/libs/Presenton/Generated/Presenton.WebhookClient.g.cs @@ -72,10 +72,10 @@ public WebhookClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public WebhookClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::Presenton.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::Presenton.AutoSDKClientOptions? options, bool disposeHttpClient = true) {